aws_sdk_amp/operation/update_logging_configuration/
_update_logging_configuration_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Represents the input of an <code>UpdateLoggingConfiguration</code> operation.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct UpdateLoggingConfigurationInput {
7    /// <p>The ID of the workspace to update the logging configuration for.</p>
8    pub workspace_id: ::std::option::Option<::std::string::String>,
9    /// <p>The ARN of the CloudWatch log group to which the vended log data will be published.</p>
10    pub log_group_arn: ::std::option::Option<::std::string::String>,
11    /// <p>A unique identifier that you can provide to ensure the idempotency of the request. Case-sensitive.</p>
12    pub client_token: ::std::option::Option<::std::string::String>,
13}
14impl UpdateLoggingConfigurationInput {
15    /// <p>The ID of the workspace to update the logging configuration for.</p>
16    pub fn workspace_id(&self) -> ::std::option::Option<&str> {
17        self.workspace_id.as_deref()
18    }
19    /// <p>The ARN of the CloudWatch log group to which the vended log data will be published.</p>
20    pub fn log_group_arn(&self) -> ::std::option::Option<&str> {
21        self.log_group_arn.as_deref()
22    }
23    /// <p>A unique identifier that you can provide to ensure the idempotency of the request. Case-sensitive.</p>
24    pub fn client_token(&self) -> ::std::option::Option<&str> {
25        self.client_token.as_deref()
26    }
27}
28impl UpdateLoggingConfigurationInput {
29    /// Creates a new builder-style object to manufacture [`UpdateLoggingConfigurationInput`](crate::operation::update_logging_configuration::UpdateLoggingConfigurationInput).
30    pub fn builder() -> crate::operation::update_logging_configuration::builders::UpdateLoggingConfigurationInputBuilder {
31        crate::operation::update_logging_configuration::builders::UpdateLoggingConfigurationInputBuilder::default()
32    }
33}
34
35/// A builder for [`UpdateLoggingConfigurationInput`](crate::operation::update_logging_configuration::UpdateLoggingConfigurationInput).
36#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
37#[non_exhaustive]
38pub struct UpdateLoggingConfigurationInputBuilder {
39    pub(crate) workspace_id: ::std::option::Option<::std::string::String>,
40    pub(crate) log_group_arn: ::std::option::Option<::std::string::String>,
41    pub(crate) client_token: ::std::option::Option<::std::string::String>,
42}
43impl UpdateLoggingConfigurationInputBuilder {
44    /// <p>The ID of the workspace to update the logging configuration for.</p>
45    /// This field is required.
46    pub fn workspace_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
47        self.workspace_id = ::std::option::Option::Some(input.into());
48        self
49    }
50    /// <p>The ID of the workspace to update the logging configuration for.</p>
51    pub fn set_workspace_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
52        self.workspace_id = input;
53        self
54    }
55    /// <p>The ID of the workspace to update the logging configuration for.</p>
56    pub fn get_workspace_id(&self) -> &::std::option::Option<::std::string::String> {
57        &self.workspace_id
58    }
59    /// <p>The ARN of the CloudWatch log group to which the vended log data will be published.</p>
60    /// This field is required.
61    pub fn log_group_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
62        self.log_group_arn = ::std::option::Option::Some(input.into());
63        self
64    }
65    /// <p>The ARN of the CloudWatch log group to which the vended log data will be published.</p>
66    pub fn set_log_group_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
67        self.log_group_arn = input;
68        self
69    }
70    /// <p>The ARN of the CloudWatch log group to which the vended log data will be published.</p>
71    pub fn get_log_group_arn(&self) -> &::std::option::Option<::std::string::String> {
72        &self.log_group_arn
73    }
74    /// <p>A unique identifier that you can provide to ensure the idempotency of the request. Case-sensitive.</p>
75    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
76        self.client_token = ::std::option::Option::Some(input.into());
77        self
78    }
79    /// <p>A unique identifier that you can provide to ensure the idempotency of the request. Case-sensitive.</p>
80    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
81        self.client_token = input;
82        self
83    }
84    /// <p>A unique identifier that you can provide to ensure the idempotency of the request. Case-sensitive.</p>
85    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
86        &self.client_token
87    }
88    /// Consumes the builder and constructs a [`UpdateLoggingConfigurationInput`](crate::operation::update_logging_configuration::UpdateLoggingConfigurationInput).
89    pub fn build(
90        self,
91    ) -> ::std::result::Result<
92        crate::operation::update_logging_configuration::UpdateLoggingConfigurationInput,
93        ::aws_smithy_types::error::operation::BuildError,
94    > {
95        ::std::result::Result::Ok(crate::operation::update_logging_configuration::UpdateLoggingConfigurationInput {
96            workspace_id: self.workspace_id,
97            log_group_arn: self.log_group_arn,
98            client_token: self.client_token,
99        })
100    }
101}