bigquery  v2
job_configuration.h
1 // Copyright 2010 Google Inc.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License"); you may not
4 // use this file except in compliance with the License. You may obtain a copy of
5 // the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11 // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12 // License for the specific language governing permissions and limitations under
13 // the License.
14 
15 // This code was generated by google-apis-code-generator 1.5.1
16 // Build date: 2018-10-08 17:45:39 UTC
17 // on: 2020-03-07, 23:51:40 UTC
18 // C++ generator version: 0.1.4
19 
20 // ----------------------------------------------------------------------------
21 // NOTE: This file is generated from Google APIs Discovery Service.
22 // Service:
23 // BigQuery API (bigquery/v2)
24 // Generated from:
25 // Version: v2
26 // Revision: 459
27 // Generated by:
28 // Tool: google-apis-code-generator 1.5.1
29 // C++: 0.1.4
30 #ifndef GOOGLE_BIGQUERY_API_JOB_CONFIGURATION_H_
31 #define GOOGLE_BIGQUERY_API_JOB_CONFIGURATION_H_
32 
33 #include <string>
34 #include "googleapis/base/integral_types.h"
35 #include "googleapis/base/macros.h"
36 #include "googleapis/client/data/jsoncpp_data.h"
37 #include "googleapis/strings/stringpiece.h"
38 
39 #include "google/bigquery_api/job_configuration_extract.h"
40 #include "google/bigquery_api/job_configuration_load.h"
41 #include "google/bigquery_api/job_configuration_query.h"
42 #include "google/bigquery_api/job_configuration_table_copy.h"
43 
44 namespace Json {
45 class Value;
46 } // namespace Json
47 
48 namespace google_bigquery_api {
49 using namespace googleapis;
50 
56 class JobConfiguration : public client::JsonCppData {
57  public:
63  static JobConfiguration* New();
64 
70  explicit JobConfiguration(const Json::Value& storage);
71 
77  explicit JobConfiguration(Json::Value* storage);
78 
82  virtual ~JobConfiguration();
83 
89  const StringPiece GetTypeName() const {
90  return StringPiece("google_bigquery_api::JobConfiguration");
91  }
92 
98  bool has_copy() const {
99  return Storage().isMember("copy");
100  }
101 
105  void clear_copy() {
106  MutableStorage()->removeMember("copy");
107  }
108 
109 
113  const JobConfigurationTableCopy get_copy() const;
114 
122  JobConfigurationTableCopy mutable_copy();
123 
129  bool has_dry_run() const {
130  return Storage().isMember("dryRun");
131  }
132 
136  void clear_dry_run() {
137  MutableStorage()->removeMember("dryRun");
138  }
139 
140 
144  bool get_dry_run() const {
145  const Json::Value& storage = Storage("dryRun");
146  return client::JsonValueToCppValueHelper<bool >(storage);
147  }
148 
159  void set_dry_run(bool value) {
160  client::SetJsonValueFromCppValueHelper<bool >(
161  value, MutableStorage("dryRun"));
162  }
163 
169  bool has_extract() const {
170  return Storage().isMember("extract");
171  }
172 
176  void clear_extract() {
177  MutableStorage()->removeMember("extract");
178  }
179 
180 
184  const JobConfigurationExtract get_extract() const;
185 
193  JobConfigurationExtract mutable_extract();
194 
200  bool has_job_timeout_ms() const {
201  return Storage().isMember("jobTimeoutMs");
202  }
203 
208  MutableStorage()->removeMember("jobTimeoutMs");
209  }
210 
211 
215  int64 get_job_timeout_ms() const {
216  const Json::Value& storage = Storage("jobTimeoutMs");
217  return client::JsonValueToCppValueHelper<int64 >(storage);
218  }
219 
228  void set_job_timeout_ms(int64 value) {
229  client::SetJsonValueFromCppValueHelper<int64 >(
230  value, MutableStorage("jobTimeoutMs"));
231  }
232 
238  bool has_job_type() const {
239  return Storage().isMember("jobType");
240  }
241 
245  void clear_job_type() {
246  MutableStorage()->removeMember("jobType");
247  }
248 
249 
253  const StringPiece get_job_type() const {
254  const Json::Value& v = Storage("jobType");
255  if (v == Json::Value::null) return StringPiece("");
256  return StringPiece(v.asCString());
257  }
258 
267  void set_job_type(const StringPiece& value) {
268  *MutableStorage("jobType") = value.data();
269  }
270 
276  bool has_labels() const {
277  return Storage().isMember("labels");
278  }
279 
283  void clear_labels() {
284  MutableStorage()->removeMember("labels");
285  }
286 
287 
291  const client::JsonCppAssociativeArray<string > get_labels() const {
292  const Json::Value& storage = Storage("labels");
293  return client::JsonValueToCppValueHelper<client::JsonCppAssociativeArray<string > >(storage);
294  }
295 
308  client::JsonCppAssociativeArray<string > mutable_labels() {
309  Json::Value* storage = MutableStorage("labels");
310  return client::JsonValueToMutableCppValueHelper<client::JsonCppAssociativeArray<string > >(storage);
311  }
312 
318  bool has_load() const {
319  return Storage().isMember("load");
320  }
321 
325  void clear_load() {
326  MutableStorage()->removeMember("load");
327  }
328 
329 
333  const JobConfigurationLoad get_load() const;
334 
342  JobConfigurationLoad mutable_load();
343 
349  bool has_query() const {
350  return Storage().isMember("query");
351  }
352 
356  void clear_query() {
357  MutableStorage()->removeMember("query");
358  }
359 
360 
364  const JobConfigurationQuery get_query() const;
365 
373  JobConfigurationQuery mutable_query();
374 
375  private:
376  void operator=(const JobConfiguration&);
377 }; // JobConfiguration
378 } // namespace google_bigquery_api
379 #endif // GOOGLE_BIGQUERY_API_JOB_CONFIGURATION_H_
void clear_load()
Definition: job_configuration.h:325
void set_job_timeout_ms(int64 value)
Definition: job_configuration.h:228
void clear_copy()
Definition: job_configuration.h:105
void clear_query()
Definition: job_configuration.h:356
Definition: job_configuration.h:56
Definition: job_configuration_extract.h:53
void set_job_type(const StringPiece &value)
Definition: job_configuration.h:267
bool has_job_timeout_ms() const
Definition: job_configuration.h:200
bool has_extract() const
Definition: job_configuration.h:169
void set_dry_run(bool value)
Definition: job_configuration.h:159
void clear_job_type()
Definition: job_configuration.h:245
void clear_labels()
Definition: job_configuration.h:283
bool has_job_type() const
Definition: job_configuration.h:238
Definition: aggregate_classification_metrics.cc:39
bool has_dry_run() const
Definition: job_configuration.h:129
const client::JsonCppAssociativeArray< string > get_labels() const
Definition: job_configuration.h:291
bool has_load() const
Definition: job_configuration.h:318
Definition: aggregate_classification_metrics.h:37
const StringPiece GetTypeName() const
Definition: job_configuration.h:89
void clear_extract()
Definition: job_configuration.h:176
bool get_dry_run() const
Definition: job_configuration.h:144
int64 get_job_timeout_ms() const
Definition: job_configuration.h:215
Definition: job_configuration_query.h:61
bool has_query() const
Definition: job_configuration.h:349
void clear_job_timeout_ms()
Definition: job_configuration.h:207
const StringPiece get_job_type() const
Definition: job_configuration.h:253
bool has_labels() const
Definition: job_configuration.h:276
Definition: job_configuration_load.h:60
void clear_dry_run()
Definition: job_configuration.h:136
Definition: job_configuration_table_copy.h:53
bool has_copy() const
Definition: job_configuration.h:98
client::JsonCppAssociativeArray< string > mutable_labels()
Definition: job_configuration.h:308