aws_sdk_oam/operation/get_sink/_get_sink_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 GetSinkInput {
6 /// <p>The ARN of the sink to retrieve information for.</p>
7 pub identifier: ::std::option::Option<::std::string::String>,
8 /// <p>Specifies whether to include the tags associated with the sink in the response. When <code>IncludeTags</code> is set to <code>true</code> and the caller has the required permission, <code>oam:ListTagsForResource</code>, the API will return the tags for the specified resource. If the caller doesn't have the required permission, <code>oam:ListTagsForResource</code>, the API will raise an exception.</p>
9 /// <p>The default value is <code>false</code>.</p>
10 pub include_tags: ::std::option::Option<bool>,
11}
12impl GetSinkInput {
13 /// <p>The ARN of the sink to retrieve information for.</p>
14 pub fn identifier(&self) -> ::std::option::Option<&str> {
15 self.identifier.as_deref()
16 }
17 /// <p>Specifies whether to include the tags associated with the sink in the response. When <code>IncludeTags</code> is set to <code>true</code> and the caller has the required permission, <code>oam:ListTagsForResource</code>, the API will return the tags for the specified resource. If the caller doesn't have the required permission, <code>oam:ListTagsForResource</code>, the API will raise an exception.</p>
18 /// <p>The default value is <code>false</code>.</p>
19 pub fn include_tags(&self) -> ::std::option::Option<bool> {
20 self.include_tags
21 }
22}
23impl GetSinkInput {
24 /// Creates a new builder-style object to manufacture [`GetSinkInput`](crate::operation::get_sink::GetSinkInput).
25 pub fn builder() -> crate::operation::get_sink::builders::GetSinkInputBuilder {
26 crate::operation::get_sink::builders::GetSinkInputBuilder::default()
27 }
28}
29
30/// A builder for [`GetSinkInput`](crate::operation::get_sink::GetSinkInput).
31#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
32#[non_exhaustive]
33pub struct GetSinkInputBuilder {
34 pub(crate) identifier: ::std::option::Option<::std::string::String>,
35 pub(crate) include_tags: ::std::option::Option<bool>,
36}
37impl GetSinkInputBuilder {
38 /// <p>The ARN of the sink to retrieve information for.</p>
39 /// This field is required.
40 pub fn identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
41 self.identifier = ::std::option::Option::Some(input.into());
42 self
43 }
44 /// <p>The ARN of the sink to retrieve information for.</p>
45 pub fn set_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
46 self.identifier = input;
47 self
48 }
49 /// <p>The ARN of the sink to retrieve information for.</p>
50 pub fn get_identifier(&self) -> &::std::option::Option<::std::string::String> {
51 &self.identifier
52 }
53 /// <p>Specifies whether to include the tags associated with the sink in the response. When <code>IncludeTags</code> is set to <code>true</code> and the caller has the required permission, <code>oam:ListTagsForResource</code>, the API will return the tags for the specified resource. If the caller doesn't have the required permission, <code>oam:ListTagsForResource</code>, the API will raise an exception.</p>
54 /// <p>The default value is <code>false</code>.</p>
55 pub fn include_tags(mut self, input: bool) -> Self {
56 self.include_tags = ::std::option::Option::Some(input);
57 self
58 }
59 /// <p>Specifies whether to include the tags associated with the sink in the response. When <code>IncludeTags</code> is set to <code>true</code> and the caller has the required permission, <code>oam:ListTagsForResource</code>, the API will return the tags for the specified resource. If the caller doesn't have the required permission, <code>oam:ListTagsForResource</code>, the API will raise an exception.</p>
60 /// <p>The default value is <code>false</code>.</p>
61 pub fn set_include_tags(mut self, input: ::std::option::Option<bool>) -> Self {
62 self.include_tags = input;
63 self
64 }
65 /// <p>Specifies whether to include the tags associated with the sink in the response. When <code>IncludeTags</code> is set to <code>true</code> and the caller has the required permission, <code>oam:ListTagsForResource</code>, the API will return the tags for the specified resource. If the caller doesn't have the required permission, <code>oam:ListTagsForResource</code>, the API will raise an exception.</p>
66 /// <p>The default value is <code>false</code>.</p>
67 pub fn get_include_tags(&self) -> &::std::option::Option<bool> {
68 &self.include_tags
69 }
70 /// Consumes the builder and constructs a [`GetSinkInput`](crate::operation::get_sink::GetSinkInput).
71 pub fn build(self) -> ::std::result::Result<crate::operation::get_sink::GetSinkInput, ::aws_smithy_types::error::operation::BuildError> {
72 ::std::result::Result::Ok(crate::operation::get_sink::GetSinkInput {
73 identifier: self.identifier,
74 include_tags: self.include_tags,
75 })
76 }
77}