Class Document.AclInfo.AccessRestriction.Builder (0.36.0)

public static final class Document.AclInfo.AccessRestriction.Builder extends GeneratedMessageV3.Builder<Document.AclInfo.AccessRestriction.Builder> implements Document.AclInfo.AccessRestrictionOrBuilder

AclRestriction to model complex inheritance restrictions.

Example: Modeling a "Both Permit" inheritance, where to access a child document, user needs to have access to parent document.

Document Hierarchy - Space_S --> Page_P.

Readers: Space_S: group_1, user_1 Page_P: group_2, group_3, user_2

Space_S ACL Restriction - { "acl_info": { "readers": [ { "principals": [ { "group_id": "group_1" }, { "user_id": "user_1" } ] } ] } }

Page_P ACL Restriction. { "acl_info": { "readers": [ { "principals": [ { "group_id": "group_2" }, { "group_id": "group_3" }, { "user_id": "user_2" } ], }, { "principals": [ { "group_id": "group_1" }, { "user_id": "user_1" } ], } ] } }

Protobuf type google.cloud.discoveryengine.v1alpha.Document.AclInfo.AccessRestriction

Static Methods

getDescriptor()

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

Methods

addAllPrincipals(Iterable<? extends Principal> values)

public Document.AclInfo.AccessRestriction.Builder addAllPrincipals(Iterable<? extends Principal> values)

List of principals.

repeated .google.cloud.discoveryengine.v1alpha.Principal principals = 1;

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.discoveryengine.v1alpha.Principal>
Returns
TypeDescription
Document.AclInfo.AccessRestriction.Builder

addPrincipals(Principal value)

public Document.AclInfo.AccessRestriction.Builder addPrincipals(Principal value)

List of principals.

repeated .google.cloud.discoveryengine.v1alpha.Principal principals = 1;

Parameter
NameDescription
valuePrincipal
Returns
TypeDescription
Document.AclInfo.AccessRestriction.Builder

addPrincipals(Principal.Builder builderForValue)

public Document.AclInfo.AccessRestriction.Builder addPrincipals(Principal.Builder builderForValue)

List of principals.

repeated .google.cloud.discoveryengine.v1alpha.Principal principals = 1;

Parameter
NameDescription
builderForValuePrincipal.Builder
Returns
TypeDescription
Document.AclInfo.AccessRestriction.Builder

addPrincipals(int index, Principal value)

public Document.AclInfo.AccessRestriction.Builder addPrincipals(int index, Principal value)

List of principals.

repeated .google.cloud.discoveryengine.v1alpha.Principal principals = 1;

Parameters
NameDescription
indexint
valuePrincipal
Returns
TypeDescription
Document.AclInfo.AccessRestriction.Builder

addPrincipals(int index, Principal.Builder builderForValue)

public Document.AclInfo.AccessRestriction.Builder addPrincipals(int index, Principal.Builder builderForValue)

List of principals.

repeated .google.cloud.discoveryengine.v1alpha.Principal principals = 1;

Parameters
NameDescription
indexint
builderForValuePrincipal.Builder
Returns
TypeDescription
Document.AclInfo.AccessRestriction.Builder

addPrincipalsBuilder()

public Principal.Builder addPrincipalsBuilder()

List of principals.

repeated .google.cloud.discoveryengine.v1alpha.Principal principals = 1;

Returns
TypeDescription
Principal.Builder

addPrincipalsBuilder(int index)

public Principal.Builder addPrincipalsBuilder(int index)

List of principals.

repeated .google.cloud.discoveryengine.v1alpha.Principal principals = 1;

Parameter
NameDescription
indexint
Returns
TypeDescription
Principal.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public Document.AclInfo.AccessRestriction build()
Returns
TypeDescription
Document.AclInfo.AccessRestriction

buildPartial()

public Document.AclInfo.AccessRestriction buildPartial()
Returns
TypeDescription
Document.AclInfo.AccessRestriction

clear()

public Document.AclInfo.AccessRestriction.Builder clear()
Returns
TypeDescription
Document.AclInfo.AccessRestriction.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public Document.AclInfo.AccessRestriction.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
Document.AclInfo.AccessRestriction.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public Document.AclInfo.AccessRestriction.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
Document.AclInfo.AccessRestriction.Builder
Overrides

