Class VisibilityRule.Builder

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

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

    Fields inherited from class com.google.protobuf.GeneratedMessageLite.Builder

    instance
  • 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.
    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.
    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.

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

    build, buildPartial, clear, clone, copyOnWrite, copyOnWriteInternal, getDefaultInstanceForType, internalMergeFrom, isInitialized, mergeFrom, mergeFrom, mergeFrom, mergeFrom

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

    addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException

    Methods inherited from class java.lang.Object

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

    Methods inherited from interface com.google.protobuf.MessageLiteOrBuilder

    getDefaultInstanceForType, isInitialized
  • Method Details

    • 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 [json_name = "selector"];
      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 [json_name = "selector"];
      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 [json_name = "selector"];
      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 [json_name = "selector"];
      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 [json_name = "selector"];
      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 [json_name = "restriction"];
      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 [json_name = "restriction"];
      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 [json_name = "restriction"];
      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 [json_name = "restriction"];
      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 [json_name = "restriction"];
      Parameters:
      value - The bytes for restriction to set.
      Returns:
      This builder for chaining.