
com.amazonaws.services.appsync.model.CreateFunctionRequest Maven / Gradle / Ivy
/*
* Copyright 2016-2021 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 CreateFunctionRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* The GraphQL API ID.
*
*/
private String apiId;
/**
*
* The Function
name. The function name does not have to be unique.
*
*/
private String name;
/**
*
* The Function
description.
*
*/
private String description;
/**
*
* The Function
DataSource
name.
*
*/
private String dataSourceName;
/**
*
* The Function
request mapping template. Functions support only the 2018-05-29 version of the request
* mapping template.
*
*/
private String requestMappingTemplate;
/**
*
* The Function
response mapping template.
*
*/
private String responseMappingTemplate;
/**
*
* The version
of the request mapping template. Currently the supported value is 2018-05-29.
*
*/
private String functionVersion;
private SyncConfig syncConfig;
/**
*
* The GraphQL API ID.
*
*
* @param apiId
* The GraphQL API ID.
*/
public void setApiId(String apiId) {
this.apiId = apiId;
}
/**
*
* The GraphQL API ID.
*
*
* @return The GraphQL API ID.
*/
public String getApiId() {
return this.apiId;
}
/**
*
* The GraphQL API ID.
*
*
* @param apiId
* The GraphQL API ID.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateFunctionRequest withApiId(String apiId) {
setApiId(apiId);
return this;
}
/**
*
* The Function
name. The function name does not have to be unique.
*
*
* @param name
* The Function
name. The function name does not have to be unique.
*/
public void setName(String name) {
this.name = name;
}
/**
*
* The Function
name. The function name does not have to be unique.
*
*
* @return The Function
name. The function name does not have to be unique.
*/
public String getName() {
return this.name;
}
/**
*
* The Function
name. The function name does not have to be unique.
*
*
* @param name
* The Function
name. The function name does not have to be unique.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateFunctionRequest withName(String name) {
setName(name);
return this;
}
/**
*
* The Function
description.
*
*
* @param description
* The Function
description.
*/
public void setDescription(String description) {
this.description = description;
}
/**
*
* The Function
description.
*
*
* @return The Function
description.
*/
public String getDescription() {
return this.description;
}
/**
*
* The Function
description.
*
*
* @param description
* The Function
description.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateFunctionRequest withDescription(String description) {
setDescription(description);
return this;
}
/**
*
* The Function
DataSource
name.
*
*
* @param dataSourceName
* The Function
DataSource
name.
*/
public void setDataSourceName(String dataSourceName) {
this.dataSourceName = dataSourceName;
}
/**
*
* The Function
DataSource
name.
*
*
* @return The Function
DataSource
name.
*/
public String getDataSourceName() {
return this.dataSourceName;
}
/**
*
* The Function
DataSource
name.
*
*
* @param dataSourceName
* The Function
DataSource
name.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateFunctionRequest withDataSourceName(String dataSourceName) {
setDataSourceName(dataSourceName);
return this;
}
/**
*
* The Function
request mapping template. Functions support only the 2018-05-29 version of the request
* mapping template.
*
*
* @param requestMappingTemplate
* The Function
request mapping template. Functions support only the 2018-05-29 version of the
* request mapping template.
*/
public void setRequestMappingTemplate(String requestMappingTemplate) {
this.requestMappingTemplate = requestMappingTemplate;
}
/**
*
* The Function
request mapping template. Functions support only the 2018-05-29 version of the request
* mapping template.
*
*
* @return The Function
request mapping template. Functions support only the 2018-05-29 version of the
* request mapping template.
*/
public String getRequestMappingTemplate() {
return this.requestMappingTemplate;
}
/**
*
* The Function
request mapping template. Functions support only the 2018-05-29 version of the request
* mapping template.
*
*
* @param requestMappingTemplate
* The Function
request mapping template. Functions support only the 2018-05-29 version of the
* request mapping template.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateFunctionRequest withRequestMappingTemplate(String requestMappingTemplate) {
setRequestMappingTemplate(requestMappingTemplate);
return this;
}
/**
*
* The Function
response mapping template.
*
*
* @param responseMappingTemplate
* The Function
response mapping template.
*/
public void setResponseMappingTemplate(String responseMappingTemplate) {
this.responseMappingTemplate = responseMappingTemplate;
}
/**
*
* The Function
response mapping template.
*
*
* @return The Function
response mapping template.
*/
public String getResponseMappingTemplate() {
return this.responseMappingTemplate;
}
/**
*
* The Function
response mapping template.
*
*
* @param responseMappingTemplate
* The Function
response mapping template.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateFunctionRequest withResponseMappingTemplate(String responseMappingTemplate) {
setResponseMappingTemplate(responseMappingTemplate);
return this;
}
/**
*
* The version
of the request mapping template. Currently the supported value is 2018-05-29.
*
*
* @param functionVersion
* The version
of the request mapping template. Currently the supported value is 2018-05-29.
*/
public void setFunctionVersion(String functionVersion) {
this.functionVersion = functionVersion;
}
/**
*
* The version
of the request mapping template. Currently the supported value is 2018-05-29.
*
*
* @return The version
of the request mapping template. Currently the supported value is 2018-05-29.
*/
public String getFunctionVersion() {
return this.functionVersion;
}
/**
*
* The version
of the request mapping template. Currently the supported value is 2018-05-29.
*
*
* @param functionVersion
* The version
of the request mapping template. Currently the supported value is 2018-05-29.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateFunctionRequest withFunctionVersion(String functionVersion) {
setFunctionVersion(functionVersion);
return this;
}
/**
* @param syncConfig
*/
public void setSyncConfig(SyncConfig syncConfig) {
this.syncConfig = syncConfig;
}
/**
* @return
*/
public SyncConfig getSyncConfig() {
return this.syncConfig;
}
/**
* @param syncConfig
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateFunctionRequest withSyncConfig(SyncConfig syncConfig) {
setSyncConfig(syncConfig);
return this;
}
/**
* Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
* redacted from this string using a placeholder value.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getApiId() != null)
sb.append("ApiId: ").append(getApiId()).append(",");
if (getName() != null)
sb.append("Name: ").append(getName()).append(",");
if (getDescription() != null)
sb.append("Description: ").append(getDescription()).append(",");
if (getDataSourceName() != null)
sb.append("DataSourceName: ").append(getDataSourceName()).append(",");
if (getRequestMappingTemplate() != null)
sb.append("RequestMappingTemplate: ").append(getRequestMappingTemplate()).append(",");
if (getResponseMappingTemplate() != null)
sb.append("ResponseMappingTemplate: ").append(getResponseMappingTemplate()).append(",");
if (getFunctionVersion() != null)
sb.append("FunctionVersion: ").append(getFunctionVersion()).append(",");
if (getSyncConfig() != null)
sb.append("SyncConfig: ").append(getSyncConfig());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof CreateFunctionRequest == false)
return false;
CreateFunctionRequest other = (CreateFunctionRequest) obj;
if (other.getApiId() == null ^ this.getApiId() == null)
return false;
if (other.getApiId() != null && other.getApiId().equals(this.getApiId()) == false)
return false;
if (other.getName() == null ^ this.getName() == null)
return false;
if (other.getName() != null && other.getName().equals(this.getName()) == false)
return false;
if (other.getDescription() == null ^ this.getDescription() == null)
return false;
if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false)
return false;
if (other.getDataSourceName() == null ^ this.getDataSourceName() == null)
return false;
if (other.getDataSourceName() != null && other.getDataSourceName().equals(this.getDataSourceName()) == false)
return false;
if (other.getRequestMappingTemplate() == null ^ this.getRequestMappingTemplate() == null)
return false;
if (other.getRequestMappingTemplate() != null && other.getRequestMappingTemplate().equals(this.getRequestMappingTemplate()) == false)
return false;
if (other.getResponseMappingTemplate() == null ^ this.getResponseMappingTemplate() == null)
return false;
if (other.getResponseMappingTemplate() != null && other.getResponseMappingTemplate().equals(this.getResponseMappingTemplate()) == false)
return false;
if (other.getFunctionVersion() == null ^ this.getFunctionVersion() == null)
return false;
if (other.getFunctionVersion() != null && other.getFunctionVersion().equals(this.getFunctionVersion()) == false)
return false;
if (other.getSyncConfig() == null ^ this.getSyncConfig() == null)
return false;
if (other.getSyncConfig() != null && other.getSyncConfig().equals(this.getSyncConfig()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getApiId() == null) ? 0 : getApiId().hashCode());
hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode());
hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode());
hashCode = prime * hashCode + ((getDataSourceName() == null) ? 0 : getDataSourceName().hashCode());
hashCode = prime * hashCode + ((getRequestMappingTemplate() == null) ? 0 : getRequestMappingTemplate().hashCode());
hashCode = prime * hashCode + ((getResponseMappingTemplate() == null) ? 0 : getResponseMappingTemplate().hashCode());
hashCode = prime * hashCode + ((getFunctionVersion() == null) ? 0 : getFunctionVersion().hashCode());
hashCode = prime * hashCode + ((getSyncConfig() == null) ? 0 : getSyncConfig().hashCode());
return hashCode;
}
@Override
public CreateFunctionRequest clone() {
return (CreateFunctionRequest) super.clone();
}
}