Class VisibilityRule.Builder (2.15.0)

public static final class VisibilityRule.Builder extends GeneratedMessageV3.Builder<VisibilityRule.Builder> implements VisibilityRuleOrBuilder

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

Protobuf type google.api.VisibilityRule

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public VisibilityRule.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
VisibilityRule.Builder
Overrides

build()

public VisibilityRule build()
Returns
TypeDescription
VisibilityRule

buildPartial()

public VisibilityRule buildPartial()
Returns
TypeDescription
VisibilityRule

clear()

public VisibilityRule.Builder clear()
Returns
TypeDescription
VisibilityRule.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public VisibilityRule.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
VisibilityRule.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public VisibilityRule.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
VisibilityRule.Builder
Overrides

clearRestriction()

public VisibilityRule.Builder clearRestriction()

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
VisibilityRule.Builder

This builder for chaining.

clearSelector()

public VisibilityRule.Builder clearSelector()

Selects methods, messages, fields, enums, etc. to which this rule applies. Refer to selector for syntax details.

string selector = 1;

Returns
TypeDescription
VisibilityRule.Builder

This builder for chaining.

clone()

public VisibilityRule.Builder clone()
Returns
TypeDescription
VisibilityRule.Builder
Overrides

getDefaultInstanceForType()

public VisibilityRule getDefaultInstanceForType()
Returns
TypeDescription
VisibilityRule

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
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.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(VisibilityRule other)

public VisibilityRule.Builder mergeFrom(VisibilityRule other)
Parameter
NameDescription
otherVisibilityRule
Returns
TypeDescription
VisibilityRule.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public VisibilityRule.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
VisibilityRule.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public VisibilityRule.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
VisibilityRule.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final VisibilityRule.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
VisibilityRule.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

public VisibilityRule.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
VisibilityRule.Builder
Overrides

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public VisibilityRule.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
VisibilityRule.Builder
Overrides

setRestriction(String value)

public VisibilityRule.Builder setRestriction(String value)

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;

Parameter
NameDescription
valueString

The restriction to set.

Returns
TypeDescription
VisibilityRule.Builder

This builder for chaining.

setRestrictionBytes(ByteString value)

public VisibilityRule.Builder setRestrictionBytes(ByteString value)

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;

Parameter
NameDescription
valueByteString

The bytes for restriction to set.

Returns
TypeDescription
VisibilityRule.Builder

This builder for chaining.

setSelector(String value)

public VisibilityRule.Builder setSelector(String value)

Selects methods, messages, fields, enums, etc. to which this rule applies. Refer to selector for syntax details.

string selector = 1;

Parameter
NameDescription
valueString

The selector to set.

Returns
TypeDescription
VisibilityRule.Builder

This builder for chaining.

setSelectorBytes(ByteString value)

public VisibilityRule.Builder setSelectorBytes(ByteString value)

Selects methods, messages, fields, enums, etc. to which this rule applies. Refer to selector for syntax details.

string selector = 1;

Parameter
NameDescription
valueByteString

The bytes for selector to set.

Returns
TypeDescription
VisibilityRule.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final VisibilityRule.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
VisibilityRule.Builder
Overrides