// 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.

#if InterconnectGroups
  import Foundation
  import GoogleCloudWkt

  /// An interconnect group resource allows customers to create, analyze, and
  /// expand their redundant connections.
  public struct InterconnectGroup: Codable, Equatable, GoogleCloudWkt._AnyPackable,
    Sendable
  {
    public var configured: InterconnectGroupConfigured? = nil

    /// Output only. [Output Only] Creation timestamp inRFC3339
    /// text format.
    public var creationTimestamp: Swift.String? = nil

    /// An optional description of this resource. Provide this property when you
    /// create the resource.
    public var description: Swift.String? = nil

    /// Opaque system-generated token that uniquely identifies the configuration.
    /// If provided when patching a configuration in update mode, the provided
    /// token must match the current token or the update is rejected. This provides
    /// a reliable means of doing read-modify-write (optimistic locking) as
    /// described by AIP 154.
    public var etag: Swift.String? = nil

    /// Output only. [Output Only] The unique identifier for the resource type. The server
    /// generates this identifier.
    public var id: Swift.UInt64? = nil

    public var intent: InterconnectGroupIntent? = nil

    /// Interconnects in the InterconnectGroup. Keys are arbitrary user-specified
    /// strings. Users are encouraged, but not required, to use their preferred
    /// format for resource links as keys.
    /// Note that there are add-members and remove-members methods in gcloud.
    /// The size of this map is limited by an "Interconnects per group" quota.
    public var interconnects: [Swift.String: InterconnectGroupInterconnect] = [:]

    /// Output only. [Output Only] Type of the resource. Always compute#InterconnectGroup
    public var kind: Swift.String? = nil

    /// Name of the resource. Provided by the client when the resource is created.
    /// The name must be 1-63 characters long, and comply withRFC1035.
    /// Specifically, the name must be 1-63 characters long and match the regular
    /// expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first
    /// character must be a lowercase letter, and all following characters must
    /// be a dash, lowercase letter, or digit, except the last character, which
    /// cannot be a dash.
    public var name: Swift.String? = nil

    public var physicalStructure: InterconnectGroupPhysicalStructure? = nil

    /// Output only. [Output Only] Server-defined URL for the resource.
    public var selfLink: Swift.String? = nil

    /// Initialize a new instance of `InterconnectGroup`.
    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 = InterconnectGroup().with { $0.configured = ... }
    /// ```
    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.compute.v1.InterconnectGroup"
    }
    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)
    }
  }
#endif
