// 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 PredictionService
  import Foundation
  import GoogleCloudWkt

  /// Request message for
  /// [PredictionService.StreamDirectRawPredict][google.cloud.aiplatform.v1.PredictionService.StreamDirectRawPredict].
  ///
  /// The first message must contain
  /// [endpoint][google.cloud.aiplatform.v1.StreamDirectRawPredictRequest.endpoint]
  /// and
  /// [method_name][google.cloud.aiplatform.v1.StreamDirectRawPredictRequest.method_name]
  /// fields and optionally
  /// [input][google.cloud.aiplatform.v1.StreamDirectRawPredictRequest.input]. The
  /// subsequent messages must contain
  /// [input][google.cloud.aiplatform.v1.StreamDirectRawPredictRequest.input].
  /// [method_name][google.cloud.aiplatform.v1.StreamDirectRawPredictRequest.method_name]
  /// in the subsequent messages have no effect.
  ///
  /// [google.cloud.aiplatform.v1.PredictionService.StreamDirectRawPredict]: <doc:PredictionService/streamDirectRawPredict(request:)>
  /// [google.cloud.aiplatform.v1.StreamDirectRawPredictRequest.endpoint]: <doc:StreamDirectRawPredictRequest/endpoint>
  /// [google.cloud.aiplatform.v1.StreamDirectRawPredictRequest.input]: <doc:StreamDirectRawPredictRequest/input>
  /// [google.cloud.aiplatform.v1.StreamDirectRawPredictRequest.method_name]: <doc:StreamDirectRawPredictRequest/methodName>
  public struct StreamDirectRawPredictRequest: Codable, Equatable, GoogleCloudWkt._AnyPackable,
    Sendable
  {
    /// Required. The name of the Endpoint requested to serve the prediction.
    /// Format:
    /// `projects/{project}/locations/{location}/endpoints/{endpoint}`
    public var endpoint: Swift.String = Swift.String()

    /// Optional. Fully qualified name of the API method being invoked to perform
    /// predictions.
    ///
    /// Format:
    /// `/namespace.Service/Method/`
    /// Example:
    /// `/tensorflow.serving.PredictionService/Predict`
    public var methodName: Swift.String = Swift.String()

    /// Optional. The prediction input.
    public var input: Foundation.Data = Foundation.Data()

    /// Initialize a new instance of `StreamDirectRawPredictRequest`.
    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 = StreamDirectRawPredictRequest().with { $0.endpoint = ... }
    /// ```
    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.StreamDirectRawPredictRequest"
    }
    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
