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

A segment from a trace that has been ingested by the X-Ray service. The * segment can be compiled from documents uploaded with PutTraceSegments, or * an inferred segment for a downstream service, generated from a * subsegment sent by the service that called it.

For the full segment * document schema, see AWS * X-Ray Segment Documents in the AWS X-Ray Developer * Guide.

See Also:

AWS API * Reference

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

The segment's ID.

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

The segment's ID.

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

The segment's ID.

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

The segment's ID.

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

The segment's ID.

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

The segment's ID.

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

The segment's ID.

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

The segment's ID.

*/ inline Segment& WithId(const char* value) { SetId(value); return *this;} /** *

The segment document.

*/ inline const Aws::String& GetDocument() const{ return m_document; } /** *

The segment document.

*/ inline bool DocumentHasBeenSet() const { return m_documentHasBeenSet; } /** *

The segment document.

*/ inline void SetDocument(const Aws::String& value) { m_documentHasBeenSet = true; m_document = value; } /** *

The segment document.

*/ inline void SetDocument(Aws::String&& value) { m_documentHasBeenSet = true; m_document = std::move(value); } /** *

The segment document.

*/ inline void SetDocument(const char* value) { m_documentHasBeenSet = true; m_document.assign(value); } /** *

The segment document.

*/ inline Segment& WithDocument(const Aws::String& value) { SetDocument(value); return *this;} /** *

The segment document.

*/ inline Segment& WithDocument(Aws::String&& value) { SetDocument(std::move(value)); return *this;} /** *

The segment document.

*/ inline Segment& WithDocument(const char* value) { SetDocument(value); return *this;} private: Aws::String m_id; bool m_idHasBeenSet; Aws::String m_document; bool m_documentHasBeenSet; }; } // namespace Model } // namespace XRay } // namespace Aws