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
Inheritance
Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > Visibility.BuilderImplements
VisibilityOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns | |
---|---|
Type | Description |
Descriptor |
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 | |
---|---|
Type | Description |
Visibility.Builder |
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public Visibility.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters | |
---|---|
Name | Description |
field | FieldDescriptor |
value | Object |
Returns | |
---|---|
Type | Description |
Visibility.Builder |
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 | |
---|---|
Name | Description |
value | VisibilityRule |
Returns | |
---|---|
Type | Description |
Visibility.Builder |
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 | |
---|---|
Name | Description |
builderForValue | VisibilityRule.Builder |
Returns | |
---|---|
Type | Description |
Visibility.Builder |
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 | |
---|---|
Name | Description |
index | int |
value | VisibilityRule |
Returns | |
---|---|
Type | Description |
Visibility.Builder |
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 | |
---|---|
Name | Description |
index | int |
builderForValue | VisibilityRule.Builder |
Returns | |
---|---|
Type | Description |
Visibility.Builder |
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 | |
---|---|
Type | Description |
VisibilityRule.Builder |
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 |
Returns | |
---|---|
Type | Description |
VisibilityRule.Builder |
build()
public Visibility build()
Returns | |
---|---|
Type | Description |
Visibility |
buildPartial()
public Visibility buildPartial()
Returns | |
---|---|
Type | Description |
Visibility |
clear()
public Visibility.Builder clear()
Returns | |
---|---|
Type | Description |
Visibility.Builder |
clearField(Descriptors.FieldDescriptor field)
public Visibility.Builder clearField(Descriptors.FieldDescriptor field)
Parameter | |
---|---|
Name | Description |
field | FieldDescriptor |
Returns | |
---|---|
Type | Description |
Visibility.Builder |
clearOneof(Descriptors.OneofDescriptor oneof)
public Visibility.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter | |
---|---|
Name | Description |
oneof | OneofDescriptor |
Returns | |
---|---|
Type | Description |
Visibility.Builder |
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 | |
---|---|
Type | Description |
Visibility.Builder |
clone()
public Visibility.Builder clone()
Returns | |
---|---|
Type | Description |
Visibility.Builder |
getDefaultInstanceForType()
public Visibility getDefaultInstanceForType()
Returns | |
---|---|
Type | Description |
Visibility |
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Returns | |
---|---|
Type | Description |
Descriptor |
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 |
Returns | |
---|---|
Type | Description |
VisibilityRule |
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 |
Returns | |
---|---|
Type | Description |
VisibilityRule.Builder |
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 | |
---|---|
Type | Description |
List<Builder> |
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;
Returns | |
---|---|
Type | Description |
List<VisibilityRule> |
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 |
Returns | |
---|---|
Type | Description |
VisibilityRuleOrBuilder |
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 | |
---|---|
Type | Description |
FieldAccessorTable |
isInitialized()
public final boolean isInitialized()
Returns | |
---|---|
Type | Description |
boolean |
mergeFrom(Visibility other)
public Visibility.Builder mergeFrom(Visibility other)
Parameter | |
---|---|
Name | Description |
other | Visibility |
Returns | |
---|---|
Type | Description |
Visibility.Builder |
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public Visibility.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters | |
---|---|
Name | Description |
input | CodedInputStream |
extensionRegistry | ExtensionRegistryLite |
Returns | |
---|---|
Type | Description |
Visibility.Builder |
Exceptions | |
---|---|
Type | Description |
IOException |
mergeFrom(Message other)
public Visibility.Builder mergeFrom(Message other)
Parameter | |
---|---|
Name | Description |
other | Message |
Returns | |
---|---|
Type | Description |
Visibility.Builder |
mergeUnknownFields(UnknownFieldSet unknownFields)
public final Visibility.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter | |
---|---|
Name | Description |
unknownFields | UnknownFieldSet |
Returns | |
---|---|
Type | Description |
Visibility.Builder |
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 |
Returns | |
---|---|
Type | Description |
Visibility.Builder |
setField(Descriptors.FieldDescriptor field, Object value)
public Visibility.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters | |
---|---|
Name | Description |
field | FieldDescriptor |
value | Object |
Returns | |
---|---|
Type | Description |
Visibility.Builder |
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public Visibility.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters | |
---|---|
Name | Description |
field | FieldDescriptor |
index | int |
value | Object |
Returns | |
---|---|
Type | Description |
Visibility.Builder |
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 | |
---|---|
Name | Description |
index | int |
value | VisibilityRule |
Returns | |
---|---|
Type | Description |
Visibility.Builder |
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 | |
---|---|
Name | Description |
index | int |
builderForValue | VisibilityRule.Builder |
Returns | |
---|---|
Type | Description |
Visibility.Builder |
setUnknownFields(UnknownFieldSet unknownFields)
public final Visibility.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter | |
---|---|
Name | Description |
unknownFields | UnknownFieldSet |
Returns | |
---|---|
Type | Description |
Visibility.Builder |