aws_sdk_deadline/types/
_service_managed_ec2_instance_market_options.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct ServiceManagedEc2InstanceMarketOptions {
7 pub r#type: crate::types::Ec2MarketType,
9}
10impl ServiceManagedEc2InstanceMarketOptions {
11 pub fn r#type(&self) -> &crate::types::Ec2MarketType {
13 &self.r#type
14 }
15}
16impl ServiceManagedEc2InstanceMarketOptions {
17 pub fn builder() -> crate::types::builders::ServiceManagedEc2InstanceMarketOptionsBuilder {
19 crate::types::builders::ServiceManagedEc2InstanceMarketOptionsBuilder::default()
20 }
21}
22
23#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
25#[non_exhaustive]
26pub struct ServiceManagedEc2InstanceMarketOptionsBuilder {
27 pub(crate) r#type: ::std::option::Option<crate::types::Ec2MarketType>,
28}
29impl ServiceManagedEc2InstanceMarketOptionsBuilder {
30 pub fn r#type(mut self, input: crate::types::Ec2MarketType) -> Self {
33 self.r#type = ::std::option::Option::Some(input);
34 self
35 }
36 pub fn set_type(mut self, input: ::std::option::Option<crate::types::Ec2MarketType>) -> Self {
38 self.r#type = input;
39 self
40 }
41 pub fn get_type(&self) -> &::std::option::Option<crate::types::Ec2MarketType> {
43 &self.r#type
44 }
45 pub fn build(
49 self,
50 ) -> ::std::result::Result<crate::types::ServiceManagedEc2InstanceMarketOptions, ::aws_smithy_types::error::operation::BuildError> {
51 ::std::result::Result::Ok(crate::types::ServiceManagedEc2InstanceMarketOptions {
52 r#type: self.r#type.ok_or_else(|| {
53 ::aws_smithy_types::error::operation::BuildError::missing_field(
54 "r#type",
55 "r#type was not specified but it is required when building ServiceManagedEc2InstanceMarketOptions",
56 )
57 })?,
58 })
59 }
60}