Package com.google.cloud.orgpolicy.v2
Class CustomConstraint
java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.cloud.orgpolicy.v2.CustomConstraint
- All Implemented Interfaces:
CustomConstraintOrBuilder,com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Serializable
@Generated
public final class CustomConstraint
extends com.google.protobuf.GeneratedMessage
implements CustomConstraintOrBuilder
A custom constraint defined by customers which can *only* be applied to the given resource types and organization. By creating a custom constraint, customers can apply policies of this custom constraint. *Creating a custom constraint itself does NOT apply any policy enforcement*.Protobuf type
google.cloud.orgpolicy.v2.CustomConstraint- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumAllow or deny type.static final classA custom constraint defined by customers which can *only* be applied to the given resource types and organization.static enumThe operation for which this constraint will be applied.Nested 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 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 TypeMethodDescriptionbooleanAllow or deny type.intAllow or deny type.A Common Expression Language (CEL) condition which is used in the evaluation of the constraint.com.google.protobuf.ByteStringA Common Expression Language (CEL) condition which is used in the evaluation of the constraint.static CustomConstraintDetailed information about this custom policy constraint.com.google.protobuf.ByteStringDetailed information about this custom policy constraint.static final com.google.protobuf.Descriptors.DescriptorOne line display name for the UI.com.google.protobuf.ByteStringOne line display name for the UI.getMethodTypes(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.getName()Immutable.com.google.protobuf.ByteStringImmutable.com.google.protobuf.Parser<CustomConstraint>getResourceTypes(int index) Immutable.com.google.protobuf.ByteStringgetResourceTypesBytes(int index) Immutable.intImmutable.com.google.protobuf.ProtocolStringListImmutable.intcom.google.protobuf.TimestampOutput only.com.google.protobuf.TimestampOrBuilderOutput only.inthashCode()booleanOutput only.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanstatic CustomConstraint.Builderstatic CustomConstraint.BuildernewBuilder(CustomConstraint prototype) protected CustomConstraint.BuildernewBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) static CustomConstraintparseDelimitedFrom(InputStream input) static CustomConstraintparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static CustomConstraintparseFrom(byte[] data) static CustomConstraintparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static CustomConstraintparseFrom(com.google.protobuf.ByteString data) static CustomConstraintparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static CustomConstraintparseFrom(com.google.protobuf.CodedInputStream input) static CustomConstraintparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static CustomConstraintparseFrom(InputStream input) static CustomConstraintparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static CustomConstraintparseFrom(ByteBuffer data) static CustomConstraintparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<CustomConstraint>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, internalGetMapFieldReflection, 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
-
NAME_FIELD_NUMBER
public static final int NAME_FIELD_NUMBER- See Also:
-
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:
-
DISPLAY_NAME_FIELD_NUMBER
public static final int DISPLAY_NAME_FIELD_NUMBER- See Also:
-
DESCRIPTION_FIELD_NUMBER
public static final int DESCRIPTION_FIELD_NUMBER- See Also:
-
UPDATE_TIME_FIELD_NUMBER
public static final int UPDATE_TIME_FIELD_NUMBER- See Also:
-
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage
-
getName
Immutable. Name of the constraint. This is unique within the organization. Format of the name should be * `organizations/{organization_id}/customConstraints/{custom_constraint_id}` Example: `organizations/123/customConstraints/custom.createOnlyE2TypeVms` The max length is 70 characters and the minimum length is 1. Note that the prefix `organizations/{organization_id}/customConstraints/` is not counted.string name = 1 [(.google.api.field_behavior) = IMMUTABLE];- Specified by:
getNamein interfaceCustomConstraintOrBuilder- Returns:
- The name.
-
getNameBytes
public com.google.protobuf.ByteString getNameBytes()Immutable. Name of the constraint. This is unique within the organization. Format of the name should be * `organizations/{organization_id}/customConstraints/{custom_constraint_id}` Example: `organizations/123/customConstraints/custom.createOnlyE2TypeVms` The max length is 70 characters and the minimum length is 1. Note that the prefix `organizations/{organization_id}/customConstraints/` is not counted.string name = 1 [(.google.api.field_behavior) = IMMUTABLE];- Specified by:
getNameBytesin interfaceCustomConstraintOrBuilder- Returns:
- The bytes for name.
-
getResourceTypesList
public com.google.protobuf.ProtocolStringList getResourceTypesList()Immutable. 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 = 2 [(.google.api.field_behavior) = IMMUTABLE];- Specified by:
getResourceTypesListin interfaceCustomConstraintOrBuilder- Returns:
- A list containing the resourceTypes.
-
getResourceTypesCount
public int getResourceTypesCount()Immutable. 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 = 2 [(.google.api.field_behavior) = IMMUTABLE];- Specified by:
getResourceTypesCountin interfaceCustomConstraintOrBuilder- Returns:
- The count of resourceTypes.
-
getResourceTypes
Immutable. 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 = 2 [(.google.api.field_behavior) = IMMUTABLE];- Specified by:
getResourceTypesin interfaceCustomConstraintOrBuilder- 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) Immutable. 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 = 2 [(.google.api.field_behavior) = IMMUTABLE];- Specified by:
getResourceTypesBytesin interfaceCustomConstraintOrBuilder- 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.CustomConstraint.MethodType method_types = 3;- Specified by:
getMethodTypesListin interfaceCustomConstraintOrBuilder- Returns:
- A list containing the methodTypes.
-
getMethodTypesCount
public int getMethodTypesCount()All the operations being applied for this constraint.
repeated .google.cloud.orgpolicy.v2.CustomConstraint.MethodType method_types = 3;- Specified by:
getMethodTypesCountin interfaceCustomConstraintOrBuilder- Returns:
- The count of methodTypes.
-
getMethodTypes
All the operations being applied for this constraint.
repeated .google.cloud.orgpolicy.v2.CustomConstraint.MethodType method_types = 3;- Specified by:
getMethodTypesin interfaceCustomConstraintOrBuilder- 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.CustomConstraint.MethodType method_types = 3;- Specified by:
getMethodTypesValueListin interfaceCustomConstraintOrBuilder- 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.CustomConstraint.MethodType method_types = 3;- Specified by:
getMethodTypesValuein interfaceCustomConstraintOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The enum numeric value on the wire of methodTypes at the given index.
-
getCondition
A Common Expression Language (CEL) condition which is used in the evaluation of the constraint. 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 = 4;- Specified by:
getConditionin interfaceCustomConstraintOrBuilder- Returns:
- The condition.
-
getConditionBytes
public com.google.protobuf.ByteString getConditionBytes()A Common Expression Language (CEL) condition which is used in the evaluation of the constraint. 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 = 4;- Specified by:
getConditionBytesin interfaceCustomConstraintOrBuilder- Returns:
- The bytes for condition.
-
getActionTypeValue
public int getActionTypeValue()Allow or deny type.
.google.cloud.orgpolicy.v2.CustomConstraint.ActionType action_type = 5;- Specified by:
getActionTypeValuein interfaceCustomConstraintOrBuilder- Returns:
- The enum numeric value on the wire for actionType.
-
getActionType
Allow or deny type.
.google.cloud.orgpolicy.v2.CustomConstraint.ActionType action_type = 5;- Specified by:
getActionTypein interfaceCustomConstraintOrBuilder- Returns:
- The actionType.
-
getDisplayName
One line display name for the UI. The max length of the display_name is 200 characters.
string display_name = 6;- Specified by:
getDisplayNamein interfaceCustomConstraintOrBuilder- Returns:
- The displayName.
-
getDisplayNameBytes
public com.google.protobuf.ByteString getDisplayNameBytes()One line display name for the UI. The max length of the display_name is 200 characters.
string display_name = 6;- Specified by:
getDisplayNameBytesin interfaceCustomConstraintOrBuilder- Returns:
- The bytes for displayName.
-
getDescription
Detailed information about this custom policy constraint. The max length of the description is 2000 characters.
string description = 7;- Specified by:
getDescriptionin interfaceCustomConstraintOrBuilder- Returns:
- The description.
-
getDescriptionBytes
public com.google.protobuf.ByteString getDescriptionBytes()Detailed information about this custom policy constraint. The max length of the description is 2000 characters.
string description = 7;- Specified by:
getDescriptionBytesin interfaceCustomConstraintOrBuilder- Returns:
- The bytes for description.
-
hasUpdateTime
public boolean hasUpdateTime()Output only. The last time this custom constraint was updated. This represents the last time that the `CreateCustomConstraint` or `UpdateCustomConstraint` methods were called.
.google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
hasUpdateTimein interfaceCustomConstraintOrBuilder- Returns:
- Whether the updateTime field is set.
-
getUpdateTime
public com.google.protobuf.Timestamp getUpdateTime()Output only. The last time this custom constraint was updated. This represents the last time that the `CreateCustomConstraint` or `UpdateCustomConstraint` methods were called.
.google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getUpdateTimein interfaceCustomConstraintOrBuilder- Returns:
- The updateTime.
-
getUpdateTimeOrBuilder
public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder()Output only. The last time this custom constraint was updated. This represents the last time that the `CreateCustomConstraint` or `UpdateCustomConstraint` methods were called.
.google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getUpdateTimeOrBuilderin interfaceCustomConstraintOrBuilder
-
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 CustomConstraint parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static CustomConstraint parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static CustomConstraint parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static CustomConstraint parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static CustomConstraint parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static CustomConstraint parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static CustomConstraint parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static CustomConstraint parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
public static CustomConstraint parseFrom(com.google.protobuf.CodedInputStream input) throws IOException - Throws:
IOException
-
parseFrom
public static CustomConstraint 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
-
toBuilder
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected CustomConstraint.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
-