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

namespace Google\Cloud\AlloyDb\V1;

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

/**
 * Subset of the source instance configuration that is available when reading
 * the cluster resource.
 *
 * Generated from protobuf message <code>google.cloud.alloydb.v1.MigrationSource</code>
 */
class MigrationSource extends \Google\Protobuf\Internal\Message
{
    /**
     * Output only. The host and port of the on-premises instance in host:port
     * format
     *
     * Generated from protobuf field <code>string host_port = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $host_port = '';
    /**
     * Output only. Place holder for the external source identifier(e.g DMS job
     * name) that created the cluster.
     *
     * Generated from protobuf field <code>string reference_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $reference_id = '';
    /**
     * Output only. Type of migration source.
     *
     * Generated from protobuf field <code>.google.cloud.alloydb.v1.MigrationSource.MigrationSourceType source_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $source_type = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $host_port
     *           Output only. The host and port of the on-premises instance in host:port
     *           format
     *     @type string $reference_id
     *           Output only. Place holder for the external source identifier(e.g DMS job
     *           name) that created the cluster.
     *     @type int $source_type
     *           Output only. Type of migration source.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Alloydb\V1\Resources::initOnce();
        parent::__construct($data);
    }

    /**
     * Output only. The host and port of the on-premises instance in host:port
     * format
     *
     * Generated from protobuf field <code>string host_port = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getHostPort()
    {
        return $this->host_port;
    }

    /**
     * Output only. The host and port of the on-premises instance in host:port
     * format
     *
     * Generated from protobuf field <code>string host_port = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setHostPort($var)
    {
        GPBUtil::checkString($var, True);
        $this->host_port = $var;

        return $this;
    }

    /**
     * Output only. Place holder for the external source identifier(e.g DMS job
     * name) that created the cluster.
     *
     * Generated from protobuf field <code>string reference_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getReferenceId()
    {
        return $this->reference_id;
    }

    /**
     * Output only. Place holder for the external source identifier(e.g DMS job
     * name) that created the cluster.
     *
     * Generated from protobuf field <code>string reference_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setReferenceId($var)
    {
        GPBUtil::checkString($var, True);
        $this->reference_id = $var;

        return $this;
    }

    /**
     * Output only. Type of migration source.
     *
     * Generated from protobuf field <code>.google.cloud.alloydb.v1.MigrationSource.MigrationSourceType source_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return int
     */
    public function getSourceType()
    {
        return $this->source_type;
    }

    /**
     * Output only. Type of migration source.
     *
     * Generated from protobuf field <code>.google.cloud.alloydb.v1.MigrationSource.MigrationSourceType source_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param int $var
     * @return $this
     */
    public function setSourceType($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\AlloyDb\V1\MigrationSource\MigrationSourceType::class);
        $this->source_type = $var;

        return $this;
    }

}