clearPrincipals()

public Document.AclInfo.AccessRestriction.Builder clearPrincipals()

List of principals.

repeated .google.cloud.discoveryengine.v1alpha.Principal principals = 1;

Returns
TypeDescription
Document.AclInfo.AccessRestriction.Builder

clone()

public Document.AclInfo.AccessRestriction.Builder clone()
Returns
TypeDescription
Document.AclInfo.AccessRestriction.Builder
Overrides

getDefaultInstanceForType()

public Document.AclInfo.AccessRestriction getDefaultInstanceForType()
Returns
TypeDescription
Document.AclInfo.AccessRestriction

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getPrincipals(int index)

public Principal getPrincipals(int index)

List of principals.

repeated .google.cloud.discoveryengine.v1alpha.Principal principals = 1;

Parameter
NameDescription
indexint
Returns
TypeDescription
Principal

getPrincipalsBuilder(int index)

public Principal.Builder getPrincipalsBuilder(int index)

List of principals.

repeated .google.cloud.discoveryengine.v1alpha.Principal principals = 1;

Parameter
NameDescription
indexint
Returns
TypeDescription
Principal.Builder

getPrincipalsBuilderList()

public List<Principal.Builder> getPrincipalsBuilderList()

List of principals.

repeated .google.cloud.discoveryengine.v1alpha.Principal principals = 1;

Returns
TypeDescription
List<Builder>

getPrincipalsCount()

public int getPrincipalsCount()

List of principals.

repeated .google.cloud.discoveryengine.v1alpha.Principal principals = 1;

Returns
TypeDescription
int

getPrincipalsList()

public List<Principal> getPrincipalsList()

List of principals.

repeated .google.cloud.discoveryengine.v1alpha.Principal principals = 1;

Returns
TypeDescription
List<Principal>

getPrincipalsOrBuilder(int index)

public PrincipalOrBuilder getPrincipalsOrBuilder(int index)

List of principals.

repeated .google.cloud.discoveryengine.v1alpha.Principal principals = 1;

Parameter
NameDescription
indexint
Returns
TypeDescription
PrincipalOrBuilder

getPrincipalsOrBuilderList()

public List<? extends PrincipalOrBuilder> getPrincipalsOrBuilderList()

List of principals.

repeated .google.cloud.discoveryengine.v1alpha.Principal principals = 1;

Returns
TypeDescription
List<? extends com.google.cloud.discoveryengine.v1alpha.PrincipalOrBuilder>

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(Document.AclInfo.AccessRestriction other)

public Document.AclInfo.AccessRestriction.Builder mergeFrom(Document.AclInfo.AccessRestriction other)
Parameter
NameDescription
otherDocument.AclInfo.AccessRestriction
Returns
TypeDescription
Document.AclInfo.AccessRestriction.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

public Document.AclInfo.AccessRestriction.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
Document.AclInfo.AccessRestriction.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Document.AclInfo.AccessRestriction.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Document.AclInfo.AccessRestriction.Builder
Overrides

removePrincipals(int index)

public Document.AclInfo.AccessRestriction.Builder removePrincipals(int index)

List of principals.

repeated .google.cloud.discoveryengine.v1alpha.Principal principals = 1;

Parameter
NameDescription
indexint
Returns
TypeDescription
Document.AclInfo.AccessRestriction.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

setPrincipals(int index, Principal value)

public Document.AclInfo.AccessRestriction.Builder setPrincipals(int index, Principal value)

List of principals.

repeated .google.cloud.discoveryengine.v1alpha.Principal principals = 1;

Parameters
NameDescription
indexint
valuePrincipal
Returns
TypeDescription
Document.AclInfo.AccessRestriction.Builder

setPrincipals(int index, Principal.Builder builderForValue)

public Document.AclInfo.AccessRestriction.Builder setPrincipals(int index, Principal.Builder builderForValue)

List of principals.

repeated .google.cloud.discoveryengine.v1alpha.Principal principals = 1;

Parameters
NameDescription
indexint
builderForValuePrincipal.Builder
Returns
TypeDescription
Document.AclInfo.AccessRestriction.Builder

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

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

setUnknownFields(UnknownFieldSet unknownFields)

public final Document.AclInfo.AccessRestriction.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Document.AclInfo.AccessRestriction.Builder
Overrides