Class Document.AclInfo.AccessRestriction.Builder (0.45.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
Type Description
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
Name Description
values Iterable<? extends com.google.cloud.discoveryengine.v1alpha.Principal>
Returns
Type Description
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
Name Description
value Principal
Returns
Type Description
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
Name Description
builderForValue Principal.Builder
Returns
Type Description
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
Name Description
index int
value Principal
Returns
Type Description
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
Name Description
index int
builderForValue Principal.Builder
Returns
Type Description
Document.AclInfo.AccessRestriction.Builder

addPrincipalsBuilder()

public Principal.Builder addPrincipalsBuilder()

List of principals.

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

Returns
Type Description
Principal.Builder

addPrincipalsBuilder(int index)

public Principal.Builder addPrincipalsBuilder(int index)

List of principals.

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

Parameter
Name Description
index int
Returns
Type Description
Principal.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Document.AclInfo.AccessRestriction.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Document.AclInfo.AccessRestriction.Builder
Overrides

build()

public Document.AclInfo.AccessRestriction build()
Returns
Type Description
Document.AclInfo.AccessRestriction

buildPartial()

public Document.AclInfo.AccessRestriction buildPartial()
Returns
Type Description
Document.AclInfo.AccessRestriction

clear()

public Document.AclInfo.AccessRestriction.Builder clear()
Returns
Type Description
Document.AclInfo.AccessRestriction.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public Document.AclInfo.AccessRestriction.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
Document.AclInfo.AccessRestriction.Builder
Overrides

clearIdpWide()

public Document.AclInfo.AccessRestriction.Builder clearIdpWide()

All users within the Identity Provider.

bool idp_wide = 2;

Returns
Type Description
Document.AclInfo.AccessRestriction.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Document.AclInfo.AccessRestriction.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
Document.AclInfo.AccessRestriction.Builder
Overrides

clearPrincipals()

public Document.AclInfo.AccessRestriction.Builder clearPrincipals()

List of principals.

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

Returns
Type Description
Document.AclInfo.AccessRestriction.Builder

clone()

public Document.AclInfo.AccessRestriction.Builder clone()
Returns
Type Description
Document.AclInfo.AccessRestriction.Builder
Overrides

getDefaultInstanceForType()

public Document.AclInfo.AccessRestriction getDefaultInstanceForType()
Returns
Type Description
Document.AclInfo.AccessRestriction

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getIdpWide()

public boolean getIdpWide()

All users within the Identity Provider.

bool idp_wide = 2;

Returns
Type Description
boolean

The idpWide.

getPrincipals(int index)

public Principal getPrincipals(int index)

List of principals.

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

Parameter
Name Description
index int
Returns
Type Description
Principal

getPrincipalsBuilder(int index)

public Principal.Builder getPrincipalsBuilder(int index)

List of principals.

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

Parameter
Name Description
index int
Returns
Type Description
Principal.Builder

getPrincipalsBuilderList()

public List<Principal.Builder> getPrincipalsBuilderList()

List of principals.

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

Returns
Type Description
List<Builder>

getPrincipalsCount()

public int getPrincipalsCount()

List of principals.

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

Returns
Type Description
int

getPrincipalsList()

public List<Principal> getPrincipalsList()

List of principals.

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

Returns
Type Description
List<Principal>

getPrincipalsOrBuilder(int index)

public PrincipalOrBuilder getPrincipalsOrBuilder(int index)

List of principals.

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

Parameter
Name Description
index int
Returns
Type Description
PrincipalOrBuilder

getPrincipalsOrBuilderList()

public List<? extends PrincipalOrBuilder> getPrincipalsOrBuilderList()

List of principals.

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

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

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(Document.AclInfo.AccessRestriction other)

public Document.AclInfo.AccessRestriction.Builder mergeFrom(Document.AclInfo.AccessRestriction other)
Parameter
Name Description
other Document.AclInfo.AccessRestriction
Returns
Type Description
Document.AclInfo.AccessRestriction.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Document.AclInfo.AccessRestriction.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Document.AclInfo.AccessRestriction.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public Document.AclInfo.AccessRestriction.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
Document.AclInfo.AccessRestriction.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Document.AclInfo.AccessRestriction.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
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
Name Description
index int
Returns
Type Description
Document.AclInfo.AccessRestriction.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public Document.AclInfo.AccessRestriction.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Document.AclInfo.AccessRestriction.Builder
Overrides

setIdpWide(boolean value)

public Document.AclInfo.AccessRestriction.Builder setIdpWide(boolean value)

All users within the Identity Provider.

bool idp_wide = 2;

Parameter
Name Description
value boolean

The idpWide to set.

Returns
Type Description
Document.AclInfo.AccessRestriction.Builder

This builder for chaining.

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
Name Description
index int
value Principal
Returns
Type Description
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
Name Description
index int
builderForValue Principal.Builder
Returns
Type Description
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
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
Document.AclInfo.AccessRestriction.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final Document.AclInfo.AccessRestriction.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Document.AclInfo.AccessRestriction.Builder
Overrides