aws_sdk_devopsagent/operation/get_service/
_get_service_output.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct GetServiceOutput {
7 pub service: ::std::option::Option<crate::types::RegisteredService>,
9 pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
11 _request_id: Option<String>,
12}
13impl GetServiceOutput {
14 pub fn service(&self) -> ::std::option::Option<&crate::types::RegisteredService> {
16 self.service.as_ref()
17 }
18 pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
20 self.tags.as_ref()
21 }
22}
23impl ::aws_types::request_id::RequestId for GetServiceOutput {
24 fn request_id(&self) -> Option<&str> {
25 self._request_id.as_deref()
26 }
27}
28impl GetServiceOutput {
29 pub fn builder() -> crate::operation::get_service::builders::GetServiceOutputBuilder {
31 crate::operation::get_service::builders::GetServiceOutputBuilder::default()
32 }
33}
34
35#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
37#[non_exhaustive]
38pub struct GetServiceOutputBuilder {
39 pub(crate) service: ::std::option::Option<crate::types::RegisteredService>,
40 pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
41 _request_id: Option<String>,
42}
43impl GetServiceOutputBuilder {
44 pub fn service(mut self, input: crate::types::RegisteredService) -> Self {
47 self.service = ::std::option::Option::Some(input);
48 self
49 }
50 pub fn set_service(mut self, input: ::std::option::Option<crate::types::RegisteredService>) -> Self {
52 self.service = input;
53 self
54 }
55 pub fn get_service(&self) -> &::std::option::Option<crate::types::RegisteredService> {
57 &self.service
58 }
59 pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
65 let mut hash_map = self.tags.unwrap_or_default();
66 hash_map.insert(k.into(), v.into());
67 self.tags = ::std::option::Option::Some(hash_map);
68 self
69 }
70 pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
72 self.tags = input;
73 self
74 }
75 pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
77 &self.tags
78 }
79 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
80 self._request_id = Some(request_id.into());
81 self
82 }
83
84 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
85 self._request_id = request_id;
86 self
87 }
88 pub fn build(self) -> crate::operation::get_service::GetServiceOutput {
90 crate::operation::get_service::GetServiceOutput {
91 service: self.service,
92 tags: self.tags,
93 _request_id: self._request_id,
94 }
95 }
96}