aws_sdk_applicationinsights/operation/describe_workload/
_describe_workload_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DescribeWorkloadInput {
6    /// <p>The name of the resource group.</p>
7    pub resource_group_name: ::std::option::Option<::std::string::String>,
8    /// <p>The name of the component.</p>
9    pub component_name: ::std::option::Option<::std::string::String>,
10    /// <p>The ID of the workload.</p>
11    pub workload_id: ::std::option::Option<::std::string::String>,
12    /// <p>The Amazon Web Services account ID for the workload owner.</p>
13    pub account_id: ::std::option::Option<::std::string::String>,
14}
15impl DescribeWorkloadInput {
16    /// <p>The name of the resource group.</p>
17    pub fn resource_group_name(&self) -> ::std::option::Option<&str> {
18        self.resource_group_name.as_deref()
19    }
20    /// <p>The name of the component.</p>
21    pub fn component_name(&self) -> ::std::option::Option<&str> {
22        self.component_name.as_deref()
23    }
24    /// <p>The ID of the workload.</p>
25    pub fn workload_id(&self) -> ::std::option::Option<&str> {
26        self.workload_id.as_deref()
27    }
28    /// <p>The Amazon Web Services account ID for the workload owner.</p>
29    pub fn account_id(&self) -> ::std::option::Option<&str> {
30        self.account_id.as_deref()
31    }
32}
33impl DescribeWorkloadInput {
34    /// Creates a new builder-style object to manufacture [`DescribeWorkloadInput`](crate::operation::describe_workload::DescribeWorkloadInput).
35    pub fn builder() -> crate::operation::describe_workload::builders::DescribeWorkloadInputBuilder {
36        crate::operation::describe_workload::builders::DescribeWorkloadInputBuilder::default()
37    }
38}
39
40/// A builder for [`DescribeWorkloadInput`](crate::operation::describe_workload::DescribeWorkloadInput).
41#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
42#[non_exhaustive]
43pub struct DescribeWorkloadInputBuilder {
44    pub(crate) resource_group_name: ::std::option::Option<::std::string::String>,
45    pub(crate) component_name: ::std::option::Option<::std::string::String>,
46    pub(crate) workload_id: ::std::option::Option<::std::string::String>,
47    pub(crate) account_id: ::std::option::Option<::std::string::String>,
48}
49impl DescribeWorkloadInputBuilder {
50    /// <p>The name of the resource group.</p>
51    /// This field is required.
52    pub fn resource_group_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53        self.resource_group_name = ::std::option::Option::Some(input.into());
54        self
55    }
56    /// <p>The name of the resource group.</p>
57    pub fn set_resource_group_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58        self.resource_group_name = input;
59        self
60    }
61    /// <p>The name of the resource group.</p>
62    pub fn get_resource_group_name(&self) -> &::std::option::Option<::std::string::String> {
63        &self.resource_group_name
64    }
65    /// <p>The name of the component.</p>
66    /// This field is required.
67    pub fn component_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
68        self.component_name = ::std::option::Option::Some(input.into());
69        self
70    }
71    /// <p>The name of the component.</p>
72    pub fn set_component_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
73        self.component_name = input;
74        self
75    }
76    /// <p>The name of the component.</p>
77    pub fn get_component_name(&self) -> &::std::option::Option<::std::string::String> {
78        &self.component_name
79    }
80    /// <p>The ID of the workload.</p>
81    /// This field is required.
82    pub fn workload_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
83        self.workload_id = ::std::option::Option::Some(input.into());
84        self
85    }
86    /// <p>The ID of the workload.</p>
87    pub fn set_workload_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
88        self.workload_id = input;
89        self
90    }
91    /// <p>The ID of the workload.</p>
92    pub fn get_workload_id(&self) -> &::std::option::Option<::std::string::String> {
93        &self.workload_id
94    }
95    /// <p>The Amazon Web Services account ID for the workload owner.</p>
96    pub fn account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
97        self.account_id = ::std::option::Option::Some(input.into());
98        self
99    }
100    /// <p>The Amazon Web Services account ID for the workload owner.</p>
101    pub fn set_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
102        self.account_id = input;
103        self
104    }
105    /// <p>The Amazon Web Services account ID for the workload owner.</p>
106    pub fn get_account_id(&self) -> &::std::option::Option<::std::string::String> {
107        &self.account_id
108    }
109    /// Consumes the builder and constructs a [`DescribeWorkloadInput`](crate::operation::describe_workload::DescribeWorkloadInput).
110    pub fn build(
111        self,
112    ) -> ::std::result::Result<crate::operation::describe_workload::DescribeWorkloadInput, ::aws_smithy_types::error::operation::BuildError> {
113        ::std::result::Result::Ok(crate::operation::describe_workload::DescribeWorkloadInput {
114            resource_group_name: self.resource_group_name,
115            component_name: self.component_name,
116            workload_id: self.workload_id,
117            account_id: self.account_id,
118        })
119    }
120}