<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/security/publicca/v1beta1/service.proto

namespace Google\Cloud\Security\PublicCA\V1beta1;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * Creates a new [ExternalAccountKey][google.cloud.security.publicca.v1beta1.ExternalAccountKey] in a given project.
 *
 * Generated from protobuf message <code>google.cloud.security.publicca.v1beta1.CreateExternalAccountKeyRequest</code>
 */
class CreateExternalAccountKeyRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The parent resource where this external_account_key will be created.
     * Format: projects/[project_id]/locations/[location].
     * At present only the "global" location is supported.
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    private $parent = '';
    /**
     * Required. The external account key to create. This field only exists to future-proof
     * the API. At present, all fields in ExternalAccountKey are output only and
     * all values are ignored. For the purpose of the
     * CreateExternalAccountKeyRequest, set it to a default/empty value.
     *
     * Generated from protobuf field <code>.google.cloud.security.publicca.v1beta1.ExternalAccountKey external_account_key = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $external_account_key = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $parent
     *           Required. The parent resource where this external_account_key will be created.
     *           Format: projects/[project_id]/locations/[location].
     *           At present only the "global" location is supported.
     *     @type \Google\Cloud\Security\PublicCA\V1beta1\ExternalAccountKey $external_account_key
     *           Required. The external account key to create. This field only exists to future-proof
     *           the API. At present, all fields in ExternalAccountKey are output only and
     *           all values are ignored. For the purpose of the
     *           CreateExternalAccountKeyRequest, set it to a default/empty value.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Security\Publicca\V1Beta1\Service::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The parent resource where this external_account_key will be created.
     * Format: projects/[project_id]/locations/[location].
     * At present only the "global" location is supported.
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getParent()
    {
        return $this->parent;
    }

    /**
     * Required. The parent resource where this external_account_key will be created.
     * Format: projects/[project_id]/locations/[location].
     * At present only the "global" location is supported.
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setParent($var)
    {
        GPBUtil::checkString($var, True);
        $this->parent = $var;

        return $this;
    }

    /**
     * Required. The external account key to create. This field only exists to future-proof
     * the API. At present, all fields in ExternalAccountKey are output only and
     * all values are ignored. For the purpose of the
     * CreateExternalAccountKeyRequest, set it to a default/empty value.
     *
     * Generated from protobuf field <code>.google.cloud.security.publicca.v1beta1.ExternalAccountKey external_account_key = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Cloud\Security\PublicCA\V1beta1\ExternalAccountKey|null
     */
    public function getExternalAccountKey()
    {
        return $this->external_account_key;
    }

    public function hasExternalAccountKey()
    {
        return isset($this->external_account_key);
    }

    public function clearExternalAccountKey()
    {
        unset($this->external_account_key);
    }

    /**
     * Required. The external account key to create. This field only exists to future-proof
     * the API. At present, all fields in ExternalAccountKey are output only and
     * all values are ignored. For the purpose of the
     * CreateExternalAccountKeyRequest, set it to a default/empty value.
     *
     * Generated from protobuf field <code>.google.cloud.security.publicca.v1beta1.ExternalAccountKey external_account_key = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Cloud\Security\PublicCA\V1beta1\ExternalAccountKey $var
     * @return $this
     */
    public function setExternalAccountKey($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Security\PublicCA\V1beta1\ExternalAccountKey::class);
        $this->external_account_key = $var;

        return $this;
    }

}

