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

namespace Google\Cloud\Run\V2;

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

/**
 * A Revision is an immutable snapshot of code and configuration.  A Revision
 * references a container image. Revisions are only created by updates to its
 * parent Service.
 *
 * Generated from protobuf message <code>google.cloud.run.v2.Revision</code>
 */
class Revision extends \Google\Protobuf\Internal\Message
{
    /**
     * Output only. The unique name of this Revision.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $name = '';
    /**
     * Output only. Server assigned unique identifier for the Revision. The value
     * is a UUID4 string and guaranteed to remain unchanged until the resource is
     * deleted.
     *
     * Generated from protobuf field <code>string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $uid = '';
    /**
     * Output only. A number that monotonically increases every time the user
     * modifies the desired state.
     *
     * Generated from protobuf field <code>int64 generation = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $generation = 0;
    /**
     * Output only. Unstructured key value map that can be used to organize and
     * categorize objects. User-provided labels are shared with Google's billing
     * system, so they can be used to filter, or break down billing charges by
     * team, component, environment, state, etc. For more information, visit
     * https://cloud.google.com/resource-manager/docs/creating-managing-labels or
     * https://cloud.google.com/run/docs/configuring/labels.
     *
     * Generated from protobuf field <code>map<string, string> labels = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $labels;
    /**
     * Output only. Unstructured key value map that may
     * be set by external tools to store and arbitrary metadata.
     * They are not queryable and should be preserved
     * when modifying objects.
     *
     * Generated from protobuf field <code>map<string, string> annotations = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $annotations;
    /**
     * Output only. The creation time.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $create_time = null;
    /**
     * Output only. The last-modified time.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $update_time = null;
    /**
     * Output only. For a deleted resource, the deletion time. It is only
     * populated as a response to a Delete request.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp delete_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $delete_time = null;
    /**
     * Output only. For a deleted resource, the time after which it will be
     * permamently deleted. It is only populated as a response to a Delete
     * request.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp expire_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $expire_time = null;
    /**
     * The least stable launch stage needed to create this resource, as defined by
     * [Google Cloud Platform Launch
     * Stages](https://cloud.google.com/terms/launch-stages). Cloud Run supports
     * `ALPHA`, `BETA`, and `GA`.
     * <p>Note that this value might not be what was used
     * as input. For example, if ALPHA was provided as input in the parent
     * resource, but only BETA and GA-level features are were, this field will be
     * BETA.
     *
     * Generated from protobuf field <code>.google.api.LaunchStage launch_stage = 10;</code>
     */
    protected $launch_stage = 0;
    /**
     * Output only. The name of the parent service.
     *
     * Generated from protobuf field <code>string service = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {</code>
     */
    protected $service = '';
    /**
     * Scaling settings for this revision.
     *
     * Generated from protobuf field <code>.google.cloud.run.v2.RevisionScaling scaling = 12;</code>
     */
    protected $scaling = null;
    /**
     * VPC Access configuration for this Revision. For more information, visit
     * https://cloud.google.com/run/docs/configuring/connecting-vpc.
     *
     * Generated from protobuf field <code>.google.cloud.run.v2.VpcAccess vpc_access = 13;</code>
     */
    protected $vpc_access = null;
    /**
     * Sets the maximum number of requests that each serving instance can receive.
     *
     * Generated from protobuf field <code>int32 max_instance_request_concurrency = 34;</code>
     */
    protected $max_instance_request_concurrency = 0;
    /**
     * Max allowed time for an instance to respond to a request.
     *
     * Generated from protobuf field <code>.google.protobuf.Duration timeout = 15;</code>
     */
    protected $timeout = null;
    /**
     * Email address of the IAM service account associated with the revision of
     * the service. The service account represents the identity of the running
     * revision, and determines what permissions the revision has.
     *
     * Generated from protobuf field <code>string service_account = 16;</code>
     */
    protected $service_account = '';
    /**
     * Holds the single container that defines the unit of execution for this
     * Revision.
     *
     * Generated from protobuf field <code>repeated .google.cloud.run.v2.Container containers = 17;</code>
     */
    private $containers;
    /**
     * A list of Volumes to make available to containers.
     *
     * Generated from protobuf field <code>repeated .google.cloud.run.v2.Volume volumes = 18;</code>
     */
    private $volumes;
    /**
     * The execution environment being used to host this Revision.
     *
     * Generated from protobuf field <code>.google.cloud.run.v2.ExecutionEnvironment execution_environment = 20;</code>
     */
    protected $execution_environment = 0;
    /**
     * A reference to a customer managed encryption key (CMEK) to use to encrypt
     * this container image. For more information, go to
     * https://cloud.google.com/run/docs/securing/using-cmek
     *
     * Generated from protobuf field <code>string encryption_key = 21 [(.google.api.resource_reference) = {</code>
     */
    protected $encryption_key = '';
    /**
     * The action to take if the encryption key is revoked.
     *
     * Generated from protobuf field <code>.google.cloud.run.v2.EncryptionKeyRevocationAction encryption_key_revocation_action = 23;</code>
     */
    protected $encryption_key_revocation_action = 0;
    /**
     * If encryption_key_revocation_action is SHUTDOWN, the duration before
     * shutting down all instances. The minimum increment is 1 hour.
     *
     * Generated from protobuf field <code>.google.protobuf.Duration encryption_key_shutdown_duration = 24;</code>
     */
    protected $encryption_key_shutdown_duration = null;
    /**
     * Output only. Indicates whether the resource's reconciliation is still in
     * progress. See comments in `Service.reconciling` for additional information
     * on reconciliation process in Cloud Run.
     *
     * Generated from protobuf field <code>bool reconciling = 30 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $reconciling = false;
    /**
     * Output only. The Condition of this Revision, containing its readiness
     * status, and detailed error information in case it did not reach a serving
     * state.
     *
     * Generated from protobuf field <code>repeated .google.cloud.run.v2.Condition conditions = 31 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $conditions;
    /**
     * Output only. The generation of this Revision currently serving traffic. See
     * comments in `reconciling` for additional information on reconciliation
     * process in Cloud Run.
     *
     * Generated from protobuf field <code>int64 observed_generation = 32 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $observed_generation = 0;
    /**
     * Output only. The Google Console URI to obtain logs for the Revision.
     *
     * Generated from protobuf field <code>string log_uri = 33 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $log_uri = '';
    /**
     * Output only. Reserved for future use.
     *
     * Generated from protobuf field <code>bool satisfies_pzs = 37 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $satisfies_pzs = false;
    /**
     * Enable session affinity.
     *
     * Generated from protobuf field <code>bool session_affinity = 38;</code>
     */
    protected $session_affinity = false;
    /**
     * Output only. The current effective scaling settings for the revision.
     *
     * Generated from protobuf field <code>.google.cloud.run.v2.RevisionScalingStatus scaling_status = 39 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $scaling_status = null;
    /**
     * Output only. A system-generated fingerprint for this version of the
     * resource. May be used to detect modification conflict during updates.
     *
     * Generated from protobuf field <code>string etag = 99 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $etag = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Output only. The unique name of this Revision.
     *     @type string $uid
     *           Output only. Server assigned unique identifier for the Revision. The value
     *           is a UUID4 string and guaranteed to remain unchanged until the resource is
     *           deleted.
     *     @type int|string $generation
     *           Output only. A number that monotonically increases every time the user
     *           modifies the desired state.
     *     @type array|\Google\Protobuf\Internal\MapField $labels
     *           Output only. Unstructured key value map that can be used to organize and
     *           categorize objects. User-provided labels are shared with Google's billing
     *           system, so they can be used to filter, or break down billing charges by
     *           team, component, environment, state, etc. For more information, visit
     *           https://cloud.google.com/resource-manager/docs/creating-managing-labels or
     *           https://cloud.google.com/run/docs/configuring/labels.
     *     @type array|\Google\Protobuf\Internal\MapField $annotations
     *           Output only. Unstructured key value map that may
     *           be set by external tools to store and arbitrary metadata.
     *           They are not queryable and should be preserved
     *           when modifying objects.
     *     @type \Google\Protobuf\Timestamp $create_time
     *           Output only. The creation time.
     *     @type \Google\Protobuf\Timestamp $update_time
     *           Output only. The last-modified time.
     *     @type \Google\Protobuf\Timestamp $delete_time
     *           Output only. For a deleted resource, the deletion time. It is only
     *           populated as a response to a Delete request.
     *     @type \Google\Protobuf\Timestamp $expire_time
     *           Output only. For a deleted resource, the time after which it will be
     *           permamently deleted. It is only populated as a response to a Delete
     *           request.
     *     @type int $launch_stage
     *           The least stable launch stage needed to create this resource, as defined by
     *           [Google Cloud Platform Launch
     *           Stages](https://cloud.google.com/terms/launch-stages). Cloud Run supports
     *           `ALPHA`, `BETA`, and `GA`.
     *           <p>Note that this value might not be what was used
     *           as input. For example, if ALPHA was provided as input in the parent
     *           resource, but only BETA and GA-level features are were, this field will be
     *           BETA.
     *     @type string $service
     *           Output only. The name of the parent service.
     *     @type \Google\Cloud\Run\V2\RevisionScaling $scaling
     *           Scaling settings for this revision.
     *     @type \Google\Cloud\Run\V2\VpcAccess $vpc_access
     *           VPC Access configuration for this Revision. For more information, visit
     *           https://cloud.google.com/run/docs/configuring/connecting-vpc.
     *     @type int $max_instance_request_concurrency
     *           Sets the maximum number of requests that each serving instance can receive.
     *     @type \Google\Protobuf\Duration $timeout
     *           Max allowed time for an instance to respond to a request.
     *     @type string $service_account
     *           Email address of the IAM service account associated with the revision of
     *           the service. The service account represents the identity of the running
     *           revision, and determines what permissions the revision has.
     *     @type array<\Google\Cloud\Run\V2\Container>|\Google\Protobuf\Internal\RepeatedField $containers
     *           Holds the single container that defines the unit of execution for this
     *           Revision.
     *     @type array<\Google\Cloud\Run\V2\Volume>|\Google\Protobuf\Internal\RepeatedField $volumes
     *           A list of Volumes to make available to containers.
     *     @type int $execution_environment
     *           The execution environment being used to host this Revision.
     *     @type string $encryption_key
     *           A reference to a customer managed encryption key (CMEK) to use to encrypt
     *           this container image. For more information, go to
     *           https://cloud.google.com/run/docs/securing/using-cmek
     *     @type int $encryption_key_revocation_action
     *           The action to take if the encryption key is revoked.
     *     @type \Google\Protobuf\Duration $encryption_key_shutdown_duration
     *           If encryption_key_revocation_action is SHUTDOWN, the duration before
     *           shutting down all instances. The minimum increment is 1 hour.
     *     @type bool $reconciling
     *           Output only. Indicates whether the resource's reconciliation is still in
     *           progress. See comments in `Service.reconciling` for additional information
     *           on reconciliation process in Cloud Run.
     *     @type array<\Google\Cloud\Run\V2\Condition>|\Google\Protobuf\Internal\RepeatedField $conditions
     *           Output only. The Condition of this Revision, containing its readiness
     *           status, and detailed error information in case it did not reach a serving
     *           state.
     *     @type int|string $observed_generation
     *           Output only. The generation of this Revision currently serving traffic. See
     *           comments in `reconciling` for additional information on reconciliation
     *           process in Cloud Run.
     *     @type string $log_uri
     *           Output only. The Google Console URI to obtain logs for the Revision.
     *     @type bool $satisfies_pzs
     *           Output only. Reserved for future use.
     *     @type bool $session_affinity
     *           Enable session affinity.
     *     @type \Google\Cloud\Run\V2\RevisionScalingStatus $scaling_status
     *           Output only. The current effective scaling settings for the revision.
     *     @type string $etag
     *           Output only. A system-generated fingerprint for this version of the
     *           resource. May be used to detect modification conflict during updates.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Run\V2\Revision::initOnce();
        parent::__construct($data);
    }

    /**
     * Output only. The unique name of this Revision.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Output only. The unique name of this Revision.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * Output only. Server assigned unique identifier for the Revision. The value
     * is a UUID4 string and guaranteed to remain unchanged until the resource is
     * deleted.
     *
     * Generated from protobuf field <code>string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getUid()
    {
        return $this->uid;
    }

    /**
     * Output only. Server assigned unique identifier for the Revision. The value
     * is a UUID4 string and guaranteed to remain unchanged until the resource is
     * deleted.
     *
     * Generated from protobuf field <code>string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setUid($var)
    {
        GPBUtil::checkString($var, True);
        $this->uid = $var;

        return $this;
    }

    /**
     * Output only. A number that monotonically increases every time the user
     * modifies the desired state.
     *
     * Generated from protobuf field <code>int64 generation = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return int|string
     */
    public function getGeneration()
    {
        return $this->generation;
    }

