<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/run/v2/k8s.min.proto

namespace Google\Cloud\Run\V2;

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

/**
 * VersionToPath maps a specific version of a secret to a relative file to mount
 * to, relative to VolumeMount's mount_path.
 *
 * Generated from protobuf message <code>google.cloud.run.v2.VersionToPath</code>
 */
class VersionToPath extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The relative path of the secret in the container.
     *
     * Generated from protobuf field <code>string path = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $path = '';
    /**
     * The Cloud Secret Manager secret version.
     * Can be 'latest' for the latest value, or an integer or a secret alias for a
     * specific version.
     *
     * Generated from protobuf field <code>string version = 2;</code>
     */
    private $version = '';
    /**
     * Integer octal mode bits to use on this file, must be a value between
     * 01 and 0777 (octal). If 0 or not set, the Volume's default mode will be
     * used.
     * Notes
     * * Internally, a umask of 0222 will be applied to any non-zero value.
     * * This is an integer representation of the mode bits. So, the octal
     * integer value should look exactly as the chmod numeric notation with a
     * leading zero. Some examples: for chmod 777 (a=rwx), set to 0777 (octal) or
     * 511 (base-10). For chmod 640 (u=rw,g=r), set to 0640 (octal) or
     * 416 (base-10). For chmod 755 (u=rwx,g=rx,o=rx), set to 0755 (octal) or 493
     * (base-10).
     * * This might be in conflict with other options that affect the
     * file mode, like fsGroup, and the result can be other mode bits set.
     *
     * Generated from protobuf field <code>int32 mode = 3;</code>
     */
    private $mode = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $path
     *           Required. The relative path of the secret in the container.
     *     @type string $version
     *           The Cloud Secret Manager secret version.
     *           Can be 'latest' for the latest value, or an integer or a secret alias for a
     *           specific version.
     *     @type int $mode
     *           Integer octal mode bits to use on this file, must be a value between
     *           01 and 0777 (octal). If 0 or not set, the Volume's default mode will be
     *           used.
     *           Notes
     *           * Internally, a umask of 0222 will be applied to any non-zero value.
     *           * This is an integer representation of the mode bits. So, the octal
     *           integer value should look exactly as the chmod numeric notation with a
     *           leading zero. Some examples: for chmod 777 (a=rwx), set to 0777 (octal) or
     *           511 (base-10). For chmod 640 (u=rw,g=r), set to 0640 (octal) or
     *           416 (base-10). For chmod 755 (u=rwx,g=rx,o=rx), set to 0755 (octal) or 493
     *           (base-10).
     *           * This might be in conflict with other options that affect the
     *           file mode, like fsGroup, and the result can be other mode bits set.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Run\V2\K8SMin::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The relative path of the secret in the container.
     *
     * Generated from protobuf field <code>string path = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getPath()
    {
        return $this->path;
    }

    /**
     * Required. The relative path of the secret in the container.
     *
     * Generated from protobuf field <code>string path = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setPath($var)
    {
        GPBUtil::checkString($var, True);
        $this->path = $var;

        return $this;
    }

    /**
     * The Cloud Secret Manager secret version.
     * Can be 'latest' for the latest value, or an integer or a secret alias for a
     * specific version.
     *
     * 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 value, or an integer or a secret alias for a
     * specific version.
     *
     * 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;
    }

    /**
     * Integer octal mode bits to use on this file, must be a value between
     * 01 and 0777 (octal). If 0 or not set, the Volume's default mode will be
     * used.
     * Notes
     * * Internally, a umask of 0222 will be applied to any non-zero value.
     * * This is an integer representation of the mode bits. So, the octal
     * integer value should look exactly as the chmod numeric notation with a
     * leading zero. Some examples: for chmod 777 (a=rwx), set to 0777 (octal) or
     * 511 (base-10). For chmod 640 (u=rw,g=r), set to 0640 (octal) or
     * 416 (base-10). For chmod 755 (u=rwx,g=rx,o=rx), set to 0755 (octal) or 493
     * (base-10).
     * * This might be in conflict with other options that affect the
     * file mode, like fsGroup, and the result can be other mode bits set.
     *
     * Generated from protobuf field <code>int32 mode = 3;</code>
     * @return int
     */
    public function getMode()
    {
        return $this->mode;
    }

    /**
     * Integer octal mode bits to use on this file, must be a value between
     * 01 and 0777 (octal). If 0 or not set, the Volume's default mode will be
     * used.
     * Notes
     * * Internally, a umask of 0222 will be applied to any non-zero value.
     * * This is an integer representation of the mode bits. So, the octal
     * integer value should look exactly as the chmod numeric notation with a
     * leading zero. Some examples: for chmod 777 (a=rwx), set to 0777 (octal) or
     * 511 (base-10). For chmod 640 (u=rw,g=r), set to 0640 (octal) or
     * 416 (base-10). For chmod 755 (u=rwx,g=rx,o=rx), set to 0755 (octal) or 493
     * (base-10).
     * * This might be in conflict with other options that affect the
     * file mode, like fsGroup, and the result can be other mode bits set.
     *
     * Generated from protobuf field <code>int32 mode = 3;</code>
     * @param int $var
     * @return $this
     */
    public function setMode($var)
    {
        GPBUtil::checkInt32($var);
        $this->mode = $var;

        return $this;
    }

}

