com.amazonaws.services.appsync.model.UpdateFunctionRequest Maven / Gradle / Ivy
Show all versions of aws-java-sdk-appsync Show documentation
/*
* Copyright 2019-2024 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 UpdateFunctionRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* The GraphQL API ID.
*
*/
private String apiId;
/**
*
* The Function
name.
*
*/
private String name;
/**
*
* The Function
description.
*
*/
private String description;
/**
*
* The function ID.
*
*/
private String functionId;
/**
*
* 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
request mapping template.
*
*/
private String responseMappingTemplate;
/**
*
* The version
of the request mapping template. Currently, the supported value is 2018-05-29. Note that
* when using VTL and mapping templates, the functionVersion
is required.
*
*/
private String functionVersion;
private SyncConfig syncConfig;
/**
*
* The maximum batching size for a resolver.
*
*/
private Integer maxBatchSize;
private AppSyncRuntime runtime;
/**
*
* The function
code that contains the request and response functions. When code is used, the
* runtime
is required. The runtime
value must be APPSYNC_JS
.
*
*/
private String code;
/**
*
* 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 UpdateFunctionRequest withApiId(String apiId) {
setApiId(apiId);
return this;
}
/**
*
* The Function
name.
*
*
* @param name
* The Function
name.
*/
public void setName(String name) {
this.name = name;
}
/**
*
* The Function
name.
*
*
* @return The Function
name.
*/
public String getName() {
return this.name;
}
/**
*
* The Function
name.
*
*
* @param name
* The Function
name.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateFunctionRequest 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 UpdateFunctionRequest withDescription(String description) {
setDescription(description);
return this;
}
/**
*
* The function ID.
*
*
* @param functionId
* The function ID.
*/
public void setFunctionId(String functionId) {
this.functionId = functionId;
}
/**
*
* The function ID.
*
*
* @return The function ID.
*/
public String getFunctionId() {
return this.functionId;
}
/**
*
* The function ID.
*
*
* @param functionId
* The function ID.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateFunctionRequest withFunctionId(String functionId) {
setFunctionId(functionId);
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 UpdateFunctionRequest 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 UpdateFunctionRequest withRequestMappingTemplate(String requestMappingTemplate) {
setRequestMappingTemplate(requestMappingTemplate);
return this;
}
/**
*
* The Function
request mapping template.
*
*
* @param responseMappingTemplate
* The Function
request mapping template.
*/
public void setResponseMappingTemplate(String responseMappingTemplate) {
this.responseMappingTemplate = responseMappingTemplate;
}
/**
*
* The Function
request mapping template.
*
*
* @return The Function
request mapping template.
*/
public String getResponseMappingTemplate() {
return this.responseMappingTemplate;
}
/**
*
* The Function
request mapping template.
*
*
* @param responseMappingTemplate
* The Function
request mapping template.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateFunctionRequest withResponseMappingTemplate(String responseMappingTemplate) {
setResponseMappingTemplate(responseMappingTemplate);
return this;
}
/**
*
* The version
of the request mapping template. Currently, the supported value is 2018-05-29. Note that
* when using VTL and mapping templates, the functionVersion
is required.
*
*
* @param functionVersion
* The version
of the request mapping template. Currently, the supported value is 2018-05-29.
* Note that when using VTL and mapping templates, the functionVersion
is required.
*/
public void setFunctionVersion(String functionVersion) {
this.functionVersion = functionVersion;
}
/**
*
* The version
of the request mapping template. Currently, the supported value is 2018-05-29. Note that
* when using VTL and mapping templates, the functionVersion
is required.
*
*
* @return The version
of the request mapping template. Currently, the supported value is 2018-05-29.
* Note that when using VTL and mapping templates, the functionVersion
is required.
*/
public String getFunctionVersion() {
return this.functionVersion;
}
/**
*
* The version
of the request mapping template. Currently, the supported value is 2018-05-29. Note that
* when using VTL and mapping templates, the functionVersion
is required.
*
*
* @param functionVersion
* The version
of the request mapping template. Currently, the supported value is 2018-05-29.
* Note that when using VTL and mapping templates, the functionVersion
is required.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateFunctionRequest 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 UpdateFunctionRequest withSyncConfig(SyncConfig syncConfig) {
setSyncConfig(syncConfig);
return this;
}
/**
*
* The maximum batching size for a resolver.
*
*
* @param maxBatchSize
* The maximum batching size for a resolver.
*/
public void setMaxBatchSize(Integer maxBatchSize) {
this.maxBatchSize = maxBatchSize;
}
/**
*
* The maximum batching size for a resolver.
*
*
* @return The maximum batching size for a resolver.
*/
public Integer getMaxBatchSize() {
return this.maxBatchSize;
}
/**
*
* The maximum batching size for a resolver.
*
*
* @param maxBatchSize
* The maximum batching size for a resolver.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateFunctionRequest withMaxBatchSize(Integer maxBatchSize) {
setMaxBatchSize(maxBatchSize);
return this;
}
/**
* @param runtime
*/
public void setRuntime(AppSyncRuntime runtime) {
this.runtime = runtime;
}
/**
* @return
*/
public AppSyncRuntime getRuntime() {
return this.runtime;
}
/**
* @param runtime
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateFunctionRequest withRuntime(AppSyncRuntime runtime) {
setRuntime(runtime);
return this;
}
/**
*
* The function
code that contains the request and response functions. When code is used, the
* runtime
is required. The runtime
value must be APPSYNC_JS
.
*
*
* @param code
* The function
code that contains the request and response functions. When code is used, the
* runtime
is required. The runtime
value must be APPSYNC_JS
.
*/
public void setCode(String code) {
this.code = code;
}
/**
*
* The function
code that contains the request and response functions. When code is used, the
* runtime
is required. The runtime
value must be APPSYNC_JS
.
*
*
* @return The function
code that contains the request and response functions. When code is used, the
* runtime
is required. The runtime
value must be APPSYNC_JS
.
*/
public String getCode() {
return this.code;
}
/**
*
* The function
code that contains the request and response functions. When code is used, the
* runtime
is required. The runtime
value must be APPSYNC_JS
.
*
*
* @param code
* The function
code that contains the request and response functions. When code is used, the
* runtime
is required. The runtime
value must be APPSYNC_JS
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateFunctionRequest withCode(String code) {
setCode(code);
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 (getFunctionId() != null)
sb.append("FunctionId: ").append(getFunctionId()).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()).append(",");
if (getMaxBatchSize() != null)
sb.append("MaxBatchSize: ").append(getMaxBatchSize()).append(",");
if (getRuntime() != null)
sb.append("Runtime: ").append(getRuntime()).append(",");
if (getCode() != null)
sb.append("Code: ").append(getCode());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof UpdateFunctionRequest == false)
return false;
UpdateFunctionRequest other = (UpdateFunctionRequest) 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.getFunctionId() == null ^ this.getFunctionId() == null)
return false;
if (other.getFunctionId() != null && other.getFunctionId().equals(this.getFunctionId()) == 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;
if (other.getMaxBatchSize() == null ^ this.getMaxBatchSize() == null)
return false;
if (other.getMaxBatchSize() != null && other.getMaxBatchSize().equals(this.getMaxBatchSize()) == false)
return false;
if (other.getRuntime() == null ^ this.getRuntime() == null)
return false;
if (other.getRuntime() != null && other.getRuntime().equals(this.getRuntime()) == false)
return false;
if (other.getCode() == null ^ this.getCode() == null)
return false;
if (other.getCode() != null && other.getCode().equals(this.getCode()) == 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 + ((getFunctionId() == null) ? 0 : getFunctionId().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());
hashCode = prime * hashCode + ((getMaxBatchSize() == null) ? 0 : getMaxBatchSize().hashCode());
hashCode = prime * hashCode + ((getRuntime() == null) ? 0 : getRuntime().hashCode());
hashCode = prime * hashCode + ((getCode() == null) ? 0 : getCode().hashCode());
return hashCode;
}
@Override
public UpdateFunctionRequest clone() {
return (UpdateFunctionRequest) super.clone();
}
}