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/memory/stl/AWSVector.h>
11 #include <aws/glue/model/ResourceUri.h>
12 #include <utility>
13 
14 namespace Aws
15 {
16 namespace Utils
17 {
18 namespace Json
19 {
20   class JsonValue;
21   class JsonView;
22 } // namespace Json
23 } // namespace Utils
24 namespace Glue
25 {
26 namespace Model
27 {
28 
29   /**
30    * <p>A structure used to create or update a user-defined function.</p><p><h3>See
31    * Also:</h3>   <a
32    * href="http://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/UserDefinedFunctionInput">AWS
33    * API Reference</a></p>
34    */
35   class AWS_GLUE_API UserDefinedFunctionInput
36   {
37   public:
38     UserDefinedFunctionInput();
39     UserDefinedFunctionInput(Aws::Utils::Json::JsonView jsonValue);
40     UserDefinedFunctionInput& operator=(Aws::Utils::Json::JsonView jsonValue);
41     Aws::Utils::Json::JsonValue Jsonize() const;
42 
43 
44     /**
45      * <p>The name of the function.</p>
46      */
GetFunctionName()47     inline const Aws::String& GetFunctionName() const{ return m_functionName; }
48 
49     /**
50      * <p>The name of the function.</p>
51      */
FunctionNameHasBeenSet()52     inline bool FunctionNameHasBeenSet() const { return m_functionNameHasBeenSet; }
53 
54     /**
55      * <p>The name of the function.</p>
56      */
SetFunctionName(const Aws::String & value)57     inline void SetFunctionName(const Aws::String& value) { m_functionNameHasBeenSet = true; m_functionName = value; }
58 
59     /**
60      * <p>The name of the function.</p>
61      */
SetFunctionName(Aws::String && value)62     inline void SetFunctionName(Aws::String&& value) { m_functionNameHasBeenSet = true; m_functionName = std::move(value); }
63 
64     /**
65      * <p>The name of the function.</p>
66      */
SetFunctionName(const char * value)67     inline void SetFunctionName(const char* value) { m_functionNameHasBeenSet = true; m_functionName.assign(value); }
68 
69     /**
70      * <p>The name of the function.</p>
71      */
WithFunctionName(const Aws::String & value)72     inline UserDefinedFunctionInput& WithFunctionName(const Aws::String& value) { SetFunctionName(value); return *this;}
73 
74     /**
75      * <p>The name of the function.</p>
76      */
WithFunctionName(Aws::String && value)77     inline UserDefinedFunctionInput& WithFunctionName(Aws::String&& value) { SetFunctionName(std::move(value)); return *this;}
78 
79     /**
80      * <p>The name of the function.</p>
81      */
WithFunctionName(const char * value)82     inline UserDefinedFunctionInput& WithFunctionName(const char* value) { SetFunctionName(value); return *this;}
83 
84 
85     /**
86      * <p>The Java class that contains the function code.</p>
87      */
GetClassName()88     inline const Aws::String& GetClassName() const{ return m_className; }
89 
90     /**
91      * <p>The Java class that contains the function code.</p>
92      */
ClassNameHasBeenSet()93     inline bool ClassNameHasBeenSet() const { return m_classNameHasBeenSet; }
94 
95     /**
96      * <p>The Java class that contains the function code.</p>
97      */
SetClassName(const Aws::String & value)98     inline void SetClassName(const Aws::String& value) { m_classNameHasBeenSet = true; m_className = value; }
99 
100     /**
101      * <p>The Java class that contains the function code.</p>
102      */
SetClassName(Aws::String && value)103     inline void SetClassName(Aws::String&& value) { m_classNameHasBeenSet = true; m_className = std::move(value); }
104 
105     /**
106      * <p>The Java class that contains the function code.</p>
107      */
SetClassName(const char * value)108     inline void SetClassName(const char* value) { m_classNameHasBeenSet = true; m_className.assign(value); }
109 
110     /**
111      * <p>The Java class that contains the function code.</p>
112      */
WithClassName(const Aws::String & value)113     inline UserDefinedFunctionInput& WithClassName(const Aws::String& value) { SetClassName(value); return *this;}
114 
115     /**
116      * <p>The Java class that contains the function code.</p>
117      */
WithClassName(Aws::String && value)118     inline UserDefinedFunctionInput& WithClassName(Aws::String&& value) { SetClassName(std::move(value)); return *this;}
119 
120     /**
121      * <p>The Java class that contains the function code.</p>
122      */
WithClassName(const char * value)123     inline UserDefinedFunctionInput& WithClassName(const char* value) { SetClassName(value); return *this;}
124 
125 
126     /**
127      * <p>The owner of the function.</p>
128      */
GetOwnerName()129     inline const Aws::String& GetOwnerName() const{ return m_ownerName; }
130 
131     /**
132      * <p>The owner of the function.</p>
133      */
OwnerNameHasBeenSet()134     inline bool OwnerNameHasBeenSet() const { return m_ownerNameHasBeenSet; }
135 
136     /**
137      * <p>The owner of the function.</p>
138      */
SetOwnerName(const Aws::String & value)139     inline void SetOwnerName(const Aws::String& value) { m_ownerNameHasBeenSet = true; m_ownerName = value; }
140 
141     /**
142      * <p>The owner of the function.</p>
143      */
SetOwnerName(Aws::String && value)144     inline void SetOwnerName(Aws::String&& value) { m_ownerNameHasBeenSet = true; m_ownerName = std::move(value); }
145 
146     /**
147      * <p>The owner of the function.</p>
148      */
SetOwnerName(const char * value)149     inline void SetOwnerName(const char* value) { m_ownerNameHasBeenSet = true; m_ownerName.assign(value); }
150 
151     /**
152      * <p>The owner of the function.</p>
153      */
WithOwnerName(const Aws::String & value)154     inline UserDefinedFunctionInput& WithOwnerName(const Aws::String& value) { SetOwnerName(value); return *this;}
155 
156     /**
157      * <p>The owner of the function.</p>
158      */
WithOwnerName(Aws::String && value)159     inline UserDefinedFunctionInput& WithOwnerName(Aws::String&& value) { SetOwnerName(std::move(value)); return *this;}
160 
161     /**
162      * <p>The owner of the function.</p>
163      */
WithOwnerName(const char * value)164     inline UserDefinedFunctionInput& WithOwnerName(const char* value) { SetOwnerName(value); return *this;}
165 
166 
167     /**
168      * <p>The owner type.</p>
169      */
GetOwnerType()170     inline const PrincipalType& GetOwnerType() const{ return m_ownerType; }
171 
172     /**
173      * <p>The owner type.</p>
174      */
OwnerTypeHasBeenSet()175     inline bool OwnerTypeHasBeenSet() const { return m_ownerTypeHasBeenSet; }
176 
177     /**
178      * <p>The owner type.</p>
179      */
SetOwnerType(const PrincipalType & value)180     inline void SetOwnerType(const PrincipalType& value) { m_ownerTypeHasBeenSet = true; m_ownerType = value; }
181 
182     /**
183      * <p>The owner type.</p>
184      */
SetOwnerType(PrincipalType && value)185     inline void SetOwnerType(PrincipalType&& value) { m_ownerTypeHasBeenSet = true; m_ownerType = std::move(value); }
186 
187     /**
188      * <p>The owner type.</p>
189      */
WithOwnerType(const PrincipalType & value)190     inline UserDefinedFunctionInput& WithOwnerType(const PrincipalType& value) { SetOwnerType(value); return *this;}
191 
192     /**
193      * <p>The owner type.</p>
194      */
WithOwnerType(PrincipalType && value)195     inline UserDefinedFunctionInput& WithOwnerType(PrincipalType&& value) { SetOwnerType(std::move(value)); return *this;}
196 
197 
198     /**
199      * <p>The resource URIs for the function.</p>
200      */
GetResourceUris()201     inline const Aws::Vector<ResourceUri>& GetResourceUris() const{ return m_resourceUris; }
202 
203     /**
204      * <p>The resource URIs for the function.</p>
205      */
ResourceUrisHasBeenSet()206     inline bool ResourceUrisHasBeenSet() const { return m_resourceUrisHasBeenSet; }
207 
208     /**
209      * <p>The resource URIs for the function.</p>
210      */
SetResourceUris(const Aws::Vector<ResourceUri> & value)211     inline void SetResourceUris(const Aws::Vector<ResourceUri>& value) { m_resourceUrisHasBeenSet = true; m_resourceUris = value; }
212 
213     /**
214      * <p>The resource URIs for the function.</p>
215      */
SetResourceUris(Aws::Vector<ResourceUri> && value)216     inline void SetResourceUris(Aws::Vector<ResourceUri>&& value) { m_resourceUrisHasBeenSet = true; m_resourceUris = std::move(value); }
217 
218     /**
219      * <p>The resource URIs for the function.</p>
220      */
WithResourceUris(const Aws::Vector<ResourceUri> & value)221     inline UserDefinedFunctionInput& WithResourceUris(const Aws::Vector<ResourceUri>& value) { SetResourceUris(value); return *this;}
222 
223     /**
224      * <p>The resource URIs for the function.</p>
225      */
WithResourceUris(Aws::Vector<ResourceUri> && value)226     inline UserDefinedFunctionInput& WithResourceUris(Aws::Vector<ResourceUri>&& value) { SetResourceUris(std::move(value)); return *this;}
227 
228     /**
229      * <p>The resource URIs for the function.</p>
230      */
AddResourceUris(const ResourceUri & value)231     inline UserDefinedFunctionInput& AddResourceUris(const ResourceUri& value) { m_resourceUrisHasBeenSet = true; m_resourceUris.push_back(value); return *this; }
232 
233     /**
234      * <p>The resource URIs for the function.</p>
235      */
AddResourceUris(ResourceUri && value)236     inline UserDefinedFunctionInput& AddResourceUris(ResourceUri&& value) { m_resourceUrisHasBeenSet = true; m_resourceUris.push_back(std::move(value)); return *this; }
237 
238   private:
239 
240     Aws::String m_functionName;
241     bool m_functionNameHasBeenSet;
242 
243     Aws::String m_className;
244     bool m_classNameHasBeenSet;
245 
246     Aws::String m_ownerName;
247     bool m_ownerNameHasBeenSet;
248 
249     PrincipalType m_ownerType;
250     bool m_ownerTypeHasBeenSet;
251 
252     Aws::Vector<ResourceUri> m_resourceUris;
253     bool m_resourceUrisHasBeenSet;
254   };
255 
256 } // namespace Model
257 } // namespace Glue
258 } // namespace Aws
259