Google Cloud OsLogin V1 Client - Class ImportSshPublicKeyRequest (1.6.0)

Reference documentation and code samples for the Google Cloud OsLogin V1 Client class ImportSshPublicKeyRequest.

A request message for importing an SSH public key.

Generated from protobuf message google.cloud.oslogin.v1.ImportSshPublicKeyRequest

Namespace

Google \ Cloud \ OsLogin \ V1

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ parent string

Required. The unique ID for the user in format users/{user}.

↳ ssh_public_key Google\Cloud\OsLogin\Common\SshPublicKey

Optional. The SSH public key and expiration time.

↳ project_id string

The project ID of the Google Cloud Platform project.

getParent

Required. The unique ID for the user in format users/{user}.

Returns
TypeDescription
string

setParent

Required. The unique ID for the user in format users/{user}.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getSshPublicKey

Optional. The SSH public key and expiration time.

Returns
TypeDescription
Google\Cloud\OsLogin\Common\SshPublicKey|null

hasSshPublicKey

clearSshPublicKey

setSshPublicKey

Optional. The SSH public key and expiration time.

Parameter
NameDescription
var Google\Cloud\OsLogin\Common\SshPublicKey
Returns
TypeDescription
$this

getProjectId

The project ID of the Google Cloud Platform project.

Returns
TypeDescription
string

setProjectId

The project ID of the Google Cloud Platform project.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

static::build

Parameters
NameDescription
parent string

Required. The unique ID for the user in format users/{user}. Please see Google\Cloud\OsLogin\V1\OsLoginServiceClient::userName() for help formatting this field.

sshPublicKey Google\Cloud\OsLogin\Common\SshPublicKey

Optional. The SSH public key and expiration time.

Returns
TypeDescription
Google\Cloud\OsLogin\V1\ImportSshPublicKeyRequest

static::buildFromParentSshPublicKeyProjectId

Parameters
NameDescription
parent string

Required. The unique ID for the user in format users/{user}. Please see Google\Cloud\OsLogin\V1\OsLoginServiceClient::userName() for help formatting this field.

sshPublicKey Google\Cloud\OsLogin\Common\SshPublicKey

Optional. The SSH public key and expiration time.

projectId string

The project ID of the Google Cloud Platform project.

Returns
TypeDescription
Google\Cloud\OsLogin\V1\ImportSshPublicKeyRequest