/* * 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 Iceberg data source where Iceberg tables are stored in Amazon S3. *

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

* One or more Amazon S3 paths that contains Iceberg metadata folders as s3://bucket/prefix. *

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

* The name of the connection to use to connect to the Iceberg target. *

*/ 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 Iceberg metadata folder in * your Amazon S3 path. Used to limit the crawler run time. *

*/ private Integer maximumTraversalDepth; /** *

* One or more Amazon S3 paths that contains Iceberg metadata folders as s3://bucket/prefix. *

* * @return One or more Amazon S3 paths that contains Iceberg metadata folders as s3://bucket/prefix. */ public java.util.List getPaths() { return paths; } /** *

* One or more Amazon S3 paths that contains Iceberg metadata folders as s3://bucket/prefix. *

* * @param paths * One or more Amazon S3 paths that contains Iceberg metadata folders as s3://bucket/prefix. */ public void setPaths(java.util.Collection paths) { if (paths == null) { this.paths = null; return; } this.paths = new java.util.ArrayList(paths); } /** *

* One or more Amazon S3 paths that contains Iceberg metadata folders as s3://bucket/prefix. *

*

* 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 * One or more Amazon S3 paths that contains Iceberg metadata folders as s3://bucket/prefix. * @return Returns a reference to this object so that method calls can be chained together. */ public IcebergTarget withPaths(String... paths) { if (this.paths == null) { setPaths(new java.util.ArrayList(paths.length)); } for (String ele : paths) { this.paths.add(ele); } return this; } /** *

* One or more Amazon S3 paths that contains Iceberg metadata folders as s3://bucket/prefix. *

* * @param paths * One or more Amazon S3 paths that contains Iceberg metadata folders as s3://bucket/prefix. * @return Returns a reference to this object so that method calls can be chained together. */ public IcebergTarget withPaths(java.util.Collection paths) { setPaths(paths); return this; } /** *

* The name of the connection to use to connect to the Iceberg target. *

* * @param connectionName * The name of the connection to use to connect to the Iceberg target. */ public void setConnectionName(String connectionName) { this.connectionName = connectionName; } /** *

* The name of the connection to use to connect to the Iceberg target. *

* * @return The name of the connection to use to connect to the Iceberg target. */ public String getConnectionName() { return this.connectionName; } /** *

* The name of the connection to use to connect to the Iceberg target. *

* * @param connectionName * The name of the connection to use to connect to the Iceberg target. * @return Returns a reference to this object so that method calls can be chained together. */ public IcebergTarget 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 IcebergTarget 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 IcebergTarget withExclusions(java.util.Collection exclusions) { setExclusions(exclusions); return this; } /** *

* The maximum depth of Amazon S3 paths that the crawler can traverse to discover the Iceberg 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 Iceberg 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 Iceberg 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 Iceberg 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 Iceberg 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 Iceberg 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 IcebergTarget 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 IcebergTarget == false) return false; IcebergTarget other = (IcebergTarget) 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 IcebergTarget clone() { try { return (IcebergTarget) 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.IcebergTargetMarshaller.getInstance().marshall(this, protocolMarshaller); } }