<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/compute/v1/compute.proto

namespace Google\Cloud\Compute\V1;

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

/**
 * Messages
 * Contains the configurations necessary to generate a signature for access to
 * private storage buckets that support Signature Version 4 for authentication.
 * The service name for generating the authentication header will always default
 * to 's3'.
 *
 * Generated from protobuf message <code>google.cloud.compute.v1.AWSV4Signature</code>
 */
class AWSV4Signature extends \Google\Protobuf\Internal\Message
{
    /**
     * The access key used for s3 bucket authentication. Required for updating or
     * creating a backend that uses AWS v4 signature authentication, but will not
     * be returned as part of the configuration when queried with a REST API GET
     * request.
     * \@InputOnly
     *
     * Generated from protobuf field <code>optional string access_key = 468922628;</code>
     */
    protected $access_key = null;
    /**
     * The identifier of an access key used for s3 bucket authentication.
     *
     * Generated from protobuf field <code>optional string access_key_id = 292975158;</code>
     */
    protected $access_key_id = null;
    /**
     * The optional version identifier for the access key. You can use this to
     * keep track of different iterations of your access key.
     *
     * Generated from protobuf field <code>optional string access_key_version = 80261277;</code>
     */
    protected $access_key_version = null;
    /**
     * The name of the cloud region of your origin. This is a free-form field with
     * the name of the region your cloud uses to host your origin.  For example,
     * "us-east-1" for AWS or "us-ashburn-1" for OCI.
     *
     * Generated from protobuf field <code>optional string origin_region = 265305645;</code>
     */
    protected $origin_region = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $access_key
     *           The access key used for s3 bucket authentication. Required for updating or
     *           creating a backend that uses AWS v4 signature authentication, but will not
     *           be returned as part of the configuration when queried with a REST API GET
     *           request.
     *           \@InputOnly
     *     @type string $access_key_id
     *           The identifier of an access key used for s3 bucket authentication.
     *     @type string $access_key_version
     *           The optional version identifier for the access key. You can use this to
     *           keep track of different iterations of your access key.
     *     @type string $origin_region
     *           The name of the cloud region of your origin. This is a free-form field with
     *           the name of the region your cloud uses to host your origin.  For example,
     *           "us-east-1" for AWS or "us-ashburn-1" for OCI.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce();
        parent::__construct($data);
    }

    /**
     * The access key used for s3 bucket authentication. Required for updating or
     * creating a backend that uses AWS v4 signature authentication, but will not
     * be returned as part of the configuration when queried with a REST API GET
     * request.
     * \@InputOnly
     *
     * Generated from protobuf field <code>optional string access_key = 468922628;</code>
     * @return string
     */
    public function getAccessKey()
    {
        return isset($this->access_key) ? $this->access_key : '';
    }

    public function hasAccessKey()
    {
        return isset($this->access_key);
    }

    public function clearAccessKey()
    {
        unset($this->access_key);
    }

    /**
     * The access key used for s3 bucket authentication. Required for updating or
     * creating a backend that uses AWS v4 signature authentication, but will not
     * be returned as part of the configuration when queried with a REST API GET
     * request.
     * \@InputOnly
     *
     * Generated from protobuf field <code>optional string access_key = 468922628;</code>
     * @param string $var
     * @return $this
     */
    public function setAccessKey($var)
    {
        GPBUtil::checkString($var, True);
        $this->access_key = $var;

        return $this;
    }

    /**
     * The identifier of an access key used for s3 bucket authentication.
     *
     * Generated from protobuf field <code>optional string access_key_id = 292975158;</code>
     * @return string
     */
    public function getAccessKeyId()
    {
        return isset($this->access_key_id) ? $this->access_key_id : '';
    }

    public function hasAccessKeyId()
    {
        return isset($this->access_key_id);
    }

    public function clearAccessKeyId()
    {
        unset($this->access_key_id);
    }

    /**
     * The identifier of an access key used for s3 bucket authentication.
     *
     * Generated from protobuf field <code>optional string access_key_id = 292975158;</code>
     * @param string $var
     * @return $this
     */
    public function setAccessKeyId($var)
    {
        GPBUtil::checkString($var, True);
        $this->access_key_id = $var;

        return $this;
    }

    /**
     * The optional version identifier for the access key. You can use this to
     * keep track of different iterations of your access key.
     *
     * Generated from protobuf field <code>optional string access_key_version = 80261277;</code>
     * @return string
     */
    public function getAccessKeyVersion()
    {
        return isset($this->access_key_version) ? $this->access_key_version : '';
    }

    public function hasAccessKeyVersion()
    {
        return isset($this->access_key_version);
    }

    public function clearAccessKeyVersion()
    {
        unset($this->access_key_version);
    }

    /**
     * The optional version identifier for the access key. You can use this to
     * keep track of different iterations of your access key.
     *
     * Generated from protobuf field <code>optional string access_key_version = 80261277;</code>
     * @param string $var
     * @return $this
     */
    public function setAccessKeyVersion($var)
    {
        GPBUtil::checkString($var, True);
        $this->access_key_version = $var;

        return $this;
    }

    /**
     * The name of the cloud region of your origin. This is a free-form field with
     * the name of the region your cloud uses to host your origin.  For example,
     * "us-east-1" for AWS or "us-ashburn-1" for OCI.
     *
     * Generated from protobuf field <code>optional string origin_region = 265305645;</code>
     * @return string
     */
    public function getOriginRegion()
    {
        return isset($this->origin_region) ? $this->origin_region : '';
    }

    public function hasOriginRegion()
    {
        return isset($this->origin_region);
    }

    public function clearOriginRegion()
    {
        unset($this->origin_region);
    }

    /**
     * The name of the cloud region of your origin. This is a free-form field with
     * the name of the region your cloud uses to host your origin.  For example,
     * "us-east-1" for AWS or "us-ashburn-1" for OCI.
     *
     * Generated from protobuf field <code>optional string origin_region = 265305645;</code>
     * @param string $var
     * @return $this
     */
    public function setOriginRegion($var)
    {
        GPBUtil::checkString($var, True);
        $this->origin_region = $var;

        return $this;
    }

}

