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()
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>
|
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public Visibility.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
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;
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;
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;
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;
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;
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 |
---|
Name | Description |
index | int
|
build()
public Visibility build()
buildPartial()
public Visibility buildPartial()
clear()
public Visibility.Builder clear()
Overrides
clearField(Descriptors.FieldDescriptor field)
public Visibility.Builder clearField(Descriptors.FieldDescriptor field)
Overrides
clearOneof(Descriptors.OneofDescriptor oneof)
public Visibility.Builder clearOneof(Descriptors.OneofDescriptor oneof)
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;
clone()
public Visibility.Builder clone()
Overrides
getDefaultInstanceForType()
public Visibility getDefaultInstanceForType()
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
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 |
---|
Name | Description |
index | int
|
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 |
---|
Name | Description |
index | int
|
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;
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 |
---|
Type | Description |
int | |
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;
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 |
---|
Name | Description |
index | int
|
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()
Overrides
isInitialized()
public final boolean isInitialized()
Overrides
mergeFrom(Visibility other)
public Visibility.Builder mergeFrom(Visibility other)
public Visibility.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Overrides
mergeFrom(Message other)
public Visibility.Builder mergeFrom(Message other)
Parameter |
---|
Name | Description |
other | Message
|
Overrides
mergeUnknownFields(UnknownFieldSet unknownFields)
public final Visibility.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
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 |
---|
Name | Description |
index | int
|
setField(Descriptors.FieldDescriptor field, Object value)
public Visibility.Builder setField(Descriptors.FieldDescriptor field, Object value)
Overrides
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public Visibility.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
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;
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;
setUnknownFields(UnknownFieldSet unknownFields)
public final Visibility.Builder setUnknownFields(UnknownFieldSet unknownFields)
Overrides