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

/// A GlossaryCategory represents a collection of GlossaryCategories and
/// GlossaryTerms within a Glossary that are related to each other.
public struct GlossaryCategory: Codable, Equatable, GoogleCloudWkt._AnyPackable,
  Sendable
{
  /// Output only. Identifier. The resource name of the GlossaryCategory.
  /// Format:
  /// projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/categories/{category_id}
  public var name: Swift.String = Swift.String()

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

  /// Optional. User friendly display name of the GlossaryCategory. This is
  /// user-mutable. This will be same as the GlossaryCategoryId, if not
  /// specified.
  public var displayName: Swift.String = Swift.String()

  /// Optional. The user-mutable description of the GlossaryCategory.
  public var description: Swift.String = Swift.String()

  /// Output only. The time at which the GlossaryCategory was created.
  public var createTime: GoogleCloudWkt.Timestamp? = nil

  /// Output only. The time at which the GlossaryCategory was last updated.
  public var updateTime: GoogleCloudWkt.Timestamp? = nil

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

  /// Required. The immediate parent of the GlossaryCategory in the
  /// resource-hierarchy. It can either be a Glossary or a GlossaryCategory.
  /// Format:
  /// projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}
  /// OR
  /// projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/categories/{category_id}
  public var parent: Swift.String = Swift.String()

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