aws_sdk_apprunner/operation/delete_service/
_delete_service_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DeleteServiceOutput {
6 pub service: ::std::option::Option<crate::types::Service>,
8 pub operation_id: ::std::string::String,
10 _request_id: Option<String>,
11}
12impl DeleteServiceOutput {
13 pub fn service(&self) -> ::std::option::Option<&crate::types::Service> {
15 self.service.as_ref()
16 }
17 pub fn operation_id(&self) -> &str {
19 use std::ops::Deref;
20 self.operation_id.deref()
21 }
22}
23impl ::aws_types::request_id::RequestId for DeleteServiceOutput {
24 fn request_id(&self) -> Option<&str> {
25 self._request_id.as_deref()
26 }
27}
28impl DeleteServiceOutput {
29 pub fn builder() -> crate::operation::delete_service::builders::DeleteServiceOutputBuilder {
31 crate::operation::delete_service::builders::DeleteServiceOutputBuilder::default()
32 }
33}
34
35#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
37#[non_exhaustive]
38pub struct DeleteServiceOutputBuilder {
39 pub(crate) service: ::std::option::Option<crate::types::Service>,
40 pub(crate) operation_id: ::std::option::Option<::std::string::String>,
41 _request_id: Option<String>,
42}
43impl DeleteServiceOutputBuilder {
44 pub fn service(mut self, input: crate::types::Service) -> 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::Service>) -> Self {
52 self.service = input;
53 self
54 }
55 pub fn get_service(&self) -> &::std::option::Option<crate::types::Service> {
57 &self.service
58 }
59 pub fn operation_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
62 self.operation_id = ::std::option::Option::Some(input.into());
63 self
64 }
65 pub fn set_operation_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
67 self.operation_id = input;
68 self
69 }
70 pub fn get_operation_id(&self) -> &::std::option::Option<::std::string::String> {
72 &self.operation_id
73 }
74 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
75 self._request_id = Some(request_id.into());
76 self
77 }
78
79 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
80 self._request_id = request_id;
81 self
82 }
83 pub fn build(
87 self,
88 ) -> ::std::result::Result<crate::operation::delete_service::DeleteServiceOutput, ::aws_smithy_types::error::operation::BuildError> {
89 ::std::result::Result::Ok(crate::operation::delete_service::DeleteServiceOutput {
90 service: self.service,
91 operation_id: self.operation_id.ok_or_else(|| {
92 ::aws_smithy_types::error::operation::BuildError::missing_field(
93 "operation_id",
94 "operation_id was not specified but it is required when building DeleteServiceOutput",
95 )
96 })?,
97 _request_id: self._request_id,
98 })
99 }
100}