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

com.amazonaws.services.xray.model.Edge Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS X-Ray module holds the client classes that are used for communicating with AWS X-Ray Service

There is a newer version: 1.12.780
Show newest version
/*
 * 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.xray.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* Information about a connection between two services. An edge can be a synchronous connection, such as typical call * between client and service, or an asynchronous link, such as a Lambda function which retrieves an event from an SNS * queue. *

* * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class Edge implements Serializable, Cloneable, StructuredPojo { /** *

* Identifier of the edge. Unique within a service map. *

*/ private Integer referenceId; /** *

* The start time of the first segment on the edge. *

*/ private java.util.Date startTime; /** *

* The end time of the last segment on the edge. *

*/ private java.util.Date endTime; /** *

* Response statistics for segments on the edge. *

*/ private EdgeStatistics summaryStatistics; /** *

* A histogram that maps the spread of client response times on an edge. Only populated for synchronous edges. *

*/ private java.util.List responseTimeHistogram; /** *

* Aliases for the edge. *

*/ private java.util.List aliases; /** *

* Describes an asynchronous connection, with a value of link. *

*/ private String edgeType; /** *

* A histogram that maps the spread of event age when received by consumers. Age is calculated each time an event is * received. Only populated when EdgeType is link. *

*/ private java.util.List receivedEventAgeHistogram; /** *

* Identifier of the edge. Unique within a service map. *

* * @param referenceId * Identifier of the edge. Unique within a service map. */ public void setReferenceId(Integer referenceId) { this.referenceId = referenceId; } /** *

* Identifier of the edge. Unique within a service map. *

* * @return Identifier of the edge. Unique within a service map. */ public Integer getReferenceId() { return this.referenceId; } /** *

* Identifier of the edge. Unique within a service map. *

* * @param referenceId * Identifier of the edge. Unique within a service map. * @return Returns a reference to this object so that method calls can be chained together. */ public Edge withReferenceId(Integer referenceId) { setReferenceId(referenceId); return this; } /** *

* The start time of the first segment on the edge. *

* * @param startTime * The start time of the first segment on the edge. */ public void setStartTime(java.util.Date startTime) { this.startTime = startTime; } /** *

* The start time of the first segment on the edge. *

* * @return The start time of the first segment on the edge. */ public java.util.Date getStartTime() { return this.startTime; } /** *

* The start time of the first segment on the edge. *

* * @param startTime * The start time of the first segment on the edge. * @return Returns a reference to this object so that method calls can be chained together. */ public Edge withStartTime(java.util.Date startTime) { setStartTime(startTime); return this; } /** *

* The end time of the last segment on the edge. *

* * @param endTime * The end time of the last segment on the edge. */ public void setEndTime(java.util.Date endTime) { this.endTime = endTime; } /** *

* The end time of the last segment on the edge. *

* * @return The end time of the last segment on the edge. */ public java.util.Date getEndTime() { return this.endTime; } /** *

* The end time of the last segment on the edge. *

* * @param endTime * The end time of the last segment on the edge. * @return Returns a reference to this object so that method calls can be chained together. */ public Edge withEndTime(java.util.Date endTime) { setEndTime(endTime); return this; } /** *

* Response statistics for segments on the edge. *

* * @param summaryStatistics * Response statistics for segments on the edge. */ public void setSummaryStatistics(EdgeStatistics summaryStatistics) { this.summaryStatistics = summaryStatistics; } /** *

* Response statistics for segments on the edge. *

* * @return Response statistics for segments on the edge. */ public EdgeStatistics getSummaryStatistics() { return this.summaryStatistics; } /** *

* Response statistics for segments on the edge. *

* * @param summaryStatistics * Response statistics for segments on the edge. * @return Returns a reference to this object so that method calls can be chained together. */ public Edge withSummaryStatistics(EdgeStatistics summaryStatistics) { setSummaryStatistics(summaryStatistics); return this; } /** *

* A histogram that maps the spread of client response times on an edge. Only populated for synchronous edges. *

* * @return A histogram that maps the spread of client response times on an edge. Only populated for synchronous * edges. */ public java.util.List getResponseTimeHistogram() { return responseTimeHistogram; } /** *

* A histogram that maps the spread of client response times on an edge. Only populated for synchronous edges. *

* * @param responseTimeHistogram * A histogram that maps the spread of client response times on an edge. Only populated for synchronous * edges. */ public void setResponseTimeHistogram(java.util.Collection responseTimeHistogram) { if (responseTimeHistogram == null) { this.responseTimeHistogram = null; return; } this.responseTimeHistogram = new java.util.ArrayList(responseTimeHistogram); } /** *

* A histogram that maps the spread of client response times on an edge. Only populated for synchronous edges. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setResponseTimeHistogram(java.util.Collection)} or * {@link #withResponseTimeHistogram(java.util.Collection)} if you want to override the existing values. *

* * @param responseTimeHistogram * A histogram that maps the spread of client response times on an edge. Only populated for synchronous * edges. * @return Returns a reference to this object so that method calls can be chained together. */ public Edge withResponseTimeHistogram(HistogramEntry... responseTimeHistogram) { if (this.responseTimeHistogram == null) { setResponseTimeHistogram(new java.util.ArrayList(responseTimeHistogram.length)); } for (HistogramEntry ele : responseTimeHistogram) { this.responseTimeHistogram.add(ele); } return this; } /** *

* A histogram that maps the spread of client response times on an edge. Only populated for synchronous edges. *

* * @param responseTimeHistogram * A histogram that maps the spread of client response times on an edge. Only populated for synchronous * edges. * @return Returns a reference to this object so that method calls can be chained together. */ public Edge withResponseTimeHistogram(java.util.Collection responseTimeHistogram) { setResponseTimeHistogram(responseTimeHistogram); return this; } /** *

* Aliases for the edge. *

* * @return Aliases for the edge. */ public java.util.List getAliases() { return aliases; } /** *

* Aliases for the edge. *

* * @param aliases * Aliases for the edge. */ public void setAliases(java.util.Collection aliases) { if (aliases == null) { this.aliases = null; return; } this.aliases = new java.util.ArrayList(aliases); } /** *

* Aliases for the edge. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setAliases(java.util.Collection)} or {@link #withAliases(java.util.Collection)} if you want to override * the existing values. *

* * @param aliases * Aliases for the edge. * @return Returns a reference to this object so that method calls can be chained together. */ public Edge withAliases(Alias... aliases) { if (this.aliases == null) { setAliases(new java.util.ArrayList(aliases.length)); } for (Alias ele : aliases) { this.aliases.add(ele); } return this; } /** *

* Aliases for the edge. *

* * @param aliases * Aliases for the edge. * @return Returns a reference to this object so that method calls can be chained together. */ public Edge withAliases(java.util.Collection aliases) { setAliases(aliases); return this; } /** *

* Describes an asynchronous connection, with a value of link. *

* * @param edgeType * Describes an asynchronous connection, with a value of link. */ public void setEdgeType(String edgeType) { this.edgeType = edgeType; } /** *

* Describes an asynchronous connection, with a value of link. *

* * @return Describes an asynchronous connection, with a value of link. */ public String getEdgeType() { return this.edgeType; } /** *

* Describes an asynchronous connection, with a value of link. *

* * @param edgeType * Describes an asynchronous connection, with a value of link. * @return Returns a reference to this object so that method calls can be chained together. */ public Edge withEdgeType(String edgeType) { setEdgeType(edgeType); return this; } /** *

* A histogram that maps the spread of event age when received by consumers. Age is calculated each time an event is * received. Only populated when EdgeType is link. *

* * @return A histogram that maps the spread of event age when received by consumers. Age is calculated each time an * event is received. Only populated when EdgeType is link. */ public java.util.List getReceivedEventAgeHistogram() { return receivedEventAgeHistogram; } /** *

* A histogram that maps the spread of event age when received by consumers. Age is calculated each time an event is * received. Only populated when EdgeType is link. *

* * @param receivedEventAgeHistogram * A histogram that maps the spread of event age when received by consumers. Age is calculated each time an * event is received. Only populated when EdgeType is link. */ public void setReceivedEventAgeHistogram(java.util.Collection receivedEventAgeHistogram) { if (receivedEventAgeHistogram == null) { this.receivedEventAgeHistogram = null; return; } this.receivedEventAgeHistogram = new java.util.ArrayList(receivedEventAgeHistogram); } /** *

* A histogram that maps the spread of event age when received by consumers. Age is calculated each time an event is * received. Only populated when EdgeType is link. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setReceivedEventAgeHistogram(java.util.Collection)} or * {@link #withReceivedEventAgeHistogram(java.util.Collection)} if you want to override the existing values. *

* * @param receivedEventAgeHistogram * A histogram that maps the spread of event age when received by consumers. Age is calculated each time an * event is received. Only populated when EdgeType is link. * @return Returns a reference to this object so that method calls can be chained together. */ public Edge withReceivedEventAgeHistogram(HistogramEntry... receivedEventAgeHistogram) { if (this.receivedEventAgeHistogram == null) { setReceivedEventAgeHistogram(new java.util.ArrayList(receivedEventAgeHistogram.length)); } for (HistogramEntry ele : receivedEventAgeHistogram) { this.receivedEventAgeHistogram.add(ele); } return this; } /** *

* A histogram that maps the spread of event age when received by consumers. Age is calculated each time an event is * received. Only populated when EdgeType is link. *

* * @param receivedEventAgeHistogram * A histogram that maps the spread of event age when received by consumers. Age is calculated each time an * event is received. Only populated when EdgeType is link. * @return Returns a reference to this object so that method calls can be chained together. */ public Edge withReceivedEventAgeHistogram(java.util.Collection receivedEventAgeHistogram) { setReceivedEventAgeHistogram(receivedEventAgeHistogram); 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 (getReferenceId() != null) sb.append("ReferenceId: ").append(getReferenceId()).append(","); if (getStartTime() != null) sb.append("StartTime: ").append(getStartTime()).append(","); if (getEndTime() != null) sb.append("EndTime: ").append(getEndTime()).append(","); if (getSummaryStatistics() != null) sb.append("SummaryStatistics: ").append(getSummaryStatistics()).append(","); if (getResponseTimeHistogram() != null) sb.append("ResponseTimeHistogram: ").append(getResponseTimeHistogram()).append(","); if (getAliases() != null) sb.append("Aliases: ").append(getAliases()).append(","); if (getEdgeType() != null) sb.append("EdgeType: ").append(getEdgeType()).append(","); if (getReceivedEventAgeHistogram() != null) sb.append("ReceivedEventAgeHistogram: ").append(getReceivedEventAgeHistogram()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof Edge == false) return false; Edge other = (Edge) obj; if (other.getReferenceId() == null ^ this.getReferenceId() == null) return false; if (other.getReferenceId() != null && other.getReferenceId().equals(this.getReferenceId()) == false) return false; if (other.getStartTime() == null ^ this.getStartTime() == null) return false; if (other.getStartTime() != null && other.getStartTime().equals(this.getStartTime()) == false) return false; if (other.getEndTime() == null ^ this.getEndTime() == null) return false; if (other.getEndTime() != null && other.getEndTime().equals(this.getEndTime()) == false) return false; if (other.getSummaryStatistics() == null ^ this.getSummaryStatistics() == null) return false; if (other.getSummaryStatistics() != null && other.getSummaryStatistics().equals(this.getSummaryStatistics()) == false) return false; if (other.getResponseTimeHistogram() == null ^ this.getResponseTimeHistogram() == null) return false; if (other.getResponseTimeHistogram() != null && other.getResponseTimeHistogram().equals(this.getResponseTimeHistogram()) == false) return false; if (other.getAliases() == null ^ this.getAliases() == null) return false; if (other.getAliases() != null && other.getAliases().equals(this.getAliases()) == false) return false; if (other.getEdgeType() == null ^ this.getEdgeType() == null) return false; if (other.getEdgeType() != null && other.getEdgeType().equals(this.getEdgeType()) == false) return false; if (other.getReceivedEventAgeHistogram() == null ^ this.getReceivedEventAgeHistogram() == null) return false; if (other.getReceivedEventAgeHistogram() != null && other.getReceivedEventAgeHistogram().equals(this.getReceivedEventAgeHistogram()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getReferenceId() == null) ? 0 : getReferenceId().hashCode()); hashCode = prime * hashCode + ((getStartTime() == null) ? 0 : getStartTime().hashCode()); hashCode = prime * hashCode + ((getEndTime() == null) ? 0 : getEndTime().hashCode()); hashCode = prime * hashCode + ((getSummaryStatistics() == null) ? 0 : getSummaryStatistics().hashCode()); hashCode = prime * hashCode + ((getResponseTimeHistogram() == null) ? 0 : getResponseTimeHistogram().hashCode()); hashCode = prime * hashCode + ((getAliases() == null) ? 0 : getAliases().hashCode()); hashCode = prime * hashCode + ((getEdgeType() == null) ? 0 : getEdgeType().hashCode()); hashCode = prime * hashCode + ((getReceivedEventAgeHistogram() == null) ? 0 : getReceivedEventAgeHistogram().hashCode()); return hashCode; } @Override public Edge clone() { try { return (Edge) 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.xray.model.transform.EdgeMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy