public static final class Visibility.Builder extends GeneratedMessageV3.Builder<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
Inherited Members
com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)
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