aws_sdk_devopsagent/operation/get_asset/
_get_asset_input.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct GetAssetInput {
7 pub agent_space_id: ::std::option::Option<::std::string::String>,
9 pub asset_id: ::std::option::Option<::std::string::String>,
11 pub asset_version: ::std::option::Option<i32>,
13}
14impl GetAssetInput {
15 pub fn agent_space_id(&self) -> ::std::option::Option<&str> {
17 self.agent_space_id.as_deref()
18 }
19 pub fn asset_id(&self) -> ::std::option::Option<&str> {
21 self.asset_id.as_deref()
22 }
23 pub fn asset_version(&self) -> ::std::option::Option<i32> {
25 self.asset_version
26 }
27}
28impl GetAssetInput {
29 pub fn builder() -> crate::operation::get_asset::builders::GetAssetInputBuilder {
31 crate::operation::get_asset::builders::GetAssetInputBuilder::default()
32 }
33}
34
35#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
37#[non_exhaustive]
38pub struct GetAssetInputBuilder {
39 pub(crate) agent_space_id: ::std::option::Option<::std::string::String>,
40 pub(crate) asset_id: ::std::option::Option<::std::string::String>,
41 pub(crate) asset_version: ::std::option::Option<i32>,
42}
43impl GetAssetInputBuilder {
44 pub fn agent_space_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
47 self.agent_space_id = ::std::option::Option::Some(input.into());
48 self
49 }
50 pub fn set_agent_space_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
52 self.agent_space_id = input;
53 self
54 }
55 pub fn get_agent_space_id(&self) -> &::std::option::Option<::std::string::String> {
57 &self.agent_space_id
58 }
59 pub fn asset_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
62 self.asset_id = ::std::option::Option::Some(input.into());
63 self
64 }
65 pub fn set_asset_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
67 self.asset_id = input;
68 self
69 }
70 pub fn get_asset_id(&self) -> &::std::option::Option<::std::string::String> {
72 &self.asset_id
73 }
74 pub fn asset_version(mut self, input: i32) -> Self {
76 self.asset_version = ::std::option::Option::Some(input);
77 self
78 }
79 pub fn set_asset_version(mut self, input: ::std::option::Option<i32>) -> Self {
81 self.asset_version = input;
82 self
83 }
84 pub fn get_asset_version(&self) -> &::std::option::Option<i32> {
86 &self.asset_version
87 }
88 pub fn build(self) -> ::std::result::Result<crate::operation::get_asset::GetAssetInput, ::aws_smithy_types::error::operation::BuildError> {
90 ::std::result::Result::Ok(crate::operation::get_asset::GetAssetInput {
91 agent_space_id: self.agent_space_id,
92 asset_id: self.asset_id,
93 asset_version: self.asset_version,
94 })
95 }
96}