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

/// Request to update a batch of jobs.
public struct BatchUpdateJobsRequest: Codable, Equatable, GoogleCloudWkt._AnyPackable,
  Sendable
{
  /// Required. The resource name of the tenant under which the job is created.
  ///
  /// The format is "projects/{project_id}/tenants/{tenant_id}". For example,
  /// "projects/foo/tenants/bar".
  public var parent: Swift.String = Swift.String()

  /// Required. The jobs to be updated.
  /// A maximum of 200 jobs can be updated in a batch.
  public var jobs: [Job] = []

  /// Strongly recommended for the best service experience. Be aware that it will
  /// also increase latency when checking the status of a batch operation.
  ///
  /// If [update_mask][google.cloud.talent.v4.BatchUpdateJobsRequest.update_mask]
  /// is provided, only the specified fields in [Job][google.cloud.talent.v4.Job]
  /// are updated. Otherwise all the fields are updated.
  ///
  /// A field mask to restrict the fields that are updated. Only
  /// top level fields of [Job][google.cloud.talent.v4.Job] are supported.
  ///
  /// If [update_mask][google.cloud.talent.v4.BatchUpdateJobsRequest.update_mask]
  /// is provided, The [Job][google.cloud.talent.v4.Job] inside
  /// [JobResult][google.cloud.talent.v4.JobResult]
  /// will only contains fields that is updated, plus the Id of the Job.
  /// Otherwise,  [Job][google.cloud.talent.v4.Job] will include all fields,
  /// which can yield a very large response.
  ///
  /// [google.cloud.talent.v4.BatchUpdateJobsRequest.update_mask]: <doc:BatchUpdateJobsRequest/updateMask>
  /// [google.cloud.talent.v4.Job]: <doc:Job>
  /// [google.cloud.talent.v4.JobResult]: <doc:JobResult>
  public var updateMask: GoogleCloudWkt.FieldMask? = nil

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