Class Visibility.Builder

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

public static final class Visibility.Builder extends com.google.protobuf.GeneratedMessageLite.Builder<Visibility,Visibility.Builder> implements VisibilityOrBuilder
 `Visibility` restricts service consumer's access to service elements,
 such as whether an application can call a visibility-restricted method.
 The restriction is expressed by applying visibility labels on service
 elements. The visibility labels are elsewhere linked to service consumers.

 A service can define multiple visibility labels, but a service consumer
 should be granted at most one visibility label. Multiple visibility
 labels for a single service consumer are not supported.

 If an element and all its parents have no visibility label, its visibility
 is unconditionally granted.

 Example:

 visibility:
 rules:
 - selector: google.calendar.Calendar.EnhancedSearch
 restriction: PREVIEW
 - selector: google.calendar.Calendar.Delegate
 restriction: INTERNAL

 Here, all methods are publicly visible except for the restricted methods
 EnhancedSearch and Delegate.
 
Protobuf type google.api.Visibility
  • Method Details

    • getRulesList

      public List<VisibilityRule> getRulesList()
       A list of visibility rules that apply to individual API elements.
      
       **NOTE:** All service configuration rules follow "last one wins" order.
       
      repeated .google.api.VisibilityRule rules = 1 [json_name = "rules"];
      Specified by:
      getRulesList in interface VisibilityOrBuilder
    • getRulesCount

      public int getRulesCount()
       A list of visibility rules that apply to individual API elements.
      
       **NOTE:** All service configuration rules follow "last one wins" order.
       
      repeated .google.api.VisibilityRule rules = 1 [json_name = "rules"];
      Specified by:
      getRulesCount in interface VisibilityOrBuilder
    • getRules

      public VisibilityRule getRules(int index)
       A list of visibility rules that apply to individual API elements.
      
       **NOTE:** All service configuration rules follow "last one wins" order.
       
      repeated .google.api.VisibilityRule rules = 1 [json_name = "rules"];
      Specified by:
      getRules in interface VisibilityOrBuilder
    • setRules

      public Visibility.Builder setRules(int index, VisibilityRule value)
       A list of visibility rules that apply to individual API elements.
      
       **NOTE:** All service configuration rules follow "last one wins" order.
       
      repeated .google.api.VisibilityRule rules = 1 [json_name = "rules"];
    • setRules

      public Visibility.Builder setRules(int index, VisibilityRule.Builder builderForValue)
       A list of visibility rules that apply to individual API elements.
      
       **NOTE:** All service configuration rules follow "last one wins" order.
       
      repeated .google.api.VisibilityRule rules = 1 [json_name = "rules"];
    • addRules

      public Visibility.Builder addRules(VisibilityRule value)
       A list of visibility rules that apply to individual API elements.
      
       **NOTE:** All service configuration rules follow "last one wins" order.
       
      repeated .google.api.VisibilityRule rules = 1 [json_name = "rules"];
    • addRules

      public Visibility.Builder addRules(int index, VisibilityRule value)
       A list of visibility rules that apply to individual API elements.
      
       **NOTE:** All service configuration rules follow "last one wins" order.
       
      repeated .google.api.VisibilityRule rules = 1 [json_name = "rules"];
    • addRules

      public Visibility.Builder addRules(VisibilityRule.Builder builderForValue)
       A list of visibility rules that apply to individual API elements.
      
       **NOTE:** All service configuration rules follow "last one wins" order.
       
      repeated .google.api.VisibilityRule rules = 1 [json_name = "rules"];
    • addRules

      public Visibility.Builder addRules(int index, VisibilityRule.Builder builderForValue)
       A list of visibility rules that apply to individual API elements.
      
       **NOTE:** All service configuration rules follow "last one wins" order.
       
      repeated .google.api.VisibilityRule rules = 1 [json_name = "rules"];
    • addAllRules

      public Visibility.Builder addAllRules(Iterable<? extends VisibilityRule> values)
       A list of visibility rules that apply to individual API elements.
      
       **NOTE:** All service configuration rules follow "last one wins" order.
       
      repeated .google.api.VisibilityRule rules = 1 [json_name = "rules"];
    • clearRules

      public Visibility.Builder clearRules()
       A list of visibility rules that apply to individual API elements.
      
       **NOTE:** All service configuration rules follow "last one wins" order.
       
      repeated .google.api.VisibilityRule rules = 1 [json_name = "rules"];
    • removeRules

      public Visibility.Builder removeRules(int index)
       A list of visibility rules that apply to individual API elements.
      
       **NOTE:** All service configuration rules follow "last one wins" order.
       
      repeated .google.api.VisibilityRule rules = 1 [json_name = "rules"];