Class AccessPolicy (1.29.0)

public final class AccessPolicy extends GeneratedMessageV3 implements AccessPolicyOrBuilder

AccessPolicy is a container for AccessLevels (which define the necessary attributes to use Google Cloud services) and ServicePerimeters (which define regions of services able to freely pass data within a perimeter). An access policy is globally visible within an organization, and the restrictions it specifies apply to all projects within an organization.

Protobuf type google.identity.accesscontextmanager.v1.AccessPolicy

Static Fields

CREATE_TIME_FIELD_NUMBER

public static final int CREATE_TIME_FIELD_NUMBER
Field Value
TypeDescription
int

ETAG_FIELD_NUMBER

public static final int ETAG_FIELD_NUMBER
Field Value
TypeDescription
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
TypeDescription
int

PARENT_FIELD_NUMBER

public static final int PARENT_FIELD_NUMBER
Field Value
TypeDescription
int

SCOPES_FIELD_NUMBER

public static final int SCOPES_FIELD_NUMBER
Field Value
TypeDescription
int

TITLE_FIELD_NUMBER

public static final int TITLE_FIELD_NUMBER
Field Value
TypeDescription
int

UPDATE_TIME_FIELD_NUMBER

public static final int UPDATE_TIME_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static AccessPolicy getDefaultInstance()
Returns
TypeDescription
AccessPolicy

getDescriptor()

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

newBuilder()

public static AccessPolicy.Builder newBuilder()
Returns
TypeDescription
AccessPolicy.Builder

newBuilder(AccessPolicy prototype)

public static AccessPolicy.Builder newBuilder(AccessPolicy prototype)
Parameter
NameDescription
prototypeAccessPolicy
Returns
TypeDescription
AccessPolicy.Builder

parseDelimitedFrom(InputStream input)

public static AccessPolicy parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
AccessPolicy
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static AccessPolicy parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
AccessPolicy
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static AccessPolicy parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
AccessPolicy
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static AccessPolicy parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
AccessPolicy
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static AccessPolicy parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
AccessPolicy
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static AccessPolicy parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
AccessPolicy
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static AccessPolicy parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
AccessPolicy
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static AccessPolicy parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
AccessPolicy
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static AccessPolicy parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
AccessPolicy
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static AccessPolicy parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
AccessPolicy
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static AccessPolicy parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
AccessPolicy
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static AccessPolicy parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
AccessPolicy
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<AccessPolicy> parser()
Returns
TypeDescription
Parser<AccessPolicy>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getCreateTime()

public Timestamp getCreateTime()

Output only. Time the AccessPolicy was created in UTC.

.google.protobuf.Timestamp create_time = 4;

Returns
TypeDescription
Timestamp

The createTime.

getCreateTimeOrBuilder()

public TimestampOrBuilder getCreateTimeOrBuilder()

Output only. Time the AccessPolicy was created in UTC.

.google.protobuf.Timestamp create_time = 4;

Returns
TypeDescription
TimestampOrBuilder

getDefaultInstanceForType()

public AccessPolicy getDefaultInstanceForType()
Returns
TypeDescription
AccessPolicy

getEtag()

public String getEtag()

Output only. An opaque identifier for the current version of the AccessPolicy. This will always be a strongly validated etag, meaning that two Access Polices will be identical if and only if their etags are identical. Clients should not expect this to be in any specific format.

string etag = 6;

Returns
TypeDescription
String

The etag.

getEtagBytes()

public ByteString getEtagBytes()

Output only. An opaque identifier for the current version of the AccessPolicy. This will always be a strongly validated etag, meaning that two Access Polices will be identical if and only if their etags are identical. Clients should not expect this to be in any specific format.

string etag = 6;

Returns
TypeDescription
ByteString

The bytes for etag.

getName()

public String getName()

Output only. Resource name of the AccessPolicy. Format: accessPolicies/{access_policy}

string name = 1;

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

Output only. Resource name of the AccessPolicy. Format: accessPolicies/{access_policy}

string name = 1;

Returns
TypeDescription
ByteString

The bytes for name.

getParent()

public String getParent()

Required. The parent of this AccessPolicy in the Cloud Resource Hierarchy. Currently immutable once created. Format: organizations/{organization_id}

string parent = 2;

Returns
TypeDescription
String

The parent.

getParentBytes()

public ByteString getParentBytes()

Required. The parent of this AccessPolicy in the Cloud Resource Hierarchy. Currently immutable once created. Format: organizations/{organization_id}

string parent = 2;

Returns
TypeDescription
ByteString

The bytes for parent.

getParserForType()

