bigquery  v2
time_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_TIME_PARTITIONING_H_
31 #define GOOGLE_BIGQUERY_API_TIME_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 TimePartitioning : public client::JsonCppData {
52  public:
58  static TimePartitioning* New();
59 
65  explicit TimePartitioning(const Json::Value& storage);
66 
72  explicit TimePartitioning(Json::Value* storage);
73 
77  virtual ~TimePartitioning();
78 
84  const StringPiece GetTypeName() const {
85  return StringPiece("google_bigquery_api::TimePartitioning");
86  }
87 
93  bool has_expiration_ms() const {
94  return Storage().isMember("expirationMs");
95  }
96 
101  MutableStorage()->removeMember("expirationMs");
102  }
103 
104 
108  int64 get_expiration_ms() const {
109  const Json::Value& storage = Storage("expirationMs");
110  return client::JsonValueToCppValueHelper<int64 >(storage);
111  }
112 
122  void set_expiration_ms(int64 value) {
123  client::SetJsonValueFromCppValueHelper<int64 >(
124  value, MutableStorage("expirationMs"));
125  }
126 
132  bool has_field() const {
133  return Storage().isMember("field");
134  }
135 
139  void clear_field() {
140  MutableStorage()->removeMember("field");
141  }
142 
143 
147  const StringPiece get_field() const {
148  const Json::Value& v = Storage("field");
149  if (v == Json::Value::null) return StringPiece("");
150  return StringPiece(v.asCString());
151  }
152 
164  void set_field(const StringPiece& value) {
165  *MutableStorage("field") = value.data();
166  }
167 
175  return Storage().isMember("requirePartitionFilter");
176  }
177 
182  MutableStorage()->removeMember("requirePartitionFilter");
183  }
184 
185 
190  const Json::Value& storage = Storage("requirePartitionFilter");
191  return client::JsonValueToCppValueHelper<bool >(storage);
192  }
193 
198  void set_require_partition_filter(bool value) {
199  client::SetJsonValueFromCppValueHelper<bool >(
200  value, MutableStorage("requirePartitionFilter"));
201  }
202 
208  bool has_type() const {
209  return Storage().isMember("type");
210  }
211 
215  void clear_type() {
216  MutableStorage()->removeMember("type");
217  }
218 
219 
223  const StringPiece get_type() const {
224  const Json::Value& v = Storage("type");
225  if (v == Json::Value::null) return StringPiece("");
226  return StringPiece(v.asCString());
227  }
228 
237  void set_type(const StringPiece& value) {
238  *MutableStorage("type") = value.data();
239  }
240 
241  private:
242  void operator=(const TimePartitioning&);
243 }; // TimePartitioning
244 } // namespace google_bigquery_api
245 #endif // GOOGLE_BIGQUERY_API_TIME_PARTITIONING_H_
Definition: time_partitioning.h:51
void clear_field()
Definition: time_partitioning.h:139
void clear_require_partition_filter()
Definition: time_partitioning.h:181
int64 get_expiration_ms() const
Definition: time_partitioning.h:108
Definition: aggregate_classification_metrics.cc:39
const StringPiece get_field() const
Definition: time_partitioning.h:147
bool has_type() const
Definition: time_partitioning.h:208
bool get_require_partition_filter() const
Definition: time_partitioning.h:189
void clear_type()
Definition: time_partitioning.h:215
bool has_expiration_ms() const
Definition: time_partitioning.h:93
Definition: aggregate_classification_metrics.h:37
void set_require_partition_filter(bool value)
Definition: time_partitioning.h:198
void set_type(const StringPiece &value)
Definition: time_partitioning.h:237
bool has_field() const
Definition: time_partitioning.h:132
bool has_require_partition_filter() const
Definition: time_partitioning.h:174
const StringPiece get_type() const
Definition: time_partitioning.h:223
void set_field(const StringPiece &value)
Definition: time_partitioning.h:164
const StringPiece GetTypeName() const
Definition: time_partitioning.h:84
void set_expiration_ms(int64 value)
Definition: time_partitioning.h:122
void clear_expiration_ms()
Definition: time_partitioning.h:100