aws_sdk_kinesis/operation/describe_limits/
_describe_limits_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DescribeLimitsOutput {
6 pub shard_limit: i32,
8 pub open_shard_count: i32,
10 pub on_demand_stream_count: i32,
12 pub on_demand_stream_count_limit: i32,
14 _request_id: Option<String>,
15}
16impl DescribeLimitsOutput {
17 pub fn shard_limit(&self) -> i32 {
19 self.shard_limit
20 }
21 pub fn open_shard_count(&self) -> i32 {
23 self.open_shard_count
24 }
25 pub fn on_demand_stream_count(&self) -> i32 {
27 self.on_demand_stream_count
28 }
29 pub fn on_demand_stream_count_limit(&self) -> i32 {
31 self.on_demand_stream_count_limit
32 }
33}
34impl ::aws_types::request_id::RequestId for DescribeLimitsOutput {
35 fn request_id(&self) -> Option<&str> {
36 self._request_id.as_deref()
37 }
38}
39impl DescribeLimitsOutput {
40 pub fn builder() -> crate::operation::describe_limits::builders::DescribeLimitsOutputBuilder {
42 crate::operation::describe_limits::builders::DescribeLimitsOutputBuilder::default()
43 }
44}
45
46#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
48#[non_exhaustive]
49pub struct DescribeLimitsOutputBuilder {
50 pub(crate) shard_limit: ::std::option::Option<i32>,
51 pub(crate) open_shard_count: ::std::option::Option<i32>,
52 pub(crate) on_demand_stream_count: ::std::option::Option<i32>,
53 pub(crate) on_demand_stream_count_limit: ::std::option::Option<i32>,
54 _request_id: Option<String>,
55}
56impl DescribeLimitsOutputBuilder {
57 pub fn shard_limit(mut self, input: i32) -> Self {
60 self.shard_limit = ::std::option::Option::Some(input);
61 self
62 }
63 pub fn set_shard_limit(mut self, input: ::std::option::Option<i32>) -> Self {
65 self.shard_limit = input;
66 self
67 }
68 pub fn get_shard_limit(&self) -> &::std::option::Option<i32> {
70 &self.shard_limit
71 }
72 pub fn open_shard_count(mut self, input: i32) -> Self {
75 self.open_shard_count = ::std::option::Option::Some(input);
76 self
77 }
78 pub fn set_open_shard_count(mut self, input: ::std::option::Option<i32>) -> Self {
80 self.open_shard_count = input;
81 self
82 }
83 pub fn get_open_shard_count(&self) -> &::std::option::Option<i32> {
85 &self.open_shard_count
86 }
87 pub fn on_demand_stream_count(mut self, input: i32) -> Self {
90 self.on_demand_stream_count = ::std::option::Option::Some(input);
91 self
92 }
93 pub fn set_on_demand_stream_count(mut self, input: ::std::option::Option<i32>) -> Self {
95 self.on_demand_stream_count = input;
96 self
97 }
98 pub fn get_on_demand_stream_count(&self) -> &::std::option::Option<i32> {
100 &self.on_demand_stream_count
101 }
102 pub fn on_demand_stream_count_limit(mut self, input: i32) -> Self {
105 self.on_demand_stream_count_limit = ::std::option::Option::Some(input);
106 self
107 }
108 pub fn set_on_demand_stream_count_limit(mut self, input: ::std::option::Option<i32>) -> Self {
110 self.on_demand_stream_count_limit = input;
111 self
112 }
113 pub fn get_on_demand_stream_count_limit(&self) -> &::std::option::Option<i32> {
115 &self.on_demand_stream_count_limit
116 }
117 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
118 self._request_id = Some(request_id.into());
119 self
120 }
121
122 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
123 self._request_id = request_id;
124 self
125 }
126 pub fn build(
133 self,
134 ) -> ::std::result::Result<crate::operation::describe_limits::DescribeLimitsOutput, ::aws_smithy_types::error::operation::BuildError> {
135 ::std::result::Result::Ok(crate::operation::describe_limits::DescribeLimitsOutput {
136 shard_limit: self.shard_limit.ok_or_else(|| {
137 ::aws_smithy_types::error::operation::BuildError::missing_field(
138 "shard_limit",
139 "shard_limit was not specified but it is required when building DescribeLimitsOutput",
140 )
141 })?,
142 open_shard_count: self.open_shard_count.ok_or_else(|| {
143 ::aws_smithy_types::error::operation::BuildError::missing_field(
144 "open_shard_count",
145 "open_shard_count was not specified but it is required when building DescribeLimitsOutput",
146 )
147 })?,
148 on_demand_stream_count: self.on_demand_stream_count.ok_or_else(|| {
149 ::aws_smithy_types::error::operation::BuildError::missing_field(
150 "on_demand_stream_count",
151 "on_demand_stream_count was not specified but it is required when building DescribeLimitsOutput",
152 )
153 })?,
154 on_demand_stream_count_limit: self.on_demand_stream_count_limit.ok_or_else(|| {
155 ::aws_smithy_types::error::operation::BuildError::missing_field(
156 "on_demand_stream_count_limit",
157 "on_demand_stream_count_limit was not specified but it is required when building DescribeLimitsOutput",
158 )
159 })?,
160 _request_id: self._request_id,
161 })
162 }
163}