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

namespace Google\Cloud\NetworkManagement\V1;

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

/**
 * Request for the `UpdateConnectivityTest` method.
 *
 * Generated from protobuf message <code>google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest</code>
 */
class UpdateConnectivityTestRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. Mask of fields to update. At least one path must be supplied in
     * this field.
     *
     * Generated from protobuf field <code>.google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $update_mask = null;
    /**
     * Required. Only fields specified in update_mask are updated.
     *
     * Generated from protobuf field <code>.google.cloud.networkmanagement.v1.ConnectivityTest resource = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $resource = null;

    /**
     * @param \Google\Protobuf\FieldMask                          $updateMask Required. Mask of fields to update. At least one path must be supplied in
     *                                                                        this field.
     * @param \Google\Cloud\NetworkManagement\V1\ConnectivityTest $resource   Required. Only fields specified in update_mask are updated.
     *
     * @return \Google\Cloud\NetworkManagement\V1\UpdateConnectivityTestRequest
     *
     * @experimental
     */
    public static function build(\Google\Protobuf\FieldMask $updateMask, \Google\Cloud\NetworkManagement\V1\ConnectivityTest $resource): self
    {
        return (new self())
            ->setUpdateMask($updateMask)
            ->setResource($resource);
    }

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Protobuf\FieldMask $update_mask
     *           Required. Mask of fields to update. At least one path must be supplied in
     *           this field.
     *     @type \Google\Cloud\NetworkManagement\V1\ConnectivityTest $resource
     *           Required. Only fields specified in update_mask are updated.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Networkmanagement\V1\Reachability::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. Mask of fields to update. At least one path must be supplied in
     * this field.
     *
     * Generated from protobuf field <code>.google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Protobuf\FieldMask|null
     */
    public function getUpdateMask()
    {
        return $this->update_mask;
    }

    public function hasUpdateMask()
    {
        return isset($this->update_mask);
    }

    public function clearUpdateMask()
    {
        unset($this->update_mask);
    }

    /**
     * Required. Mask of fields to update. At least one path must be supplied in
     * this field.
     *
     * Generated from protobuf field <code>.google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Protobuf\FieldMask $var
     * @return $this
     */
    public function setUpdateMask($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class);
        $this->update_mask = $var;

        return $this;
    }

    /**
     * Required. Only fields specified in update_mask are updated.
     *
     * Generated from protobuf field <code>.google.cloud.networkmanagement.v1.ConnectivityTest resource = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Cloud\NetworkManagement\V1\ConnectivityTest|null
     */
    public function getResource()
    {
        return $this->resource;
    }

    public function hasResource()
    {
        return isset($this->resource);
    }

    public function clearResource()
    {
        unset($this->resource);
    }

    /**
     * Required. Only fields specified in update_mask are updated.
     *
     * Generated from protobuf field <code>.google.cloud.networkmanagement.v1.ConnectivityTest resource = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Cloud\NetworkManagement\V1\ConnectivityTest $var
     * @return $this
     */
    public function setResource($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\ConnectivityTest::class);
        $this->resource = $var;

        return $this;
    }

}

