public final class Visibility extends GeneratedMessageV3 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
Static Fields
RULES_FIELD_NUMBER
public static final int RULES_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
Static Methods
getDefaultInstance()
public static Visibility getDefaultInstance()
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
newBuilder()
public static Visibility.Builder newBuilder()
newBuilder(Visibility prototype)
public static Visibility.Builder newBuilder(Visibility prototype)
public static Visibility parseDelimitedFrom(InputStream input)
public static Visibility parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(byte[] data)
public static Visibility parseFrom(byte[] data)
Parameter |
---|
Name | Description |
data | byte[]
|
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static Visibility parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteString data)
public static Visibility parseFrom(ByteString data)
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static Visibility parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static Visibility parseFrom(CodedInputStream input)
public static Visibility parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public static Visibility parseFrom(InputStream input)
public static Visibility parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteBuffer data)
public static Visibility parseFrom(ByteBuffer data)
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static Visibility parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
parser()
public static Parser<Visibility> parser()
Methods
equals(Object obj)
public boolean equals(Object obj)
Parameter |
---|
Name | Description |
obj | Object
|
Overrides
getDefaultInstanceForType()
public Visibility getDefaultInstanceForType()
getParserForType()
public Parser<Visibility> getParserForType()
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
|
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> | |
getSerializedSize()
public int getSerializedSize()
Returns |
---|
Type | Description |
int | |
Overrides
getUnknownFields()
public final UnknownFieldSet getUnknownFields()
Overrides
hashCode()
Returns |
---|
Type | Description |
int | |
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
isInitialized()
public final boolean isInitialized()
Overrides
newBuilderForType()
public Visibility.Builder newBuilderForType()
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected Visibility.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Overrides
toBuilder()
public Visibility.Builder toBuilder()
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Overrides