<?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;

/**
 * VolumeMount describes a mounting of a Volume within a container.
 *
 * Generated from protobuf message <code>google.cloud.run.v2.VolumeMount</code>
 */
class VolumeMount extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. This must match the Name of a Volume.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $name = '';
    /**
     * Required. Path within the container at which the volume should be mounted.
     * Must not contain ':'. For Cloud SQL volumes, it can be left empty, or must
     * otherwise be `/cloudsql`. All instances defined in the Volume will be
     * available as `/cloudsql/[instance]`. For more information on Cloud SQL
     * volumes, visit https://cloud.google.com/sql/docs/mysql/connect-run
     *
     * Generated from protobuf field <code>string mount_path = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $mount_path = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Required. This must match the Name of a Volume.
     *     @type string $mount_path
     *           Required. Path within the container at which the volume should be mounted.
     *           Must not contain ':'. For Cloud SQL volumes, it can be left empty, or must
     *           otherwise be `/cloudsql`. All instances defined in the Volume will be
     *           available as `/cloudsql/[instance]`. For more information on Cloud SQL
     *           volumes, visit https://cloud.google.com/sql/docs/mysql/connect-run
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Run\V2\K8SMin::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. This must match the Name of a Volume.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Required. This must match the Name of a Volume.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * Required. Path within the container at which the volume should be mounted.
     * Must not contain ':'. For Cloud SQL volumes, it can be left empty, or must
     * otherwise be `/cloudsql`. All instances defined in the Volume will be
     * available as `/cloudsql/[instance]`. For more information on Cloud SQL
     * volumes, visit https://cloud.google.com/sql/docs/mysql/connect-run
     *
     * Generated from protobuf field <code>string mount_path = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getMountPath()
    {
        return $this->mount_path;
    }

    /**
     * Required. Path within the container at which the volume should be mounted.
     * Must not contain ':'. For Cloud SQL volumes, it can be left empty, or must
     * otherwise be `/cloudsql`. All instances defined in the Volume will be
     * available as `/cloudsql/[instance]`. For more information on Cloud SQL
     * volumes, visit https://cloud.google.com/sql/docs/mysql/connect-run
     *
     * Generated from protobuf field <code>string mount_path = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setMountPath($var)
    {
        GPBUtil::checkString($var, True);
        $this->mount_path = $var;

        return $this;
    }

}

