aws_sdk_elasticbeanstalk/types/
_option_specification.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>A specification identifying an individual configuration option.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct OptionSpecification {
7    /// <p>A unique resource name for a time-based scaling configuration option.</p>
8    pub resource_name: ::std::option::Option<::std::string::String>,
9    /// <p>A unique namespace identifying the option's associated AWS resource.</p>
10    pub namespace: ::std::option::Option<::std::string::String>,
11    /// <p>The name of the configuration option.</p>
12    pub option_name: ::std::option::Option<::std::string::String>,
13}
14impl OptionSpecification {
15    /// <p>A unique resource name for a time-based scaling configuration option.</p>
16    pub fn resource_name(&self) -> ::std::option::Option<&str> {
17        self.resource_name.as_deref()
18    }
19    /// <p>A unique namespace identifying the option's associated AWS resource.</p>
20    pub fn namespace(&self) -> ::std::option::Option<&str> {
21        self.namespace.as_deref()
22    }
23    /// <p>The name of the configuration option.</p>
24    pub fn option_name(&self) -> ::std::option::Option<&str> {
25        self.option_name.as_deref()
26    }
27}
28impl OptionSpecification {
29    /// Creates a new builder-style object to manufacture [`OptionSpecification`](crate::types::OptionSpecification).
30    pub fn builder() -> crate::types::builders::OptionSpecificationBuilder {
31        crate::types::builders::OptionSpecificationBuilder::default()
32    }
33}
34
35/// A builder for [`OptionSpecification`](crate::types::OptionSpecification).
36#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
37#[non_exhaustive]
38pub struct OptionSpecificationBuilder {
39    pub(crate) resource_name: ::std::option::Option<::std::string::String>,
40    pub(crate) namespace: ::std::option::Option<::std::string::String>,
41    pub(crate) option_name: ::std::option::Option<::std::string::String>,
42}
43impl OptionSpecificationBuilder {
44    /// <p>A unique resource name for a time-based scaling configuration option.</p>
45    pub fn resource_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
46        self.resource_name = ::std::option::Option::Some(input.into());
47        self
48    }
49    /// <p>A unique resource name for a time-based scaling configuration option.</p>
50    pub fn set_resource_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
51        self.resource_name = input;
52        self
53    }
54    /// <p>A unique resource name for a time-based scaling configuration option.</p>
55    pub fn get_resource_name(&self) -> &::std::option::Option<::std::string::String> {
56        &self.resource_name
57    }
58    /// <p>A unique namespace identifying the option's associated AWS resource.</p>
59    pub fn namespace(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
60        self.namespace = ::std::option::Option::Some(input.into());
61        self
62    }
63    /// <p>A unique namespace identifying the option's associated AWS resource.</p>
64    pub fn set_namespace(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
65        self.namespace = input;
66        self
67    }
68    /// <p>A unique namespace identifying the option's associated AWS resource.</p>
69    pub fn get_namespace(&self) -> &::std::option::Option<::std::string::String> {
70        &self.namespace
71    }
72    /// <p>The name of the configuration option.</p>
73    pub fn option_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
74        self.option_name = ::std::option::Option::Some(input.into());
75        self
76    }
77    /// <p>The name of the configuration option.</p>
78    pub fn set_option_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
79        self.option_name = input;
80        self
81    }
82    /// <p>The name of the configuration option.</p>
83    pub fn get_option_name(&self) -> &::std::option::Option<::std::string::String> {
84        &self.option_name
85    }
86    /// Consumes the builder and constructs a [`OptionSpecification`](crate::types::OptionSpecification).
87    pub fn build(self) -> crate::types::OptionSpecification {
88        crate::types::OptionSpecification {
89            resource_name: self.resource_name,
90            namespace: self.namespace,
91            option_name: self.option_name,
92        }
93    }
94}