aws_sdk_applicationinsights/operation/describe_workload/
_describe_workload_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DescribeWorkloadInput {
6 pub resource_group_name: ::std::option::Option<::std::string::String>,
8 pub component_name: ::std::option::Option<::std::string::String>,
10 pub workload_id: ::std::option::Option<::std::string::String>,
12 pub account_id: ::std::option::Option<::std::string::String>,
14}
15impl DescribeWorkloadInput {
16 pub fn resource_group_name(&self) -> ::std::option::Option<&str> {
18 self.resource_group_name.as_deref()
19 }
20 pub fn component_name(&self) -> ::std::option::Option<&str> {
22 self.component_name.as_deref()
23 }
24 pub fn workload_id(&self) -> ::std::option::Option<&str> {
26 self.workload_id.as_deref()
27 }
28 pub fn account_id(&self) -> ::std::option::Option<&str> {
30 self.account_id.as_deref()
31 }
32}
33impl DescribeWorkloadInput {
34 pub fn builder() -> crate::operation::describe_workload::builders::DescribeWorkloadInputBuilder {
36 crate::operation::describe_workload::builders::DescribeWorkloadInputBuilder::default()
37 }
38}
39
40#[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 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 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 pub fn get_resource_group_name(&self) -> &::std::option::Option<::std::string::String> {
63 &self.resource_group_name
64 }
65 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 pub fn set_component_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
73 self.component_name = input;
74 self
75 }
76 pub fn get_component_name(&self) -> &::std::option::Option<::std::string::String> {
78 &self.component_name
79 }
80 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 pub fn set_workload_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
88 self.workload_id = input;
89 self
90 }
91 pub fn get_workload_id(&self) -> &::std::option::Option<::std::string::String> {
93 &self.workload_id
94 }
95 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 pub fn set_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
102 self.account_id = input;
103 self
104 }
105 pub fn get_account_id(&self) -> &::std::option::Option<::std::string::String> {
107 &self.account_id
108 }
109 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}