aws_sdk_apigateway/operation/get_sdk/_get_sdk_input.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Request a new generated client SDK for a RestApi and Stage.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct GetSdkInput {
7 /// <p>The string identifier of the associated RestApi.</p>
8 pub rest_api_id: ::std::option::Option<::std::string::String>,
9 /// <p>The name of the Stage that the SDK will use.</p>
10 pub stage_name: ::std::option::Option<::std::string::String>,
11 /// <p>The language for the generated SDK. Currently <code>java</code>, <code>javascript</code>, <code>android</code>, <code>objectivec</code> (for iOS), <code>swift</code> (for iOS), and <code>ruby</code> are supported.</p>
12 pub sdk_type: ::std::option::Option<::std::string::String>,
13 /// <p>A string-to-string key-value map of query parameters <code>sdkType</code>-dependent properties of the SDK. For <code>sdkType</code> of <code>objectivec</code> or <code>swift</code>, a parameter named <code>classPrefix</code> is required. For <code>sdkType</code> of <code>android</code>, parameters named <code>groupId</code>, <code>artifactId</code>, <code>artifactVersion</code>, and <code>invokerPackage</code> are required. For <code>sdkType</code> of <code>java</code>, parameters named <code>serviceName</code> and <code>javaPackageName</code> are required.</p>
14 pub parameters: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
15}
16impl GetSdkInput {
17 /// <p>The string identifier of the associated RestApi.</p>
18 pub fn rest_api_id(&self) -> ::std::option::Option<&str> {
19 self.rest_api_id.as_deref()
20 }
21 /// <p>The name of the Stage that the SDK will use.</p>
22 pub fn stage_name(&self) -> ::std::option::Option<&str> {
23 self.stage_name.as_deref()
24 }
25 /// <p>The language for the generated SDK. Currently <code>java</code>, <code>javascript</code>, <code>android</code>, <code>objectivec</code> (for iOS), <code>swift</code> (for iOS), and <code>ruby</code> are supported.</p>
26 pub fn sdk_type(&self) -> ::std::option::Option<&str> {
27 self.sdk_type.as_deref()
28 }
29 /// <p>A string-to-string key-value map of query parameters <code>sdkType</code>-dependent properties of the SDK. For <code>sdkType</code> of <code>objectivec</code> or <code>swift</code>, a parameter named <code>classPrefix</code> is required. For <code>sdkType</code> of <code>android</code>, parameters named <code>groupId</code>, <code>artifactId</code>, <code>artifactVersion</code>, and <code>invokerPackage</code> are required. For <code>sdkType</code> of <code>java</code>, parameters named <code>serviceName</code> and <code>javaPackageName</code> are required.</p>
30 pub fn parameters(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
31 self.parameters.as_ref()
32 }
33}
34impl GetSdkInput {
35 /// Creates a new builder-style object to manufacture [`GetSdkInput`](crate::operation::get_sdk::GetSdkInput).
36 pub fn builder() -> crate::operation::get_sdk::builders::GetSdkInputBuilder {
37 crate::operation::get_sdk::builders::GetSdkInputBuilder::default()
38 }
39}
40
41/// A builder for [`GetSdkInput`](crate::operation::get_sdk::GetSdkInput).
42#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
43#[non_exhaustive]
44pub struct GetSdkInputBuilder {
45 pub(crate) rest_api_id: ::std::option::Option<::std::string::String>,
46 pub(crate) stage_name: ::std::option::Option<::std::string::String>,
47 pub(crate) sdk_type: ::std::option::Option<::std::string::String>,
48 pub(crate) parameters: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
49}
50impl GetSdkInputBuilder {
51 /// <p>The string identifier of the associated RestApi.</p>
52 /// This field is required.
53 pub fn rest_api_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
54 self.rest_api_id = ::std::option::Option::Some(input.into());
55 self
56 }
57 /// <p>The string identifier of the associated RestApi.</p>
58 pub fn set_rest_api_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
59 self.rest_api_id = input;
60 self
61 }
62 /// <p>The string identifier of the associated RestApi.</p>
63 pub fn get_rest_api_id(&self) -> &::std::option::Option<::std::string::String> {
64 &self.rest_api_id
65 }
66 /// <p>The name of the Stage that the SDK will use.</p>
67 /// This field is required.
68 pub fn stage_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
69 self.stage_name = ::std::option::Option::Some(input.into());
70 self
71 }
72 /// <p>The name of the Stage that the SDK will use.</p>
73 pub fn set_stage_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
74 self.stage_name = input;
75 self
76 }
77 /// <p>The name of the Stage that the SDK will use.</p>
78 pub fn get_stage_name(&self) -> &::std::option::Option<::std::string::String> {
79 &self.stage_name
80 }
81 /// <p>The language for the generated SDK. Currently <code>java</code>, <code>javascript</code>, <code>android</code>, <code>objectivec</code> (for iOS), <code>swift</code> (for iOS), and <code>ruby</code> are supported.</p>
82 /// This field is required.
83 pub fn sdk_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
84 self.sdk_type = ::std::option::Option::Some(input.into());
85 self
86 }
87 /// <p>The language for the generated SDK. Currently <code>java</code>, <code>javascript</code>, <code>android</code>, <code>objectivec</code> (for iOS), <code>swift</code> (for iOS), and <code>ruby</code> are supported.</p>
88 pub fn set_sdk_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
89 self.sdk_type = input;
90 self
91 }
92 /// <p>The language for the generated SDK. Currently <code>java</code>, <code>javascript</code>, <code>android</code>, <code>objectivec</code> (for iOS), <code>swift</code> (for iOS), and <code>ruby</code> are supported.</p>
93 pub fn get_sdk_type(&self) -> &::std::option::Option<::std::string::String> {
94 &self.sdk_type
95 }
96 /// Adds a key-value pair to `parameters`.
97 ///
98 /// To override the contents of this collection use [`set_parameters`](Self::set_parameters).
99 ///
100 /// <p>A string-to-string key-value map of query parameters <code>sdkType</code>-dependent properties of the SDK. For <code>sdkType</code> of <code>objectivec</code> or <code>swift</code>, a parameter named <code>classPrefix</code> is required. For <code>sdkType</code> of <code>android</code>, parameters named <code>groupId</code>, <code>artifactId</code>, <code>artifactVersion</code>, and <code>invokerPackage</code> are required. For <code>sdkType</code> of <code>java</code>, parameters named <code>serviceName</code> and <code>javaPackageName</code> are required.</p>
101 pub fn parameters(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
102 let mut hash_map = self.parameters.unwrap_or_default();
103 hash_map.insert(k.into(), v.into());
104 self.parameters = ::std::option::Option::Some(hash_map);
105 self
106 }
107 /// <p>A string-to-string key-value map of query parameters <code>sdkType</code>-dependent properties of the SDK. For <code>sdkType</code> of <code>objectivec</code> or <code>swift</code>, a parameter named <code>classPrefix</code> is required. For <code>sdkType</code> of <code>android</code>, parameters named <code>groupId</code>, <code>artifactId</code>, <code>artifactVersion</code>, and <code>invokerPackage</code> are required. For <code>sdkType</code> of <code>java</code>, parameters named <code>serviceName</code> and <code>javaPackageName</code> are required.</p>
108 pub fn set_parameters(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
109 self.parameters = input;
110 self
111 }
112 /// <p>A string-to-string key-value map of query parameters <code>sdkType</code>-dependent properties of the SDK. For <code>sdkType</code> of <code>objectivec</code> or <code>swift</code>, a parameter named <code>classPrefix</code> is required. For <code>sdkType</code> of <code>android</code>, parameters named <code>groupId</code>, <code>artifactId</code>, <code>artifactVersion</code>, and <code>invokerPackage</code> are required. For <code>sdkType</code> of <code>java</code>, parameters named <code>serviceName</code> and <code>javaPackageName</code> are required.</p>
113 pub fn get_parameters(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
114 &self.parameters
115 }
116 /// Consumes the builder and constructs a [`GetSdkInput`](crate::operation::get_sdk::GetSdkInput).
117 pub fn build(self) -> ::std::result::Result<crate::operation::get_sdk::GetSdkInput, ::aws_smithy_types::error::operation::BuildError> {
118 ::std::result::Result::Ok(crate::operation::get_sdk::GetSdkInput {
119 rest_api_id: self.rest_api_id,
120 stage_name: self.stage_name,
121 sdk_type: self.sdk_type,
122 parameters: self.parameters,
123 })
124 }
125}