Skip to main content

aws_sdk_elementalinference/operation/disassociate_feed/
_disassociate_feed_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 DisassociateFeedInput {
6    /// <p>The ID of the feed where you want to release the resource.</p>
7    pub id: ::std::option::Option<::std::string::String>,
8    /// <p>The name of the resource currently associated with the feed'.</p>
9    pub associated_resource_name: ::std::option::Option<::std::string::String>,
10    /// <p>Set to true if you want to do a dry run of the disassociate action.</p>
11    pub dry_run: ::std::option::Option<bool>,
12}
13impl DisassociateFeedInput {
14    /// <p>The ID of the feed where you want to release the resource.</p>
15    pub fn id(&self) -> ::std::option::Option<&str> {
16        self.id.as_deref()
17    }
18    /// <p>The name of the resource currently associated with the feed'.</p>
19    pub fn associated_resource_name(&self) -> ::std::option::Option<&str> {
20        self.associated_resource_name.as_deref()
21    }
22    /// <p>Set to true if you want to do a dry run of the disassociate action.</p>
23    pub fn dry_run(&self) -> ::std::option::Option<bool> {
24        self.dry_run
25    }
26}
27impl DisassociateFeedInput {
28    /// Creates a new builder-style object to manufacture [`DisassociateFeedInput`](crate::operation::disassociate_feed::DisassociateFeedInput).
29    pub fn builder() -> crate::operation::disassociate_feed::builders::DisassociateFeedInputBuilder {
30        crate::operation::disassociate_feed::builders::DisassociateFeedInputBuilder::default()
31    }
32}
33
34/// A builder for [`DisassociateFeedInput`](crate::operation::disassociate_feed::DisassociateFeedInput).
35#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
36#[non_exhaustive]
37pub struct DisassociateFeedInputBuilder {
38    pub(crate) id: ::std::option::Option<::std::string::String>,
39    pub(crate) associated_resource_name: ::std::option::Option<::std::string::String>,
40    pub(crate) dry_run: ::std::option::Option<bool>,
41}
42impl DisassociateFeedInputBuilder {
43    /// <p>The ID of the feed where you want to release the resource.</p>
44    /// This field is required.
45    pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
46        self.id = ::std::option::Option::Some(input.into());
47        self
48    }
49    /// <p>The ID of the feed where you want to release the resource.</p>
50    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
51        self.id = input;
52        self
53    }
54    /// <p>The ID of the feed where you want to release the resource.</p>
55    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
56        &self.id
57    }
58    /// <p>The name of the resource currently associated with the feed'.</p>
59    /// This field is required.
60    pub fn associated_resource_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
61        self.associated_resource_name = ::std::option::Option::Some(input.into());
62        self
63    }
64    /// <p>The name of the resource currently associated with the feed'.</p>
65    pub fn set_associated_resource_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
66        self.associated_resource_name = input;
67        self
68    }
69    /// <p>The name of the resource currently associated with the feed'.</p>
70    pub fn get_associated_resource_name(&self) -> &::std::option::Option<::std::string::String> {
71        &self.associated_resource_name
72    }
73    /// <p>Set to true if you want to do a dry run of the disassociate action.</p>
74    pub fn dry_run(mut self, input: bool) -> Self {
75        self.dry_run = ::std::option::Option::Some(input);
76        self
77    }
78    /// <p>Set to true if you want to do a dry run of the disassociate action.</p>
79    pub fn set_dry_run(mut self, input: ::std::option::Option<bool>) -> Self {
80        self.dry_run = input;
81        self
82    }
83    /// <p>Set to true if you want to do a dry run of the disassociate action.</p>
84    pub fn get_dry_run(&self) -> &::std::option::Option<bool> {
85        &self.dry_run
86    }
87    /// Consumes the builder and constructs a [`DisassociateFeedInput`](crate::operation::disassociate_feed::DisassociateFeedInput).
88    pub fn build(
89        self,
90    ) -> ::std::result::Result<crate::operation::disassociate_feed::DisassociateFeedInput, ::aws_smithy_types::error::operation::BuildError> {
91        ::std::result::Result::Ok(crate::operation::disassociate_feed::DisassociateFeedInput {
92            id: self.id,
93            associated_resource_name: self.associated_resource_name,
94            dry_run: self.dry_run,
95        })
96    }
97}