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
Inherited Members
com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)
Static Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public VisibilityRule.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
build()
public VisibilityRule build()
Returns
buildPartial()
public VisibilityRule buildPartial()
Returns
clear()
public VisibilityRule.Builder clear()
Returns
Overrides
clearField(Descriptors.FieldDescriptor field)
public VisibilityRule.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Returns
Overrides
clearOneof(Descriptors.OneofDescriptor oneof)
public VisibilityRule.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Returns
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
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
clone()
public VisibilityRule.Builder clone()
Returns
Overrides
getDefaultInstanceForType()
public VisibilityRule getDefaultInstanceForType()
Returns
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Returns
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
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
mergeFrom(VisibilityRule other)
public VisibilityRule.Builder mergeFrom(VisibilityRule other)
Parameter
Returns
public VisibilityRule.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Overrides
Exceptions
mergeFrom(Message other)
public VisibilityRule.Builder mergeFrom(Message other)
Parameter
Returns
Overrides
mergeUnknownFields(UnknownFieldSet unknownFields)
public final VisibilityRule.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides
setField(Descriptors.FieldDescriptor field, Object value)
public VisibilityRule.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public VisibilityRule.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Returns
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
Name | Description |
value | String
The restriction to set.
|
Returns
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
Name | Description |
value | ByteString
The bytes for restriction to set.
|
Returns
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
Name | Description |
value | String
The selector to set.
|
Returns
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
Name | Description |
value | ByteString
The bytes for selector to set.
|
Returns
setUnknownFields(UnknownFieldSet unknownFields)
public final VisibilityRule.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides