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

/// An entry is a representation of a data resource that can be described by
/// various metadata.
public struct Entry: Codable, Equatable, GoogleCloudWkt._AnyPackable,
  Sendable
{
  /// Identifier. The relative resource name of the entry, in the format
  /// `projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}/entries/{entry_id}`.
  public var name: Swift.String = Swift.String()

  /// Required. Immutable. The relative resource name of the entry type that was
  /// used to create this entry, in the format
  /// `projects/{project_id_or_number}/locations/{location_id}/entryTypes/{entry_type_id}`.
  public var entryType: Swift.String = Swift.String()

  /// Output only. The time when the entry was created in Dataplex Universal
  /// Catalog.
  public var createTime: GoogleCloudWkt.Timestamp? = nil

  /// Output only. The time when the entry was last updated in Dataplex Universal
  /// Catalog.
  public var updateTime: GoogleCloudWkt.Timestamp? = nil

  /// Optional. The aspects that are attached to the entry. Depending on how the
  /// aspect is attached to the entry, the format of the aspect key can be one of
  /// the following:
  ///
  /// * If the aspect is attached directly to the entry:
  /// `{project_id_or_number}.{location_id}.{aspect_type_id}`
  /// * If the aspect is attached to an entry's path:
  /// `{project_id_or_number}.{location_id}.{aspect_type_id}@{path}`
  public var aspects: [Swift.String: Aspect] = [:]

  /// Optional. Immutable. The resource name of the parent entry, in the format
  /// `projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}/entries/{entry_id}`.
  public var parentEntry: Swift.String = Swift.String()

  /// Optional. A name for the entry that can be referenced by an external
  /// system. For more information, see [Fully qualified
  /// names](https://cloud.google.com/data-catalog/docs/fully-qualified-names).
  /// The maximum size of the field is 4000 characters.
  public var fullyQualifiedName: Swift.String = Swift.String()

  /// Optional. Information related to the source system of the data resource
  /// that is represented by the entry.
  public var entrySource: EntrySource? = nil

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