com.amazonaws.services.appflow.model.DestinationFieldProperties Maven / Gradle / Ivy
/*
* 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.appflow.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* The properties that can be applied to a field when connector is being used as a destination.
*
*
* @see AWS
* API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class DestinationFieldProperties implements Serializable, Cloneable, StructuredPojo {
/**
*
* Specifies if the destination field can be created by the current user.
*
*/
private Boolean isCreatable;
/**
*
* Specifies if the destination field can have a null value.
*
*/
private Boolean isNullable;
/**
*
* Specifies if the flow run can either insert new rows in the destination field if they do not already exist, or
* update them if they do.
*
*/
private Boolean isUpsertable;
/**
*
* Specifies whether the field can be updated during an UPDATE
or UPSERT
write operation.
*
*/
private Boolean isUpdatable;
/**
*
* Specifies whether the field can use the default value during a Create operation.
*
*/
private Boolean isDefaultedOnCreate;
/**
*
* A list of supported write operations. For each write operation listed, this field can be used in
* idFieldNames
when that write operation is present as a destination option.
*
*/
private java.util.List supportedWriteOperations;
/**
*
* Specifies if the destination field can be created by the current user.
*
*
* @param isCreatable
* Specifies if the destination field can be created by the current user.
*/
public void setIsCreatable(Boolean isCreatable) {
this.isCreatable = isCreatable;
}
/**
*
* Specifies if the destination field can be created by the current user.
*
*
* @return Specifies if the destination field can be created by the current user.
*/
public Boolean getIsCreatable() {
return this.isCreatable;
}
/**
*
* Specifies if the destination field can be created by the current user.
*
*
* @param isCreatable
* Specifies if the destination field can be created by the current user.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DestinationFieldProperties withIsCreatable(Boolean isCreatable) {
setIsCreatable(isCreatable);
return this;
}
/**
*
* Specifies if the destination field can be created by the current user.
*
*
* @return Specifies if the destination field can be created by the current user.
*/
public Boolean isCreatable() {
return this.isCreatable;
}
/**
*
* Specifies if the destination field can have a null value.
*
*
* @param isNullable
* Specifies if the destination field can have a null value.
*/
public void setIsNullable(Boolean isNullable) {
this.isNullable = isNullable;
}
/**
*
* Specifies if the destination field can have a null value.
*
*
* @return Specifies if the destination field can have a null value.
*/
public Boolean getIsNullable() {
return this.isNullable;
}
/**
*
* Specifies if the destination field can have a null value.
*
*
* @param isNullable
* Specifies if the destination field can have a null value.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DestinationFieldProperties withIsNullable(Boolean isNullable) {
setIsNullable(isNullable);
return this;
}
/**
*
* Specifies if the destination field can have a null value.
*
*
* @return Specifies if the destination field can have a null value.
*/
public Boolean isNullable() {
return this.isNullable;
}
/**
*
* Specifies if the flow run can either insert new rows in the destination field if they do not already exist, or
* update them if they do.
*
*
* @param isUpsertable
* Specifies if the flow run can either insert new rows in the destination field if they do not already
* exist, or update them if they do.
*/
public void setIsUpsertable(Boolean isUpsertable) {
this.isUpsertable = isUpsertable;
}
/**
*
* Specifies if the flow run can either insert new rows in the destination field if they do not already exist, or
* update them if they do.
*
*
* @return Specifies if the flow run can either insert new rows in the destination field if they do not already
* exist, or update them if they do.
*/
public Boolean getIsUpsertable() {
return this.isUpsertable;
}
/**
*
* Specifies if the flow run can either insert new rows in the destination field if they do not already exist, or
* update them if they do.
*
*
* @param isUpsertable
* Specifies if the flow run can either insert new rows in the destination field if they do not already
* exist, or update them if they do.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DestinationFieldProperties withIsUpsertable(Boolean isUpsertable) {
setIsUpsertable(isUpsertable);
return this;
}
/**
*
* Specifies if the flow run can either insert new rows in the destination field if they do not already exist, or
* update them if they do.
*
*
* @return Specifies if the flow run can either insert new rows in the destination field if they do not already
* exist, or update them if they do.
*/
public Boolean isUpsertable() {
return this.isUpsertable;
}
/**
*
* Specifies whether the field can be updated during an UPDATE
or UPSERT
write operation.
*
*
* @param isUpdatable
* Specifies whether the field can be updated during an UPDATE
or UPSERT
write
* operation.
*/
public void setIsUpdatable(Boolean isUpdatable) {
this.isUpdatable = isUpdatable;
}
/**
*
* Specifies whether the field can be updated during an UPDATE
or UPSERT
write operation.
*
*
* @return Specifies whether the field can be updated during an UPDATE
or UPSERT
write
* operation.
*/
public Boolean getIsUpdatable() {
return this.isUpdatable;
}
/**
*
* Specifies whether the field can be updated during an UPDATE
or UPSERT
write operation.
*
*
* @param isUpdatable
* Specifies whether the field can be updated during an UPDATE
or UPSERT
write
* operation.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DestinationFieldProperties withIsUpdatable(Boolean isUpdatable) {
setIsUpdatable(isUpdatable);
return this;
}
/**
*
* Specifies whether the field can be updated during an UPDATE
or UPSERT
write operation.
*
*
* @return Specifies whether the field can be updated during an UPDATE
or UPSERT
write
* operation.
*/
public Boolean isUpdatable() {
return this.isUpdatable;
}
/**
*
* Specifies whether the field can use the default value during a Create operation.
*
*
* @param isDefaultedOnCreate
* Specifies whether the field can use the default value during a Create operation.
*/
public void setIsDefaultedOnCreate(Boolean isDefaultedOnCreate) {
this.isDefaultedOnCreate = isDefaultedOnCreate;
}
/**
*
* Specifies whether the field can use the default value during a Create operation.
*
*
* @return Specifies whether the field can use the default value during a Create operation.
*/
public Boolean getIsDefaultedOnCreate() {
return this.isDefaultedOnCreate;
}
/**
*
* Specifies whether the field can use the default value during a Create operation.
*
*
* @param isDefaultedOnCreate
* Specifies whether the field can use the default value during a Create operation.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DestinationFieldProperties withIsDefaultedOnCreate(Boolean isDefaultedOnCreate) {
setIsDefaultedOnCreate(isDefaultedOnCreate);
return this;
}
/**
*
* Specifies whether the field can use the default value during a Create operation.
*
*
* @return Specifies whether the field can use the default value during a Create operation.
*/
public Boolean isDefaultedOnCreate() {
return this.isDefaultedOnCreate;
}
/**
*
* A list of supported write operations. For each write operation listed, this field can be used in
* idFieldNames
when that write operation is present as a destination option.
*
*
* @return A list of supported write operations. For each write operation listed, this field can be used in
* idFieldNames
when that write operation is present as a destination option.
* @see WriteOperationType
*/
public java.util.List getSupportedWriteOperations() {
return supportedWriteOperations;
}
/**
*
* A list of supported write operations. For each write operation listed, this field can be used in
* idFieldNames
when that write operation is present as a destination option.
*
*
* @param supportedWriteOperations
* A list of supported write operations. For each write operation listed, this field can be used in
* idFieldNames
when that write operation is present as a destination option.
* @see WriteOperationType
*/
public void setSupportedWriteOperations(java.util.Collection supportedWriteOperations) {
if (supportedWriteOperations == null) {
this.supportedWriteOperations = null;
return;
}
this.supportedWriteOperations = new java.util.ArrayList(supportedWriteOperations);
}
/**
*
* A list of supported write operations. For each write operation listed, this field can be used in
* idFieldNames
when that write operation is present as a destination option.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setSupportedWriteOperations(java.util.Collection)} or
* {@link #withSupportedWriteOperations(java.util.Collection)} if you want to override the existing values.
*
*
* @param supportedWriteOperations
* A list of supported write operations. For each write operation listed, this field can be used in
* idFieldNames
when that write operation is present as a destination option.
* @return Returns a reference to this object so that method calls can be chained together.
* @see WriteOperationType
*/
public DestinationFieldProperties withSupportedWriteOperations(String... supportedWriteOperations) {
if (this.supportedWriteOperations == null) {
setSupportedWriteOperations(new java.util.ArrayList(supportedWriteOperations.length));
}
for (String ele : supportedWriteOperations) {
this.supportedWriteOperations.add(ele);
}
return this;
}
/**
*
* A list of supported write operations. For each write operation listed, this field can be used in
* idFieldNames
when that write operation is present as a destination option.
*
*
* @param supportedWriteOperations
* A list of supported write operations. For each write operation listed, this field can be used in
* idFieldNames
when that write operation is present as a destination option.
* @return Returns a reference to this object so that method calls can be chained together.
* @see WriteOperationType
*/
public DestinationFieldProperties withSupportedWriteOperations(java.util.Collection supportedWriteOperations) {
setSupportedWriteOperations(supportedWriteOperations);
return this;
}
/**
*
* A list of supported write operations. For each write operation listed, this field can be used in
* idFieldNames
when that write operation is present as a destination option.
*
*
* @param supportedWriteOperations
* A list of supported write operations. For each write operation listed, this field can be used in
* idFieldNames
when that write operation is present as a destination option.
* @return Returns a reference to this object so that method calls can be chained together.
* @see WriteOperationType
*/
public DestinationFieldProperties withSupportedWriteOperations(WriteOperationType... supportedWriteOperations) {
java.util.ArrayList supportedWriteOperationsCopy = new java.util.ArrayList(supportedWriteOperations.length);
for (WriteOperationType value : supportedWriteOperations) {
supportedWriteOperationsCopy.add(value.toString());
}
if (getSupportedWriteOperations() == null) {
setSupportedWriteOperations(supportedWriteOperationsCopy);
} else {
getSupportedWriteOperations().addAll(supportedWriteOperationsCopy);
}
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 (getIsCreatable() != null)
sb.append("IsCreatable: ").append(getIsCreatable()).append(",");
if (getIsNullable() != null)
sb.append("IsNullable: ").append(getIsNullable()).append(",");
if (getIsUpsertable() != null)
sb.append("IsUpsertable: ").append(getIsUpsertable()).append(",");
if (getIsUpdatable() != null)
sb.append("IsUpdatable: ").append(getIsUpdatable()).append(",");
if (getIsDefaultedOnCreate() != null)
sb.append("IsDefaultedOnCreate: ").append(getIsDefaultedOnCreate()).append(",");
if (getSupportedWriteOperations() != null)
sb.append("SupportedWriteOperations: ").append(getSupportedWriteOperations());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof DestinationFieldProperties == false)
return false;
DestinationFieldProperties other = (DestinationFieldProperties) obj;
if (other.getIsCreatable() == null ^ this.getIsCreatable() == null)
return false;
if (other.getIsCreatable() != null && other.getIsCreatable().equals(this.getIsCreatable()) == false)
return false;
if (other.getIsNullable() == null ^ this.getIsNullable() == null)
return false;
if (other.getIsNullable() != null && other.getIsNullable().equals(this.getIsNullable()) == false)
return false;
if (other.getIsUpsertable() == null ^ this.getIsUpsertable() == null)
return false;
if (other.getIsUpsertable() != null && other.getIsUpsertable().equals(this.getIsUpsertable()) == false)
return false;
if (other.getIsUpdatable() == null ^ this.getIsUpdatable() == null)
return false;
if (other.getIsUpdatable() != null && other.getIsUpdatable().equals(this.getIsUpdatable()) == false)
return false;
if (other.getIsDefaultedOnCreate() == null ^ this.getIsDefaultedOnCreate() == null)
return false;
if (other.getIsDefaultedOnCreate() != null && other.getIsDefaultedOnCreate().equals(this.getIsDefaultedOnCreate()) == false)
return false;
if (other.getSupportedWriteOperations() == null ^ this.getSupportedWriteOperations() == null)
return false;
if (other.getSupportedWriteOperations() != null && other.getSupportedWriteOperations().equals(this.getSupportedWriteOperations()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getIsCreatable() == null) ? 0 : getIsCreatable().hashCode());
hashCode = prime * hashCode + ((getIsNullable() == null) ? 0 : getIsNullable().hashCode());
hashCode = prime * hashCode + ((getIsUpsertable() == null) ? 0 : getIsUpsertable().hashCode());
hashCode = prime * hashCode + ((getIsUpdatable() == null) ? 0 : getIsUpdatable().hashCode());
hashCode = prime * hashCode + ((getIsDefaultedOnCreate() == null) ? 0 : getIsDefaultedOnCreate().hashCode());
hashCode = prime * hashCode + ((getSupportedWriteOperations() == null) ? 0 : getSupportedWriteOperations().hashCode());
return hashCode;
}
@Override
public DestinationFieldProperties clone() {
try {
return (DestinationFieldProperties) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
@com.amazonaws.annotation.SdkInternalApi
@Override
public void marshall(ProtocolMarshaller protocolMarshaller) {
com.amazonaws.services.appflow.model.transform.DestinationFieldPropertiesMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}