aws_sdk_autoscaling/operation/delete_policy/
_delete_policy_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DeletePolicyInput {
6 pub auto_scaling_group_name: ::std::option::Option<::std::string::String>,
8 pub policy_name: ::std::option::Option<::std::string::String>,
10}
11impl DeletePolicyInput {
12 pub fn auto_scaling_group_name(&self) -> ::std::option::Option<&str> {
14 self.auto_scaling_group_name.as_deref()
15 }
16 pub fn policy_name(&self) -> ::std::option::Option<&str> {
18 self.policy_name.as_deref()
19 }
20}
21impl DeletePolicyInput {
22 pub fn builder() -> crate::operation::delete_policy::builders::DeletePolicyInputBuilder {
24 crate::operation::delete_policy::builders::DeletePolicyInputBuilder::default()
25 }
26}
27
28#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
30#[non_exhaustive]
31pub struct DeletePolicyInputBuilder {
32 pub(crate) auto_scaling_group_name: ::std::option::Option<::std::string::String>,
33 pub(crate) policy_name: ::std::option::Option<::std::string::String>,
34}
35impl DeletePolicyInputBuilder {
36 pub fn auto_scaling_group_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
38 self.auto_scaling_group_name = ::std::option::Option::Some(input.into());
39 self
40 }
41 pub fn set_auto_scaling_group_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
43 self.auto_scaling_group_name = input;
44 self
45 }
46 pub fn get_auto_scaling_group_name(&self) -> &::std::option::Option<::std::string::String> {
48 &self.auto_scaling_group_name
49 }
50 pub fn policy_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53 self.policy_name = ::std::option::Option::Some(input.into());
54 self
55 }
56 pub fn set_policy_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58 self.policy_name = input;
59 self
60 }
61 pub fn get_policy_name(&self) -> &::std::option::Option<::std::string::String> {
63 &self.policy_name
64 }
65 pub fn build(
67 self,
68 ) -> ::std::result::Result<crate::operation::delete_policy::DeletePolicyInput, ::aws_smithy_types::error::operation::BuildError> {
69 ::std::result::Result::Ok(crate::operation::delete_policy::DeletePolicyInput {
70 auto_scaling_group_name: self.auto_scaling_group_name,
71 policy_name: self.policy_name,
72 })
73 }
74}