aws_sdk_apprunner/operation/pause_service/
_pause_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 PauseServiceOutput {
6    /// <p>A description of the App Runner service that this request just paused.</p>
7    pub service: ::std::option::Option<crate::types::Service>,
8    /// <p>The unique ID of the asynchronous operation that this request started. You can use it combined with the <code>ListOperations</code> call to track the operation's progress.</p>
9    pub operation_id: ::std::option::Option<::std::string::String>,
10    _request_id: Option<String>,
11}
12impl PauseServiceOutput {
13    /// <p>A description of the App Runner service that this request just paused.</p>
14    pub fn service(&self) -> ::std::option::Option<&crate::types::Service> {
15        self.service.as_ref()
16    }
17    /// <p>The unique ID of the asynchronous operation that this request started. You can use it combined with the <code>ListOperations</code> call to track the operation's progress.</p>
18    pub fn operation_id(&self) -> ::std::option::Option<&str> {
19        self.operation_id.as_deref()
20    }
21}
22impl ::aws_types::request_id::RequestId for PauseServiceOutput {
23    fn request_id(&self) -> Option<&str> {
24        self._request_id.as_deref()
25    }
26}
27impl PauseServiceOutput {
28    /// Creates a new builder-style object to manufacture [`PauseServiceOutput`](crate::operation::pause_service::PauseServiceOutput).
29    pub fn builder() -> crate::operation::pause_service::builders::PauseServiceOutputBuilder {
30        crate::operation::pause_service::builders::PauseServiceOutputBuilder::default()
31    }
32}
33
34/// A builder for [`PauseServiceOutput`](crate::operation::pause_service::PauseServiceOutput).
35#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
36#[non_exhaustive]
37pub struct PauseServiceOutputBuilder {
38    pub(crate) service: ::std::option::Option<crate::types::Service>,
39    pub(crate) operation_id: ::std::option::Option<::std::string::String>,
40    _request_id: Option<String>,
41}
42impl PauseServiceOutputBuilder {
43    /// <p>A description of the App Runner service that this request just paused.</p>
44    /// This field is required.
45    pub fn service(mut self, input: crate::types::Service) -> Self {
46        self.service = ::std::option::Option::Some(input);
47        self
48    }
49    /// <p>A description of the App Runner service that this request just paused.</p>
50    pub fn set_service(mut self, input: ::std::option::Option<crate::types::Service>) -> Self {
51        self.service = input;
52        self
53    }
54    /// <p>A description of the App Runner service that this request just paused.</p>
55    pub fn get_service(&self) -> &::std::option::Option<crate::types::Service> {
56        &self.service
57    }
58    /// <p>The unique ID of the asynchronous operation that this request started. You can use it combined with the <code>ListOperations</code> call to track the operation's progress.</p>
59    pub fn operation_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
60        self.operation_id = ::std::option::Option::Some(input.into());
61        self
62    }
63    /// <p>The unique ID of the asynchronous operation that this request started. You can use it combined with the <code>ListOperations</code> call to track the operation's progress.</p>
64    pub fn set_operation_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
65        self.operation_id = input;
66        self
67    }
68    /// <p>The unique ID of the asynchronous operation that this request started. You can use it combined with the <code>ListOperations</code> call to track the operation's progress.</p>
69    pub fn get_operation_id(&self) -> &::std::option::Option<::std::string::String> {
70        &self.operation_id
71    }
72    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
73        self._request_id = Some(request_id.into());
74        self
75    }
76
77    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
78        self._request_id = request_id;
79        self
80    }
81    /// Consumes the builder and constructs a [`PauseServiceOutput`](crate::operation::pause_service::PauseServiceOutput).
82    pub fn build(self) -> crate::operation::pause_service::PauseServiceOutput {
83        crate::operation::pause_service::PauseServiceOutput {
84            service: self.service,
85            operation_id: self.operation_id,
86            _request_id: self._request_id,
87        }
88    }
89}