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

/// AzureOpenIdConfig is an OIDC discovery document for the cluster.
/// See the OpenID Connect Discovery 1.0 specification for details.
@available(*, deprecated)
public struct AzureOpenIdConfig: Codable, Equatable, GoogleCloudWkt._AnyPackable,
  Sendable
{
  /// OIDC Issuer.
  public var issuer: Swift.String = Swift.String()

  /// JSON Web Key uri.
  public var jwksUri: Swift.String = Swift.String()

  /// Supported response types.
  public var responseTypesSupported: [Swift.String] = []

  /// Supported subject types.
  public var subjectTypesSupported: [Swift.String] = []

  /// supported ID Token signing Algorithms.
  public var idTokenSigningAlgValuesSupported: [Swift.String] = []

  /// Supported claims.
  public var claimsSupported: [Swift.String] = []

  /// Supported grant types.
  public var grantTypes: [Swift.String] = []

  /// Initialize a new instance of `AzureOpenIdConfig`.
  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 = AzureOpenIdConfig().with { $0.issuer = ... }
  /// ```
  public func with(_ config: (inout Self) throws -> Swift.Void) rethrows -> Self {
    var copy = self
    try config(&copy)
    return copy
  }

  private enum CodingKeys: Swift.String, CodingKey {
    case issuer = "issuer"
    case jwksUri = "jwks_uri"
    case responseTypesSupported = "response_types_supported"
    case subjectTypesSupported = "subject_types_supported"
    case idTokenSigningAlgValuesSupported = "id_token_signing_alg_values_supported"
    case claimsSupported = "claims_supported"
    case grantTypes = "grant_types"
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
    self.issuer = try container.decode(Swift.String.self, forKey: .issuer)
    self.jwksUri = try container.decode(Swift.String.self, forKey: .jwksUri)
    self.responseTypesSupported = try container.decode(
      [Swift.String].self, forKey: .responseTypesSupported)
    self.subjectTypesSupported = try container.decode(
      [Swift.String].self, forKey: .subjectTypesSupported)
    self.idTokenSigningAlgValuesSupported = try container.decode(
      [Swift.String].self, forKey: .idTokenSigningAlgValuesSupported)
    self.claimsSupported = try container.decode([Swift.String].self, forKey: .claimsSupported)
    self.grantTypes = try container.decode([Swift.String].self, forKey: .grantTypes)
  }

  public func encode(to encoder: Encoder) throws {
    var container = encoder.container(keyedBy: CodingKeys.self)
    try container.encode(self.issuer, forKey: .issuer)
    try container.encode(self.jwksUri, forKey: .jwksUri)
    try container.encode(self.responseTypesSupported, forKey: .responseTypesSupported)
    try container.encode(self.subjectTypesSupported, forKey: .subjectTypesSupported)
    try container.encode(
      self.idTokenSigningAlgValuesSupported, forKey: .idTokenSigningAlgValuesSupported)
    try container.encode(self.claimsSupported, forKey: .claimsSupported)
    try container.encode(self.grantTypes, forKey: .grantTypes)
  }

  public static var _anyTypeUrl: Swift.String {
    return "type.googleapis.com/google.cloud.gkemulticloud.v1.AzureOpenIdConfig"
  }
  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)
  }
}
