1 /**
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  * SPDX-License-Identifier: Apache-2.0.
4  */
5 
6 #pragma once
7 #include <aws/xray/XRay_EXPORTS.h>
8 #include <aws/core/utils/memory/stl/AWSString.h>
9 #include <utility>
10 
11 namespace Aws
12 {
13 namespace Utils
14 {
15 namespace Json
16 {
17   class JsonValue;
18   class JsonView;
19 } // namespace Json
20 } // namespace Utils
21 namespace XRay
22 {
23 namespace Model
24 {
25 
26   /**
27    * <p>A segment from a trace that has been ingested by the X-Ray service. The
28    * segment can be compiled from documents uploaded with <a
29    * href="https://docs.aws.amazon.com/xray/latest/api/API_PutTraceSegments.html">PutTraceSegments</a>,
30    * or an <code>inferred</code> segment for a downstream service, generated from a
31    * subsegment sent by the service that called it.</p> <p>For the full segment
32    * document schema, see <a
33    * href="https://docs.aws.amazon.com/xray/latest/devguide/xray-api-segmentdocuments.html">Amazon
34    * Web Services X-Ray Segment Documents</a> in the <i>Amazon Web Services X-Ray
35    * Developer Guide</i>.</p><p><h3>See Also:</h3>   <a
36    * href="http://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/Segment">AWS API
37    * Reference</a></p>
38    */
39   class AWS_XRAY_API Segment
40   {
41   public:
42     Segment();
43     Segment(Aws::Utils::Json::JsonView jsonValue);
44     Segment& operator=(Aws::Utils::Json::JsonView jsonValue);
45     Aws::Utils::Json::JsonValue Jsonize() const;
46 
47 
48     /**
49      * <p>The segment's ID.</p>
50      */
GetId()51     inline const Aws::String& GetId() const{ return m_id; }
52 
53     /**
54      * <p>The segment's ID.</p>
55      */
IdHasBeenSet()56     inline bool IdHasBeenSet() const { return m_idHasBeenSet; }
57 
58     /**
59      * <p>The segment's ID.</p>
60      */
SetId(const Aws::String & value)61     inline void SetId(const Aws::String& value) { m_idHasBeenSet = true; m_id = value; }
62 
63     /**
64      * <p>The segment's ID.</p>
65      */
SetId(Aws::String && value)66     inline void SetId(Aws::String&& value) { m_idHasBeenSet = true; m_id = std::move(value); }
67 
68     /**
69      * <p>The segment's ID.</p>
70      */
SetId(const char * value)71     inline void SetId(const char* value) { m_idHasBeenSet = true; m_id.assign(value); }
72 
73     /**
74      * <p>The segment's ID.</p>
75      */
WithId(const Aws::String & value)76     inline Segment& WithId(const Aws::String& value) { SetId(value); return *this;}
77 
78     /**
79      * <p>The segment's ID.</p>
80      */
WithId(Aws::String && value)81     inline Segment& WithId(Aws::String&& value) { SetId(std::move(value)); return *this;}
82 
83     /**
84      * <p>The segment's ID.</p>
85      */
WithId(const char * value)86     inline Segment& WithId(const char* value) { SetId(value); return *this;}
87 
88 
89     /**
90      * <p>The segment document.</p>
91      */
GetDocument()92     inline const Aws::String& GetDocument() const{ return m_document; }
93 
94     /**
95      * <p>The segment document.</p>
96      */
DocumentHasBeenSet()97     inline bool DocumentHasBeenSet() const { return m_documentHasBeenSet; }
98 
99     /**
100      * <p>The segment document.</p>
101      */
SetDocument(const Aws::String & value)102     inline void SetDocument(const Aws::String& value) { m_documentHasBeenSet = true; m_document = value; }
103 
104     /**
105      * <p>The segment document.</p>
106      */
SetDocument(Aws::String && value)107     inline void SetDocument(Aws::String&& value) { m_documentHasBeenSet = true; m_document = std::move(value); }
108 
109     /**
110      * <p>The segment document.</p>
111      */
SetDocument(const char * value)112     inline void SetDocument(const char* value) { m_documentHasBeenSet = true; m_document.assign(value); }
113 
114     /**
115      * <p>The segment document.</p>
116      */
WithDocument(const Aws::String & value)117     inline Segment& WithDocument(const Aws::String& value) { SetDocument(value); return *this;}
118 
119     /**
120      * <p>The segment document.</p>
121      */
WithDocument(Aws::String && value)122     inline Segment& WithDocument(Aws::String&& value) { SetDocument(std::move(value)); return *this;}
123 
124     /**
125      * <p>The segment document.</p>
126      */
WithDocument(const char * value)127     inline Segment& WithDocument(const char* value) { SetDocument(value); return *this;}
128 
129   private:
130 
131     Aws::String m_id;
132     bool m_idHasBeenSet;
133 
134     Aws::String m_document;
135     bool m_documentHasBeenSet;
136   };
137 
138 } // namespace Model
139 } // namespace XRay
140 } // namespace Aws
141