Class Grant (0.7.0)

public final class Grant extends GeneratedMessageV3 implements GrantOrBuilder

This is to ensure that the Grants and ProducerGrants proto are byte compatible. A grant represents a request from a user for obtaining the access specified in an entitlement they are eligible for.

Protobuf type google.cloud.privilegedaccessmanager.v1.Grant

Implements

GrantOrBuilder

Static Fields

ADDITIONAL_EMAIL_RECIPIENTS_FIELD_NUMBER

public static final int ADDITIONAL_EMAIL_RECIPIENTS_FIELD_NUMBER
Field Value
Type Description
int

AUDIT_TRAIL_FIELD_NUMBER

public static final int AUDIT_TRAIL_FIELD_NUMBER
Field Value
Type Description
int

CREATE_TIME_FIELD_NUMBER

public static final int CREATE_TIME_FIELD_NUMBER
Field Value
Type Description
int

EXTERNALLY_MODIFIED_FIELD_NUMBER

public static final int EXTERNALLY_MODIFIED_FIELD_NUMBER
Field Value
Type Description
int

JUSTIFICATION_FIELD_NUMBER

public static final int JUSTIFICATION_FIELD_NUMBER
Field Value
Type Description
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
Type Description
int

PRIVILEGED_ACCESS_FIELD_NUMBER

public static final int PRIVILEGED_ACCESS_FIELD_NUMBER
Field Value
Type Description
int

REQUESTED_DURATION_FIELD_NUMBER

public static final int REQUESTED_DURATION_FIELD_NUMBER
Field Value
Type Description
int

REQUESTER_FIELD_NUMBER

public static final int REQUESTER_FIELD_NUMBER
Field Value
Type Description
int

STATE_FIELD_NUMBER

public static final int STATE_FIELD_NUMBER
Field Value
Type Description
int

TIMELINE_FIELD_NUMBER

public static final int TIMELINE_FIELD_NUMBER
Field Value
Type Description
int

UPDATE_TIME_FIELD_NUMBER

public static final int UPDATE_TIME_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static Grant getDefaultInstance()
Returns
Type Description
Grant

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static Grant.Builder newBuilder()
Returns
Type Description
Grant.Builder

newBuilder(Grant prototype)

public static Grant.Builder newBuilder(Grant prototype)
Parameter
Name Description
prototype Grant
Returns
Type Description
Grant.Builder

parseDelimitedFrom(InputStream input)

public static Grant parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Grant
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Grant parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Grant
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static Grant parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
Grant
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Grant parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Grant
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Grant parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
Grant
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Grant parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Grant
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Grant parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
Grant
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Grant parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Grant
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static Grant parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Grant
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Grant parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Grant
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static Grant parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
Grant
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Grant parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Grant
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<Grant> parser()
Returns
Type Description
Parser<Grant>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getAdditionalEmailRecipients(int index)

public String getAdditionalEmailRecipients(int index)

Optional. Additional email addresses to notify for all the actions performed on the grant.

repeated string additional_email_recipients = 11 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The additionalEmailRecipients at the given index.

getAdditionalEmailRecipientsBytes(int index)

public ByteString getAdditionalEmailRecipientsBytes(int index)

Optional. Additional email addresses to notify for all the actions performed on the grant.

repeated string additional_email_recipients = 11 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the additionalEmailRecipients at the given index.

getAdditionalEmailRecipientsCount()

public int getAdditionalEmailRecipientsCount()

Optional. Additional email addresses to notify for all the actions performed on the grant.

repeated string additional_email_recipients = 11 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The count of additionalEmailRecipients.

getAdditionalEmailRecipientsList()

public ProtocolStringList getAdditionalEmailRecipientsList()

Optional. Additional email addresses to notify for all the actions performed on the grant.

repeated string additional_email_recipients = 11 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ProtocolStringList

A list containing the additionalEmailRecipients.

getAuditTrail()

public Grant.AuditTrail getAuditTrail()

Output only. Audit trail of access provided by this grant. If unspecified then access was never granted.

.google.cloud.privilegedaccessmanager.v1.Grant.AuditTrail audit_trail = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Grant.AuditTrail

The auditTrail.

getAuditTrailOrBuilder()

public Grant.AuditTrailOrBuilder getAuditTrailOrBuilder()

Output only. Audit trail of access provided by this grant. If unspecified then access was never granted.

.google.cloud.privilegedaccessmanager.v1.Grant.AuditTrail audit_trail = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Grant.AuditTrailOrBuilder

getCreateTime()

public Timestamp getCreateTime()

Output only. Create time stamp.

.google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The createTime.

getCreateTimeOrBuilder()

public TimestampOrBuilder getCreateTimeOrBuilder()

Output only. Create time stamp.

.google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

getDefaultInstanceForType()

public Grant getDefaultInstanceForType()
Returns
Type Description
Grant

getExternallyModified()

public boolean getExternallyModified()

Output only. Flag set by the PAM system to indicate that policy bindings made by this grant have been modified from outside PAM.

After it is set, this flag remains set forever irrespective of the grant state. A true value here indicates that PAM no longer has any certainty on the access a user has because of this grant.

bool externally_modified = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

The externallyModified.

getJustification()

public Justification getJustification()

Optional. Justification of why this access is needed.

.google.cloud.privilegedaccessmanager.v1.Justification justification = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Justification

The justification.

getJustificationOrBuilder()

public JustificationOrBuilder getJustificationOrBuilder()

Optional. Justification of why this access is needed.

.google.cloud.privilegedaccessmanager.v1.Justification justification = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
JustificationOrBuilder

getName()

public String getName()

Identifier. Name of this grant. Possible formats:

  • organizations/{organization-number}/locations/{region}/entitlements/{entitlement-id}/grants/{grant-id}
  • folders/{folder-number}/locations/{region}/entitlements/{entitlement-id}/grants/{grant-id}
  • projects/{project-id|project-number}/locations/{region}/entitlements/{entitlement-id}/grants/{grant-id}

    The last segment of this name ({grant-id}) is autogenerated.

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Identifier. Name of this grant. Possible formats:

  • organizations/{organization-number}/locations/{region}/entitlements/{entitlement-id}/grants/{grant-id}
  • folders/{folder-number}/locations/{region}/entitlements/{entitlement-id}/grants/{grant-id}
  • projects/{project-id|project-number}/locations/{region}/entitlements/{entitlement-id}/grants/{grant-id}

    The last segment of this name ({grant-id}) is autogenerated.

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Returns
Type Description
ByteString

The bytes for name.

getParserForType()

public Parser<Grant> getParserForType()
Returns
Type Description
Parser<Grant>
Overrides

getPrivilegedAccess()

public PrivilegedAccess getPrivilegedAccess()

Output only. The access that would be granted by this grant.

.google.cloud.privilegedaccessmanager.v1.PrivilegedAccess privileged_access = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
PrivilegedAccess

The privilegedAccess.

getPrivilegedAccessOrBuilder()

public PrivilegedAccessOrBuilder getPrivilegedAccessOrBuilder()

Output only. The access that would be granted by this grant.

.google.cloud.privilegedaccessmanager.v1.PrivilegedAccess privileged_access = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
PrivilegedAccessOrBuilder

getRequestedDuration()

public Duration getRequestedDuration()

Required. The amount of time access is needed for. This value should be less than the max_request_duration value of the entitlement.

.google.protobuf.Duration requested_duration = 5 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Duration

The requestedDuration.

getRequestedDurationOrBuilder()

public DurationOrBuilder getRequestedDurationOrBuilder()

Required. The amount of time access is needed for. This value should be less than the max_request_duration value of the entitlement.

.google.protobuf.Duration requested_duration = 5 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
DurationOrBuilder

getRequester()

public String getRequester()

Output only. Username of the user who created this grant.

string requester = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The requester.

getRequesterBytes()

public ByteString getRequesterBytes()

Output only. Username of the user who created this grant.

string requester = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for requester.

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getState()

public Grant.State getState()

Output only. Current state of this grant.

.google.cloud.privilegedaccessmanager.v1.Grant.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Grant.State

The state.

getStateValue()

public int getStateValue()

Output only. Current state of this grant.

.google.cloud.privilegedaccessmanager.v1.Grant.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

The enum numeric value on the wire for state.

getTimeline()

public Grant.Timeline getTimeline()

Output only. Timeline of this grant.

.google.cloud.privilegedaccessmanager.v1.Grant.Timeline timeline = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Grant.Timeline

The timeline.

getTimelineOrBuilder()

public Grant.TimelineOrBuilder getTimelineOrBuilder()

Output only. Timeline of this grant.

.google.cloud.privilegedaccessmanager.v1.Grant.Timeline timeline = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Grant.TimelineOrBuilder

getUpdateTime()

public Timestamp getUpdateTime()

Output only. Update time stamp.

.google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The updateTime.

getUpdateTimeOrBuilder()

public TimestampOrBuilder getUpdateTimeOrBuilder()

Output only. Update time stamp.

.google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

hasAuditTrail()

public boolean hasAuditTrail()

Output only. Audit trail of access provided by this grant. If unspecified then access was never granted.

.google.cloud.privilegedaccessmanager.v1.Grant.AuditTrail audit_trail = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the auditTrail field is set.

hasCreateTime()

public boolean hasCreateTime()

Output only. Create time stamp.

.google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the createTime field is set.

hasJustification()

public boolean hasJustification()

Optional. Justification of why this access is needed.

.google.cloud.privilegedaccessmanager.v1.Justification justification = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the justification field is set.

hasPrivilegedAccess()

public boolean hasPrivilegedAccess()

Output only. The access that would be granted by this grant.

.google.cloud.privilegedaccessmanager.v1.PrivilegedAccess privileged_access = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the privilegedAccess field is set.

hasRequestedDuration()

public boolean hasRequestedDuration()

Required. The amount of time access is needed for. This value should be less than the max_request_duration value of the entitlement.

.google.protobuf.Duration requested_duration = 5 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
boolean

Whether the requestedDuration field is set.

hasTimeline()

public boolean hasTimeline()

Output only. Timeline of this grant.

.google.cloud.privilegedaccessmanager.v1.Grant.Timeline timeline = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the timeline field is set.

hasUpdateTime()

public boolean hasUpdateTime()

Output only. Update time stamp.

.google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the updateTime field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public Grant.Builder newBuilderForType()
Returns
Type Description
Grant.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Grant.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
Grant.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public Grant.Builder toBuilder()
Returns
Type Description
Grant.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException