Represents a Grant.
Package
@google-cloud/privilegedaccessmanagerConstructors
(constructor)(properties)
constructor(properties?: google.cloud.privilegedaccessmanager.v1.IGrant);Constructs a new Grant.
| Parameter | |
|---|---|
| Name | Description |
properties |
IGrant
Properties to set |
Properties
additionalEmailRecipients
public additionalEmailRecipients: string[];Grant additionalEmailRecipients.
auditTrail
public auditTrail?: (google.cloud.privilegedaccessmanager.v1.Grant.IAuditTrail|null);Grant auditTrail.
createTime
public createTime?: (google.protobuf.ITimestamp|null);Grant createTime.
externallyModified
public externallyModified: boolean;Grant externallyModified.
justification
public justification?: (google.cloud.privilegedaccessmanager.v1.IJustification|null);Grant justification.
name
public name: string;Grant name.
privilegedAccess
public privilegedAccess?: (google.cloud.privilegedaccessmanager.v1.IPrivilegedAccess|null);Grant privilegedAccess.
requestedDuration
public requestedDuration?: (google.protobuf.IDuration|null);Grant requestedDuration.
requester
public requester: string;Grant requester.
state
public state: (google.cloud.privilegedaccessmanager.v1.Grant.State|keyof typeof google.cloud.privilegedaccessmanager.v1.Grant.State);Grant state.
timeline
public timeline?: (google.cloud.privilegedaccessmanager.v1.Grant.ITimeline|null);Grant timeline.
updateTime
public updateTime?: (google.protobuf.ITimestamp|null);Grant updateTime.
Methods
create(properties)
public static create(properties?: google.cloud.privilegedaccessmanager.v1.IGrant): google.cloud.privilegedaccessmanager.v1.Grant;Creates a new Grant instance using the specified properties.
| Parameter | |
|---|---|
| Name | Description |
properties |
IGrant
Properties to set |
| Returns | |
|---|---|
| Type | Description |
Grant |
Grant instance |
decode(reader, length)
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.privilegedaccessmanager.v1.Grant;Decodes a Grant message from the specified reader or buffer.
| Parameters | |
|---|---|
| Name | Description |
reader |
(Reader|Uint8Array)
Reader or buffer to decode from |
length |
number
Message length if known beforehand |
| Returns | |
|---|---|
| Type | Description |
Grant |
Grant |
decodeDelimited(reader)
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.privilegedaccessmanager.v1.Grant;Decodes a Grant message from the specified reader or buffer, length delimited.
| Parameter | |
|---|---|
| Name | Description |
reader |
(Reader|Uint8Array)
Reader or buffer to decode from |
| Returns | |
|---|---|
| Type | Description |
Grant |
Grant |
encode(message, writer)
public static encode(message: google.cloud.privilegedaccessmanager.v1.IGrant, writer?: $protobuf.Writer): $protobuf.Writer;Encodes the specified Grant message. Does not implicitly messages.
| Parameters | |
|---|---|
| Name | Description |
message |
IGrant
Grant message or plain object to encode |
writer |
$protobuf.Writer
Writer to encode to |
| Returns | |
|---|---|
| Type | Description |
$protobuf.Writer |
Writer |
encodeDelimited(message, writer)
public static encodeDelimited(message: google.cloud.privilegedaccessmanager.v1.IGrant, writer?: $protobuf.Writer): $protobuf.Writer;Encodes the specified Grant message, length delimited. Does not implicitly messages.
| Parameters | |
|---|---|
| Name | Description |
message |
IGrant
Grant message or plain object to encode |
writer |
$protobuf.Writer
Writer to encode to |
| Returns | |
|---|---|
| Type | Description |
$protobuf.Writer |
Writer |
fromObject(object)
public static fromObject(object: { [k: string]: any }): google.cloud.privilegedaccessmanager.v1.Grant;Creates a Grant message from a plain object. Also converts values to their respective internal types.
| Parameter | |
|---|---|
| Name | Description |
object |
{ [k: string]: any }
Plain object |
| Returns | |
|---|---|
| Type | Description |
Grant |
Grant |
getTypeUrl(typeUrlPrefix)
public static getTypeUrl(typeUrlPrefix?: string): string;Gets the default type url for Grant
| Parameter | |
|---|---|
| Name | Description |
typeUrlPrefix |
string
your custom typeUrlPrefix(default "type.googleapis.com") |
| Returns | |
|---|---|
| Type | Description |
string |
The default type url |
toJSON()
public toJSON(): { [k: string]: any };Converts this Grant to JSON.
| Returns | |
|---|---|
| Type | Description |
{ [k: string]: any } |
JSON object |
toObject(message, options)
public static toObject(message: google.cloud.privilegedaccessmanager.v1.Grant, options?: $protobuf.IConversionOptions): { [k: string]: any };Creates a plain object from a Grant message. Also converts values to other types if specified.
| Parameters | |
|---|---|
| Name | Description |
message |
Grant
Grant |
options |
$protobuf.IConversionOptions
Conversion options |
| Returns | |
|---|---|
| Type | Description |
{ [k: string]: any } |
Plain object |
verify(message)
public static verify(message: { [k: string]: any }): (string|null);Verifies a Grant message.
| Parameter | |
|---|---|
| Name | Description |
message |
{ [k: string]: any }
Plain object to verify |
| Returns | |
|---|---|
| Type | Description |
(string|null) |
|