rivet_kv/
operation.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2/// Operation shape for `Delete`.
3///
4/// This is usually constructed for you using the the fluent builder returned by
5/// [`delete`](crate::client::Client::delete).
6///
7/// See [`crate::client::fluent_builders::Delete`] for more details about the operation.
8#[derive(std::default::Default, std::clone::Clone, std::fmt::Debug)]
9pub struct Delete {
10	_private: (),
11}
12impl Delete {
13	/// Creates a new builder-style object to manufacture [`DeleteInput`](crate::input::DeleteInput)
14	pub fn builder() -> crate::input::delete_input::Builder {
15		crate::input::delete_input::Builder::default()
16	}
17	/// Creates a new `Delete` operation.
18	pub fn new() -> Self {
19		Self { _private: () }
20	}
21}
22impl aws_smithy_http::response::ParseStrictResponse for Delete {
23	type Output = std::result::Result<crate::output::DeleteOutput, crate::error::DeleteError>;
24	fn parse(&self, response: &http::Response<bytes::Bytes>) -> Self::Output {
25		if !response.status().is_success() && response.status().as_u16() != 200 {
26			crate::operation_deser::parse_delete_error(response)
27		} else {
28			crate::operation_deser::parse_delete_response(response)
29		}
30	}
31}
32
33/// Operation shape for `DeleteBatch`.
34///
35/// This is usually constructed for you using the the fluent builder returned by
36/// [`delete_batch`](crate::client::Client::delete_batch).
37///
38/// See [`crate::client::fluent_builders::DeleteBatch`] for more details about the operation.
39#[derive(std::default::Default, std::clone::Clone, std::fmt::Debug)]
40pub struct DeleteBatch {
41	_private: (),
42}
43impl DeleteBatch {
44	/// Creates a new builder-style object to manufacture [`DeleteBatchInput`](crate::input::DeleteBatchInput)
45	pub fn builder() -> crate::input::delete_batch_input::Builder {
46		crate::input::delete_batch_input::Builder::default()
47	}
48	/// Creates a new `DeleteBatch` operation.
49	pub fn new() -> Self {
50		Self { _private: () }
51	}
52}
53impl aws_smithy_http::response::ParseStrictResponse for DeleteBatch {
54	type Output =
55		std::result::Result<crate::output::DeleteBatchOutput, crate::error::DeleteBatchError>;
56	fn parse(&self, response: &http::Response<bytes::Bytes>) -> Self::Output {
57		if !response.status().is_success() && response.status().as_u16() != 200 {
58			crate::operation_deser::parse_delete_batch_error(response)
59		} else {
60			crate::operation_deser::parse_delete_batch_response(response)
61		}
62	}
63}
64
65/// Operation shape for `Get`.
66///
67/// This is usually constructed for you using the the fluent builder returned by
68/// [`get`](crate::client::Client::get).
69///
70/// See [`crate::client::fluent_builders::Get`] for more details about the operation.
71#[derive(std::default::Default, std::clone::Clone, std::fmt::Debug)]
72pub struct Get {
73	_private: (),
74}
75impl Get {
76	/// Creates a new builder-style object to manufacture [`GetInput`](crate::input::GetInput)
77	pub fn builder() -> crate::input::get_input::Builder {
78		crate::input::get_input::Builder::default()
79	}
80	/// Creates a new `Get` operation.
81	pub fn new() -> Self {
82		Self { _private: () }
83	}
84}
85impl aws_smithy_http::response::ParseStrictResponse for Get {
86	type Output = std::result::Result<crate::output::GetOutput, crate::error::GetError>;
87	fn parse(&self, response: &http::Response<bytes::Bytes>) -> Self::Output {
88		if !response.status().is_success() && response.status().as_u16() != 200 {
89			crate::operation_deser::parse_get_error(response)
90		} else {
91			crate::operation_deser::parse_get_response(response)
92		}
93	}
94}
95
96/// Operation shape for `GetBatch`.
97///
98/// This is usually constructed for you using the the fluent builder returned by
99/// [`get_batch`](crate::client::Client::get_batch).
100///
101/// See [`crate::client::fluent_builders::GetBatch`] for more details about the operation.
102#[derive(std::default::Default, std::clone::Clone, std::fmt::Debug)]
103pub struct GetBatch {
104	_private: (),
105}
106impl GetBatch {
107	/// Creates a new builder-style object to manufacture [`GetBatchInput`](crate::input::GetBatchInput)
108	pub fn builder() -> crate::input::get_batch_input::Builder {
109		crate::input::get_batch_input::Builder::default()
110	}
111	/// Creates a new `GetBatch` operation.
112	pub fn new() -> Self {
113		Self { _private: () }
114	}
115}
116impl aws_smithy_http::response::ParseStrictResponse for GetBatch {
117	type Output = std::result::Result<crate::output::GetBatchOutput, crate::error::GetBatchError>;
118	fn parse(&self, response: &http::Response<bytes::Bytes>) -> Self::Output {
119		if !response.status().is_success() && response.status().as_u16() != 200 {
120			crate::operation_deser::parse_get_batch_error(response)
121		} else {
122			crate::operation_deser::parse_get_batch_response(response)
123		}
124	}
125}
126
127/// Operation shape for `Put`.
128///
129/// This is usually constructed for you using the the fluent builder returned by
130/// [`put`](crate::client::Client::put).
131///
132/// See [`crate::client::fluent_builders::Put`] for more details about the operation.
133#[derive(std::default::Default, std::clone::Clone, std::fmt::Debug)]
134pub struct Put {
135	_private: (),
136}
137impl Put {
138	/// Creates a new builder-style object to manufacture [`PutInput`](crate::input::PutInput)
139	pub fn builder() -> crate::input::put_input::Builder {
140		crate::input::put_input::Builder::default()
141	}
142	/// Creates a new `Put` operation.
143	pub fn new() -> Self {
144		Self { _private: () }
145	}
146}
147impl aws_smithy_http::response::ParseStrictResponse for Put {
148	type Output = std::result::Result<crate::output::PutOutput, crate::error::PutError>;
149	fn parse(&self, response: &http::Response<bytes::Bytes>) -> Self::Output {
150		if !response.status().is_success() && response.status().as_u16() != 200 {
151			crate::operation_deser::parse_put_error(response)
152		} else {
153			crate::operation_deser::parse_put_response(response)
154		}
155	}
156}
157
158/// Operation shape for `PutBatch`.
159///
160/// This is usually constructed for you using the the fluent builder returned by
161/// [`put_batch`](crate::client::Client::put_batch).
162///
163/// See [`crate::client::fluent_builders::PutBatch`] for more details about the operation.
164#[derive(std::default::Default, std::clone::Clone, std::fmt::Debug)]
165pub struct PutBatch {
166	_private: (),
167}
168impl PutBatch {
169	/// Creates a new builder-style object to manufacture [`PutBatchInput`](crate::input::PutBatchInput)
170	pub fn builder() -> crate::input::put_batch_input::Builder {
171		crate::input::put_batch_input::Builder::default()
172	}
173	/// Creates a new `PutBatch` operation.
174	pub fn new() -> Self {
175		Self { _private: () }
176	}
177}
178impl aws_smithy_http::response::ParseStrictResponse for PutBatch {
179	type Output = std::result::Result<crate::output::PutBatchOutput, crate::error::PutBatchError>;
180	fn parse(&self, response: &http::Response<bytes::Bytes>) -> Self::Output {
181		if !response.status().is_success() && response.status().as_u16() != 200 {
182			crate::operation_deser::parse_put_batch_error(response)
183		} else {
184			crate::operation_deser::parse_put_batch_response(response)
185		}
186	}
187}