/* * 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.glue.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *

* Specifies an Apache Hudi data source. *

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

* An array of Amazon S3 location strings for Hudi, each indicating the root folder with which the metadata files * for a Hudi table resides. The Hudi folder may be located in a child folder of the root folder. *

*

* The crawler will scan all folders underneath a path for a Hudi folder. *

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

* The name of the connection to use to connect to the Hudi target. If your Hudi files are stored in buckets that * require VPC authorization, you can set their connection properties here. *

*/ private String connectionName; /** *

* A list of glob patterns used to exclude from the crawl. For more information, see Catalog Tables with a Crawler. *

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

* The maximum depth of Amazon S3 paths that the crawler can traverse to discover the Hudi metadata folder in your * Amazon S3 path. Used to limit the crawler run time. *

*/ private Integer maximumTraversalDepth; /** *

* An array of Amazon S3 location strings for Hudi, each indicating the root folder with which the metadata files * for a Hudi table resides. The Hudi folder may be located in a child folder of the root folder. *

*

* The crawler will scan all folders underneath a path for a Hudi folder. *

* * @return An array of Amazon S3 location strings for Hudi, each indicating the root folder with which the metadata * files for a Hudi table resides. The Hudi folder may be located in a child folder of the root folder.

*

* The crawler will scan all folders underneath a path for a Hudi folder. */ public java.util.List getPaths() { return paths; } /** *

* An array of Amazon S3 location strings for Hudi, each indicating the root folder with which the metadata files * for a Hudi table resides. The Hudi folder may be located in a child folder of the root folder. *

*

* The crawler will scan all folders underneath a path for a Hudi folder. *

* * @param paths * An array of Amazon S3 location strings for Hudi, each indicating the root folder with which the metadata * files for a Hudi table resides. The Hudi folder may be located in a child folder of the root folder.

*

* The crawler will scan all folders underneath a path for a Hudi folder. */ public void setPaths(java.util.Collection paths) { if (paths == null) { this.paths = null; return; } this.paths = new java.util.ArrayList(paths); } /** *

* An array of Amazon S3 location strings for Hudi, each indicating the root folder with which the metadata files * for a Hudi table resides. The Hudi folder may be located in a child folder of the root folder. *

*

* The crawler will scan all folders underneath a path for a Hudi folder. *

*

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

* * @param paths * An array of Amazon S3 location strings for Hudi, each indicating the root folder with which the metadata * files for a Hudi table resides. The Hudi folder may be located in a child folder of the root folder.

*

* The crawler will scan all folders underneath a path for a Hudi folder. * @return Returns a reference to this object so that method calls can be chained together. */ public HudiTarget withPaths(String... paths) { if (this.paths == null) { setPaths(new java.util.ArrayList(paths.length)); } for (String ele : paths) { this.paths.add(ele); } return this; } /** *

* An array of Amazon S3 location strings for Hudi, each indicating the root folder with which the metadata files * for a Hudi table resides. The Hudi folder may be located in a child folder of the root folder. *

*

* The crawler will scan all folders underneath a path for a Hudi folder. *

* * @param paths * An array of Amazon S3 location strings for Hudi, each indicating the root folder with which the metadata * files for a Hudi table resides. The Hudi folder may be located in a child folder of the root folder.

*

* The crawler will scan all folders underneath a path for a Hudi folder. * @return Returns a reference to this object so that method calls can be chained together. */ public HudiTarget withPaths(java.util.Collection paths) { setPaths(paths); return this; } /** *

* The name of the connection to use to connect to the Hudi target. If your Hudi files are stored in buckets that * require VPC authorization, you can set their connection properties here. *

* * @param connectionName * The name of the connection to use to connect to the Hudi target. If your Hudi files are stored in buckets * that require VPC authorization, you can set their connection properties here. */ public void setConnectionName(String connectionName) { this.connectionName = connectionName; } /** *

* The name of the connection to use to connect to the Hudi target. If your Hudi files are stored in buckets that * require VPC authorization, you can set their connection properties here. *

* * @return The name of the connection to use to connect to the Hudi target. If your Hudi files are stored in buckets * that require VPC authorization, you can set their connection properties here. */ public String getConnectionName() { return this.connectionName; } /** *

* The name of the connection to use to connect to the Hudi target. If your Hudi files are stored in buckets that * require VPC authorization, you can set their connection properties here. *

* * @param connectionName * The name of the connection to use to connect to the Hudi target. If your Hudi files are stored in buckets * that require VPC authorization, you can set their connection properties here. * @return Returns a reference to this object so that method calls can be chained together. */ public HudiTarget withConnectionName(String connectionName) { setConnectionName(connectionName); return this; } /** *

* A list of glob patterns used to exclude from the crawl. For more information, see Catalog Tables with a Crawler. *

* * @return A list of glob patterns used to exclude from the crawl. For more information, see Catalog Tables with a Crawler. */ public java.util.List getExclusions() { return exclusions; } /** *

* A list of glob patterns used to exclude from the crawl. For more information, see Catalog Tables with a Crawler. *

* * @param exclusions * A list of glob patterns used to exclude from the crawl. For more information, see Catalog Tables with a Crawler. */ public void setExclusions(java.util.Collection exclusions) { if (exclusions == null) { this.exclusions = null; return; } this.exclusions = new java.util.ArrayList(exclusions); } /** *

* A list of glob patterns used to exclude from the crawl. For more information, see Catalog Tables with a Crawler. *

*

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

* * @param exclusions * A list of glob patterns used to exclude from the crawl. For more information, see Catalog Tables with a Crawler. * @return Returns a reference to this object so that method calls can be chained together. */ public HudiTarget withExclusions(String... exclusions) { if (this.exclusions == null) { setExclusions(new java.util.ArrayList(exclusions.length)); } for (String ele : exclusions) { this.exclusions.add(ele); } return this; } /** *

* A list of glob patterns used to exclude from the crawl. For more information, see Catalog Tables with a Crawler. *

* * @param exclusions * A list of glob patterns used to exclude from the crawl. For more information, see Catalog Tables with a Crawler. * @return Returns a reference to this object so that method calls can be chained together. */ public HudiTarget withExclusions(java.util.Collection exclusions) { setExclusions(exclusions); return this; } /** *

* The maximum depth of Amazon S3 paths that the crawler can traverse to discover the Hudi metadata folder in your * Amazon S3 path. Used to limit the crawler run time. *

* * @param maximumTraversalDepth * The maximum depth of Amazon S3 paths that the crawler can traverse to discover the Hudi metadata folder in * your Amazon S3 path. Used to limit the crawler run time. */ public void setMaximumTraversalDepth(Integer maximumTraversalDepth) { this.maximumTraversalDepth = maximumTraversalDepth; } /** *

* The maximum depth of Amazon S3 paths that the crawler can traverse to discover the Hudi metadata folder in your * Amazon S3 path. Used to limit the crawler run time. *

* * @return The maximum depth of Amazon S3 paths that the crawler can traverse to discover the Hudi metadata folder * in your Amazon S3 path. Used to limit the crawler run time. */ public Integer getMaximumTraversalDepth() { return this.maximumTraversalDepth; } /** *

* The maximum depth of Amazon S3 paths that the crawler can traverse to discover the Hudi metadata folder in your * Amazon S3 path. Used to limit the crawler run time. *

* * @param maximumTraversalDepth * The maximum depth of Amazon S3 paths that the crawler can traverse to discover the Hudi metadata folder in * your Amazon S3 path. Used to limit the crawler run time. * @return Returns a reference to this object so that method calls can be chained together. */ public HudiTarget withMaximumTraversalDepth(Integer maximumTraversalDepth) { setMaximumTraversalDepth(maximumTraversalDepth); 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 (getPaths() != null) sb.append("Paths: ").append(getPaths()).append(","); if (getConnectionName() != null) sb.append("ConnectionName: ").append(getConnectionName()).append(","); if (getExclusions() != null) sb.append("Exclusions: ").append(getExclusions()).append(","); if (getMaximumTraversalDepth() != null) sb.append("MaximumTraversalDepth: ").append(getMaximumTraversalDepth()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof HudiTarget == false) return false; HudiTarget other = (HudiTarget) obj; if (other.getPaths() == null ^ this.getPaths() == null) return false; if (other.getPaths() != null && other.getPaths().equals(this.getPaths()) == false) return false; if (other.getConnectionName() == null ^ this.getConnectionName() == null) return false; if (other.getConnectionName() != null && other.getConnectionName().equals(this.getConnectionName()) == false) return false; if (other.getExclusions() == null ^ this.getExclusions() == null) return false; if (other.getExclusions() != null && other.getExclusions().equals(this.getExclusions()) == false) return false; if (other.getMaximumTraversalDepth() == null ^ this.getMaximumTraversalDepth() == null) return false; if (other.getMaximumTraversalDepth() != null && other.getMaximumTraversalDepth().equals(this.getMaximumTraversalDepth()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getPaths() == null) ? 0 : getPaths().hashCode()); hashCode = prime * hashCode + ((getConnectionName() == null) ? 0 : getConnectionName().hashCode()); hashCode = prime * hashCode + ((getExclusions() == null) ? 0 : getExclusions().hashCode()); hashCode = prime * hashCode + ((getMaximumTraversalDepth() == null) ? 0 : getMaximumTraversalDepth().hashCode()); return hashCode; } @Override public HudiTarget clone() { try { return (HudiTarget) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.glue.model.transform.HudiTargetMarshaller.getInstance().marshall(this, protocolMarshaller); } }