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

namespace Google\Cloud\Config\V1;

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

/**
 * Configuration for a value sourced from a Deployment.
 *
 * Generated from protobuf message <code>google.cloud.config.v1.DeploymentSource</code>
 */
class DeploymentSource extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The resource name of the source Deployment to import the output
     * from. Format:
     * projects/{project}/locations/{location}/deployments/{deployment} The source
     * deployment must be in the same project and location.
     *
     * Generated from protobuf field <code>string deployment = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    protected $deployment = '';
    /**
     * Required. The name of the output variable in the source deployment's latest
     * successfully applied revision.
     *
     * Generated from protobuf field <code>string output_name = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $output_name = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $deployment
     *           Required. The resource name of the source Deployment to import the output
     *           from. Format:
     *           projects/{project}/locations/{location}/deployments/{deployment} The source
     *           deployment must be in the same project and location.
     *     @type string $output_name
     *           Required. The name of the output variable in the source deployment's latest
     *           successfully applied revision.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Config\V1\Config::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The resource name of the source Deployment to import the output
     * from. Format:
     * projects/{project}/locations/{location}/deployments/{deployment} The source
     * deployment must be in the same project and location.
     *
     * Generated from protobuf field <code>string deployment = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getDeployment()
    {
        return $this->deployment;
    }

    /**
     * Required. The resource name of the source Deployment to import the output
     * from. Format:
     * projects/{project}/locations/{location}/deployments/{deployment} The source
     * deployment must be in the same project and location.
     *
     * Generated from protobuf field <code>string deployment = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setDeployment($var)
    {
        GPBUtil::checkString($var, True);
        $this->deployment = $var;

        return $this;
    }

    /**
     * Required. The name of the output variable in the source deployment's latest
     * successfully applied revision.
     *
     * Generated from protobuf field <code>string output_name = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getOutputName()
    {
        return $this->output_name;
    }

    /**
     * Required. The name of the output variable in the source deployment's latest
     * successfully applied revision.
     *
     * Generated from protobuf field <code>string output_name = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setOutputName($var)
    {
        GPBUtil::checkString($var, True);
        $this->output_name = $var;

        return $this;
    }

}