    /**
     * Output only. A number that monotonically increases every time the user
     * modifies the desired state.
     *
     * Generated from protobuf field <code>int64 generation = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param int|string $var
     * @return $this
     */
    public function setGeneration($var)
    {
        GPBUtil::checkInt64($var);
        $this->generation = $var;

        return $this;
    }

    /**
     * Output only. Unstructured key value map that can be used to organize and
     * categorize objects. User-provided labels are shared with Google's billing
     * system, so they can be used to filter, or break down billing charges by
     * team, component, environment, state, etc. For more information, visit
     * https://cloud.google.com/resource-manager/docs/creating-managing-labels or
     * https://cloud.google.com/run/docs/configuring/labels.
     *
     * Generated from protobuf field <code>map<string, string> labels = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Internal\MapField
     */
    public function getLabels()
    {
        return $this->labels;
    }

    /**
     * Output only. Unstructured key value map that can be used to organize and
     * categorize objects. User-provided labels are shared with Google's billing
     * system, so they can be used to filter, or break down billing charges by
     * team, component, environment, state, etc. For more information, visit
     * https://cloud.google.com/resource-manager/docs/creating-managing-labels or
     * https://cloud.google.com/run/docs/configuring/labels.
     *
     * Generated from protobuf field <code>map<string, string> labels = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param array|\Google\Protobuf\Internal\MapField $var
     * @return $this
     */
    public function setLabels($var)
    {
        $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
        $this->labels = $arr;

        return $this;
    }

