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

com.amazonaws.services.athena.model.UpdateDataCatalogRequest 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 UpdateDataCatalogRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {

    /**
     * 

* The name of the data catalog to update. 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; /** *

* Specifies the type of data catalog to update. Specify LAMBDA for a federated catalog, * HIVE for an external hive metastore, or GLUE for an Glue Data Catalog. *

*/ private String type; /** *

* New or modified text that describes the data catalog. *

*/ private String description; /** *

* Specifies the Lambda function or functions to use for updating 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 *

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

* The name of the data catalog to update. 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 update. 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 update. 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 update. 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 update. 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 update. 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 UpdateDataCatalogRequest withName(String name) { setName(name); return this; } /** *

* Specifies the type of data catalog to update. Specify LAMBDA for a federated catalog, * HIVE for an external hive metastore, or GLUE for an Glue Data Catalog. *

* * @param type * Specifies the type of data catalog to update. Specify 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; } /** *

* Specifies the type of data catalog to update. Specify LAMBDA for a federated catalog, * HIVE for an external hive metastore, or GLUE for an Glue Data Catalog. *

* * @return Specifies the type of data catalog to update. Specify 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; } /** *

* Specifies the type of data catalog to update. Specify LAMBDA for a federated catalog, * HIVE for an external hive metastore, or GLUE for an Glue Data Catalog. *

* * @param type * Specifies the type of data catalog to update. Specify 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 UpdateDataCatalogRequest withType(String type) { setType(type); return this; } /** *

* Specifies the type of data catalog to update. Specify LAMBDA for a federated catalog, * HIVE for an external hive metastore, or GLUE for an Glue Data Catalog. *

* * @param type * Specifies the type of data catalog to update. Specify 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 UpdateDataCatalogRequest withType(DataCatalogType type) { this.type = type.toString(); return this; } /** *

* New or modified text that describes the data catalog. *

* * @param description * New or modified text that describes the data catalog. */ public void setDescription(String description) { this.description = description; } /** *

* New or modified text that describes the data catalog. *

* * @return New or modified text that describes the data catalog. */ public String getDescription() { return this.description; } /** *

* New or modified text that describes the data catalog. *

* * @param description * New or modified text that describes the data catalog. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateDataCatalogRequest withDescription(String description) { setDescription(description); return this; } /** *

* Specifies the Lambda function or functions to use for updating 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 *

      *
    • *
    *
  • *
* * @return Specifies the Lambda function or functions to use for updating 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 *

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

    * Specifies the Lambda function or functions to use for updating 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 *

        *
      • *
      *
    • *
    * * @param parameters * Specifies the Lambda function or functions to use for updating 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 *

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

      * Specifies the Lambda function or functions to use for updating 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 *

          *
        • *
        *
      • *
      * * @param parameters * Specifies the Lambda function or functions to use for updating 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 *

          *
        • *
        *
      • * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateDataCatalogRequest withParameters(java.util.Map parameters) { setParameters(parameters); return this; } /** * Add a single Parameters entry * * @see UpdateDataCatalogRequest#withParameters * @returns a reference to this object so that method calls can be chained together. */ public UpdateDataCatalogRequest 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 UpdateDataCatalogRequest clearParametersEntries() { this.parameters = 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 (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()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof UpdateDataCatalogRequest == false) return false; UpdateDataCatalogRequest other = (UpdateDataCatalogRequest) 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; 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()); return hashCode; } @Override public UpdateDataCatalogRequest clone() { return (UpdateDataCatalogRequest) super.clone(); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy