aws_sdk_machinelearning/operation/add_tags/
_add_tags_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Amazon ML returns the following elements.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct AddTagsOutput {
7    /// <p>The ID of the ML object that was tagged.</p>
8    pub resource_id: ::std::option::Option<::std::string::String>,
9    /// <p>The type of the ML object that was tagged.</p>
10    pub resource_type: ::std::option::Option<crate::types::TaggableResourceType>,
11    _request_id: Option<String>,
12}
13impl AddTagsOutput {
14    /// <p>The ID of the ML object that was tagged.</p>
15    pub fn resource_id(&self) -> ::std::option::Option<&str> {
16        self.resource_id.as_deref()
17    }
18    /// <p>The type of the ML object that was tagged.</p>
19    pub fn resource_type(&self) -> ::std::option::Option<&crate::types::TaggableResourceType> {
20        self.resource_type.as_ref()
21    }
22}
23impl ::aws_types::request_id::RequestId for AddTagsOutput {
24    fn request_id(&self) -> Option<&str> {
25        self._request_id.as_deref()
26    }
27}
28impl AddTagsOutput {
29    /// Creates a new builder-style object to manufacture [`AddTagsOutput`](crate::operation::add_tags::AddTagsOutput).
30    pub fn builder() -> crate::operation::add_tags::builders::AddTagsOutputBuilder {
31        crate::operation::add_tags::builders::AddTagsOutputBuilder::default()
32    }
33}
34
35/// A builder for [`AddTagsOutput`](crate::operation::add_tags::AddTagsOutput).
36#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
37#[non_exhaustive]
38pub struct AddTagsOutputBuilder {
39    pub(crate) resource_id: ::std::option::Option<::std::string::String>,
40    pub(crate) resource_type: ::std::option::Option<crate::types::TaggableResourceType>,
41    _request_id: Option<String>,
42}
43impl AddTagsOutputBuilder {
44    /// <p>The ID of the ML object that was tagged.</p>
45    pub fn resource_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
46        self.resource_id = ::std::option::Option::Some(input.into());
47        self
48    }
49    /// <p>The ID of the ML object that was tagged.</p>
50    pub fn set_resource_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
51        self.resource_id = input;
52        self
53    }
54    /// <p>The ID of the ML object that was tagged.</p>
55    pub fn get_resource_id(&self) -> &::std::option::Option<::std::string::String> {
56        &self.resource_id
57    }
58    /// <p>The type of the ML object that was tagged.</p>
59    pub fn resource_type(mut self, input: crate::types::TaggableResourceType) -> Self {
60        self.resource_type = ::std::option::Option::Some(input);
61        self
62    }
63    /// <p>The type of the ML object that was tagged.</p>
64    pub fn set_resource_type(mut self, input: ::std::option::Option<crate::types::TaggableResourceType>) -> Self {
65        self.resource_type = input;
66        self
67    }
68    /// <p>The type of the ML object that was tagged.</p>
69    pub fn get_resource_type(&self) -> &::std::option::Option<crate::types::TaggableResourceType> {
70        &self.resource_type
71    }
72    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
73        self._request_id = Some(request_id.into());
74        self
75    }
76
77    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
78        self._request_id = request_id;
79        self
80    }
81    /// Consumes the builder and constructs a [`AddTagsOutput`](crate::operation::add_tags::AddTagsOutput).
82    pub fn build(self) -> crate::operation::add_tags::AddTagsOutput {
83        crate::operation::add_tags::AddTagsOutput {
84            resource_id: self.resource_id,
85            resource_type: self.resource_type,
86            _request_id: self._request_id,
87        }
88    }
89}