aws_sdk_ecs/operation/create_service/
_create_service_output.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 CreateServiceOutput {
6    /// <p>The full description of your service following the create call.</p>
7    /// <p>A service will return either a <code>capacityProviderStrategy</code> or <code>launchType</code> parameter, but not both, depending where one was specified when it was created.</p>
8    /// <p>If a service is using the <code>ECS</code> deployment controller, the <code>deploymentController</code> and <code>taskSets</code> parameters will not be returned.</p>
9    /// <p>if the service uses the <code>CODE_DEPLOY</code> deployment controller, the <code>deploymentController</code>, <code>taskSets</code> and <code>deployments</code> parameters will be returned, however the <code>deployments</code> parameter will be an empty list.</p>
10    pub service: ::std::option::Option<crate::types::Service>,
11    _request_id: Option<String>,
12}
13impl CreateServiceOutput {
14    /// <p>The full description of your service following the create call.</p>
15    /// <p>A service will return either a <code>capacityProviderStrategy</code> or <code>launchType</code> parameter, but not both, depending where one was specified when it was created.</p>
16    /// <p>If a service is using the <code>ECS</code> deployment controller, the <code>deploymentController</code> and <code>taskSets</code> parameters will not be returned.</p>
17    /// <p>if the service uses the <code>CODE_DEPLOY</code> deployment controller, the <code>deploymentController</code>, <code>taskSets</code> and <code>deployments</code> parameters will be returned, however the <code>deployments</code> parameter will be an empty list.</p>
18    pub fn service(&self) -> ::std::option::Option<&crate::types::Service> {
19        self.service.as_ref()
20    }
21}
22impl ::aws_types::request_id::RequestId for CreateServiceOutput {
23    fn request_id(&self) -> Option<&str> {
24        self._request_id.as_deref()
25    }
26}
27impl CreateServiceOutput {
28    /// Creates a new builder-style object to manufacture [`CreateServiceOutput`](crate::operation::create_service::CreateServiceOutput).
29    pub fn builder() -> crate::operation::create_service::builders::CreateServiceOutputBuilder {
30        crate::operation::create_service::builders::CreateServiceOutputBuilder::default()
31    }
32}
33
34/// A builder for [`CreateServiceOutput`](crate::operation::create_service::CreateServiceOutput).
35#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
36#[non_exhaustive]
37pub struct CreateServiceOutputBuilder {
38    pub(crate) service: ::std::option::Option<crate::types::Service>,
39    _request_id: Option<String>,
40}
41impl CreateServiceOutputBuilder {
42    /// <p>The full description of your service following the create call.</p>
43    /// <p>A service will return either a <code>capacityProviderStrategy</code> or <code>launchType</code> parameter, but not both, depending where one was specified when it was created.</p>
44    /// <p>If a service is using the <code>ECS</code> deployment controller, the <code>deploymentController</code> and <code>taskSets</code> parameters will not be returned.</p>
45    /// <p>if the service uses the <code>CODE_DEPLOY</code> deployment controller, the <code>deploymentController</code>, <code>taskSets</code> and <code>deployments</code> parameters will be returned, however the <code>deployments</code> parameter will be an empty list.</p>
46    pub fn service(mut self, input: crate::types::Service) -> Self {
47        self.service = ::std::option::Option::Some(input);
48        self
49    }
50    /// <p>The full description of your service following the create call.</p>
51    /// <p>A service will return either a <code>capacityProviderStrategy</code> or <code>launchType</code> parameter, but not both, depending where one was specified when it was created.</p>
52    /// <p>If a service is using the <code>ECS</code> deployment controller, the <code>deploymentController</code> and <code>taskSets</code> parameters will not be returned.</p>
53    /// <p>if the service uses the <code>CODE_DEPLOY</code> deployment controller, the <code>deploymentController</code>, <code>taskSets</code> and <code>deployments</code> parameters will be returned, however the <code>deployments</code> parameter will be an empty list.</p>
54    pub fn set_service(mut self, input: ::std::option::Option<crate::types::Service>) -> Self {
55        self.service = input;
56        self
57    }
58    /// <p>The full description of your service following the create call.</p>
59    /// <p>A service will return either a <code>capacityProviderStrategy</code> or <code>launchType</code> parameter, but not both, depending where one was specified when it was created.</p>
60    /// <p>If a service is using the <code>ECS</code> deployment controller, the <code>deploymentController</code> and <code>taskSets</code> parameters will not be returned.</p>
61    /// <p>if the service uses the <code>CODE_DEPLOY</code> deployment controller, the <code>deploymentController</code>, <code>taskSets</code> and <code>deployments</code> parameters will be returned, however the <code>deployments</code> parameter will be an empty list.</p>
62    pub fn get_service(&self) -> &::std::option::Option<crate::types::Service> {
63        &self.service
64    }
65    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
66        self._request_id = Some(request_id.into());
67        self
68    }
69
70    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
71        self._request_id = request_id;
72        self
73    }
74    /// Consumes the builder and constructs a [`CreateServiceOutput`](crate::operation::create_service::CreateServiceOutput).
75    pub fn build(self) -> crate::operation::create_service::CreateServiceOutput {
76        crate::operation::create_service::CreateServiceOutput {
77            service: self.service,
78            _request_id: self._request_id,
79        }
80    }
81}