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

namespace Google\Cloud\BareMetalSolution\V2;

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

/**
 * Message requesting rename of a server.
 *
 * Generated from protobuf message <code>google.cloud.baremetalsolution.v2.RenameNetworkRequest</code>
 */
class RenameNetworkRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The `name` field is used to identify the network.
     * Format: projects/{project}/locations/{location}/networks/{network}
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    private $name = '';
    /**
     * Required. The new `id` of the network.
     *
     * Generated from protobuf field <code>string new_network_id = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $new_network_id = '';

    /**
     * @param string $name         Required. The `name` field is used to identify the network.
     *                             Format: projects/{project}/locations/{location}/networks/{network}
     *                             Please see {@see BareMetalSolutionClient::networkName()} for help formatting this field.
     * @param string $newNetworkId Required. The new `id` of the network.
     *
     * @return \Google\Cloud\BareMetalSolution\V2\RenameNetworkRequest
     *
     * @experimental
     */
    public static function build(string $name, string $newNetworkId): self
    {
        return (new self())
            ->setName($name)
            ->setNewNetworkId($newNetworkId);
    }

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Required. The `name` field is used to identify the network.
     *           Format: projects/{project}/locations/{location}/networks/{network}
     *     @type string $new_network_id
     *           Required. The new `id` of the network.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Network::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The `name` field is used to identify the network.
     * Format: projects/{project}/locations/{location}/networks/{network}
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Required. The `name` field is used to identify the network.
     * Format: projects/{project}/locations/{location}/networks/{network}
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * Required. The new `id` of the network.
     *
     * Generated from protobuf field <code>string new_network_id = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getNewNetworkId()
    {
        return $this->new_network_id;
    }

    /**
     * Required. The new `id` of the network.
     *
     * Generated from protobuf field <code>string new_network_id = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setNewNetworkId($var)
    {
        GPBUtil::checkString($var, True);
        $this->new_network_id = $var;

        return $this;
    }

}

