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

/// Request for the `TransferDomain` method.
public struct TransferDomainRequest: Codable, Equatable, GoogleCloudWkt._AnyPackable,
  Sendable
{
  /// Required. The parent resource of the `Registration`. Must be in the
  /// format `projects/*/locations/*`.
  public var parent: Swift.String = Swift.String()

  /// Required. The complete `Registration` resource to be created.
  ///
  /// You can leave `registration.dns_settings` unset to import the
  /// domain's current DNS configuration from its current registrar. Use this
  /// option only if you are sure that the domain's current DNS service
  /// does not cease upon transfer, as is often the case for DNS services
  /// provided for free by the registrar.
  public var registration: Registration? = nil

  /// The list of contact notices that you acknowledge. The notices
  /// needed here depend on the values specified in
  /// `registration.contact_settings`.
  public var contactNotices: [ContactNotice] = []

  /// Required. Acknowledgement of the price to transfer or renew the domain for one year.
  /// Call `RetrieveTransferParameters` to obtain the price, which you must
  /// acknowledge.
  public var yearlyPrice: GoogleType.Money? = nil

  /// The domain's transfer authorization code. You can obtain this from the
  /// domain's current registrar.
  public var authorizationCode: AuthorizationCode? = nil

  /// Validate the request without actually transferring the domain.
  public var validateOnly: Swift.Bool = Swift.Bool()

  /// Initialize a new instance of `TransferDomainRequest`.
  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 = TransferDomainRequest().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.domains.v1.TransferDomainRequest"
  }
  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)
  }
}
