Skip to main content

aws_sdk_devopsagent/operation/delete_asset/
_delete_asset_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Request structure for deleting an asset</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct DeleteAssetInput {
7    /// <p>The unique identifier for the agent space containing the asset</p>
8    pub agent_space_id: ::std::option::Option<::std::string::String>,
9    /// <p>The unique identifier of the asset to delete</p>
10    pub asset_id: ::std::option::Option<::std::string::String>,
11}
12impl DeleteAssetInput {
13    /// <p>The unique identifier for the agent space containing the asset</p>
14    pub fn agent_space_id(&self) -> ::std::option::Option<&str> {
15        self.agent_space_id.as_deref()
16    }
17    /// <p>The unique identifier of the asset to delete</p>
18    pub fn asset_id(&self) -> ::std::option::Option<&str> {
19        self.asset_id.as_deref()
20    }
21}
22impl DeleteAssetInput {
23    /// Creates a new builder-style object to manufacture [`DeleteAssetInput`](crate::operation::delete_asset::DeleteAssetInput).
24    pub fn builder() -> crate::operation::delete_asset::builders::DeleteAssetInputBuilder {
25        crate::operation::delete_asset::builders::DeleteAssetInputBuilder::default()
26    }
27}
28
29/// A builder for [`DeleteAssetInput`](crate::operation::delete_asset::DeleteAssetInput).
30#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
31#[non_exhaustive]
32pub struct DeleteAssetInputBuilder {
33    pub(crate) agent_space_id: ::std::option::Option<::std::string::String>,
34    pub(crate) asset_id: ::std::option::Option<::std::string::String>,
35}
36impl DeleteAssetInputBuilder {
37    /// <p>The unique identifier for the agent space containing the asset</p>
38    /// This field is required.
39    pub fn agent_space_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
40        self.agent_space_id = ::std::option::Option::Some(input.into());
41        self
42    }
43    /// <p>The unique identifier for the agent space containing the asset</p>
44    pub fn set_agent_space_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
45        self.agent_space_id = input;
46        self
47    }
48    /// <p>The unique identifier for the agent space containing the asset</p>
49    pub fn get_agent_space_id(&self) -> &::std::option::Option<::std::string::String> {
50        &self.agent_space_id
51    }
52    /// <p>The unique identifier of the asset to delete</p>
53    /// This field is required.
54    pub fn asset_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
55        self.asset_id = ::std::option::Option::Some(input.into());
56        self
57    }
58    /// <p>The unique identifier of the asset to delete</p>
59    pub fn set_asset_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
60        self.asset_id = input;
61        self
62    }
63    /// <p>The unique identifier of the asset to delete</p>
64    pub fn get_asset_id(&self) -> &::std::option::Option<::std::string::String> {
65        &self.asset_id
66    }
67    /// Consumes the builder and constructs a [`DeleteAssetInput`](crate::operation::delete_asset::DeleteAssetInput).
68    pub fn build(self) -> ::std::result::Result<crate::operation::delete_asset::DeleteAssetInput, ::aws_smithy_types::error::operation::BuildError> {
69        ::std::result::Result::Ok(crate::operation::delete_asset::DeleteAssetInput {
70            agent_space_id: self.agent_space_id,
71            asset_id: self.asset_id,
72        })
73    }
74}