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