Send feedback
Class Visibility (2.21.1)
Stay organized with collections
Save and categorize content based on your preferences.
Version 2.21.1 keyboard_arrow_down
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
Inherited Members
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
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
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
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-01-27 UTC.
Need to tell us more?
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-01-27 UTC."],[],[]]