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

com.amazonaws.services.athena.model.CreateDataCatalogRequest Maven / Gradle / Ivy

Go to download

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

The 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.athena.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 CreateDataCatalogRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {

    /**
     * 

* The name of the data catalog to create. The catalog name must be unique for the Amazon Web Services account and * can use a maximum of 127 alphanumeric, underscore, at sign, or hyphen characters. The remainder of the length * constraint of 256 is reserved for use by Athena. *

*/ private String name; /** *

* The type of data catalog to create: LAMBDA for a federated catalog, HIVE for an * external hive metastore, or GLUE for an Glue Data Catalog. *

*/ private String type; /** *

* A description of the data catalog to be created. *

*/ private String description; /** *

* Specifies the Lambda function or functions to use for creating the data catalog. This is a mapping whose values * depend on the catalog type. *

*
    *
  • *

    * For the HIVE data catalog type, use the following syntax. The metadata-function * parameter is required. The sdk-version parameter is optional and defaults to the currently supported * version. *

    *

    * metadata-function=lambda_arn, sdk-version=version_number *

    *
  • *
  • *

    * For the LAMBDA data catalog type, use one of the following sets of required parameters, but not * both. *

    *
      *
    • *

      * If you have one Lambda function that processes metadata and another for reading the actual data, use the * following syntax. Both parameters are required. *

      *

      * metadata-function=lambda_arn, record-function=lambda_arn *

      *
    • *
    • *

      * If you have a composite Lambda function that processes both metadata and data, use the following syntax to * specify your Lambda function. *

      *

      * function=lambda_arn *

      *
    • *
    *
  • *
  • *

    * The GLUE type takes a catalog ID parameter and is required. The catalog_id is * the account ID of the Amazon Web Services account to which the Glue Data Catalog belongs. *

    *

    * catalog-id=catalog_id *

    *
      *
    • *

      * The GLUE data catalog type also applies to the default AwsDataCatalog that already * exists in your account, of which you can have only one and cannot modify. *

      *
    • *
    *
  • *
*/ private java.util.Map parameters; /** *

* A list of comma separated tags to add to the data catalog that is created. *

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

* The name of the data catalog to create. The catalog name must be unique for the Amazon Web Services account and * can use a maximum of 127 alphanumeric, underscore, at sign, or hyphen characters. The remainder of the length * constraint of 256 is reserved for use by Athena. *

* * @param name * The name of the data catalog to create. The catalog name must be unique for the Amazon Web Services * account and can use a maximum of 127 alphanumeric, underscore, at sign, or hyphen characters. The * remainder of the length constraint of 256 is reserved for use by Athena. */ public void setName(String name) { this.name = name; } /** *

* The name of the data catalog to create. The catalog name must be unique for the Amazon Web Services account and * can use a maximum of 127 alphanumeric, underscore, at sign, or hyphen characters. The remainder of the length * constraint of 256 is reserved for use by Athena. *

* * @return The name of the data catalog to create. The catalog name must be unique for the Amazon Web Services * account and can use a maximum of 127 alphanumeric, underscore, at sign, or hyphen characters. The * remainder of the length constraint of 256 is reserved for use by Athena. */ public String getName() { return this.name; } /** *

* The name of the data catalog to create. The catalog name must be unique for the Amazon Web Services account and * can use a maximum of 127 alphanumeric, underscore, at sign, or hyphen characters. The remainder of the length * constraint of 256 is reserved for use by Athena. *

* * @param name * The name of the data catalog to create. The catalog name must be unique for the Amazon Web Services * account and can use a maximum of 127 alphanumeric, underscore, at sign, or hyphen characters. The * remainder of the length constraint of 256 is reserved for use by Athena. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateDataCatalogRequest withName(String name) { setName(name); return this; } /** *

* The type of data catalog to create: LAMBDA for a federated catalog, HIVE for an * external hive metastore, or GLUE for an Glue Data Catalog. *

* * @param type * The type of data catalog to create: LAMBDA for a federated catalog, HIVE for an * external hive metastore, or GLUE for an Glue Data Catalog. * @see DataCatalogType */ public void setType(String type) { this.type = type; } /** *

* The type of data catalog to create: LAMBDA for a federated catalog, HIVE for an * external hive metastore, or GLUE for an Glue Data Catalog. *

* * @return The type of data catalog to create: LAMBDA for a federated catalog, HIVE for an * external hive metastore, or GLUE for an Glue Data Catalog. * @see DataCatalogType */ public String getType() { return this.type; } /** *

* The type of data catalog to create: LAMBDA for a federated catalog, HIVE for an * external hive metastore, or GLUE for an Glue Data Catalog. *

* * @param type * The type of data catalog to create: LAMBDA for a federated catalog, HIVE for an * external hive metastore, or GLUE for an Glue Data Catalog. * @return Returns a reference to this object so that method calls can be chained together. * @see DataCatalogType */ public CreateDataCatalogRequest withType(String type) { setType(type); return this; } /** *

* The type of data catalog to create: LAMBDA for a federated catalog, HIVE for an * external hive metastore, or GLUE for an Glue Data Catalog. *

* * @param type * The type of data catalog to create: LAMBDA for a federated catalog, HIVE for an * external hive metastore, or GLUE for an Glue Data Catalog. * @return Returns a reference to this object so that method calls can be chained together. * @see DataCatalogType */ public CreateDataCatalogRequest withType(DataCatalogType type) { this.type = type.toString(); return this; } /** *

* A description of the data catalog to be created. *

* * @param description * A description of the data catalog to be created. */ public void setDescription(String description) { this.description = description; } /** *

* A description of the data catalog to be created. *

* * @return A description of the data catalog to be created. */ public String getDescription() { return this.description; } /** *

* A description of the data catalog to be created. *

* * @param description * A description of the data catalog to be created. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateDataCatalogRequest withDescription(String description) { setDescription(description); return this; } /** *

* Specifies the Lambda function or functions to use for creating the data catalog. This is a mapping whose values * depend on the catalog type. *

*
    *
  • *

    * For the HIVE data catalog type, use the following syntax. The metadata-function * parameter is required. The sdk-version parameter is optional and defaults to the currently supported * version. *

    *

    * metadata-function=lambda_arn, sdk-version=version_number *

    *
  • *
  • *

    * For the LAMBDA data catalog type, use one of the following sets of required parameters, but not * both. *

    *
      *
    • *

      * If you have one Lambda function that processes metadata and another for reading the actual data, use the * following syntax. Both parameters are required. *

      *

      * metadata-function=lambda_arn, record-function=lambda_arn *

      *
    • *
    • *

      * If you have a composite Lambda function that processes both metadata and data, use the following syntax to * specify your Lambda function. *

      *

      * function=lambda_arn *

      *
    • *
    *
  • *
  • *

    * The GLUE type takes a catalog ID parameter and is required. The catalog_id is * the account ID of the Amazon Web Services account to which the Glue Data Catalog belongs. *

    *

    * catalog-id=catalog_id *

    *
      *
    • *

      * The GLUE data catalog type also applies to the default AwsDataCatalog that already * exists in your account, of which you can have only one and cannot modify. *

      *
    • *
    *
  • *
* * @return Specifies the Lambda function or functions to use for creating the data catalog. This is a mapping whose * values depend on the catalog type.

*
    *
  • *

    * For the HIVE data catalog type, use the following syntax. The metadata-function * parameter is required. The sdk-version parameter is optional and defaults to the currently * supported version. *

    *

    * metadata-function=lambda_arn, sdk-version=version_number *

    *
  • *
  • *

    * For the LAMBDA data catalog type, use one of the following sets of required parameters, but * not both. *

    *
      *
    • *

      * If you have one Lambda function that processes metadata and another for reading the actual data, use the * following syntax. Both parameters are required. *

      *

      * metadata-function=lambda_arn, record-function=lambda_arn *

      *
    • *
    • *

      * If you have a composite Lambda function that processes both metadata and data, use the following syntax * to specify your Lambda function. *

      *

      * function=lambda_arn *

      *
    • *
    *
  • *
  • *

    * The GLUE type takes a catalog ID parameter and is required. The * catalog_id is the account ID of the Amazon Web Services account to which the Glue * Data Catalog belongs. *

    *

    * catalog-id=catalog_id *

    *
      *
    • *

      * The GLUE data catalog type also applies to the default AwsDataCatalog that * already exists in your account, of which you can have only one and cannot modify. *

      *
    • *
    *
  • */ public java.util.Map getParameters() { return parameters; } /** *

    * Specifies the Lambda function or functions to use for creating the data catalog. This is a mapping whose values * depend on the catalog type. *

    *
      *
    • *

      * For the HIVE data catalog type, use the following syntax. The metadata-function * parameter is required. The sdk-version parameter is optional and defaults to the currently supported * version. *

      *

      * metadata-function=lambda_arn, sdk-version=version_number *

      *
    • *
    • *

      * For the LAMBDA data catalog type, use one of the following sets of required parameters, but not * both. *

      *
        *
      • *

        * If you have one Lambda function that processes metadata and another for reading the actual data, use the * following syntax. Both parameters are required. *

        *

        * metadata-function=lambda_arn, record-function=lambda_arn *

        *
      • *
      • *

        * If you have a composite Lambda function that processes both metadata and data, use the following syntax to * specify your Lambda function. *

        *

        * function=lambda_arn *

        *
      • *
      *
    • *
    • *

      * The GLUE type takes a catalog ID parameter and is required. The catalog_id is * the account ID of the Amazon Web Services account to which the Glue Data Catalog belongs. *

      *

      * catalog-id=catalog_id *

      *
        *
      • *

        * The GLUE data catalog type also applies to the default AwsDataCatalog that already * exists in your account, of which you can have only one and cannot modify. *

        *
      • *
      *
    • *
    * * @param parameters * Specifies the Lambda function or functions to use for creating the data catalog. This is a mapping whose * values depend on the catalog type.

    *
      *
    • *

      * For the HIVE data catalog type, use the following syntax. The metadata-function * parameter is required. The sdk-version parameter is optional and defaults to the currently * supported version. *

      *

      * metadata-function=lambda_arn, sdk-version=version_number *

      *
    • *
    • *

      * For the LAMBDA data catalog type, use one of the following sets of required parameters, but * not both. *

      *
        *
      • *

        * If you have one Lambda function that processes metadata and another for reading the actual data, use the * following syntax. Both parameters are required. *

        *

        * metadata-function=lambda_arn, record-function=lambda_arn *

        *
      • *
      • *

        * If you have a composite Lambda function that processes both metadata and data, use the following syntax to * specify your Lambda function. *

        *

        * function=lambda_arn *

        *
      • *
      *
    • *
    • *

      * The GLUE type takes a catalog ID parameter and is required. The * catalog_id is the account ID of the Amazon Web Services account to which the Glue * Data Catalog belongs. *

      *

      * catalog-id=catalog_id *

      *
        *
      • *

        * The GLUE data catalog type also applies to the default AwsDataCatalog that * already exists in your account, of which you can have only one and cannot modify. *

        *
      • *
      *
    • */ public void setParameters(java.util.Map parameters) { this.parameters = parameters; } /** *

      * Specifies the Lambda function or functions to use for creating the data catalog. This is a mapping whose values * depend on the catalog type. *

      *
        *
      • *

        * For the HIVE data catalog type, use the following syntax. The metadata-function * parameter is required. The sdk-version parameter is optional and defaults to the currently supported * version. *

        *

        * metadata-function=lambda_arn, sdk-version=version_number *

        *
      • *
      • *

        * For the LAMBDA data catalog type, use one of the following sets of required parameters, but not * both. *

        *
          *
        • *

          * If you have one Lambda function that processes metadata and another for reading the actual data, use the * following syntax. Both parameters are required. *

          *

          * metadata-function=lambda_arn, record-function=lambda_arn *

          *
        • *
        • *

          * If you have a composite Lambda function that processes both metadata and data, use the following syntax to * specify your Lambda function. *

          *

          * function=lambda_arn *

          *
        • *
        *
      • *
      • *

        * The GLUE type takes a catalog ID parameter and is required. The catalog_id is * the account ID of the Amazon Web Services account to which the Glue Data Catalog belongs. *

        *

        * catalog-id=catalog_id *

        *
          *
        • *

          * The GLUE data catalog type also applies to the default AwsDataCatalog that already * exists in your account, of which you can have only one and cannot modify. *

          *
        • *
        *
      • *
      * * @param parameters * Specifies the Lambda function or functions to use for creating the data catalog. This is a mapping whose * values depend on the catalog type.

      *
        *
      • *

        * For the HIVE data catalog type, use the following syntax. The metadata-function * parameter is required. The sdk-version parameter is optional and defaults to the currently * supported version. *

        *

        * metadata-function=lambda_arn, sdk-version=version_number *

        *
      • *
      • *

        * For the LAMBDA data catalog type, use one of the following sets of required parameters, but * not both. *

        *
          *
        • *

          * If you have one Lambda function that processes metadata and another for reading the actual data, use the * following syntax. Both parameters are required. *

          *

          * metadata-function=lambda_arn, record-function=lambda_arn *

          *
        • *
        • *

          * If you have a composite Lambda function that processes both metadata and data, use the following syntax to * specify your Lambda function. *

          *

          * function=lambda_arn *

          *
        • *
        *
      • *
      • *

        * The GLUE type takes a catalog ID parameter and is required. The * catalog_id is the account ID of the Amazon Web Services account to which the Glue * Data Catalog belongs. *

        *

        * catalog-id=catalog_id *

        *
          *
        • *

          * The GLUE data catalog type also applies to the default AwsDataCatalog that * already exists in your account, of which you can have only one and cannot modify. *

          *
        • *
        *
      • * @return Returns a reference to this object so that method calls can be chained together. */ public CreateDataCatalogRequest withParameters(java.util.Map parameters) { setParameters(parameters); return this; } /** * Add a single Parameters entry * * @see CreateDataCatalogRequest#withParameters * @returns a reference to this object so that method calls can be chained together. */ public CreateDataCatalogRequest addParametersEntry(String key, String value) { if (null == this.parameters) { this.parameters = new java.util.HashMap(); } if (this.parameters.containsKey(key)) throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided."); this.parameters.put(key, value); return this; } /** * Removes all the entries added into Parameters. * * @return Returns a reference to this object so that method calls can be chained together. */ public CreateDataCatalogRequest clearParametersEntries() { this.parameters = null; return this; } /** *

        * A list of comma separated tags to add to the data catalog that is created. *

        * * @return A list of comma separated tags to add to the data catalog that is created. */ public java.util.List getTags() { return tags; } /** *

        * A list of comma separated tags to add to the data catalog that is created. *

        * * @param tags * A list of comma separated tags to add to the data catalog that is created. */ public void setTags(java.util.Collection tags) { if (tags == null) { this.tags = null; return; } this.tags = new java.util.ArrayList(tags); } /** *

        * A list of comma separated tags to add to the data catalog that is created. *

        *

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

        * * @param tags * A list of comma separated tags to add to the data catalog that is created. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateDataCatalogRequest withTags(Tag... tags) { if (this.tags == null) { setTags(new java.util.ArrayList(tags.length)); } for (Tag ele : tags) { this.tags.add(ele); } return this; } /** *

        * A list of comma separated tags to add to the data catalog that is created. *

        * * @param tags * A list of comma separated tags to add to the data catalog that is created. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateDataCatalogRequest withTags(java.util.Collection tags) { setTags(tags); 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 (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getType() != null) sb.append("Type: ").append(getType()).append(","); if (getDescription() != null) sb.append("Description: ").append(getDescription()).append(","); if (getParameters() != null) sb.append("Parameters: ").append(getParameters()).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 CreateDataCatalogRequest == false) return false; CreateDataCatalogRequest other = (CreateDataCatalogRequest) obj; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == 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.getDescription() == null ^ this.getDescription() == null) return false; if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false) return false; if (other.getParameters() == null ^ this.getParameters() == null) return false; if (other.getParameters() != null && other.getParameters().equals(this.getParameters()) == 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 + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getType() == null) ? 0 : getType().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getParameters() == null) ? 0 : getParameters().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); return hashCode; } @Override public CreateDataCatalogRequest clone() { return (CreateDataCatalogRequest) super.clone(); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy