Class AnalyzerOrgPolicyConstraint.CustomConstraint.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<AnalyzerOrgPolicyConstraint.CustomConstraint.Builder>
com.google.cloud.asset.v1.AnalyzerOrgPolicyConstraint.CustomConstraint.Builder
All Implemented Interfaces:
AnalyzerOrgPolicyConstraint.CustomConstraintOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
AnalyzerOrgPolicyConstraint.CustomConstraint

public static final class AnalyzerOrgPolicyConstraint.CustomConstraint.Builder extends com.google.protobuf.GeneratedMessage.Builder<AnalyzerOrgPolicyConstraint.CustomConstraint.Builder> implements AnalyzerOrgPolicyConstraint.CustomConstraintOrBuilder
 The definition of a custom constraint.
 
Protobuf type google.cloud.asset.v1.AnalyzerOrgPolicyConstraint.CustomConstraint
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<AnalyzerOrgPolicyConstraint.CustomConstraint.Builder>
    • clear

      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<AnalyzerOrgPolicyConstraint.CustomConstraint.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<AnalyzerOrgPolicyConstraint.CustomConstraint.Builder>
    • getDefaultInstanceForType

      public AnalyzerOrgPolicyConstraint.CustomConstraint getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public AnalyzerOrgPolicyConstraint.CustomConstraint.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<AnalyzerOrgPolicyConstraint.CustomConstraint.Builder>
    • mergeFrom

    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<AnalyzerOrgPolicyConstraint.CustomConstraint.Builder>
    • mergeFrom

      public AnalyzerOrgPolicyConstraint.CustomConstraint.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<AnalyzerOrgPolicyConstraint.CustomConstraint.Builder>
      Throws:
      IOException
    • getName

      public String getName()
       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"
       
      string name = 1;
      Specified by:
      getName in interface AnalyzerOrgPolicyConstraint.CustomConstraintOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       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"
       
      string name = 1;
      Specified by:
      getNameBytes in interface AnalyzerOrgPolicyConstraint.CustomConstraintOrBuilder
      Returns:
      The bytes for name.
    • setName

       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"
       
      string name = 1;
      Parameters:
      value - The name to set.
      Returns:
      This builder for chaining.
    • clearName

       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"
       
      string name = 1;
      Returns:
      This builder for chaining.
    • setNameBytes

      public AnalyzerOrgPolicyConstraint.CustomConstraint.Builder setNameBytes(com.google.protobuf.ByteString value)
       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"
       
      string name = 1;
      Parameters:
      value - The bytes for name to set.
      Returns:
      This builder for chaining.
    • getResourceTypesList

      public com.google.protobuf.ProtocolStringList getResourceTypesList()
       The Resource Instance type on which this policy applies to. Format will
       be of the form : "<canonical service name>/<type>" Example:
       * `compute.googleapis.com/Instance`.
       
      repeated string resource_types = 2;
      Specified by:
      getResourceTypesList in interface AnalyzerOrgPolicyConstraint.CustomConstraintOrBuilder
      Returns:
      A list containing the resourceTypes.
    • getResourceTypesCount

      public int getResourceTypesCount()
       The Resource Instance type on which this policy applies to. Format will
       be of the form : "<canonical service name>/<type>" Example:
       * `compute.googleapis.com/Instance`.
       
      repeated string resource_types = 2;
      Specified by:
      getResourceTypesCount in interface AnalyzerOrgPolicyConstraint.CustomConstraintOrBuilder
      Returns:
      The count of resourceTypes.
    • getResourceTypes

      public String getResourceTypes(int index)
       The Resource Instance type on which this policy applies to. Format will
       be of the form : "<canonical service name>/<type>" Example:
       * `compute.googleapis.com/Instance`.
       
      repeated string resource_types = 2;
      Specified by:
      getResourceTypes in interface AnalyzerOrgPolicyConstraint.CustomConstraintOrBuilder
      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 to. Format will
       be of the form : "<canonical service name>/<type>" Example:
       * `compute.googleapis.com/Instance`.
       
      repeated string resource_types = 2;
      Specified by:
      getResourceTypesBytes in interface AnalyzerOrgPolicyConstraint.CustomConstraintOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the resourceTypes at the given index.
    • setResourceTypes

      public AnalyzerOrgPolicyConstraint.CustomConstraint.Builder setResourceTypes(int index, String value)
       The Resource Instance type on which this policy applies to. Format will
       be of the form : "<canonical service name>/<type>" Example:
       * `compute.googleapis.com/Instance`.
       
      repeated string resource_types = 2;
      Parameters:
      index - The index to set the value at.
      value - The resourceTypes to set.
      Returns:
      This builder for chaining.
    • addResourceTypes

       The Resource Instance type on which this policy applies to. Format will
       be of the form : "<canonical service name>/<type>" Example:
       * `compute.googleapis.com/Instance`.
       
      repeated string resource_types = 2;
      Parameters:
      value - The resourceTypes to add.
      Returns:
      This builder for chaining.
    • addAllResourceTypes

       The Resource Instance type on which this policy applies to. Format will
       be of the form : "<canonical service name>/<type>" Example:
       * `compute.googleapis.com/Instance`.
       
      repeated string resource_types = 2;
      Parameters:
      values - The resourceTypes to add.
      Returns:
      This builder for chaining.
    • clearResourceTypes

       The Resource Instance type on which this policy applies to. Format will
       be of the form : "<canonical service name>/<type>" Example:
       * `compute.googleapis.com/Instance`.
       
      repeated string resource_types = 2;
      Returns:
      This builder for chaining.
    • addResourceTypesBytes

      public AnalyzerOrgPolicyConstraint.CustomConstraint.Builder addResourceTypesBytes(com.google.protobuf.ByteString value)
       The Resource Instance type on which this policy applies to. Format will
       be of the form : "<canonical service name>/<type>" Example:
       * `compute.googleapis.com/Instance`.
       
      repeated string resource_types = 2;
      Parameters:
      value - The bytes of the resourceTypes to add.
      Returns:
      This builder for chaining.
    • getMethodTypesList

       All the operations being applied for this constraint.
       
      repeated .google.cloud.asset.v1.AnalyzerOrgPolicyConstraint.CustomConstraint.MethodType method_types = 3;
      Specified by:
      getMethodTypesList in interface AnalyzerOrgPolicyConstraint.CustomConstraintOrBuilder
      Returns:
      A list containing the methodTypes.
    • getMethodTypesCount

      public int getMethodTypesCount()
       All the operations being applied for this constraint.
       
      repeated .google.cloud.asset.v1.AnalyzerOrgPolicyConstraint.CustomConstraint.MethodType method_types = 3;
      Specified by:
      getMethodTypesCount in interface AnalyzerOrgPolicyConstraint.CustomConstraintOrBuilder
      Returns:
      The count of methodTypes.
    • getMethodTypes

       All the operations being applied for this constraint.
       
      repeated .google.cloud.asset.v1.AnalyzerOrgPolicyConstraint.CustomConstraint.MethodType method_types = 3;
      Specified by:
      getMethodTypes in interface AnalyzerOrgPolicyConstraint.CustomConstraintOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The methodTypes at the given index.
    • setMethodTypes

       All the operations being applied for this constraint.
       
      repeated .google.cloud.asset.v1.AnalyzerOrgPolicyConstraint.CustomConstraint.MethodType method_types = 3;
      Parameters:
      index - The index to set the value at.
      value - The methodTypes to set.
      Returns:
      This builder for chaining.
    • addMethodTypes

       All the operations being applied for this constraint.
       
      repeated .google.cloud.asset.v1.AnalyzerOrgPolicyConstraint.CustomConstraint.MethodType method_types = 3;
      Parameters:
      value - The methodTypes to add.
      Returns:
      This builder for chaining.
    • addAllMethodTypes

       All the operations being applied for this constraint.
       
      repeated .google.cloud.asset.v1.AnalyzerOrgPolicyConstraint.CustomConstraint.MethodType method_types = 3;
      Parameters:
      values - The methodTypes to add.
      Returns:
      This builder for chaining.
    • clearMethodTypes

       All the operations being applied for this constraint.
       
      repeated .google.cloud.asset.v1.AnalyzerOrgPolicyConstraint.CustomConstraint.MethodType method_types = 3;
      Returns:
      This builder for chaining.
    • getMethodTypesValueList

      public List<Integer> getMethodTypesValueList()
       All the operations being applied for this constraint.
       
      repeated .google.cloud.asset.v1.AnalyzerOrgPolicyConstraint.CustomConstraint.MethodType method_types = 3;
      Specified by:
      getMethodTypesValueList in interface AnalyzerOrgPolicyConstraint.CustomConstraintOrBuilder
      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.asset.v1.AnalyzerOrgPolicyConstraint.CustomConstraint.MethodType method_types = 3;
      Specified by:
      getMethodTypesValue in interface AnalyzerOrgPolicyConstraint.CustomConstraintOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The enum numeric value on the wire of methodTypes at the given index.
    • setMethodTypesValue

      public AnalyzerOrgPolicyConstraint.CustomConstraint.Builder setMethodTypesValue(int index, int value)
       All the operations being applied for this constraint.
       
      repeated .google.cloud.asset.v1.AnalyzerOrgPolicyConstraint.CustomConstraint.MethodType method_types = 3;
      Parameters:
      index - The index to set the value at.
      value - The enum numeric value on the wire for methodTypes to set.
      Returns:
      This builder for chaining.
    • addMethodTypesValue

      public AnalyzerOrgPolicyConstraint.CustomConstraint.Builder addMethodTypesValue(int value)
       All the operations being applied for this constraint.
       
      repeated .google.cloud.asset.v1.AnalyzerOrgPolicyConstraint.CustomConstraint.MethodType method_types = 3;
      Parameters:
      value - The enum numeric value on the wire for methodTypes to add.
      Returns:
      This builder for chaining.
    • addAllMethodTypesValue

       All the operations being applied for this constraint.
       
      repeated .google.cloud.asset.v1.AnalyzerOrgPolicyConstraint.CustomConstraint.MethodType method_types = 3;
      Parameters:
      values - The enum numeric values on the wire for methodTypes to add.
      Returns:
      This builder for chaining.
    • getCondition

      public String getCondition()
       Organization Policy condition/expression. For example:
       `resource.instanceName.matches("[production|test]_.*_(\d)+")'` or,
       `resource.management.auto_upgrade == true`
       
      string condition = 4;
      Specified by:
      getCondition in interface AnalyzerOrgPolicyConstraint.CustomConstraintOrBuilder
      Returns:
      The condition.
    • getConditionBytes

      public com.google.protobuf.ByteString getConditionBytes()
       Organization Policy condition/expression. For example:
       `resource.instanceName.matches("[production|test]_.*_(\d)+")'` or,
       `resource.management.auto_upgrade == true`
       
      string condition = 4;
      Specified by:
      getConditionBytes in interface AnalyzerOrgPolicyConstraint.CustomConstraintOrBuilder
      Returns:
      The bytes for condition.
    • setCondition

       Organization Policy condition/expression. For example:
       `resource.instanceName.matches("[production|test]_.*_(\d)+")'` or,
       `resource.management.auto_upgrade == true`
       
      string condition = 4;
      Parameters:
      value - The condition to set.
      Returns:
      This builder for chaining.
    • clearCondition

       Organization Policy condition/expression. For example:
       `resource.instanceName.matches("[production|test]_.*_(\d)+")'` or,
       `resource.management.auto_upgrade == true`
       
      string condition = 4;
      Returns:
      This builder for chaining.
    • setConditionBytes

      public AnalyzerOrgPolicyConstraint.CustomConstraint.Builder setConditionBytes(com.google.protobuf.ByteString value)
       Organization Policy condition/expression. For example:
       `resource.instanceName.matches("[production|test]_.*_(\d)+")'` or,
       `resource.management.auto_upgrade == true`
       
      string condition = 4;
      Parameters:
      value - The bytes for condition to set.
      Returns:
      This builder for chaining.
    • getActionTypeValue

      public int getActionTypeValue()
       Allow or deny type.
       
      .google.cloud.asset.v1.AnalyzerOrgPolicyConstraint.CustomConstraint.ActionType action_type = 5;
      Specified by:
      getActionTypeValue in interface AnalyzerOrgPolicyConstraint.CustomConstraintOrBuilder
      Returns:
      The enum numeric value on the wire for actionType.
    • setActionTypeValue

      public AnalyzerOrgPolicyConstraint.CustomConstraint.Builder setActionTypeValue(int value)
       Allow or deny type.
       
      .google.cloud.asset.v1.AnalyzerOrgPolicyConstraint.CustomConstraint.ActionType action_type = 5;
      Parameters:
      value - The enum numeric value on the wire for actionType to set.
      Returns:
      This builder for chaining.
    • getActionType

       Allow or deny type.
       
      .google.cloud.asset.v1.AnalyzerOrgPolicyConstraint.CustomConstraint.ActionType action_type = 5;
      Specified by:
      getActionType in interface AnalyzerOrgPolicyConstraint.CustomConstraintOrBuilder
      Returns:
      The actionType.
    • setActionType

       Allow or deny type.
       
      .google.cloud.asset.v1.AnalyzerOrgPolicyConstraint.CustomConstraint.ActionType action_type = 5;
      Parameters:
      value - The actionType to set.
      Returns:
      This builder for chaining.
    • clearActionType

       Allow or deny type.
       
      .google.cloud.asset.v1.AnalyzerOrgPolicyConstraint.CustomConstraint.ActionType action_type = 5;
      Returns:
      This builder for chaining.
    • getDisplayName

      public String getDisplayName()
       One line display name for the UI.
       
      string display_name = 6;
      Specified by:
      getDisplayName in interface AnalyzerOrgPolicyConstraint.CustomConstraintOrBuilder
      Returns:
      The displayName.
    • getDisplayNameBytes

      public com.google.protobuf.ByteString getDisplayNameBytes()
       One line display name for the UI.
       
      string display_name = 6;
      Specified by:
      getDisplayNameBytes in interface AnalyzerOrgPolicyConstraint.CustomConstraintOrBuilder
      Returns:
      The bytes for displayName.
    • setDisplayName

       One line display name for the UI.
       
      string display_name = 6;
      Parameters:
      value - The displayName to set.
      Returns:
      This builder for chaining.
    • clearDisplayName

       One line display name for the UI.
       
      string display_name = 6;
      Returns:
      This builder for chaining.
    • setDisplayNameBytes

      public AnalyzerOrgPolicyConstraint.CustomConstraint.Builder setDisplayNameBytes(com.google.protobuf.ByteString value)
       One line display name for the UI.
       
      string display_name = 6;
      Parameters:
      value - The bytes for displayName to set.
      Returns:
      This builder for chaining.
    • getDescription

      public String getDescription()
       Detailed information about this custom policy constraint.
       
      string description = 7;
      Specified by:
      getDescription in interface AnalyzerOrgPolicyConstraint.CustomConstraintOrBuilder
      Returns:
      The description.
    • getDescriptionBytes

      public com.google.protobuf.ByteString getDescriptionBytes()
       Detailed information about this custom policy constraint.
       
      string description = 7;
      Specified by:
      getDescriptionBytes in interface AnalyzerOrgPolicyConstraint.CustomConstraintOrBuilder
      Returns:
      The bytes for description.
    • setDescription

       Detailed information about this custom policy constraint.
       
      string description = 7;
      Parameters:
      value - The description to set.
      Returns:
      This builder for chaining.
    • clearDescription

       Detailed information about this custom policy constraint.
       
      string description = 7;
      Returns:
      This builder for chaining.
    • setDescriptionBytes

      public AnalyzerOrgPolicyConstraint.CustomConstraint.Builder setDescriptionBytes(com.google.protobuf.ByteString value)
       Detailed information about this custom policy constraint.
       
      string description = 7;
      Parameters:
      value - The bytes for description to set.
      Returns:
      This builder for chaining.