aws_sdk_apigateway/operation/get_deployment/_get_deployment_input.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Requests API Gateway to get information about a Deployment resource.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct GetDeploymentInput {
7 /// <p>The string identifier of the associated RestApi.</p>
8 pub rest_api_id: ::std::option::Option<::std::string::String>,
9 /// <p>The identifier of the Deployment resource to get information about.</p>
10 pub deployment_id: ::std::option::Option<::std::string::String>,
11 /// <p>A query parameter to retrieve the specified embedded resources of the returned Deployment resource in the response. In a REST API call, this <code>embed</code> parameter value is a list of comma-separated strings, as in <code>GET /restapis/{restapi_id}/deployments/{deployment_id}?embed=var1,var2</code>. The SDK and other platform-dependent libraries might use a different format for the list. Currently, this request supports only retrieval of the embedded API summary this way. Hence, the parameter value must be a single-valued list containing only the <code>"apisummary"</code> string. For example, <code>GET /restapis/{restapi_id}/deployments/{deployment_id}?embed=apisummary</code>.</p>
12 pub embed: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
13}
14impl GetDeploymentInput {
15 /// <p>The string identifier of the associated RestApi.</p>
16 pub fn rest_api_id(&self) -> ::std::option::Option<&str> {
17 self.rest_api_id.as_deref()
18 }
19 /// <p>The identifier of the Deployment resource to get information about.</p>
20 pub fn deployment_id(&self) -> ::std::option::Option<&str> {
21 self.deployment_id.as_deref()
22 }
23 /// <p>A query parameter to retrieve the specified embedded resources of the returned Deployment resource in the response. In a REST API call, this <code>embed</code> parameter value is a list of comma-separated strings, as in <code>GET /restapis/{restapi_id}/deployments/{deployment_id}?embed=var1,var2</code>. The SDK and other platform-dependent libraries might use a different format for the list. Currently, this request supports only retrieval of the embedded API summary this way. Hence, the parameter value must be a single-valued list containing only the <code>"apisummary"</code> string. For example, <code>GET /restapis/{restapi_id}/deployments/{deployment_id}?embed=apisummary</code>.</p>
24 ///
25 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.embed.is_none()`.
26 pub fn embed(&self) -> &[::std::string::String] {
27 self.embed.as_deref().unwrap_or_default()
28 }
29}
30impl GetDeploymentInput {
31 /// Creates a new builder-style object to manufacture [`GetDeploymentInput`](crate::operation::get_deployment::GetDeploymentInput).
32 pub fn builder() -> crate::operation::get_deployment::builders::GetDeploymentInputBuilder {
33 crate::operation::get_deployment::builders::GetDeploymentInputBuilder::default()
34 }
35}
36
37/// A builder for [`GetDeploymentInput`](crate::operation::get_deployment::GetDeploymentInput).
38#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
39#[non_exhaustive]
40pub struct GetDeploymentInputBuilder {
41 pub(crate) rest_api_id: ::std::option::Option<::std::string::String>,
42 pub(crate) deployment_id: ::std::option::Option<::std::string::String>,
43 pub(crate) embed: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
44}
45impl GetDeploymentInputBuilder {
46 /// <p>The string identifier of the associated RestApi.</p>
47 /// This field is required.
48 pub fn rest_api_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
49 self.rest_api_id = ::std::option::Option::Some(input.into());
50 self
51 }
52 /// <p>The string identifier of the associated RestApi.</p>
53 pub fn set_rest_api_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
54 self.rest_api_id = input;
55 self
56 }
57 /// <p>The string identifier of the associated RestApi.</p>
58 pub fn get_rest_api_id(&self) -> &::std::option::Option<::std::string::String> {
59 &self.rest_api_id
60 }
61 /// <p>The identifier of the Deployment resource to get information about.</p>
62 /// This field is required.
63 pub fn deployment_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
64 self.deployment_id = ::std::option::Option::Some(input.into());
65 self
66 }
67 /// <p>The identifier of the Deployment resource to get information about.</p>
68 pub fn set_deployment_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
69 self.deployment_id = input;
70 self
71 }
72 /// <p>The identifier of the Deployment resource to get information about.</p>
73 pub fn get_deployment_id(&self) -> &::std::option::Option<::std::string::String> {
74 &self.deployment_id
75 }
76 /// Appends an item to `embed`.
77 ///
78 /// To override the contents of this collection use [`set_embed`](Self::set_embed).
79 ///
80 /// <p>A query parameter to retrieve the specified embedded resources of the returned Deployment resource in the response. In a REST API call, this <code>embed</code> parameter value is a list of comma-separated strings, as in <code>GET /restapis/{restapi_id}/deployments/{deployment_id}?embed=var1,var2</code>. The SDK and other platform-dependent libraries might use a different format for the list. Currently, this request supports only retrieval of the embedded API summary this way. Hence, the parameter value must be a single-valued list containing only the <code>"apisummary"</code> string. For example, <code>GET /restapis/{restapi_id}/deployments/{deployment_id}?embed=apisummary</code>.</p>
81 pub fn embed(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
82 let mut v = self.embed.unwrap_or_default();
83 v.push(input.into());
84 self.embed = ::std::option::Option::Some(v);
85 self
86 }
87 /// <p>A query parameter to retrieve the specified embedded resources of the returned Deployment resource in the response. In a REST API call, this <code>embed</code> parameter value is a list of comma-separated strings, as in <code>GET /restapis/{restapi_id}/deployments/{deployment_id}?embed=var1,var2</code>. The SDK and other platform-dependent libraries might use a different format for the list. Currently, this request supports only retrieval of the embedded API summary this way. Hence, the parameter value must be a single-valued list containing only the <code>"apisummary"</code> string. For example, <code>GET /restapis/{restapi_id}/deployments/{deployment_id}?embed=apisummary</code>.</p>
88 pub fn set_embed(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
89 self.embed = input;
90 self
91 }
92 /// <p>A query parameter to retrieve the specified embedded resources of the returned Deployment resource in the response. In a REST API call, this <code>embed</code> parameter value is a list of comma-separated strings, as in <code>GET /restapis/{restapi_id}/deployments/{deployment_id}?embed=var1,var2</code>. The SDK and other platform-dependent libraries might use a different format for the list. Currently, this request supports only retrieval of the embedded API summary this way. Hence, the parameter value must be a single-valued list containing only the <code>"apisummary"</code> string. For example, <code>GET /restapis/{restapi_id}/deployments/{deployment_id}?embed=apisummary</code>.</p>
93 pub fn get_embed(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
94 &self.embed
95 }
96 /// Consumes the builder and constructs a [`GetDeploymentInput`](crate::operation::get_deployment::GetDeploymentInput).
97 pub fn build(
98 self,
99 ) -> ::std::result::Result<crate::operation::get_deployment::GetDeploymentInput, ::aws_smithy_types::error::operation::BuildError> {
100 ::std::result::Result::Ok(crate::operation::get_deployment::GetDeploymentInput {
101 rest_api_id: self.rest_api_id,
102 deployment_id: self.deployment_id,
103 embed: self.embed,
104 })
105 }
106}