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

namespace Google\Cloud\NetworkManagement\V1;

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

/**
 * Request for the `UpdateVpcFlowLogsConfig` method.
 *
 * Generated from protobuf message <code>google.cloud.networkmanagement.v1.UpdateVpcFlowLogsConfigRequest</code>
 */
class UpdateVpcFlowLogsConfigRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. Mask of fields to update. At least one path must be supplied in
     * this field.
     * For example, to change the state of the configuration to ENABLED, specify
     *   `update_mask` = `"state"`, and the `vpc_flow_logs_config` would be:
     *   `vpc_flow_logs_config = {
     *     name =
     *     "projects/my-project/locations/global/vpcFlowLogsConfigs/my-config"
     *     state = "ENABLED" }`
     *
     * Generated from protobuf field <code>.google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $update_mask = null;
    /**
     * Required. Only fields specified in update_mask are updated.
     *
     * Generated from protobuf field <code>.google.cloud.networkmanagement.v1.VpcFlowLogsConfig vpc_flow_logs_config = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $vpc_flow_logs_config = null;

    /**
     * @param \Google\Cloud\NetworkManagement\V1\VpcFlowLogsConfig $vpcFlowLogsConfig Required. Only fields specified in update_mask are updated.
     * @param \Google\Protobuf\FieldMask                           $updateMask        Required. Mask of fields to update. At least one path must be supplied in
     *                                                                                this field.
     *                                                                                For example, to change the state of the configuration to ENABLED, specify
     *                                                                                `update_mask` = `"state"`, and the `vpc_flow_logs_config` would be:
     *                                                                                `vpc_flow_logs_config = {
     *                                                                                name =
     *                                                                                "projects/my-project/locations/global/vpcFlowLogsConfigs/my-config"
     *                                                                                state = "ENABLED" }`
     *
     * @return \Google\Cloud\NetworkManagement\V1\UpdateVpcFlowLogsConfigRequest
     *
     * @experimental
     */
    public static function build(\Google\Cloud\NetworkManagement\V1\VpcFlowLogsConfig $vpcFlowLogsConfig, \Google\Protobuf\FieldMask $updateMask): self
    {
        return (new self())
            ->setVpcFlowLogsConfig($vpcFlowLogsConfig)
            ->setUpdateMask($updateMask);
    }

    /**
     * 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.
     *           For example, to change the state of the configuration to ENABLED, specify
     *             `update_mask` = `"state"`, and the `vpc_flow_logs_config` would be:
     *             `vpc_flow_logs_config = {
     *               name =
     *               "projects/my-project/locations/global/vpcFlowLogsConfigs/my-config"
     *               state = "ENABLED" }`
     *     @type \Google\Cloud\NetworkManagement\V1\VpcFlowLogsConfig $vpc_flow_logs_config
     *           Required. Only fields specified in update_mask are updated.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Networkmanagement\V1\VpcFlowLogs::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. Mask of fields to update. At least one path must be supplied in
     * this field.
     * For example, to change the state of the configuration to ENABLED, specify
     *   `update_mask` = `"state"`, and the `vpc_flow_logs_config` would be:
     *   `vpc_flow_logs_config = {
     *     name =
     *     "projects/my-project/locations/global/vpcFlowLogsConfigs/my-config"
     *     state = "ENABLED" }`
     *
     * 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.
     * For example, to change the state of the configuration to ENABLED, specify
     *   `update_mask` = `"state"`, and the `vpc_flow_logs_config` would be:
     *   `vpc_flow_logs_config = {
     *     name =
     *     "projects/my-project/locations/global/vpcFlowLogsConfigs/my-config"
     *     state = "ENABLED" }`
     *
     * 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.VpcFlowLogsConfig vpc_flow_logs_config = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Cloud\NetworkManagement\V1\VpcFlowLogsConfig|null
     */
    public function getVpcFlowLogsConfig()
    {
        return $this->vpc_flow_logs_config;
    }

    public function hasVpcFlowLogsConfig()
    {
        return isset($this->vpc_flow_logs_config);
    }

    public function clearVpcFlowLogsConfig()
    {
        unset($this->vpc_flow_logs_config);
    }

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

        return $this;
    }

}

