Class VisibilityRule.Builder

  • All Implemented Interfaces:
    VisibilityRuleOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, java.lang.Cloneable
    Enclosing class:
    VisibilityRule

    public static final class VisibilityRule.Builder
    extends com.google.protobuf.GeneratedMessage.Builder<VisibilityRule.Builder>
    implements VisibilityRuleOrBuilder
     A visibility rule provides visibility configuration for an individual API
     element.
     
    Protobuf type google.api.VisibilityRule
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      VisibilityRule build()  
      VisibilityRule buildPartial()  
      VisibilityRule.Builder clear()  
      VisibilityRule.Builder clearRestriction()
      A comma-separated list of visibility labels that apply to the `selector`.
      VisibilityRule.Builder clearSelector()
      Selects methods, messages, fields, enums, etc.
      VisibilityRule getDefaultInstanceForType()  
      static com.google.protobuf.Descriptors.Descriptor getDescriptor()  
      com.google.protobuf.Descriptors.Descriptor getDescriptorForType()  
      java.lang.String getRestriction()
      A comma-separated list of visibility labels that apply to the `selector`.
      com.google.protobuf.ByteString getRestrictionBytes()
      A comma-separated list of visibility labels that apply to the `selector`.
      java.lang.String getSelector()
      Selects methods, messages, fields, enums, etc.
      com.google.protobuf.ByteString getSelectorBytes()
      Selects methods, messages, fields, enums, etc.
      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()  
      boolean isInitialized()  
      VisibilityRule.Builder mergeFrom​(VisibilityRule other)  
      VisibilityRule.Builder mergeFrom​(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)  
      VisibilityRule.Builder mergeFrom​(com.google.protobuf.Message other)  
      VisibilityRule.Builder setRestriction​(java.lang.String value)
      A comma-separated list of visibility labels that apply to the `selector`.
      VisibilityRule.Builder setRestrictionBytes​(com.google.protobuf.ByteString value)
      A comma-separated list of visibility labels that apply to the `selector`.
      VisibilityRule.Builder setSelector​(java.lang.String value)
      Selects methods, messages, fields, enums, etc.
      VisibilityRule.Builder setSelectorBytes​(com.google.protobuf.ByteString value)
      Selects methods, messages, fields, enums, etc.
      • Methods inherited from class com.google.protobuf.GeneratedMessage.Builder

        addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, 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 Detail

      • 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<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.GeneratedMessage.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.GeneratedMessage.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>
      • isInitialized

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

        public VisibilityRule.Builder mergeFrom​(com.google.protobuf.CodedInputStream input,
                                                com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                         throws java.io.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:
        java.io.IOException
      • getSelector

        public java.lang.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​(java.lang.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 java.lang.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​(java.lang.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.