com.amazonaws.services.databasemigrationservice.model.EndpointSetting Maven / Gradle / Ivy
Show all versions of aws-java-sdk-dms Show documentation
/*
* Copyright 2017-2022 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.databasemigrationservice.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Endpoint settings.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class EndpointSetting implements Serializable, Cloneable, StructuredPojo {
/**
*
* The name that you want to give the endpoint settings.
*
*/
private String name;
/**
*
* The type of endpoint. Valid values are source
and target
.
*
*/
private String type;
/**
*
* Enumerated values to use for this endpoint.
*
*/
private java.util.List enumValues;
/**
*
* A value that marks this endpoint setting as sensitive.
*
*/
private Boolean sensitive;
/**
*
* The unit of measure for this endpoint setting.
*
*/
private String units;
/**
*
* The relevance or validity of an endpoint setting for an engine name and its endpoint type.
*
*/
private String applicability;
/**
*
* The minimum value of an endpoint setting that is of type int
.
*
*/
private Integer intValueMin;
/**
*
* The maximum value of an endpoint setting that is of type int
.
*
*/
private Integer intValueMax;
/**
*
* The default value of the endpoint setting if no value is specified using CreateEndpoint
or
* ModifyEndpoint
.
*
*/
private String defaultValue;
/**
*
* The name that you want to give the endpoint settings.
*
*
* @param name
* The name that you want to give the endpoint settings.
*/
public void setName(String name) {
this.name = name;
}
/**
*
* The name that you want to give the endpoint settings.
*
*
* @return The name that you want to give the endpoint settings.
*/
public String getName() {
return this.name;
}
/**
*
* The name that you want to give the endpoint settings.
*
*
* @param name
* The name that you want to give the endpoint settings.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public EndpointSetting withName(String name) {
setName(name);
return this;
}
/**
*
* The type of endpoint. Valid values are source
and target
.
*
*
* @param type
* The type of endpoint. Valid values are source
and target
.
* @see EndpointSettingTypeValue
*/
public void setType(String type) {
this.type = type;
}
/**
*
* The type of endpoint. Valid values are source
and target
.
*
*
* @return The type of endpoint. Valid values are source
and target
.
* @see EndpointSettingTypeValue
*/
public String getType() {
return this.type;
}
/**
*
* The type of endpoint. Valid values are source
and target
.
*
*
* @param type
* The type of endpoint. Valid values are source
and target
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see EndpointSettingTypeValue
*/
public EndpointSetting withType(String type) {
setType(type);
return this;
}
/**
*
* The type of endpoint. Valid values are source
and target
.
*
*
* @param type
* The type of endpoint. Valid values are source
and target
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see EndpointSettingTypeValue
*/
public EndpointSetting withType(EndpointSettingTypeValue type) {
this.type = type.toString();
return this;
}
/**
*
* Enumerated values to use for this endpoint.
*
*
* @return Enumerated values to use for this endpoint.
*/
public java.util.List getEnumValues() {
return enumValues;
}
/**
*
* Enumerated values to use for this endpoint.
*
*
* @param enumValues
* Enumerated values to use for this endpoint.
*/
public void setEnumValues(java.util.Collection enumValues) {
if (enumValues == null) {
this.enumValues = null;
return;
}
this.enumValues = new java.util.ArrayList(enumValues);
}
/**
*
* Enumerated values to use for this endpoint.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setEnumValues(java.util.Collection)} or {@link #withEnumValues(java.util.Collection)} if you want to
* override the existing values.
*
*
* @param enumValues
* Enumerated values to use for this endpoint.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public EndpointSetting withEnumValues(String... enumValues) {
if (this.enumValues == null) {
setEnumValues(new java.util.ArrayList(enumValues.length));
}
for (String ele : enumValues) {
this.enumValues.add(ele);
}
return this;
}
/**
*
* Enumerated values to use for this endpoint.
*
*
* @param enumValues
* Enumerated values to use for this endpoint.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public EndpointSetting withEnumValues(java.util.Collection enumValues) {
setEnumValues(enumValues);
return this;
}
/**
*
* A value that marks this endpoint setting as sensitive.
*
*
* @param sensitive
* A value that marks this endpoint setting as sensitive.
*/
public void setSensitive(Boolean sensitive) {
this.sensitive = sensitive;
}
/**
*
* A value that marks this endpoint setting as sensitive.
*
*
* @return A value that marks this endpoint setting as sensitive.
*/
public Boolean getSensitive() {
return this.sensitive;
}
/**
*
* A value that marks this endpoint setting as sensitive.
*
*
* @param sensitive
* A value that marks this endpoint setting as sensitive.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public EndpointSetting withSensitive(Boolean sensitive) {
setSensitive(sensitive);
return this;
}
/**
*
* A value that marks this endpoint setting as sensitive.
*
*
* @return A value that marks this endpoint setting as sensitive.
*/
public Boolean isSensitive() {
return this.sensitive;
}
/**
*
* The unit of measure for this endpoint setting.
*
*
* @param units
* The unit of measure for this endpoint setting.
*/
public void setUnits(String units) {
this.units = units;
}
/**
*
* The unit of measure for this endpoint setting.
*
*
* @return The unit of measure for this endpoint setting.
*/
public String getUnits() {
return this.units;
}
/**
*
* The unit of measure for this endpoint setting.
*
*
* @param units
* The unit of measure for this endpoint setting.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public EndpointSetting withUnits(String units) {
setUnits(units);
return this;
}
/**
*
* The relevance or validity of an endpoint setting for an engine name and its endpoint type.
*
*
* @param applicability
* The relevance or validity of an endpoint setting for an engine name and its endpoint type.
*/
public void setApplicability(String applicability) {
this.applicability = applicability;
}
/**
*
* The relevance or validity of an endpoint setting for an engine name and its endpoint type.
*
*
* @return The relevance or validity of an endpoint setting for an engine name and its endpoint type.
*/
public String getApplicability() {
return this.applicability;
}
/**
*
* The relevance or validity of an endpoint setting for an engine name and its endpoint type.
*
*
* @param applicability
* The relevance or validity of an endpoint setting for an engine name and its endpoint type.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public EndpointSetting withApplicability(String applicability) {
setApplicability(applicability);
return this;
}
/**
*
* The minimum value of an endpoint setting that is of type int
.
*
*
* @param intValueMin
* The minimum value of an endpoint setting that is of type int
.
*/
public void setIntValueMin(Integer intValueMin) {
this.intValueMin = intValueMin;
}
/**
*
* The minimum value of an endpoint setting that is of type int
.
*
*
* @return The minimum value of an endpoint setting that is of type int
.
*/
public Integer getIntValueMin() {
return this.intValueMin;
}
/**
*
* The minimum value of an endpoint setting that is of type int
.
*
*
* @param intValueMin
* The minimum value of an endpoint setting that is of type int
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public EndpointSetting withIntValueMin(Integer intValueMin) {
setIntValueMin(intValueMin);
return this;
}
/**
*
* The maximum value of an endpoint setting that is of type int
.
*
*
* @param intValueMax
* The maximum value of an endpoint setting that is of type int
.
*/
public void setIntValueMax(Integer intValueMax) {
this.intValueMax = intValueMax;
}
/**
*
* The maximum value of an endpoint setting that is of type int
.
*
*
* @return The maximum value of an endpoint setting that is of type int
.
*/
public Integer getIntValueMax() {
return this.intValueMax;
}
/**
*
* The maximum value of an endpoint setting that is of type int
.
*
*
* @param intValueMax
* The maximum value of an endpoint setting that is of type int
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public EndpointSetting withIntValueMax(Integer intValueMax) {
setIntValueMax(intValueMax);
return this;
}
/**
*
* The default value of the endpoint setting if no value is specified using CreateEndpoint
or
* ModifyEndpoint
.
*
*
* @param defaultValue
* The default value of the endpoint setting if no value is specified using CreateEndpoint
or
* ModifyEndpoint
.
*/
public void setDefaultValue(String defaultValue) {
this.defaultValue = defaultValue;
}
/**
*
* The default value of the endpoint setting if no value is specified using CreateEndpoint
or
* ModifyEndpoint
.
*
*
* @return The default value of the endpoint setting if no value is specified using CreateEndpoint
or
* ModifyEndpoint
.
*/
public String getDefaultValue() {
return this.defaultValue;
}
/**
*
* The default value of the endpoint setting if no value is specified using CreateEndpoint
or
* ModifyEndpoint
.
*
*
* @param defaultValue
* The default value of the endpoint setting if no value is specified using CreateEndpoint
or
* ModifyEndpoint
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public EndpointSetting withDefaultValue(String defaultValue) {
setDefaultValue(defaultValue);
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 (getName() != null)
sb.append("Name: ").append(getName()).append(",");
if (getType() != null)
sb.append("Type: ").append(getType()).append(",");
if (getEnumValues() != null)
sb.append("EnumValues: ").append(getEnumValues()).append(",");
if (getSensitive() != null)
sb.append("Sensitive: ").append(getSensitive()).append(",");
if (getUnits() != null)
sb.append("Units: ").append(getUnits()).append(",");
if (getApplicability() != null)
sb.append("Applicability: ").append(getApplicability()).append(",");
if (getIntValueMin() != null)
sb.append("IntValueMin: ").append(getIntValueMin()).append(",");
if (getIntValueMax() != null)
sb.append("IntValueMax: ").append(getIntValueMax()).append(",");
if (getDefaultValue() != null)
sb.append("DefaultValue: ").append(getDefaultValue());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof EndpointSetting == false)
return false;
EndpointSetting other = (EndpointSetting) obj;
if (other.getName() == null ^ this.getName() == null)
return false;
if (other.getName() != null && other.getName().equals(this.getName()) == false)
return false;
if (other.getType() == null ^ this.getType() == null)
return false;
if (other.getType() != null && other.getType().equals(this.getType()) == false)
return false;
if (other.getEnumValues() == null ^ this.getEnumValues() == null)
return false;
if (other.getEnumValues() != null && other.getEnumValues().equals(this.getEnumValues()) == false)
return false;
if (other.getSensitive() == null ^ this.getSensitive() == null)
return false;
if (other.getSensitive() != null && other.getSensitive().equals(this.getSensitive()) == false)
return false;
if (other.getUnits() == null ^ this.getUnits() == null)
return false;
if (other.getUnits() != null && other.getUnits().equals(this.getUnits()) == false)
return false;
if (other.getApplicability() == null ^ this.getApplicability() == null)
return false;
if (other.getApplicability() != null && other.getApplicability().equals(this.getApplicability()) == false)
return false;
if (other.getIntValueMin() == null ^ this.getIntValueMin() == null)
return false;
if (other.getIntValueMin() != null && other.getIntValueMin().equals(this.getIntValueMin()) == false)
return false;
if (other.getIntValueMax() == null ^ this.getIntValueMax() == null)
return false;
if (other.getIntValueMax() != null && other.getIntValueMax().equals(this.getIntValueMax()) == false)
return false;
if (other.getDefaultValue() == null ^ this.getDefaultValue() == null)
return false;
if (other.getDefaultValue() != null && other.getDefaultValue().equals(this.getDefaultValue()) == 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 + ((getType() == null) ? 0 : getType().hashCode());
hashCode = prime * hashCode + ((getEnumValues() == null) ? 0 : getEnumValues().hashCode());
hashCode = prime * hashCode + ((getSensitive() == null) ? 0 : getSensitive().hashCode());
hashCode = prime * hashCode + ((getUnits() == null) ? 0 : getUnits().hashCode());
hashCode = prime * hashCode + ((getApplicability() == null) ? 0 : getApplicability().hashCode());
hashCode = prime * hashCode + ((getIntValueMin() == null) ? 0 : getIntValueMin().hashCode());
hashCode = prime * hashCode + ((getIntValueMax() == null) ? 0 : getIntValueMax().hashCode());
hashCode = prime * hashCode + ((getDefaultValue() == null) ? 0 : getDefaultValue().hashCode());
return hashCode;
}
@Override
public EndpointSetting clone() {
try {
return (EndpointSetting) 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.databasemigrationservice.model.transform.EndpointSettingMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}