aws_sdk_sagemaker/operation/delete_artifact/
_delete_artifact_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DeleteArtifactInput {
6    /// <p>The Amazon Resource Name (ARN) of the artifact to delete.</p>
7    pub artifact_arn: ::std::option::Option<::std::string::String>,
8    /// <p>The URI of the source.</p>
9    pub source: ::std::option::Option<crate::types::ArtifactSource>,
10}
11impl DeleteArtifactInput {
12    /// <p>The Amazon Resource Name (ARN) of the artifact to delete.</p>
13    pub fn artifact_arn(&self) -> ::std::option::Option<&str> {
14        self.artifact_arn.as_deref()
15    }
16    /// <p>The URI of the source.</p>
17    pub fn source(&self) -> ::std::option::Option<&crate::types::ArtifactSource> {
18        self.source.as_ref()
19    }
20}
21impl DeleteArtifactInput {
22    /// Creates a new builder-style object to manufacture [`DeleteArtifactInput`](crate::operation::delete_artifact::DeleteArtifactInput).
23    pub fn builder() -> crate::operation::delete_artifact::builders::DeleteArtifactInputBuilder {
24        crate::operation::delete_artifact::builders::DeleteArtifactInputBuilder::default()
25    }
26}
27
28/// A builder for [`DeleteArtifactInput`](crate::operation::delete_artifact::DeleteArtifactInput).
29#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
30#[non_exhaustive]
31pub struct DeleteArtifactInputBuilder {
32    pub(crate) artifact_arn: ::std::option::Option<::std::string::String>,
33    pub(crate) source: ::std::option::Option<crate::types::ArtifactSource>,
34}
35impl DeleteArtifactInputBuilder {
36    /// <p>The Amazon Resource Name (ARN) of the artifact to delete.</p>
37    pub fn artifact_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
38        self.artifact_arn = ::std::option::Option::Some(input.into());
39        self
40    }
41    /// <p>The Amazon Resource Name (ARN) of the artifact to delete.</p>
42    pub fn set_artifact_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
43        self.artifact_arn = input;
44        self
45    }
46    /// <p>The Amazon Resource Name (ARN) of the artifact to delete.</p>
47    pub fn get_artifact_arn(&self) -> &::std::option::Option<::std::string::String> {
48        &self.artifact_arn
49    }
50    /// <p>The URI of the source.</p>
51    pub fn source(mut self, input: crate::types::ArtifactSource) -> Self {
52        self.source = ::std::option::Option::Some(input);
53        self
54    }
55    /// <p>The URI of the source.</p>
56    pub fn set_source(mut self, input: ::std::option::Option<crate::types::ArtifactSource>) -> Self {
57        self.source = input;
58        self
59    }
60    /// <p>The URI of the source.</p>
61    pub fn get_source(&self) -> &::std::option::Option<crate::types::ArtifactSource> {
62        &self.source
63    }
64    /// Consumes the builder and constructs a [`DeleteArtifactInput`](crate::operation::delete_artifact::DeleteArtifactInput).
65    pub fn build(
66        self,
67    ) -> ::std::result::Result<crate::operation::delete_artifact::DeleteArtifactInput, ::aws_smithy_types::error::operation::BuildError> {
68        ::std::result::Result::Ok(crate::operation::delete_artifact::DeleteArtifactInput {
69            artifact_arn: self.artifact_arn,
70            source: self.source,
71        })
72    }
73}