aws-sdk-bedrock 1.129.0

AWS SDK for Amazon Bedrock
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct GetInferenceProfileOutput {
    /// <p>The name of the inference profile.</p>
    pub inference_profile_name: ::std::string::String,
    /// <p>The description of the inference profile.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>The time at which the inference profile was created.</p>
    pub created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The time at which the inference profile was last updated.</p>
    pub updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The Amazon Resource Name (ARN) of the inference profile.</p>
    pub inference_profile_arn: ::std::string::String,
    /// <p>A list of information about each model in the inference profile.</p>
    pub models: ::std::vec::Vec<crate::types::InferenceProfileModel>,
    /// <p>The unique identifier of the inference profile.</p>
    pub inference_profile_id: ::std::string::String,
    /// <p>The status of the inference profile. <code>ACTIVE</code> means that the inference profile is ready to be used.</p>
    pub status: crate::types::InferenceProfileStatus,
    /// <p>The type of the inference profile. The following types are possible:</p>
    /// <ul>
    /// <li>
    /// <p><code>SYSTEM_DEFINED</code> – The inference profile is defined by Amazon Bedrock. You can route inference requests across regions with these inference profiles.</p></li>
    /// <li>
    /// <p><code>APPLICATION</code> – The inference profile was created by a user. This type of inference profile can track metrics and costs when invoking the model in it. The inference profile may route requests to one or multiple regions.</p></li>
    /// </ul>
    pub r#type: crate::types::InferenceProfileType,
    _request_id: Option<String>,
}
impl GetInferenceProfileOutput {
    /// <p>The name of the inference profile.</p>
    pub fn inference_profile_name(&self) -> &str {
        use std::ops::Deref;
        self.inference_profile_name.deref()
    }
    /// <p>The description of the inference profile.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The time at which the inference profile was created.</p>
    pub fn created_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.created_at.as_ref()
    }
    /// <p>The time at which the inference profile was last updated.</p>
    pub fn updated_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.updated_at.as_ref()
    }
    /// <p>The Amazon Resource Name (ARN) of the inference profile.</p>
    pub fn inference_profile_arn(&self) -> &str {
        use std::ops::Deref;
        self.inference_profile_arn.deref()
    }
    /// <p>A list of information about each model in the inference profile.</p>
    pub fn models(&self) -> &[crate::types::InferenceProfileModel] {
        use std::ops::Deref;
        self.models.deref()
    }
    /// <p>The unique identifier of the inference profile.</p>
    pub fn inference_profile_id(&self) -> &str {
        use std::ops::Deref;
        self.inference_profile_id.deref()
    }
    /// <p>The status of the inference profile. <code>ACTIVE</code> means that the inference profile is ready to be used.</p>
    pub fn status(&self) -> &crate::types::InferenceProfileStatus {
        &self.status
    }
    /// <p>The type of the inference profile. The following types are possible:</p>
    /// <ul>
    /// <li>
    /// <p><code>SYSTEM_DEFINED</code> – The inference profile is defined by Amazon Bedrock. You can route inference requests across regions with these inference profiles.</p></li>
    /// <li>
    /// <p><code>APPLICATION</code> – The inference profile was created by a user. This type of inference profile can track metrics and costs when invoking the model in it. The inference profile may route requests to one or multiple regions.</p></li>
    /// </ul>
    pub fn r#type(&self) -> &crate::types::InferenceProfileType {
        &self.r#type
    }
}
impl ::std::fmt::Debug for GetInferenceProfileOutput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("GetInferenceProfileOutput");
        formatter.field("inference_profile_name", &self.inference_profile_name);
        formatter.field("description", &"*** Sensitive Data Redacted ***");
        formatter.field("created_at", &self.created_at);
        formatter.field("updated_at", &self.updated_at);
        formatter.field("inference_profile_arn", &self.inference_profile_arn);
        formatter.field("models", &self.models);
        formatter.field("inference_profile_id", &self.inference_profile_id);
        formatter.field("status", &self.status);
        formatter.field("r#type", &self.r#type);
        formatter.field("_request_id", &self._request_id);
        formatter.finish()
    }
}
impl ::aws_types::request_id::RequestId for GetInferenceProfileOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl GetInferenceProfileOutput {
    /// Creates a new builder-style object to manufacture [`GetInferenceProfileOutput`](crate::operation::get_inference_profile::GetInferenceProfileOutput).
    pub fn builder() -> crate::operation::get_inference_profile::builders::GetInferenceProfileOutputBuilder {
        crate::operation::get_inference_profile::builders::GetInferenceProfileOutputBuilder::default()
    }
}

