Skip to main content

aws_sdk_devopsagent/operation/register_service/
_register_service_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// Output containing the service ID and any additional steps required for registration.
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct RegisterServiceOutput {
7    /// Service ID - present when registration is complete, absent when additional steps are required
8    pub service_id: ::std::option::Option<::std::string::String>,
9    /// Indicates if additional steps are required to complete service registration (e.g., 3-legged OAuth)
10    pub additional_step: ::std::option::Option<crate::types::AdditionalServiceRegistrationStep>,
11    /// The ARN of the AWS Key Management Service (AWS KMS) customer managed key that's used to encrypt resources.
12    pub kms_key_arn: ::std::option::Option<::std::string::String>,
13    /// Tags associated with the registered Service.
14    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
15    _request_id: Option<String>,
16}
17impl RegisterServiceOutput {
18    /// Service ID - present when registration is complete, absent when additional steps are required
19    pub fn service_id(&self) -> ::std::option::Option<&str> {
20        self.service_id.as_deref()
21    }
22    /// Indicates if additional steps are required to complete service registration (e.g., 3-legged OAuth)
23    pub fn additional_step(&self) -> ::std::option::Option<&crate::types::AdditionalServiceRegistrationStep> {
24        self.additional_step.as_ref()
25    }
26    /// The ARN of the AWS Key Management Service (AWS KMS) customer managed key that's used to encrypt resources.
27    pub fn kms_key_arn(&self) -> ::std::option::Option<&str> {
28        self.kms_key_arn.as_deref()
29    }
30    /// Tags associated with the registered Service.
31    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
32        self.tags.as_ref()
33    }
34}
35impl ::aws_types::request_id::RequestId for RegisterServiceOutput {
36    fn request_id(&self) -> Option<&str> {
37        self._request_id.as_deref()
38    }
39}
40impl RegisterServiceOutput {
41    /// Creates a new builder-style object to manufacture [`RegisterServiceOutput`](crate::operation::register_service::RegisterServiceOutput).
42    pub fn builder() -> crate::operation::register_service::builders::RegisterServiceOutputBuilder {
43        crate::operation::register_service::builders::RegisterServiceOutputBuilder::default()
44    }
45}
46
47/// A builder for [`RegisterServiceOutput`](crate::operation::register_service::RegisterServiceOutput).
48#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
49#[non_exhaustive]
50pub struct RegisterServiceOutputBuilder {
51    pub(crate) service_id: ::std::option::Option<::std::string::String>,
52    pub(crate) additional_step: ::std::option::Option<crate::types::AdditionalServiceRegistrationStep>,
53    pub(crate) kms_key_arn: ::std::option::Option<::std::string::String>,
54    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
55    _request_id: Option<String>,
56}
57impl RegisterServiceOutputBuilder {
58    /// Service ID - present when registration is complete, absent when additional steps are required
59    pub fn service_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
60        self.service_id = ::std::option::Option::Some(input.into());
61        self
62    }
63    /// Service ID - present when registration is complete, absent when additional steps are required
64    pub fn set_service_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
65        self.service_id = input;
66        self
67    }
68    /// Service ID - present when registration is complete, absent when additional steps are required
69    pub fn get_service_id(&self) -> &::std::option::Option<::std::string::String> {
70        &self.service_id
71    }
72    /// Indicates if additional steps are required to complete service registration (e.g., 3-legged OAuth)
73    pub fn additional_step(mut self, input: crate::types::AdditionalServiceRegistrationStep) -> Self {
74        self.additional_step = ::std::option::Option::Some(input);
75        self
76    }
77    /// Indicates if additional steps are required to complete service registration (e.g., 3-legged OAuth)
78    pub fn set_additional_step(mut self, input: ::std::option::Option<crate::types::AdditionalServiceRegistrationStep>) -> Self {
79        self.additional_step = input;
80        self
81    }
82    /// Indicates if additional steps are required to complete service registration (e.g., 3-legged OAuth)
83    pub fn get_additional_step(&self) -> &::std::option::Option<crate::types::AdditionalServiceRegistrationStep> {
84        &self.additional_step
85    }
86    /// The ARN of the AWS Key Management Service (AWS KMS) customer managed key that's used to encrypt resources.
87    pub fn kms_key_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
88        self.kms_key_arn = ::std::option::Option::Some(input.into());
89        self
90    }
91    /// The ARN of the AWS Key Management Service (AWS KMS) customer managed key that's used to encrypt resources.
92    pub fn set_kms_key_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
93        self.kms_key_arn = input;
94        self
95    }
96    /// The ARN of the AWS Key Management Service (AWS KMS) customer managed key that's used to encrypt resources.
97    pub fn get_kms_key_arn(&self) -> &::std::option::Option<::std::string::String> {
98        &self.kms_key_arn
99    }
100    /// Adds a key-value pair to `tags`.
101    ///
102    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
103    ///
104    /// Tags associated with the registered Service.
105    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
106        let mut hash_map = self.tags.unwrap_or_default();
107        hash_map.insert(k.into(), v.into());
108        self.tags = ::std::option::Option::Some(hash_map);
109        self
110    }
111    /// Tags associated with the registered Service.
112    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
113        self.tags = input;
114        self
115    }
116    /// Tags associated with the registered Service.
117    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
118        &self.tags
119    }
120    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
121        self._request_id = Some(request_id.into());
122        self
123    }
124
125    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
126        self._request_id = request_id;
127        self
128    }
129    /// Consumes the builder and constructs a [`RegisterServiceOutput`](crate::operation::register_service::RegisterServiceOutput).
130    pub fn build(self) -> crate::operation::register_service::RegisterServiceOutput {
131        crate::operation::register_service::RegisterServiceOutput {
132            service_id: self.service_id,
133            additional_step: self.additional_step,
134            kms_key_arn: self.kms_key_arn,
135            tags: self.tags,
136            _request_id: self._request_id,
137        }
138    }
139}