Class Visibility.Builder (2.7.4)

public static final class Visibility.Builder extends GeneratedMessageV3.Builder<Visibility.Builder> implements VisibilityOrBuilder

Visibility defines restrictions for the visibility of service elements. Restrictions are specified using visibility labels (e.g., PREVIEW) that are elsewhere linked to users and projects. Users and projects can have access to more than one visibility label. The effective visibility for multiple labels is the union of each label's elements, plus any unrestricted elements. If an element and its parents have no restrictions, 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

Implements

VisibilityOrBuilder

Static Methods

getDescriptor()

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

Methods

addAllRules(Iterable<? extends VisibilityRule> values)

public Visibility.Builder addAllRules(Iterable<? extends VisibilityRule> values)

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
NameDescription
valuesIterable<? extends com.google.api.VisibilityRule>
Returns
TypeDescription
Visibility.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

addRules(VisibilityRule value)

public Visibility.Builder addRules(VisibilityRule value)

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
NameDescription
valueVisibilityRule
Returns
TypeDescription
Visibility.Builder

addRules(VisibilityRule.Builder builderForValue)

public Visibility.Builder addRules(VisibilityRule.Builder builderForValue)

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
NameDescription
builderForValueVisibilityRule.Builder
Returns
TypeDescription
Visibility.Builder

addRules(int index, VisibilityRule value)

public Visibility.Builder addRules(int index, VisibilityRule value)

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;

Parameters
NameDescription
indexint
valueVisibilityRule
Returns
TypeDescription
Visibility.Builder

addRules(int index, VisibilityRule.Builder builderForValue)

public Visibility.Builder addRules(int index, VisibilityRule.Builder builderForValue)

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;

Parameters
NameDescription
indexint
builderForValueVisibilityRule.Builder
Returns
TypeDescription
Visibility.Builder

addRulesBuilder()

public VisibilityRule.Builder addRulesBuilder()

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

addRulesBuilder(int index)

public VisibilityRule.Builder addRulesBuilder(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
NameDescription
indexint
Returns
TypeDescription
VisibilityRule.Builder

build()

public Visibility build()
Returns
TypeDescription
Visibility

buildPartial()

public Visibility buildPartial()
Returns
TypeDescription
Visibility

clear()

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

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearRules()

public Visibility.Builder clearRules()

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
TypeDescription
Visibility.Builder

clone()

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

getDefaultInstanceForType()

public Visibility getDefaultInstanceForType()
Returns
TypeDescription
Visibility

getDescriptorForType()

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

getRulesBuilder(int index)

public VisibilityRule.Builder getRulesBuilder(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
NameDescription
indexint
Returns
TypeDescription
VisibilityRule.Builder

getRulesBuilderList()

public List<VisibilityRule.Builder> getRulesBuilderList()

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
TypeDescription
List<Builder>

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
TypeDescription
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;

Returns
TypeDescription
List<VisibilityRule>

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
NameDescription
indexint
Returns
TypeDescription
VisibilityRuleOrBuilder

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
TypeDescription
List<? extends com.google.api.VisibilityRuleOrBuilder>

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(Visibility other)

public Visibility.Builder mergeFrom(Visibility other)
Parameter
NameDescription
otherVisibility
Returns
TypeDescription
Visibility.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

removeRules(int index)

public Visibility.Builder removeRules(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
NameDescription
indexint
Returns
TypeDescription
Visibility.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

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

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

setRules(int index, VisibilityRule value)

public Visibility.Builder setRules(int index, VisibilityRule value)

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;

Parameters
NameDescription
indexint
valueVisibilityRule
Returns
TypeDescription
Visibility.Builder

setRules(int index, VisibilityRule.Builder builderForValue)

public Visibility.Builder setRules(int index, VisibilityRule.Builder builderForValue)

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;

Parameters
NameDescription
indexint
builderForValueVisibilityRule.Builder
Returns
TypeDescription
Visibility.Builder

setUnknownFields(UnknownFieldSet unknownFields)

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