aws_sdk_securityagent/operation/add_artifact/
_add_artifact_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct AddArtifactInput {
6 pub agent_space_id: ::std::option::Option<::std::string::String>,
8 pub artifact_content: ::std::option::Option<::aws_smithy_types::Blob>,
10 pub artifact_type: ::std::option::Option<crate::types::ArtifactType>,
12 pub file_name: ::std::option::Option<::std::string::String>,
14}
15impl AddArtifactInput {
16 pub fn agent_space_id(&self) -> ::std::option::Option<&str> {
18 self.agent_space_id.as_deref()
19 }
20 pub fn artifact_content(&self) -> ::std::option::Option<&::aws_smithy_types::Blob> {
22 self.artifact_content.as_ref()
23 }
24 pub fn artifact_type(&self) -> ::std::option::Option<&crate::types::ArtifactType> {
26 self.artifact_type.as_ref()
27 }
28 pub fn file_name(&self) -> ::std::option::Option<&str> {
30 self.file_name.as_deref()
31 }
32}
33impl AddArtifactInput {
34 pub fn builder() -> crate::operation::add_artifact::builders::AddArtifactInputBuilder {
36 crate::operation::add_artifact::builders::AddArtifactInputBuilder::default()
37 }
38}
39
40#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
42#[non_exhaustive]
43pub struct AddArtifactInputBuilder {
44 pub(crate) agent_space_id: ::std::option::Option<::std::string::String>,
45 pub(crate) artifact_content: ::std::option::Option<::aws_smithy_types::Blob>,
46 pub(crate) artifact_type: ::std::option::Option<crate::types::ArtifactType>,
47 pub(crate) file_name: ::std::option::Option<::std::string::String>,
48}
49impl AddArtifactInputBuilder {
50 pub fn agent_space_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53 self.agent_space_id = ::std::option::Option::Some(input.into());
54 self
55 }
56 pub fn set_agent_space_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58 self.agent_space_id = input;
59 self
60 }
61 pub fn get_agent_space_id(&self) -> &::std::option::Option<::std::string::String> {
63 &self.agent_space_id
64 }
65 pub fn artifact_content(mut self, input: ::aws_smithy_types::Blob) -> Self {
68 self.artifact_content = ::std::option::Option::Some(input);
69 self
70 }
71 pub fn set_artifact_content(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self {
73 self.artifact_content = input;
74 self
75 }
76 pub fn get_artifact_content(&self) -> &::std::option::Option<::aws_smithy_types::Blob> {
78 &self.artifact_content
79 }
80 pub fn artifact_type(mut self, input: crate::types::ArtifactType) -> Self {
83 self.artifact_type = ::std::option::Option::Some(input);
84 self
85 }
86 pub fn set_artifact_type(mut self, input: ::std::option::Option<crate::types::ArtifactType>) -> Self {
88 self.artifact_type = input;
89 self
90 }
91 pub fn get_artifact_type(&self) -> &::std::option::Option<crate::types::ArtifactType> {
93 &self.artifact_type
94 }
95 pub fn file_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
98 self.file_name = ::std::option::Option::Some(input.into());
99 self
100 }
101 pub fn set_file_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
103 self.file_name = input;
104 self
105 }
106 pub fn get_file_name(&self) -> &::std::option::Option<::std::string::String> {
108 &self.file_name
109 }
110 pub fn build(self) -> ::std::result::Result<crate::operation::add_artifact::AddArtifactInput, ::aws_smithy_types::error::operation::BuildError> {
112 ::std::result::Result::Ok(crate::operation::add_artifact::AddArtifactInput {
113 agent_space_id: self.agent_space_id,
114 artifact_content: self.artifact_content,
115 artifact_type: self.artifact_type,
116 file_name: self.file_name,
117 })
118 }
119}