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

namespace Google\Cloud\Deploy\V1;

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

/**
 * Strategy contains deployment strategy information.
 *
 * Generated from protobuf message <code>google.cloud.deploy.v1.Strategy</code>
 */
class Strategy extends \Google\Protobuf\Internal\Message
{
    protected $deployment_strategy;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Deploy\V1\Standard $standard
     *           Standard deployment strategy executes a single deploy and allows
     *           verifying the deployment.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Deploy\V1\CloudDeploy::initOnce();
        parent::__construct($data);
    }

    /**
     * Standard deployment strategy executes a single deploy and allows
     * verifying the deployment.
     *
     * Generated from protobuf field <code>.google.cloud.deploy.v1.Standard standard = 1;</code>
     * @return \Google\Cloud\Deploy\V1\Standard|null
     */
    public function getStandard()
    {
        return $this->readOneof(1);
    }

    public function hasStandard()
    {
        return $this->hasOneof(1);
    }

    /**
     * Standard deployment strategy executes a single deploy and allows
     * verifying the deployment.
     *
     * Generated from protobuf field <code>.google.cloud.deploy.v1.Standard standard = 1;</code>
     * @param \Google\Cloud\Deploy\V1\Standard $var
     * @return $this
     */
    public function setStandard($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Deploy\V1\Standard::class);
        $this->writeOneof(1, $var);

        return $this;
    }

    /**
     * @return string
     */
    public function getDeploymentStrategy()
    {
        return $this->whichOneof("deployment_strategy");
    }

}

