Skip to main content

aws_sdk_applicationinsights/types/
_workload_configuration.rs

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