aws-sdk-sagemakerjobruntime 1.0.0

AWS SDK for Sagemaker Job Runtime Service
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, ::std::fmt::Debug)]
pub struct CompleteRolloutInput {
    /// The job ARN.
    pub job_arn: ::std::option::Option<::std::string::String>,
    /// The trajectory ID to mark as complete.
    pub trajectory_id: ::std::option::Option<::std::string::String>,
    /// The target status for the trajectory. Defaults to READY if not specified. Set to FAILED if the rollout encountered an error and the trajectory should not be used for processing.
    pub status: ::std::option::Option<crate::types::CompletionStatus>,
    /// A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
    pub client_token: ::std::option::Option<::std::string::String>,
}
impl CompleteRolloutInput {
    /// The job ARN.
    pub fn job_arn(&self) -> ::std::option::Option<&str> {
        self.job_arn.as_deref()
    }
    /// The trajectory ID to mark as complete.
    pub fn trajectory_id(&self) -> ::std::option::Option<&str> {
        self.trajectory_id.as_deref()
    }
    /// The target status for the trajectory. Defaults to READY if not specified. Set to FAILED if the rollout encountered an error and the trajectory should not be used for processing.
    pub fn status(&self) -> ::std::option::Option<&crate::types::CompletionStatus> {
        self.status.as_ref()
    }
    /// A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
    pub fn client_token(&self) -> ::std::option::Option<&str> {
        self.client_token.as_deref()
    }
}
impl CompleteRolloutInput {
    /// Creates a new builder-style object to manufacture [`CompleteRolloutInput`](crate::operation::complete_rollout::CompleteRolloutInput).
    pub fn builder() -> crate::operation::complete_rollout::builders::CompleteRolloutInputBuilder {
        crate::operation::complete_rollout::builders::CompleteRolloutInputBuilder::default()
    }
}

/// A builder for [`CompleteRolloutInput`](crate::operation::complete_rollout::CompleteRolloutInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CompleteRolloutInputBuilder {
    pub(crate) job_arn: ::std::option::Option<::std::string::String>,
    pub(crate) trajectory_id: ::std::option::Option<::std::string::String>,
    pub(crate) status: ::std::option::Option<crate::types::CompletionStatus>,
    pub(crate) client_token: ::std::option::Option<::std::string::String>,
}
impl CompleteRolloutInputBuilder {
    /// The job ARN.
    /// This field is required.
    pub fn job_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.job_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// The job ARN.
    pub fn set_job_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.job_arn = input;
        self
    }
    /// The job ARN.
    pub fn get_job_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.job_arn
    }
    /// The trajectory ID to mark as complete.
    /// This field is required.
    pub fn trajectory_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.trajectory_id = ::std::option::Option::Some(input.into());
        self
    }
    /// The trajectory ID to mark as complete.
    pub fn set_trajectory_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.trajectory_id = input;
        self
    }
    /// The trajectory ID to mark as complete.
    pub fn get_trajectory_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.trajectory_id
    }
    /// The target status for the trajectory. Defaults to READY if not specified. Set to FAILED if the rollout encountered an error and the trajectory should not be used for processing.
    pub fn status(mut self, input: crate::types::CompletionStatus) -> Self {
        self.status = ::std::option::Option::Some(input);
        self
    }
    /// The target status for the trajectory. Defaults to READY if not specified. Set to FAILED if the rollout encountered an error and the trajectory should not be used for processing.
    pub fn set_status(mut self, input: ::std::option::Option<crate::types::CompletionStatus>) -> Self {
        self.status = input;
        self
    }
    /// The target status for the trajectory. Defaults to READY if not specified. Set to FAILED if the rollout encountered an error and the trajectory should not be used for processing.
    pub fn get_status(&self) -> &::std::option::Option<crate::types::CompletionStatus> {
        &self.status
    }
    /// A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.client_token = ::std::option::Option::Some(input.into());
        self
    }
    /// A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.client_token = input;
        self
    }
    /// A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.client_token
    }
    /// Consumes the builder and constructs a [`CompleteRolloutInput`](crate::operation::complete_rollout::CompleteRolloutInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::complete_rollout::CompleteRolloutInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::complete_rollout::CompleteRolloutInput {
            job_arn: self.job_arn,
            trajectory_id: self.trajectory_id,
            status: self.status,
            client_token: self.client_token,
        })
    }
}