com.amazonaws.services.amplifyuibuilder.model.FormButton Maven / Gradle / Ivy
Show all versions of aws-java-sdk-amplifyuibuilder Show documentation
/*
* Copyright 2018-2023 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.amplifyuibuilder.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Describes the configuration for a button UI element that is a part of a form.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class FormButton implements Serializable, Cloneable, StructuredPojo {
/**
*
* Specifies whether the button is visible on the form.
*
*/
private Boolean excluded;
/**
*
* Describes the button's properties.
*
*/
private String children;
/**
*
* The position of the button.
*
*/
private FieldPosition position;
/**
*
* Specifies whether the button is visible on the form.
*
*
* @param excluded
* Specifies whether the button is visible on the form.
*/
public void setExcluded(Boolean excluded) {
this.excluded = excluded;
}
/**
*
* Specifies whether the button is visible on the form.
*
*
* @return Specifies whether the button is visible on the form.
*/
public Boolean getExcluded() {
return this.excluded;
}
/**
*
* Specifies whether the button is visible on the form.
*
*
* @param excluded
* Specifies whether the button is visible on the form.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public FormButton withExcluded(Boolean excluded) {
setExcluded(excluded);
return this;
}
/**
*
* Specifies whether the button is visible on the form.
*
*
* @return Specifies whether the button is visible on the form.
*/
public Boolean isExcluded() {
return this.excluded;
}
/**
*
* Describes the button's properties.
*
*
* @param children
* Describes the button's properties.
*/
public void setChildren(String children) {
this.children = children;
}
/**
*
* Describes the button's properties.
*
*
* @return Describes the button's properties.
*/
public String getChildren() {
return this.children;
}
/**
*
* Describes the button's properties.
*
*
* @param children
* Describes the button's properties.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public FormButton withChildren(String children) {
setChildren(children);
return this;
}
/**
*
* The position of the button.
*
*
* @param position
* The position of the button.
*/
public void setPosition(FieldPosition position) {
this.position = position;
}
/**
*
* The position of the button.
*
*
* @return The position of the button.
*/
public FieldPosition getPosition() {
return this.position;
}
/**
*
* The position of the button.
*
*
* @param position
* The position of the button.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public FormButton withPosition(FieldPosition position) {
setPosition(position);
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 (getExcluded() != null)
sb.append("Excluded: ").append(getExcluded()).append(",");
if (getChildren() != null)
sb.append("Children: ").append(getChildren()).append(",");
if (getPosition() != null)
sb.append("Position: ").append(getPosition());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof FormButton == false)
return false;
FormButton other = (FormButton) obj;
if (other.getExcluded() == null ^ this.getExcluded() == null)
return false;
if (other.getExcluded() != null && other.getExcluded().equals(this.getExcluded()) == false)
return false;
if (other.getChildren() == null ^ this.getChildren() == null)
return false;
if (other.getChildren() != null && other.getChildren().equals(this.getChildren()) == false)
return false;
if (other.getPosition() == null ^ this.getPosition() == null)
return false;
if (other.getPosition() != null && other.getPosition().equals(this.getPosition()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getExcluded() == null) ? 0 : getExcluded().hashCode());
hashCode = prime * hashCode + ((getChildren() == null) ? 0 : getChildren().hashCode());
hashCode = prime * hashCode + ((getPosition() == null) ? 0 : getPosition().hashCode());
return hashCode;
}
@Override
public FormButton clone() {
try {
return (FormButton) 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.amplifyuibuilder.model.transform.FormButtonMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}