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
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Represents the output of a <code>BatchWrite</code> response operation.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct BatchWriteOperationResponse {
    /// <p>Creates an object in a <code>Directory</code>.</p>
    pub create_object: ::std::option::Option<crate::types::BatchCreateObjectResponse>,
    /// <p>Attaches an object to a <code>Directory</code>.</p>
    pub attach_object: ::std::option::Option<crate::types::BatchAttachObjectResponse>,
    /// <p>Detaches an object from a <code>Directory</code>.</p>
    pub detach_object: ::std::option::Option<crate::types::BatchDetachObjectResponse>,
    /// <p>Updates a given object’s attributes.</p>
    pub update_object_attributes: ::std::option::Option<crate::types::BatchUpdateObjectAttributesResponse>,
    /// <p>Deletes an object in a <code>Directory</code>.</p>
    pub delete_object: ::std::option::Option<crate::types::BatchDeleteObjectResponse>,
    /// <p>The result of an add facet to object batch operation.</p>
    pub add_facet_to_object: ::std::option::Option<crate::types::BatchAddFacetToObjectResponse>,
    /// <p>The result of a batch remove facet from object operation.</p>
    pub remove_facet_from_object: ::std::option::Option<crate::types::BatchRemoveFacetFromObjectResponse>,
    /// <p>Attaches a policy object to a regular object. An object can have a limited number of attached policies.</p>
    pub attach_policy: ::std::option::Option<crate::types::BatchAttachPolicyResponse>,
    /// <p>Detaches a policy from a <code>Directory</code>.</p>
    pub detach_policy: ::std::option::Option<crate::types::BatchDetachPolicyResponse>,
    /// <p>Creates an index object. See <a href="https://docs.aws.amazon.com/clouddirectory/latest/developerguide/indexing_search.htm">Indexing and search</a> for more information.</p>
    pub create_index: ::std::option::Option<crate::types::BatchCreateIndexResponse>,
    /// <p>Attaches the specified object to the specified index.</p>
    pub attach_to_index: ::std::option::Option<crate::types::BatchAttachToIndexResponse>,
    /// <p>Detaches the specified object from the specified index.</p>
    pub detach_from_index: ::std::option::Option<crate::types::BatchDetachFromIndexResponse>,
    /// <p>Attaches a typed link to a specified source and target object. For more information, see <a href="https://docs.aws.amazon.com/clouddirectory/latest/developerguide/directory_objects_links.html#directory_objects_links_typedlink">Typed Links</a>.</p>
    pub attach_typed_link: ::std::option::Option<crate::types::BatchAttachTypedLinkResponse>,
    /// <p>Detaches a typed link from a specified source and target object. For more information, see <a href="https://docs.aws.amazon.com/clouddirectory/latest/developerguide/directory_objects_links.html#directory_objects_links_typedlink">Typed Links</a>.</p>
    pub detach_typed_link: ::std::option::Option<crate::types::BatchDetachTypedLinkResponse>,
    /// <p>Represents the output of a <code>BatchWrite</code> response operation.</p>
    pub update_link_attributes: ::std::option::Option<crate::types::BatchUpdateLinkAttributesResponse>,
}
impl BatchWriteOperationResponse {
    /// <p>Creates an object in a <code>Directory</code>.</p>
    pub fn create_object(&self) -> ::std::option::Option<&crate::types::BatchCreateObjectResponse> {
        self.create_object.as_ref()
    }
    /// <p>Attaches an object to a <code>Directory</code>.</p>
    pub fn attach_object(&self) -> ::std::option::Option<&crate::types::BatchAttachObjectResponse> {
        self.attach_object.as_ref()
    }
    /// <p>Detaches an object from a <code>Directory</code>.</p>
    pub fn detach_object(&self) -> ::std::option::Option<&crate::types::BatchDetachObjectResponse> {
        self.detach_object.as_ref()
    }
    /// <p>Updates a given object’s attributes.</p>
    pub fn update_object_attributes(&self) -> ::std::option::Option<&crate::types::BatchUpdateObjectAttributesResponse> {
        self.update_object_attributes.as_ref()
    }
    /// <p>Deletes an object in a <code>Directory</code>.</p>
    pub fn delete_object(&self) -> ::std::option::Option<&crate::types::BatchDeleteObjectResponse> {
        self.delete_object.as_ref()
    }
    /// <p>The result of an add facet to object batch operation.</p>
    pub fn add_facet_to_object(&self) -> ::std::option::Option<&crate::types::BatchAddFacetToObjectResponse> {
        self.add_facet_to_object.as_ref()
    }
    /// <p>The result of a batch remove facet from object operation.</p>
    pub fn remove_facet_from_object(&self) -> ::std::option::Option<&crate::types::BatchRemoveFacetFromObjectResponse> {
        self.remove_facet_from_object.as_ref()
    }
    /// <p>Attaches a policy object to a regular object. An object can have a limited number of attached policies.</p>
    pub fn attach_policy(&self) -> ::std::option::Option<&crate::types::BatchAttachPolicyResponse> {
        self.attach_policy.as_ref()
    }
    /// <p>Detaches a policy from a <code>Directory</code>.</p>
    pub fn detach_policy(&self) -> ::std::option::Option<&crate::types::BatchDetachPolicyResponse> {
        self.detach_policy.as_ref()
    }
    /// <p>Creates an index object. See <a href="https://docs.aws.amazon.com/clouddirectory/latest/developerguide/indexing_search.htm">Indexing and search</a> for more information.</p>
    pub fn create_index(&self) -> ::std::option::Option<&crate::types::BatchCreateIndexResponse> {
        self.create_index.as_ref()
    }
    /// <p>Attaches the specified object to the specified index.</p>
    pub fn attach_to_index(&self) -> ::std::option::Option<&crate::types::BatchAttachToIndexResponse> {
        self.attach_to_index.as_ref()
    }
    /// <p>Detaches the specified object from the specified index.</p>
    pub fn detach_from_index(&self) -> ::std::option::Option<&crate::types::BatchDetachFromIndexResponse> {
        self.detach_from_index.as_ref()
    }
    /// <p>Attaches a typed link to a specified source and target object. For more information, see <a href="https://docs.aws.amazon.com/clouddirectory/latest/developerguide/directory_objects_links.html#directory_objects_links_typedlink">Typed Links</a>.</p>
    pub fn attach_typed_link(&self) -> ::std::option::Option<&crate::types::BatchAttachTypedLinkResponse> {
        self.attach_typed_link.as_ref()
    }
    /// <p>Detaches a typed link from a specified source and target object. For more information, see <a href="https://docs.aws.amazon.com/clouddirectory/latest/developerguide/directory_objects_links.html#directory_objects_links_typedlink">Typed Links</a>.</p>
    pub fn detach_typed_link(&self) -> ::std::option::Option<&crate::types::BatchDetachTypedLinkResponse> {
        self.detach_typed_link.as_ref()
    }
    /// <p>Represents the output of a <code>BatchWrite</code> response operation.</p>
    pub fn update_link_attributes(&self) -> ::std::option::Option<&crate::types::BatchUpdateLinkAttributesResponse> {
        self.update_link_attributes.as_ref()
    }
}
impl BatchWriteOperationResponse {
    /// Creates a new builder-style object to manufacture [`BatchWriteOperationResponse`](crate::types::BatchWriteOperationResponse).
    pub fn builder() -> crate::types::builders::BatchWriteOperationResponseBuilder {
        crate::types::builders::BatchWriteOperationResponseBuilder::default()
    }
}

