aws_sdk_pricing/operation/describe_services/
_describe_services_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DescribeServicesOutput {
6 pub services: ::std::option::Option<::std::vec::Vec<crate::types::Service>>,
8 pub format_version: ::std::option::Option<::std::string::String>,
10 pub next_token: ::std::option::Option<::std::string::String>,
12 _request_id: Option<String>,
13}
14impl DescribeServicesOutput {
15 pub fn services(&self) -> &[crate::types::Service] {
19 self.services.as_deref().unwrap_or_default()
20 }
21 pub fn format_version(&self) -> ::std::option::Option<&str> {
23 self.format_version.as_deref()
24 }
25 pub fn next_token(&self) -> ::std::option::Option<&str> {
27 self.next_token.as_deref()
28 }
29}
30impl ::aws_types::request_id::RequestId for DescribeServicesOutput {
31 fn request_id(&self) -> Option<&str> {
32 self._request_id.as_deref()
33 }
34}
35impl DescribeServicesOutput {
36 pub fn builder() -> crate::operation::describe_services::builders::DescribeServicesOutputBuilder {
38 crate::operation::describe_services::builders::DescribeServicesOutputBuilder::default()
39 }
40}
41
42#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
44#[non_exhaustive]
45pub struct DescribeServicesOutputBuilder {
46 pub(crate) services: ::std::option::Option<::std::vec::Vec<crate::types::Service>>,
47 pub(crate) format_version: ::std::option::Option<::std::string::String>,
48 pub(crate) next_token: ::std::option::Option<::std::string::String>,
49 _request_id: Option<String>,
50}
51impl DescribeServicesOutputBuilder {
52 pub fn services(mut self, input: crate::types::Service) -> Self {
58 let mut v = self.services.unwrap_or_default();
59 v.push(input);
60 self.services = ::std::option::Option::Some(v);
61 self
62 }
63 pub fn set_services(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Service>>) -> Self {
65 self.services = input;
66 self
67 }
68 pub fn get_services(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Service>> {
70 &self.services
71 }
72 pub fn format_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
74 self.format_version = ::std::option::Option::Some(input.into());
75 self
76 }
77 pub fn set_format_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
79 self.format_version = input;
80 self
81 }
82 pub fn get_format_version(&self) -> &::std::option::Option<::std::string::String> {
84 &self.format_version
85 }
86 pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
88 self.next_token = ::std::option::Option::Some(input.into());
89 self
90 }
91 pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
93 self.next_token = input;
94 self
95 }
96 pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
98 &self.next_token
99 }
100 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
101 self._request_id = Some(request_id.into());
102 self
103 }
104
105 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
106 self._request_id = request_id;
107 self
108 }
109 pub fn build(self) -> crate::operation::describe_services::DescribeServicesOutput {
111 crate::operation::describe_services::DescribeServicesOutput {
112 services: self.services,
113 format_version: self.format_version,
114 next_token: self.next_token,
115 _request_id: self._request_id,
116 }
117 }
118}