bigquery  v2
materialized_view_definition.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_MATERIALIZED_VIEW_DEFINITION_H_
31 #define GOOGLE_BIGQUERY_API_MATERIALIZED_VIEW_DEFINITION_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 MaterializedViewDefinition : public client::JsonCppData {
52  public:
58  static MaterializedViewDefinition* New();
59 
65  explicit MaterializedViewDefinition(const Json::Value& storage);
66 
72  explicit MaterializedViewDefinition(Json::Value* storage);
73 
77  virtual ~MaterializedViewDefinition();
78 
84  const StringPiece GetTypeName() const {
85  return StringPiece("google_bigquery_api::MaterializedViewDefinition");
86  }
87 
93  bool has_enable_refresh() const {
94  return Storage().isMember("enableRefresh");
95  }
96 
101  MutableStorage()->removeMember("enableRefresh");
102  }
103 
104 
108  bool get_enable_refresh() const {
109  const Json::Value& storage = Storage("enableRefresh");
110  return client::JsonValueToCppValueHelper<bool >(storage);
111  }
112 
121  void set_enable_refresh(bool value) {
122  client::SetJsonValueFromCppValueHelper<bool >(
123  value, MutableStorage("enableRefresh"));
124  }
125 
131  bool has_last_refresh_time() const {
132  return Storage().isMember("lastRefreshTime");
133  }
134 
139  MutableStorage()->removeMember("lastRefreshTime");
140  }
141 
142 
146  int64 get_last_refresh_time() const {
147  const Json::Value& storage = Storage("lastRefreshTime");
148  return client::JsonValueToCppValueHelper<int64 >(storage);
149  }
150 
159  void set_last_refresh_time(int64 value) {
160  client::SetJsonValueFromCppValueHelper<int64 >(
161  value, MutableStorage("lastRefreshTime"));
162  }
163 
169  bool has_query() const {
170  return Storage().isMember("query");
171  }
172 
176  void clear_query() {
177  MutableStorage()->removeMember("query");
178  }
179 
180 
184  const StringPiece get_query() const {
185  const Json::Value& v = Storage("query");
186  if (v == Json::Value::null) return StringPiece("");
187  return StringPiece(v.asCString());
188  }
189 
197  void set_query(const StringPiece& value) {
198  *MutableStorage("query") = value.data();
199  }
200 
206  bool has_refresh_interval_ms() const {
207  return Storage().isMember("refreshIntervalMs");
208  }
209 
214  MutableStorage()->removeMember("refreshIntervalMs");
215  }
216 
217 
221  int64 get_refresh_interval_ms() const {
222  const Json::Value& storage = Storage("refreshIntervalMs");
223  return client::JsonValueToCppValueHelper<int64 >(storage);
224  }
225 
234  void set_refresh_interval_ms(int64 value) {
235  client::SetJsonValueFromCppValueHelper<int64 >(
236  value, MutableStorage("refreshIntervalMs"));
237  }
238 
239  private:
240  void operator=(const MaterializedViewDefinition&);
241 }; // MaterializedViewDefinition
242 } // namespace google_bigquery_api
243 #endif // GOOGLE_BIGQUERY_API_MATERIALIZED_VIEW_DEFINITION_H_
Definition: materialized_view_definition.h:51
void clear_refresh_interval_ms()
Definition: materialized_view_definition.h:213
bool has_refresh_interval_ms() const
Definition: materialized_view_definition.h:206
const StringPiece get_query() const
Definition: materialized_view_definition.h:184
bool has_enable_refresh() const
Definition: materialized_view_definition.h:93
int64 get_refresh_interval_ms() const
Definition: materialized_view_definition.h:221
Definition: aggregate_classification_metrics.cc:39
bool has_query() const
Definition: materialized_view_definition.h:169
void set_refresh_interval_ms(int64 value)
Definition: materialized_view_definition.h:234
void set_query(const StringPiece &value)
Definition: materialized_view_definition.h:197
void clear_last_refresh_time()
Definition: materialized_view_definition.h:138
void clear_query()
Definition: materialized_view_definition.h:176
Definition: aggregate_classification_metrics.h:37
bool get_enable_refresh() const
Definition: materialized_view_definition.h:108
const StringPiece GetTypeName() const
Definition: materialized_view_definition.h:84
void clear_enable_refresh()
Definition: materialized_view_definition.h:100
void set_enable_refresh(bool value)
Definition: materialized_view_definition.h:121
void set_last_refresh_time(int64 value)
Definition: materialized_view_definition.h:159
int64 get_last_refresh_time() const
Definition: materialized_view_definition.h:146
bool has_last_refresh_time() const
Definition: materialized_view_definition.h:131