1 /**
2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 * SPDX-License-Identifier: Apache-2.0.
4 */
5
6 #include <aws/glue/model/UpdateGrokClassifierRequest.h>
7 #include <aws/core/utils/json/JsonSerializer.h>
8
9 #include <utility>
10
11 using namespace Aws::Utils::Json;
12 using namespace Aws::Utils;
13
14 namespace Aws
15 {
16 namespace Glue
17 {
18 namespace Model
19 {
20
UpdateGrokClassifierRequest()21 UpdateGrokClassifierRequest::UpdateGrokClassifierRequest() :
22 m_nameHasBeenSet(false),
23 m_classificationHasBeenSet(false),
24 m_grokPatternHasBeenSet(false),
25 m_customPatternsHasBeenSet(false)
26 {
27 }
28
UpdateGrokClassifierRequest(JsonView jsonValue)29 UpdateGrokClassifierRequest::UpdateGrokClassifierRequest(JsonView jsonValue) :
30 m_nameHasBeenSet(false),
31 m_classificationHasBeenSet(false),
32 m_grokPatternHasBeenSet(false),
33 m_customPatternsHasBeenSet(false)
34 {
35 *this = jsonValue;
36 }
37
operator =(JsonView jsonValue)38 UpdateGrokClassifierRequest& UpdateGrokClassifierRequest::operator =(JsonView jsonValue)
39 {
40 if(jsonValue.ValueExists("Name"))
41 {
42 m_name = jsonValue.GetString("Name");
43
44 m_nameHasBeenSet = true;
45 }
46
47 if(jsonValue.ValueExists("Classification"))
48 {
49 m_classification = jsonValue.GetString("Classification");
50
51 m_classificationHasBeenSet = true;
52 }
53
54 if(jsonValue.ValueExists("GrokPattern"))
55 {
56 m_grokPattern = jsonValue.GetString("GrokPattern");
57
58 m_grokPatternHasBeenSet = true;
59 }
60
61 if(jsonValue.ValueExists("CustomPatterns"))
62 {
63 m_customPatterns = jsonValue.GetString("CustomPatterns");
64
65 m_customPatternsHasBeenSet = true;
66 }
67
68 return *this;
69 }
70
Jsonize() const71 JsonValue UpdateGrokClassifierRequest::Jsonize() const
72 {
73 JsonValue payload;
74
75 if(m_nameHasBeenSet)
76 {
77 payload.WithString("Name", m_name);
78
79 }
80
81 if(m_classificationHasBeenSet)
82 {
83 payload.WithString("Classification", m_classification);
84
85 }
86
87 if(m_grokPatternHasBeenSet)
88 {
89 payload.WithString("GrokPattern", m_grokPattern);
90
91 }
92
93 if(m_customPatternsHasBeenSet)
94 {
95 payload.WithString("CustomPatterns", m_customPatterns);
96
97 }
98
99 return payload;
100 }
101
102 } // namespace Model
103 } // namespace Glue
104 } // namespace Aws
105