Class ResourceDescriptor.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderType>
com.google.protobuf.GeneratedMessageV3.Builder<ResourceDescriptor.Builder>
com.google.api.ResourceDescriptor.Builder
All Implemented Interfaces:
ResourceDescriptorOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
ResourceDescriptor

public static final class ResourceDescriptor.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<ResourceDescriptor.Builder> implements ResourceDescriptorOrBuilder
 A simple descriptor of a resource type.
 ResourceDescriptor annotates a resource message (either by means of a
 protobuf annotation or use in the service config), and associates the
 resource's schema, the resource type, and the pattern of the resource name.
 Example:
     message Topic {
       // Indicates this message defines a resource schema.
       // Declares the resource type in the format of {service}/{kind}.
       // For Kubernetes resources, the format is {api group}/{kind}.
       option (google.api.resource) = {
         type: "pubsub.googleapis.com/Topic"
         pattern: "projects/{project}/topics/{topic}"
       };
     }
 The ResourceDescriptor Yaml config will look like:
     resources:
     - type: "pubsub.googleapis.com/Topic"
       pattern: "projects/{project}/topics/{topic}"
 Sometimes, resources have multiple patterns, typically because they can
 live under multiple parents.
 Example:
     message LogEntry {
       option (google.api.resource) = {
         type: "logging.googleapis.com/LogEntry"
         pattern: "projects/{project}/logs/{log}"
         pattern: "folders/{folder}/logs/{log}"
         pattern: "organizations/{organization}/logs/{log}"
         pattern: "billingAccounts/{billing_account}/logs/{log}"
       };
     }
 The ResourceDescriptor Yaml config will look like:
     resources:
     - type: 'logging.googleapis.com/LogEntry'
       pattern: "projects/{project}/logs/{log}"
       pattern: "folders/{folder}/logs/{log}"
       pattern: "organizations/{organization}/logs/{log}"
       pattern: "billingAccounts/{billing_account}/logs/{log}"
 
