/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace XRay { namespace Model { /** *

A collection of segment documents with matching trace IDs.

See * Also:

AWS API * Reference

*/ class Trace { public: AWS_XRAY_API Trace(); AWS_XRAY_API Trace(Aws::Utils::Json::JsonView jsonValue); AWS_XRAY_API Trace& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_XRAY_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

The unique identifier for the request that generated the trace's segments and * subsegments.

*/ inline const Aws::String& GetId() const{ return m_id; } /** *

The unique identifier for the request that generated the trace's segments and * subsegments.

*/ inline bool IdHasBeenSet() const { return m_idHasBeenSet; } /** *

The unique identifier for the request that generated the trace's segments and * subsegments.

*/ inline void SetId(const Aws::String& value) { m_idHasBeenSet = true; m_id = value; } /** *

The unique identifier for the request that generated the trace's segments and * subsegments.

*/ inline void SetId(Aws::String&& value) { m_idHasBeenSet = true; m_id = std::move(value); } /** *

The unique identifier for the request that generated the trace's segments and * subsegments.

*/ inline void SetId(const char* value) { m_idHasBeenSet = true; m_id.assign(value); } /** *

The unique identifier for the request that generated the trace's segments and * subsegments.

*/ inline Trace& WithId(const Aws::String& value) { SetId(value); return *this;} /** *

The unique identifier for the request that generated the trace's segments and * subsegments.

*/ inline Trace& WithId(Aws::String&& value) { SetId(std::move(value)); return *this;} /** *

The unique identifier for the request that generated the trace's segments and * subsegments.

*/ inline Trace& WithId(const char* value) { SetId(value); 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.

*/ inline double GetDuration() const{ return m_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.

*/ inline bool DurationHasBeenSet() const { return m_durationHasBeenSet; } /** *

The length of time in seconds between the start time of the root segment and * the end time of the last segment that completed.

*/ inline void SetDuration(double value) { m_durationHasBeenSet = true; m_duration = value; } /** *

The length of time in seconds between the start time of the root segment and * the end time of the last segment that completed.

*/ inline Trace& WithDuration(double value) { SetDuration(value); 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.

*/ inline bool GetLimitExceeded() const{ return m_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.

*/ inline bool LimitExceededHasBeenSet() const { return m_limitExceededHasBeenSet; } /** *

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.

*/ inline void SetLimitExceeded(bool value) { m_limitExceededHasBeenSet = true; m_limitExceeded = value; } /** *

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.

*/ inline Trace& WithLimitExceeded(bool value) { SetLimitExceeded(value); return *this;} /** *

Segment documents for the segments and subsegments that comprise the * trace.

*/ inline const Aws::Vector& GetSegments() const{ return m_segments; } /** *

Segment documents for the segments and subsegments that comprise the * trace.

*/ inline bool SegmentsHasBeenSet() const { return m_segmentsHasBeenSet; } /** *

Segment documents for the segments and subsegments that comprise the * trace.

*/ inline void SetSegments(const Aws::Vector& value) { m_segmentsHasBeenSet = true; m_segments = value; } /** *

Segment documents for the segments and subsegments that comprise the * trace.

*/ inline void SetSegments(Aws::Vector&& value) { m_segmentsHasBeenSet = true; m_segments = std::move(value); } /** *

Segment documents for the segments and subsegments that comprise the * trace.

*/ inline Trace& WithSegments(const Aws::Vector& value) { SetSegments(value); return *this;} /** *

Segment documents for the segments and subsegments that comprise the * trace.

*/ inline Trace& WithSegments(Aws::Vector&& value) { SetSegments(std::move(value)); return *this;} /** *

Segment documents for the segments and subsegments that comprise the * trace.

*/ inline Trace& AddSegments(const Segment& value) { m_segmentsHasBeenSet = true; m_segments.push_back(value); return *this; } /** *

Segment documents for the segments and subsegments that comprise the * trace.

*/ inline Trace& AddSegments(Segment&& value) { m_segmentsHasBeenSet = true; m_segments.push_back(std::move(value)); return *this; } private: Aws::String m_id; bool m_idHasBeenSet = false; double m_duration; bool m_durationHasBeenSet = false; bool m_limitExceeded; bool m_limitExceededHasBeenSet = false; Aws::Vector m_segments; bool m_segmentsHasBeenSet = false; }; } // namespace Model } // namespace XRay } // namespace Aws