    /**
     * Output only. Unstructured key value map that may
     * be set by external tools to store and arbitrary metadata.
     * They are not queryable and should be preserved
     * when modifying objects.
     *
     * Generated from protobuf field <code>map<string, string> annotations = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Internal\MapField
     */
    public function getAnnotations()
    {
        return $this->annotations;
    }

    /**
     * Output only. Unstructured key value map that may
     * be set by external tools to store and arbitrary metadata.
     * They are not queryable and should be preserved
     * when modifying objects.
     *
     * Generated from protobuf field <code>map<string, string> annotations = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param array|\Google\Protobuf\Internal\MapField $var
     * @return $this
     */
    public function setAnnotations($var)
    {
        $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
        $this->annotations = $arr;

        return $this;
    }

    /**
     * Output only. The creation time.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getCreateTime()
    {
        return $this->create_time;
    }

    public function hasCreateTime()
    {
        return isset($this->create_time);
    }

    public function clearCreateTime()
    {
        unset($this->create_time);
    }

    /**
     * Output only. The creation time.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setCreateTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->create_time = $var;

        return $this;
    }

    /**
     * Output only. The last-modified time.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getUpdateTime()
    {
        return $this->update_time;
    }

    public function hasUpdateTime()
    {
        return isset($this->update_time);
    }

    public function clearUpdateTime()
    {
        unset($this->update_time);
    }

    /**
     * Output only. The last-modified time.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setUpdateTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->update_time = $var;

        return $this;
    }

    /**
     * Output only. For a deleted resource, the deletion time. It is only
     * populated as a response to a Delete request.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp delete_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getDeleteTime()
    {
        return $this->delete_time;
    }

    public function hasDeleteTime()
    {
        return isset($this->delete_time);
    }

    public function clearDeleteTime()
    {
        unset($this->delete_time);
    }

    /**
     * Output only. For a deleted resource, the deletion time. It is only
     * populated as a response to a Delete request.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp delete_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setDeleteTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->delete_time = $var;

        return $this;
    }

    /**
     * Output only. For a deleted resource, the time after which it will be
     * permamently deleted. It is only populated as a response to a Delete
     * request.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp expire_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getExpireTime()
    {
        return $this->expire_time;
    }

    public function hasExpireTime()
    {
        return isset($this->expire_time);
    }

    public function clearExpireTime()
    {
        unset($this->expire_time);
    }

    /**
     * Output only. For a deleted resource, the time after which it will be
     * permamently deleted. It is only populated as a response to a Delete
     * request.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp expire_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setExpireTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->expire_time = $var;

        return $this;
    }

    /**
     * The least stable launch stage needed to create this resource, as defined by
     * [Google Cloud Platform Launch
     * Stages](https://cloud.google.com/terms/launch-stages). Cloud Run supports
     * `ALPHA`, `BETA`, and `GA`.
     * <p>Note that this value might not be what was used
     * as input. For example, if ALPHA was provided as input in the parent
     * resource, but only BETA and GA-level features are were, this field will be
     * BETA.
     *
     * Generated from protobuf field <code>.google.api.LaunchStage launch_stage = 10;</code>
     * @return int
     */
    public function getLaunchStage()
    {
        return $this->launch_stage;
    }

