google.iam.admin.v1.ServiceAccountKey
*/
class ServiceAccountKey extends \Google\Protobuf\Internal\Message
{
/**
* The resource name of the service account key in the following format
* `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}`.
*
* Generated from protobuf field string name = 1;
*/
private $name = '';
/**
* The output format for the private key.
* Only provided in `CreateServiceAccountKey` responses, not
* in `GetServiceAccountKey` or `ListServiceAccountKey` responses.
* Google never exposes system-managed private keys, and never retains
* user-managed private keys.
*
* Generated from protobuf field .google.iam.admin.v1.ServiceAccountPrivateKeyType private_key_type = 2;
*/
private $private_key_type = 0;
/**
* Specifies the algorithm (and possibly key size) for the key.
*
* Generated from protobuf field .google.iam.admin.v1.ServiceAccountKeyAlgorithm key_algorithm = 8;
*/
private $key_algorithm = 0;
/**
* The private key data. Only provided in `CreateServiceAccountKey`
* responses. Make sure to keep the private key data secure because it
* allows for the assertion of the service account identity.
* When base64 decoded, the private key data can be used to authenticate with
* Google API client libraries and with
* gcloud
* auth activate-service-account.
*
* Generated from protobuf field bytes private_key_data = 3;
*/
private $private_key_data = '';
/**
* The public key data. Only provided in `GetServiceAccountKey` responses.
*
* Generated from protobuf field bytes public_key_data = 7;
*/
private $public_key_data = '';
/**
* The key can be used after this timestamp.
*
* Generated from protobuf field .google.protobuf.Timestamp valid_after_time = 4;
*/
private $valid_after_time = null;
/**
* The key can be used before this timestamp.
* For system-managed key pairs, this timestamp is the end time for the
* private key signing operation. The public key could still be used
* for verification for a few hours after this time.
*
* Generated from protobuf field .google.protobuf.Timestamp valid_before_time = 5;
*/
private $valid_before_time = null;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $name
* The resource name of the service account key in the following format
* `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}`.
* @type int $private_key_type
* The output format for the private key.
* Only provided in `CreateServiceAccountKey` responses, not
* in `GetServiceAccountKey` or `ListServiceAccountKey` responses.
* Google never exposes system-managed private keys, and never retains
* user-managed private keys.
* @type int $key_algorithm
* Specifies the algorithm (and possibly key size) for the key.
* @type string $private_key_data
* The private key data. Only provided in `CreateServiceAccountKey`
* responses. Make sure to keep the private key data secure because it
* allows for the assertion of the service account identity.
* When base64 decoded, the private key data can be used to authenticate with
* Google API client libraries and with
* gcloud
* auth activate-service-account.
* @type string $public_key_data
* The public key data. Only provided in `GetServiceAccountKey` responses.
* @type \Google\Protobuf\Timestamp $valid_after_time
* The key can be used after this timestamp.
* @type \Google\Protobuf\Timestamp $valid_before_time
* The key can be used before this timestamp.
* For system-managed key pairs, this timestamp is the end time for the
* private key signing operation. The public key could still be used
* for verification for a few hours after this time.
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Google\Iam\Admin\V1\Iam::initOnce();
parent::__construct($data);
}
/**
* The resource name of the service account key in the following format
* `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}`.
*
* Generated from protobuf field string name = 1;
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* The resource name of the service account key in the following format
* `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}`.
*
* Generated from protobuf field string name = 1;
* @param string $var
* @return $this
*/
public function setName($var)
{
GPBUtil::checkString($var, True);
$this->name = $var;
return $this;
}
/**
* The output format for the private key.
* Only provided in `CreateServiceAccountKey` responses, not
* in `GetServiceAccountKey` or `ListServiceAccountKey` responses.
* Google never exposes system-managed private keys, and never retains
* user-managed private keys.
*
* Generated from protobuf field .google.iam.admin.v1.ServiceAccountPrivateKeyType private_key_type = 2;
* @return int
*/
public function getPrivateKeyType()
{
return $this->private_key_type;
}
/**
* The output format for the private key.
* Only provided in `CreateServiceAccountKey` responses, not
* in `GetServiceAccountKey` or `ListServiceAccountKey` responses.
* Google never exposes system-managed private keys, and never retains
* user-managed private keys.
*
* Generated from protobuf field .google.iam.admin.v1.ServiceAccountPrivateKeyType private_key_type = 2;
* @param int $var
* @return $this
*/
public function setPrivateKeyType($var)
{
GPBUtil::checkEnum($var, \Google\Iam\Admin\V1\ServiceAccountPrivateKeyType::class);
$this->private_key_type = $var;
return $this;
}
/**
* Specifies the algorithm (and possibly key size) for the key.
*
* Generated from protobuf field .google.iam.admin.v1.ServiceAccountKeyAlgorithm key_algorithm = 8;
* @return int
*/
public function getKeyAlgorithm()
{
return $this->key_algorithm;
}
/**
* Specifies the algorithm (and possibly key size) for the key.
*
* Generated from protobuf field .google.iam.admin.v1.ServiceAccountKeyAlgorithm key_algorithm = 8;
* @param int $var
* @return $this
*/
public function setKeyAlgorithm($var)
{
GPBUtil::checkEnum($var, \Google\Iam\Admin\V1\ServiceAccountKeyAlgorithm::class);
$this->key_algorithm = $var;
return $this;
}
/**
* The private key data. Only provided in `CreateServiceAccountKey`
* responses. Make sure to keep the private key data secure because it
* allows for the assertion of the service account identity.
* When base64 decoded, the private key data can be used to authenticate with
* Google API client libraries and with
* gcloud
* auth activate-service-account.
*
* Generated from protobuf field bytes private_key_data = 3;
* @return string
*/
public function getPrivateKeyData()
{
return $this->private_key_data;
}
/**
* The private key data. Only provided in `CreateServiceAccountKey`
* responses. Make sure to keep the private key data secure because it
* allows for the assertion of the service account identity.
* When base64 decoded, the private key data can be used to authenticate with
* Google API client libraries and with
* gcloud
* auth activate-service-account.
*
* Generated from protobuf field bytes private_key_data = 3;
* @param string $var
* @return $this
*/
public function setPrivateKeyData($var)
{
GPBUtil::checkString($var, False);
$this->private_key_data = $var;
return $this;
}
/**
* The public key data. Only provided in `GetServiceAccountKey` responses.
*
* Generated from protobuf field bytes public_key_data = 7;
* @return string
*/
public function getPublicKeyData()
{
return $this->public_key_data;
}
/**
* The public key data. Only provided in `GetServiceAccountKey` responses.
*
* Generated from protobuf field bytes public_key_data = 7;
* @param string $var
* @return $this
*/
public function setPublicKeyData($var)
{
GPBUtil::checkString($var, False);
$this->public_key_data = $var;
return $this;
}
/**
* The key can be used after this timestamp.
*
* Generated from protobuf field .google.protobuf.Timestamp valid_after_time = 4;
* @return \Google\Protobuf\Timestamp
*/
public function getValidAfterTime()
{
return $this->valid_after_time;
}
/**
* The key can be used after this timestamp.
*
* Generated from protobuf field .google.protobuf.Timestamp valid_after_time = 4;
* @param \Google\Protobuf\Timestamp $var
* @return $this
*/
public function setValidAfterTime($var)
{
GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
$this->valid_after_time = $var;
return $this;
}
/**
* The key can be used before this timestamp.
* For system-managed key pairs, this timestamp is the end time for the
* private key signing operation. The public key could still be used
* for verification for a few hours after this time.
*
* Generated from protobuf field .google.protobuf.Timestamp valid_before_time = 5;
* @return \Google\Protobuf\Timestamp
*/
public function getValidBeforeTime()
{
return $this->valid_before_time;
}
/**
* The key can be used before this timestamp.
* For system-managed key pairs, this timestamp is the end time for the
* private key signing operation. The public key could still be used
* for verification for a few hours after this time.
*
* Generated from protobuf field .google.protobuf.Timestamp valid_before_time = 5;
* @param \Google\Protobuf\Timestamp $var
* @return $this
*/
public function setValidBeforeTime($var)
{
GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
$this->valid_before_time = $var;
return $this;
}
}