public Parser<AccessPolicy> getParserForType()
Returns
TypeDescription
Parser<AccessPolicy>
Overrides

getScopes(int index)

public String getScopes(int index)

The scopes of a policy define which resources an ACM policy can restrict, and where ACM resources can be referenced. For example, a policy with scopes=["folders/123"] has the following behavior:

  • vpcsc perimeters can only restrict projects within folders/123
  • access levels can only be referenced by resources within folders/123. If empty, there are no limitations on which resources can be restricted by an ACM policy, and there are no limitations on where ACM resources can be referenced. Only one policy can include a given scope (attempting to create a second policy which includes "folders/123" will result in an error). Currently, scopes cannot be modified after a policy is created. Currently, policies can only have a single scope. Format: list of folders/{folder_number} or projects/{project_number}

repeated string scopes = 7;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The scopes at the given index.

getScopesBytes(int index)

public ByteString getScopesBytes(int index)

The scopes of a policy define which resources an ACM policy can restrict, and where ACM resources can be referenced. For example, a policy with scopes=["folders/123"] has the following behavior:

  • vpcsc perimeters can only restrict projects within folders/123
  • access levels can only be referenced by resources within folders/123. If empty, there are no limitations on which resources can be restricted by an ACM policy, and there are no limitations on where ACM resources can be referenced. Only one policy can include a given scope (attempting to create a second policy which includes "folders/123" will result in an error). Currently, scopes cannot be modified after a policy is created. Currently, policies can only have a single scope. Format: list of folders/{folder_number} or projects/{project_number}

repeated string scopes = 7;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the scopes at the given index.

getScopesCount()

public int getScopesCount()

The scopes of a policy define which resources an ACM policy can restrict, and where ACM resources can be referenced. For example, a policy with scopes=["folders/123"] has the following behavior:

  • vpcsc perimeters can only restrict projects within folders/123
  • access levels can only be referenced by resources within folders/123. If empty, there are no limitations on which resources can be restricted by an ACM policy, and there are no limitations on where ACM resources can be referenced. Only one policy can include a given scope (attempting to create a second policy which includes "folders/123" will result in an error). Currently, scopes cannot be modified after a policy is created. Currently, policies can only have a single scope. Format: list of folders/{folder_number} or projects/{project_number}

repeated string scopes = 7;

Returns
TypeDescription
int

The count of scopes.

getScopesList()

public ProtocolStringList getScopesList()

The scopes of a policy define which resources an ACM policy can restrict, and where ACM resources can be referenced. For example, a policy with scopes=["folders/123"] has the following behavior:

  • vpcsc perimeters can only restrict projects within folders/123
  • access levels can only be referenced by resources within folders/123. If empty, there are no limitations on which resources can be restricted by an ACM policy, and there are no limitations on where ACM resources can be referenced. Only one policy can include a given scope (attempting to create a second policy which includes "folders/123" will result in an error). Currently, scopes cannot be modified after a policy is created. Currently, policies can only have a single scope. Format: list of folders/{folder_number} or projects/{project_number}

repeated string scopes = 7;

Returns
TypeDescription
ProtocolStringList

A list containing the scopes.

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getTitle()

public String getTitle()

Required. Human readable title. Does not affect behavior.

string title = 3;

Returns
TypeDescription
String

The title.

getTitleBytes()

public ByteString getTitleBytes()

Required. Human readable title. Does not affect behavior.

string title = 3;

Returns
TypeDescription
ByteString

The bytes for title.

getUpdateTime()

public Timestamp getUpdateTime()

Output only. Time the AccessPolicy was updated in UTC.

.google.protobuf.Timestamp update_time = 5;

Returns
TypeDescription
Timestamp

The updateTime.

getUpdateTimeOrBuilder()

public TimestampOrBuilder getUpdateTimeOrBuilder()

Output only. Time the AccessPolicy was updated in UTC.

.google.protobuf.Timestamp update_time = 5;

Returns
TypeDescription
TimestampOrBuilder

hasCreateTime()

public boolean hasCreateTime()

Output only. Time the AccessPolicy was created in UTC.

.google.protobuf.Timestamp create_time = 4;

Returns
TypeDescription
boolean

Whether the createTime field is set.

hasUpdateTime()

public boolean hasUpdateTime()

Output only. Time the AccessPolicy was updated in UTC.

.google.protobuf.Timestamp update_time = 5;

Returns
TypeDescription
boolean

Whether the updateTime field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public AccessPolicy.Builder newBuilderForType()
Returns
TypeDescription
AccessPolicy.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected AccessPolicy.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
AccessPolicy.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public AccessPolicy.Builder toBuilder()
Returns
TypeDescription
AccessPolicy.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException