Class VisibilityRule (2.24.0)

public final class VisibilityRule extends GeneratedMessageV3 implements VisibilityRuleOrBuilder

A visibility rule provides visibility configuration for an individual API element.

Protobuf type google.api.VisibilityRule

Static Fields

RESTRICTION_FIELD_NUMBER

public static final int RESTRICTION_FIELD_NUMBER
Field Value
TypeDescription
int

SELECTOR_FIELD_NUMBER

public static final int SELECTOR_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static VisibilityRule getDefaultInstance()
Returns
TypeDescription
VisibilityRule

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static VisibilityRule.Builder newBuilder()
Returns
TypeDescription
VisibilityRule.Builder

newBuilder(VisibilityRule prototype)

public static VisibilityRule.Builder newBuilder(VisibilityRule prototype)
Parameter
NameDescription
prototypeVisibilityRule
Returns
TypeDescription
VisibilityRule.Builder

parseDelimitedFrom(InputStream input)

public static VisibilityRule parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
VisibilityRule
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static VisibilityRule parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
VisibilityRule
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static VisibilityRule parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
VisibilityRule
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static VisibilityRule parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
VisibilityRule
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static VisibilityRule parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
VisibilityRule
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static VisibilityRule parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
VisibilityRule
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static VisibilityRule parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
VisibilityRule
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static VisibilityRule parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
VisibilityRule
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static VisibilityRule parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
VisibilityRule
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static VisibilityRule parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
VisibilityRule
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static VisibilityRule parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
VisibilityRule
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static VisibilityRule parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
VisibilityRule
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<VisibilityRule> parser()
Returns
TypeDescription
Parser<VisibilityRule>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getDefaultInstanceForType()

public VisibilityRule getDefaultInstanceForType()
Returns
TypeDescription
VisibilityRule

getParserForType()

public Parser<VisibilityRule> getParserForType()
Returns
TypeDescription
Parser<VisibilityRule>
Overrides

getRestriction()

public String getRestriction()

A comma-separated list of visibility labels that apply to the selector. Any of the listed labels can be used to grant the visibility.

If a rule has multiple labels, removing one of the labels but not all of them can break clients.

Example:

 visibility:
   rules:
   - selector: google.calendar.Calendar.EnhancedSearch
     restriction: INTERNAL, PREVIEW

Removing INTERNAL from this restriction will break clients that rely on this method and only had access to it through INTERNAL.

string restriction = 2;

Returns
TypeDescription
String

The restriction.

getRestrictionBytes()

public ByteString getRestrictionBytes()

A comma-separated list of visibility labels that apply to the selector. Any of the listed labels can be used to grant the visibility.

If a rule has multiple labels, removing one of the labels but not all of them can break clients.

Example:

 visibility:
   rules:
   - selector: google.calendar.Calendar.EnhancedSearch
     restriction: INTERNAL, PREVIEW

Removing INTERNAL from this restriction will break clients that rely on this method and only had access to it through INTERNAL.

string restriction = 2;

Returns
TypeDescription
ByteString

The bytes for restriction.

getSelector()

public String getSelector()

Selects methods, messages, fields, enums, etc. to which this rule applies.

Refer to selector for syntax details.

string selector = 1;

Returns
TypeDescription
String

The selector.

getSelectorBytes()

public ByteString getSelectorBytes()

Selects methods, messages, fields, enums, etc. to which this rule applies.

Refer to selector for syntax details.

string selector = 1;

Returns
TypeDescription
ByteString

The bytes for selector.

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public VisibilityRule.Builder newBuilderForType()
Returns
TypeDescription
VisibilityRule.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected VisibilityRule.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
VisibilityRule.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public VisibilityRule.Builder toBuilder()
Returns
TypeDescription
VisibilityRule.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException