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

com.amazonaws.services.kinesisanalytics.model.Input Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon Kinesis module holds the client classes that are used for communicating with Amazon Kinesis Service

There is a newer version: 1.12.772
Show newest version
/*
 * 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;

/**
 * 

* When you configure the application input, you specify the streaming source, the in-application stream name that is * created, and the mapping between the two. For more information, see Configuring Application * Input. *

*/ public class Input implements Serializable, Cloneable { /** *

* Name prefix to use when creating in-application stream. Suppose you specify a prefix "MyInApplicationStream". * Kinesis Analytics will then create one or more (as per the InputParallelism count you specified) * in-application streams with names "MyInApplicationStream_001", "MyInApplicationStream_002" and so on. *

*/ private String namePrefix; /** *

* If the streaming source is an Amazon Kinesis stream, identifies the stream's Amazon Resource Name (ARN) and an * IAM role that enables Amazon Kinesis Analytics to access the stream on your behalf. *

*/ private KinesisStreamsInput kinesisStreamsInput; /** *

* If the streaming source is an Amazon Kinesis Firehose delivery stream, identifies the Firehose delivery stream's * ARN and an IAM role that enables Amazon Kinesis Analytics to access the stream on your behalf. *

*/ private KinesisFirehoseInput kinesisFirehoseInput; /** *

* Describes the number of in-application streams to create. *

*

* Data from your source will be routed to these in-application input streams. *

*

* (see Configuring * Application Input. *

*/ private InputParallelism inputParallelism; /** *

* Describes the format of the data in the streaming source, and how each data element maps to corresponding columns * in the in-application stream that is being created. *

*

* Also used to describe the format of the reference data source. *

*/ private SourceSchema inputSchema; /** *

* Name prefix to use when creating in-application stream. Suppose you specify a prefix "MyInApplicationStream". * Kinesis Analytics will then create one or more (as per the InputParallelism count you specified) * in-application streams with names "MyInApplicationStream_001", "MyInApplicationStream_002" and so on. *

* * @param namePrefix * Name prefix to use when creating in-application stream. Suppose you specify a prefix * "MyInApplicationStream". Kinesis Analytics will then create one or more (as per the * InputParallelism count you specified) in-application streams with names * "MyInApplicationStream_001", "MyInApplicationStream_002" and so on. */ public void setNamePrefix(String namePrefix) { this.namePrefix = namePrefix; } /** *

* Name prefix to use when creating in-application stream. Suppose you specify a prefix "MyInApplicationStream". * Kinesis Analytics will then create one or more (as per the InputParallelism count you specified) * in-application streams with names "MyInApplicationStream_001", "MyInApplicationStream_002" and so on. *

* * @return Name prefix to use when creating in-application stream. Suppose you specify a prefix * "MyInApplicationStream". Kinesis Analytics will then create one or more (as per the * InputParallelism count you specified) in-application streams with names * "MyInApplicationStream_001", "MyInApplicationStream_002" and so on. */ public String getNamePrefix() { return this.namePrefix; } /** *

* Name prefix to use when creating in-application stream. Suppose you specify a prefix "MyInApplicationStream". * Kinesis Analytics will then create one or more (as per the InputParallelism count you specified) * in-application streams with names "MyInApplicationStream_001", "MyInApplicationStream_002" and so on. *

* * @param namePrefix * Name prefix to use when creating in-application stream. Suppose you specify a prefix * "MyInApplicationStream". Kinesis Analytics will then create one or more (as per the * InputParallelism count you specified) in-application streams with names * "MyInApplicationStream_001", "MyInApplicationStream_002" and so on. * @return Returns a reference to this object so that method calls can be chained together. */ public Input withNamePrefix(String namePrefix) { setNamePrefix(namePrefix); return this; } /** *

* If the streaming source is an Amazon Kinesis stream, identifies the stream's Amazon Resource Name (ARN) and an * IAM role that enables Amazon Kinesis Analytics to access the stream on your behalf. *

* * @param kinesisStreamsInput * If the streaming source is an Amazon Kinesis stream, identifies the stream's Amazon Resource Name (ARN) * and an IAM role that enables Amazon Kinesis Analytics to access the stream on your behalf. */ public void setKinesisStreamsInput(KinesisStreamsInput kinesisStreamsInput) { this.kinesisStreamsInput = kinesisStreamsInput; } /** *

* If the streaming source is an Amazon Kinesis stream, identifies the stream's Amazon Resource Name (ARN) and an * IAM role that enables Amazon Kinesis Analytics to access the stream on your behalf. *

* * @return If the streaming source is an Amazon Kinesis stream, identifies the stream's Amazon Resource Name (ARN) * and an IAM role that enables Amazon Kinesis Analytics to access the stream on your behalf. */ public KinesisStreamsInput getKinesisStreamsInput() { return this.kinesisStreamsInput; } /** *

* If the streaming source is an Amazon Kinesis stream, identifies the stream's Amazon Resource Name (ARN) and an * IAM role that enables Amazon Kinesis Analytics to access the stream on your behalf. *

* * @param kinesisStreamsInput * If the streaming source is an Amazon Kinesis stream, identifies the 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 Input withKinesisStreamsInput(KinesisStreamsInput kinesisStreamsInput) { setKinesisStreamsInput(kinesisStreamsInput); return this; } /** *

* If the streaming source is an Amazon Kinesis Firehose delivery stream, identifies the Firehose delivery stream's * ARN and an IAM role that enables Amazon Kinesis Analytics to access the stream on your behalf. *

* * @param kinesisFirehoseInput * If the streaming source is an Amazon Kinesis Firehose delivery stream, identifies the Firehose delivery * stream's ARN and an IAM role that enables Amazon Kinesis Analytics to access the stream on your behalf. */ public void setKinesisFirehoseInput(KinesisFirehoseInput kinesisFirehoseInput) { this.kinesisFirehoseInput = kinesisFirehoseInput; } /** *

* If the streaming source is an Amazon Kinesis Firehose delivery stream, identifies the Firehose delivery stream's * ARN and an IAM role that enables Amazon Kinesis Analytics to access the stream on your behalf. *

* * @return If the streaming source is an Amazon Kinesis Firehose delivery stream, identifies the Firehose delivery * stream's ARN and an IAM role that enables Amazon Kinesis Analytics to access the stream on your behalf. */ public KinesisFirehoseInput getKinesisFirehoseInput() { return this.kinesisFirehoseInput; } /** *

* If the streaming source is an Amazon Kinesis Firehose delivery stream, identifies the Firehose delivery stream's * ARN and an IAM role that enables Amazon Kinesis Analytics to access the stream on your behalf. *

* * @param kinesisFirehoseInput * If the streaming source is an Amazon Kinesis Firehose delivery stream, identifies the Firehose delivery * 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 Input withKinesisFirehoseInput(KinesisFirehoseInput kinesisFirehoseInput) { setKinesisFirehoseInput(kinesisFirehoseInput); return this; } /** *

* Describes the number of in-application streams to create. *

*

* Data from your source will be routed to these in-application input streams. *

*

* (see Configuring * Application Input. *

* * @param inputParallelism * Describes the number of in-application streams to create.

*

* Data from your source will be routed to these in-application input streams. *

*

* (see Configuring * Application Input. */ public void setInputParallelism(InputParallelism inputParallelism) { this.inputParallelism = inputParallelism; } /** *

* Describes the number of in-application streams to create. *

*

* Data from your source will be routed to these in-application input streams. *

*

* (see Configuring * Application Input. *

* * @return Describes the number of in-application streams to create.

*

* Data from your source will be routed to these in-application input streams. *

*

* (see Configuring * Application Input. */ public InputParallelism getInputParallelism() { return this.inputParallelism; } /** *

* Describes the number of in-application streams to create. *

*

* Data from your source will be routed to these in-application input streams. *

*

* (see Configuring * Application Input. *

* * @param inputParallelism * Describes the number of in-application streams to create.

*

* Data from your source will be routed to these in-application input streams. *

*

* (see Configuring * Application Input. * @return Returns a reference to this object so that method calls can be chained together. */ public Input withInputParallelism(InputParallelism inputParallelism) { setInputParallelism(inputParallelism); return this; } /** *

* Describes the format of the data in the streaming source, and how each data element maps to corresponding columns * in the in-application stream that is being created. *

*

* Also used to describe the format of the reference data source. *

* * @param inputSchema * Describes the format of the data in the streaming source, and how each data element maps to corresponding * columns in the in-application stream that is being created.

*

* Also used to describe the format of the reference data source. */ public void setInputSchema(SourceSchema inputSchema) { this.inputSchema = inputSchema; } /** *

* Describes the format of the data in the streaming source, and how each data element maps to corresponding columns * in the in-application stream that is being created. *

*

* Also used to describe the format of the reference data source. *

* * @return Describes the format of the data in the streaming source, and how each data element maps to corresponding * columns in the in-application stream that is being created.

*

* Also used to describe the format of the reference data source. */ public SourceSchema getInputSchema() { return this.inputSchema; } /** *

* Describes the format of the data in the streaming source, and how each data element maps to corresponding columns * in the in-application stream that is being created. *

*

* Also used to describe the format of the reference data source. *

* * @param inputSchema * Describes the format of the data in the streaming source, and how each data element maps to corresponding * columns in the in-application stream that is being created.

*

* Also used to describe the format of the reference data source. * @return Returns a reference to this object so that method calls can be chained together. */ public Input withInputSchema(SourceSchema inputSchema) { setInputSchema(inputSchema); 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 (getNamePrefix() != null) sb.append("NamePrefix: ").append(getNamePrefix()).append(","); if (getKinesisStreamsInput() != null) sb.append("KinesisStreamsInput: ").append(getKinesisStreamsInput()).append(","); if (getKinesisFirehoseInput() != null) sb.append("KinesisFirehoseInput: ").append(getKinesisFirehoseInput()).append(","); if (getInputParallelism() != null) sb.append("InputParallelism: ").append(getInputParallelism()).append(","); if (getInputSchema() != null) sb.append("InputSchema: ").append(getInputSchema()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof Input == false) return false; Input other = (Input) obj; if (other.getNamePrefix() == null ^ this.getNamePrefix() == null) return false; if (other.getNamePrefix() != null && other.getNamePrefix().equals(this.getNamePrefix()) == false) return false; if (other.getKinesisStreamsInput() == null ^ this.getKinesisStreamsInput() == null) return false; if (other.getKinesisStreamsInput() != null && other.getKinesisStreamsInput().equals(this.getKinesisStreamsInput()) == false) return false; if (other.getKinesisFirehoseInput() == null ^ this.getKinesisFirehoseInput() == null) return false; if (other.getKinesisFirehoseInput() != null && other.getKinesisFirehoseInput().equals(this.getKinesisFirehoseInput()) == 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.getInputSchema() == null ^ this.getInputSchema() == null) return false; if (other.getInputSchema() != null && other.getInputSchema().equals(this.getInputSchema()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getNamePrefix() == null) ? 0 : getNamePrefix().hashCode()); hashCode = prime * hashCode + ((getKinesisStreamsInput() == null) ? 0 : getKinesisStreamsInput().hashCode()); hashCode = prime * hashCode + ((getKinesisFirehoseInput() == null) ? 0 : getKinesisFirehoseInput().hashCode()); hashCode = prime * hashCode + ((getInputParallelism() == null) ? 0 : getInputParallelism().hashCode()); hashCode = prime * hashCode + ((getInputSchema() == null) ? 0 : getInputSchema().hashCode()); return hashCode; } @Override public Input clone() { try { return (Input) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy