// Code generated by sidekick. DO NOT EDIT.
//
// Copyright 2026 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

import Foundation
import GoogleCloudWkt

/// The `MulticloudDataTransferConfig` resource. It lists the services that you
/// configure for Data Transfer Essentials billing and metering.
public struct MulticloudDataTransferConfig: Codable, Equatable, GoogleCloudWkt._AnyPackable,
  Sendable
{
  /// Identifier. The name of the `MulticloudDataTransferConfig` resource.
  /// Format:
  /// `projects/{project}/locations/{location}/multicloudDataTransferConfigs/{multicloud_data_transfer_config}`.
  public var name: Swift.String = Swift.String()

  /// Output only. Time when the `MulticloudDataTransferConfig` resource was
  /// created.
  public var createTime: GoogleCloudWkt.Timestamp? = nil

  /// Output only. Time when the `MulticloudDataTransferConfig` resource was
  /// updated.
  public var updateTime: GoogleCloudWkt.Timestamp? = nil

  /// Optional. User-defined labels.
  public var labels: [Swift.String: Swift.String] = [:]

  /// 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.
  public var etag: Swift.String = Swift.String()

  /// Optional. A description of this resource.
  public var description: Swift.String = Swift.String()

  /// Output only. The number of `Destination` resources configured for the
  /// `MulticloudDataTransferConfig` resource.
  public var destinationsCount: Swift.Int32 = Swift.Int32()

  /// Output only. The number of `Destination` resources in use with the
  /// `MulticloudDataTransferConfig` resource.
  public var destinationsActiveCount: Swift.Int32 = Swift.Int32()

  /// 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",
  ///       }
  ///     ]
  ///   }
  /// }
  public var services: [Swift.String: StateTimeline] = [:]

  /// 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 var uid: Swift.String = Swift.String()

  /// Initialize a new instance of `MulticloudDataTransferConfig`.
  public init() {}

  /// Use `config` to return a new instance of this object, with some fields updated.
  ///
  /// Commonly used to initialize the value, for example:
  ///
  /// ```
  /// let value = MulticloudDataTransferConfig().with { $0.name = ... }
  /// ```
  public func with(_ config: (inout Self) throws -> Swift.Void) rethrows -> Self {
    var copy = self
    try config(&copy)
    return copy
  }

  public static var _anyTypeUrl: Swift.String {
    return "type.googleapis.com/google.cloud.networkconnectivity.v1.MulticloudDataTransferConfig"
  }
  public init(fromAny any: GoogleCloudWkt.`Any`) throws {
    self = try GoogleCloudWkt._slowAnyDeserialize(Self.self, from: any)
  }
  public func _pack() throws -> GoogleCloudWkt.Struct {
    return try GoogleCloudWkt._slowAnySerialize(message: self)
  }
}
