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

/// Entry Type is a template for creating Entries.
public struct EntryType: Codable, Equatable, GoogleCloudWkt._AnyPackable,
  Sendable
{
  /// Output only. The relative resource name of the EntryType, of the form:
  /// projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}.
  public var name: Swift.String = Swift.String()

  /// Output only. System generated globally unique ID for the EntryType. This ID
  /// will be different if the EntryType is deleted and re-created with the same
  /// name.
  public var uid: Swift.String = Swift.String()

  /// Output only. The time when the EntryType was created.
  public var createTime: GoogleCloudWkt.Timestamp? = nil

  /// Output only. The time when the EntryType was last updated.
  public var updateTime: GoogleCloudWkt.Timestamp? = nil

  /// Optional. Description of the EntryType.
  public var description: Swift.String = Swift.String()

  /// Optional. User friendly display name.
  public var displayName: Swift.String = Swift.String()

  /// Optional. User-defined labels for the EntryType.
  public var labels: [Swift.String: Swift.String] = [:]

  /// Optional. This checksum is computed by the service, and might be sent on
  /// update and delete requests to ensure the client has an up-to-date value
  /// before proceeding.
  public var etag: Swift.String = Swift.String()

  /// Optional. Indicates the classes this Entry Type belongs to, for example,
  /// TABLE, DATABASE, MODEL.
  public var typeAliases: [Swift.String] = []

  /// Optional. The platform that Entries of this type belongs to.
  public var platform: Swift.String = Swift.String()

  /// Optional. The system that Entries of this type belongs to. Examples include
  /// CloudSQL, MariaDB etc
  public var system: Swift.String = Swift.String()

  /// AspectInfo for the entry type.
  public var requiredAspects: [EntryType.AspectInfo] = []

  /// Immutable. Authorization defined for this type.
  public var authorization: EntryType.Authorization? = nil

  /// Initialize a new instance of `EntryType`.
  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 = EntryType().with { $0.name = ... }
  /// ```
  public func with(_ config: (inout Self) throws -> Swift.Void) rethrows -> Self {
    var copy = self
    try config(&copy)
    return copy
  }

  public struct AspectInfo: Codable, Equatable, GoogleCloudWkt._AnyPackable,
    Sendable
  {
    /// Required aspect type for the entry type.
    public var type: Swift.String = Swift.String()

    /// Initialize a new instance of `AspectInfo`.
    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 = AspectInfo().with { $0.type = ... }
    /// ```
    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.dataplex.v1.EntryType.AspectInfo"
    }
    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)
    }
  }

  /// Authorization for an Entry Type.
  public struct Authorization: Codable, Equatable, GoogleCloudWkt._AnyPackable,
    Sendable
  {
    /// Immutable. The IAM permission grantable on the Entry Group to allow
    /// access to instantiate Entries of Dataplex Universal Catalog owned Entry
    /// Types, only settable for Dataplex Universal Catalog owned Types.
    public var alternateUsePermission: Swift.String = Swift.String()

    /// Initialize a new instance of `Authorization`.
    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 = Authorization().with { $0.alternateUsePermission = ... }
    /// ```
    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.dataplex.v1.EntryType.Authorization"
    }
    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)
    }
  }

  public static var _anyTypeUrl: Swift.String {
    return "type.googleapis.com/google.cloud.dataplex.v1.EntryType"
  }
  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)
  }
}
