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

/// SecurityBulletinEvent is a notification sent to customers when a security
/// bulletin has been posted that they are vulnerable to.
public struct SecurityBulletinEvent: Codable, Equatable, GoogleCloudWkt._AnyPackable,
  Sendable
{
  /// The resource type (node/control plane) that has the vulnerability. Multiple
  /// notifications (1 notification per resource type) will be sent for a
  /// vulnerability that affects > 1 resource type.
  public var resourceTypeAffected: Swift.String = Swift.String()

  /// The ID of the bulletin corresponding to the vulnerability.
  public var bulletinId: Swift.String = Swift.String()

  /// The CVEs associated with this bulletin.
  public var cveIds: [Swift.String] = []

  /// The severity of this bulletin as it relates to GKE.
  public var severity: Swift.String = Swift.String()

  /// The URI link to the bulletin on the website for more information.
  public var bulletinUri: Swift.String = Swift.String()

  /// A brief description of the bulletin. See the bulletin pointed to by the
  /// bulletin_uri field for an expanded description.
  public var briefDescription: Swift.String = Swift.String()

  /// The GKE minor versions affected by this vulnerability.
  public var affectedSupportedMinors: [Swift.String] = []

  /// The GKE versions where this vulnerability is patched.
  public var patchedVersions: [Swift.String] = []

  /// This represents a version selected from the patched_versions field that
  /// the cluster receiving this notification should most likely want to upgrade
  /// to based on its current version. Note that if this notification is being
  /// received by a given cluster, it means that this version is currently
  /// available as an upgrade target in that cluster's location.
  public var suggestedUpgradeTarget: Swift.String = Swift.String()

  /// If this field is specified, it means there are manual steps that the user
  /// must take to make their clusters safe.
  public var manualStepsRequired: Swift.Bool = Swift.Bool()

  /// The GKE versions where this vulnerability is mitigated.
  public var mitigatedVersions: [Swift.String] = []

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