/* * 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; /** *
* A collection of segment documents with matching trace IDs. *
* * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class Trace implements Serializable, Cloneable, StructuredPojo { /** ** The unique identifier for the request that generated the trace's segments and subsegments. *
*/ private String id; /** ** The length of time in seconds between the start time of the root segment and the end time of the last segment * that completed. *
*/ private Double duration; /** *
* LimitExceeded is set to true when the trace has exceeded the Trace document size
limit. For more
* information about this limit and other X-Ray limits and quotas, see Amazon Web Services X-Ray endpoints and
* quotas.
*
* Segment documents for the segments and subsegments that comprise the trace. *
*/ private java.util.List* The unique identifier for the request that generated the trace's segments and subsegments. *
* * @param id * The unique identifier for the request that generated the trace's segments and subsegments. */ public void setId(String id) { this.id = id; } /** ** The unique identifier for the request that generated the trace's segments and subsegments. *
* * @return The unique identifier for the request that generated the trace's segments and subsegments. */ public String getId() { return this.id; } /** ** The unique identifier for the request that generated the trace's segments and subsegments. *
* * @param id * The unique identifier for the request that generated the trace's segments and subsegments. * @return Returns a reference to this object so that method calls can be chained together. */ public Trace withId(String id) { setId(id); return this; } /** ** The length of time in seconds between the start time of the root segment and the end time of the last segment * that completed. *
* * @param duration * The length of time in seconds between the start time of the root segment and the end time of the last * segment that completed. */ public void setDuration(Double duration) { this.duration = duration; } /** ** The length of time in seconds between the start time of the root segment and the end time of the last segment * that completed. *
* * @return The length of time in seconds between the start time of the root segment and the end time of the last * segment that completed. */ public Double getDuration() { return this.duration; } /** ** The length of time in seconds between the start time of the root segment and the end time of the last segment * that completed. *
* * @param duration * The length of time in seconds between the start time of the root segment and the end time of the last * segment that completed. * @return Returns a reference to this object so that method calls can be chained together. */ public Trace withDuration(Double duration) { setDuration(duration); return this; } /** *
* LimitExceeded is set to true when the trace has exceeded the Trace document size
limit. For more
* information about this limit and other X-Ray limits and quotas, see Amazon Web Services X-Ray endpoints and
* quotas.
*
Trace document size
limit. For
* more information about this limit and other X-Ray limits and quotas, see Amazon Web Services X-Ray endpoints and
* quotas.
*/
public void setLimitExceeded(Boolean limitExceeded) {
this.limitExceeded = limitExceeded;
}
/**
*
* LimitExceeded is set to true when the trace has exceeded the Trace document size
limit. For more
* information about this limit and other X-Ray limits and quotas, see Amazon Web Services X-Ray endpoints and
* quotas.
*
Trace document size
limit. For
* more information about this limit and other X-Ray limits and quotas, see Amazon Web Services X-Ray endpoints and
* quotas.
*/
public Boolean getLimitExceeded() {
return this.limitExceeded;
}
/**
*
* LimitExceeded is set to true when the trace has exceeded the Trace document size
limit. For more
* information about this limit and other X-Ray limits and quotas, see Amazon Web Services X-Ray endpoints and
* quotas.
*
Trace document size
limit. For
* more information about this limit and other X-Ray limits and quotas, see Amazon Web Services X-Ray endpoints and
* quotas.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Trace withLimitExceeded(Boolean limitExceeded) {
setLimitExceeded(limitExceeded);
return this;
}
/**
*
* LimitExceeded is set to true when the trace has exceeded the Trace document size
limit. For more
* information about this limit and other X-Ray limits and quotas, see Amazon Web Services X-Ray endpoints and
* quotas.
*
Trace document size
limit. For
* more information about this limit and other X-Ray limits and quotas, see Amazon Web Services X-Ray endpoints and
* quotas.
*/
public Boolean isLimitExceeded() {
return this.limitExceeded;
}
/**
* * Segment documents for the segments and subsegments that comprise the trace. *
* * @return Segment documents for the segments and subsegments that comprise the trace. */ public java.util.List* Segment documents for the segments and subsegments that comprise the trace. *
* * @param segments * Segment documents for the segments and subsegments that comprise the trace. */ public void setSegments(java.util.Collection* Segment documents for the segments and subsegments that comprise the trace. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setSegments(java.util.Collection)} or {@link #withSegments(java.util.Collection)} if you want to override * the existing values. *
* * @param segments * Segment documents for the segments and subsegments that comprise the trace. * @return Returns a reference to this object so that method calls can be chained together. */ public Trace withSegments(Segment... segments) { if (this.segments == null) { setSegments(new java.util.ArrayList* Segment documents for the segments and subsegments that comprise the trace. *
* * @param segments * Segment documents for the segments and subsegments that comprise the trace. * @return Returns a reference to this object so that method calls can be chained together. */ public Trace withSegments(java.util.Collection