Class VisibilityRule (2.38.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
Type Description
int

SELECTOR_FIELD_NUMBER

public static final int SELECTOR_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static VisibilityRule getDefaultInstance()
Returns
Type Description
VisibilityRule

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static VisibilityRule.Builder newBuilder()
Returns
Type Description
VisibilityRule.Builder

newBuilder(VisibilityRule prototype)

public static VisibilityRule.Builder newBuilder(VisibilityRule prototype)
Parameter
Name Description
prototype VisibilityRule
Returns
Type Description
VisibilityRule.Builder

parseDelimitedFrom(InputStream input)

public static VisibilityRule parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
VisibilityRule
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static VisibilityRule parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
VisibilityRule
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static VisibilityRule parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
VisibilityRule
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static VisibilityRule parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
VisibilityRule
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static VisibilityRule parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
VisibilityRule
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static VisibilityRule parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
VisibilityRule
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static VisibilityRule parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
VisibilityRule
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static VisibilityRule parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
VisibilityRule
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static VisibilityRule parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
VisibilityRule
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static VisibilityRule parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
VisibilityRule
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static VisibilityRule parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
VisibilityRule
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static VisibilityRule parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
VisibilityRule
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<VisibilityRule> parser()
Returns
Type Description
Parser<VisibilityRule>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getDefaultInstanceForType()

public VisibilityRule getDefaultInstanceForType()
Returns
Type Description
VisibilityRule

getParserForType()

public Parser<VisibilityRule> getParserForType()
Returns
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
ByteString

The bytes for selector.

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public VisibilityRule.Builder newBuilderForType()
Returns
Type Description
VisibilityRule.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected VisibilityRule.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
VisibilityRule.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public VisibilityRule.Builder toBuilder()
Returns
Type Description
VisibilityRule.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException