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

namespace Google\Cloud\Security\PublicCA\V1beta1;

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

/**
 * A representation of an ExternalAccountKey used for [external account
 * binding](https://tools.ietf.org/html/rfc8555#section-7.3.4) within ACME.
 *
 * Generated from protobuf message <code>google.cloud.security.publicca.v1beta1.ExternalAccountKey</code>
 */
class ExternalAccountKey extends \Google\Protobuf\Internal\Message
{
    /**
     * Output only. Resource name.
     * projects/{project}/locations/{location}/externalAccountKeys/{key_id}
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $name = '';
    /**
     * Output only. Key ID.
     * It is generated by the PublicCertificateAuthorityService
     * when the ExternalAccountKey is created
     *
     * Generated from protobuf field <code>string key_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $key_id = '';
    /**
     * Output only. Base64-URL-encoded HS256 key.
     * It is generated by the PublicCertificateAuthorityService
     * when the ExternalAccountKey is created
     *
     * Generated from protobuf field <code>bytes b64_mac_key = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $b64_mac_key = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Output only. Resource name.
     *           projects/{project}/locations/{location}/externalAccountKeys/{key_id}
     *     @type string $key_id
     *           Output only. Key ID.
     *           It is generated by the PublicCertificateAuthorityService
     *           when the ExternalAccountKey is created
     *     @type string $b64_mac_key
     *           Output only. Base64-URL-encoded HS256 key.
     *           It is generated by the PublicCertificateAuthorityService
     *           when the ExternalAccountKey is created
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Security\Publicca\V1Beta1\Resources::initOnce();
        parent::__construct($data);
    }

    /**
     * Output only. Resource name.
     * projects/{project}/locations/{location}/externalAccountKeys/{key_id}
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Output only. Resource name.
     * projects/{project}/locations/{location}/externalAccountKeys/{key_id}
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * Output only. Key ID.
     * It is generated by the PublicCertificateAuthorityService
     * when the ExternalAccountKey is created
     *
     * Generated from protobuf field <code>string key_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getKeyId()
    {
        return $this->key_id;
    }

    /**
     * Output only. Key ID.
     * It is generated by the PublicCertificateAuthorityService
     * when the ExternalAccountKey is created
     *
     * Generated from protobuf field <code>string key_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setKeyId($var)
    {
        GPBUtil::checkString($var, True);
        $this->key_id = $var;

        return $this;
    }

    /**
     * Output only. Base64-URL-encoded HS256 key.
     * It is generated by the PublicCertificateAuthorityService
     * when the ExternalAccountKey is created
     *
     * Generated from protobuf field <code>bytes b64_mac_key = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getB64MacKey()
    {
        return $this->b64_mac_key;
    }

    /**
     * Output only. Base64-URL-encoded HS256 key.
     * It is generated by the PublicCertificateAuthorityService
     * when the ExternalAccountKey is created
     *
     * Generated from protobuf field <code>bytes b64_mac_key = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setB64MacKey($var)
    {
        GPBUtil::checkString($var, False);
        $this->b64_mac_key = $var;

        return $this;
    }

}

