bigquery  v2
range_partitioning.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_RANGE_PARTITIONING_H_
31 #define GOOGLE_BIGQUERY_API_RANGE_PARTITIONING_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 namespace Json {
40 class Value;
41 } // namespace Json
42 
43 namespace google_bigquery_api {
44 using namespace googleapis;
45 
51 class RangePartitioning : public client::JsonCppData {
52  public:
58  class RangePartitioningRange : public client::JsonCppData {
59  public:
65  static RangePartitioningRange* New();
66 
72  explicit RangePartitioningRange(const Json::Value& storage);
73 
79  explicit RangePartitioningRange(Json::Value* storage);
80 
84  virtual ~RangePartitioningRange();
85 
91  const StringPiece GetTypeName() const {
92  return StringPiece("google_bigquery_api::RangePartitioningRange");
93  }
94 
100  bool has_end() const {
101  return Storage().isMember("end");
102  }
103 
107  void clear_end() {
108  MutableStorage()->removeMember("end");
109  }
110 
111 
115  int64 get_end() const {
116  const Json::Value& storage = Storage("end");
117  return client::JsonValueToCppValueHelper<int64 >(storage);
118  }
119 
127  void set_end(int64 value) {
128  client::SetJsonValueFromCppValueHelper<int64 >(
129  value, MutableStorage("end"));
130  }
131 
137  bool has_interval() const {
138  return Storage().isMember("interval");
139  }
140 
144  void clear_interval() {
145  MutableStorage()->removeMember("interval");
146  }
147 
148 
152  int64 get_interval() const {
153  const Json::Value& storage = Storage("interval");
154  return client::JsonValueToCppValueHelper<int64 >(storage);
155  }
156 
164  void set_interval(int64 value) {
165  client::SetJsonValueFromCppValueHelper<int64 >(
166  value, MutableStorage("interval"));
167  }
168 
174  bool has_start() const {
175  return Storage().isMember("start");
176  }
177 
181  void clear_start() {
182  MutableStorage()->removeMember("start");
183  }
184 
185 
189  int64 get_start() const {
190  const Json::Value& storage = Storage("start");
191  return client::JsonValueToCppValueHelper<int64 >(storage);
192  }
193 
201  void set_start(int64 value) {
202  client::SetJsonValueFromCppValueHelper<int64 >(
203  value, MutableStorage("start"));
204  }
205 
206  private:
207  void operator=(const RangePartitioningRange&);
208  }; // RangePartitioningRange
214  static RangePartitioning* New();
215 
221  explicit RangePartitioning(const Json::Value& storage);
222 
228  explicit RangePartitioning(Json::Value* storage);
229 
233  virtual ~RangePartitioning();
234 
240  const StringPiece GetTypeName() const {
241  return StringPiece("google_bigquery_api::RangePartitioning");
242  }
243 
249  bool has_field() const {
250  return Storage().isMember("field");
251  }
252 
256  void clear_field() {
257  MutableStorage()->removeMember("field");
258  }
259 
260 
264  const StringPiece get_field() const {
265  const Json::Value& v = Storage("field");
266  if (v == Json::Value::null) return StringPiece("");
267  return StringPiece(v.asCString());
268  }
269 
279  void set_field(const StringPiece& value) {
280  *MutableStorage("field") = value.data();
281  }
282 
288  bool has_range() const {
289  return Storage().isMember("range");
290  }
291 
295  void clear_range() {
296  MutableStorage()->removeMember("range");
297  }
298 
299 
304  const Json::Value& storage = Storage("range");
305  return client::JsonValueToCppValueHelper<RangePartitioningRange >(storage);
306  }
307 
316  Json::Value* storage = MutableStorage("range");
317  return client::JsonValueToMutableCppValueHelper<RangePartitioningRange >(storage);
318  }
319 
320  private:
321  void operator=(const RangePartitioning&);
322 }; // RangePartitioning
323 } // namespace google_bigquery_api
324 #endif // GOOGLE_BIGQUERY_API_RANGE_PARTITIONING_H_
bool has_end() const
Definition: range_partitioning.h:100
const StringPiece GetTypeName() const
Definition: range_partitioning.h:240
int64 get_end() const
Definition: range_partitioning.h:115
void set_field(const StringPiece &value)
Definition: range_partitioning.h:279
void clear_end()
Definition: range_partitioning.h:107
Definition: aggregate_classification_metrics.cc:39
bool has_start() const
Definition: range_partitioning.h:174
void clear_interval()
Definition: range_partitioning.h:144
void clear_start()
Definition: range_partitioning.h:181
const StringPiece get_field() const
Definition: range_partitioning.h:264
bool has_range() const
Definition: range_partitioning.h:288
int64 get_start() const
Definition: range_partitioning.h:189
Definition: range_partitioning.h:51
Definition: aggregate_classification_metrics.h:37
void clear_field()
Definition: range_partitioning.h:256
void set_end(int64 value)
Definition: range_partitioning.h:127
bool has_interval() const
Definition: range_partitioning.h:137
RangePartitioningRange mutable_range()
Definition: range_partitioning.h:315
void clear_range()
Definition: range_partitioning.h:295
void set_interval(int64 value)
Definition: range_partitioning.h:164
void set_start(int64 value)
Definition: range_partitioning.h:201
const RangePartitioningRange get_range() const
Definition: range_partitioning.h:303
int64 get_interval() const
Definition: range_partitioning.h:152
bool has_field() const
Definition: range_partitioning.h:249
const StringPiece GetTypeName() const
Definition: range_partitioning.h:91