<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/orchestration/airflow/service/v1/environments.proto

namespace Google\Cloud\Orchestration\Airflow\Service\V1;

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

/**
 * Request to check whether image upgrade will succeed.
 *
 * Generated from protobuf message <code>google.cloud.orchestration.airflow.service.v1.CheckUpgradeRequest</code>
 */
class CheckUpgradeRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The resource name of the environment to check upgrade for, in the
     * form:
     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
     *
     * Generated from protobuf field <code>string environment = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $environment = '';
    /**
     * Optional. The version of the software running in the environment.
     * This encapsulates both the version of Cloud Composer functionality and the
     * version of Apache Airflow. It must match the regular expression
     * `composer-([0-9]+(\.[0-9]+\.[0-9]+(-preview\.[0-9]+)?)?|latest)-airflow-([0-9]+(\.[0-9]+(\.[0-9]+)?)?)`.
     * When used as input, the server also checks if the provided version is
     * supported and denies the request for an unsupported version.
     * The Cloud Composer portion of the image version is a full
     * [semantic version](https://semver.org), or an alias in the form of major
     * version number or `latest`. When an alias is provided, the server replaces
     * it with the current Cloud Composer version that satisfies the alias.
     * The Apache Airflow portion of the image version is a full semantic version
     * that points to one of the supported Apache Airflow versions, or an alias in
     * the form of only major or major.minor versions specified. When an alias is
     * provided, the server replaces it with the latest Apache Airflow version
     * that satisfies the alias and is supported in the given Cloud Composer
     * version.
     * In all cases, the resolved image version is stored in the same field.
     * See also [version
     * list](/composer/docs/concepts/versioning/composer-versions) and [versioning
     * overview](/composer/docs/concepts/versioning/composer-versioning-overview).
     *
     * Generated from protobuf field <code>string image_version = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $image_version = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $environment
     *           Required. The resource name of the environment to check upgrade for, in the
     *           form:
     *           "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
     *     @type string $image_version
     *           Optional. The version of the software running in the environment.
     *           This encapsulates both the version of Cloud Composer functionality and the
     *           version of Apache Airflow. It must match the regular expression
     *           `composer-([0-9]+(\.[0-9]+\.[0-9]+(-preview\.[0-9]+)?)?|latest)-airflow-([0-9]+(\.[0-9]+(\.[0-9]+)?)?)`.
     *           When used as input, the server also checks if the provided version is
     *           supported and denies the request for an unsupported version.
     *           The Cloud Composer portion of the image version is a full
     *           [semantic version](https://semver.org), or an alias in the form of major
     *           version number or `latest`. When an alias is provided, the server replaces
     *           it with the current Cloud Composer version that satisfies the alias.
     *           The Apache Airflow portion of the image version is a full semantic version
     *           that points to one of the supported Apache Airflow versions, or an alias in
     *           the form of only major or major.minor versions specified. When an alias is
     *           provided, the server replaces it with the latest Apache Airflow version
     *           that satisfies the alias and is supported in the given Cloud Composer
     *           version.
     *           In all cases, the resolved image version is stored in the same field.
     *           See also [version
     *           list](/composer/docs/concepts/versioning/composer-versions) and [versioning
     *           overview](/composer/docs/concepts/versioning/composer-versioning-overview).
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The resource name of the environment to check upgrade for, in the
     * form:
     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
     *
     * Generated from protobuf field <code>string environment = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getEnvironment()
    {
        return $this->environment;
    }

    /**
     * Required. The resource name of the environment to check upgrade for, in the
     * form:
     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
     *
     * Generated from protobuf field <code>string environment = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setEnvironment($var)
    {
        GPBUtil::checkString($var, True);
        $this->environment = $var;

        return $this;
    }

    /**
     * Optional. The version of the software running in the environment.
     * This encapsulates both the version of Cloud Composer functionality and the
     * version of Apache Airflow. It must match the regular expression
     * `composer-([0-9]+(\.[0-9]+\.[0-9]+(-preview\.[0-9]+)?)?|latest)-airflow-([0-9]+(\.[0-9]+(\.[0-9]+)?)?)`.
     * When used as input, the server also checks if the provided version is
     * supported and denies the request for an unsupported version.
     * The Cloud Composer portion of the image version is a full
     * [semantic version](https://semver.org), or an alias in the form of major
     * version number or `latest`. When an alias is provided, the server replaces
     * it with the current Cloud Composer version that satisfies the alias.
     * The Apache Airflow portion of the image version is a full semantic version
     * that points to one of the supported Apache Airflow versions, or an alias in
     * the form of only major or major.minor versions specified. When an alias is
     * provided, the server replaces it with the latest Apache Airflow version
     * that satisfies the alias and is supported in the given Cloud Composer
     * version.
     * In all cases, the resolved image version is stored in the same field.
     * See also [version
     * list](/composer/docs/concepts/versioning/composer-versions) and [versioning
     * overview](/composer/docs/concepts/versioning/composer-versioning-overview).
     *
     * Generated from protobuf field <code>string image_version = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getImageVersion()
    {
        return $this->image_version;
    }

    /**
     * Optional. The version of the software running in the environment.
     * This encapsulates both the version of Cloud Composer functionality and the
     * version of Apache Airflow. It must match the regular expression
     * `composer-([0-9]+(\.[0-9]+\.[0-9]+(-preview\.[0-9]+)?)?|latest)-airflow-([0-9]+(\.[0-9]+(\.[0-9]+)?)?)`.
     * When used as input, the server also checks if the provided version is
     * supported and denies the request for an unsupported version.
     * The Cloud Composer portion of the image version is a full
     * [semantic version](https://semver.org), or an alias in the form of major
     * version number or `latest`. When an alias is provided, the server replaces
     * it with the current Cloud Composer version that satisfies the alias.
     * The Apache Airflow portion of the image version is a full semantic version
     * that points to one of the supported Apache Airflow versions, or an alias in
     * the form of only major or major.minor versions specified. When an alias is
     * provided, the server replaces it with the latest Apache Airflow version
     * that satisfies the alias and is supported in the given Cloud Composer
     * version.
     * In all cases, the resolved image version is stored in the same field.
     * See also [version
     * list](/composer/docs/concepts/versioning/composer-versions) and [versioning
     * overview](/composer/docs/concepts/versioning/composer-versioning-overview).
     *
     * Generated from protobuf field <code>string image_version = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setImageVersion($var)
    {
        GPBUtil::checkString($var, True);
        $this->image_version = $var;

        return $this;
    }

}

