aws_sdk_sagemaker/types/
_training_job_step_metadata.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Metadata for a training job step.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct TrainingJobStepMetadata {
7    /// <p>The Amazon Resource Name (ARN) of the training job that was run by this step execution.</p>
8    pub arn: ::std::option::Option<::std::string::String>,
9}
10impl TrainingJobStepMetadata {
11    /// <p>The Amazon Resource Name (ARN) of the training job that was run by this step execution.</p>
12    pub fn arn(&self) -> ::std::option::Option<&str> {
13        self.arn.as_deref()
14    }
15}
16impl TrainingJobStepMetadata {
17    /// Creates a new builder-style object to manufacture [`TrainingJobStepMetadata`](crate::types::TrainingJobStepMetadata).
18    pub fn builder() -> crate::types::builders::TrainingJobStepMetadataBuilder {
19        crate::types::builders::TrainingJobStepMetadataBuilder::default()
20    }
21}
22
23/// A builder for [`TrainingJobStepMetadata`](crate::types::TrainingJobStepMetadata).
24#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
25#[non_exhaustive]
26pub struct TrainingJobStepMetadataBuilder {
27    pub(crate) arn: ::std::option::Option<::std::string::String>,
28}
29impl TrainingJobStepMetadataBuilder {
30    /// <p>The Amazon Resource Name (ARN) of the training job that was run by this step execution.</p>
31    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
32        self.arn = ::std::option::Option::Some(input.into());
33        self
34    }
35    /// <p>The Amazon Resource Name (ARN) of the training job that was run by this step execution.</p>
36    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
37        self.arn = input;
38        self
39    }
40    /// <p>The Amazon Resource Name (ARN) of the training job that was run by this step execution.</p>
41    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
42        &self.arn
43    }
44    /// Consumes the builder and constructs a [`TrainingJobStepMetadata`](crate::types::TrainingJobStepMetadata).
45    pub fn build(self) -> crate::types::TrainingJobStepMetadata {
46        crate::types::TrainingJobStepMetadata { arn: self.arn }
47    }
48}