
com.amazonaws.services.appsync.model.CreateGraphqlApiRequest Maven / Gradle / Ivy
/*
* 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 com.amazonaws.services.appsync.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.AmazonWebServiceRequest;
/**
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class CreateGraphqlApiRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* A user-supplied name for the GraphqlApi
.
*
*/
private String name;
/**
*
* The Amazon CloudWatch logs configuration.
*
*/
private LogConfig logConfig;
/**
*
* The authentication type: API key, IAM, or Amazon Cognito User Pools.
*
*/
private String authenticationType;
/**
*
* The Amazon Cognito User Pool configuration.
*
*/
private UserPoolConfig userPoolConfig;
/**
*
* The Open Id Connect configuration configuration.
*
*/
private OpenIDConnectConfig openIDConnectConfig;
/**
*
* A user-supplied name for the GraphqlApi
.
*
*
* @param name
* A user-supplied name for the GraphqlApi
.
*/
public void setName(String name) {
this.name = name;
}
/**
*
* A user-supplied name for the GraphqlApi
.
*
*
* @return A user-supplied name for the GraphqlApi
.
*/
public String getName() {
return this.name;
}
/**
*
* A user-supplied name for the GraphqlApi
.
*
*
* @param name
* A user-supplied name for the GraphqlApi
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateGraphqlApiRequest withName(String name) {
setName(name);
return this;
}
/**
*
* The Amazon CloudWatch logs configuration.
*
*
* @param logConfig
* The Amazon CloudWatch logs configuration.
*/
public void setLogConfig(LogConfig logConfig) {
this.logConfig = logConfig;
}
/**
*
* The Amazon CloudWatch logs configuration.
*
*
* @return The Amazon CloudWatch logs configuration.
*/
public LogConfig getLogConfig() {
return this.logConfig;
}
/**
*
* The Amazon CloudWatch logs configuration.
*
*
* @param logConfig
* The Amazon CloudWatch logs configuration.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateGraphqlApiRequest withLogConfig(LogConfig logConfig) {
setLogConfig(logConfig);
return this;
}
/**
*
* The authentication type: API key, IAM, or Amazon Cognito User Pools.
*
*
* @param authenticationType
* The authentication type: API key, IAM, or Amazon Cognito User Pools.
* @see AuthenticationType
*/
public void setAuthenticationType(String authenticationType) {
this.authenticationType = authenticationType;
}
/**
*
* The authentication type: API key, IAM, or Amazon Cognito User Pools.
*
*
* @return The authentication type: API key, IAM, or Amazon Cognito User Pools.
* @see AuthenticationType
*/
public String getAuthenticationType() {
return this.authenticationType;
}
/**
*
* The authentication type: API key, IAM, or Amazon Cognito User Pools.
*
*
* @param authenticationType
* The authentication type: API key, IAM, or Amazon Cognito User Pools.
* @return Returns a reference to this object so that method calls can be chained together.
* @see AuthenticationType
*/
public CreateGraphqlApiRequest withAuthenticationType(String authenticationType) {
setAuthenticationType(authenticationType);
return this;
}
/**
*
* The authentication type: API key, IAM, or Amazon Cognito User Pools.
*
*
* @param authenticationType
* The authentication type: API key, IAM, or Amazon Cognito User Pools.
* @return Returns a reference to this object so that method calls can be chained together.
* @see AuthenticationType
*/
public CreateGraphqlApiRequest withAuthenticationType(AuthenticationType authenticationType) {
this.authenticationType = authenticationType.toString();
return this;
}
/**
*
* The Amazon Cognito User Pool configuration.
*
*
* @param userPoolConfig
* The Amazon Cognito User Pool configuration.
*/
public void setUserPoolConfig(UserPoolConfig userPoolConfig) {
this.userPoolConfig = userPoolConfig;
}
/**
*
* The Amazon Cognito User Pool configuration.
*
*
* @return The Amazon Cognito User Pool configuration.
*/
public UserPoolConfig getUserPoolConfig() {
return this.userPoolConfig;
}
/**
*
* The Amazon Cognito User Pool configuration.
*
*
* @param userPoolConfig
* The Amazon Cognito User Pool configuration.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateGraphqlApiRequest withUserPoolConfig(UserPoolConfig userPoolConfig) {
setUserPoolConfig(userPoolConfig);
return this;
}
/**
*
* The Open Id Connect configuration configuration.
*
*
* @param openIDConnectConfig
* The Open Id Connect configuration configuration.
*/
public void setOpenIDConnectConfig(OpenIDConnectConfig openIDConnectConfig) {
this.openIDConnectConfig = openIDConnectConfig;
}
/**
*
* The Open Id Connect configuration configuration.
*
*
* @return The Open Id Connect configuration configuration.
*/
public OpenIDConnectConfig getOpenIDConnectConfig() {
return this.openIDConnectConfig;
}
/**
*
* The Open Id Connect configuration configuration.
*
*
* @param openIDConnectConfig
* The Open Id Connect configuration configuration.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateGraphqlApiRequest withOpenIDConnectConfig(OpenIDConnectConfig openIDConnectConfig) {
setOpenIDConnectConfig(openIDConnectConfig);
return this;
}
/**
* Returns a string representation of this object; useful for testing and debugging.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getName() != null)
sb.append("Name: ").append(getName()).append(",");
if (getLogConfig() != null)
sb.append("LogConfig: ").append(getLogConfig()).append(",");
if (getAuthenticationType() != null)
sb.append("AuthenticationType: ").append(getAuthenticationType()).append(",");
if (getUserPoolConfig() != null)
sb.append("UserPoolConfig: ").append(getUserPoolConfig()).append(",");
if (getOpenIDConnectConfig() != null)
sb.append("OpenIDConnectConfig: ").append(getOpenIDConnectConfig());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof CreateGraphqlApiRequest == false)
return false;
CreateGraphqlApiRequest other = (CreateGraphqlApiRequest) obj;
if (other.getName() == null ^ this.getName() == null)
return false;
if (other.getName() != null && other.getName().equals(this.getName()) == false)
return false;
if (other.getLogConfig() == null ^ this.getLogConfig() == null)
return false;
if (other.getLogConfig() != null && other.getLogConfig().equals(this.getLogConfig()) == false)
return false;
if (other.getAuthenticationType() == null ^ this.getAuthenticationType() == null)
return false;
if (other.getAuthenticationType() != null && other.getAuthenticationType().equals(this.getAuthenticationType()) == false)
return false;
if (other.getUserPoolConfig() == null ^ this.getUserPoolConfig() == null)
return false;
if (other.getUserPoolConfig() != null && other.getUserPoolConfig().equals(this.getUserPoolConfig()) == false)
return false;
if (other.getOpenIDConnectConfig() == null ^ this.getOpenIDConnectConfig() == null)
return false;
if (other.getOpenIDConnectConfig() != null && other.getOpenIDConnectConfig().equals(this.getOpenIDConnectConfig()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode());
hashCode = prime * hashCode + ((getLogConfig() == null) ? 0 : getLogConfig().hashCode());
hashCode = prime * hashCode + ((getAuthenticationType() == null) ? 0 : getAuthenticationType().hashCode());
hashCode = prime * hashCode + ((getUserPoolConfig() == null) ? 0 : getUserPoolConfig().hashCode());
hashCode = prime * hashCode + ((getOpenIDConnectConfig() == null) ? 0 : getOpenIDConnectConfig().hashCode());
return hashCode;
}
@Override
public CreateGraphqlApiRequest clone() {
return (CreateGraphqlApiRequest) super.clone();
}
}