com.amazonaws.services.iotanalytics.model.S3DestinationConfiguration Maven / Gradle / Ivy
Show all versions of aws-java-sdk-iotanalytics Show documentation
/*
* 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.iotanalytics.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Configuration information for delivery of dataset contents to Amazon Simple Storage Service (Amazon S3).
*
*
* @see AWS API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class S3DestinationConfiguration implements Serializable, Cloneable, StructuredPojo {
/**
*
* The name of the S3 bucket to which dataset contents are delivered.
*
*/
private String bucket;
/**
*
* The key of the dataset contents object in an S3 bucket. Each object has a key that is a unique identifier. Each
* object has exactly one key.
*
*
* You can create a unique key with the following options:
*
*
* -
*
* Use !{iotanalytics:scheduleTime}
to insert the time of a scheduled SQL query run.
*
*
* -
*
* Use !{iotanalytics:versionId}
to insert a unique hash that identifies a dataset content.
*
*
* -
*
* Use !{iotanalytics:creationTime}
to insert the creation time of a dataset content.
*
*
*
*
* The following example creates a unique key for a CSV file:
* dataset/mydataset/!{iotanalytics:scheduleTime}/!{iotanalytics:versionId}.csv
*
*
*
* If you don't use !{iotanalytics:versionId}
to specify the key, you might get duplicate keys. For
* example, you might have two dataset contents with the same scheduleTime
but different
* versionId
s. This means that one dataset content overwrites the other.
*
*
*/
private String key;
/**
*
* Configuration information for coordination with Glue, a fully managed extract, transform and load (ETL) service.
*
*/
private GlueConfiguration glueConfiguration;
/**
*
* The ARN of the role that grants IoT Analytics permission to interact with your Amazon S3 and Glue resources.
*
*/
private String roleArn;
/**
*
* The name of the S3 bucket to which dataset contents are delivered.
*
*
* @param bucket
* The name of the S3 bucket to which dataset contents are delivered.
*/
public void setBucket(String bucket) {
this.bucket = bucket;
}
/**
*
* The name of the S3 bucket to which dataset contents are delivered.
*
*
* @return The name of the S3 bucket to which dataset contents are delivered.
*/
public String getBucket() {
return this.bucket;
}
/**
*
* The name of the S3 bucket to which dataset contents are delivered.
*
*
* @param bucket
* The name of the S3 bucket to which dataset contents are delivered.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public S3DestinationConfiguration withBucket(String bucket) {
setBucket(bucket);
return this;
}
/**
*
* The key of the dataset contents object in an S3 bucket. Each object has a key that is a unique identifier. Each
* object has exactly one key.
*
*
* You can create a unique key with the following options:
*
*
* -
*
* Use !{iotanalytics:scheduleTime}
to insert the time of a scheduled SQL query run.
*
*
* -
*
* Use !{iotanalytics:versionId}
to insert a unique hash that identifies a dataset content.
*
*
* -
*
* Use !{iotanalytics:creationTime}
to insert the creation time of a dataset content.
*
*
*
*
* The following example creates a unique key for a CSV file:
* dataset/mydataset/!{iotanalytics:scheduleTime}/!{iotanalytics:versionId}.csv
*
*
*
* If you don't use !{iotanalytics:versionId}
to specify the key, you might get duplicate keys. For
* example, you might have two dataset contents with the same scheduleTime
but different
* versionId
s. This means that one dataset content overwrites the other.
*
*
*
* @param key
* The key of the dataset contents object in an S3 bucket. Each object has a key that is a unique identifier.
* Each object has exactly one key.
*
* You can create a unique key with the following options:
*
*
* -
*
* Use !{iotanalytics:scheduleTime}
to insert the time of a scheduled SQL query run.
*
*
* -
*
* Use !{iotanalytics:versionId}
to insert a unique hash that identifies a dataset content.
*
*
* -
*
* Use !{iotanalytics:creationTime}
to insert the creation time of a dataset content.
*
*
*
*
* The following example creates a unique key for a CSV file:
* dataset/mydataset/!{iotanalytics:scheduleTime}/!{iotanalytics:versionId}.csv
*
*
*
* If you don't use !{iotanalytics:versionId}
to specify the key, you might get duplicate keys.
* For example, you might have two dataset contents with the same scheduleTime
but different
* versionId
s. This means that one dataset content overwrites the other.
*
*/
public void setKey(String key) {
this.key = key;
}
/**
*
* The key of the dataset contents object in an S3 bucket. Each object has a key that is a unique identifier. Each
* object has exactly one key.
*
*
* You can create a unique key with the following options:
*
*
* -
*
* Use !{iotanalytics:scheduleTime}
to insert the time of a scheduled SQL query run.
*
*
* -
*
* Use !{iotanalytics:versionId}
to insert a unique hash that identifies a dataset content.
*
*
* -
*
* Use !{iotanalytics:creationTime}
to insert the creation time of a dataset content.
*
*
*
*
* The following example creates a unique key for a CSV file:
* dataset/mydataset/!{iotanalytics:scheduleTime}/!{iotanalytics:versionId}.csv
*
*
*
* If you don't use !{iotanalytics:versionId}
to specify the key, you might get duplicate keys. For
* example, you might have two dataset contents with the same scheduleTime
but different
* versionId
s. This means that one dataset content overwrites the other.
*
*
*
* @return The key of the dataset contents object in an S3 bucket. Each object has a key that is a unique
* identifier. Each object has exactly one key.
*
* You can create a unique key with the following options:
*
*
* -
*
* Use !{iotanalytics:scheduleTime}
to insert the time of a scheduled SQL query run.
*
*
* -
*
* Use !{iotanalytics:versionId}
to insert a unique hash that identifies a dataset content.
*
*
* -
*
* Use !{iotanalytics:creationTime}
to insert the creation time of a dataset content.
*
*
*
*
* The following example creates a unique key for a CSV file:
* dataset/mydataset/!{iotanalytics:scheduleTime}/!{iotanalytics:versionId}.csv
*
*
*
* If you don't use !{iotanalytics:versionId}
to specify the key, you might get duplicate keys.
* For example, you might have two dataset contents with the same scheduleTime
but different
* versionId
s. This means that one dataset content overwrites the other.
*
*/
public String getKey() {
return this.key;
}
/**
*
* The key of the dataset contents object in an S3 bucket. Each object has a key that is a unique identifier. Each
* object has exactly one key.
*
*
* You can create a unique key with the following options:
*
*
* -
*
* Use !{iotanalytics:scheduleTime}
to insert the time of a scheduled SQL query run.
*
*
* -
*
* Use !{iotanalytics:versionId}
to insert a unique hash that identifies a dataset content.
*
*
* -
*
* Use !{iotanalytics:creationTime}
to insert the creation time of a dataset content.
*
*
*
*
* The following example creates a unique key for a CSV file:
* dataset/mydataset/!{iotanalytics:scheduleTime}/!{iotanalytics:versionId}.csv
*
*
*
* If you don't use !{iotanalytics:versionId}
to specify the key, you might get duplicate keys. For
* example, you might have two dataset contents with the same scheduleTime
but different
* versionId
s. This means that one dataset content overwrites the other.
*
*
*
* @param key
* The key of the dataset contents object in an S3 bucket. Each object has a key that is a unique identifier.
* Each object has exactly one key.
*
* You can create a unique key with the following options:
*
*
* -
*
* Use !{iotanalytics:scheduleTime}
to insert the time of a scheduled SQL query run.
*
*
* -
*
* Use !{iotanalytics:versionId}
to insert a unique hash that identifies a dataset content.
*
*
* -
*
* Use !{iotanalytics:creationTime}
to insert the creation time of a dataset content.
*
*
*
*
* The following example creates a unique key for a CSV file:
* dataset/mydataset/!{iotanalytics:scheduleTime}/!{iotanalytics:versionId}.csv
*
*
*
* If you don't use !{iotanalytics:versionId}
to specify the key, you might get duplicate keys.
* For example, you might have two dataset contents with the same scheduleTime
but different
* versionId
s. This means that one dataset content overwrites the other.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public S3DestinationConfiguration withKey(String key) {
setKey(key);
return this;
}
/**
*
* Configuration information for coordination with Glue, a fully managed extract, transform and load (ETL) service.
*
*
* @param glueConfiguration
* Configuration information for coordination with Glue, a fully managed extract, transform and load (ETL)
* service.
*/
public void setGlueConfiguration(GlueConfiguration glueConfiguration) {
this.glueConfiguration = glueConfiguration;
}
/**
*
* Configuration information for coordination with Glue, a fully managed extract, transform and load (ETL) service.
*
*
* @return Configuration information for coordination with Glue, a fully managed extract, transform and load (ETL)
* service.
*/
public GlueConfiguration getGlueConfiguration() {
return this.glueConfiguration;
}
/**
*
* Configuration information for coordination with Glue, a fully managed extract, transform and load (ETL) service.
*
*
* @param glueConfiguration
* Configuration information for coordination with Glue, a fully managed extract, transform and load (ETL)
* service.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public S3DestinationConfiguration withGlueConfiguration(GlueConfiguration glueConfiguration) {
setGlueConfiguration(glueConfiguration);
return this;
}
/**
*
* The ARN of the role that grants IoT Analytics permission to interact with your Amazon S3 and Glue resources.
*
*
* @param roleArn
* The ARN of the role that grants IoT Analytics permission to interact with your Amazon S3 and Glue
* resources.
*/
public void setRoleArn(String roleArn) {
this.roleArn = roleArn;
}
/**
*
* The ARN of the role that grants IoT Analytics permission to interact with your Amazon S3 and Glue resources.
*
*
* @return The ARN of the role that grants IoT Analytics permission to interact with your Amazon S3 and Glue
* resources.
*/
public String getRoleArn() {
return this.roleArn;
}
/**
*
* The ARN of the role that grants IoT Analytics permission to interact with your Amazon S3 and Glue resources.
*
*
* @param roleArn
* The ARN of the role that grants IoT Analytics permission to interact with your Amazon S3 and Glue
* resources.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public S3DestinationConfiguration withRoleArn(String roleArn) {
setRoleArn(roleArn);
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 (getBucket() != null)
sb.append("Bucket: ").append(getBucket()).append(",");
if (getKey() != null)
sb.append("Key: ").append(getKey()).append(",");
if (getGlueConfiguration() != null)
sb.append("GlueConfiguration: ").append(getGlueConfiguration()).append(",");
if (getRoleArn() != null)
sb.append("RoleArn: ").append(getRoleArn());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof S3DestinationConfiguration == false)
return false;
S3DestinationConfiguration other = (S3DestinationConfiguration) obj;
if (other.getBucket() == null ^ this.getBucket() == null)
return false;
if (other.getBucket() != null && other.getBucket().equals(this.getBucket()) == false)
return false;
if (other.getKey() == null ^ this.getKey() == null)
return false;
if (other.getKey() != null && other.getKey().equals(this.getKey()) == false)
return false;
if (other.getGlueConfiguration() == null ^ this.getGlueConfiguration() == null)
return false;
if (other.getGlueConfiguration() != null && other.getGlueConfiguration().equals(this.getGlueConfiguration()) == false)
return false;
if (other.getRoleArn() == null ^ this.getRoleArn() == null)
return false;
if (other.getRoleArn() != null && other.getRoleArn().equals(this.getRoleArn()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getBucket() == null) ? 0 : getBucket().hashCode());
hashCode = prime * hashCode + ((getKey() == null) ? 0 : getKey().hashCode());
hashCode = prime * hashCode + ((getGlueConfiguration() == null) ? 0 : getGlueConfiguration().hashCode());
hashCode = prime * hashCode + ((getRoleArn() == null) ? 0 : getRoleArn().hashCode());
return hashCode;
}
@Override
public S3DestinationConfiguration clone() {
try {
return (S3DestinationConfiguration) 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.iotanalytics.model.transform.S3DestinationConfigurationMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}