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

namespace Google\Cloud\ApigeeRegistry\V1\Instance;

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

/**
 * Available configurations to provision an Instance.
 *
 * Generated from protobuf message <code>google.cloud.apigeeregistry.v1.Instance.Config</code>
 */
class Config extends \Google\Protobuf\Internal\Message
{
    /**
     * Output only. The GCP location where the Instance resides.
     *
     * Generated from protobuf field <code>string location = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $location = '';
    /**
     * Required. The Customer Managed Encryption Key (CMEK) used for data encryption.
     * The CMEK name should follow the format of
     * `projects/([^/]+)/locations/([^/]+)/keyRings/([^/]+)/cryptoKeys/([^/]+)`,
     * where the `location` must match InstanceConfig.location.
     *
     * Generated from protobuf field <code>string cmek_key_name = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $cmek_key_name = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $location
     *           Output only. The GCP location where the Instance resides.
     *     @type string $cmek_key_name
     *           Required. The Customer Managed Encryption Key (CMEK) used for data encryption.
     *           The CMEK name should follow the format of
     *           `projects/([^/]+)/locations/([^/]+)/keyRings/([^/]+)/cryptoKeys/([^/]+)`,
     *           where the `location` must match InstanceConfig.location.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Apigeeregistry\V1\ProvisioningService::initOnce();
        parent::__construct($data);
    }

    /**
     * Output only. The GCP location where the Instance resides.
     *
     * Generated from protobuf field <code>string location = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getLocation()
    {
        return $this->location;
    }

    /**
     * Output only. The GCP location where the Instance resides.
     *
     * Generated from protobuf field <code>string location = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setLocation($var)
    {
        GPBUtil::checkString($var, True);
        $this->location = $var;

        return $this;
    }

    /**
     * Required. The Customer Managed Encryption Key (CMEK) used for data encryption.
     * The CMEK name should follow the format of
     * `projects/([^/]+)/locations/([^/]+)/keyRings/([^/]+)/cryptoKeys/([^/]+)`,
     * where the `location` must match InstanceConfig.location.
     *
     * Generated from protobuf field <code>string cmek_key_name = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getCmekKeyName()
    {
        return $this->cmek_key_name;
    }

    /**
     * Required. The Customer Managed Encryption Key (CMEK) used for data encryption.
     * The CMEK name should follow the format of
     * `projects/([^/]+)/locations/([^/]+)/keyRings/([^/]+)/cryptoKeys/([^/]+)`,
     * where the `location` must match InstanceConfig.location.
     *
     * Generated from protobuf field <code>string cmek_key_name = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setCmekKeyName($var)
    {
        GPBUtil::checkString($var, True);
        $this->cmek_key_name = $var;

        return $this;
    }

}


