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

/**
 * In memory (tmpfs) ephemeral storage.
 * It is ephemeral in the sense that when the sandbox is taken down, the data is
 * destroyed with it (it does not persist across sandbox runs).
 *
 * Generated from protobuf message <code>google.cloud.run.v2.EmptyDirVolumeSource</code>
 */
class EmptyDirVolumeSource extends \Google\Protobuf\Internal\Message
{
    /**
     * The medium on which the data is stored. Acceptable values today is only
     * MEMORY or none. When none, the default will currently be backed by memory
     * but could change over time. +optional
     *
     * Generated from protobuf field <code>.google.cloud.run.v2.EmptyDirVolumeSource.Medium medium = 1;</code>
     */
    protected $medium = 0;
    /**
     * Limit on the storage usable by this EmptyDir volume.
     * The size limit is also applicable for memory medium.
     * The maximum usage on memory medium EmptyDir would be the minimum value
     * between the SizeLimit specified here and the sum of memory limits of all
     * containers. The default is nil which means that the limit is undefined.
     * More info:
     * https://cloud.google.com/run/docs/configuring/in-memory-volumes#configure-volume.
     * Info in Kubernetes:
     * https://kubernetes.io/docs/concepts/storage/volumes/#emptydir
     *
     * Generated from protobuf field <code>string size_limit = 2;</code>
     */
    protected $size_limit = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $medium
     *           The medium on which the data is stored. Acceptable values today is only
     *           MEMORY or none. When none, the default will currently be backed by memory
     *           but could change over time. +optional
     *     @type string $size_limit
     *           Limit on the storage usable by this EmptyDir volume.
     *           The size limit is also applicable for memory medium.
     *           The maximum usage on memory medium EmptyDir would be the minimum value
     *           between the SizeLimit specified here and the sum of memory limits of all
     *           containers. The default is nil which means that the limit is undefined.
     *           More info:
     *           https://cloud.google.com/run/docs/configuring/in-memory-volumes#configure-volume.
     *           Info in Kubernetes:
     *           https://kubernetes.io/docs/concepts/storage/volumes/#emptydir
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Run\V2\K8SMin::initOnce();
        parent::__construct($data);
    }

    /**
     * The medium on which the data is stored. Acceptable values today is only
     * MEMORY or none. When none, the default will currently be backed by memory
     * but could change over time. +optional
     *
     * Generated from protobuf field <code>.google.cloud.run.v2.EmptyDirVolumeSource.Medium medium = 1;</code>
     * @return int
     */
    public function getMedium()
    {
        return $this->medium;
    }

    /**
     * The medium on which the data is stored. Acceptable values today is only
     * MEMORY or none. When none, the default will currently be backed by memory
     * but could change over time. +optional
     *
     * Generated from protobuf field <code>.google.cloud.run.v2.EmptyDirVolumeSource.Medium medium = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setMedium($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Run\V2\EmptyDirVolumeSource\Medium::class);
        $this->medium = $var;

        return $this;
    }

    /**
     * Limit on the storage usable by this EmptyDir volume.
     * The size limit is also applicable for memory medium.
     * The maximum usage on memory medium EmptyDir would be the minimum value
     * between the SizeLimit specified here and the sum of memory limits of all
     * containers. The default is nil which means that the limit is undefined.
     * More info:
     * https://cloud.google.com/run/docs/configuring/in-memory-volumes#configure-volume.
     * Info in Kubernetes:
     * https://kubernetes.io/docs/concepts/storage/volumes/#emptydir
     *
     * Generated from protobuf field <code>string size_limit = 2;</code>
     * @return string
     */
    public function getSizeLimit()
    {
        return $this->size_limit;
    }

    /**
     * Limit on the storage usable by this EmptyDir volume.
     * The size limit is also applicable for memory medium.
     * The maximum usage on memory medium EmptyDir would be the minimum value
     * between the SizeLimit specified here and the sum of memory limits of all
     * containers. The default is nil which means that the limit is undefined.
     * More info:
     * https://cloud.google.com/run/docs/configuring/in-memory-volumes#configure-volume.
     * Info in Kubernetes:
     * https://kubernetes.io/docs/concepts/storage/volumes/#emptydir
     *
     * Generated from protobuf field <code>string size_limit = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setSizeLimit($var)
    {
        GPBUtil::checkString($var, True);
        $this->size_limit = $var;

        return $this;
    }

}

