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

namespace Google\Cloud\Functions\V2\ListRuntimesResponse;

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

/**
 * Describes a runtime and any special information (e.g., deprecation status)
 * related to it.
 *
 * Generated from protobuf message <code>google.cloud.functions.v2.ListRuntimesResponse.Runtime</code>
 */
class Runtime extends \Google\Protobuf\Internal\Message
{
    /**
     * The name of the runtime, e.g., 'go113', 'nodejs12', etc.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     */
    private $name = '';
    /**
     * The user facing name, eg 'Go 1.13', 'Node.js 12', etc.
     *
     * Generated from protobuf field <code>string display_name = 5;</code>
     */
    private $display_name = '';
    /**
     * The stage of life this runtime is in, e.g., BETA, GA, etc.
     *
     * Generated from protobuf field <code>.google.cloud.functions.v2.ListRuntimesResponse.RuntimeStage stage = 2;</code>
     */
    private $stage = 0;
    /**
     * Warning messages, e.g., a deprecation warning.
     *
     * Generated from protobuf field <code>repeated string warnings = 3;</code>
     */
    private $warnings;
    /**
     * The environment for the runtime.
     *
     * Generated from protobuf field <code>.google.cloud.functions.v2.Environment environment = 4;</code>
     */
    private $environment = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           The name of the runtime, e.g., 'go113', 'nodejs12', etc.
     *     @type string $display_name
     *           The user facing name, eg 'Go 1.13', 'Node.js 12', etc.
     *     @type int $stage
     *           The stage of life this runtime is in, e.g., BETA, GA, etc.
     *     @type array<string>|\Google\Protobuf\Internal\RepeatedField $warnings
     *           Warning messages, e.g., a deprecation warning.
     *     @type int $environment
     *           The environment for the runtime.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce();
        parent::__construct($data);
    }

    /**
     * The name of the runtime, e.g., 'go113', 'nodejs12', etc.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * The name of the runtime, e.g., 'go113', 'nodejs12', etc.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * The user facing name, eg 'Go 1.13', 'Node.js 12', etc.
     *
     * Generated from protobuf field <code>string display_name = 5;</code>
     * @return string
     */
    public function getDisplayName()
    {
        return $this->display_name;
    }

    /**
     * The user facing name, eg 'Go 1.13', 'Node.js 12', etc.
     *
     * Generated from protobuf field <code>string display_name = 5;</code>
     * @param string $var
     * @return $this
     */
    public function setDisplayName($var)
    {
        GPBUtil::checkString($var, True);
        $this->display_name = $var;

        return $this;
    }

    /**
     * The stage of life this runtime is in, e.g., BETA, GA, etc.
     *
     * Generated from protobuf field <code>.google.cloud.functions.v2.ListRuntimesResponse.RuntimeStage stage = 2;</code>
     * @return int
     */
    public function getStage()
    {
        return $this->stage;
    }

    /**
     * The stage of life this runtime is in, e.g., BETA, GA, etc.
     *
     * Generated from protobuf field <code>.google.cloud.functions.v2.ListRuntimesResponse.RuntimeStage stage = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setStage($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Functions\V2\ListRuntimesResponse\RuntimeStage::class);
        $this->stage = $var;

        return $this;
    }

    /**
     * Warning messages, e.g., a deprecation warning.
     *
     * Generated from protobuf field <code>repeated string warnings = 3;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getWarnings()
    {
        return $this->warnings;
    }

    /**
     * Warning messages, e.g., a deprecation warning.
     *
     * Generated from protobuf field <code>repeated string warnings = 3;</code>
     * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setWarnings($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->warnings = $arr;

        return $this;
    }

    /**
     * The environment for the runtime.
     *
     * Generated from protobuf field <code>.google.cloud.functions.v2.Environment environment = 4;</code>
     * @return int
     */
    public function getEnvironment()
    {
        return $this->environment;
    }

    /**
     * The environment for the runtime.
     *
     * Generated from protobuf field <code>.google.cloud.functions.v2.Environment environment = 4;</code>
     * @param int $var
     * @return $this
     */
    public function setEnvironment($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Functions\V2\Environment::class);
        $this->environment = $var;

        return $this;
    }

}


