Skip to main content

Class: ApiKeySpec

identity.v1.ApiKeySpec

Represents an ApiKeySpec.

Implements

Constructors

constructor

new ApiKeySpec(properties?): ApiKeySpec

Constructs a new ApiKeySpec.

Parameters

NameTypeDescription
properties?IApiKeySpecProperties to set

Returns

ApiKeySpec

Properties

description

description: string

The description of the API key.

Implementation of

IApiKeySpec.description


disabled

disabled: boolean

True if the API key is disabled.

Implementation of

IApiKeySpec.disabled


displayName

displayName: string

The display name of the API key.

Implementation of

IApiKeySpec.displayName


expiryTime

Optional expiryTime: null | ITimestamp

The expiry time of the API key.

Implementation of

IApiKeySpec.expiryTime


ownerId

ownerId: string

The id of the owner to create the API key for. The owner id is immutable. Once set during creation, it cannot be changed. The owner id is the id of the user when the owner type is 'user'. The owner id is the id of the service account when the owner type is 'service-account'.

Implementation of

IApiKeySpec.ownerId


ownerType

ownerType: string

The type of the owner to create the API key for. The owner type is immutable. Once set during creation, it cannot be changed. Possible values: user, service-account.

Implementation of

IApiKeySpec.ownerType

Methods

toJSON

toJSON(): Object

Converts this ApiKeySpec to JSON.

Returns

Object

JSON object


create

create(properties?): ApiKeySpec

Creates a new ApiKeySpec instance using the specified properties.

Parameters

NameTypeDescription
properties?IApiKeySpecProperties to set

Returns

ApiKeySpec

ApiKeySpec instance


decode

decode(reader, length?): ApiKeySpec

Decodes an ApiKeySpec message from the specified reader or buffer.

Parameters

NameTypeDescription
readerUint8Array | ReaderReader or buffer to decode from
length?numberMessage length if known beforehand

Returns

ApiKeySpec

ApiKeySpec

Throws

If the payload is not a reader or valid buffer

Throws

If required fields are missing


decodeDelimited

decodeDelimited(reader): ApiKeySpec

Decodes an ApiKeySpec message from the specified reader or buffer, length delimited.

Parameters

NameTypeDescription
readerUint8Array | ReaderReader or buffer to decode from

Returns

ApiKeySpec

ApiKeySpec

Throws

If the payload is not a reader or valid buffer

Throws

If required fields are missing


encode

encode(message, writer?): Writer

Encodes the specified ApiKeySpec message. Does not implicitly temporal.api.cloud.identity.v1.ApiKeySpec.verify|verify messages.

Parameters

NameTypeDescription
messageIApiKeySpecApiKeySpec message or plain object to encode
writer?WriterWriter to encode to

Returns

Writer

Writer


encodeDelimited

encodeDelimited(message, writer?): Writer

Encodes the specified ApiKeySpec message, length delimited. Does not implicitly temporal.api.cloud.identity.v1.ApiKeySpec.verify|verify messages.

Parameters

NameTypeDescription
messageIApiKeySpecApiKeySpec message or plain object to encode
writer?WriterWriter to encode to

Returns

Writer

Writer


fromObject

fromObject(object): ApiKeySpec

Creates an ApiKeySpec message from a plain object. Also converts values to their respective internal types.

Parameters

NameTypeDescription
objectObjectPlain object

Returns

ApiKeySpec

ApiKeySpec


getTypeUrl

getTypeUrl(typeUrlPrefix?): string

Gets the default type url for ApiKeySpec

Parameters

NameTypeDescription
typeUrlPrefix?stringyour custom typeUrlPrefix(default "type.googleapis.com")

Returns

string

The default type url


toObject

toObject(message, options?): Object

Creates a plain object from an ApiKeySpec message. Also converts values to other types if specified.

Parameters

NameTypeDescription
messageApiKeySpecApiKeySpec
options?IConversionOptionsConversion options

Returns

Object

Plain object