#[non_exhaustive]pub struct InvokeModelInputBuilder { /* private fields */ }Expand description
A builder for InvokeModelInput.
Implementations§
source§impl InvokeModelInputBuilder
impl InvokeModelInputBuilder
sourcepub fn body(self, input: Blob) -> Self
pub fn body(self, input: Blob) -> Self
Input data in the format specified in the content-type request header. To see the format and content of this field for different models, refer to Inference parameters.
This field is required.sourcepub fn set_body(self, input: Option<Blob>) -> Self
pub fn set_body(self, input: Option<Blob>) -> Self
Input data in the format specified in the content-type request header. To see the format and content of this field for different models, refer to Inference parameters.
sourcepub fn get_body(&self) -> &Option<Blob>
pub fn get_body(&self) -> &Option<Blob>
Input data in the format specified in the content-type request header. To see the format and content of this field for different models, refer to Inference parameters.
sourcepub fn content_type(self, input: impl Into<String>) -> Self
pub fn content_type(self, input: impl Into<String>) -> Self
The MIME type of the input data in the request. The default value is application/json.
sourcepub fn set_content_type(self, input: Option<String>) -> Self
pub fn set_content_type(self, input: Option<String>) -> Self
The MIME type of the input data in the request. The default value is application/json.
sourcepub fn get_content_type(&self) -> &Option<String>
pub fn get_content_type(&self) -> &Option<String>
The MIME type of the input data in the request. The default value is application/json.
sourcepub fn accept(self, input: impl Into<String>) -> Self
pub fn accept(self, input: impl Into<String>) -> Self
The desired MIME type of the inference body in the response. The default value is application/json.
sourcepub fn set_accept(self, input: Option<String>) -> Self
pub fn set_accept(self, input: Option<String>) -> Self
The desired MIME type of the inference body in the response. The default value is application/json.
sourcepub fn get_accept(&self) -> &Option<String>
pub fn get_accept(&self) -> &Option<String>
The desired MIME type of the inference body in the response. The default value is application/json.
sourcepub fn model_id(self, input: impl Into<String>) -> Self
pub fn model_id(self, input: impl Into<String>) -> Self
Identifier of the model.
This field is required.sourcepub fn set_model_id(self, input: Option<String>) -> Self
pub fn set_model_id(self, input: Option<String>) -> Self
Identifier of the model.
sourcepub fn get_model_id(&self) -> &Option<String>
pub fn get_model_id(&self) -> &Option<String>
Identifier of the model.
sourcepub fn build(self) -> Result<InvokeModelInput, BuildError>
pub fn build(self) -> Result<InvokeModelInput, BuildError>
Consumes the builder and constructs a InvokeModelInput.
source§impl InvokeModelInputBuilder
impl InvokeModelInputBuilder
sourcepub async fn send_with(
self,
client: &Client
) -> Result<InvokeModelOutput, SdkError<InvokeModelError, HttpResponse>>
pub async fn send_with( self, client: &Client ) -> Result<InvokeModelOutput, SdkError<InvokeModelError, HttpResponse>>
Sends a request with this input using the given client.
Trait Implementations§
source§impl Clone for InvokeModelInputBuilder
impl Clone for InvokeModelInputBuilder
source§fn clone(&self) -> InvokeModelInputBuilder
fn clone(&self) -> InvokeModelInputBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for InvokeModelInputBuilder
impl Debug for InvokeModelInputBuilder
source§impl Default for InvokeModelInputBuilder
impl Default for InvokeModelInputBuilder
source§fn default() -> InvokeModelInputBuilder
fn default() -> InvokeModelInputBuilder
source§impl PartialEq for InvokeModelInputBuilder
impl PartialEq for InvokeModelInputBuilder
source§fn eq(&self, other: &InvokeModelInputBuilder) -> bool
fn eq(&self, other: &InvokeModelInputBuilder) -> bool
self and other values to be equal, and is used
by ==.