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

namespace Google\Cloud\NetworkConnectivity\V1;

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

/**
 * The status of one or more propagated Private Service Connect connections in a
 * hub.
 *
 * Generated from protobuf message <code>google.cloud.networkconnectivity.v1.PscPropagationStatus</code>
 */
class PscPropagationStatus extends \Google\Protobuf\Internal\Message
{
    /**
     * The name of the spoke that the source forwarding rule belongs to.
     *
     * Generated from protobuf field <code>string source_spoke = 1;</code>
     */
    protected $source_spoke = '';
    /**
     * The name of the group that the source spoke belongs to.
     *
     * Generated from protobuf field <code>string source_group = 2;</code>
     */
    protected $source_group = '';
    /**
     * The name of the forwarding rule exported to the hub.
     *
     * Generated from protobuf field <code>string source_forwarding_rule = 3;</code>
     */
    protected $source_forwarding_rule = '';
    /**
     * The name of the spoke that the source forwarding rule propagates to.
     *
     * Generated from protobuf field <code>string target_spoke = 4;</code>
     */
    protected $target_spoke = '';
    /**
     * The name of the group that the target spoke belongs to.
     *
     * Generated from protobuf field <code>string target_group = 5;</code>
     */
    protected $target_group = '';
    /**
     * The propagation status.
     *
     * Generated from protobuf field <code>.google.cloud.networkconnectivity.v1.PscPropagationStatus.Code code = 6;</code>
     */
    protected $code = 0;
    /**
     * The human-readable summary of the Private Service Connect connection
     * propagation status.
     *
     * Generated from protobuf field <code>string message = 7;</code>
     */
    protected $message = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $source_spoke
     *           The name of the spoke that the source forwarding rule belongs to.
     *     @type string $source_group
     *           The name of the group that the source spoke belongs to.
     *     @type string $source_forwarding_rule
     *           The name of the forwarding rule exported to the hub.
     *     @type string $target_spoke
     *           The name of the spoke that the source forwarding rule propagates to.
     *     @type string $target_group
     *           The name of the group that the target spoke belongs to.
     *     @type int $code
     *           The propagation status.
     *     @type string $message
     *           The human-readable summary of the Private Service Connect connection
     *           propagation status.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce();
        parent::__construct($data);
    }

    /**
     * The name of the spoke that the source forwarding rule belongs to.
     *
     * Generated from protobuf field <code>string source_spoke = 1;</code>
     * @return string
     */
    public function getSourceSpoke()
    {
        return $this->source_spoke;
    }

    /**
     * The name of the spoke that the source forwarding rule belongs to.
     *
     * Generated from protobuf field <code>string source_spoke = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setSourceSpoke($var)
    {
        GPBUtil::checkString($var, True);
        $this->source_spoke = $var;

        return $this;
    }

    /**
     * The name of the group that the source spoke belongs to.
     *
     * Generated from protobuf field <code>string source_group = 2;</code>
     * @return string
     */
    public function getSourceGroup()
    {
        return $this->source_group;
    }

    /**
     * The name of the group that the source spoke belongs to.
     *
     * Generated from protobuf field <code>string source_group = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setSourceGroup($var)
    {
        GPBUtil::checkString($var, True);
        $this->source_group = $var;

        return $this;
    }

    /**
     * The name of the forwarding rule exported to the hub.
     *
     * Generated from protobuf field <code>string source_forwarding_rule = 3;</code>
     * @return string
     */
    public function getSourceForwardingRule()
    {
        return $this->source_forwarding_rule;
    }

    /**
     * The name of the forwarding rule exported to the hub.
     *
     * Generated from protobuf field <code>string source_forwarding_rule = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setSourceForwardingRule($var)
    {
        GPBUtil::checkString($var, True);
        $this->source_forwarding_rule = $var;

        return $this;
    }

    /**
     * The name of the spoke that the source forwarding rule propagates to.
     *
     * Generated from protobuf field <code>string target_spoke = 4;</code>
     * @return string
     */
    public function getTargetSpoke()
    {
        return $this->target_spoke;
    }

    /**
     * The name of the spoke that the source forwarding rule propagates to.
     *
     * Generated from protobuf field <code>string target_spoke = 4;</code>
     * @param string $var
     * @return $this
     */
    public function setTargetSpoke($var)
    {
        GPBUtil::checkString($var, True);
        $this->target_spoke = $var;

        return $this;
    }

    /**
     * The name of the group that the target spoke belongs to.
     *
     * Generated from protobuf field <code>string target_group = 5;</code>
     * @return string
     */
    public function getTargetGroup()
    {
        return $this->target_group;
    }

    /**
     * The name of the group that the target spoke belongs to.
     *
     * Generated from protobuf field <code>string target_group = 5;</code>
     * @param string $var
     * @return $this
     */
    public function setTargetGroup($var)
    {
        GPBUtil::checkString($var, True);
        $this->target_group = $var;

        return $this;
    }

    /**
     * The propagation status.
     *
     * Generated from protobuf field <code>.google.cloud.networkconnectivity.v1.PscPropagationStatus.Code code = 6;</code>
     * @return int
     */
    public function getCode()
    {
        return $this->code;
    }

    /**
     * The propagation status.
     *
     * Generated from protobuf field <code>.google.cloud.networkconnectivity.v1.PscPropagationStatus.Code code = 6;</code>
     * @param int $var
     * @return $this
     */
    public function setCode($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\NetworkConnectivity\V1\PscPropagationStatus\Code::class);
        $this->code = $var;

        return $this;
    }

    /**
     * The human-readable summary of the Private Service Connect connection
     * propagation status.
     *
     * Generated from protobuf field <code>string message = 7;</code>
     * @return string
     */
    public function getMessage()
    {
        return $this->message;
    }

    /**
     * The human-readable summary of the Private Service Connect connection
     * propagation status.
     *
     * Generated from protobuf field <code>string message = 7;</code>
     * @param string $var
     * @return $this
     */
    public function setMessage($var)
    {
        GPBUtil::checkString($var, True);
        $this->message = $var;

        return $this;
    }

}

