public static final class Constraint.CustomConstraintDefinition extends GeneratedMessageV3 implements Constraint.CustomConstraintDefinitionOrBuilder
Custom constraint definition. Defines this as a managed constraint.
Protobuf type google.cloud.orgpolicy.v2.Constraint.CustomConstraintDefinition
Inherited Members
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT,int)
com.google.protobuf.GeneratedMessageV3.<T>emptyList(java.lang.Class<T>)
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)
Static Fields
ACTION_TYPE_FIELD_NUMBER
public static final int ACTION_TYPE_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
CONDITION_FIELD_NUMBER
public static final int CONDITION_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
METHOD_TYPES_FIELD_NUMBER
public static final int METHOD_TYPES_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
PARAMETERS_FIELD_NUMBER
public static final int PARAMETERS_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
RESOURCE_TYPES_FIELD_NUMBER
public static final int RESOURCE_TYPES_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
Static Methods
getDefaultInstance()
public static Constraint.CustomConstraintDefinition getDefaultInstance()
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
newBuilder()
public static Constraint.CustomConstraintDefinition.Builder newBuilder()
newBuilder(Constraint.CustomConstraintDefinition prototype)
public static Constraint.CustomConstraintDefinition.Builder newBuilder(Constraint.CustomConstraintDefinition prototype)
public static Constraint.CustomConstraintDefinition parseDelimitedFrom(InputStream input)
public static Constraint.CustomConstraintDefinition parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(byte[] data)
public static Constraint.CustomConstraintDefinition parseFrom(byte[] data)
Parameter |
Name |
Description |
data |
byte[]
|
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static Constraint.CustomConstraintDefinition parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteString data)
public static Constraint.CustomConstraintDefinition parseFrom(ByteString data)
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static Constraint.CustomConstraintDefinition parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static Constraint.CustomConstraintDefinition parseFrom(CodedInputStream input)
public static Constraint.CustomConstraintDefinition parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public static Constraint.CustomConstraintDefinition parseFrom(InputStream input)
public static Constraint.CustomConstraintDefinition parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteBuffer data)
public static Constraint.CustomConstraintDefinition parseFrom(ByteBuffer data)
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static Constraint.CustomConstraintDefinition parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
parser()
public static Parser<Constraint.CustomConstraintDefinition> parser()
Methods
containsParameters(String key)
public boolean containsParameters(String key)
Stores the structure of
Parameters
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;
Parameter |
Name |
Description |
key |
String
|
equals(Object obj)
public boolean equals(Object obj)
Parameter |
Name |
Description |
obj |
Object
|
Overrides
getActionType()
public Constraint.CustomConstraintDefinition.ActionType getActionType()
Allow or deny type.
.google.cloud.orgpolicy.v2.Constraint.CustomConstraintDefinition.ActionType action_type = 4;
getActionTypeValue()
public int getActionTypeValue()
Allow or deny type.
.google.cloud.orgpolicy.v2.Constraint.CustomConstraintDefinition.ActionType action_type = 4;
Returns |
Type |
Description |
int |
The enum numeric value on the wire for actionType.
|
getCondition()
public String 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;
Returns |
Type |
Description |
String |
The condition.
|
getConditionBytes()
public 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;
Returns |
Type |
Description |
ByteString |
The bytes for condition.
|
getDefaultInstanceForType()
public Constraint.CustomConstraintDefinition getDefaultInstanceForType()
getMethodTypes(int index)
public Constraint.CustomConstraintDefinition.MethodType getMethodTypes(int index)
All the operations being applied for this constraint.
repeated .google.cloud.orgpolicy.v2.Constraint.CustomConstraintDefinition.MethodType method_types = 2;
Parameter |
Name |
Description |
index |
int
The index of the element to return.
|
getMethodTypesCount()
public int getMethodTypesCount()
All the operations being applied for this constraint.
repeated .google.cloud.orgpolicy.v2.Constraint.CustomConstraintDefinition.MethodType method_types = 2;
Returns |
Type |
Description |
int |
The count of methodTypes.
|
getMethodTypesList()
public List<Constraint.CustomConstraintDefinition.MethodType> getMethodTypesList()
All the operations being applied for this constraint.
repeated .google.cloud.orgpolicy.v2.Constraint.CustomConstraintDefinition.MethodType method_types = 2;
Returns |
Type |
Description |
List<MethodType> |
A list containing the methodTypes.
|
getMethodTypesValue(int index)
public int getMethodTypesValue(int index)
All the operations being applied for this constraint.
repeated .google.cloud.orgpolicy.v2.Constraint.CustomConstraintDefinition.MethodType method_types = 2;
Parameter |
Name |
Description |
index |
int
The index of the value to return.
|
Returns |
Type |
Description |
int |
The enum numeric value on the wire of methodTypes at the given index.
|
getMethodTypesValueList()
public List<Integer> getMethodTypesValueList()
All the operations being applied for this constraint.
repeated .google.cloud.orgpolicy.v2.Constraint.CustomConstraintDefinition.MethodType method_types = 2;
Returns |
Type |
Description |
List<Integer> |
A list containing the enum numeric values on the wire for methodTypes.
|
getParameters() (deprecated)
public Map<String,Constraint.CustomConstraintDefinition.Parameter> getParameters()
getParametersCount()
public int getParametersCount()
Stores the structure of
Parameters
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;
Returns |
Type |
Description |
int |
|
getParametersMap()
public Map<String,Constraint.CustomConstraintDefinition.Parameter> getParametersMap()
Stores the structure of
Parameters
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;
getParametersOrDefault(String key, Constraint.CustomConstraintDefinition.Parameter defaultValue)
public Constraint.CustomConstraintDefinition.Parameter getParametersOrDefault(String key, Constraint.CustomConstraintDefinition.Parameter defaultValue)
Stores the structure of
Parameters
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;
getParametersOrThrow(String key)
public Constraint.CustomConstraintDefinition.Parameter getParametersOrThrow(String key)
Stores the structure of
Parameters
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;
Parameter |
Name |
Description |
key |
String
|
getParserForType()
public Parser<Constraint.CustomConstraintDefinition> getParserForType()
Overrides
getResourceTypes(int index)
public String getResourceTypes(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;
Parameter |
Name |
Description |
index |
int
The index of the element to return.
|
Returns |
Type |
Description |
String |
The resourceTypes at the given index.
|
getResourceTypesBytes(int index)
public 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;
Parameter |
Name |
Description |
index |
int
The index of the value to return.
|
Returns |
Type |
Description |
ByteString |
The bytes of the resourceTypes at the given index.
|
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;
Returns |
Type |
Description |
int |
The count of resourceTypes.
|
getResourceTypesList()
public 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;
getSerializedSize()
public int getSerializedSize()
Returns |
Type |
Description |
int |
|
Overrides
hashCode()
Returns |
Type |
Description |
int |
|
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
internalGetMapFieldReflection(int number)
protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter |
Name |
Description |
number |
int
|
Returns |
Type |
Description |
com.google.protobuf.MapFieldReflectionAccessor |
|
Overrides
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)
isInitialized()
public final boolean isInitialized()
Overrides
newBuilderForType()
public Constraint.CustomConstraintDefinition.Builder newBuilderForType()
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected Constraint.CustomConstraintDefinition.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Returns |
Type |
Description |
Object |
|
Overrides
toBuilder()
public Constraint.CustomConstraintDefinition.Builder toBuilder()
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Overrides