aws_sdk_ecs/operation/describe_services/_describe_services_input.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DescribeServicesInput {
6 /// <p>The short name or full Amazon Resource Name (ARN)the cluster that hosts the service to describe. If you do not specify a cluster, the default cluster is assumed. This parameter is required if the service or services you are describing were launched in any cluster other than the default cluster.</p>
7 pub cluster: ::std::option::Option<::std::string::String>,
8 /// <p>A list of services to describe. You may specify up to 10 services to describe in a single operation.</p>
9 pub services: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
10 /// <p>Determines whether you want to see the resource tags for the service. If <code>TAGS</code> is specified, the tags are included in the response. If this field is omitted, tags aren't included in the response.</p>
11 pub include: ::std::option::Option<::std::vec::Vec<crate::types::ServiceField>>,
12}
13impl DescribeServicesInput {
14 /// <p>The short name or full Amazon Resource Name (ARN)the cluster that hosts the service to describe. If you do not specify a cluster, the default cluster is assumed. This parameter is required if the service or services you are describing were launched in any cluster other than the default cluster.</p>
15 pub fn cluster(&self) -> ::std::option::Option<&str> {
16 self.cluster.as_deref()
17 }
18 /// <p>A list of services to describe. You may specify up to 10 services to describe in a single operation.</p>
19 ///
20 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.services.is_none()`.
21 pub fn services(&self) -> &[::std::string::String] {
22 self.services.as_deref().unwrap_or_default()
23 }
24 /// <p>Determines whether you want to see the resource tags for the service. If <code>TAGS</code> is specified, the tags are included in the response. If this field is omitted, tags aren't included in the response.</p>
25 ///
26 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.include.is_none()`.
27 pub fn include(&self) -> &[crate::types::ServiceField] {
28 self.include.as_deref().unwrap_or_default()
29 }
30}
31impl DescribeServicesInput {
32 /// Creates a new builder-style object to manufacture [`DescribeServicesInput`](crate::operation::describe_services::DescribeServicesInput).
33 pub fn builder() -> crate::operation::describe_services::builders::DescribeServicesInputBuilder {
34 crate::operation::describe_services::builders::DescribeServicesInputBuilder::default()
35 }
36}
37
38/// A builder for [`DescribeServicesInput`](crate::operation::describe_services::DescribeServicesInput).
39#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
40#[non_exhaustive]
41pub struct DescribeServicesInputBuilder {
42 pub(crate) cluster: ::std::option::Option<::std::string::String>,
43 pub(crate) services: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
44 pub(crate) include: ::std::option::Option<::std::vec::Vec<crate::types::ServiceField>>,
45}
46impl DescribeServicesInputBuilder {
47 /// <p>The short name or full Amazon Resource Name (ARN)the cluster that hosts the service to describe. If you do not specify a cluster, the default cluster is assumed. This parameter is required if the service or services you are describing were launched in any cluster other than the default cluster.</p>
48 pub fn cluster(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
49 self.cluster = ::std::option::Option::Some(input.into());
50 self
51 }
52 /// <p>The short name or full Amazon Resource Name (ARN)the cluster that hosts the service to describe. If you do not specify a cluster, the default cluster is assumed. This parameter is required if the service or services you are describing were launched in any cluster other than the default cluster.</p>
53 pub fn set_cluster(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
54 self.cluster = input;
55 self
56 }
57 /// <p>The short name or full Amazon Resource Name (ARN)the cluster that hosts the service to describe. If you do not specify a cluster, the default cluster is assumed. This parameter is required if the service or services you are describing were launched in any cluster other than the default cluster.</p>
58 pub fn get_cluster(&self) -> &::std::option::Option<::std::string::String> {
59 &self.cluster
60 }
61 /// Appends an item to `services`.
62 ///
63 /// To override the contents of this collection use [`set_services`](Self::set_services).
64 ///
65 /// <p>A list of services to describe. You may specify up to 10 services to describe in a single operation.</p>
66 pub fn services(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
67 let mut v = self.services.unwrap_or_default();
68 v.push(input.into());
69 self.services = ::std::option::Option::Some(v);
70 self
71 }
72 /// <p>A list of services to describe. You may specify up to 10 services to describe in a single operation.</p>
73 pub fn set_services(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
74 self.services = input;
75 self
76 }
77 /// <p>A list of services to describe. You may specify up to 10 services to describe in a single operation.</p>
78 pub fn get_services(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
79 &self.services
80 }
81 /// Appends an item to `include`.
82 ///
83 /// To override the contents of this collection use [`set_include`](Self::set_include).
84 ///
85 /// <p>Determines whether you want to see the resource tags for the service. If <code>TAGS</code> is specified, the tags are included in the response. If this field is omitted, tags aren't included in the response.</p>
86 pub fn include(mut self, input: crate::types::ServiceField) -> Self {
87 let mut v = self.include.unwrap_or_default();
88 v.push(input);
89 self.include = ::std::option::Option::Some(v);
90 self
91 }
92 /// <p>Determines whether you want to see the resource tags for the service. If <code>TAGS</code> is specified, the tags are included in the response. If this field is omitted, tags aren't included in the response.</p>
93 pub fn set_include(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ServiceField>>) -> Self {
94 self.include = input;
95 self
96 }
97 /// <p>Determines whether you want to see the resource tags for the service. If <code>TAGS</code> is specified, the tags are included in the response. If this field is omitted, tags aren't included in the response.</p>
98 pub fn get_include(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ServiceField>> {
99 &self.include
100 }
101 /// Consumes the builder and constructs a [`DescribeServicesInput`](crate::operation::describe_services::DescribeServicesInput).
102 pub fn build(
103 self,
104 ) -> ::std::result::Result<crate::operation::describe_services::DescribeServicesInput, ::aws_smithy_types::error::operation::BuildError> {
105 ::std::result::Result::Ok(crate::operation::describe_services::DescribeServicesInput {
106 cluster: self.cluster,
107 services: self.services,
108 include: self.include,
109 })
110 }
111}