    /**
     * The least stable launch stage needed to create this resource, as defined by
     * [Google Cloud Platform Launch
     * Stages](https://cloud.google.com/terms/launch-stages). Cloud Run supports
     * `ALPHA`, `BETA`, and `GA`.
     * <p>Note that this value might not be what was used
     * as input. For example, if ALPHA was provided as input in the parent
     * resource, but only BETA and GA-level features are were, this field will be
     * BETA.
     *
     * Generated from protobuf field <code>.google.api.LaunchStage launch_stage = 10;</code>
     * @param int $var
     * @return $this
     */
    public function setLaunchStage($var)
    {
        GPBUtil::checkEnum($var, \Google\Api\LaunchStage::class);
        $this->launch_stage = $var;

        return $this;
    }

    /**
     * Output only. The name of the parent service.
     *
     * Generated from protobuf field <code>string service = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getService()
    {
        return $this->service;
    }

    /**
     * Output only. The name of the parent service.
     *
     * Generated from protobuf field <code>string service = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setService($var)
    {
        GPBUtil::checkString($var, True);
        $this->service = $var;

        return $this;
    }

    /**
     * Scaling settings for this revision.
     *
     * Generated from protobuf field <code>.google.cloud.run.v2.RevisionScaling scaling = 12;</code>
     * @return \Google\Cloud\Run\V2\RevisionScaling|null
     */
    public function getScaling()
    {
        return $this->scaling;
    }

