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

#if DatasetService || JobService || ModelGardenService || ModelService || PipelineService
  import Foundation
  import GoogleCloudWkt

  /// Contains the schemata used in Model's predictions and explanations via
  /// [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict],
  /// [PredictionService.Explain][google.cloud.aiplatform.v1.PredictionService.Explain]
  /// and [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob].
  ///
  /// [google.cloud.aiplatform.v1.BatchPredictionJob]: <doc:BatchPredictionJob>
  /// [google.cloud.aiplatform.v1.PredictionService.Explain]: <doc:PredictionService/explain(request:)>
  /// [google.cloud.aiplatform.v1.PredictionService.Predict]: <doc:PredictionService/predict(request:)>
  public struct PredictSchemata: Codable, Equatable, GoogleCloudWkt._AnyPackable,
    Sendable
  {
    /// Immutable. Points to a YAML file stored on Google Cloud Storage describing
    /// the format of a single instance, which are used in
    /// [PredictRequest.instances][google.cloud.aiplatform.v1.PredictRequest.instances],
    /// [ExplainRequest.instances][google.cloud.aiplatform.v1.ExplainRequest.instances]
    /// and
    /// [BatchPredictionJob.input_config][google.cloud.aiplatform.v1.BatchPredictionJob.input_config].
    /// The schema is defined as an OpenAPI 3.0.2 [Schema
    /// Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject).
    /// AutoML Models always have this field populated by Vertex AI.
    /// Note: The URI given on output will be immutable and probably different,
    /// including the URI scheme, than the one given on input. The output URI will
    /// point to a location where the user only has a read access.
    ///
    /// [google.cloud.aiplatform.v1.BatchPredictionJob.input_config]: <doc:BatchPredictionJob/inputConfig>
    /// [google.cloud.aiplatform.v1.ExplainRequest.instances]: <doc:ExplainRequest/instances>
    /// [google.cloud.aiplatform.v1.PredictRequest.instances]: <doc:PredictRequest/instances>
    public var instanceSchemaUri: Swift.String = Swift.String()

    /// Immutable. Points to a YAML file stored on Google Cloud Storage describing
    /// the parameters of prediction and explanation via
    /// [PredictRequest.parameters][google.cloud.aiplatform.v1.PredictRequest.parameters],
    /// [ExplainRequest.parameters][google.cloud.aiplatform.v1.ExplainRequest.parameters]
    /// and
    /// [BatchPredictionJob.model_parameters][google.cloud.aiplatform.v1.BatchPredictionJob.model_parameters].
    /// The schema is defined as an OpenAPI 3.0.2 [Schema
    /// Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject).
    /// AutoML Models always have this field populated by Vertex AI, if no
    /// parameters are supported, then it is set to an empty string.
    /// Note: The URI given on output will be immutable and probably different,
    /// including the URI scheme, than the one given on input. The output URI will
    /// point to a location where the user only has a read access.
    ///
    /// [google.cloud.aiplatform.v1.BatchPredictionJob.model_parameters]: <doc:BatchPredictionJob/modelParameters>
    /// [google.cloud.aiplatform.v1.ExplainRequest.parameters]: <doc:ExplainRequest/parameters>
    /// [google.cloud.aiplatform.v1.PredictRequest.parameters]: <doc:PredictRequest/parameters>
    public var parametersSchemaUri: Swift.String = Swift.String()

    /// Immutable. Points to a YAML file stored on Google Cloud Storage describing
    /// the format of a single prediction produced by this Model, which are
    /// returned via
    /// [PredictResponse.predictions][google.cloud.aiplatform.v1.PredictResponse.predictions],
    /// [ExplainResponse.explanations][google.cloud.aiplatform.v1.ExplainResponse.explanations],
    /// and
    /// [BatchPredictionJob.output_config][google.cloud.aiplatform.v1.BatchPredictionJob.output_config].
    /// The schema is defined as an OpenAPI 3.0.2 [Schema
    /// Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject).
    /// AutoML Models always have this field populated by Vertex AI.
    /// Note: The URI given on output will be immutable and probably different,
    /// including the URI scheme, than the one given on input. The output URI will
    /// point to a location where the user only has a read access.
    ///
    /// [google.cloud.aiplatform.v1.BatchPredictionJob.output_config]: <doc:BatchPredictionJob/outputConfig>
    /// [google.cloud.aiplatform.v1.ExplainResponse.explanations]: <doc:ExplainResponse/explanations>
    /// [google.cloud.aiplatform.v1.PredictResponse.predictions]: <doc:PredictResponse/predictions>
    public var predictionSchemaUri: Swift.String = Swift.String()

    /// Initialize a new instance of `PredictSchemata`.
    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 = PredictSchemata().with { $0.instanceSchemaUri = ... }
    /// ```
    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.aiplatform.v1.PredictSchemata"
    }
    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)
    }
  }
#endif
