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

namespace Google\Cloud\AIPlatform\V1;

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

/**
 * Reference to a secret stored in the Cloud Secret Manager that will
 * provide the value for this environment variable.
 *
 * Generated from protobuf message <code>google.cloud.aiplatform.v1.SecretRef</code>
 */
class SecretRef extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The name of the secret in Cloud Secret Manager.
     * Format: {secret_name}.
     *
     * Generated from protobuf field <code>string secret = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $secret = '';
    /**
     * The Cloud Secret Manager secret version.
     * Can be 'latest' for the latest version, an integer for a specific
     * version, or a version alias.
     *
     * Generated from protobuf field <code>string version = 2;</code>
     */
    protected $version = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $secret
     *           Required. The name of the secret in Cloud Secret Manager.
     *           Format: {secret_name}.
     *     @type string $version
     *           The Cloud Secret Manager secret version.
     *           Can be 'latest' for the latest version, an integer for a specific
     *           version, or a version alias.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Aiplatform\V1\EnvVar::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The name of the secret in Cloud Secret Manager.
     * Format: {secret_name}.
     *
     * Generated from protobuf field <code>string secret = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getSecret()
    {
        return $this->secret;
    }

    /**
     * Required. The name of the secret in Cloud Secret Manager.
     * Format: {secret_name}.
     *
     * Generated from protobuf field <code>string secret = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setSecret($var)
    {
        GPBUtil::checkString($var, True);
        $this->secret = $var;

        return $this;
    }

    /**
     * The Cloud Secret Manager secret version.
     * Can be 'latest' for the latest version, an integer for a specific
     * version, or a version alias.
     *
     * Generated from protobuf field <code>string version = 2;</code>
     * @return string
     */
    public function getVersion()
    {
        return $this->version;
    }

    /**
     * The Cloud Secret Manager secret version.
     * Can be 'latest' for the latest version, an integer for a specific
     * version, or a version alias.
     *
     * Generated from protobuf field <code>string version = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setVersion($var)
    {
        GPBUtil::checkString($var, True);
        $this->version = $var;

        return $this;
    }

}