/// A builder for [`BatchWriteOperationResponse`](crate::types::BatchWriteOperationResponse).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct BatchWriteOperationResponseBuilder {
    pub(crate) create_object: ::std::option::Option<crate::types::BatchCreateObjectResponse>,
    pub(crate) attach_object: ::std::option::Option<crate::types::BatchAttachObjectResponse>,
    pub(crate) detach_object: ::std::option::Option<crate::types::BatchDetachObjectResponse>,
    pub(crate) update_object_attributes: ::std::option::Option<crate::types::BatchUpdateObjectAttributesResponse>,
    pub(crate) delete_object: ::std::option::Option<crate::types::BatchDeleteObjectResponse>,
    pub(crate) add_facet_to_object: ::std::option::Option<crate::types::BatchAddFacetToObjectResponse>,
    pub(crate) remove_facet_from_object: ::std::option::Option<crate::types::BatchRemoveFacetFromObjectResponse>,
    pub(crate) attach_policy: ::std::option::Option<crate::types::BatchAttachPolicyResponse>,
    pub(crate) detach_policy: ::std::option::Option<crate::types::BatchDetachPolicyResponse>,
    pub(crate) create_index: ::std::option::Option<crate::types::BatchCreateIndexResponse>,
    pub(crate) attach_to_index: ::std::option::Option<crate::types::BatchAttachToIndexResponse>,
    pub(crate) detach_from_index: ::std::option::Option<crate::types::BatchDetachFromIndexResponse>,
    pub(crate) attach_typed_link: ::std::option::Option<crate::types::BatchAttachTypedLinkResponse>,
    pub(crate) detach_typed_link: ::std::option::Option<crate::types::BatchDetachTypedLinkResponse>,
    pub(crate) update_link_attributes: ::std::option::Option<crate::types::BatchUpdateLinkAttributesResponse>,
}
impl BatchWriteOperationResponseBuilder {
    /// <p>Creates an object in a <code>Directory</code>.</p>
    pub fn create_object(mut self, input: crate::types::BatchCreateObjectResponse) -> Self {
        self.create_object = ::std::option::Option::Some(input);
        self
    }
    /// <p>Creates an object in a <code>Directory</code>.</p>
    pub fn set_create_object(mut self, input: ::std::option::Option<crate::types::BatchCreateObjectResponse>) -> Self {
        self.create_object = input;
        self
    }
    /// <p>Creates an object in a <code>Directory</code>.</p>
    pub fn get_create_object(&self) -> &::std::option::Option<crate::types::BatchCreateObjectResponse> {
        &self.create_object
    }
    /// <p>Attaches an object to a <code>Directory</code>.</p>
    pub fn attach_object(mut self, input: crate::types::BatchAttachObjectResponse) -> Self {
        self.attach_object = ::std::option::Option::Some(input);
        self
    }
    /// <p>Attaches an object to a <code>Directory</code>.</p>
    pub fn set_attach_object(mut self, input: ::std::option::Option<crate::types::BatchAttachObjectResponse>) -> Self {
        self.attach_object = input;
        self
    }
    /// <p>Attaches an object to a <code>Directory</code>.</p>
    pub fn get_attach_object(&self) -> &::std::option::Option<crate::types::BatchAttachObjectResponse> {
        &self.attach_object
    }
    /// <p>Detaches an object from a <code>Directory</code>.</p>
    pub fn detach_object(mut self, input: crate::types::BatchDetachObjectResponse) -> Self {
        self.detach_object = ::std::option::Option::Some(input);
        self
    }
    /// <p>Detaches an object from a <code>Directory</code>.</p>
    pub fn set_detach_object(mut self, input: ::std::option::Option<crate::types::BatchDetachObjectResponse>) -> Self {
        self.detach_object = input;
        self
    }
    /// <p>Detaches an object from a <code>Directory</code>.</p>
    pub fn get_detach_object(&self) -> &::std::option::Option<crate::types::BatchDetachObjectResponse> {
        &self.detach_object
    }
    /// <p>Updates a given object’s attributes.</p>
    pub fn update_object_attributes(mut self, input: crate::types::BatchUpdateObjectAttributesResponse) -> Self {
        self.update_object_attributes = ::std::option::Option::Some(input);
        self
    }
    /// <p>Updates a given object’s attributes.</p>
    pub fn set_update_object_attributes(mut self, input: ::std::option::Option<crate::types::BatchUpdateObjectAttributesResponse>) -> Self {
        self.update_object_attributes = input;
        self
    }
    /// <p>Updates a given object’s attributes.</p>
    pub fn get_update_object_attributes(&self) -> &::std::option::Option<crate::types::BatchUpdateObjectAttributesResponse> {
        &self.update_object_attributes
    }
    /// <p>Deletes an object in a <code>Directory</code>.</p>
    pub fn delete_object(mut self, input: crate::types::BatchDeleteObjectResponse) -> Self {
        self.delete_object = ::std::option::Option::Some(input);
        self
    }
    /// <p>Deletes an object in a <code>Directory</code>.</p>
    pub fn set_delete_object(mut self, input: ::std::option::Option<crate::types::BatchDeleteObjectResponse>) -> Self {
        self.delete_object = input;
        self
    }
    /// <p>Deletes an object in a <code>Directory</code>.</p>
    pub fn get_delete_object(&self) -> &::std::option::Option<crate::types::BatchDeleteObjectResponse> {
        &self.delete_object
    }
    /// <p>The result of an add facet to object batch operation.</p>
    pub fn add_facet_to_object(mut self, input: crate::types::BatchAddFacetToObjectResponse) -> Self {
        self.add_facet_to_object = ::std::option::Option::Some(input);
        self
    }
    /// <p>The result of an add facet to object batch operation.</p>
    pub fn set_add_facet_to_object(mut self, input: ::std::option::Option<crate::types::BatchAddFacetToObjectResponse>) -> Self {
        self.add_facet_to_object = input;
        self
    }
    /// <p>The result of an add facet to object batch operation.</p>
    pub fn get_add_facet_to_object(&self) -> &::std::option::Option<crate::types::BatchAddFacetToObjectResponse> {
        &self.add_facet_to_object
    }
    /// <p>The result of a batch remove facet from object operation.</p>
    pub fn remove_facet_from_object(mut self, input: crate::types::BatchRemoveFacetFromObjectResponse) -> Self {
        self.remove_facet_from_object = ::std::option::Option::Some(input);
        self
    }
    /// <p>The result of a batch remove facet from object operation.</p>
    pub fn set_remove_facet_from_object(mut self, input: ::std::option::Option<crate::types::BatchRemoveFacetFromObjectResponse>) -> Self {
        self.remove_facet_from_object = input;
        self
    }
    /// <p>The result of a batch remove facet from object operation.</p>
    pub fn get_remove_facet_from_object(&self) -> &::std::option::Option<crate::types::BatchRemoveFacetFromObjectResponse> {
        &self.remove_facet_from_object
    }
    /// <p>Attaches a policy object to a regular object. An object can have a limited number of attached policies.</p>
    pub fn attach_policy(mut self, input: crate::types::BatchAttachPolicyResponse) -> Self {
        self.attach_policy = ::std::option::Option::Some(input);
        self
    }
    /// <p>Attaches a policy object to a regular object. An object can have a limited number of attached policies.</p>
    pub fn set_attach_policy(mut self, input: ::std::option::Option<crate::types::BatchAttachPolicyResponse>) -> Self {
        self.attach_policy = input;
        self
    }
    /// <p>Attaches a policy object to a regular object. An object can have a limited number of attached policies.</p>
    pub fn get_attach_policy(&self) -> &::std::option::Option<crate::types::BatchAttachPolicyResponse> {
        &self.attach_policy
    }
    /// <p>Detaches a policy from a <code>Directory</code>.</p>
    pub fn detach_policy(mut self, input: crate::types::BatchDetachPolicyResponse) -> Self {
        self.detach_policy = ::std::option::Option::Some(input);
        self
    }
    /// <p>Detaches a policy from a <code>Directory</code>.</p>
    pub fn set_detach_policy(mut self, input: ::std::option::Option<crate::types::BatchDetachPolicyResponse>) -> Self {
        self.detach_policy = input;
        self
    }
    /// <p>Detaches a policy from a <code>Directory</code>.</p>
    pub fn get_detach_policy(&self) -> &::std::option::Option<crate::types::BatchDetachPolicyResponse> {
        &self.detach_policy
    }
    /// <p>Creates an index object. See <a href="https://docs.aws.amazon.com/clouddirectory/latest/developerguide/indexing_search.htm">Indexing and search</a> for more information.</p>
    pub fn create_index(mut self, input: crate::types::BatchCreateIndexResponse) -> Self {
        self.create_index = ::std::option::Option::Some(input);
        self
    }
    /// <p>Creates an index object. See <a href="https://docs.aws.amazon.com/clouddirectory/latest/developerguide/indexing_search.htm">Indexing and search</a> for more information.</p>
    pub fn set_create_index(mut self, input: ::std::option::Option<crate::types::BatchCreateIndexResponse>) -> Self {
        self.create_index = input;
        self
    }
    /// <p>Creates an index object. See <a href="https://docs.aws.amazon.com/clouddirectory/latest/developerguide/indexing_search.htm">Indexing and search</a> for more information.</p>
    pub fn get_create_index(&self) -> &::std::option::Option<crate::types::BatchCreateIndexResponse> {
        &self.create_index
    }
    /// <p>Attaches the specified object to the specified index.</p>
    pub fn attach_to_index(mut self, input: crate::types::BatchAttachToIndexResponse) -> Self {
        self.attach_to_index = ::std::option::Option::Some(input);
        self
    }
    /// <p>Attaches the specified object to the specified index.</p>
    pub fn set_attach_to_index(mut self, input: ::std::option::Option<crate::types::BatchAttachToIndexResponse>) -> Self {
        self.attach_to_index = input;
        self
    }
    /// <p>Attaches the specified object to the specified index.</p>
    pub fn get_attach_to_index(&self) -> &::std::option::Option<crate::types::BatchAttachToIndexResponse> {
        &self.attach_to_index
    }
    /// <p>Detaches the specified object from the specified index.</p>
    pub fn detach_from_index(mut self, input: crate::types::BatchDetachFromIndexResponse) -> Self {
        self.detach_from_index = ::std::option::Option::Some(input);
        self
    }
    /// <p>Detaches the specified object from the specified index.</p>
    pub fn set_detach_from_index(mut self, input: ::std::option::Option<crate::types::BatchDetachFromIndexResponse>) -> Self {
        self.detach_from_index = input;
        self
    }
    /// <p>Detaches the specified object from the specified index.</p>
    pub fn get_detach_from_index(&self) -> &::std::option::Option<crate::types::BatchDetachFromIndexResponse> {
        &self.detach_from_index
    }
    /// <p>Attaches a typed link to a specified source and target object. For more information, see <a href="https://docs.aws.amazon.com/clouddirectory/latest/developerguide/directory_objects_links.html#directory_objects_links_typedlink">Typed Links</a>.</p>
    pub fn attach_typed_link(mut self, input: crate::types::BatchAttachTypedLinkResponse) -> Self {
        self.attach_typed_link = ::std::option::Option::Some(input);
        self
    }
    /// <p>Attaches a typed link to a specified source and target object. For more information, see <a href="https://docs.aws.amazon.com/clouddirectory/latest/developerguide/directory_objects_links.html#directory_objects_links_typedlink">Typed Links</a>.</p>
    pub fn set_attach_typed_link(mut self, input: ::std::option::Option<crate::types::BatchAttachTypedLinkResponse>) -> Self {
        self.attach_typed_link = input;
        self
    }
    /// <p>Attaches a typed link to a specified source and target object. For more information, see <a href="https://docs.aws.amazon.com/clouddirectory/latest/developerguide/directory_objects_links.html#directory_objects_links_typedlink">Typed Links</a>.</p>
    pub fn get_attach_typed_link(&self) -> &::std::option::Option<crate::types::BatchAttachTypedLinkResponse> {
        &self.attach_typed_link
    }
    /// <p>Detaches a typed link from a specified source and target object. For more information, see <a href="https://docs.aws.amazon.com/clouddirectory/latest/developerguide/directory_objects_links.html#directory_objects_links_typedlink">Typed Links</a>.</p>
    pub fn detach_typed_link(mut self, input: crate::types::BatchDetachTypedLinkResponse) -> Self {
        self.detach_typed_link = ::std::option::Option::Some(input);
        self
    }
    /// <p>Detaches a typed link from a specified source and target object. For more information, see <a href="https://docs.aws.amazon.com/clouddirectory/latest/developerguide/directory_objects_links.html#directory_objects_links_typedlink">Typed Links</a>.</p>
    pub fn set_detach_typed_link(mut self, input: ::std::option::Option<crate::types::BatchDetachTypedLinkResponse>) -> Self {
        self.detach_typed_link = input;
        self
    }
    /// <p>Detaches a typed link from a specified source and target object. For more information, see <a href="https://docs.aws.amazon.com/clouddirectory/latest/developerguide/directory_objects_links.html#directory_objects_links_typedlink">Typed Links</a>.</p>
    pub fn get_detach_typed_link(&self) -> &::std::option::Option<crate::types::BatchDetachTypedLinkResponse> {
        &self.detach_typed_link
    }
    /// <p>Represents the output of a <code>BatchWrite</code> response operation.</p>
    pub fn update_link_attributes(mut self, input: crate::types::BatchUpdateLinkAttributesResponse) -> Self {
        self.update_link_attributes = ::std::option::Option::Some(input);
        self
    }
    /// <p>Represents the output of a <code>BatchWrite</code> response operation.</p>
    pub fn set_update_link_attributes(mut self, input: ::std::option::Option<crate::types::BatchUpdateLinkAttributesResponse>) -> Self {
        self.update_link_attributes = input;
        self
    }
    /// <p>Represents the output of a <code>BatchWrite</code> response operation.</p>
    pub fn get_update_link_attributes(&self) -> &::std::option::Option<crate::types::BatchUpdateLinkAttributesResponse> {
        &self.update_link_attributes
    }
    /// Consumes the builder and constructs a [`BatchWriteOperationResponse`](crate::types::BatchWriteOperationResponse).
    pub fn build(self) -> crate::types::BatchWriteOperationResponse {
        crate::types::BatchWriteOperationResponse {
            create_object: self.create_object,
            attach_object: self.attach_object,
            detach_object: self.detach_object,
            update_object_attributes: self.update_object_attributes,
            delete_object: self.delete_object,
            add_facet_to_object: self.add_facet_to_object,
            remove_facet_from_object: self.remove_facet_from_object,
            attach_policy: self.attach_policy,
            detach_policy: self.detach_policy,
            create_index: self.create_index,
            attach_to_index: self.attach_to_index,
            detach_from_index: self.detach_from_index,
            attach_typed_link: self.attach_typed_link,
            detach_typed_link: self.detach_typed_link,
            update_link_attributes: self.update_link_attributes,
        }
    }
}