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/glue/Glue_EXPORTS.h>
8 #include <aws/core/utils/memory/stl/AWSString.h>
9 #include <aws/glue/model/PrincipalType.h>
10 #include <aws/core/utils/DateTime.h>
11 #include <aws/core/utils/memory/stl/AWSVector.h>
12 #include <aws/glue/model/ResourceUri.h>
13 #include <utility>
14 
15 namespace Aws
16 {
17 namespace Utils
18 {
19 namespace Json
20 {
21   class JsonValue;
22   class JsonView;
23 } // namespace Json
24 } // namespace Utils
25 namespace Glue
26 {
27 namespace Model
28 {
29 
30   /**
31    * <p>Represents the equivalent of a Hive user-defined function (<code>UDF</code>)
32    * definition.</p><p><h3>See Also:</h3>   <a
33    * href="http://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/UserDefinedFunction">AWS
34    * API Reference</a></p>
35    */
36   class AWS_GLUE_API UserDefinedFunction
37   {
38   public:
39     UserDefinedFunction();
40     UserDefinedFunction(Aws::Utils::Json::JsonView jsonValue);
41     UserDefinedFunction& operator=(Aws::Utils::Json::JsonView jsonValue);
42     Aws::Utils::Json::JsonValue Jsonize() const;
43 
44 
45     /**
46      * <p>The name of the function.</p>
47      */
GetFunctionName()48     inline const Aws::String& GetFunctionName() const{ return m_functionName; }
49 
50     /**
51      * <p>The name of the function.</p>
52      */
FunctionNameHasBeenSet()53     inline bool FunctionNameHasBeenSet() const { return m_functionNameHasBeenSet; }
54 
55     /**
56      * <p>The name of the function.</p>
57      */
SetFunctionName(const Aws::String & value)58     inline void SetFunctionName(const Aws::String& value) { m_functionNameHasBeenSet = true; m_functionName = value; }
59 
60     /**
61      * <p>The name of the function.</p>
62      */
SetFunctionName(Aws::String && value)63     inline void SetFunctionName(Aws::String&& value) { m_functionNameHasBeenSet = true; m_functionName = std::move(value); }
64 
65     /**
66      * <p>The name of the function.</p>
67      */
SetFunctionName(const char * value)68     inline void SetFunctionName(const char* value) { m_functionNameHasBeenSet = true; m_functionName.assign(value); }
69 
70     /**
71      * <p>The name of the function.</p>
72      */
WithFunctionName(const Aws::String & value)73     inline UserDefinedFunction& WithFunctionName(const Aws::String& value) { SetFunctionName(value); return *this;}
74 
75     /**
76      * <p>The name of the function.</p>
77      */
WithFunctionName(Aws::String && value)78     inline UserDefinedFunction& WithFunctionName(Aws::String&& value) { SetFunctionName(std::move(value)); return *this;}
79 
80     /**
81      * <p>The name of the function.</p>
82      */
WithFunctionName(const char * value)83     inline UserDefinedFunction& WithFunctionName(const char* value) { SetFunctionName(value); return *this;}
84 
85 
86     /**
87      * <p>The name of the catalog database that contains the function.</p>
88      */
GetDatabaseName()89     inline const Aws::String& GetDatabaseName() const{ return m_databaseName; }
90 
91     /**
92      * <p>The name of the catalog database that contains the function.</p>
93      */
DatabaseNameHasBeenSet()94     inline bool DatabaseNameHasBeenSet() const { return m_databaseNameHasBeenSet; }
95 
96     /**
97      * <p>The name of the catalog database that contains the function.</p>
98      */
SetDatabaseName(const Aws::String & value)99     inline void SetDatabaseName(const Aws::String& value) { m_databaseNameHasBeenSet = true; m_databaseName = value; }
100 
101     /**
102      * <p>The name of the catalog database that contains the function.</p>
103      */
SetDatabaseName(Aws::String && value)104     inline void SetDatabaseName(Aws::String&& value) { m_databaseNameHasBeenSet = true; m_databaseName = std::move(value); }
105 
106     /**
107      * <p>The name of the catalog database that contains the function.</p>
108      */
SetDatabaseName(const char * value)109     inline void SetDatabaseName(const char* value) { m_databaseNameHasBeenSet = true; m_databaseName.assign(value); }
110 
111     /**
112      * <p>The name of the catalog database that contains the function.</p>
113      */
WithDatabaseName(const Aws::String & value)114     inline UserDefinedFunction& WithDatabaseName(const Aws::String& value) { SetDatabaseName(value); return *this;}
115 
116     /**
117      * <p>The name of the catalog database that contains the function.</p>
118      */
WithDatabaseName(Aws::String && value)119     inline UserDefinedFunction& WithDatabaseName(Aws::String&& value) { SetDatabaseName(std::move(value)); return *this;}
120 
121     /**
122      * <p>The name of the catalog database that contains the function.</p>
123      */
WithDatabaseName(const char * value)124     inline UserDefinedFunction& WithDatabaseName(const char* value) { SetDatabaseName(value); return *this;}
125 
126 
127     /**
128      * <p>The Java class that contains the function code.</p>
129      */
GetClassName()130     inline const Aws::String& GetClassName() const{ return m_className; }
131 
132     /**
133      * <p>The Java class that contains the function code.</p>
134      */
ClassNameHasBeenSet()135     inline bool ClassNameHasBeenSet() const { return m_classNameHasBeenSet; }
136 
137     /**
138      * <p>The Java class that contains the function code.</p>
139      */
SetClassName(const Aws::String & value)140     inline void SetClassName(const Aws::String& value) { m_classNameHasBeenSet = true; m_className = value; }
141 
142     /**
143      * <p>The Java class that contains the function code.</p>
144      */
SetClassName(Aws::String && value)145     inline void SetClassName(Aws::String&& value) { m_classNameHasBeenSet = true; m_className = std::move(value); }
146 
147     /**
148      * <p>The Java class that contains the function code.</p>
149      */
SetClassName(const char * value)150     inline void SetClassName(const char* value) { m_classNameHasBeenSet = true; m_className.assign(value); }
151 
152     /**
153      * <p>The Java class that contains the function code.</p>
154      */
WithClassName(const Aws::String & value)155     inline UserDefinedFunction& WithClassName(const Aws::String& value) { SetClassName(value); return *this;}
156 
157     /**
158      * <p>The Java class that contains the function code.</p>
159      */
WithClassName(Aws::String && value)160     inline UserDefinedFunction& WithClassName(Aws::String&& value) { SetClassName(std::move(value)); return *this;}
161 
162     /**
163      * <p>The Java class that contains the function code.</p>
164      */
WithClassName(const char * value)165     inline UserDefinedFunction& WithClassName(const char* value) { SetClassName(value); return *this;}
166 
167 
168     /**
169      * <p>The owner of the function.</p>
170      */
GetOwnerName()171     inline const Aws::String& GetOwnerName() const{ return m_ownerName; }
172 
173     /**
174      * <p>The owner of the function.</p>
175      */
OwnerNameHasBeenSet()176     inline bool OwnerNameHasBeenSet() const { return m_ownerNameHasBeenSet; }
177 
178     /**
179      * <p>The owner of the function.</p>
180      */
SetOwnerName(const Aws::String & value)181     inline void SetOwnerName(const Aws::String& value) { m_ownerNameHasBeenSet = true; m_ownerName = value; }
182 
183     /**
184      * <p>The owner of the function.</p>
185      */
SetOwnerName(Aws::String && value)186     inline void SetOwnerName(Aws::String&& value) { m_ownerNameHasBeenSet = true; m_ownerName = std::move(value); }
187 
188     /**
189      * <p>The owner of the function.</p>
190      */
SetOwnerName(const char * value)191     inline void SetOwnerName(const char* value) { m_ownerNameHasBeenSet = true; m_ownerName.assign(value); }
192 
193     /**
194      * <p>The owner of the function.</p>
195      */
WithOwnerName(const Aws::String & value)196     inline UserDefinedFunction& WithOwnerName(const Aws::String& value) { SetOwnerName(value); return *this;}
197 
198     /**
199      * <p>The owner of the function.</p>
200      */
WithOwnerName(Aws::String && value)201     inline UserDefinedFunction& WithOwnerName(Aws::String&& value) { SetOwnerName(std::move(value)); return *this;}
202 
203     /**
204      * <p>The owner of the function.</p>
205      */
WithOwnerName(const char * value)206     inline UserDefinedFunction& WithOwnerName(const char* value) { SetOwnerName(value); return *this;}
207 
208 
209     /**
210      * <p>The owner type.</p>
211      */
GetOwnerType()212     inline const PrincipalType& GetOwnerType() const{ return m_ownerType; }
213 
214     /**
215      * <p>The owner type.</p>
216      */
OwnerTypeHasBeenSet()217     inline bool OwnerTypeHasBeenSet() const { return m_ownerTypeHasBeenSet; }
218 
219     /**
220      * <p>The owner type.</p>
221      */
SetOwnerType(const PrincipalType & value)222     inline void SetOwnerType(const PrincipalType& value) { m_ownerTypeHasBeenSet = true; m_ownerType = value; }
223 
224     /**
225      * <p>The owner type.</p>
226      */
SetOwnerType(PrincipalType && value)227     inline void SetOwnerType(PrincipalType&& value) { m_ownerTypeHasBeenSet = true; m_ownerType = std::move(value); }
228 
229     /**
230      * <p>The owner type.</p>
231      */
WithOwnerType(const PrincipalType & value)232     inline UserDefinedFunction& WithOwnerType(const PrincipalType& value) { SetOwnerType(value); return *this;}
233 
234     /**
235      * <p>The owner type.</p>
236      */
WithOwnerType(PrincipalType && value)237     inline UserDefinedFunction& WithOwnerType(PrincipalType&& value) { SetOwnerType(std::move(value)); return *this;}
238 
239 
240     /**
241      * <p>The time at which the function was created.</p>
242      */
GetCreateTime()243     inline const Aws::Utils::DateTime& GetCreateTime() const{ return m_createTime; }
244 
245     /**
246      * <p>The time at which the function was created.</p>
247      */
CreateTimeHasBeenSet()248     inline bool CreateTimeHasBeenSet() const { return m_createTimeHasBeenSet; }
249 
250     /**
251      * <p>The time at which the function was created.</p>
252      */
SetCreateTime(const Aws::Utils::DateTime & value)253     inline void SetCreateTime(const Aws::Utils::DateTime& value) { m_createTimeHasBeenSet = true; m_createTime = value; }
254 
255     /**
256      * <p>The time at which the function was created.</p>
257      */
SetCreateTime(Aws::Utils::DateTime && value)258     inline void SetCreateTime(Aws::Utils::DateTime&& value) { m_createTimeHasBeenSet = true; m_createTime = std::move(value); }
259 
260     /**
261      * <p>The time at which the function was created.</p>
262      */
WithCreateTime(const Aws::Utils::DateTime & value)263     inline UserDefinedFunction& WithCreateTime(const Aws::Utils::DateTime& value) { SetCreateTime(value); return *this;}
264 
265     /**
266      * <p>The time at which the function was created.</p>
267      */
WithCreateTime(Aws::Utils::DateTime && value)268     inline UserDefinedFunction& WithCreateTime(Aws::Utils::DateTime&& value) { SetCreateTime(std::move(value)); return *this;}
269 
270 
271     /**
272      * <p>The resource URIs for the function.</p>
273      */
GetResourceUris()274     inline const Aws::Vector<ResourceUri>& GetResourceUris() const{ return m_resourceUris; }
275 
276     /**
277      * <p>The resource URIs for the function.</p>
278      */
ResourceUrisHasBeenSet()279     inline bool ResourceUrisHasBeenSet() const { return m_resourceUrisHasBeenSet; }
280 
281     /**
282      * <p>The resource URIs for the function.</p>
283      */
SetResourceUris(const Aws::Vector<ResourceUri> & value)284     inline void SetResourceUris(const Aws::Vector<ResourceUri>& value) { m_resourceUrisHasBeenSet = true; m_resourceUris = value; }
285 
286     /**
287      * <p>The resource URIs for the function.</p>
288      */
SetResourceUris(Aws::Vector<ResourceUri> && value)289     inline void SetResourceUris(Aws::Vector<ResourceUri>&& value) { m_resourceUrisHasBeenSet = true; m_resourceUris = std::move(value); }
290 
291     /**
292      * <p>The resource URIs for the function.</p>
293      */
WithResourceUris(const Aws::Vector<ResourceUri> & value)294     inline UserDefinedFunction& WithResourceUris(const Aws::Vector<ResourceUri>& value) { SetResourceUris(value); return *this;}
295 
296     /**
297      * <p>The resource URIs for the function.</p>
298      */
WithResourceUris(Aws::Vector<ResourceUri> && value)299     inline UserDefinedFunction& WithResourceUris(Aws::Vector<ResourceUri>&& value) { SetResourceUris(std::move(value)); return *this;}
300 
301     /**
302      * <p>The resource URIs for the function.</p>
303      */
AddResourceUris(const ResourceUri & value)304     inline UserDefinedFunction& AddResourceUris(const ResourceUri& value) { m_resourceUrisHasBeenSet = true; m_resourceUris.push_back(value); return *this; }
305 
306     /**
307      * <p>The resource URIs for the function.</p>
308      */
AddResourceUris(ResourceUri && value)309     inline UserDefinedFunction& AddResourceUris(ResourceUri&& value) { m_resourceUrisHasBeenSet = true; m_resourceUris.push_back(std::move(value)); return *this; }
310 
311 
312     /**
313      * <p>The ID of the Data Catalog in which the function resides.</p>
314      */
GetCatalogId()315     inline const Aws::String& GetCatalogId() const{ return m_catalogId; }
316 
317     /**
318      * <p>The ID of the Data Catalog in which the function resides.</p>
319      */
CatalogIdHasBeenSet()320     inline bool CatalogIdHasBeenSet() const { return m_catalogIdHasBeenSet; }
321 
322     /**
323      * <p>The ID of the Data Catalog in which the function resides.</p>
324      */
SetCatalogId(const Aws::String & value)325     inline void SetCatalogId(const Aws::String& value) { m_catalogIdHasBeenSet = true; m_catalogId = value; }
326 
327     /**
328      * <p>The ID of the Data Catalog in which the function resides.</p>
329      */
SetCatalogId(Aws::String && value)330     inline void SetCatalogId(Aws::String&& value) { m_catalogIdHasBeenSet = true; m_catalogId = std::move(value); }
331 
332     /**
333      * <p>The ID of the Data Catalog in which the function resides.</p>
334      */
SetCatalogId(const char * value)335     inline void SetCatalogId(const char* value) { m_catalogIdHasBeenSet = true; m_catalogId.assign(value); }
336 
337     /**
338      * <p>The ID of the Data Catalog in which the function resides.</p>
339      */
WithCatalogId(const Aws::String & value)340     inline UserDefinedFunction& WithCatalogId(const Aws::String& value) { SetCatalogId(value); return *this;}
341 
342     /**
343      * <p>The ID of the Data Catalog in which the function resides.</p>
344      */
WithCatalogId(Aws::String && value)345     inline UserDefinedFunction& WithCatalogId(Aws::String&& value) { SetCatalogId(std::move(value)); return *this;}
346 
347     /**
348      * <p>The ID of the Data Catalog in which the function resides.</p>
349      */
WithCatalogId(const char * value)350     inline UserDefinedFunction& WithCatalogId(const char* value) { SetCatalogId(value); return *this;}
351 
352   private:
353 
354     Aws::String m_functionName;
355     bool m_functionNameHasBeenSet;
356 
357     Aws::String m_databaseName;
358     bool m_databaseNameHasBeenSet;
359 
360     Aws::String m_className;
361     bool m_classNameHasBeenSet;
362 
363     Aws::String m_ownerName;
364     bool m_ownerNameHasBeenSet;
365 
366     PrincipalType m_ownerType;
367     bool m_ownerTypeHasBeenSet;
368 
369     Aws::Utils::DateTime m_createTime;
370     bool m_createTimeHasBeenSet;
371 
372     Aws::Vector<ResourceUri> m_resourceUris;
373     bool m_resourceUrisHasBeenSet;
374 
375     Aws::String m_catalogId;
376     bool m_catalogIdHasBeenSet;
377   };
378 
379 } // namespace Model
380 } // namespace Glue
381 } // namespace Aws
382