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/databrew/GlueDataBrew_EXPORTS.h>
8 #include <aws/databrew/model/SampleMode.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 GlueDataBrew
22 {
23 namespace Model
24 {
25 
26   /**
27    * <p>A sample configuration for profile jobs only, which determines the number of
28    * rows on which the profile job is run. If a <code>JobSample</code> value isn't
29    * provided, the default is used. The default value is CUSTOM_ROWS for the mode
30    * parameter and 20,000 for the size parameter.</p><p><h3>See Also:</h3>   <a
31    * href="http://docs.aws.amazon.com/goto/WebAPI/databrew-2017-07-25/JobSample">AWS
32    * API Reference</a></p>
33    */
34   class AWS_GLUEDATABREW_API JobSample
35   {
36   public:
37     JobSample();
38     JobSample(Aws::Utils::Json::JsonView jsonValue);
39     JobSample& operator=(Aws::Utils::Json::JsonView jsonValue);
40     Aws::Utils::Json::JsonValue Jsonize() const;
41 
42 
43     /**
44      * <p>A value that determines whether the profile job is run on the entire dataset
45      * or a specified number of rows. This value must be one of the following:</p> <ul>
46      * <li> <p>FULL_DATASET - The profile job is run on the entire dataset.</p> </li>
47      * <li> <p>CUSTOM_ROWS - The profile job is run on the number of rows specified in
48      * the <code>Size</code> parameter.</p> </li> </ul>
49      */
GetMode()50     inline const SampleMode& GetMode() const{ return m_mode; }
51 
52     /**
53      * <p>A value that determines whether the profile job is run on the entire dataset
54      * or a specified number of rows. This value must be one of the following:</p> <ul>
55      * <li> <p>FULL_DATASET - The profile job is run on the entire dataset.</p> </li>
56      * <li> <p>CUSTOM_ROWS - The profile job is run on the number of rows specified in
57      * the <code>Size</code> parameter.</p> </li> </ul>
58      */
ModeHasBeenSet()59     inline bool ModeHasBeenSet() const { return m_modeHasBeenSet; }
60 
61     /**
62      * <p>A value that determines whether the profile job is run on the entire dataset
63      * or a specified number of rows. This value must be one of the following:</p> <ul>
64      * <li> <p>FULL_DATASET - The profile job is run on the entire dataset.</p> </li>
65      * <li> <p>CUSTOM_ROWS - The profile job is run on the number of rows specified in
66      * the <code>Size</code> parameter.</p> </li> </ul>
67      */
SetMode(const SampleMode & value)68     inline void SetMode(const SampleMode& value) { m_modeHasBeenSet = true; m_mode = value; }
69 
70     /**
71      * <p>A value that determines whether the profile job is run on the entire dataset
72      * or a specified number of rows. This value must be one of the following:</p> <ul>
73      * <li> <p>FULL_DATASET - The profile job is run on the entire dataset.</p> </li>
74      * <li> <p>CUSTOM_ROWS - The profile job is run on the number of rows specified in
75      * the <code>Size</code> parameter.</p> </li> </ul>
76      */
SetMode(SampleMode && value)77     inline void SetMode(SampleMode&& value) { m_modeHasBeenSet = true; m_mode = std::move(value); }
78 
79     /**
80      * <p>A value that determines whether the profile job is run on the entire dataset
81      * or a specified number of rows. This value must be one of the following:</p> <ul>
82      * <li> <p>FULL_DATASET - The profile job is run on the entire dataset.</p> </li>
83      * <li> <p>CUSTOM_ROWS - The profile job is run on the number of rows specified in
84      * the <code>Size</code> parameter.</p> </li> </ul>
85      */
WithMode(const SampleMode & value)86     inline JobSample& WithMode(const SampleMode& value) { SetMode(value); return *this;}
87 
88     /**
89      * <p>A value that determines whether the profile job is run on the entire dataset
90      * or a specified number of rows. This value must be one of the following:</p> <ul>
91      * <li> <p>FULL_DATASET - The profile job is run on the entire dataset.</p> </li>
92      * <li> <p>CUSTOM_ROWS - The profile job is run on the number of rows specified in
93      * the <code>Size</code> parameter.</p> </li> </ul>
94      */
WithMode(SampleMode && value)95     inline JobSample& WithMode(SampleMode&& value) { SetMode(std::move(value)); return *this;}
96 
97 
98     /**
99      * <p>The <code>Size</code> parameter is only required when the mode is
100      * CUSTOM_ROWS. The profile job is run on the specified number of rows. The maximum
101      * value for size is Long.MAX_VALUE.</p> <p>Long.MAX_VALUE =
102      * 9223372036854775807</p>
103      */
GetSize()104     inline long long GetSize() const{ return m_size; }
105 
106     /**
107      * <p>The <code>Size</code> parameter is only required when the mode is
108      * CUSTOM_ROWS. The profile job is run on the specified number of rows. The maximum
109      * value for size is Long.MAX_VALUE.</p> <p>Long.MAX_VALUE =
110      * 9223372036854775807</p>
111      */
SizeHasBeenSet()112     inline bool SizeHasBeenSet() const { return m_sizeHasBeenSet; }
113 
114     /**
115      * <p>The <code>Size</code> parameter is only required when the mode is
116      * CUSTOM_ROWS. The profile job is run on the specified number of rows. The maximum
117      * value for size is Long.MAX_VALUE.</p> <p>Long.MAX_VALUE =
118      * 9223372036854775807</p>
119      */
SetSize(long long value)120     inline void SetSize(long long value) { m_sizeHasBeenSet = true; m_size = value; }
121 
122     /**
123      * <p>The <code>Size</code> parameter is only required when the mode is
124      * CUSTOM_ROWS. The profile job is run on the specified number of rows. The maximum
125      * value for size is Long.MAX_VALUE.</p> <p>Long.MAX_VALUE =
126      * 9223372036854775807</p>
127      */
WithSize(long long value)128     inline JobSample& WithSize(long long value) { SetSize(value); return *this;}
129 
130   private:
131 
132     SampleMode m_mode;
133     bool m_modeHasBeenSet;
134 
135     long long m_size;
136     bool m_sizeHasBeenSet;
137   };
138 
139 } // namespace Model
140 } // namespace GlueDataBrew
141 } // namespace Aws
142