public static final class Visibility.Builder extends GeneratedMessageV3.Builder<Visibility.Builder> implements VisibilityOrBuilder
Visibility
defines restrictions for the visibility of service
elements. Restrictions are specified using visibility labels
(e.g., PREVIEW) that are elsewhere linked to users and projects.
Users and projects can have access to more than one visibility label. The
effective visibility for multiple labels is the union of each label's
elements, plus any unrestricted elements.
If an element and its parents have no restrictions, 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
Static Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns
Methods
addAllRules(Iterable<? extends VisibilityRule> values)
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;
Parameter
Name | Description |
values | Iterable<? extends com.google.api.VisibilityRule>
|
Returns
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public Visibility.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
addRules(VisibilityRule value)
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;
Parameter
Returns
addRules(VisibilityRule.Builder builderForValue)
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;
Parameter
Returns
addRules(int index, VisibilityRule value)
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;
Parameters
Returns
addRules(int index, VisibilityRule.Builder builderForValue)
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;
Parameters
Returns
addRulesBuilder()
public VisibilityRule.Builder addRulesBuilder()
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;
Returns
addRulesBuilder(int index)
public VisibilityRule.Builder addRulesBuilder(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;
Parameter
Returns
build()
public Visibility build()
Returns
buildPartial()
public Visibility buildPartial()
Returns
clear()
public Visibility.Builder clear()
Returns
Overrides
clearField(Descriptors.FieldDescriptor field)
public Visibility.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Returns
Overrides
clearOneof(Descriptors.OneofDescriptor oneof)
public Visibility.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Returns
Overrides
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;
Returns
clone()
public Visibility.Builder clone()
Returns
Overrides
getDefaultInstanceForType()
public Visibility getDefaultInstanceForType()
Returns
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Returns
Overrides
getRules(int index)
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;
Parameter
Returns
getRulesBuilder(int index)
public VisibilityRule.Builder getRulesBuilder(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;
Parameter
Returns
getRulesBuilderList()
public List<VisibilityRule.Builder> getRulesBuilderList()
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;
Returns
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;
Returns
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;
Returns
getRulesOrBuilder(int index)
public VisibilityRuleOrBuilder getRulesOrBuilder(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;
Parameter
Returns
getRulesOrBuilderList()
public List<? extends VisibilityRuleOrBuilder> getRulesOrBuilderList()
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;
Returns
Type | Description |
List<? extends com.google.api.VisibilityRuleOrBuilder> | |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
mergeFrom(Visibility other)
public Visibility.Builder mergeFrom(Visibility other)
Parameter
Returns
public Visibility.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Overrides
Exceptions
mergeFrom(Message other)
public Visibility.Builder mergeFrom(Message other)
Parameter
Returns
Overrides
mergeUnknownFields(UnknownFieldSet unknownFields)
public final Visibility.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides
removeRules(int index)
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;
Parameter
Returns
setField(Descriptors.FieldDescriptor field, Object value)
public Visibility.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public Visibility.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Returns
Overrides
setRules(int index, VisibilityRule value)
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;
Parameters
Returns
setRules(int index, VisibilityRule.Builder builderForValue)
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;
Parameters
Returns
setUnknownFields(UnknownFieldSet unknownFields)
public final Visibility.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides