com.amazonaws.services.dataexchange.model.RedshiftDataShareDetails Maven / Gradle / Ivy
Show all versions of aws-java-sdk-dataexchange Show documentation
/*
* 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.dataexchange.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Extra details specific to the affected scope in this Redshift data set.
*
*
* @see AWS API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class RedshiftDataShareDetails implements Serializable, Cloneable, StructuredPojo {
/**
*
* The ARN of the underlying Redshift data share that is being affected by this notification.
*
*/
private String arn;
/**
*
* The database name in the Redshift data share that is being affected by this notification.
*
*/
private String database;
/**
*
* A function name in the Redshift database that is being affected by this notification.
*
*/
private String function;
/**
*
* A table name in the Redshift database that is being affected by this notification.
*
*/
private String table;
/**
*
* A schema name in the Redshift database that is being affected by this notification.
*
*/
private String schema;
/**
*
* A view name in the Redshift database that is being affected by this notification.
*
*/
private String view;
/**
*
* The ARN of the underlying Redshift data share that is being affected by this notification.
*
*
* @param arn
* The ARN of the underlying Redshift data share that is being affected by this notification.
*/
public void setArn(String arn) {
this.arn = arn;
}
/**
*
* The ARN of the underlying Redshift data share that is being affected by this notification.
*
*
* @return The ARN of the underlying Redshift data share that is being affected by this notification.
*/
public String getArn() {
return this.arn;
}
/**
*
* The ARN of the underlying Redshift data share that is being affected by this notification.
*
*
* @param arn
* The ARN of the underlying Redshift data share that is being affected by this notification.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RedshiftDataShareDetails withArn(String arn) {
setArn(arn);
return this;
}
/**
*
* The database name in the Redshift data share that is being affected by this notification.
*
*
* @param database
* The database name in the Redshift data share that is being affected by this notification.
*/
public void setDatabase(String database) {
this.database = database;
}
/**
*
* The database name in the Redshift data share that is being affected by this notification.
*
*
* @return The database name in the Redshift data share that is being affected by this notification.
*/
public String getDatabase() {
return this.database;
}
/**
*
* The database name in the Redshift data share that is being affected by this notification.
*
*
* @param database
* The database name in the Redshift data share that is being affected by this notification.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RedshiftDataShareDetails withDatabase(String database) {
setDatabase(database);
return this;
}
/**
*
* A function name in the Redshift database that is being affected by this notification.
*
*
* @param function
* A function name in the Redshift database that is being affected by this notification.
*/
public void setFunction(String function) {
this.function = function;
}
/**
*
* A function name in the Redshift database that is being affected by this notification.
*
*
* @return A function name in the Redshift database that is being affected by this notification.
*/
public String getFunction() {
return this.function;
}
/**
*
* A function name in the Redshift database that is being affected by this notification.
*
*
* @param function
* A function name in the Redshift database that is being affected by this notification.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RedshiftDataShareDetails withFunction(String function) {
setFunction(function);
return this;
}
/**
*
* A table name in the Redshift database that is being affected by this notification.
*
*
* @param table
* A table name in the Redshift database that is being affected by this notification.
*/
public void setTable(String table) {
this.table = table;
}
/**
*
* A table name in the Redshift database that is being affected by this notification.
*
*
* @return A table name in the Redshift database that is being affected by this notification.
*/
public String getTable() {
return this.table;
}
/**
*
* A table name in the Redshift database that is being affected by this notification.
*
*
* @param table
* A table name in the Redshift database that is being affected by this notification.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RedshiftDataShareDetails withTable(String table) {
setTable(table);
return this;
}
/**
*
* A schema name in the Redshift database that is being affected by this notification.
*
*
* @param schema
* A schema name in the Redshift database that is being affected by this notification.
*/
public void setSchema(String schema) {
this.schema = schema;
}
/**
*
* A schema name in the Redshift database that is being affected by this notification.
*
*
* @return A schema name in the Redshift database that is being affected by this notification.
*/
public String getSchema() {
return this.schema;
}
/**
*
* A schema name in the Redshift database that is being affected by this notification.
*
*
* @param schema
* A schema name in the Redshift database that is being affected by this notification.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RedshiftDataShareDetails withSchema(String schema) {
setSchema(schema);
return this;
}
/**
*
* A view name in the Redshift database that is being affected by this notification.
*
*
* @param view
* A view name in the Redshift database that is being affected by this notification.
*/
public void setView(String view) {
this.view = view;
}
/**
*
* A view name in the Redshift database that is being affected by this notification.
*
*
* @return A view name in the Redshift database that is being affected by this notification.
*/
public String getView() {
return this.view;
}
/**
*
* A view name in the Redshift database that is being affected by this notification.
*
*
* @param view
* A view name in the Redshift database that is being affected by this notification.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RedshiftDataShareDetails withView(String view) {
setView(view);
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 (getArn() != null)
sb.append("Arn: ").append(getArn()).append(",");
if (getDatabase() != null)
sb.append("Database: ").append(getDatabase()).append(",");
if (getFunction() != null)
sb.append("Function: ").append(getFunction()).append(",");
if (getTable() != null)
sb.append("Table: ").append(getTable()).append(",");
if (getSchema() != null)
sb.append("Schema: ").append(getSchema()).append(",");
if (getView() != null)
sb.append("View: ").append(getView());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof RedshiftDataShareDetails == false)
return false;
RedshiftDataShareDetails other = (RedshiftDataShareDetails) obj;
if (other.getArn() == null ^ this.getArn() == null)
return false;
if (other.getArn() != null && other.getArn().equals(this.getArn()) == 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.getFunction() == null ^ this.getFunction() == null)
return false;
if (other.getFunction() != null && other.getFunction().equals(this.getFunction()) == 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.getSchema() == null ^ this.getSchema() == null)
return false;
if (other.getSchema() != null && other.getSchema().equals(this.getSchema()) == false)
return false;
if (other.getView() == null ^ this.getView() == null)
return false;
if (other.getView() != null && other.getView().equals(this.getView()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getArn() == null) ? 0 : getArn().hashCode());
hashCode = prime * hashCode + ((getDatabase() == null) ? 0 : getDatabase().hashCode());
hashCode = prime * hashCode + ((getFunction() == null) ? 0 : getFunction().hashCode());
hashCode = prime * hashCode + ((getTable() == null) ? 0 : getTable().hashCode());
hashCode = prime * hashCode + ((getSchema() == null) ? 0 : getSchema().hashCode());
hashCode = prime * hashCode + ((getView() == null) ? 0 : getView().hashCode());
return hashCode;
}
@Override
public RedshiftDataShareDetails clone() {
try {
return (RedshiftDataShareDetails) 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.dataexchange.model.transform.RedshiftDataShareDetailsMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}