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

com.amazonaws.services.textract.model.CreateAdapterRequest Maven / Gradle / Ivy

Go to download

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

There is a newer version: 1.12.780
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.textract.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 CreateAdapterRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {

    /**
     * 

* The name to be assigned to the adapter being created. *

*/ private String adapterName; /** *

* Idempotent token is used to recognize the request. If the same token is used with multiple CreateAdapter * requests, the same session is returned. This token is employed to avoid unintentionally creating the same session * multiple times. *

*/ private String clientRequestToken; /** *

* The description to be assigned to the adapter being created. *

*/ private String description; /** *

* The type of feature that the adapter is being trained on. Currrenly, supported feature types are: * QUERIES *

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

* Controls whether or not the adapter should automatically update. *

*/ private String autoUpdate; /** *

* A list of tags to be added to the adapter. *

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

* The name to be assigned to the adapter being created. *

* * @param adapterName * The name to be assigned to the adapter being created. */ public void setAdapterName(String adapterName) { this.adapterName = adapterName; } /** *

* The name to be assigned to the adapter being created. *

* * @return The name to be assigned to the adapter being created. */ public String getAdapterName() { return this.adapterName; } /** *

* The name to be assigned to the adapter being created. *

* * @param adapterName * The name to be assigned to the adapter being created. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateAdapterRequest withAdapterName(String adapterName) { setAdapterName(adapterName); return this; } /** *

* Idempotent token is used to recognize the request. If the same token is used with multiple CreateAdapter * requests, the same session is returned. This token is employed to avoid unintentionally creating the same session * multiple times. *

* * @param clientRequestToken * Idempotent token is used to recognize the request. If the same token is used with multiple CreateAdapter * requests, the same session is returned. This token is employed to avoid unintentionally creating the same * session multiple times. */ public void setClientRequestToken(String clientRequestToken) { this.clientRequestToken = clientRequestToken; } /** *

* Idempotent token is used to recognize the request. If the same token is used with multiple CreateAdapter * requests, the same session is returned. This token is employed to avoid unintentionally creating the same session * multiple times. *

* * @return Idempotent token is used to recognize the request. If the same token is used with multiple CreateAdapter * requests, the same session is returned. This token is employed to avoid unintentionally creating the same * session multiple times. */ public String getClientRequestToken() { return this.clientRequestToken; } /** *

* Idempotent token is used to recognize the request. If the same token is used with multiple CreateAdapter * requests, the same session is returned. This token is employed to avoid unintentionally creating the same session * multiple times. *

* * @param clientRequestToken * Idempotent token is used to recognize the request. If the same token is used with multiple CreateAdapter * requests, the same session is returned. This token is employed to avoid unintentionally creating the same * session multiple times. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateAdapterRequest withClientRequestToken(String clientRequestToken) { setClientRequestToken(clientRequestToken); return this; } /** *

* The description to be assigned to the adapter being created. *

* * @param description * The description to be assigned to the adapter being created. */ public void setDescription(String description) { this.description = description; } /** *

* The description to be assigned to the adapter being created. *

* * @return The description to be assigned to the adapter being created. */ public String getDescription() { return this.description; } /** *

* The description to be assigned to the adapter being created. *

* * @param description * The description to be assigned to the adapter being created. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateAdapterRequest withDescription(String description) { setDescription(description); return this; } /** *

* The type of feature that the adapter is being trained on. Currrenly, supported feature types are: * QUERIES *

* * @return The type of feature that the adapter is being trained on. Currrenly, supported feature types are: * QUERIES * @see FeatureType */ public java.util.List getFeatureTypes() { return featureTypes; } /** *

* The type of feature that the adapter is being trained on. Currrenly, supported feature types are: * QUERIES *

* * @param featureTypes * The type of feature that the adapter is being trained on. Currrenly, supported feature types are: * QUERIES * @see FeatureType */ public void setFeatureTypes(java.util.Collection featureTypes) { if (featureTypes == null) { this.featureTypes = null; return; } this.featureTypes = new java.util.ArrayList(featureTypes); } /** *

* The type of feature that the adapter is being trained on. Currrenly, supported feature types are: * QUERIES *

*

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

* * @param featureTypes * The type of feature that the adapter is being trained on. Currrenly, supported feature types are: * QUERIES * @return Returns a reference to this object so that method calls can be chained together. * @see FeatureType */ public CreateAdapterRequest withFeatureTypes(String... featureTypes) { if (this.featureTypes == null) { setFeatureTypes(new java.util.ArrayList(featureTypes.length)); } for (String ele : featureTypes) { this.featureTypes.add(ele); } return this; } /** *

* The type of feature that the adapter is being trained on. Currrenly, supported feature types are: * QUERIES *

* * @param featureTypes * The type of feature that the adapter is being trained on. Currrenly, supported feature types are: * QUERIES * @return Returns a reference to this object so that method calls can be chained together. * @see FeatureType */ public CreateAdapterRequest withFeatureTypes(java.util.Collection featureTypes) { setFeatureTypes(featureTypes); return this; } /** *

* The type of feature that the adapter is being trained on. Currrenly, supported feature types are: * QUERIES *

* * @param featureTypes * The type of feature that the adapter is being trained on. Currrenly, supported feature types are: * QUERIES * @return Returns a reference to this object so that method calls can be chained together. * @see FeatureType */ public CreateAdapterRequest withFeatureTypes(FeatureType... featureTypes) { java.util.ArrayList featureTypesCopy = new java.util.ArrayList(featureTypes.length); for (FeatureType value : featureTypes) { featureTypesCopy.add(value.toString()); } if (getFeatureTypes() == null) { setFeatureTypes(featureTypesCopy); } else { getFeatureTypes().addAll(featureTypesCopy); } return this; } /** *

* Controls whether or not the adapter should automatically update. *

* * @param autoUpdate * Controls whether or not the adapter should automatically update. * @see AutoUpdate */ public void setAutoUpdate(String autoUpdate) { this.autoUpdate = autoUpdate; } /** *

* Controls whether or not the adapter should automatically update. *

* * @return Controls whether or not the adapter should automatically update. * @see AutoUpdate */ public String getAutoUpdate() { return this.autoUpdate; } /** *

* Controls whether or not the adapter should automatically update. *

* * @param autoUpdate * Controls whether or not the adapter should automatically update. * @return Returns a reference to this object so that method calls can be chained together. * @see AutoUpdate */ public CreateAdapterRequest withAutoUpdate(String autoUpdate) { setAutoUpdate(autoUpdate); return this; } /** *

* Controls whether or not the adapter should automatically update. *

* * @param autoUpdate * Controls whether or not the adapter should automatically update. * @return Returns a reference to this object so that method calls can be chained together. * @see AutoUpdate */ public CreateAdapterRequest withAutoUpdate(AutoUpdate autoUpdate) { this.autoUpdate = autoUpdate.toString(); return this; } /** *

* A list of tags to be added to the adapter. *

* * @return A list of tags to be added to the adapter. */ public java.util.Map getTags() { return tags; } /** *

* A list of tags to be added to the adapter. *

* * @param tags * A list of tags to be added to the adapter. */ public void setTags(java.util.Map tags) { this.tags = tags; } /** *

* A list of tags to be added to the adapter. *

* * @param tags * A list of tags to be added to the adapter. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateAdapterRequest withTags(java.util.Map tags) { setTags(tags); return this; } /** * Add a single Tags entry * * @see CreateAdapterRequest#withTags * @returns a reference to this object so that method calls can be chained together. */ public CreateAdapterRequest addTagsEntry(String key, String value) { if (null == this.tags) { this.tags = new java.util.HashMap(); } if (this.tags.containsKey(key)) throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided."); this.tags.put(key, value); return this; } /** * Removes all the entries added into Tags. * * @return Returns a reference to this object so that method calls can be chained together. */ public CreateAdapterRequest clearTagsEntries() { this.tags = null; 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 (getAdapterName() != null) sb.append("AdapterName: ").append(getAdapterName()).append(","); if (getClientRequestToken() != null) sb.append("ClientRequestToken: ").append(getClientRequestToken()).append(","); if (getDescription() != null) sb.append("Description: ").append(getDescription()).append(","); if (getFeatureTypes() != null) sb.append("FeatureTypes: ").append(getFeatureTypes()).append(","); if (getAutoUpdate() != null) sb.append("AutoUpdate: ").append(getAutoUpdate()).append(","); if (getTags() != null) sb.append("Tags: ").append(getTags()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateAdapterRequest == false) return false; CreateAdapterRequest other = (CreateAdapterRequest) obj; if (other.getAdapterName() == null ^ this.getAdapterName() == null) return false; if (other.getAdapterName() != null && other.getAdapterName().equals(this.getAdapterName()) == false) return false; if (other.getClientRequestToken() == null ^ this.getClientRequestToken() == null) return false; if (other.getClientRequestToken() != null && other.getClientRequestToken().equals(this.getClientRequestToken()) == false) return false; if (other.getDescription() == null ^ this.getDescription() == null) return false; if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false) return false; if (other.getFeatureTypes() == null ^ this.getFeatureTypes() == null) return false; if (other.getFeatureTypes() != null && other.getFeatureTypes().equals(this.getFeatureTypes()) == false) return false; if (other.getAutoUpdate() == null ^ this.getAutoUpdate() == null) return false; if (other.getAutoUpdate() != null && other.getAutoUpdate().equals(this.getAutoUpdate()) == false) return false; if (other.getTags() == null ^ this.getTags() == null) return false; if (other.getTags() != null && other.getTags().equals(this.getTags()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAdapterName() == null) ? 0 : getAdapterName().hashCode()); hashCode = prime * hashCode + ((getClientRequestToken() == null) ? 0 : getClientRequestToken().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getFeatureTypes() == null) ? 0 : getFeatureTypes().hashCode()); hashCode = prime * hashCode + ((getAutoUpdate() == null) ? 0 : getAutoUpdate().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); return hashCode; } @Override public CreateAdapterRequest clone() { return (CreateAdapterRequest) super.clone(); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy