Class VisibilityRule.Builder

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

public static final class VisibilityRule.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<VisibilityRule.Builder> implements VisibilityRuleOrBuilder
 A visibility rule provides visibility configuration for an individual API
 element.
 
Protobuf type google.api.VisibilityRule
  • 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<VisibilityRule.Builder>
    • clear

      public VisibilityRule.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<VisibilityRule.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<VisibilityRule.Builder>
    • getDefaultInstanceForType

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

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

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

      public VisibilityRule.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<VisibilityRule.Builder>
    • setField

      public VisibilityRule.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<VisibilityRule.Builder>
    • clearField

      public VisibilityRule.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<VisibilityRule.Builder>
    • clearOneof

      public VisibilityRule.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<VisibilityRule.Builder>
    • setRepeatedField

      public VisibilityRule.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<VisibilityRule.Builder>
    • addRepeatedField

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

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

      public VisibilityRule.Builder mergeFrom(VisibilityRule other)
    • isInitialized

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

      public VisibilityRule.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<VisibilityRule.Builder>
      Throws:
      IOException
    • getSelector

      public String getSelector()
       Selects methods, messages, fields, enums, etc. to which this rule applies.
       Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
       
      string selector = 1;
      Specified by:
      getSelector in interface VisibilityRuleOrBuilder
      Returns:
      The selector.
    • getSelectorBytes

      public com.google.protobuf.ByteString getSelectorBytes()
       Selects methods, messages, fields, enums, etc. to which this rule applies.
       Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
       
      string selector = 1;
      Specified by:
      getSelectorBytes in interface VisibilityRuleOrBuilder
      Returns:
      The bytes for selector.
    • setSelector

      public VisibilityRule.Builder setSelector(String value)
       Selects methods, messages, fields, enums, etc. to which this rule applies.
       Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
       
      string selector = 1;
      Parameters:
      value - The selector to set.
      Returns:
      This builder for chaining.
    • clearSelector

      public VisibilityRule.Builder clearSelector()
       Selects methods, messages, fields, enums, etc. to which this rule applies.
       Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
       
      string selector = 1;
      Returns:
      This builder for chaining.
    • setSelectorBytes

      public VisibilityRule.Builder setSelectorBytes(com.google.protobuf.ByteString value)
       Selects methods, messages, fields, enums, etc. to which this rule applies.
       Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
       
      string selector = 1;
      Parameters:
      value - The bytes for selector to set.
      Returns:
      This builder for chaining.
    • getRestriction

      public String getRestriction()
       A comma-separated list of visibility labels that apply to the `selector`.
       Any of the listed labels can be used to grant the visibility.
       If a rule has multiple labels, removing one of the labels but not all of
       them can break clients.
       Example:
           visibility:
             rules:
             - selector: google.calendar.Calendar.EnhancedSearch
               restriction: INTERNAL, PREVIEW
       Removing INTERNAL from this restriction will break clients that rely on
       this method and only had access to it through INTERNAL.
       
      string restriction = 2;
      Specified by:
      getRestriction in interface VisibilityRuleOrBuilder
      Returns:
      The restriction.
    • getRestrictionBytes

      public com.google.protobuf.ByteString getRestrictionBytes()
       A comma-separated list of visibility labels that apply to the `selector`.
       Any of the listed labels can be used to grant the visibility.
       If a rule has multiple labels, removing one of the labels but not all of
       them can break clients.
       Example:
           visibility:
             rules:
             - selector: google.calendar.Calendar.EnhancedSearch
               restriction: INTERNAL, PREVIEW
       Removing INTERNAL from this restriction will break clients that rely on
       this method and only had access to it through INTERNAL.
       
      string restriction = 2;
      Specified by:
      getRestrictionBytes in interface VisibilityRuleOrBuilder
      Returns:
      The bytes for restriction.
    • setRestriction

      public VisibilityRule.Builder setRestriction(String value)
       A comma-separated list of visibility labels that apply to the `selector`.
       Any of the listed labels can be used to grant the visibility.
       If a rule has multiple labels, removing one of the labels but not all of
       them can break clients.
       Example:
           visibility:
             rules:
             - selector: google.calendar.Calendar.EnhancedSearch
               restriction: INTERNAL, PREVIEW
       Removing INTERNAL from this restriction will break clients that rely on
       this method and only had access to it through INTERNAL.
       
      string restriction = 2;
      Parameters:
      value - The restriction to set.
      Returns:
      This builder for chaining.
    • clearRestriction

      public VisibilityRule.Builder clearRestriction()
       A comma-separated list of visibility labels that apply to the `selector`.
       Any of the listed labels can be used to grant the visibility.
       If a rule has multiple labels, removing one of the labels but not all of
       them can break clients.
       Example:
           visibility:
             rules:
             - selector: google.calendar.Calendar.EnhancedSearch
               restriction: INTERNAL, PREVIEW
       Removing INTERNAL from this restriction will break clients that rely on
       this method and only had access to it through INTERNAL.
       
      string restriction = 2;
      Returns:
      This builder for chaining.
    • setRestrictionBytes

      public VisibilityRule.Builder setRestrictionBytes(com.google.protobuf.ByteString value)
       A comma-separated list of visibility labels that apply to the `selector`.
       Any of the listed labels can be used to grant the visibility.
       If a rule has multiple labels, removing one of the labels but not all of
       them can break clients.
       Example:
           visibility:
             rules:
             - selector: google.calendar.Calendar.EnhancedSearch
               restriction: INTERNAL, PREVIEW
       Removing INTERNAL from this restriction will break clients that rely on
       this method and only had access to it through INTERNAL.
       
      string restriction = 2;
      Parameters:
      value - The bytes for restriction to set.
      Returns:
      This builder for chaining.
    • setUnknownFields

      public final VisibilityRule.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<VisibilityRule.Builder>
    • mergeUnknownFields

      public final VisibilityRule.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<VisibilityRule.Builder>