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