All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.amplifyuibuilder.model.ComponentProperty Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS Amplify UI Builder module holds the client classes that are used for communicating with AWS Amplify UI Builder Service

There is a newer version: 1.12.772
Show newest version
/*
 * 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.amplifyuibuilder.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* Describes the configuration for all of a component's properties. Use ComponentProperty to specify the * values to render or bind by default. *

* * @see AWS * API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class ComponentProperty implements Serializable, Cloneable, StructuredPojo { /** *

* The value to assign to the component property. *

*/ private String value; /** *

* The information to bind the component property to data at runtime. *

*/ private ComponentPropertyBindingProperties bindingProperties; /** *

* The information to bind the component property to data at runtime. Use this for collection components. *

*/ private ComponentPropertyBindingProperties collectionBindingProperties; /** *

* The default value to assign to the component property. *

*/ private String defaultValue; /** *

* The data model to use to assign a value to the component property. *

*/ private String model; /** *

* The information to bind the component property to form data. *

*/ private java.util.Map bindings; /** *

* An event that occurs in your app. Use this for workflow data binding. *

*/ private String event; /** *

* An authenticated user attribute to use to assign a value to the component property. *

*/ private String userAttribute; /** *

* A list of component properties to concatenate to create the value to assign to this component property. *

*/ private java.util.List concat; /** *

* The conditional expression to use to assign a value to the component property. *

*/ private ComponentConditionProperty condition; /** *

* Specifies whether the user configured the property in Amplify Studio after importing it. *

*/ private Boolean configured; /** *

* The component type. *

*/ private String type; /** *

* The default value assigned to the property when the component is imported into an app. *

*/ private String importedValue; /** *

* The name of the component that is affected by an event. *

*/ private String componentName; /** *

* The name of the component's property that is affected by an event. *

*/ private String property; /** *

* The value to assign to the component property. *

* * @param value * The value to assign to the component property. */ public void setValue(String value) { this.value = value; } /** *

* The value to assign to the component property. *

* * @return The value to assign to the component property. */ public String getValue() { return this.value; } /** *

* The value to assign to the component property. *

* * @param value * The value to assign to the component property. * @return Returns a reference to this object so that method calls can be chained together. */ public ComponentProperty withValue(String value) { setValue(value); return this; } /** *

* The information to bind the component property to data at runtime. *

* * @param bindingProperties * The information to bind the component property to data at runtime. */ public void setBindingProperties(ComponentPropertyBindingProperties bindingProperties) { this.bindingProperties = bindingProperties; } /** *

* The information to bind the component property to data at runtime. *

* * @return The information to bind the component property to data at runtime. */ public ComponentPropertyBindingProperties getBindingProperties() { return this.bindingProperties; } /** *

* The information to bind the component property to data at runtime. *

* * @param bindingProperties * The information to bind the component property to data at runtime. * @return Returns a reference to this object so that method calls can be chained together. */ public ComponentProperty withBindingProperties(ComponentPropertyBindingProperties bindingProperties) { setBindingProperties(bindingProperties); return this; } /** *

* The information to bind the component property to data at runtime. Use this for collection components. *

* * @param collectionBindingProperties * The information to bind the component property to data at runtime. Use this for collection components. */ public void setCollectionBindingProperties(ComponentPropertyBindingProperties collectionBindingProperties) { this.collectionBindingProperties = collectionBindingProperties; } /** *

* The information to bind the component property to data at runtime. Use this for collection components. *

* * @return The information to bind the component property to data at runtime. Use this for collection components. */ public ComponentPropertyBindingProperties getCollectionBindingProperties() { return this.collectionBindingProperties; } /** *

* The information to bind the component property to data at runtime. Use this for collection components. *

* * @param collectionBindingProperties * The information to bind the component property to data at runtime. Use this for collection components. * @return Returns a reference to this object so that method calls can be chained together. */ public ComponentProperty withCollectionBindingProperties(ComponentPropertyBindingProperties collectionBindingProperties) { setCollectionBindingProperties(collectionBindingProperties); return this; } /** *

* The default value to assign to the component property. *

* * @param defaultValue * The default value to assign to the component property. */ public void setDefaultValue(String defaultValue) { this.defaultValue = defaultValue; } /** *

* The default value to assign to the component property. *

* * @return The default value to assign to the component property. */ public String getDefaultValue() { return this.defaultValue; } /** *

* The default value to assign to the component property. *

* * @param defaultValue * The default value to assign to the component property. * @return Returns a reference to this object so that method calls can be chained together. */ public ComponentProperty withDefaultValue(String defaultValue) { setDefaultValue(defaultValue); return this; } /** *

* The data model to use to assign a value to the component property. *

* * @param model * The data model to use to assign a value to the component property. */ public void setModel(String model) { this.model = model; } /** *

* The data model to use to assign a value to the component property. *

* * @return The data model to use to assign a value to the component property. */ public String getModel() { return this.model; } /** *

* The data model to use to assign a value to the component property. *

* * @param model * The data model to use to assign a value to the component property. * @return Returns a reference to this object so that method calls can be chained together. */ public ComponentProperty withModel(String model) { setModel(model); return this; } /** *

* The information to bind the component property to form data. *

* * @return The information to bind the component property to form data. */ public java.util.Map getBindings() { return bindings; } /** *

* The information to bind the component property to form data. *

* * @param bindings * The information to bind the component property to form data. */ public void setBindings(java.util.Map bindings) { this.bindings = bindings; } /** *

* The information to bind the component property to form data. *

* * @param bindings * The information to bind the component property to form data. * @return Returns a reference to this object so that method calls can be chained together. */ public ComponentProperty withBindings(java.util.Map bindings) { setBindings(bindings); return this; } /** * Add a single Bindings entry * * @see ComponentProperty#withBindings * @returns a reference to this object so that method calls can be chained together. */ public ComponentProperty addBindingsEntry(String key, FormBindingElement value) { if (null == this.bindings) { this.bindings = new java.util.HashMap(); } if (this.bindings.containsKey(key)) throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided."); this.bindings.put(key, value); return this; } /** * Removes all the entries added into Bindings. * * @return Returns a reference to this object so that method calls can be chained together. */ public ComponentProperty clearBindingsEntries() { this.bindings = null; return this; } /** *

* An event that occurs in your app. Use this for workflow data binding. *

* * @param event * An event that occurs in your app. Use this for workflow data binding. */ public void setEvent(String event) { this.event = event; } /** *

* An event that occurs in your app. Use this for workflow data binding. *

* * @return An event that occurs in your app. Use this for workflow data binding. */ public String getEvent() { return this.event; } /** *

* An event that occurs in your app. Use this for workflow data binding. *

* * @param event * An event that occurs in your app. Use this for workflow data binding. * @return Returns a reference to this object so that method calls can be chained together. */ public ComponentProperty withEvent(String event) { setEvent(event); return this; } /** *

* An authenticated user attribute to use to assign a value to the component property. *

* * @param userAttribute * An authenticated user attribute to use to assign a value to the component property. */ public void setUserAttribute(String userAttribute) { this.userAttribute = userAttribute; } /** *

* An authenticated user attribute to use to assign a value to the component property. *

* * @return An authenticated user attribute to use to assign a value to the component property. */ public String getUserAttribute() { return this.userAttribute; } /** *

* An authenticated user attribute to use to assign a value to the component property. *

* * @param userAttribute * An authenticated user attribute to use to assign a value to the component property. * @return Returns a reference to this object so that method calls can be chained together. */ public ComponentProperty withUserAttribute(String userAttribute) { setUserAttribute(userAttribute); return this; } /** *

* A list of component properties to concatenate to create the value to assign to this component property. *

* * @return A list of component properties to concatenate to create the value to assign to this component property. */ public java.util.List getConcat() { return concat; } /** *

* A list of component properties to concatenate to create the value to assign to this component property. *

* * @param concat * A list of component properties to concatenate to create the value to assign to this component property. */ public void setConcat(java.util.Collection concat) { if (concat == null) { this.concat = null; return; } this.concat = new java.util.ArrayList(concat); } /** *

* A list of component properties to concatenate to create the value to assign to this component property. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setConcat(java.util.Collection)} or {@link #withConcat(java.util.Collection)} if you want to override the * existing values. *

* * @param concat * A list of component properties to concatenate to create the value to assign to this component property. * @return Returns a reference to this object so that method calls can be chained together. */ public ComponentProperty withConcat(ComponentProperty... concat) { if (this.concat == null) { setConcat(new java.util.ArrayList(concat.length)); } for (ComponentProperty ele : concat) { this.concat.add(ele); } return this; } /** *

* A list of component properties to concatenate to create the value to assign to this component property. *

* * @param concat * A list of component properties to concatenate to create the value to assign to this component property. * @return Returns a reference to this object so that method calls can be chained together. */ public ComponentProperty withConcat(java.util.Collection concat) { setConcat(concat); return this; } /** *

* The conditional expression to use to assign a value to the component property. *

* * @param condition * The conditional expression to use to assign a value to the component property. */ public void setCondition(ComponentConditionProperty condition) { this.condition = condition; } /** *

* The conditional expression to use to assign a value to the component property. *

* * @return The conditional expression to use to assign a value to the component property. */ public ComponentConditionProperty getCondition() { return this.condition; } /** *

* The conditional expression to use to assign a value to the component property. *

* * @param condition * The conditional expression to use to assign a value to the component property. * @return Returns a reference to this object so that method calls can be chained together. */ public ComponentProperty withCondition(ComponentConditionProperty condition) { setCondition(condition); return this; } /** *

* Specifies whether the user configured the property in Amplify Studio after importing it. *

* * @param configured * Specifies whether the user configured the property in Amplify Studio after importing it. */ public void setConfigured(Boolean configured) { this.configured = configured; } /** *

* Specifies whether the user configured the property in Amplify Studio after importing it. *

* * @return Specifies whether the user configured the property in Amplify Studio after importing it. */ public Boolean getConfigured() { return this.configured; } /** *

* Specifies whether the user configured the property in Amplify Studio after importing it. *

* * @param configured * Specifies whether the user configured the property in Amplify Studio after importing it. * @return Returns a reference to this object so that method calls can be chained together. */ public ComponentProperty withConfigured(Boolean configured) { setConfigured(configured); return this; } /** *

* Specifies whether the user configured the property in Amplify Studio after importing it. *

* * @return Specifies whether the user configured the property in Amplify Studio after importing it. */ public Boolean isConfigured() { return this.configured; } /** *

* The component type. *

* * @param type * The component type. */ public void setType(String type) { this.type = type; } /** *

* The component type. *

* * @return The component type. */ public String getType() { return this.type; } /** *

* The component type. *

* * @param type * The component type. * @return Returns a reference to this object so that method calls can be chained together. */ public ComponentProperty withType(String type) { setType(type); return this; } /** *

* The default value assigned to the property when the component is imported into an app. *

* * @param importedValue * The default value assigned to the property when the component is imported into an app. */ public void setImportedValue(String importedValue) { this.importedValue = importedValue; } /** *

* The default value assigned to the property when the component is imported into an app. *

* * @return The default value assigned to the property when the component is imported into an app. */ public String getImportedValue() { return this.importedValue; } /** *

* The default value assigned to the property when the component is imported into an app. *

* * @param importedValue * The default value assigned to the property when the component is imported into an app. * @return Returns a reference to this object so that method calls can be chained together. */ public ComponentProperty withImportedValue(String importedValue) { setImportedValue(importedValue); return this; } /** *

* The name of the component that is affected by an event. *

* * @param componentName * The name of the component that is affected by an event. */ public void setComponentName(String componentName) { this.componentName = componentName; } /** *

* The name of the component that is affected by an event. *

* * @return The name of the component that is affected by an event. */ public String getComponentName() { return this.componentName; } /** *

* The name of the component that is affected by an event. *

* * @param componentName * The name of the component that is affected by an event. * @return Returns a reference to this object so that method calls can be chained together. */ public ComponentProperty withComponentName(String componentName) { setComponentName(componentName); return this; } /** *

* The name of the component's property that is affected by an event. *

* * @param property * The name of the component's property that is affected by an event. */ public void setProperty(String property) { this.property = property; } /** *

* The name of the component's property that is affected by an event. *

* * @return The name of the component's property that is affected by an event. */ public String getProperty() { return this.property; } /** *

* The name of the component's property that is affected by an event. *

* * @param property * The name of the component's property that is affected by an event. * @return Returns a reference to this object so that method calls can be chained together. */ public ComponentProperty withProperty(String property) { setProperty(property); 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 (getValue() != null) sb.append("Value: ").append(getValue()).append(","); if (getBindingProperties() != null) sb.append("BindingProperties: ").append(getBindingProperties()).append(","); if (getCollectionBindingProperties() != null) sb.append("CollectionBindingProperties: ").append(getCollectionBindingProperties()).append(","); if (getDefaultValue() != null) sb.append("DefaultValue: ").append(getDefaultValue()).append(","); if (getModel() != null) sb.append("Model: ").append(getModel()).append(","); if (getBindings() != null) sb.append("Bindings: ").append(getBindings()).append(","); if (getEvent() != null) sb.append("Event: ").append(getEvent()).append(","); if (getUserAttribute() != null) sb.append("UserAttribute: ").append(getUserAttribute()).append(","); if (getConcat() != null) sb.append("Concat: ").append(getConcat()).append(","); if (getCondition() != null) sb.append("Condition: ").append(getCondition()).append(","); if (getConfigured() != null) sb.append("Configured: ").append(getConfigured()).append(","); if (getType() != null) sb.append("Type: ").append(getType()).append(","); if (getImportedValue() != null) sb.append("ImportedValue: ").append(getImportedValue()).append(","); if (getComponentName() != null) sb.append("ComponentName: ").append(getComponentName()).append(","); if (getProperty() != null) sb.append("Property: ").append(getProperty()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ComponentProperty == false) return false; ComponentProperty other = (ComponentProperty) obj; if (other.getValue() == null ^ this.getValue() == null) return false; if (other.getValue() != null && other.getValue().equals(this.getValue()) == false) return false; if (other.getBindingProperties() == null ^ this.getBindingProperties() == null) return false; if (other.getBindingProperties() != null && other.getBindingProperties().equals(this.getBindingProperties()) == false) return false; if (other.getCollectionBindingProperties() == null ^ this.getCollectionBindingProperties() == null) return false; if (other.getCollectionBindingProperties() != null && other.getCollectionBindingProperties().equals(this.getCollectionBindingProperties()) == false) return false; if (other.getDefaultValue() == null ^ this.getDefaultValue() == null) return false; if (other.getDefaultValue() != null && other.getDefaultValue().equals(this.getDefaultValue()) == false) return false; if (other.getModel() == null ^ this.getModel() == null) return false; if (other.getModel() != null && other.getModel().equals(this.getModel()) == false) return false; if (other.getBindings() == null ^ this.getBindings() == null) return false; if (other.getBindings() != null && other.getBindings().equals(this.getBindings()) == false) return false; if (other.getEvent() == null ^ this.getEvent() == null) return false; if (other.getEvent() != null && other.getEvent().equals(this.getEvent()) == false) return false; if (other.getUserAttribute() == null ^ this.getUserAttribute() == null) return false; if (other.getUserAttribute() != null && other.getUserAttribute().equals(this.getUserAttribute()) == false) return false; if (other.getConcat() == null ^ this.getConcat() == null) return false; if (other.getConcat() != null && other.getConcat().equals(this.getConcat()) == false) return false; if (other.getCondition() == null ^ this.getCondition() == null) return false; if (other.getCondition() != null && other.getCondition().equals(this.getCondition()) == false) return false; if (other.getConfigured() == null ^ this.getConfigured() == null) return false; if (other.getConfigured() != null && other.getConfigured().equals(this.getConfigured()) == 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.getImportedValue() == null ^ this.getImportedValue() == null) return false; if (other.getImportedValue() != null && other.getImportedValue().equals(this.getImportedValue()) == false) return false; if (other.getComponentName() == null ^ this.getComponentName() == null) return false; if (other.getComponentName() != null && other.getComponentName().equals(this.getComponentName()) == false) return false; if (other.getProperty() == null ^ this.getProperty() == null) return false; if (other.getProperty() != null && other.getProperty().equals(this.getProperty()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getValue() == null) ? 0 : getValue().hashCode()); hashCode = prime * hashCode + ((getBindingProperties() == null) ? 0 : getBindingProperties().hashCode()); hashCode = prime * hashCode + ((getCollectionBindingProperties() == null) ? 0 : getCollectionBindingProperties().hashCode()); hashCode = prime * hashCode + ((getDefaultValue() == null) ? 0 : getDefaultValue().hashCode()); hashCode = prime * hashCode + ((getModel() == null) ? 0 : getModel().hashCode()); hashCode = prime * hashCode + ((getBindings() == null) ? 0 : getBindings().hashCode()); hashCode = prime * hashCode + ((getEvent() == null) ? 0 : getEvent().hashCode()); hashCode = prime * hashCode + ((getUserAttribute() == null) ? 0 : getUserAttribute().hashCode()); hashCode = prime * hashCode + ((getConcat() == null) ? 0 : getConcat().hashCode()); hashCode = prime * hashCode + ((getCondition() == null) ? 0 : getCondition().hashCode()); hashCode = prime * hashCode + ((getConfigured() == null) ? 0 : getConfigured().hashCode()); hashCode = prime * hashCode + ((getType() == null) ? 0 : getType().hashCode()); hashCode = prime * hashCode + ((getImportedValue() == null) ? 0 : getImportedValue().hashCode()); hashCode = prime * hashCode + ((getComponentName() == null) ? 0 : getComponentName().hashCode()); hashCode = prime * hashCode + ((getProperty() == null) ? 0 : getProperty().hashCode()); return hashCode; } @Override public ComponentProperty clone() { try { return (ComponentProperty) 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.ComponentPropertyMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy