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

/// LocalNvmeSsdBlockConfig contains configuration for using raw-block local
/// NVMe SSDs
public struct LocalNvmeSsdBlockConfig: Codable, Equatable, GoogleCloudWkt._AnyPackable,
  Sendable
{
  /// Number of local NVMe SSDs to use.  The limit for this value is dependent
  /// upon the maximum number of disk available on a machine per zone. See:
  /// https://cloud.google.com/compute/docs/disks/local-ssd
  /// for more information.
  ///
  /// A zero (or unset) value has different meanings depending on machine type
  /// being used:
  /// 1. For pre-Gen3 machines, which support flexible numbers of local ssds,
  /// zero (or unset) means to disable using local SSDs as ephemeral storage.
  /// 2. For Gen3 machines which dictate a specific number of local ssds, zero
  /// (or unset) means to use the default number of local ssds that goes with
  /// that machine type. For example, for a c3-standard-8-lssd machine, 2 local
  /// ssds would be provisioned. For c3-standard-8 (which doesn't support local
  /// ssds), 0 will be provisioned. See
  /// https://cloud.google.com/compute/docs/disks/local-ssd#choose_number_local_ssds
  /// for more info.
  public var localSsdCount: Swift.Int32 = Swift.Int32()

  /// Initialize a new instance of `LocalNvmeSsdBlockConfig`.
  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 = LocalNvmeSsdBlockConfig().with { $0.localSsdCount = ... }
  /// ```
  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.container.v1.LocalNvmeSsdBlockConfig"
  }
  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)
  }
}
