All Downloads are FREE. Search and download functionalities are using the official Maven repository.

software.amazon.awssdk.services.apigateway.model.GetSdkRequest Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon API Gateway module holds the client classes that are used for communicating with Amazon API Gateway

There is a newer version: 2.0.0-preview-11
Show newest version
/*
 * Copyright 2013-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
 * the License. A copy of the License is located at
 * 
 * http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
 * and limitations under the License.
 */

package software.amazon.awssdk.services.apigateway.model;

import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.function.Consumer;
import javax.annotation.Generated;
import software.amazon.awssdk.core.AwsRequestOverrideConfig;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 * 

* Request a new generated client SDK for a RestApi and Stage. *

*/ @Generated("software.amazon.awssdk:codegen") public class GetSdkRequest extends APIGatewayRequest implements ToCopyableBuilder { private final String restApiId; private final String stageName; private final String sdkType; private final Map parameters; private GetSdkRequest(BuilderImpl builder) { super(builder); this.restApiId = builder.restApiId; this.stageName = builder.stageName; this.sdkType = builder.sdkType; this.parameters = builder.parameters; } /** *

* The string identifier of the associated RestApi. *

* * @return The string identifier of the associated RestApi. */ public String restApiId() { return restApiId; } /** *

* The name of the Stage that the SDK will use. *

* * @return The name of the Stage that the SDK will use. */ public String stageName() { return stageName; } /** *

* The language for the generated SDK. Currently java, javascript, android, * objectivec (for iOS), swift (for iOS), and ruby are supported. *

* * @return The language for the generated SDK. Currently java, javascript, * android, objectivec (for iOS), swift (for iOS), and * ruby are supported. */ public String sdkType() { return sdkType; } /** *

* A string-to-string key-value map of query parameters sdkType-dependent properties of the SDK. For * sdkType of objectivec or swift, a parameter named classPrefix * is required. For sdkType of android, parameters named groupId, * artifactId, artifactVersion, and invokerPackage are required. For * sdkType of java, parameters named serviceName and * javaPackageName are required. *

*

* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

* * @return A string-to-string key-value map of query parameters sdkType-dependent properties of the * SDK. For sdkType of objectivec or swift, a parameter named * classPrefix is required. For sdkType of android, parameters named * groupId, artifactId, artifactVersion, and * invokerPackage are required. For sdkType of java, parameters named * serviceName and javaPackageName are required. */ public Map parameters() { return parameters; } @Override public Builder toBuilder() { return new BuilderImpl(this); } public static Builder builder() { return new BuilderImpl(); } public static Class serializableBuilderClass() { return BuilderImpl.class; } @Override public int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(restApiId()); hashCode = 31 * hashCode + Objects.hashCode(stageName()); hashCode = 31 * hashCode + Objects.hashCode(sdkType()); hashCode = 31 * hashCode + Objects.hashCode(parameters()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof GetSdkRequest)) { return false; } GetSdkRequest other = (GetSdkRequest) obj; return Objects.equals(restApiId(), other.restApiId()) && Objects.equals(stageName(), other.stageName()) && Objects.equals(sdkType(), other.sdkType()) && Objects.equals(parameters(), other.parameters()); } @Override public String toString() { return ToString.builder("GetSdkRequest").add("RestApiId", restApiId()).add("StageName", stageName()) .add("SdkType", sdkType()).add("Parameters", parameters()).build(); } public Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "restApiId": return Optional.of(clazz.cast(restApiId())); case "stageName": return Optional.of(clazz.cast(stageName())); case "sdkType": return Optional.of(clazz.cast(sdkType())); case "parameters": return Optional.of(clazz.cast(parameters())); default: return Optional.empty(); } } public interface Builder extends APIGatewayRequest.Builder, CopyableBuilder { /** *

* The string identifier of the associated RestApi. *

* * @param restApiId * The string identifier of the associated RestApi. * @return Returns a reference to this object so that method calls can be chained together. */ Builder restApiId(String restApiId); /** *

* The name of the Stage that the SDK will use. *

* * @param stageName * The name of the Stage that the SDK will use. * @return Returns a reference to this object so that method calls can be chained together. */ Builder stageName(String stageName); /** *

* The language for the generated SDK. Currently java, javascript, * android, objectivec (for iOS), swift (for iOS), and ruby * are supported. *

* * @param sdkType * The language for the generated SDK. Currently java, javascript, * android, objectivec (for iOS), swift (for iOS), and * ruby are supported. * @return Returns a reference to this object so that method calls can be chained together. */ Builder sdkType(String sdkType); /** *

* A string-to-string key-value map of query parameters sdkType-dependent properties of the SDK. * For sdkType of objectivec or swift, a parameter named * classPrefix is required. For sdkType of android, parameters named * groupId, artifactId, artifactVersion, and invokerPackage * are required. For sdkType of java, parameters named serviceName and * javaPackageName are required. *

* * @param parameters * A string-to-string key-value map of query parameters sdkType-dependent properties of the * SDK. For sdkType of objectivec or swift, a parameter named * classPrefix is required. For sdkType of android, parameters * named groupId, artifactId, artifactVersion, and * invokerPackage are required. For sdkType of java, parameters * named serviceName and javaPackageName are required. * @return Returns a reference to this object so that method calls can be chained together. */ Builder parameters(Map parameters); @Override Builder requestOverrideConfig(AwsRequestOverrideConfig awsRequestOverrideConfig); } static final class BuilderImpl extends APIGatewayRequest.BuilderImpl implements Builder { private String restApiId; private String stageName; private String sdkType; private Map parameters; private BuilderImpl() { } private BuilderImpl(GetSdkRequest model) { restApiId(model.restApiId); stageName(model.stageName); sdkType(model.sdkType); parameters(model.parameters); } public final String getRestApiId() { return restApiId; } @Override public final Builder restApiId(String restApiId) { this.restApiId = restApiId; return this; } public final void setRestApiId(String restApiId) { this.restApiId = restApiId; } public final String getStageName() { return stageName; } @Override public final Builder stageName(String stageName) { this.stageName = stageName; return this; } public final void setStageName(String stageName) { this.stageName = stageName; } public final String getSdkType() { return sdkType; } @Override public final Builder sdkType(String sdkType) { this.sdkType = sdkType; return this; } public final void setSdkType(String sdkType) { this.sdkType = sdkType; } public final Map getParameters() { return parameters; } @Override public final Builder parameters(Map parameters) { this.parameters = MapOfStringToStringCopier.copy(parameters); return this; } public final void setParameters(Map parameters) { this.parameters = MapOfStringToStringCopier.copy(parameters); } @Override public Builder requestOverrideConfig(AwsRequestOverrideConfig awsRequestOverrideConfig) { super.requestOverrideConfig(awsRequestOverrideConfig); return this; } @Override public Builder requestOverrideConfig(Consumer builderConsumer) { super.requestOverrideConfig(builderConsumer); return this; } @Override public GetSdkRequest build() { return new GetSdkRequest(this); } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy