aws_sdk_schemas/operation/update_discoverer/
_update_discoverer_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 UpdateDiscovererInput {
6    /// <p>The description of the discoverer to update.</p>
7    pub description: ::std::option::Option<::std::string::String>,
8    /// <p>The ID of the discoverer.</p>
9    pub discoverer_id: ::std::option::Option<::std::string::String>,
10    /// <p>Support discovery of schemas in events sent to the bus from another account. (default: true)</p>
11    pub cross_account: ::std::option::Option<bool>,
12}
13impl UpdateDiscovererInput {
14    /// <p>The description of the discoverer to update.</p>
15    pub fn description(&self) -> ::std::option::Option<&str> {
16        self.description.as_deref()
17    }
18    /// <p>The ID of the discoverer.</p>
19    pub fn discoverer_id(&self) -> ::std::option::Option<&str> {
20        self.discoverer_id.as_deref()
21    }
22    /// <p>Support discovery of schemas in events sent to the bus from another account. (default: true)</p>
23    pub fn cross_account(&self) -> ::std::option::Option<bool> {
24        self.cross_account
25    }
26}
27impl UpdateDiscovererInput {
28    /// Creates a new builder-style object to manufacture [`UpdateDiscovererInput`](crate::operation::update_discoverer::UpdateDiscovererInput).
29    pub fn builder() -> crate::operation::update_discoverer::builders::UpdateDiscovererInputBuilder {
30        crate::operation::update_discoverer::builders::UpdateDiscovererInputBuilder::default()
31    }
32}
33
34/// A builder for [`UpdateDiscovererInput`](crate::operation::update_discoverer::UpdateDiscovererInput).
35#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
36#[non_exhaustive]
37pub struct UpdateDiscovererInputBuilder {
38    pub(crate) description: ::std::option::Option<::std::string::String>,
39    pub(crate) discoverer_id: ::std::option::Option<::std::string::String>,
40    pub(crate) cross_account: ::std::option::Option<bool>,
41}
42impl UpdateDiscovererInputBuilder {
43    /// <p>The description of the discoverer to update.</p>
44    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
45        self.description = ::std::option::Option::Some(input.into());
46        self
47    }
48    /// <p>The description of the discoverer to update.</p>
49    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
50        self.description = input;
51        self
52    }
53    /// <p>The description of the discoverer to update.</p>
54    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
55        &self.description
56    }
57    /// <p>The ID of the discoverer.</p>
58    /// This field is required.
59    pub fn discoverer_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
60        self.discoverer_id = ::std::option::Option::Some(input.into());
61        self
62    }
63    /// <p>The ID of the discoverer.</p>
64    pub fn set_discoverer_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
65        self.discoverer_id = input;
66        self
67    }
68    /// <p>The ID of the discoverer.</p>
69    pub fn get_discoverer_id(&self) -> &::std::option::Option<::std::string::String> {
70        &self.discoverer_id
71    }
72    /// <p>Support discovery of schemas in events sent to the bus from another account. (default: true)</p>
73    pub fn cross_account(mut self, input: bool) -> Self {
74        self.cross_account = ::std::option::Option::Some(input);
75        self
76    }
77    /// <p>Support discovery of schemas in events sent to the bus from another account. (default: true)</p>
78    pub fn set_cross_account(mut self, input: ::std::option::Option<bool>) -> Self {
79        self.cross_account = input;
80        self
81    }
82    /// <p>Support discovery of schemas in events sent to the bus from another account. (default: true)</p>
83    pub fn get_cross_account(&self) -> &::std::option::Option<bool> {
84        &self.cross_account
85    }
86    /// Consumes the builder and constructs a [`UpdateDiscovererInput`](crate::operation::update_discoverer::UpdateDiscovererInput).
87    pub fn build(
88        self,
89    ) -> ::std::result::Result<crate::operation::update_discoverer::UpdateDiscovererInput, ::aws_smithy_types::error::operation::BuildError> {
90        ::std::result::Result::Ok(crate::operation::update_discoverer::UpdateDiscovererInput {
91            description: self.description,
92            discoverer_id: self.discoverer_id,
93            cross_account: self.cross_account,
94        })
95    }
96}