/* * 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 binding a component's properties to data. *
* * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class ComponentDataConfiguration implements Serializable, Cloneable, StructuredPojo { /** ** The name of the data model to use to bind data to a component. *
*/ private String model; /** ** Describes how to sort the component's properties. *
*/ private java.util.List* Represents the conditional logic to use when binding data to a component. Use this property to retrieve only a * subset of the data in a collection. *
*/ private Predicate predicate; /** ** A list of IDs to use to bind data to a component. Use this property to bind specifically chosen data, rather than * data retrieved from a query. *
*/ private java.util.List* The name of the data model to use to bind data to a component. *
* * @param model * The name of the data model to use to bind data to a component. */ public void setModel(String model) { this.model = model; } /** ** The name of the data model to use to bind data to a component. *
* * @return The name of the data model to use to bind data to a component. */ public String getModel() { return this.model; } /** ** The name of the data model to use to bind data to a component. *
* * @param model * The name of the data model to use to bind data to a component. * @return Returns a reference to this object so that method calls can be chained together. */ public ComponentDataConfiguration withModel(String model) { setModel(model); return this; } /** ** Describes how to sort the component's properties. *
* * @return Describes how to sort the component's properties. */ public java.util.List* Describes how to sort the component's properties. *
* * @param sort * Describes how to sort the component's properties. */ public void setSort(java.util.Collection* Describes how to sort the component's properties. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setSort(java.util.Collection)} or {@link #withSort(java.util.Collection)} if you want to override the * existing values. *
* * @param sort * Describes how to sort the component's properties. * @return Returns a reference to this object so that method calls can be chained together. */ public ComponentDataConfiguration withSort(SortProperty... sort) { if (this.sort == null) { setSort(new java.util.ArrayList* Describes how to sort the component's properties. *
* * @param sort * Describes how to sort the component's properties. * @return Returns a reference to this object so that method calls can be chained together. */ public ComponentDataConfiguration withSort(java.util.Collection* Represents the conditional logic to use when binding data to a component. Use this property to retrieve only a * subset of the data in a collection. *
* * @param predicate * Represents the conditional logic to use when binding data to a component. Use this property to retrieve * only a subset of the data in a collection. */ public void setPredicate(Predicate predicate) { this.predicate = predicate; } /** ** Represents the conditional logic to use when binding data to a component. Use this property to retrieve only a * subset of the data in a collection. *
* * @return Represents the conditional logic to use when binding data to a component. Use this property to retrieve * only a subset of the data in a collection. */ public Predicate getPredicate() { return this.predicate; } /** ** Represents the conditional logic to use when binding data to a component. Use this property to retrieve only a * subset of the data in a collection. *
* * @param predicate * Represents the conditional logic to use when binding data to a component. Use this property to retrieve * only a subset of the data in a collection. * @return Returns a reference to this object so that method calls can be chained together. */ public ComponentDataConfiguration withPredicate(Predicate predicate) { setPredicate(predicate); return this; } /** ** A list of IDs to use to bind data to a component. Use this property to bind specifically chosen data, rather than * data retrieved from a query. *
* * @return A list of IDs to use to bind data to a component. Use this property to bind specifically chosen data, * rather than data retrieved from a query. */ public java.util.List* A list of IDs to use to bind data to a component. Use this property to bind specifically chosen data, rather than * data retrieved from a query. *
* * @param identifiers * A list of IDs to use to bind data to a component. Use this property to bind specifically chosen data, * rather than data retrieved from a query. */ public void setIdentifiers(java.util.Collection* A list of IDs to use to bind data to a component. Use this property to bind specifically chosen data, rather than * data retrieved from a query. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setIdentifiers(java.util.Collection)} or {@link #withIdentifiers(java.util.Collection)} if you want to * override the existing values. *
* * @param identifiers * A list of IDs to use to bind data to a component. Use this property to bind specifically chosen data, * rather than data retrieved from a query. * @return Returns a reference to this object so that method calls can be chained together. */ public ComponentDataConfiguration withIdentifiers(String... identifiers) { if (this.identifiers == null) { setIdentifiers(new java.util.ArrayList* A list of IDs to use to bind data to a component. Use this property to bind specifically chosen data, rather than * data retrieved from a query. *
* * @param identifiers * A list of IDs to use to bind data to a component. Use this property to bind specifically chosen data, * rather than data retrieved from a query. * @return Returns a reference to this object so that method calls can be chained together. */ public ComponentDataConfiguration withIdentifiers(java.util.Collection