Package com.google.cloud.orgpolicy.v2
Class Constraint.CustomConstraintDefinition
java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.cloud.orgpolicy.v2.Constraint.CustomConstraintDefinition
- All Implemented Interfaces:
Constraint.CustomConstraintDefinitionOrBuilder,com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Serializable
- Enclosing class:
- Constraint
public static final class Constraint.CustomConstraintDefinition
extends com.google.protobuf.GeneratedMessage
implements Constraint.CustomConstraintDefinitionOrBuilder
Custom constraint definition. Defines this as a managed constraint.Protobuf type
google.cloud.orgpolicy.v2.Constraint.CustomConstraintDefinition- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumAllow or deny type.static final classCustom constraint definition.static enumThe operation for which this constraint will be applied.static final classDefines a parameter structure.static interfaceNested classes/interfaces inherited from class com.google.protobuf.GeneratedMessage
com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT, BuilderT>>, com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.FieldAccessorTable, com.google.protobuf.GeneratedMessage.GeneratedExtension<ContainingT extends com.google.protobuf.Message, T extends Object>, com.google.protobuf.GeneratedMessage.UnusedPrivateParameter Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessage
com.google.protobuf.AbstractMessage.BuilderParentNested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessageLite.InternalOneOfEnum -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class com.google.protobuf.GeneratedMessage
alwaysUseFieldBuilders, loggedPre22TypeNames, unknownFieldsFields inherited from class com.google.protobuf.AbstractMessage
memoizedSizeFields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode -
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsParameters(String key) Stores the structure of [`Parameters`][google.cloud.orgpolicy.v2.Constraint.CustomConstraintDefinition.Parameter] used by the constraint condition.booleanAllow or deny type.intAllow or deny type.Org policy condition/expression.com.google.protobuf.ByteStringOrg policy condition/expression.static final com.google.protobuf.Descriptors.DescriptorgetMethodTypes(int index) All the operations being applied for this constraint.intAll the operations being applied for this constraint.All the operations being applied for this constraint.intgetMethodTypesValue(int index) All the operations being applied for this constraint.All the operations being applied for this constraint.Deprecated.intStores the structure of [`Parameters`][google.cloud.orgpolicy.v2.Constraint.CustomConstraintDefinition.Parameter] used by the constraint condition.Stores the structure of [`Parameters`][google.cloud.orgpolicy.v2.Constraint.CustomConstraintDefinition.Parameter] used by the constraint condition.getParametersOrDefault(String key, Constraint.CustomConstraintDefinition.Parameter defaultValue) Stores the structure of [`Parameters`][google.cloud.orgpolicy.v2.Constraint.CustomConstraintDefinition.Parameter] used by the constraint condition.Stores the structure of [`Parameters`][google.cloud.orgpolicy.v2.Constraint.CustomConstraintDefinition.Parameter] used by the constraint condition.com.google.protobuf.Parser<Constraint.CustomConstraintDefinition>getResourceTypes(int index) The resource instance type on which this policy applies.com.google.protobuf.ByteStringgetResourceTypesBytes(int index) The resource instance type on which this policy applies.intThe resource instance type on which this policy applies.com.google.protobuf.ProtocolStringListThe resource instance type on which this policy applies.intinthashCode()protected com.google.protobuf.GeneratedMessage.FieldAccessorTableprotected com.google.protobuf.MapFieldReflectionAccessorinternalGetMapFieldReflection(int number) final booleannewBuilder(Constraint.CustomConstraintDefinition prototype) newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) parseDelimitedFrom(InputStream input) parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) parseFrom(byte[] data) parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) parseFrom(com.google.protobuf.ByteString data) parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) parseFrom(com.google.protobuf.CodedInputStream input) parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) parseFrom(InputStream input) parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) parseFrom(ByteBuffer data) parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<Constraint.CustomConstraintDefinition>parser()voidwriteTo(com.google.protobuf.CodedOutputStream output) Methods inherited from class com.google.protobuf.GeneratedMessage
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, newFileScopedGeneratedExtension, newInstance, newMessageScopedGeneratedExtension, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagMethods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashFields, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite
addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLite
toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Field Details
-
RESOURCE_TYPES_FIELD_NUMBER
public static final int RESOURCE_TYPES_FIELD_NUMBER- See Also:
-
METHOD_TYPES_FIELD_NUMBER
public static final int METHOD_TYPES_FIELD_NUMBER- See Also:
-
CONDITION_FIELD_NUMBER
public static final int CONDITION_FIELD_NUMBER- See Also:
-
ACTION_TYPE_FIELD_NUMBER
public static final int ACTION_TYPE_FIELD_NUMBER- See Also:
-
PARAMETERS_FIELD_NUMBER
public static final int PARAMETERS_FIELD_NUMBER- See Also:
-
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetMapFieldReflection
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number) - Overrides:
internalGetMapFieldReflectionin classcom.google.protobuf.GeneratedMessage
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage
-
getResourceTypesList
public com.google.protobuf.ProtocolStringList getResourceTypesList()The resource instance type on which this policy applies. Format will be of the form : `<service name>/<type>` Example: * `compute.googleapis.com/Instance`.
repeated string resource_types = 1;- Specified by:
getResourceTypesListin interfaceConstraint.CustomConstraintDefinitionOrBuilder- Returns:
- A list containing the resourceTypes.
-
getResourceTypesCount
public int getResourceTypesCount()The resource instance type on which this policy applies. Format will be of the form : `<service name>/<type>` Example: * `compute.googleapis.com/Instance`.
repeated string resource_types = 1;- Specified by:
getResourceTypesCountin interfaceConstraint.CustomConstraintDefinitionOrBuilder- Returns:
- The count of resourceTypes.
-
getResourceTypes
The resource instance type on which this policy applies. Format will be of the form : `<service name>/<type>` Example: * `compute.googleapis.com/Instance`.
repeated string resource_types = 1;- Specified by:
getResourceTypesin interfaceConstraint.CustomConstraintDefinitionOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The resourceTypes at the given index.
-
getResourceTypesBytes
public com.google.protobuf.ByteString getResourceTypesBytes(int index) The resource instance type on which this policy applies. Format will be of the form : `<service name>/<type>` Example: * `compute.googleapis.com/Instance`.
repeated string resource_types = 1;- Specified by:
getResourceTypesBytesin interfaceConstraint.CustomConstraintDefinitionOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the resourceTypes at the given index.
-
getMethodTypesList
All the operations being applied for this constraint.
repeated .google.cloud.orgpolicy.v2.Constraint.CustomConstraintDefinition.MethodType method_types = 2;- Specified by:
getMethodTypesListin interfaceConstraint.CustomConstraintDefinitionOrBuilder- Returns:
- A list containing the methodTypes.
-
getMethodTypesCount
public int getMethodTypesCount()All the operations being applied for this constraint.
repeated .google.cloud.orgpolicy.v2.Constraint.CustomConstraintDefinition.MethodType method_types = 2;- Specified by:
getMethodTypesCountin interfaceConstraint.CustomConstraintDefinitionOrBuilder- Returns:
- The count of methodTypes.
-
getMethodTypes
All the operations being applied for this constraint.
repeated .google.cloud.orgpolicy.v2.Constraint.CustomConstraintDefinition.MethodType method_types = 2;- Specified by:
getMethodTypesin interfaceConstraint.CustomConstraintDefinitionOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The methodTypes at the given index.
-
getMethodTypesValueList
All the operations being applied for this constraint.
repeated .google.cloud.orgpolicy.v2.Constraint.CustomConstraintDefinition.MethodType method_types = 2;- Specified by:
getMethodTypesValueListin interfaceConstraint.CustomConstraintDefinitionOrBuilder- Returns:
- A list containing the enum numeric values on the wire for methodTypes.
-
getMethodTypesValue
public int getMethodTypesValue(int index) All the operations being applied for this constraint.
repeated .google.cloud.orgpolicy.v2.Constraint.CustomConstraintDefinition.MethodType method_types = 2;- Specified by:
getMethodTypesValuein interfaceConstraint.CustomConstraintDefinitionOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The enum numeric value on the wire of methodTypes at the given index.
-
getCondition
Org policy condition/expression. For example: `resource.instanceName.matches("[production|test]_.*_(\d)+")` or, `resource.management.auto_upgrade == true` The max length of the condition is 1000 characters.string condition = 3;- Specified by:
getConditionin interfaceConstraint.CustomConstraintDefinitionOrBuilder- Returns:
- The condition.
-
getConditionBytes
public com.google.protobuf.ByteString getConditionBytes()Org policy condition/expression. For example: `resource.instanceName.matches("[production|test]_.*_(\d)+")` or, `resource.management.auto_upgrade == true` The max length of the condition is 1000 characters.string condition = 3;- Specified by:
getConditionBytesin interfaceConstraint.CustomConstraintDefinitionOrBuilder- Returns:
- The bytes for condition.
-
getActionTypeValue
public int getActionTypeValue()Allow or deny type.
.google.cloud.orgpolicy.v2.Constraint.CustomConstraintDefinition.ActionType action_type = 4;- Specified by:
getActionTypeValuein interfaceConstraint.CustomConstraintDefinitionOrBuilder- Returns:
- The enum numeric value on the wire for actionType.
-
getActionType
Allow or deny type.
.google.cloud.orgpolicy.v2.Constraint.CustomConstraintDefinition.ActionType action_type = 4;- Specified by:
getActionTypein interfaceConstraint.CustomConstraintDefinitionOrBuilder- Returns:
- The actionType.
-
getParametersCount
public int getParametersCount()Description copied from interface:Constraint.CustomConstraintDefinitionOrBuilderStores the structure of [`Parameters`][google.cloud.orgpolicy.v2.Constraint.CustomConstraintDefinition.Parameter] used by the constraint condition. The key of `map` represents the name of the parameter.
map<string, .google.cloud.orgpolicy.v2.Constraint.CustomConstraintDefinition.Parameter> parameters = 5;- Specified by:
getParametersCountin interfaceConstraint.CustomConstraintDefinitionOrBuilder
-
containsParameters
Stores the structure of [`Parameters`][google.cloud.orgpolicy.v2.Constraint.CustomConstraintDefinition.Parameter] used by the constraint condition. The key of `map` represents the name of the parameter.
map<string, .google.cloud.orgpolicy.v2.Constraint.CustomConstraintDefinition.Parameter> parameters = 5;- Specified by:
containsParametersin interfaceConstraint.CustomConstraintDefinitionOrBuilder
-
getParameters
Deprecated.UsegetParametersMap()instead.- Specified by:
getParametersin interfaceConstraint.CustomConstraintDefinitionOrBuilder
-
getParametersMap
Stores the structure of [`Parameters`][google.cloud.orgpolicy.v2.Constraint.CustomConstraintDefinition.Parameter] used by the constraint condition. The key of `map` represents the name of the parameter.
map<string, .google.cloud.orgpolicy.v2.Constraint.CustomConstraintDefinition.Parameter> parameters = 5;- Specified by:
getParametersMapin interfaceConstraint.CustomConstraintDefinitionOrBuilder
-
getParametersOrDefault
public Constraint.CustomConstraintDefinition.Parameter getParametersOrDefault(String key, Constraint.CustomConstraintDefinition.Parameter defaultValue) Stores the structure of [`Parameters`][google.cloud.orgpolicy.v2.Constraint.CustomConstraintDefinition.Parameter] used by the constraint condition. The key of `map` represents the name of the parameter.
map<string, .google.cloud.orgpolicy.v2.Constraint.CustomConstraintDefinition.Parameter> parameters = 5;- Specified by:
getParametersOrDefaultin interfaceConstraint.CustomConstraintDefinitionOrBuilder
-
getParametersOrThrow
Stores the structure of [`Parameters`][google.cloud.orgpolicy.v2.Constraint.CustomConstraintDefinition.Parameter] used by the constraint condition. The key of `map` represents the name of the parameter.
map<string, .google.cloud.orgpolicy.v2.Constraint.CustomConstraintDefinition.Parameter> parameters = 5;- Specified by:
getParametersOrThrowin interfaceConstraint.CustomConstraintDefinitionOrBuilder
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage
-
writeTo
- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessage- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessage
-
equals
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.google.protobuf.AbstractMessage
-
parseFrom
public static Constraint.CustomConstraintDefinition parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Constraint.CustomConstraintDefinition parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Constraint.CustomConstraintDefinition parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Constraint.CustomConstraintDefinition parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Constraint.CustomConstraintDefinition parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Constraint.CustomConstraintDefinition parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static Constraint.CustomConstraintDefinition parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
public static Constraint.CustomConstraintDefinition parseDelimitedFrom(InputStream input) throws IOException - Throws:
IOException
-
parseDelimitedFrom
public static Constraint.CustomConstraintDefinition parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
public static Constraint.CustomConstraintDefinition parseFrom(com.google.protobuf.CodedInputStream input) throws IOException - Throws:
IOException
-
parseFrom
public static Constraint.CustomConstraintDefinition parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
newBuilderForType
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
-
newBuilder
public static Constraint.CustomConstraintDefinition.Builder newBuilder(Constraint.CustomConstraintDefinition prototype) -
toBuilder
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected Constraint.CustomConstraintDefinition.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) - Overrides:
newBuilderForTypein classcom.google.protobuf.AbstractMessage
-
getDefaultInstance
-
parser
-
getParserForType
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessage
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-