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

/// Modify Entry request using permissions in the source system.
public struct ModifyEntryRequest: Codable, Equatable, GoogleCloudWkt._AnyPackable,
  Sendable
{
  /// Required. The project to which the request should be attributed in the
  /// following form: `projects/{project}/locations/{location}`.
  public var name: Swift.String = Swift.String()

  /// Required. The entry to modify.
  public var entry: Entry? = nil

  /// Optional. Mask of fields to update. To update Aspects, the update_mask must
  /// contain the value "aspects".
  ///
  /// If the update_mask is empty, the service will update all modifiable fields
  /// present in the request.
  public var updateMask: GoogleCloudWkt.FieldMask? = nil

  /// Optional. If set to true, any aspects not specified in the request will be
  /// deleted. The default is false.
  public var deleteMissingAspects: Swift.Bool = Swift.Bool()

  /// Optional. The aspect keys which the service should modify. It supports
  /// the following syntaxes:
  ///
  /// * `<aspect_type_reference>` - matches an aspect of the given type and empty
  /// path.
  /// * `<aspect_type_reference>@path` - matches an aspect of the given type and
  /// specified path. For example, to attach an aspect to a field that is
  /// specified by the `schema` aspect, the path should have the format
  /// `Schema.<field_name>`.
  /// * `<aspect_type_reference>@*` - matches aspects of the given type for all
  /// paths.
  /// * `*@path` - matches aspects of all types on the given path.
  ///
  /// The service will not remove existing aspects matching the syntax unless
  /// `delete_missing_aspects` is set to true.
  ///
  /// If this field is left empty, the service treats it as specifying
  /// exactly those Aspects present in the request.
  public var aspectKeys: [Swift.String] = []

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