Skip to main content

aws_sdk_emrserverless/types/
_worker_type_specification.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>The specifications for a worker type.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct WorkerTypeSpecification {
7    /// <p>The image configuration for a worker type.</p>
8    pub image_configuration: ::std::option::Option<crate::types::ImageConfiguration>,
9}
10impl WorkerTypeSpecification {
11    /// <p>The image configuration for a worker type.</p>
12    pub fn image_configuration(&self) -> ::std::option::Option<&crate::types::ImageConfiguration> {
13        self.image_configuration.as_ref()
14    }
15}
16impl WorkerTypeSpecification {
17    /// Creates a new builder-style object to manufacture [`WorkerTypeSpecification`](crate::types::WorkerTypeSpecification).
18    pub fn builder() -> crate::types::builders::WorkerTypeSpecificationBuilder {
19        crate::types::builders::WorkerTypeSpecificationBuilder::default()
20    }
21}
22
23/// A builder for [`WorkerTypeSpecification`](crate::types::WorkerTypeSpecification).
24#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
25#[non_exhaustive]
26pub struct WorkerTypeSpecificationBuilder {
27    pub(crate) image_configuration: ::std::option::Option<crate::types::ImageConfiguration>,
28}
29impl WorkerTypeSpecificationBuilder {
30    /// <p>The image configuration for a worker type.</p>
31    pub fn image_configuration(mut self, input: crate::types::ImageConfiguration) -> Self {
32        self.image_configuration = ::std::option::Option::Some(input);
33        self
34    }
35    /// <p>The image configuration for a worker type.</p>
36    pub fn set_image_configuration(mut self, input: ::std::option::Option<crate::types::ImageConfiguration>) -> Self {
37        self.image_configuration = input;
38        self
39    }
40    /// <p>The image configuration for a worker type.</p>
41    pub fn get_image_configuration(&self) -> &::std::option::Option<crate::types::ImageConfiguration> {
42        &self.image_configuration
43    }
44    /// Consumes the builder and constructs a [`WorkerTypeSpecification`](crate::types::WorkerTypeSpecification).
45    pub fn build(self) -> crate::types::WorkerTypeSpecification {
46        crate::types::WorkerTypeSpecification {
47            image_configuration: self.image_configuration,
48        }
49    }
50}