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

com.amazonaws.services.clouddirectory.model.CreateIndexRequest Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon CloudDirectory module holds the client classes that are used for communicating with Amazon CloudDirectory Service

The newest version!
/*
 * Copyright 2020-2025 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.clouddirectory.model;

import java.io.Serializable;
import javax.annotation.Generated;

import com.amazonaws.AmazonWebServiceRequest;

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

    /**
     * 

* The ARN of the directory where the index should be created. *

*/ private String directoryArn; /** *

* Specifies the attributes that should be indexed on. Currently only a single attribute is supported. *

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

* Indicates whether the attribute that is being indexed has unique values or not. *

*/ private Boolean isUnique; /** *

* A reference to the parent object that contains the index object. *

*/ private ObjectReference parentReference; /** *

* The name of the link between the parent object and the index object. *

*/ private String linkName; /** *

* The ARN of the directory where the index should be created. *

* * @param directoryArn * The ARN of the directory where the index should be created. */ public void setDirectoryArn(String directoryArn) { this.directoryArn = directoryArn; } /** *

* The ARN of the directory where the index should be created. *

* * @return The ARN of the directory where the index should be created. */ public String getDirectoryArn() { return this.directoryArn; } /** *

* The ARN of the directory where the index should be created. *

* * @param directoryArn * The ARN of the directory where the index should be created. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateIndexRequest withDirectoryArn(String directoryArn) { setDirectoryArn(directoryArn); return this; } /** *

* Specifies the attributes that should be indexed on. Currently only a single attribute is supported. *

* * @return Specifies the attributes that should be indexed on. Currently only a single attribute is supported. */ public java.util.List getOrderedIndexedAttributeList() { return orderedIndexedAttributeList; } /** *

* Specifies the attributes that should be indexed on. Currently only a single attribute is supported. *

* * @param orderedIndexedAttributeList * Specifies the attributes that should be indexed on. Currently only a single attribute is supported. */ public void setOrderedIndexedAttributeList(java.util.Collection orderedIndexedAttributeList) { if (orderedIndexedAttributeList == null) { this.orderedIndexedAttributeList = null; return; } this.orderedIndexedAttributeList = new java.util.ArrayList(orderedIndexedAttributeList); } /** *

* Specifies the attributes that should be indexed on. Currently only a single attribute is supported. *

*

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

* * @param orderedIndexedAttributeList * Specifies the attributes that should be indexed on. Currently only a single attribute is supported. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateIndexRequest withOrderedIndexedAttributeList(AttributeKey... orderedIndexedAttributeList) { if (this.orderedIndexedAttributeList == null) { setOrderedIndexedAttributeList(new java.util.ArrayList(orderedIndexedAttributeList.length)); } for (AttributeKey ele : orderedIndexedAttributeList) { this.orderedIndexedAttributeList.add(ele); } return this; } /** *

* Specifies the attributes that should be indexed on. Currently only a single attribute is supported. *

* * @param orderedIndexedAttributeList * Specifies the attributes that should be indexed on. Currently only a single attribute is supported. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateIndexRequest withOrderedIndexedAttributeList(java.util.Collection orderedIndexedAttributeList) { setOrderedIndexedAttributeList(orderedIndexedAttributeList); return this; } /** *

* Indicates whether the attribute that is being indexed has unique values or not. *

* * @param isUnique * Indicates whether the attribute that is being indexed has unique values or not. */ public void setIsUnique(Boolean isUnique) { this.isUnique = isUnique; } /** *

* Indicates whether the attribute that is being indexed has unique values or not. *

* * @return Indicates whether the attribute that is being indexed has unique values or not. */ public Boolean getIsUnique() { return this.isUnique; } /** *

* Indicates whether the attribute that is being indexed has unique values or not. *

* * @param isUnique * Indicates whether the attribute that is being indexed has unique values or not. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateIndexRequest withIsUnique(Boolean isUnique) { setIsUnique(isUnique); return this; } /** *

* Indicates whether the attribute that is being indexed has unique values or not. *

* * @return Indicates whether the attribute that is being indexed has unique values or not. */ public Boolean isUnique() { return this.isUnique; } /** *

* A reference to the parent object that contains the index object. *

* * @param parentReference * A reference to the parent object that contains the index object. */ public void setParentReference(ObjectReference parentReference) { this.parentReference = parentReference; } /** *

* A reference to the parent object that contains the index object. *

* * @return A reference to the parent object that contains the index object. */ public ObjectReference getParentReference() { return this.parentReference; } /** *

* A reference to the parent object that contains the index object. *

* * @param parentReference * A reference to the parent object that contains the index object. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateIndexRequest withParentReference(ObjectReference parentReference) { setParentReference(parentReference); return this; } /** *

* The name of the link between the parent object and the index object. *

* * @param linkName * The name of the link between the parent object and the index object. */ public void setLinkName(String linkName) { this.linkName = linkName; } /** *

* The name of the link between the parent object and the index object. *

* * @return The name of the link between the parent object and the index object. */ public String getLinkName() { return this.linkName; } /** *

* The name of the link between the parent object and the index object. *

* * @param linkName * The name of the link between the parent object and the index object. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateIndexRequest withLinkName(String linkName) { setLinkName(linkName); 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 (getDirectoryArn() != null) sb.append("DirectoryArn: ").append(getDirectoryArn()).append(","); if (getOrderedIndexedAttributeList() != null) sb.append("OrderedIndexedAttributeList: ").append(getOrderedIndexedAttributeList()).append(","); if (getIsUnique() != null) sb.append("IsUnique: ").append(getIsUnique()).append(","); if (getParentReference() != null) sb.append("ParentReference: ").append(getParentReference()).append(","); if (getLinkName() != null) sb.append("LinkName: ").append(getLinkName()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateIndexRequest == false) return false; CreateIndexRequest other = (CreateIndexRequest) obj; if (other.getDirectoryArn() == null ^ this.getDirectoryArn() == null) return false; if (other.getDirectoryArn() != null && other.getDirectoryArn().equals(this.getDirectoryArn()) == false) return false; if (other.getOrderedIndexedAttributeList() == null ^ this.getOrderedIndexedAttributeList() == null) return false; if (other.getOrderedIndexedAttributeList() != null && other.getOrderedIndexedAttributeList().equals(this.getOrderedIndexedAttributeList()) == false) return false; if (other.getIsUnique() == null ^ this.getIsUnique() == null) return false; if (other.getIsUnique() != null && other.getIsUnique().equals(this.getIsUnique()) == false) return false; if (other.getParentReference() == null ^ this.getParentReference() == null) return false; if (other.getParentReference() != null && other.getParentReference().equals(this.getParentReference()) == false) return false; if (other.getLinkName() == null ^ this.getLinkName() == null) return false; if (other.getLinkName() != null && other.getLinkName().equals(this.getLinkName()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getDirectoryArn() == null) ? 0 : getDirectoryArn().hashCode()); hashCode = prime * hashCode + ((getOrderedIndexedAttributeList() == null) ? 0 : getOrderedIndexedAttributeList().hashCode()); hashCode = prime * hashCode + ((getIsUnique() == null) ? 0 : getIsUnique().hashCode()); hashCode = prime * hashCode + ((getParentReference() == null) ? 0 : getParentReference().hashCode()); hashCode = prime * hashCode + ((getLinkName() == null) ? 0 : getLinkName().hashCode()); return hashCode; } @Override public CreateIndexRequest clone() { return (CreateIndexRequest) super.clone(); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy