// 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 JobService
  import Foundation
  import GoogleCloudWkt
  import GoogleRpc

  /// Represents a Neural Architecture Search (NAS) job.
  public struct NasJob: Codable, Equatable, GoogleCloudWkt._AnyPackable,
    Sendable
  {
    /// Output only. Resource name of the NasJob.
    public var name: Swift.String = Swift.String()

    /// Required. The display name of the NasJob.
    /// The name can be up to 128 characters long and can consist of any UTF-8
    /// characters.
    public var displayName: Swift.String = Swift.String()

    /// Required. The specification of a NasJob.
    public var nasJobSpec: NasJobSpec? = nil

    /// Output only. Output of the NasJob.
    public var nasJobOutput: NasJobOutput? = nil

    /// Output only. The detailed state of the job.
    public var state: JobState = JobState()

    /// Output only. Time when the NasJob was created.
    public var createTime: GoogleCloudWkt.Timestamp? = nil

    /// Output only. Time when the NasJob for the first time entered the
    /// `JOB_STATE_RUNNING` state.
    public var startTime: GoogleCloudWkt.Timestamp? = nil

    /// Output only. Time when the NasJob entered any of the following states:
    /// `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`.
    public var endTime: GoogleCloudWkt.Timestamp? = nil

    /// Output only. Time when the NasJob was most recently updated.
    public var updateTime: GoogleCloudWkt.Timestamp? = nil

    /// Output only. Only populated when job's state is JOB_STATE_FAILED or
    /// JOB_STATE_CANCELLED.
    public var error: GoogleRpc.Status? = nil

    /// The labels with user-defined metadata to organize NasJobs.
    ///
    /// Label keys and values can be no longer than 64 characters
    /// (Unicode codepoints), can only contain lowercase letters, numeric
    /// characters, underscores and dashes. International characters are allowed.
    ///
    /// See https://goo.gl/xmQnxf for more information and examples of labels.
    public var labels: [Swift.String: Swift.String] = [:]

    /// Customer-managed encryption key options for a NasJob.
    /// If this is set, then all resources created by the NasJob
    /// will be encrypted with the provided encryption key.
    public var encryptionSpec: EncryptionSpec? = nil

    /// Optional. Enable a separation of Custom model training
    /// and restricted image training for tenant project.
    @available(*, deprecated)
    public var enableRestrictedImageTraining: Swift.Bool = Swift.Bool()

    /// Output only. Reserved for future use.
    public var satisfiesPzs: Swift.Bool = Swift.Bool()

    /// Output only. Reserved for future use.
    public var satisfiesPzi: Swift.Bool = Swift.Bool()

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