aws_sdk_redshift/operation/purchase_reserved_node_offering/
_purchase_reserved_node_offering_input.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct PurchaseReservedNodeOfferingInput {
7 pub reserved_node_offering_id: ::std::option::Option<::std::string::String>,
9 pub node_count: ::std::option::Option<i32>,
12}
13impl PurchaseReservedNodeOfferingInput {
14 pub fn reserved_node_offering_id(&self) -> ::std::option::Option<&str> {
16 self.reserved_node_offering_id.as_deref()
17 }
18 pub fn node_count(&self) -> ::std::option::Option<i32> {
21 self.node_count
22 }
23}
24impl PurchaseReservedNodeOfferingInput {
25 pub fn builder() -> crate::operation::purchase_reserved_node_offering::builders::PurchaseReservedNodeOfferingInputBuilder {
27 crate::operation::purchase_reserved_node_offering::builders::PurchaseReservedNodeOfferingInputBuilder::default()
28 }
29}
30
31#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
33#[non_exhaustive]
34pub struct PurchaseReservedNodeOfferingInputBuilder {
35 pub(crate) reserved_node_offering_id: ::std::option::Option<::std::string::String>,
36 pub(crate) node_count: ::std::option::Option<i32>,
37}
38impl PurchaseReservedNodeOfferingInputBuilder {
39 pub fn reserved_node_offering_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
42 self.reserved_node_offering_id = ::std::option::Option::Some(input.into());
43 self
44 }
45 pub fn set_reserved_node_offering_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
47 self.reserved_node_offering_id = input;
48 self
49 }
50 pub fn get_reserved_node_offering_id(&self) -> &::std::option::Option<::std::string::String> {
52 &self.reserved_node_offering_id
53 }
54 pub fn node_count(mut self, input: i32) -> Self {
57 self.node_count = ::std::option::Option::Some(input);
58 self
59 }
60 pub fn set_node_count(mut self, input: ::std::option::Option<i32>) -> Self {
63 self.node_count = input;
64 self
65 }
66 pub fn get_node_count(&self) -> &::std::option::Option<i32> {
69 &self.node_count
70 }
71 pub fn build(
73 self,
74 ) -> ::std::result::Result<
75 crate::operation::purchase_reserved_node_offering::PurchaseReservedNodeOfferingInput,
76 ::aws_smithy_types::error::operation::BuildError,
77 > {
78 ::std::result::Result::Ok(crate::operation::purchase_reserved_node_offering::PurchaseReservedNodeOfferingInput {
79 reserved_node_offering_id: self.reserved_node_offering_id,
80 node_count: self.node_count,
81 })
82 }
83}