    public function hasScaling()
    {
        return isset($this->scaling);
    }

    public function clearScaling()
    {
        unset($this->scaling);
    }

    /**
     * Scaling settings for this revision.
     *
     * Generated from protobuf field <code>.google.cloud.run.v2.RevisionScaling scaling = 12;</code>
     * @param \Google\Cloud\Run\V2\RevisionScaling $var
     * @return $this
     */
    public function setScaling($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\RevisionScaling::class);
        $this->scaling = $var;

        return $this;
    }

    /**
     * VPC Access configuration for this Revision. For more information, visit
     * https://cloud.google.com/run/docs/configuring/connecting-vpc.
     *
     * Generated from protobuf field <code>.google.cloud.run.v2.VpcAccess vpc_access = 13;</code>
     * @return \Google\Cloud\Run\V2\VpcAccess|null
     */
    public function getVpcAccess()
    {
        return $this->vpc_access;
    }

    public function hasVpcAccess()
    {
        return isset($this->vpc_access);
    }

    public function clearVpcAccess()
    {
        unset($this->vpc_access);
    }

    /**
     * VPC Access configuration for this Revision. For more information, visit
     * https://cloud.google.com/run/docs/configuring/connecting-vpc.
     *
     * Generated from protobuf field <code>.google.cloud.run.v2.VpcAccess vpc_access = 13;</code>
     * @param \Google\Cloud\Run\V2\VpcAccess $var
     * @return $this
     */
    public function setVpcAccess($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\VpcAccess::class);
        $this->vpc_access = $var;

        return $this;
    }

    /**
     * Sets the maximum number of requests that each serving instance can receive.
     *
     * Generated from protobuf field <code>int32 max_instance_request_concurrency = 34;</code>
     * @return int
     */
    public function getMaxInstanceRequestConcurrency()
    {
        return $this->max_instance_request_concurrency;
    }

    /**
     * Sets the maximum number of requests that each serving instance can receive.
     *
     * Generated from protobuf field <code>int32 max_instance_request_concurrency = 34;</code>
     * @param int $var
     * @return $this
     */
    public function setMaxInstanceRequestConcurrency($var)
    {
        GPBUtil::checkInt32($var);
        $this->max_instance_request_concurrency = $var;

        return $this;
    }

    /**
     * Max allowed time for an instance to respond to a request.
     *
     * Generated from protobuf field <code>.google.protobuf.Duration timeout = 15;</code>
     * @return \Google\Protobuf\Duration|null
     */
    public function getTimeout()
    {
        return $this->timeout;
    }

    public function hasTimeout()
    {
        return isset($this->timeout);
    }

    public function clearTimeout()
    {
        unset($this->timeout);
    }

    /**
     * Max allowed time for an instance to respond to a request.
     *
     * Generated from protobuf field <code>.google.protobuf.Duration timeout = 15;</code>
     * @param \Google\Protobuf\Duration $var
     * @return $this
     */
    public function setTimeout($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
        $this->timeout = $var;

        return $this;
    }

    /**
     * Email address of the IAM service account associated with the revision of
     * the service. The service account represents the identity of the running
     * revision, and determines what permissions the revision has.
     *
     * Generated from protobuf field <code>string service_account = 16;</code>
     * @return string
     */
    public function getServiceAccount()
    {
        return $this->service_account;
    }

    /**
     * Email address of the IAM service account associated with the revision of
     * the service. The service account represents the identity of the running
     * revision, and determines what permissions the revision has.
     *
     * Generated from protobuf field <code>string service_account = 16;</code>
     * @param string $var
     * @return $this
     */
    public function setServiceAccount($var)
    {
        GPBUtil::checkString($var, True);
        $this->service_account = $var;

        return $this;
    }

    /**
     * Holds the single container that defines the unit of execution for this
     * Revision.
     *
     * Generated from protobuf field <code>repeated .google.cloud.run.v2.Container containers = 17;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getContainers()
    {
        return $this->containers;
    }

    /**
     * Holds the single container that defines the unit of execution for this
     * Revision.
     *
     * Generated from protobuf field <code>repeated .google.cloud.run.v2.Container containers = 17;</code>
     * @param array<\Google\Cloud\Run\V2\Container>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setContainers($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Run\V2\Container::class);
        $this->containers = $arr;

        return $this;
    }

    /**
     * A list of Volumes to make available to containers.
     *
     * Generated from protobuf field <code>repeated .google.cloud.run.v2.Volume volumes = 18;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getVolumes()
    {
        return $this->volumes;
    }

    /**
     * A list of Volumes to make available to containers.
     *
     * Generated from protobuf field <code>repeated .google.cloud.run.v2.Volume volumes = 18;</code>
     * @param array<\Google\Cloud\Run\V2\Volume>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setVolumes($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Run\V2\Volume::class);
        $this->volumes = $arr;

        return $this;
    }

    /**
     * The execution environment being used to host this Revision.
     *
     * Generated from protobuf field <code>.google.cloud.run.v2.ExecutionEnvironment execution_environment = 20;</code>
     * @return int
     */
    public function getExecutionEnvironment()
    {
        return $this->execution_environment;
    }

    /**
     * The execution environment being used to host this Revision.
     *
     * Generated from protobuf field <code>.google.cloud.run.v2.ExecutionEnvironment execution_environment = 20;</code>
     * @param int $var
     * @return $this
     */
    public function setExecutionEnvironment($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Run\V2\ExecutionEnvironment::class);
        $this->execution_environment = $var;

        return $this;
    }

    /**
     * A reference to a customer managed encryption key (CMEK) to use to encrypt
     * this container image. For more information, go to
     * https://cloud.google.com/run/docs/securing/using-cmek
     *
     * Generated from protobuf field <code>string encryption_key = 21 [(.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getEncryptionKey()
    {
        return $this->encryption_key;
    }

    /**
     * A reference to a customer managed encryption key (CMEK) to use to encrypt
     * this container image. For more information, go to
     * https://cloud.google.com/run/docs/securing/using-cmek
     *
     * Generated from protobuf field <code>string encryption_key = 21 [(.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setEncryptionKey($var)
    {
        GPBUtil::checkString($var, True);
        $this->encryption_key = $var;

        return $this;
    }

    /**
     * The action to take if the encryption key is revoked.
     *
     * Generated from protobuf field <code>.google.cloud.run.v2.EncryptionKeyRevocationAction encryption_key_revocation_action = 23;</code>
     * @return int
     */
    public function getEncryptionKeyRevocationAction()
    {
        return $this->encryption_key_revocation_action;
    }

    /**
     * The action to take if the encryption key is revoked.
     *
     * Generated from protobuf field <code>.google.cloud.run.v2.EncryptionKeyRevocationAction encryption_key_revocation_action = 23;</code>
     * @param int $var
     * @return $this
     */
    public function setEncryptionKeyRevocationAction($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Run\V2\EncryptionKeyRevocationAction::class);
        $this->encryption_key_revocation_action = $var;

        return $this;
    }

    /**
     * If encryption_key_revocation_action is SHUTDOWN, the duration before
     * shutting down all instances. The minimum increment is 1 hour.
     *
     * Generated from protobuf field <code>.google.protobuf.Duration encryption_key_shutdown_duration = 24;</code>
     * @return \Google\Protobuf\Duration|null
     */
    public function getEncryptionKeyShutdownDuration()
    {
        return $this->encryption_key_shutdown_duration;
    }

    public function hasEncryptionKeyShutdownDuration()
    {
        return isset($this->encryption_key_shutdown_duration);
    }

    public function clearEncryptionKeyShutdownDuration()
    {
        unset($this->encryption_key_shutdown_duration);
    }

    /**
     * If encryption_key_revocation_action is SHUTDOWN, the duration before
     * shutting down all instances. The minimum increment is 1 hour.
     *
     * Generated from protobuf field <code>.google.protobuf.Duration encryption_key_shutdown_duration = 24;</code>
     * @param \Google\Protobuf\Duration $var
     * @return $this
     */
    public function setEncryptionKeyShutdownDuration($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
        $this->encryption_key_shutdown_duration = $var;

        return $this;
    }

    /**
     * Output only. Indicates whether the resource's reconciliation is still in
     * progress. See comments in `Service.reconciling` for additional information
     * on reconciliation process in Cloud Run.
     *
     * Generated from protobuf field <code>bool reconciling = 30 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return bool
     */
    public function getReconciling()
    {
        return $this->reconciling;
    }

    /**
     * Output only. Indicates whether the resource's reconciliation is still in
     * progress. See comments in `Service.reconciling` for additional information
     * on reconciliation process in Cloud Run.
     *
     * Generated from protobuf field <code>bool reconciling = 30 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param bool $var
     * @return $this
     */
    public function setReconciling($var)
    {
        GPBUtil::checkBool($var);
        $this->reconciling = $var;

        return $this;
    }

    /**
     * Output only. The Condition of this Revision, containing its readiness
     * status, and detailed error information in case it did not reach a serving
     * state.
     *
     * Generated from protobuf field <code>repeated .google.cloud.run.v2.Condition conditions = 31 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getConditions()
    {
        return $this->conditions;
    }

    /**
     * Output only. The Condition of this Revision, containing its readiness
     * status, and detailed error information in case it did not reach a serving
     * state.
     *
     * Generated from protobuf field <code>repeated .google.cloud.run.v2.Condition conditions = 31 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param array<\Google\Cloud\Run\V2\Condition>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setConditions($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Run\V2\Condition::class);
        $this->conditions = $arr;

        return $this;
    }

    /**
     * Output only. The generation of this Revision currently serving traffic. See
     * comments in `reconciling` for additional information on reconciliation
     * process in Cloud Run.
     *
     * Generated from protobuf field <code>int64 observed_generation = 32 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return int|string
     */
    public function getObservedGeneration()
    {
        return $this->observed_generation;
    }

    /**
     * Output only. The generation of this Revision currently serving traffic. See
     * comments in `reconciling` for additional information on reconciliation
     * process in Cloud Run.
     *
     * Generated from protobuf field <code>int64 observed_generation = 32 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param int|string $var
     * @return $this
     */
    public function setObservedGeneration($var)
    {
        GPBUtil::checkInt64($var);
        $this->observed_generation = $var;

        return $this;
    }

    /**
     * Output only. The Google Console URI to obtain logs for the Revision.
     *
     * Generated from protobuf field <code>string log_uri = 33 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getLogUri()
    {
        return $this->log_uri;
    }

    /**
     * Output only. The Google Console URI to obtain logs for the Revision.
     *
     * Generated from protobuf field <code>string log_uri = 33 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setLogUri($var)
    {
        GPBUtil::checkString($var, True);
        $this->log_uri = $var;

        return $this;
    }

    /**
     * Output only. Reserved for future use.
     *
     * Generated from protobuf field <code>bool satisfies_pzs = 37 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return bool
     */
    public function getSatisfiesPzs()
    {
        return $this->satisfies_pzs;
    }

    /**
     * Output only. Reserved for future use.
     *
     * Generated from protobuf field <code>bool satisfies_pzs = 37 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param bool $var
     * @return $this
     */
    public function setSatisfiesPzs($var)
    {
        GPBUtil::checkBool($var);
        $this->satisfies_pzs = $var;

        return $this;
    }

    /**
     * Enable session affinity.
     *
     * Generated from protobuf field <code>bool session_affinity = 38;</code>
     * @return bool
     */
    public function getSessionAffinity()
    {
        return $this->session_affinity;
    }

    /**
     * Enable session affinity.
     *
     * Generated from protobuf field <code>bool session_affinity = 38;</code>
     * @param bool $var
     * @return $this
     */
    public function setSessionAffinity($var)
    {
        GPBUtil::checkBool($var);
        $this->session_affinity = $var;

        return $this;
    }

    /**
     * Output only. The current effective scaling settings for the revision.
     *
     * Generated from protobuf field <code>.google.cloud.run.v2.RevisionScalingStatus scaling_status = 39 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Cloud\Run\V2\RevisionScalingStatus|null
     */
    public function getScalingStatus()
    {
        return $this->scaling_status;
    }

    public function hasScalingStatus()
    {
        return isset($this->scaling_status);
    }

    public function clearScalingStatus()
    {
        unset($this->scaling_status);
    }

    /**
     * Output only. The current effective scaling settings for the revision.
     *
     * Generated from protobuf field <code>.google.cloud.run.v2.RevisionScalingStatus scaling_status = 39 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Cloud\Run\V2\RevisionScalingStatus $var
     * @return $this
     */
    public function setScalingStatus($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Run\V2\RevisionScalingStatus::class);
        $this->scaling_status = $var;

        return $this;
    }

    /**
     * Output only. A system-generated fingerprint for this version of the
     * resource. May be used to detect modification conflict during updates.
     *
     * Generated from protobuf field <code>string etag = 99 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getEtag()
    {
        return $this->etag;
    }

    /**
     * Output only. A system-generated fingerprint for this version of the
     * resource. May be used to detect modification conflict during updates.
     *
     * Generated from protobuf field <code>string etag = 99 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setEtag($var)
    {
        GPBUtil::checkString($var, True);
        $this->etag = $var;

        return $this;
    }

}

