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

com.amazonaws.services.lakeformation.model.Resource Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS Lake Formation module holds the client classes that are used for communicating with AWS Lake Formation 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.lakeformation.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* A structure for the resource. *

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

* The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata * store. It contains database definitions, table definitions, and other control information to manage your Lake * Formation environment. *

*/ private CatalogResource catalog; /** *

* The database for the resource. Unique to the Data Catalog. A database is a set of associated table definitions * organized into a logical group. You can Grant and Revoke database permissions to a principal. *

*/ private DatabaseResource database; /** *

* The table for the resource. A table is a metadata definition that represents your data. You can Grant and Revoke * table privileges to a principal. *

*/ private TableResource table; /** *

* The table with columns for the resource. A principal with permissions to this resource can select metadata from * the columns of a table in the Data Catalog and the underlying data in Amazon S3. *

*/ private TableWithColumnsResource tableWithColumns; /** *

* The location of an Amazon S3 path where permissions are granted or revoked. *

*/ private DataLocationResource dataLocation; /** *

* A data cell filter. *

*/ private DataCellsFilterResource dataCellsFilter; /** *

* The LF-tag key and values attached to a resource. *

*/ private LFTagKeyResource lFTag; /** *

* A list of LF-tag conditions that define a resource's LF-tag policy. *

*/ private LFTagPolicyResource lFTagPolicy; /** *

* The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata * store. It contains database definitions, table definitions, and other control information to manage your Lake * Formation environment. *

* * @param catalog * The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent * metadata store. It contains database definitions, table definitions, and other control information to * manage your Lake Formation environment. */ public void setCatalog(CatalogResource catalog) { this.catalog = catalog; } /** *

* The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata * store. It contains database definitions, table definitions, and other control information to manage your Lake * Formation environment. *

* * @return The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent * metadata store. It contains database definitions, table definitions, and other control information to * manage your Lake Formation environment. */ public CatalogResource getCatalog() { return this.catalog; } /** *

* The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata * store. It contains database definitions, table definitions, and other control information to manage your Lake * Formation environment. *

* * @param catalog * The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent * metadata store. It contains database definitions, table definitions, and other control information to * manage your Lake Formation environment. * @return Returns a reference to this object so that method calls can be chained together. */ public Resource withCatalog(CatalogResource catalog) { setCatalog(catalog); return this; } /** *

* The database for the resource. Unique to the Data Catalog. A database is a set of associated table definitions * organized into a logical group. You can Grant and Revoke database permissions to a principal. *

* * @param database * The database for the resource. Unique to the Data Catalog. A database is a set of associated table * definitions organized into a logical group. You can Grant and Revoke database permissions to a principal. */ public void setDatabase(DatabaseResource database) { this.database = database; } /** *

* The database for the resource. Unique to the Data Catalog. A database is a set of associated table definitions * organized into a logical group. You can Grant and Revoke database permissions to a principal. *

* * @return The database for the resource. Unique to the Data Catalog. A database is a set of associated table * definitions organized into a logical group. You can Grant and Revoke database permissions to a principal. */ public DatabaseResource getDatabase() { return this.database; } /** *

* The database for the resource. Unique to the Data Catalog. A database is a set of associated table definitions * organized into a logical group. You can Grant and Revoke database permissions to a principal. *

* * @param database * The database for the resource. Unique to the Data Catalog. A database is a set of associated table * definitions organized into a logical group. You can Grant and Revoke database permissions to a principal. * @return Returns a reference to this object so that method calls can be chained together. */ public Resource withDatabase(DatabaseResource database) { setDatabase(database); return this; } /** *

* The table for the resource. A table is a metadata definition that represents your data. You can Grant and Revoke * table privileges to a principal. *

* * @param table * The table for the resource. A table is a metadata definition that represents your data. You can Grant and * Revoke table privileges to a principal. */ public void setTable(TableResource table) { this.table = table; } /** *

* The table for the resource. A table is a metadata definition that represents your data. You can Grant and Revoke * table privileges to a principal. *

* * @return The table for the resource. A table is a metadata definition that represents your data. You can Grant and * Revoke table privileges to a principal. */ public TableResource getTable() { return this.table; } /** *

* The table for the resource. A table is a metadata definition that represents your data. You can Grant and Revoke * table privileges to a principal. *

* * @param table * The table for the resource. A table is a metadata definition that represents your data. You can Grant and * Revoke table privileges to a principal. * @return Returns a reference to this object so that method calls can be chained together. */ public Resource withTable(TableResource table) { setTable(table); return this; } /** *

* The table with columns for the resource. A principal with permissions to this resource can select metadata from * the columns of a table in the Data Catalog and the underlying data in Amazon S3. *

* * @param tableWithColumns * The table with columns for the resource. A principal with permissions to this resource can select metadata * from the columns of a table in the Data Catalog and the underlying data in Amazon S3. */ public void setTableWithColumns(TableWithColumnsResource tableWithColumns) { this.tableWithColumns = tableWithColumns; } /** *

* The table with columns for the resource. A principal with permissions to this resource can select metadata from * the columns of a table in the Data Catalog and the underlying data in Amazon S3. *

* * @return The table with columns for the resource. A principal with permissions to this resource can select * metadata from the columns of a table in the Data Catalog and the underlying data in Amazon S3. */ public TableWithColumnsResource getTableWithColumns() { return this.tableWithColumns; } /** *

* The table with columns for the resource. A principal with permissions to this resource can select metadata from * the columns of a table in the Data Catalog and the underlying data in Amazon S3. *

* * @param tableWithColumns * The table with columns for the resource. A principal with permissions to this resource can select metadata * from the columns of a table in the Data Catalog and the underlying data in Amazon S3. * @return Returns a reference to this object so that method calls can be chained together. */ public Resource withTableWithColumns(TableWithColumnsResource tableWithColumns) { setTableWithColumns(tableWithColumns); return this; } /** *

* The location of an Amazon S3 path where permissions are granted or revoked. *

* * @param dataLocation * The location of an Amazon S3 path where permissions are granted or revoked. */ public void setDataLocation(DataLocationResource dataLocation) { this.dataLocation = dataLocation; } /** *

* The location of an Amazon S3 path where permissions are granted or revoked. *

* * @return The location of an Amazon S3 path where permissions are granted or revoked. */ public DataLocationResource getDataLocation() { return this.dataLocation; } /** *

* The location of an Amazon S3 path where permissions are granted or revoked. *

* * @param dataLocation * The location of an Amazon S3 path where permissions are granted or revoked. * @return Returns a reference to this object so that method calls can be chained together. */ public Resource withDataLocation(DataLocationResource dataLocation) { setDataLocation(dataLocation); return this; } /** *

* A data cell filter. *

* * @param dataCellsFilter * A data cell filter. */ public void setDataCellsFilter(DataCellsFilterResource dataCellsFilter) { this.dataCellsFilter = dataCellsFilter; } /** *

* A data cell filter. *

* * @return A data cell filter. */ public DataCellsFilterResource getDataCellsFilter() { return this.dataCellsFilter; } /** *

* A data cell filter. *

* * @param dataCellsFilter * A data cell filter. * @return Returns a reference to this object so that method calls can be chained together. */ public Resource withDataCellsFilter(DataCellsFilterResource dataCellsFilter) { setDataCellsFilter(dataCellsFilter); return this; } /** *

* The LF-tag key and values attached to a resource. *

* * @param lFTag * The LF-tag key and values attached to a resource. */ public void setLFTag(LFTagKeyResource lFTag) { this.lFTag = lFTag; } /** *

* The LF-tag key and values attached to a resource. *

* * @return The LF-tag key and values attached to a resource. */ public LFTagKeyResource getLFTag() { return this.lFTag; } /** *

* The LF-tag key and values attached to a resource. *

* * @param lFTag * The LF-tag key and values attached to a resource. * @return Returns a reference to this object so that method calls can be chained together. */ public Resource withLFTag(LFTagKeyResource lFTag) { setLFTag(lFTag); return this; } /** *

* A list of LF-tag conditions that define a resource's LF-tag policy. *

* * @param lFTagPolicy * A list of LF-tag conditions that define a resource's LF-tag policy. */ public void setLFTagPolicy(LFTagPolicyResource lFTagPolicy) { this.lFTagPolicy = lFTagPolicy; } /** *

* A list of LF-tag conditions that define a resource's LF-tag policy. *

* * @return A list of LF-tag conditions that define a resource's LF-tag policy. */ public LFTagPolicyResource getLFTagPolicy() { return this.lFTagPolicy; } /** *

* A list of LF-tag conditions that define a resource's LF-tag policy. *

* * @param lFTagPolicy * A list of LF-tag conditions that define a resource's LF-tag policy. * @return Returns a reference to this object so that method calls can be chained together. */ public Resource withLFTagPolicy(LFTagPolicyResource lFTagPolicy) { setLFTagPolicy(lFTagPolicy); 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 (getCatalog() != null) sb.append("Catalog: ").append(getCatalog()).append(","); if (getDatabase() != null) sb.append("Database: ").append(getDatabase()).append(","); if (getTable() != null) sb.append("Table: ").append(getTable()).append(","); if (getTableWithColumns() != null) sb.append("TableWithColumns: ").append(getTableWithColumns()).append(","); if (getDataLocation() != null) sb.append("DataLocation: ").append(getDataLocation()).append(","); if (getDataCellsFilter() != null) sb.append("DataCellsFilter: ").append(getDataCellsFilter()).append(","); if (getLFTag() != null) sb.append("LFTag: ").append(getLFTag()).append(","); if (getLFTagPolicy() != null) sb.append("LFTagPolicy: ").append(getLFTagPolicy()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof Resource == false) return false; Resource other = (Resource) obj; if (other.getCatalog() == null ^ this.getCatalog() == null) return false; if (other.getCatalog() != null && other.getCatalog().equals(this.getCatalog()) == false) return false; if (other.getDatabase() == null ^ this.getDatabase() == null) return false; if (other.getDatabase() != null && other.getDatabase().equals(this.getDatabase()) == false) return false; if (other.getTable() == null ^ this.getTable() == null) return false; if (other.getTable() != null && other.getTable().equals(this.getTable()) == false) return false; if (other.getTableWithColumns() == null ^ this.getTableWithColumns() == null) return false; if (other.getTableWithColumns() != null && other.getTableWithColumns().equals(this.getTableWithColumns()) == false) return false; if (other.getDataLocation() == null ^ this.getDataLocation() == null) return false; if (other.getDataLocation() != null && other.getDataLocation().equals(this.getDataLocation()) == false) return false; if (other.getDataCellsFilter() == null ^ this.getDataCellsFilter() == null) return false; if (other.getDataCellsFilter() != null && other.getDataCellsFilter().equals(this.getDataCellsFilter()) == false) return false; if (other.getLFTag() == null ^ this.getLFTag() == null) return false; if (other.getLFTag() != null && other.getLFTag().equals(this.getLFTag()) == false) return false; if (other.getLFTagPolicy() == null ^ this.getLFTagPolicy() == null) return false; if (other.getLFTagPolicy() != null && other.getLFTagPolicy().equals(this.getLFTagPolicy()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getCatalog() == null) ? 0 : getCatalog().hashCode()); hashCode = prime * hashCode + ((getDatabase() == null) ? 0 : getDatabase().hashCode()); hashCode = prime * hashCode + ((getTable() == null) ? 0 : getTable().hashCode()); hashCode = prime * hashCode + ((getTableWithColumns() == null) ? 0 : getTableWithColumns().hashCode()); hashCode = prime * hashCode + ((getDataLocation() == null) ? 0 : getDataLocation().hashCode()); hashCode = prime * hashCode + ((getDataCellsFilter() == null) ? 0 : getDataCellsFilter().hashCode()); hashCode = prime * hashCode + ((getLFTag() == null) ? 0 : getLFTag().hashCode()); hashCode = prime * hashCode + ((getLFTagPolicy() == null) ? 0 : getLFTagPolicy().hashCode()); return hashCode; } @Override public Resource clone() { try { return (Resource) 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.lakeformation.model.transform.ResourceMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy