-
Notifications
You must be signed in to change notification settings - Fork 244
/
_metric_source.rs
73 lines (70 loc) · 3.06 KB
/
_metric_source.rs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>The list of metric sources required to generate recommendations for commercial software licenses.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct MetricSource {
/// <p>The name of the metric source provider.</p>
pub provider: ::std::option::Option<crate::types::MetricSourceProvider>,
/// <p>The ARN of the metric source provider.</p>
pub provider_arn: ::std::option::Option<::std::string::String>,
}
impl MetricSource {
/// <p>The name of the metric source provider.</p>
pub fn provider(&self) -> ::std::option::Option<& crate::types::MetricSourceProvider> {
self.provider.as_ref()
}
/// <p>The ARN of the metric source provider.</p>
pub fn provider_arn(&self) -> ::std::option::Option<& str> {
self.provider_arn.as_deref()
}
}
impl MetricSource {
/// Creates a new builder-style object to manufacture [`MetricSource`](crate::types::MetricSource).
pub fn builder() -> crate::types::builders::MetricSourceBuilder {
crate::types::builders::MetricSourceBuilder::default()
}
}
/// A builder for [`MetricSource`](crate::types::MetricSource).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct MetricSourceBuilder {
pub(crate) provider: ::std::option::Option<crate::types::MetricSourceProvider>,
pub(crate) provider_arn: ::std::option::Option<::std::string::String>,
}
impl MetricSourceBuilder {
/// <p>The name of the metric source provider.</p>
pub fn provider(mut self, input: crate::types::MetricSourceProvider) -> Self {
self.provider = ::std::option::Option::Some(input);
self
}
/// <p>The name of the metric source provider.</p>
pub fn set_provider(mut self, input: ::std::option::Option<crate::types::MetricSourceProvider>) -> Self {
self.provider = input; self
}
/// <p>The name of the metric source provider.</p>
pub fn get_provider(&self) -> &::std::option::Option<crate::types::MetricSourceProvider> {
&self.provider
}
/// <p>The ARN of the metric source provider.</p>
pub fn provider_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.provider_arn = ::std::option::Option::Some(input.into());
self
}
/// <p>The ARN of the metric source provider.</p>
pub fn set_provider_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.provider_arn = input; self
}
/// <p>The ARN of the metric source provider.</p>
pub fn get_provider_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.provider_arn
}
/// Consumes the builder and constructs a [`MetricSource`](crate::types::MetricSource).
pub fn build(self) -> crate::types::MetricSource {
crate::types::MetricSource {
provider: self.provider
,
provider_arn: self.provider_arn
,
}
}
}