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

/// This field informs Fleet-based applications/services/UIs with the necessary
/// information for where each underlying Cluster reports its metrics.
public struct MonitoringConfig: Codable, Equatable, GoogleCloudWkt._AnyPackable,
  Sendable
{
  /// Immutable. Project used to report Metrics
  public var projectId: Swift.String = Swift.String()

  /// Immutable. Location used to report Metrics
  public var location: Swift.String = Swift.String()

  /// Immutable. Cluster name used to report metrics.
  /// For Anthos on VMWare/Baremetal, it would be in format
  /// `memberClusters/cluster_name`; And for Anthos on MultiCloud, it would be in
  /// format
  /// `{azureClusters, awsClusters}/cluster_name`.
  public var cluster: Swift.String = Swift.String()

  /// Kubernetes system metrics, if available, are written to this prefix.
  /// This defaults to kubernetes.io for GKE, and kubernetes.io/anthos for Anthos
  /// eventually. Noted: Anthos MultiCloud will have kubernetes.io prefix today
  /// but will migration to be under kubernetes.io/anthos
  public var kubernetesMetricsPrefix: Swift.String = Swift.String()

  /// Immutable. Cluster hash, this is a unique string generated by google code,
  /// which does not contain any PII, which we can use to reference the cluster.
  /// This is expected to be created by the monitoring stack and persisted into
  /// the Cluster object as well as to GKE-Hub.
  public var clusterHash: Swift.String = Swift.String()

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