![JAR search and dependency download from the Maven repository](/logo.png)
com.amazonaws.services.kinesisanalytics.model.InputDescription Maven / Gradle / Ivy
/*
* Copyright 2011-2016 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.kinesisanalytics.model;
import java.io.Serializable;
/**
*
* Describes the application input configuration. For more information, see Configuring Application Input.
*
*/
public class InputDescription implements Serializable, Cloneable {
/**
*
* Input ID associated with the application input. This is the ID that
* Amazon Kinesis Analytics assigns to each input configuration you add to
* your application.
*
*/
private String inputId;
/**
*
* In-application name prefix.
*
*/
private String namePrefix;
/**
*
* Returns the in-application stream names that are mapped to the stream
* source.
*
*/
private java.util.List inAppStreamNames;
/**
*
* If an Amazon Kinesis stream is configured as streaming source, provides
* Amazon Kinesis stream's ARN and an IAM role that enables Amazon Kinesis
* Analytics to access the stream on your behalf.
*
*/
private KinesisStreamsInputDescription kinesisStreamsInputDescription;
/**
*
* If an Amazon Kinesis Firehose delivery stream is configured as a
* streaming source, provides the Firehose delivery stream's Amazon Resource
* Name (ARN) and an IAM role that enables Amazon Kinesis Analytics to
* access the stream on your behalf.
*
*/
private KinesisFirehoseInputDescription kinesisFirehoseInputDescription;
private SourceSchema inputSchema;
/**
*
* Describes the configured parallelism (number of in-application streams
* mapped to the streaming source).
*
*/
private InputParallelism inputParallelism;
/**
*
* Point at which the application is configured to read from the input
* stream.
*
*/
private InputStartingPositionConfiguration inputStartingPositionConfiguration;
/**
*
* Input ID associated with the application input. This is the ID that
* Amazon Kinesis Analytics assigns to each input configuration you add to
* your application.
*
*
* @param inputId
* Input ID associated with the application input. This is the ID
* that Amazon Kinesis Analytics assigns to each input configuration
* you add to your application.
*/
public void setInputId(String inputId) {
this.inputId = inputId;
}
/**
*
* Input ID associated with the application input. This is the ID that
* Amazon Kinesis Analytics assigns to each input configuration you add to
* your application.
*
*
* @return Input ID associated with the application input. This is the ID
* that Amazon Kinesis Analytics assigns to each input configuration
* you add to your application.
*/
public String getInputId() {
return this.inputId;
}
/**
*
* Input ID associated with the application input. This is the ID that
* Amazon Kinesis Analytics assigns to each input configuration you add to
* your application.
*
*
* @param inputId
* Input ID associated with the application input. This is the ID
* that Amazon Kinesis Analytics assigns to each input configuration
* you add to your application.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public InputDescription withInputId(String inputId) {
setInputId(inputId);
return this;
}
/**
*
* In-application name prefix.
*
*
* @param namePrefix
* In-application name prefix.
*/
public void setNamePrefix(String namePrefix) {
this.namePrefix = namePrefix;
}
/**
*
* In-application name prefix.
*
*
* @return In-application name prefix.
*/
public String getNamePrefix() {
return this.namePrefix;
}
/**
*
* In-application name prefix.
*
*
* @param namePrefix
* In-application name prefix.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public InputDescription withNamePrefix(String namePrefix) {
setNamePrefix(namePrefix);
return this;
}
/**
*
* Returns the in-application stream names that are mapped to the stream
* source.
*
*
* @return Returns the in-application stream names that are mapped to the
* stream source.
*/
public java.util.List getInAppStreamNames() {
return inAppStreamNames;
}
/**
*
* Returns the in-application stream names that are mapped to the stream
* source.
*
*
* @param inAppStreamNames
* Returns the in-application stream names that are mapped to the
* stream source.
*/
public void setInAppStreamNames(
java.util.Collection inAppStreamNames) {
if (inAppStreamNames == null) {
this.inAppStreamNames = null;
return;
}
this.inAppStreamNames = new java.util.ArrayList(
inAppStreamNames);
}
/**
*
* Returns the in-application stream names that are mapped to the stream
* source.
*
*
* NOTE: This method appends the values to the existing list (if
* any). Use {@link #setInAppStreamNames(java.util.Collection)} or
* {@link #withInAppStreamNames(java.util.Collection)} if you want to
* override the existing values.
*
*
* @param inAppStreamNames
* Returns the in-application stream names that are mapped to the
* stream source.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public InputDescription withInAppStreamNames(String... inAppStreamNames) {
if (this.inAppStreamNames == null) {
setInAppStreamNames(new java.util.ArrayList(
inAppStreamNames.length));
}
for (String ele : inAppStreamNames) {
this.inAppStreamNames.add(ele);
}
return this;
}
/**
*
* Returns the in-application stream names that are mapped to the stream
* source.
*
*
* @param inAppStreamNames
* Returns the in-application stream names that are mapped to the
* stream source.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public InputDescription withInAppStreamNames(
java.util.Collection inAppStreamNames) {
setInAppStreamNames(inAppStreamNames);
return this;
}
/**
*
* If an Amazon Kinesis stream is configured as streaming source, provides
* Amazon Kinesis stream's ARN and an IAM role that enables Amazon Kinesis
* Analytics to access the stream on your behalf.
*
*
* @param kinesisStreamsInputDescription
* If an Amazon Kinesis stream is configured as streaming source,
* provides Amazon Kinesis stream's ARN and an IAM role that enables
* Amazon Kinesis Analytics to access the stream on your behalf.
*/
public void setKinesisStreamsInputDescription(
KinesisStreamsInputDescription kinesisStreamsInputDescription) {
this.kinesisStreamsInputDescription = kinesisStreamsInputDescription;
}
/**
*
* If an Amazon Kinesis stream is configured as streaming source, provides
* Amazon Kinesis stream's ARN and an IAM role that enables Amazon Kinesis
* Analytics to access the stream on your behalf.
*
*
* @return If an Amazon Kinesis stream is configured as streaming source,
* provides Amazon Kinesis stream's ARN and an IAM role that enables
* Amazon Kinesis Analytics to access the stream on your behalf.
*/
public KinesisStreamsInputDescription getKinesisStreamsInputDescription() {
return this.kinesisStreamsInputDescription;
}
/**
*
* If an Amazon Kinesis stream is configured as streaming source, provides
* Amazon Kinesis stream's ARN and an IAM role that enables Amazon Kinesis
* Analytics to access the stream on your behalf.
*
*
* @param kinesisStreamsInputDescription
* If an Amazon Kinesis stream is configured as streaming source,
* provides Amazon Kinesis stream's ARN and an IAM role that enables
* Amazon Kinesis Analytics to access the stream on your behalf.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public InputDescription withKinesisStreamsInputDescription(
KinesisStreamsInputDescription kinesisStreamsInputDescription) {
setKinesisStreamsInputDescription(kinesisStreamsInputDescription);
return this;
}
/**
*
* If an Amazon Kinesis Firehose delivery stream is configured as a
* streaming source, provides the Firehose delivery stream's Amazon Resource
* Name (ARN) and an IAM role that enables Amazon Kinesis Analytics to
* access the stream on your behalf.
*
*
* @param kinesisFirehoseInputDescription
* If an Amazon Kinesis Firehose delivery stream is configured as a
* streaming source, provides the Firehose delivery stream's Amazon
* Resource Name (ARN) and an IAM role that enables Amazon Kinesis
* Analytics to access the stream on your behalf.
*/
public void setKinesisFirehoseInputDescription(
KinesisFirehoseInputDescription kinesisFirehoseInputDescription) {
this.kinesisFirehoseInputDescription = kinesisFirehoseInputDescription;
}
/**
*
* If an Amazon Kinesis Firehose delivery stream is configured as a
* streaming source, provides the Firehose delivery stream's Amazon Resource
* Name (ARN) and an IAM role that enables Amazon Kinesis Analytics to
* access the stream on your behalf.
*
*
* @return If an Amazon Kinesis Firehose delivery stream is configured as a
* streaming source, provides the Firehose delivery stream's Amazon
* Resource Name (ARN) and an IAM role that enables Amazon Kinesis
* Analytics to access the stream on your behalf.
*/
public KinesisFirehoseInputDescription getKinesisFirehoseInputDescription() {
return this.kinesisFirehoseInputDescription;
}
/**
*
* If an Amazon Kinesis Firehose delivery stream is configured as a
* streaming source, provides the Firehose delivery stream's Amazon Resource
* Name (ARN) and an IAM role that enables Amazon Kinesis Analytics to
* access the stream on your behalf.
*
*
* @param kinesisFirehoseInputDescription
* If an Amazon Kinesis Firehose delivery stream is configured as a
* streaming source, provides the Firehose delivery stream's Amazon
* Resource Name (ARN) and an IAM role that enables Amazon Kinesis
* Analytics to access the stream on your behalf.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public InputDescription withKinesisFirehoseInputDescription(
KinesisFirehoseInputDescription kinesisFirehoseInputDescription) {
setKinesisFirehoseInputDescription(kinesisFirehoseInputDescription);
return this;
}
/**
* @param inputSchema
*/
public void setInputSchema(SourceSchema inputSchema) {
this.inputSchema = inputSchema;
}
/**
* @return
*/
public SourceSchema getInputSchema() {
return this.inputSchema;
}
/**
* @param inputSchema
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public InputDescription withInputSchema(SourceSchema inputSchema) {
setInputSchema(inputSchema);
return this;
}
/**
*
* Describes the configured parallelism (number of in-application streams
* mapped to the streaming source).
*
*
* @param inputParallelism
* Describes the configured parallelism (number of in-application
* streams mapped to the streaming source).
*/
public void setInputParallelism(InputParallelism inputParallelism) {
this.inputParallelism = inputParallelism;
}
/**
*
* Describes the configured parallelism (number of in-application streams
* mapped to the streaming source).
*
*
* @return Describes the configured parallelism (number of in-application
* streams mapped to the streaming source).
*/
public InputParallelism getInputParallelism() {
return this.inputParallelism;
}
/**
*
* Describes the configured parallelism (number of in-application streams
* mapped to the streaming source).
*
*
* @param inputParallelism
* Describes the configured parallelism (number of in-application
* streams mapped to the streaming source).
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public InputDescription withInputParallelism(
InputParallelism inputParallelism) {
setInputParallelism(inputParallelism);
return this;
}
/**
*
* Point at which the application is configured to read from the input
* stream.
*
*
* @param inputStartingPositionConfiguration
* Point at which the application is configured to read from the
* input stream.
*/
public void setInputStartingPositionConfiguration(
InputStartingPositionConfiguration inputStartingPositionConfiguration) {
this.inputStartingPositionConfiguration = inputStartingPositionConfiguration;
}
/**
*
* Point at which the application is configured to read from the input
* stream.
*
*
* @return Point at which the application is configured to read from the
* input stream.
*/
public InputStartingPositionConfiguration getInputStartingPositionConfiguration() {
return this.inputStartingPositionConfiguration;
}
/**
*
* Point at which the application is configured to read from the input
* stream.
*
*
* @param inputStartingPositionConfiguration
* Point at which the application is configured to read from the
* input stream.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public InputDescription withInputStartingPositionConfiguration(
InputStartingPositionConfiguration inputStartingPositionConfiguration) {
setInputStartingPositionConfiguration(inputStartingPositionConfiguration);
return this;
}
/**
* Returns a string representation of this object; useful for testing and
* debugging.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getInputId() != null)
sb.append("InputId: " + getInputId() + ",");
if (getNamePrefix() != null)
sb.append("NamePrefix: " + getNamePrefix() + ",");
if (getInAppStreamNames() != null)
sb.append("InAppStreamNames: " + getInAppStreamNames() + ",");
if (getKinesisStreamsInputDescription() != null)
sb.append("KinesisStreamsInputDescription: "
+ getKinesisStreamsInputDescription() + ",");
if (getKinesisFirehoseInputDescription() != null)
sb.append("KinesisFirehoseInputDescription: "
+ getKinesisFirehoseInputDescription() + ",");
if (getInputSchema() != null)
sb.append("InputSchema: " + getInputSchema() + ",");
if (getInputParallelism() != null)
sb.append("InputParallelism: " + getInputParallelism() + ",");
if (getInputStartingPositionConfiguration() != null)
sb.append("InputStartingPositionConfiguration: "
+ getInputStartingPositionConfiguration());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof InputDescription == false)
return false;
InputDescription other = (InputDescription) obj;
if (other.getInputId() == null ^ this.getInputId() == null)
return false;
if (other.getInputId() != null
&& other.getInputId().equals(this.getInputId()) == false)
return false;
if (other.getNamePrefix() == null ^ this.getNamePrefix() == null)
return false;
if (other.getNamePrefix() != null
&& other.getNamePrefix().equals(this.getNamePrefix()) == false)
return false;
if (other.getInAppStreamNames() == null
^ this.getInAppStreamNames() == null)
return false;
if (other.getInAppStreamNames() != null
&& other.getInAppStreamNames().equals(
this.getInAppStreamNames()) == false)
return false;
if (other.getKinesisStreamsInputDescription() == null
^ this.getKinesisStreamsInputDescription() == null)
return false;
if (other.getKinesisStreamsInputDescription() != null
&& other.getKinesisStreamsInputDescription().equals(
this.getKinesisStreamsInputDescription()) == false)
return false;
if (other.getKinesisFirehoseInputDescription() == null
^ this.getKinesisFirehoseInputDescription() == null)
return false;
if (other.getKinesisFirehoseInputDescription() != null
&& other.getKinesisFirehoseInputDescription().equals(
this.getKinesisFirehoseInputDescription()) == false)
return false;
if (other.getInputSchema() == null ^ this.getInputSchema() == null)
return false;
if (other.getInputSchema() != null
&& other.getInputSchema().equals(this.getInputSchema()) == false)
return false;
if (other.getInputParallelism() == null
^ this.getInputParallelism() == null)
return false;
if (other.getInputParallelism() != null
&& other.getInputParallelism().equals(
this.getInputParallelism()) == false)
return false;
if (other.getInputStartingPositionConfiguration() == null
^ this.getInputStartingPositionConfiguration() == null)
return false;
if (other.getInputStartingPositionConfiguration() != null
&& other.getInputStartingPositionConfiguration().equals(
this.getInputStartingPositionConfiguration()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode
+ ((getInputId() == null) ? 0 : getInputId().hashCode());
hashCode = prime * hashCode
+ ((getNamePrefix() == null) ? 0 : getNamePrefix().hashCode());
hashCode = prime
* hashCode
+ ((getInAppStreamNames() == null) ? 0 : getInAppStreamNames()
.hashCode());
hashCode = prime
* hashCode
+ ((getKinesisStreamsInputDescription() == null) ? 0
: getKinesisStreamsInputDescription().hashCode());
hashCode = prime
* hashCode
+ ((getKinesisFirehoseInputDescription() == null) ? 0
: getKinesisFirehoseInputDescription().hashCode());
hashCode = prime
* hashCode
+ ((getInputSchema() == null) ? 0 : getInputSchema().hashCode());
hashCode = prime
* hashCode
+ ((getInputParallelism() == null) ? 0 : getInputParallelism()
.hashCode());
hashCode = prime
* hashCode
+ ((getInputStartingPositionConfiguration() == null) ? 0
: getInputStartingPositionConfiguration().hashCode());
return hashCode;
}
@Override
public InputDescription clone() {
try {
return (InputDescription) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException(
"Got a CloneNotSupportedException from Object.clone() "
+ "even though we're Cloneable!", e);
}
}
}