/// A builder for [`GetInferenceProfileOutput`](crate::operation::get_inference_profile::GetInferenceProfileOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct GetInferenceProfileOutputBuilder {
    pub(crate) inference_profile_name: ::std::option::Option<::std::string::String>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) inference_profile_arn: ::std::option::Option<::std::string::String>,
    pub(crate) models: ::std::option::Option<::std::vec::Vec<crate::types::InferenceProfileModel>>,
    pub(crate) inference_profile_id: ::std::option::Option<::std::string::String>,
    pub(crate) status: ::std::option::Option<crate::types::InferenceProfileStatus>,
    pub(crate) r#type: ::std::option::Option<crate::types::InferenceProfileType>,
    _request_id: Option<String>,
}
impl GetInferenceProfileOutputBuilder {
    /// <p>The name of the inference profile.</p>
    /// This field is required.
    pub fn inference_profile_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inference_profile_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the inference profile.</p>
    pub fn set_inference_profile_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inference_profile_name = input;
        self
    }
    /// <p>The name of the inference profile.</p>
    pub fn get_inference_profile_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.inference_profile_name
    }
    /// <p>The description of the inference profile.</p>
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.description = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The description of the inference profile.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>The description of the inference profile.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// <p>The time at which the inference profile was created.</p>
    pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.created_at = ::std::option::Option::Some(input);
        self
    }
    /// <p>The time at which the inference profile was created.</p>
    pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.created_at = input;
        self
    }
    /// <p>The time at which the inference profile was created.</p>
    pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.created_at
    }
    /// <p>The time at which the inference profile was last updated.</p>
    pub fn updated_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.updated_at = ::std::option::Option::Some(input);
        self
    }
    /// <p>The time at which the inference profile was last updated.</p>
    pub fn set_updated_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.updated_at = input;
        self
    }
    /// <p>The time at which the inference profile was last updated.</p>
    pub fn get_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.updated_at
    }
    /// <p>The Amazon Resource Name (ARN) of the inference profile.</p>
    /// This field is required.
    pub fn inference_profile_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inference_profile_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the inference profile.</p>
    pub fn set_inference_profile_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inference_profile_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the inference profile.</p>
    pub fn get_inference_profile_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.inference_profile_arn
    }
    /// Appends an item to `models`.
    ///
    /// To override the contents of this collection use [`set_models`](Self::set_models).
    ///
    /// <p>A list of information about each model in the inference profile.</p>
    pub fn models(mut self, input: crate::types::InferenceProfileModel) -> Self {
        let mut v = self.models.unwrap_or_default();
        v.push(input);
        self.models = ::std::option::Option::Some(v);
        self
    }
    /// <p>A list of information about each model in the inference profile.</p>
    pub fn set_models(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::InferenceProfileModel>>) -> Self {
        self.models = input;
        self
    }
    /// <p>A list of information about each model in the inference profile.</p>
    pub fn get_models(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::InferenceProfileModel>> {
        &self.models
    }
    /// <p>The unique identifier of the inference profile.</p>
    /// This field is required.
    pub fn inference_profile_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inference_profile_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique identifier of the inference profile.</p>
    pub fn set_inference_profile_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inference_profile_id = input;
        self
    }
    /// <p>The unique identifier of the inference profile.</p>
    pub fn get_inference_profile_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.inference_profile_id
    }
    /// <p>The status of the inference profile. <code>ACTIVE</code> means that the inference profile is ready to be used.</p>
    /// This field is required.
    pub fn status(mut self, input: crate::types::InferenceProfileStatus) -> Self {
        self.status = ::std::option::Option::Some(input);
        self
    }
    /// <p>The status of the inference profile. <code>ACTIVE</code> means that the inference profile is ready to be used.</p>
    pub fn set_status(mut self, input: ::std::option::Option<crate::types::InferenceProfileStatus>) -> Self {
        self.status = input;
        self
    }
    /// <p>The status of the inference profile. <code>ACTIVE</code> means that the inference profile is ready to be used.</p>
    pub fn get_status(&self) -> &::std::option::Option<crate::types::InferenceProfileStatus> {
        &self.status
    }
    /// <p>The type of the inference profile. The following types are possible:</p>
    /// <ul>
    /// <li>
    /// <p><code>SYSTEM_DEFINED</code> – The inference profile is defined by Amazon Bedrock. You can route inference requests across regions with these inference profiles.</p></li>
    /// <li>
    /// <p><code>APPLICATION</code> – The inference profile was created by a user. This type of inference profile can track metrics and costs when invoking the model in it. The inference profile may route requests to one or multiple regions.</p></li>
    /// </ul>
    /// This field is required.
    pub fn r#type(mut self, input: crate::types::InferenceProfileType) -> Self {
        self.r#type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The type of the inference profile. The following types are possible:</p>
    /// <ul>
    /// <li>
    /// <p><code>SYSTEM_DEFINED</code> – The inference profile is defined by Amazon Bedrock. You can route inference requests across regions with these inference profiles.</p></li>
    /// <li>
    /// <p><code>APPLICATION</code> – The inference profile was created by a user. This type of inference profile can track metrics and costs when invoking the model in it. The inference profile may route requests to one or multiple regions.</p></li>
    /// </ul>
    pub fn set_type(mut self, input: ::std::option::Option<crate::types::InferenceProfileType>) -> Self {
        self.r#type = input;
        self
    }
    /// <p>The type of the inference profile. The following types are possible:</p>
    /// <ul>
    /// <li>
    /// <p><code>SYSTEM_DEFINED</code> – The inference profile is defined by Amazon Bedrock. You can route inference requests across regions with these inference profiles.</p></li>
    /// <li>
    /// <p><code>APPLICATION</code> – The inference profile was created by a user. This type of inference profile can track metrics and costs when invoking the model in it. The inference profile may route requests to one or multiple regions.</p></li>
    /// </ul>
    pub fn get_type(&self) -> &::std::option::Option<crate::types::InferenceProfileType> {
        &self.r#type
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`GetInferenceProfileOutput`](crate::operation::get_inference_profile::GetInferenceProfileOutput).
    /// This method will fail if any of the following fields are not set:
    /// - [`inference_profile_name`](crate::operation::get_inference_profile::builders::GetInferenceProfileOutputBuilder::inference_profile_name)
    /// - [`inference_profile_arn`](crate::operation::get_inference_profile::builders::GetInferenceProfileOutputBuilder::inference_profile_arn)
    /// - [`models`](crate::operation::get_inference_profile::builders::GetInferenceProfileOutputBuilder::models)
    /// - [`inference_profile_id`](crate::operation::get_inference_profile::builders::GetInferenceProfileOutputBuilder::inference_profile_id)
    /// - [`status`](crate::operation::get_inference_profile::builders::GetInferenceProfileOutputBuilder::status)
    /// - [`r#type`](crate::operation::get_inference_profile::builders::GetInferenceProfileOutputBuilder::type)
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::get_inference_profile::GetInferenceProfileOutput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::get_inference_profile::GetInferenceProfileOutput {
            inference_profile_name: self.inference_profile_name.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "inference_profile_name",
                    "inference_profile_name was not specified but it is required when building GetInferenceProfileOutput",
                )
            })?,
            description: self.description,
            created_at: self.created_at,
            updated_at: self.updated_at,
            inference_profile_arn: self.inference_profile_arn.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "inference_profile_arn",
                    "inference_profile_arn was not specified but it is required when building GetInferenceProfileOutput",
                )
            })?,
            models: self.models.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "models",
                    "models was not specified but it is required when building GetInferenceProfileOutput",
                )
            })?,
            inference_profile_id: self.inference_profile_id.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "inference_profile_id",
                    "inference_profile_id was not specified but it is required when building GetInferenceProfileOutput",
                )
            })?,
            status: self.status.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "status",
                    "status was not specified but it is required when building GetInferenceProfileOutput",
                )
            })?,
            r#type: self.r#type.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "r#type",
                    "r#type was not specified but it is required when building GetInferenceProfileOutput",
                )
            })?,
            _request_id: self._request_id,
        })
    }
}
impl ::std::fmt::Debug for GetInferenceProfileOutputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("GetInferenceProfileOutputBuilder");
        formatter.field("inference_profile_name", &self.inference_profile_name);
        formatter.field("description", &"*** Sensitive Data Redacted ***");
        formatter.field("created_at", &self.created_at);
        formatter.field("updated_at", &self.updated_at);
        formatter.field("inference_profile_arn", &self.inference_profile_arn);
        formatter.field("models", &self.models);
        formatter.field("inference_profile_id", &self.inference_profile_id);
        formatter.field("status", &self.status);
        formatter.field("r#type", &self.r#type);
        formatter.field("_request_id", &self._request_id);
        formatter.finish()
    }
}