Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2010-2015 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.cognitosync.model;
 

Configuration options for configure Cognito streams.

 
 public class CognitoStreams implements SerializableCloneable {

    
The name of the Cognito stream to receive updates. This stream must be in the developers account and in the same region as the identity pool.

Constraints:
Length: 1 - 128

 
     private String streamName;

    
The ARN of the role Amazon Cognito can assume in order to publish to the stream. This role must grant access to Amazon Cognito (cognito-sync) to invoke PutRecord on your Cognito stream.

Constraints:
Length: 20 - 2048
Pattern: arn:aws:iam::\d+:role/.*

 
     private String roleArn;

    
Status of the Cognito streams. Valid values are:

ENABLED - Streaming of updates to identity pool is enabled.

DISABLED - Streaming of updates to identity pool is disabled. Bulk publish will also fail if StreamingStatus is DISABLED.

Constraints:
Allowed Values: ENABLED, DISABLED

 
     private String streamingStatus;

    
The name of the Cognito stream to receive updates. This stream must be in the developers account and in the same region as the identity pool.

Constraints:
Length: 1 - 128

Returns:
The name of the Cognito stream to receive updates. This stream must be in the developers account and in the same region as the identity pool.
 
     public String getStreamName() {
         return ;
     }
    
    
The name of the Cognito stream to receive updates. This stream must be in the developers account and in the same region as the identity pool.

Constraints:
Length: 1 - 128

Parameters:
streamName The name of the Cognito stream to receive updates. This stream must be in the developers account and in the same region as the identity pool.
 
     public void setStreamName(String streamName) {
         this. = streamName;
     }
    
    
The name of the Cognito stream to receive updates. This stream must be in the developers account and in the same region as the identity pool.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 1 - 128

Parameters:
streamName The name of the Cognito stream to receive updates. This stream must be in the developers account and in the same region as the identity pool.
Returns:
A reference to this updated object so that method calls can be chained together.
 
    public CognitoStreams withStreamName(String streamName) {
        this. = streamName;
        return this;
    }

    
The ARN of the role Amazon Cognito can assume in order to publish to the stream. This role must grant access to Amazon Cognito (cognito-sync) to invoke PutRecord on your Cognito stream.

Constraints:
Length: 20 - 2048
Pattern: arn:aws:iam::\d+:role/.*

Returns:
The ARN of the role Amazon Cognito can assume in order to publish to the stream. This role must grant access to Amazon Cognito (cognito-sync) to invoke PutRecord on your Cognito stream.
    public String getRoleArn() {
        return ;
    }
    
    
The ARN of the role Amazon Cognito can assume in order to publish to the stream. This role must grant access to Amazon Cognito (cognito-sync) to invoke PutRecord on your Cognito stream.

Constraints:
Length: 20 - 2048
Pattern: arn:aws:iam::\d+:role/.*

Parameters:
roleArn The ARN of the role Amazon Cognito can assume in order to publish to the stream. This role must grant access to Amazon Cognito (cognito-sync) to invoke PutRecord on your Cognito stream.
    public void setRoleArn(String roleArn) {
        this. = roleArn;
    }
    
    
The ARN of the role Amazon Cognito can assume in order to publish to the stream. This role must grant access to Amazon Cognito (cognito-sync) to invoke PutRecord on your Cognito stream.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 20 - 2048
Pattern: arn:aws:iam::\d+:role/.*

Parameters:
roleArn The ARN of the role Amazon Cognito can assume in order to publish to the stream. This role must grant access to Amazon Cognito (cognito-sync) to invoke PutRecord on your Cognito stream.
Returns:
A reference to this updated object so that method calls can be chained together.
    public CognitoStreams withRoleArn(String roleArn) {
        this. = roleArn;
        return this;
    }

    
Status of the Cognito streams. Valid values are:

ENABLED - Streaming of updates to identity pool is enabled.

DISABLED - Streaming of updates to identity pool is disabled. Bulk publish will also fail if StreamingStatus is DISABLED.

Constraints:
Allowed Values: ENABLED, DISABLED

Returns:
Status of the Cognito streams. Valid values are:

ENABLED - Streaming of updates to identity pool is enabled.

DISABLED - Streaming of updates to identity pool is disabled. Bulk publish will also fail if StreamingStatus is DISABLED.

See also:
StreamingStatus
    public String getStreamingStatus() {
        return ;
    }
    
    
Status of the Cognito streams. Valid values are:

ENABLED - Streaming of updates to identity pool is enabled.

DISABLED - Streaming of updates to identity pool is disabled. Bulk publish will also fail if StreamingStatus is DISABLED.

Constraints:
Allowed Values: ENABLED, DISABLED

Parameters:
streamingStatus Status of the Cognito streams. Valid values are:

ENABLED - Streaming of updates to identity pool is enabled.

DISABLED - Streaming of updates to identity pool is disabled. Bulk publish will also fail if StreamingStatus is DISABLED.

See also:
StreamingStatus
    public void setStreamingStatus(String streamingStatus) {
        this. = streamingStatus;
    }
    
    
Status of the Cognito streams. Valid values are:

ENABLED - Streaming of updates to identity pool is enabled.

DISABLED - Streaming of updates to identity pool is disabled. Bulk publish will also fail if StreamingStatus is DISABLED.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Allowed Values: ENABLED, DISABLED

Parameters:
streamingStatus Status of the Cognito streams. Valid values are:

ENABLED - Streaming of updates to identity pool is enabled.

DISABLED - Streaming of updates to identity pool is disabled. Bulk publish will also fail if StreamingStatus is DISABLED.

Returns:
A reference to this updated object so that method calls can be chained together.
See also:
StreamingStatus
    public CognitoStreams withStreamingStatus(String streamingStatus) {
        this. = streamingStatus;
        return this;
    }

    
Status of the Cognito streams. Valid values are:

ENABLED - Streaming of updates to identity pool is enabled.

DISABLED - Streaming of updates to identity pool is disabled. Bulk publish will also fail if StreamingStatus is DISABLED.

Constraints:
Allowed Values: ENABLED, DISABLED

Parameters:
streamingStatus Status of the Cognito streams. Valid values are:

ENABLED - Streaming of updates to identity pool is enabled.

DISABLED - Streaming of updates to identity pool is disabled. Bulk publish will also fail if StreamingStatus is DISABLED.

See also:
StreamingStatus
    public void setStreamingStatus(StreamingStatus streamingStatus) {
        this. = streamingStatus.toString();
    }
    
    
Status of the Cognito streams. Valid values are:

ENABLED - Streaming of updates to identity pool is enabled.

DISABLED - Streaming of updates to identity pool is disabled. Bulk publish will also fail if StreamingStatus is DISABLED.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Allowed Values: ENABLED, DISABLED

Parameters:
streamingStatus Status of the Cognito streams. Valid values are:

ENABLED - Streaming of updates to identity pool is enabled.

DISABLED - Streaming of updates to identity pool is disabled. Bulk publish will also fail if StreamingStatus is DISABLED.

Returns:
A reference to this updated object so that method calls can be chained together.
See also:
StreamingStatus
    public CognitoStreams withStreamingStatus(StreamingStatus streamingStatus) {
        this. = streamingStatus.toString();
        return this;
    }

    
Returns a string representation of this object; useful for testing and debugging.

Returns:
A string representation of this object.
See also:
java.lang.Object.toString()
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getStreamName() != nullsb.append("StreamName: " + getStreamName() + ",");
        if (getRoleArn() != nullsb.append("RoleArn: " + getRoleArn() + ",");
        if (getStreamingStatus() != nullsb.append("StreamingStatus: " + getStreamingStatus() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getStreamName() == null) ? 0 : getStreamName().hashCode()); 
        hashCode = prime * hashCode + ((getRoleArn() == null) ? 0 : getRoleArn().hashCode()); 
        hashCode = prime * hashCode + ((getStreamingStatus() == null) ? 0 : getStreamingStatus().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof CognitoStreams == falsereturn false;
        CognitoStreams other = (CognitoStreams)obj;
        
        if (other.getStreamName() == null ^ this.getStreamName() == nullreturn false;
        if (other.getStreamName() != null && other.getStreamName().equals(this.getStreamName()) == falsereturn false
        if (other.getRoleArn() == null ^ this.getRoleArn() == nullreturn false;
        if (other.getRoleArn() != null && other.getRoleArn().equals(this.getRoleArn()) == falsereturn false
        if (other.getStreamingStatus() == null ^ this.getStreamingStatus() == nullreturn false;
        if (other.getStreamingStatus() != null && other.getStreamingStatus().equals(this.getStreamingStatus()) == falsereturn false
        return true;
    }
    
    @Override
    public CognitoStreams clone() {
        try {
            return (CognitoStreamssuper.clone();
        
        } catch (CloneNotSupportedException e) {
            throw new IllegalStateException(
                    "Got a CloneNotSupportedException from Object.clone() "
                    + "even though we're Cloneable!",
                    e);
        }
        
    }
}
    
New to GrepCode? Check out our FAQ X