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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct PutComplianceItemsInput {
/// <p>Specify an ID for this resource. For a managed node, this is the node ID.</p>
pub resource_id: ::std::option::Option<::std::string::String>,
/// <p>Specify the type of resource. <code>ManagedInstance</code> is currently the only supported resource type.</p>
pub resource_type: ::std::option::Option<::std::string::String>,
/// <p>Specify the compliance type. For example, specify Association (for a State Manager association), Patch, or Custom:<code>string</code>.</p>
pub compliance_type: ::std::option::Option<::std::string::String>,
/// <p>A summary of the call execution that includes an execution ID, the type of execution (for example, <code>Command</code>), and the date/time of the execution using a datetime object that is saved in the following format: <code>yyyy-MM-dd'T'HH:mm:ss'Z'</code></p>
pub execution_summary: ::std::option::Option<crate::types::ComplianceExecutionSummary>,
/// <p>Information about the compliance as defined by the resource type. For example, for a patch compliance type, <code>Items</code> includes information about the PatchSeverity, Classification, and so on.</p>
pub items: ::std::option::Option<::std::vec::Vec<crate::types::ComplianceItemEntry>>,
/// <p>MD5 or SHA-256 content hash. The content hash is used to determine if existing information should be overwritten or ignored. If the content hashes match, the request to put compliance information is ignored.</p>
pub item_content_hash: ::std::option::Option<::std::string::String>,
/// <p>The mode for uploading compliance items. You can specify <code>COMPLETE</code> or <code>PARTIAL</code>. In <code>COMPLETE</code> mode, the system overwrites all existing compliance information for the resource. You must provide a full list of compliance items each time you send the request.</p>
/// <p>In <code>PARTIAL</code> mode, the system overwrites compliance information for a specific association. The association must be configured with <code>SyncCompliance</code> set to <code>MANUAL</code>. By default, all requests use <code>COMPLETE</code> mode.</p><note>
/// <p>This attribute is only valid for association compliance.</p>
/// </note>
pub upload_type: ::std::option::Option<crate::types::ComplianceUploadType>,
}
impl PutComplianceItemsInput {
/// <p>Specify an ID for this resource. For a managed node, this is the node ID.</p>
pub fn resource_id(&self) -> ::std::option::Option<&str> {
self.resource_id.as_deref()
}
/// <p>Specify the type of resource. <code>ManagedInstance</code> is currently the only supported resource type.</p>
pub fn resource_type(&self) -> ::std::option::Option<&str> {
self.resource_type.as_deref()
}
/// <p>Specify the compliance type. For example, specify Association (for a State Manager association), Patch, or Custom:<code>string</code>.</p>
pub fn compliance_type(&self) -> ::std::option::Option<&str> {
self.compliance_type.as_deref()
}
/// <p>A summary of the call execution that includes an execution ID, the type of execution (for example, <code>Command</code>), and the date/time of the execution using a datetime object that is saved in the following format: <code>yyyy-MM-dd'T'HH:mm:ss'Z'</code></p>
pub fn execution_summary(&self) -> ::std::option::Option<&crate::types::ComplianceExecutionSummary> {
self.execution_summary.as_ref()
}
/// <p>Information about the compliance as defined by the resource type. For example, for a patch compliance type, <code>Items</code> includes information about the PatchSeverity, Classification, and so on.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.items.is_none()`.
pub fn items(&self) -> &[crate::types::ComplianceItemEntry] {
self.items.as_deref().unwrap_or_default()
}
/// <p>MD5 or SHA-256 content hash. The content hash is used to determine if existing information should be overwritten or ignored. If the content hashes match, the request to put compliance information is ignored.</p>
pub fn item_content_hash(&self) -> ::std::option::Option<&str> {
self.item_content_hash.as_deref()
}
/// <p>The mode for uploading compliance items. You can specify <code>COMPLETE</code> or <code>PARTIAL</code>. In <code>COMPLETE</code> mode, the system overwrites all existing compliance information for the resource. You must provide a full list of compliance items each time you send the request.</p>
/// <p>In <code>PARTIAL</code> mode, the system overwrites compliance information for a specific association. The association must be configured with <code>SyncCompliance</code> set to <code>MANUAL</code>. By default, all requests use <code>COMPLETE</code> mode.</p><note>
/// <p>This attribute is only valid for association compliance.</p>
/// </note>
pub fn upload_type(&self) -> ::std::option::Option<&crate::types::ComplianceUploadType> {
self.upload_type.as_ref()
}
}
impl PutComplianceItemsInput {
/// Creates a new builder-style object to manufacture [`PutComplianceItemsInput`](crate::operation::put_compliance_items::PutComplianceItemsInput).
pub fn builder() -> crate::operation::put_compliance_items::builders::PutComplianceItemsInputBuilder {
crate::operation::put_compliance_items::builders::PutComplianceItemsInputBuilder::default()
}
}
/// A builder for [`PutComplianceItemsInput`](crate::operation::put_compliance_items::PutComplianceItemsInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct PutComplianceItemsInputBuilder {
pub(crate) resource_id: ::std::option::Option<::std::string::String>,
pub(crate) resource_type: ::std::option::Option<::std::string::String>,
pub(crate) compliance_type: ::std::option::Option<::std::string::String>,
pub(crate) execution_summary: ::std::option::Option<crate::types::ComplianceExecutionSummary>,
pub(crate) items: ::std::option::Option<::std::vec::Vec<crate::types::ComplianceItemEntry>>,
pub(crate) item_content_hash: ::std::option::Option<::std::string::String>,
pub(crate) upload_type: ::std::option::Option<crate::types::ComplianceUploadType>,
}
impl PutComplianceItemsInputBuilder {
/// <p>Specify an ID for this resource. For a managed node, this is the node ID.</p>
/// This field is required.
pub fn resource_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.resource_id = ::std::option::Option::Some(input.into());
self
}
/// <p>Specify an ID for this resource. For a managed node, this is the node ID.</p>
pub fn set_resource_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.resource_id = input;
self
}
/// <p>Specify an ID for this resource. For a managed node, this is the node ID.</p>
pub fn get_resource_id(&self) -> &::std::option::Option<::std::string::String> {
&self.resource_id
}
/// <p>Specify the type of resource. <code>ManagedInstance</code> is currently the only supported resource type.</p>
/// This field is required.
pub fn resource_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.resource_type = ::std::option::Option::Some(input.into());
self
}
/// <p>Specify the type of resource. <code>ManagedInstance</code> is currently the only supported resource type.</p>
pub fn set_resource_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.resource_type = input;
self
}
/// <p>Specify the type of resource. <code>ManagedInstance</code> is currently the only supported resource type.</p>
pub fn get_resource_type(&self) -> &::std::option::Option<::std::string::String> {
&self.resource_type
}
/// <p>Specify the compliance type. For example, specify Association (for a State Manager association), Patch, or Custom:<code>string</code>.</p>
/// This field is required.
pub fn compliance_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.compliance_type = ::std::option::Option::Some(input.into());
self
}
/// <p>Specify the compliance type. For example, specify Association (for a State Manager association), Patch, or Custom:<code>string</code>.</p>
pub fn set_compliance_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.compliance_type = input;
self
}
/// <p>Specify the compliance type. For example, specify Association (for a State Manager association), Patch, or Custom:<code>string</code>.</p>
pub fn get_compliance_type(&self) -> &::std::option::Option<::std::string::String> {
&self.compliance_type
}
/// <p>A summary of the call execution that includes an execution ID, the type of execution (for example, <code>Command</code>), and the date/time of the execution using a datetime object that is saved in the following format: <code>yyyy-MM-dd'T'HH:mm:ss'Z'</code></p>
/// This field is required.
pub fn execution_summary(mut self, input: crate::types::ComplianceExecutionSummary) -> Self {
self.execution_summary = ::std::option::Option::Some(input);
self
}
/// <p>A summary of the call execution that includes an execution ID, the type of execution (for example, <code>Command</code>), and the date/time of the execution using a datetime object that is saved in the following format: <code>yyyy-MM-dd'T'HH:mm:ss'Z'</code></p>
pub fn set_execution_summary(mut self, input: ::std::option::Option<crate::types::ComplianceExecutionSummary>) -> Self {
self.execution_summary = input;
self
}
/// <p>A summary of the call execution that includes an execution ID, the type of execution (for example, <code>Command</code>), and the date/time of the execution using a datetime object that is saved in the following format: <code>yyyy-MM-dd'T'HH:mm:ss'Z'</code></p>
pub fn get_execution_summary(&self) -> &::std::option::Option<crate::types::ComplianceExecutionSummary> {
&self.execution_summary
}
/// Appends an item to `items`.
///
/// To override the contents of this collection use [`set_items`](Self::set_items).
///
/// <p>Information about the compliance as defined by the resource type. For example, for a patch compliance type, <code>Items</code> includes information about the PatchSeverity, Classification, and so on.</p>
pub fn items(mut self, input: crate::types::ComplianceItemEntry) -> Self {
let mut v = self.items.unwrap_or_default();
v.push(input);
self.items = ::std::option::Option::Some(v);
self
}
/// <p>Information about the compliance as defined by the resource type. For example, for a patch compliance type, <code>Items</code> includes information about the PatchSeverity, Classification, and so on.</p>
pub fn set_items(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ComplianceItemEntry>>) -> Self {
self.items = input;
self
}
/// <p>Information about the compliance as defined by the resource type. For example, for a patch compliance type, <code>Items</code> includes information about the PatchSeverity, Classification, and so on.</p>
pub fn get_items(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ComplianceItemEntry>> {
&self.items
}
/// <p>MD5 or SHA-256 content hash. The content hash is used to determine if existing information should be overwritten or ignored. If the content hashes match, the request to put compliance information is ignored.</p>
pub fn item_content_hash(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.item_content_hash = ::std::option::Option::Some(input.into());
self
}
/// <p>MD5 or SHA-256 content hash. The content hash is used to determine if existing information should be overwritten or ignored. If the content hashes match, the request to put compliance information is ignored.</p>
pub fn set_item_content_hash(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.item_content_hash = input;
self
}
/// <p>MD5 or SHA-256 content hash. The content hash is used to determine if existing information should be overwritten or ignored. If the content hashes match, the request to put compliance information is ignored.</p>
pub fn get_item_content_hash(&self) -> &::std::option::Option<::std::string::String> {
&self.item_content_hash
}
/// <p>The mode for uploading compliance items. You can specify <code>COMPLETE</code> or <code>PARTIAL</code>. In <code>COMPLETE</code> mode, the system overwrites all existing compliance information for the resource. You must provide a full list of compliance items each time you send the request.</p>
/// <p>In <code>PARTIAL</code> mode, the system overwrites compliance information for a specific association. The association must be configured with <code>SyncCompliance</code> set to <code>MANUAL</code>. By default, all requests use <code>COMPLETE</code> mode.</p><note>
/// <p>This attribute is only valid for association compliance.</p>
/// </note>
pub fn upload_type(mut self, input: crate::types::ComplianceUploadType) -> Self {
self.upload_type = ::std::option::Option::Some(input);
self
}
/// <p>The mode for uploading compliance items. You can specify <code>COMPLETE</code> or <code>PARTIAL</code>. In <code>COMPLETE</code> mode, the system overwrites all existing compliance information for the resource. You must provide a full list of compliance items each time you send the request.</p>
/// <p>In <code>PARTIAL</code> mode, the system overwrites compliance information for a specific association. The association must be configured with <code>SyncCompliance</code> set to <code>MANUAL</code>. By default, all requests use <code>COMPLETE</code> mode.</p><note>
/// <p>This attribute is only valid for association compliance.</p>
/// </note>
pub fn set_upload_type(mut self, input: ::std::option::Option<crate::types::ComplianceUploadType>) -> Self {
self.upload_type = input;
self
}
/// <p>The mode for uploading compliance items. You can specify <code>COMPLETE</code> or <code>PARTIAL</code>. In <code>COMPLETE</code> mode, the system overwrites all existing compliance information for the resource. You must provide a full list of compliance items each time you send the request.</p>
/// <p>In <code>PARTIAL</code> mode, the system overwrites compliance information for a specific association. The association must be configured with <code>SyncCompliance</code> set to <code>MANUAL</code>. By default, all requests use <code>COMPLETE</code> mode.</p><note>
/// <p>This attribute is only valid for association compliance.</p>
/// </note>
pub fn get_upload_type(&self) -> &::std::option::Option<crate::types::ComplianceUploadType> {
&self.upload_type
}
/// Consumes the builder and constructs a [`PutComplianceItemsInput`](crate::operation::put_compliance_items::PutComplianceItemsInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::put_compliance_items::PutComplianceItemsInput, ::aws_smithy_types::error::operation::BuildError>
{
::std::result::Result::Ok(crate::operation::put_compliance_items::PutComplianceItemsInput {
resource_id: self.resource_id,
resource_type: self.resource_type,
compliance_type: self.compliance_type,
execution_summary: self.execution_summary,
items: self.items,
item_content_hash: self.item_content_hash,
upload_type: self.upload_type,
})
}
}