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.ecs.model;
 
 
 public class DiscoverPollEndpointResult implements SerializableCloneable {

    
The endpoint for the Amazon ECS agent to poll.
 
     private String endpoint;

    
The telemetry endpoint for the Amazon ECS agent.
 
     private String telemetryEndpoint;

    
The endpoint for the Amazon ECS agent to poll.

Returns:
The endpoint for the Amazon ECS agent to poll.
 
     public String getEndpoint() {
         return ;
     }
    
    
The endpoint for the Amazon ECS agent to poll.

Parameters:
endpoint The endpoint for the Amazon ECS agent to poll.
 
     public void setEndpoint(String endpoint) {
         this. = endpoint;
     }
    
    
The endpoint for the Amazon ECS agent to poll.

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

Parameters:
endpoint The endpoint for the Amazon ECS agent to poll.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public DiscoverPollEndpointResult withEndpoint(String endpoint) {
         this. = endpoint;
         return this;
     }

    
The telemetry endpoint for the Amazon ECS agent.

Returns:
The telemetry endpoint for the Amazon ECS agent.
 
     public String getTelemetryEndpoint() {
         return ;
     }
    
    
The telemetry endpoint for the Amazon ECS agent.

Parameters:
telemetryEndpoint The telemetry endpoint for the Amazon ECS agent.
 
     public void setTelemetryEndpoint(String telemetryEndpoint) {
         this. = telemetryEndpoint;
     }
    
    
The telemetry endpoint for the Amazon ECS agent.

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

Parameters:
telemetryEndpoint The telemetry endpoint for the Amazon ECS agent.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public DiscoverPollEndpointResult withTelemetryEndpoint(String telemetryEndpoint) {
         this. = telemetryEndpoint;
         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 (getEndpoint() != nullsb.append("Endpoint: " + getEndpoint() + ",");
        if (getTelemetryEndpoint() != nullsb.append("TelemetryEndpoint: " + getTelemetryEndpoint() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getEndpoint() == null) ? 0 : getEndpoint().hashCode()); 
        hashCode = prime * hashCode + ((getTelemetryEndpoint() == null) ? 0 : getTelemetryEndpoint().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof DiscoverPollEndpointResult == falsereturn false;
        
        if (other.getEndpoint() == null ^ this.getEndpoint() == nullreturn false;
        if (other.getEndpoint() != null && other.getEndpoint().equals(this.getEndpoint()) == falsereturn false
        if (other.getTelemetryEndpoint() == null ^ this.getTelemetryEndpoint() == nullreturn false;
        if (other.getTelemetryEndpoint() != null && other.getTelemetryEndpoint().equals(this.getTelemetryEndpoint()) == falsereturn false
        return true;
    }
    
    @Override
    public DiscoverPollEndpointResult clone() {
        try {
            return (DiscoverPollEndpointResultsuper.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