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

namespace Google\Cloud\CloudDms\V1;

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

/**
 * The details needed to configure a reverse SSH tunnel between the source and
 * destination databases. These details will be used when calling the
 * generateSshScript method (see
 * https://cloud.google.com/database-migration/docs/reference/rest/v1/projects.locations.migrationJobs/generateSshScript)
 * to produce the script that will help set up the reverse SSH tunnel, and to
 * set up the VPC peering between the Cloud SQL private network and the VPC.
 *
 * Generated from protobuf message <code>google.cloud.clouddms.v1.ReverseSshConnectivity</code>
 */
class ReverseSshConnectivity extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The IP of the virtual machine (Compute Engine) used as the bastion server
     * for the SSH tunnel.
     *
     * Generated from protobuf field <code>string vm_ip = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $vm_ip = '';
    /**
     * Required. The forwarding port of the virtual machine (Compute Engine) used as the
     * bastion server for the SSH tunnel.
     *
     * Generated from protobuf field <code>int32 vm_port = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $vm_port = 0;
    /**
     * The name of the virtual machine (Compute Engine) used as the bastion server
     * for the SSH tunnel.
     *
     * Generated from protobuf field <code>string vm = 3;</code>
     */
    private $vm = '';
    /**
     * The name of the VPC to peer with the Cloud SQL private network.
     *
     * Generated from protobuf field <code>string vpc = 4;</code>
     */
    private $vpc = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $vm_ip
     *           Required. The IP of the virtual machine (Compute Engine) used as the bastion server
     *           for the SSH tunnel.
     *     @type int $vm_port
     *           Required. The forwarding port of the virtual machine (Compute Engine) used as the
     *           bastion server for the SSH tunnel.
     *     @type string $vm
     *           The name of the virtual machine (Compute Engine) used as the bastion server
     *           for the SSH tunnel.
     *     @type string $vpc
     *           The name of the VPC to peer with the Cloud SQL private network.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Clouddms\V1\ClouddmsResources::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The IP of the virtual machine (Compute Engine) used as the bastion server
     * for the SSH tunnel.
     *
     * Generated from protobuf field <code>string vm_ip = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getVmIp()
    {
        return $this->vm_ip;
    }

    /**
     * Required. The IP of the virtual machine (Compute Engine) used as the bastion server
     * for the SSH tunnel.
     *
     * Generated from protobuf field <code>string vm_ip = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setVmIp($var)
    {
        GPBUtil::checkString($var, True);
        $this->vm_ip = $var;

        return $this;
    }

    /**
     * Required. The forwarding port of the virtual machine (Compute Engine) used as the
     * bastion server for the SSH tunnel.
     *
     * Generated from protobuf field <code>int32 vm_port = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getVmPort()
    {
        return $this->vm_port;
    }

    /**
     * Required. The forwarding port of the virtual machine (Compute Engine) used as the
     * bastion server for the SSH tunnel.
     *
     * Generated from protobuf field <code>int32 vm_port = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param int $var
     * @return $this
     */
    public function setVmPort($var)
    {
        GPBUtil::checkInt32($var);
        $this->vm_port = $var;

        return $this;
    }

    /**
     * The name of the virtual machine (Compute Engine) used as the bastion server
     * for the SSH tunnel.
     *
     * Generated from protobuf field <code>string vm = 3;</code>
     * @return string
     */
    public function getVm()
    {
        return $this->vm;
    }

    /**
     * The name of the virtual machine (Compute Engine) used as the bastion server
     * for the SSH tunnel.
     *
     * Generated from protobuf field <code>string vm = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setVm($var)
    {
        GPBUtil::checkString($var, True);
        $this->vm = $var;

        return $this;
    }

    /**
     * The name of the VPC to peer with the Cloud SQL private network.
     *
     * Generated from protobuf field <code>string vpc = 4;</code>
     * @return string
     */
    public function getVpc()
    {
        return $this->vpc;
    }

    /**
     * The name of the VPC to peer with the Cloud SQL private network.
     *
     * Generated from protobuf field <code>string vpc = 4;</code>
     * @param string $var
     * @return $this
     */
    public function setVpc($var)
    {
        GPBUtil::checkString($var, True);
        $this->vpc = $var;

        return $this;
    }

}

