Class VisibilityRule.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
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 Summary

    Modifier and Type
    Method
    Description
     
     
     
    A comma-separated list of visibility labels that apply to the `selector`.
    Selects methods, messages, fields, enums, etc.
     
    static final com.google.protobuf.Descriptors.Descriptor
     
    com.google.protobuf.Descriptors.Descriptor
     
    A comma-separated list of visibility labels that apply to the `selector`.
    com.google.protobuf.ByteString
    A comma-separated list of visibility labels that apply to the `selector`.
    Selects methods, messages, fields, enums, etc.
    com.google.protobuf.ByteString
    Selects methods, messages, fields, enums, etc.
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
     
    final boolean
     
     
    mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    mergeFrom(com.google.protobuf.Message other)
     
    mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
     
    A comma-separated list of visibility labels that apply to the `selector`.
    setRestrictionBytes(com.google.protobuf.ByteString value)
    A comma-separated list of visibility labels that apply to the `selector`.
    Selects methods, messages, fields, enums, etc.
    setSelectorBytes(com.google.protobuf.ByteString value)
    Selects methods, messages, fields, enums, etc.
    setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
     

    Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder

    addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFieldSetBuilder, setUnknownFieldsProto3

    Methods inherited from class com.google.protobuf.AbstractMessage.Builder

    findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString

    Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder

    addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.google.protobuf.Message.Builder

    mergeDelimitedFrom, mergeDelimitedFrom

    Methods inherited from interface com.google.protobuf.MessageLite.Builder

    mergeFrom

    Methods inherited from interface com.google.protobuf.MessageOrBuilder

    findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
  • 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
    • 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>