Protobuf type google.api.ResourceDescriptor
  • Method Details

    • getDescriptor

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

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<ResourceDescriptor.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.GeneratedMessageV3.Builder<ResourceDescriptor.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.GeneratedMessageV3.Builder<ResourceDescriptor.Builder>
    • getDefaultInstanceForType

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

      public ResourceDescriptor build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public ResourceDescriptor buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • clone

      Specified by:
      clone in interface com.google.protobuf.Message.Builder
      Specified by:
      clone in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clone in class com.google.protobuf.GeneratedMessageV3.Builder<ResourceDescriptor.Builder>
    • setField

      public ResourceDescriptor.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      setField in interface com.google.protobuf.Message.Builder
      Overrides:
      setField in class com.google.protobuf.GeneratedMessageV3.Builder<ResourceDescriptor.Builder>
    • clearField

      public ResourceDescriptor.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
      Specified by:
      clearField in interface com.google.protobuf.Message.Builder
      Overrides:
      clearField in class com.google.protobuf.GeneratedMessageV3.Builder<ResourceDescriptor.Builder>
    • clearOneof

      public ResourceDescriptor.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
      Specified by:
      clearOneof in interface com.google.protobuf.Message.Builder
      Overrides:
      clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<ResourceDescriptor.Builder>
    • setRepeatedField

      public ResourceDescriptor.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
      Specified by:
      setRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<ResourceDescriptor.Builder>
    • addRepeatedField

      public ResourceDescriptor.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      addRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<ResourceDescriptor.Builder>
    • mergeFrom

      public ResourceDescriptor.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<ResourceDescriptor.Builder>
    • mergeFrom

    • isInitialized

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

      public ResourceDescriptor.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<ResourceDescriptor.Builder>
      Throws:
      IOException
    • getType

      public String getType()
       The resource type. It must be in the format of
       {service_name}/{resource_type_kind}. The `resource_type_kind` must be
       singular and must not include version numbers.
       Example: `storage.googleapis.com/Bucket`
       The value of the resource_type_kind must follow the regular expression
       /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and
       should use PascalCase (UpperCamelCase). The maximum number of
       characters allowed for the `resource_type_kind` is 100.
       
      string type = 1;
      Specified by:
      getType in interface ResourceDescriptorOrBuilder
      Returns:
      The type.
    • getTypeBytes

      public com.google.protobuf.ByteString getTypeBytes()
       The resource type. It must be in the format of
       {service_name}/{resource_type_kind}. The `resource_type_kind` must be
       singular and must not include version numbers.
       Example: `storage.googleapis.com/Bucket`
       The value of the resource_type_kind must follow the regular expression
       /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and
       should use PascalCase (UpperCamelCase). The maximum number of
       characters allowed for the `resource_type_kind` is 100.
       
      string type = 1;
      Specified by:
      getTypeBytes in interface ResourceDescriptorOrBuilder
      Returns:
      The bytes for type.
    • setType

      public ResourceDescriptor.Builder setType(String value)
       The resource type. It must be in the format of
       {service_name}/{resource_type_kind}. The `resource_type_kind` must be
       singular and must not include version numbers.
       Example: `storage.googleapis.com/Bucket`
       The value of the resource_type_kind must follow the regular expression
       /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and
       should use PascalCase (UpperCamelCase). The maximum number of
       characters allowed for the `resource_type_kind` is 100.
       
      string type = 1;
      Parameters:
      value - The type to set.
      Returns:
      This builder for chaining.
    • clearType

      public ResourceDescriptor.Builder clearType()
       The resource type. It must be in the format of
       {service_name}/{resource_type_kind}. The `resource_type_kind` must be
       singular and must not include version numbers.
       Example: `storage.googleapis.com/Bucket`
       The value of the resource_type_kind must follow the regular expression
       /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and
       should use PascalCase (UpperCamelCase). The maximum number of
       characters allowed for the `resource_type_kind` is 100.
       
      string type = 1;
      Returns:
      This builder for chaining.
    • setTypeBytes

      public ResourceDescriptor.Builder setTypeBytes(com.google.protobuf.ByteString value)
       The resource type. It must be in the format of
       {service_name}/{resource_type_kind}. The `resource_type_kind` must be
       singular and must not include version numbers.
       Example: `storage.googleapis.com/Bucket`
       The value of the resource_type_kind must follow the regular expression
       /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and
       should use PascalCase (UpperCamelCase). The maximum number of
       characters allowed for the `resource_type_kind` is 100.
       
      string type = 1;
      Parameters:
      value - The bytes for type to set.
      Returns:
      This builder for chaining.
    • getPatternList

      public com.google.protobuf.ProtocolStringList getPatternList()
       Optional. The relative resource name pattern associated with this resource
       type. The DNS prefix of the full resource name shouldn't be specified here.
       The path pattern must follow the syntax, which aligns with HTTP binding
       syntax:
           Template = Segment { "/" Segment } ;
           Segment = LITERAL | Variable ;
           Variable = "{" LITERAL "}" ;
       Examples:
           - "projects/{project}/topics/{topic}"
           - "projects/{project}/knowledgeBases/{knowledge_base}"
       The components in braces correspond to the IDs for each resource in the
       hierarchy. It is expected that, if multiple patterns are provided,
       the same component name (e.g. "project") refers to IDs of the same
       type of resource.
       
      repeated string pattern = 2;
      Specified by:
      getPatternList in interface ResourceDescriptorOrBuilder
      Returns:
      A list containing the pattern.
    • getPatternCount

      public int getPatternCount()
       Optional. The relative resource name pattern associated with this resource
       type. The DNS prefix of the full resource name shouldn't be specified here.
       The path pattern must follow the syntax, which aligns with HTTP binding
       syntax:
           Template = Segment { "/" Segment } ;
           Segment = LITERAL | Variable ;
           Variable = "{" LITERAL "}" ;
       Examples:
           - "projects/{project}/topics/{topic}"
           - "projects/{project}/knowledgeBases/{knowledge_base}"
       The components in braces correspond to the IDs for each resource in the
       hierarchy. It is expected that, if multiple patterns are provided,
       the same component name (e.g. "project") refers to IDs of the same
       type of resource.
       
      repeated string pattern = 2;
      Specified by:
      getPatternCount in interface ResourceDescriptorOrBuilder
      Returns:
      The count of pattern.
    • getPattern

      public String getPattern(int index)
       Optional. The relative resource name pattern associated with this resource
       type. The DNS prefix of the full resource name shouldn't be specified here.
       The path pattern must follow the syntax, which aligns with HTTP binding
       syntax:
           Template = Segment { "/" Segment } ;
           Segment = LITERAL | Variable ;
           Variable = "{" LITERAL "}" ;
       Examples:
           - "projects/{project}/topics/{topic}"
           - "projects/{project}/knowledgeBases/{knowledge_base}"
       The components in braces correspond to the IDs for each resource in the
       hierarchy. It is expected that, if multiple patterns are provided,
       the same component name (e.g. "project") refers to IDs of the same
       type of resource.
       
      repeated string pattern = 2;
      Specified by:
      getPattern in interface ResourceDescriptorOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The pattern at the given index.
    • getPatternBytes

      public com.google.protobuf.ByteString getPatternBytes(int index)
       Optional. The relative resource name pattern associated with this resource
       type. The DNS prefix of the full resource name shouldn't be specified here.
       The path pattern must follow the syntax, which aligns with HTTP binding
       syntax:
           Template = Segment { "/" Segment } ;
           Segment = LITERAL | Variable ;
           Variable = "{" LITERAL "}" ;
       Examples:
           - "projects/{project}/topics/{topic}"
           - "projects/{project}/knowledgeBases/{knowledge_base}"
       The components in braces correspond to the IDs for each resource in the
       hierarchy. It is expected that, if multiple patterns are provided,
       the same component name (e.g. "project") refers to IDs of the same
       type of resource.
       
      repeated string pattern = 2;
      Specified by:
      getPatternBytes in interface ResourceDescriptorOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the pattern at the given index.
    • setPattern

      public ResourceDescriptor.Builder setPattern(int index, String value)
       Optional. The relative resource name pattern associated with this resource
       type. The DNS prefix of the full resource name shouldn't be specified here.
       The path pattern must follow the syntax, which aligns with HTTP binding
       syntax:
           Template = Segment { "/" Segment } ;
           Segment = LITERAL | Variable ;
           Variable = "{" LITERAL "}" ;
       Examples:
           - "projects/{project}/topics/{topic}"
           - "projects/{project}/knowledgeBases/{knowledge_base}"
       The components in braces correspond to the IDs for each resource in the
       hierarchy. It is expected that, if multiple patterns are provided,
       the same component name (e.g. "project") refers to IDs of the same
       type of resource.
       
      repeated string pattern = 2;
      Parameters:
      index - The index to set the value at.
      value - The pattern to set.
      Returns:
      This builder for chaining.
    • addPattern

      public ResourceDescriptor.Builder addPattern(String value)
       Optional. The relative resource name pattern associated with this resource
       type. The DNS prefix of the full resource name shouldn't be specified here.
       The path pattern must follow the syntax, which aligns with HTTP binding
       syntax:
           Template = Segment { "/" Segment } ;
           Segment = LITERAL | Variable ;
           Variable = "{" LITERAL "}" ;
       Examples:
           - "projects/{project}/topics/{topic}"
           - "projects/{project}/knowledgeBases/{knowledge_base}"
       The components in braces correspond to the IDs for each resource in the
       hierarchy. It is expected that, if multiple patterns are provided,
       the same component name (e.g. "project") refers to IDs of the same
       type of resource.
       
      repeated string pattern = 2;
      Parameters:
      value - The pattern to add.
      Returns:
      This builder for chaining.
    • addAllPattern

      public ResourceDescriptor.Builder addAllPattern(Iterable<String> values)
       Optional. The relative resource name pattern associated with this resource
       type. The DNS prefix of the full resource name shouldn't be specified here.
       The path pattern must follow the syntax, which aligns with HTTP binding
       syntax:
           Template = Segment { "/" Segment } ;
           Segment = LITERAL | Variable ;
           Variable = "{" LITERAL "}" ;
       Examples:
           - "projects/{project}/topics/{topic}"
           - "projects/{project}/knowledgeBases/{knowledge_base}"
       The components in braces correspond to the IDs for each resource in the
       hierarchy. It is expected that, if multiple patterns are provided,
       the same component name (e.g. "project") refers to IDs of the same
       type of resource.
       
      repeated string pattern = 2;
      Parameters:
      values - The pattern to add.
      Returns:
      This builder for chaining.
    • clearPattern

      public ResourceDescriptor.Builder clearPattern()
       Optional. The relative resource name pattern associated with this resource
       type. The DNS prefix of the full resource name shouldn't be specified here.
       The path pattern must follow the syntax, which aligns with HTTP binding
       syntax:
           Template = Segment { "/" Segment } ;
           Segment = LITERAL | Variable ;
           Variable = "{" LITERAL "}" ;
       Examples:
           - "projects/{project}/topics/{topic}"
           - "projects/{project}/knowledgeBases/{knowledge_base}"
       The components in braces correspond to the IDs for each resource in the
       hierarchy. It is expected that, if multiple patterns are provided,
       the same component name (e.g. "project") refers to IDs of the same
       type of resource.
       
      repeated string pattern = 2;
      Returns:
      This builder for chaining.
    • addPatternBytes

      public ResourceDescriptor.Builder addPatternBytes(com.google.protobuf.ByteString value)
       Optional. The relative resource name pattern associated with this resource
       type. The DNS prefix of the full resource name shouldn't be specified here.
       The path pattern must follow the syntax, which aligns with HTTP binding
       syntax:
           Template = Segment { "/" Segment } ;
           Segment = LITERAL | Variable ;
           Variable = "{" LITERAL "}" ;
       Examples:
           - "projects/{project}/topics/{topic}"
           - "projects/{project}/knowledgeBases/{knowledge_base}"
       The components in braces correspond to the IDs for each resource in the
       hierarchy. It is expected that, if multiple patterns are provided,
       the same component name (e.g. "project") refers to IDs of the same
       type of resource.
       
      repeated string pattern = 2;
      Parameters:
      value - The bytes of the pattern to add.
      Returns:
      This builder for chaining.
    • getNameField

      public String getNameField()
       Optional. The field on the resource that designates the resource name
       field. If omitted, this is assumed to be "name".
       
      string name_field = 3;
      Specified by:
      getNameField in interface ResourceDescriptorOrBuilder
      Returns:
      The nameField.
    • getNameFieldBytes

      public com.google.protobuf.ByteString getNameFieldBytes()
       Optional. The field on the resource that designates the resource name
       field. If omitted, this is assumed to be "name".
       
      string name_field = 3;
      Specified by:
      getNameFieldBytes in interface ResourceDescriptorOrBuilder
      Returns:
      The bytes for nameField.
    • setNameField

      public ResourceDescriptor.Builder setNameField(String value)
       Optional. The field on the resource that designates the resource name
       field. If omitted, this is assumed to be "name".
       
      string name_field = 3;
      Parameters:
      value - The nameField to set.
      Returns:
      This builder for chaining.
    • clearNameField

      public ResourceDescriptor.Builder clearNameField()
       Optional. The field on the resource that designates the resource name
       field. If omitted, this is assumed to be "name".
       
      string name_field = 3;
      Returns:
      This builder for chaining.
    • setNameFieldBytes

      public ResourceDescriptor.Builder setNameFieldBytes(com.google.protobuf.ByteString value)
       Optional. The field on the resource that designates the resource name
       field. If omitted, this is assumed to be "name".
       
      string name_field = 3;
      Parameters:
      value - The bytes for nameField to set.
      Returns:
      This builder for chaining.
    • getHistoryValue

      public int getHistoryValue()
       Optional. The historical or future-looking state of the resource pattern.
       Example:
           // The InspectTemplate message originally only supported resource
           // names with organization, and project was added later.
           message InspectTemplate {
             option (google.api.resource) = {
               type: "dlp.googleapis.com/InspectTemplate"
               pattern:
               "organizations/{organization}/inspectTemplates/{inspect_template}"
               pattern: "projects/{project}/inspectTemplates/{inspect_template}"
               history: ORIGINALLY_SINGLE_PATTERN
             };
           }
       
      .google.api.ResourceDescriptor.History history = 4;
      Specified by:
      getHistoryValue in interface ResourceDescriptorOrBuilder
      Returns:
      The enum numeric value on the wire for history.
    • setHistoryValue

      public ResourceDescriptor.Builder setHistoryValue(int value)
       Optional. The historical or future-looking state of the resource pattern.
       Example:
           // The InspectTemplate message originally only supported resource
           // names with organization, and project was added later.
           message InspectTemplate {
             option (google.api.resource) = {
               type: "dlp.googleapis.com/InspectTemplate"
               pattern:
               "organizations/{organization}/inspectTemplates/{inspect_template}"
               pattern: "projects/{project}/inspectTemplates/{inspect_template}"
               history: ORIGINALLY_SINGLE_PATTERN
             };
           }
       
      .google.api.ResourceDescriptor.History history = 4;
      Parameters:
      value - The enum numeric value on the wire for history to set.
      Returns:
      This builder for chaining.
    • getHistory

      public ResourceDescriptor.History getHistory()
       Optional. The historical or future-looking state of the resource pattern.
       Example:
           // The InspectTemplate message originally only supported resource
           // names with organization, and project was added later.
           message InspectTemplate {
             option (google.api.resource) = {
               type: "dlp.googleapis.com/InspectTemplate"
               pattern:
               "organizations/{organization}/inspectTemplates/{inspect_template}"
               pattern: "projects/{project}/inspectTemplates/{inspect_template}"
               history: ORIGINALLY_SINGLE_PATTERN
             };
           }
       
      .google.api.ResourceDescriptor.History history = 4;
      Specified by:
      getHistory in interface ResourceDescriptorOrBuilder
      Returns:
      The history.
    • setHistory

       Optional. The historical or future-looking state of the resource pattern.
       Example:
           // The InspectTemplate message originally only supported resource
           // names with organization, and project was added later.
           message InspectTemplate {
             option (google.api.resource) = {
               type: "dlp.googleapis.com/InspectTemplate"
               pattern:
               "organizations/{organization}/inspectTemplates/{inspect_template}"
               pattern: "projects/{project}/inspectTemplates/{inspect_template}"
               history: ORIGINALLY_SINGLE_PATTERN
             };
           }
       
      .google.api.ResourceDescriptor.History history = 4;
      Parameters:
      value - The history to set.
      Returns:
      This builder for chaining.
    • clearHistory

      public ResourceDescriptor.Builder clearHistory()
       Optional. The historical or future-looking state of the resource pattern.
       Example:
           // The InspectTemplate message originally only supported resource
           // names with organization, and project was added later.
           message InspectTemplate {
             option (google.api.resource) = {
               type: "dlp.googleapis.com/InspectTemplate"
               pattern:
               "organizations/{organization}/inspectTemplates/{inspect_template}"
               pattern: "projects/{project}/inspectTemplates/{inspect_template}"
               history: ORIGINALLY_SINGLE_PATTERN
             };
           }
       
      .google.api.ResourceDescriptor.History history = 4;
      Returns:
      This builder for chaining.
    • getPlural

      public String getPlural()
       The plural name used in the resource name and permission names, such as
       'projects' for the resource name of 'projects/{project}' and the permission
       name of 'cloudresourcemanager.googleapis.com/projects.get'. It is the same
       concept of the `plural` field in k8s CRD spec
       https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
       Note: The plural form is required even for singleton resources. See
       https://aip.dev/156
       
      string plural = 5;
      Specified by:
      getPlural in interface ResourceDescriptorOrBuilder
      Returns:
      The plural.
    • getPluralBytes

      public com.google.protobuf.ByteString getPluralBytes()
       The plural name used in the resource name and permission names, such as
       'projects' for the resource name of 'projects/{project}' and the permission
       name of 'cloudresourcemanager.googleapis.com/projects.get'. It is the same
       concept of the `plural` field in k8s CRD spec
       https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
       Note: The plural form is required even for singleton resources. See
       https://aip.dev/156
       
      string plural = 5;
      Specified by:
      getPluralBytes in interface ResourceDescriptorOrBuilder
      Returns:
      The bytes for plural.
    • setPlural

      public ResourceDescriptor.Builder setPlural(String value)
       The plural name used in the resource name and permission names, such as
       'projects' for the resource name of 'projects/{project}' and the permission
       name of 'cloudresourcemanager.googleapis.com/projects.get'. It is the same
       concept of the `plural` field in k8s CRD spec
       https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
       Note: The plural form is required even for singleton resources. See
       https://aip.dev/156
       
      string plural = 5;
      Parameters:
      value - The plural to set.
      Returns:
      This builder for chaining.
    • clearPlural

      public ResourceDescriptor.Builder clearPlural()
       The plural name used in the resource name and permission names, such as
       'projects' for the resource name of 'projects/{project}' and the permission
       name of 'cloudresourcemanager.googleapis.com/projects.get'. It is the same
       concept of the `plural` field in k8s CRD spec
       https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
       Note: The plural form is required even for singleton resources. See
       https://aip.dev/156
       
      string plural = 5;
      Returns:
      This builder for chaining.
    • setPluralBytes

      public ResourceDescriptor.Builder setPluralBytes(com.google.protobuf.ByteString value)
       The plural name used in the resource name and permission names, such as
       'projects' for the resource name of 'projects/{project}' and the permission
       name of 'cloudresourcemanager.googleapis.com/projects.get'. It is the same
       concept of the `plural` field in k8s CRD spec
       https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
       Note: The plural form is required even for singleton resources. See
       https://aip.dev/156
       
      string plural = 5;
      Parameters:
      value - The bytes for plural to set.
      Returns:
      This builder for chaining.
    • getSingular

      public String getSingular()
       The same concept of the `singular` field in k8s CRD spec
       https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
       Such as "project" for the `resourcemanager.googleapis.com/Project` type.
       
      string singular = 6;
      Specified by:
      getSingular in interface ResourceDescriptorOrBuilder
      Returns:
      The singular.
    • getSingularBytes

      public com.google.protobuf.ByteString getSingularBytes()
       The same concept of the `singular` field in k8s CRD spec
       https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
       Such as "project" for the `resourcemanager.googleapis.com/Project` type.
       
      string singular = 6;
      Specified by:
      getSingularBytes in interface ResourceDescriptorOrBuilder
      Returns:
      The bytes for singular.
    • setSingular

      public ResourceDescriptor.Builder setSingular(String value)
       The same concept of the `singular` field in k8s CRD spec
       https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
       Such as "project" for the `resourcemanager.googleapis.com/Project` type.
       
      string singular = 6;
      Parameters:
      value - The singular to set.
      Returns:
      This builder for chaining.
    • clearSingular

      public ResourceDescriptor.Builder clearSingular()
       The same concept of the `singular` field in k8s CRD spec
       https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
       Such as "project" for the `resourcemanager.googleapis.com/Project` type.
       
      string singular = 6;
      Returns:
      This builder for chaining.
    • setSingularBytes

      public ResourceDescriptor.Builder setSingularBytes(com.google.protobuf.ByteString value)
       The same concept of the `singular` field in k8s CRD spec
       https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
       Such as "project" for the `resourcemanager.googleapis.com/Project` type.
       
      string singular = 6;
      Parameters:
      value - The bytes for singular to set.
      Returns:
      This builder for chaining.
    • getStyleList

      public List<ResourceDescriptor.Style> getStyleList()
       Style flag(s) for this resource.
       These indicate that a resource is expected to conform to a given
       style. See the specific style flags for additional information.
       
      repeated .google.api.ResourceDescriptor.Style style = 10;
      Specified by:
      getStyleList in interface ResourceDescriptorOrBuilder
      Returns:
      A list containing the style.
    • getStyleCount

      public int getStyleCount()
       Style flag(s) for this resource.
       These indicate that a resource is expected to conform to a given
       style. See the specific style flags for additional information.
       
      repeated .google.api.ResourceDescriptor.Style style = 10;
      Specified by:
      getStyleCount in interface ResourceDescriptorOrBuilder
      Returns:
      The count of style.
    • getStyle

      public ResourceDescriptor.Style getStyle(int index)
       Style flag(s) for this resource.
       These indicate that a resource is expected to conform to a given
       style. See the specific style flags for additional information.
       
      repeated .google.api.ResourceDescriptor.Style style = 10;
      Specified by:
      getStyle in interface ResourceDescriptorOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The style at the given index.
    • setStyle

      public ResourceDescriptor.Builder setStyle(int index, ResourceDescriptor.Style value)
       Style flag(s) for this resource.
       These indicate that a resource is expected to conform to a given
       style. See the specific style flags for additional information.
       
      repeated .google.api.ResourceDescriptor.Style style = 10;
      Parameters:
      index - The index to set the value at.
      value - The style to set.
      Returns:
      This builder for chaining.
    • addStyle

       Style flag(s) for this resource.
       These indicate that a resource is expected to conform to a given
       style. See the specific style flags for additional information.
       
      repeated .google.api.ResourceDescriptor.Style style = 10;
      Parameters:
      value - The style to add.
      Returns:
      This builder for chaining.
    • addAllStyle

      public ResourceDescriptor.Builder addAllStyle(Iterable<? extends ResourceDescriptor.Style> values)
       Style flag(s) for this resource.
       These indicate that a resource is expected to conform to a given
       style. See the specific style flags for additional information.
       
      repeated .google.api.ResourceDescriptor.Style style = 10;
      Parameters:
      values - The style to add.
      Returns:
      This builder for chaining.
    • clearStyle

      public ResourceDescriptor.Builder clearStyle()
       Style flag(s) for this resource.
       These indicate that a resource is expected to conform to a given
       style. See the specific style flags for additional information.
       
      repeated .google.api.ResourceDescriptor.Style style = 10;
      Returns:
      This builder for chaining.
    • getStyleValueList

      public List<Integer> getStyleValueList()
       Style flag(s) for this resource.
       These indicate that a resource is expected to conform to a given
       style. See the specific style flags for additional information.
       
      repeated .google.api.ResourceDescriptor.Style style = 10;
      Specified by:
      getStyleValueList in interface ResourceDescriptorOrBuilder
      Returns:
      A list containing the enum numeric values on the wire for style.
    • getStyleValue

      public int getStyleValue(int index)
       Style flag(s) for this resource.
       These indicate that a resource is expected to conform to a given
       style. See the specific style flags for additional information.
       
      repeated .google.api.ResourceDescriptor.Style style = 10;
      Specified by:
      getStyleValue in interface ResourceDescriptorOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The enum numeric value on the wire of style at the given index.
    • setStyleValue

      public ResourceDescriptor.Builder setStyleValue(int index, int value)
       Style flag(s) for this resource.
       These indicate that a resource is expected to conform to a given
       style. See the specific style flags for additional information.
       
      repeated .google.api.ResourceDescriptor.Style style = 10;
      Parameters:
      index - The index of the value to return.
      Returns:
      The enum numeric value on the wire of style at the given index.
    • addStyleValue

      public ResourceDescriptor.Builder addStyleValue(int value)
       Style flag(s) for this resource.
       These indicate that a resource is expected to conform to a given
       style. See the specific style flags for additional information.
       
      repeated .google.api.ResourceDescriptor.Style style = 10;
      Parameters:
      value - The enum numeric value on the wire for style to add.
      Returns:
      This builder for chaining.
    • addAllStyleValue

      public ResourceDescriptor.Builder addAllStyleValue(Iterable<Integer> values)
       Style flag(s) for this resource.
       These indicate that a resource is expected to conform to a given
       style. See the specific style flags for additional information.
       
      repeated .google.api.ResourceDescriptor.Style style = 10;
      Parameters:
      values - The enum numeric values on the wire for style to add.
      Returns:
      This builder for chaining.
    • setUnknownFields

      public final ResourceDescriptor.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      setUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<ResourceDescriptor.Builder>
    • mergeUnknownFields

      public final ResourceDescriptor.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      mergeUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<ResourceDescriptor.Builder>