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

namespace Google\Cloud\NetworkConnectivity\V1;

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

/**
 * The `MulticloudDataTransferConfig` resource. It lists the services that you
 * configure for Data Transfer Essentials billing and metering.
 *
 * Generated from protobuf message <code>google.cloud.networkconnectivity.v1.MulticloudDataTransferConfig</code>
 */
class MulticloudDataTransferConfig extends \Google\Protobuf\Internal\Message
{
    /**
     * Identifier. The name of the `MulticloudDataTransferConfig` resource.
     * Format:
     * `projects/{project}/locations/{location}/multicloudDataTransferConfigs/{multicloud_data_transfer_config}`.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = IDENTIFIER];</code>
     */
    protected $name = '';
    /**
     * Output only. Time when the `MulticloudDataTransferConfig` resource was
     * created.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $create_time = null;
    /**
     * Output only. Time when the `MulticloudDataTransferConfig` resource was
     * updated.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $update_time = null;
    /**
     * Optional. User-defined labels.
     *
     * Generated from protobuf field <code>map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $labels;
    /**
     * The etag is computed by the server, and might be sent with update and
     * delete requests so that the client has an up-to-date value before
     * proceeding.
     *
     * Generated from protobuf field <code>string etag = 5;</code>
     */
    protected $etag = '';
    /**
     * Optional. A description of this resource.
     *
     * Generated from protobuf field <code>string description = 6 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $description = '';
    /**
     * Output only. The number of `Destination` resources configured for the
     * `MulticloudDataTransferConfig` resource.
     *
     * Generated from protobuf field <code>int32 destinations_count = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $destinations_count = 0;
    /**
     * Output only. The number of `Destination` resources in use with the
     * `MulticloudDataTransferConfig` resource.
     *
     * Generated from protobuf field <code>int32 destinations_active_count = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $destinations_active_count = 0;
    /**
     * Optional. Maps services to their current or planned states. Service names
     * are keys, and the associated values describe the state of the service. If a
     * state change is expected, the value is either `ADDING` or `DELETING`,
     * depending on the actions taken.
     * Sample output:
     * "services": {
     *   "big-query": {
     *     "states": [
     *       {
     *         "effectiveTime": "2024-12-12T08:00:00Z"
     *         "state": "ADDING",
     *       },
     *     ]
     *   },
     *   "cloud-storage": {
     *     "states": [
     *       {
     *         "state": "ACTIVE",
     *       }
     *     ]
     *   }
     * }
     *
     * Generated from protobuf field <code>map<string, .google.cloud.networkconnectivity.v1.StateTimeline> services = 9 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $services;
    /**
     * Output only. The Google-generated unique ID for the
     * `MulticloudDataTransferConfig` resource. This value is unique across all
     * `MulticloudDataTransferConfig` resources. If a resource is deleted and
     * another with the same name is created, the new resource is assigned a
     * different and unique ID.
     *
     * Generated from protobuf field <code>string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = {</code>
     */
    protected $uid = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Identifier. The name of the `MulticloudDataTransferConfig` resource.
     *           Format:
     *           `projects/{project}/locations/{location}/multicloudDataTransferConfigs/{multicloud_data_transfer_config}`.
     *     @type \Google\Protobuf\Timestamp $create_time
     *           Output only. Time when the `MulticloudDataTransferConfig` resource was
     *           created.
     *     @type \Google\Protobuf\Timestamp $update_time
     *           Output only. Time when the `MulticloudDataTransferConfig` resource was
     *           updated.
     *     @type array|\Google\Protobuf\Internal\MapField $labels
     *           Optional. User-defined labels.
     *     @type string $etag
     *           The etag is computed by the server, and might be sent with update and
     *           delete requests so that the client has an up-to-date value before
     *           proceeding.
     *     @type string $description
     *           Optional. A description of this resource.
     *     @type int $destinations_count
     *           Output only. The number of `Destination` resources configured for the
     *           `MulticloudDataTransferConfig` resource.
     *     @type int $destinations_active_count
     *           Output only. The number of `Destination` resources in use with the
     *           `MulticloudDataTransferConfig` resource.
     *     @type array|\Google\Protobuf\Internal\MapField $services
     *           Optional. Maps services to their current or planned states. Service names
     *           are keys, and the associated values describe the state of the service. If a
     *           state change is expected, the value is either `ADDING` or `DELETING`,
     *           depending on the actions taken.
     *           Sample output:
     *           "services": {
     *             "big-query": {
     *               "states": [
     *                 {
     *                   "effectiveTime": "2024-12-12T08:00:00Z"
     *                   "state": "ADDING",
     *                 },
     *               ]
     *             },
     *             "cloud-storage": {
     *               "states": [
     *                 {
     *                   "state": "ACTIVE",
     *                 }
     *               ]
     *             }
     *           }
     *     @type string $uid
     *           Output only. The Google-generated unique ID for the
     *           `MulticloudDataTransferConfig` resource. This value is unique across all
     *           `MulticloudDataTransferConfig` resources. If a resource is deleted and
     *           another with the same name is created, the new resource is assigned a
     *           different and unique ID.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Networkconnectivity\V1\DataTransfer::initOnce();
        parent::__construct($data);
    }

    /**
     * Identifier. The name of the `MulticloudDataTransferConfig` resource.
     * Format:
     * `projects/{project}/locations/{location}/multicloudDataTransferConfigs/{multicloud_data_transfer_config}`.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = IDENTIFIER];</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Identifier. The name of the `MulticloudDataTransferConfig` resource.
     * Format:
     * `projects/{project}/locations/{location}/multicloudDataTransferConfigs/{multicloud_data_transfer_config}`.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = IDENTIFIER];</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * Output only. Time when the `MulticloudDataTransferConfig` resource was
     * created.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getCreateTime()
    {
        return $this->create_time;
    }

    public function hasCreateTime()
    {
        return isset($this->create_time);
    }

    public function clearCreateTime()
    {
        unset($this->create_time);
    }

    /**
     * Output only. Time when the `MulticloudDataTransferConfig` resource was
     * created.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setCreateTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->create_time = $var;

        return $this;
    }

    /**
     * Output only. Time when the `MulticloudDataTransferConfig` resource was
     * updated.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getUpdateTime()
    {
        return $this->update_time;
    }

    public function hasUpdateTime()
    {
        return isset($this->update_time);
    }

    public function clearUpdateTime()
    {
        unset($this->update_time);
    }

    /**
     * Output only. Time when the `MulticloudDataTransferConfig` resource was
     * updated.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setUpdateTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->update_time = $var;

        return $this;
    }

    /**
     * Optional. User-defined labels.
     *
     * Generated from protobuf field <code>map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Protobuf\Internal\MapField
     */
    public function getLabels()
    {
        return $this->labels;
    }

    /**
     * Optional. User-defined labels.
     *
     * Generated from protobuf field <code>map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param array|\Google\Protobuf\Internal\MapField $var
     * @return $this
     */
    public function setLabels($var)
    {
        $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
        $this->labels = $arr;

        return $this;
    }

    /**
     * The etag is computed by the server, and might be sent with update and
     * delete requests so that the client has an up-to-date value before
     * proceeding.
     *
     * Generated from protobuf field <code>string etag = 5;</code>
     * @return string
     */
    public function getEtag()
    {
        return $this->etag;
    }

    /**
     * The etag is computed by the server, and might be sent with update and
     * delete requests so that the client has an up-to-date value before
     * proceeding.
     *
     * Generated from protobuf field <code>string etag = 5;</code>
     * @param string $var
     * @return $this
     */
    public function setEtag($var)
    {
        GPBUtil::checkString($var, True);
        $this->etag = $var;

        return $this;
    }

    /**
     * Optional. A description of this resource.
     *
     * Generated from protobuf field <code>string description = 6 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getDescription()
    {
        return $this->description;
    }

    /**
     * Optional. A description of this resource.
     *
     * Generated from protobuf field <code>string description = 6 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setDescription($var)
    {
        GPBUtil::checkString($var, True);
        $this->description = $var;

        return $this;
    }

    /**
     * Output only. The number of `Destination` resources configured for the
     * `MulticloudDataTransferConfig` resource.
     *
     * Generated from protobuf field <code>int32 destinations_count = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return int
     */
    public function getDestinationsCount()
    {
        return $this->destinations_count;
    }

    /**
     * Output only. The number of `Destination` resources configured for the
     * `MulticloudDataTransferConfig` resource.
     *
     * Generated from protobuf field <code>int32 destinations_count = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param int $var
     * @return $this
     */
    public function setDestinationsCount($var)
    {
        GPBUtil::checkInt32($var);
        $this->destinations_count = $var;

        return $this;
    }

    /**
     * Output only. The number of `Destination` resources in use with the
     * `MulticloudDataTransferConfig` resource.
     *
     * Generated from protobuf field <code>int32 destinations_active_count = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return int
     */
    public function getDestinationsActiveCount()
    {
        return $this->destinations_active_count;
    }

    /**
     * Output only. The number of `Destination` resources in use with the
     * `MulticloudDataTransferConfig` resource.
     *
     * Generated from protobuf field <code>int32 destinations_active_count = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param int $var
     * @return $this
     */
    public function setDestinationsActiveCount($var)
    {
        GPBUtil::checkInt32($var);
        $this->destinations_active_count = $var;

        return $this;
    }

    /**
     * Optional. Maps services to their current or planned states. Service names
     * are keys, and the associated values describe the state of the service. If a
     * state change is expected, the value is either `ADDING` or `DELETING`,
     * depending on the actions taken.
     * Sample output:
     * "services": {
     *   "big-query": {
     *     "states": [
     *       {
     *         "effectiveTime": "2024-12-12T08:00:00Z"
     *         "state": "ADDING",
     *       },
     *     ]
     *   },
     *   "cloud-storage": {
     *     "states": [
     *       {
     *         "state": "ACTIVE",
     *       }
     *     ]
     *   }
     * }
     *
     * Generated from protobuf field <code>map<string, .google.cloud.networkconnectivity.v1.StateTimeline> services = 9 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Protobuf\Internal\MapField
     */
    public function getServices()
    {
        return $this->services;
    }

    /**
     * Optional. Maps services to their current or planned states. Service names
     * are keys, and the associated values describe the state of the service. If a
     * state change is expected, the value is either `ADDING` or `DELETING`,
     * depending on the actions taken.
     * Sample output:
     * "services": {
     *   "big-query": {
     *     "states": [
     *       {
     *         "effectiveTime": "2024-12-12T08:00:00Z"
     *         "state": "ADDING",
     *       },
     *     ]
     *   },
     *   "cloud-storage": {
     *     "states": [
     *       {
     *         "state": "ACTIVE",
     *       }
     *     ]
     *   }
     * }
     *
     * Generated from protobuf field <code>map<string, .google.cloud.networkconnectivity.v1.StateTimeline> services = 9 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param array|\Google\Protobuf\Internal\MapField $var
     * @return $this
     */
    public function setServices($var)
    {
        $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkConnectivity\V1\StateTimeline::class);
        $this->services = $arr;

        return $this;
    }

    /**
     * Output only. The Google-generated unique ID for the
     * `MulticloudDataTransferConfig` resource. This value is unique across all
     * `MulticloudDataTransferConfig` resources. If a resource is deleted and
     * another with the same name is created, the new resource is assigned a
     * different and unique ID.
     *
     * Generated from protobuf field <code>string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = {</code>
     * @return string
     */
    public function getUid()
    {
        return $this->uid;
    }

    /**
     * Output only. The Google-generated unique ID for the
     * `MulticloudDataTransferConfig` resource. This value is unique across all
     * `MulticloudDataTransferConfig` resources. If a resource is deleted and
     * another with the same name is created, the new resource is assigned a
     * different and unique ID.
     *
     * Generated from protobuf field <code>string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = {</code>
     * @param string $var
     * @return $this
     */
    public function setUid($var)
    {
        GPBUtil::checkString($var, True);
        $this->uid = $var;

        return $this;
    }

}

