bigquery  v2
csv_options.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_CSV_OPTIONS_H_
31 #define GOOGLE_BIGQUERY_API_CSV_OPTIONS_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 CsvOptions : public client::JsonCppData {
52  public:
58  static CsvOptions* New();
59 
65  explicit CsvOptions(const Json::Value& storage);
66 
72  explicit CsvOptions(Json::Value* storage);
73 
77  virtual ~CsvOptions();
78 
84  const StringPiece GetTypeName() const {
85  return StringPiece("google_bigquery_api::CsvOptions");
86  }
87 
93  bool has_allow_jagged_rows() const {
94  return Storage().isMember("allowJaggedRows");
95  }
96 
101  MutableStorage()->removeMember("allowJaggedRows");
102  }
103 
104 
108  bool get_allow_jagged_rows() const {
109  const Json::Value& storage = Storage("allowJaggedRows");
110  return client::JsonValueToCppValueHelper<bool >(storage);
111  }
112 
124  void set_allow_jagged_rows(bool value) {
125  client::SetJsonValueFromCppValueHelper<bool >(
126  value, MutableStorage("allowJaggedRows"));
127  }
128 
135  return Storage().isMember("allowQuotedNewlines");
136  }
137 
142  MutableStorage()->removeMember("allowQuotedNewlines");
143  }
144 
145 
150  const Json::Value& storage = Storage("allowQuotedNewlines");
151  return client::JsonValueToCppValueHelper<bool >(storage);
152  }
153 
162  void set_allow_quoted_newlines(bool value) {
163  client::SetJsonValueFromCppValueHelper<bool >(
164  value, MutableStorage("allowQuotedNewlines"));
165  }
166 
172  bool has_encoding() const {
173  return Storage().isMember("encoding");
174  }
175 
179  void clear_encoding() {
180  MutableStorage()->removeMember("encoding");
181  }
182 
183 
187  const StringPiece get_encoding() const {
188  const Json::Value& v = Storage("encoding");
189  if (v == Json::Value::null) return StringPiece("");
190  return StringPiece(v.asCString());
191  }
192 
203  void set_encoding(const StringPiece& value) {
204  *MutableStorage("encoding") = value.data();
205  }
206 
212  bool has_field_delimiter() const {
213  return Storage().isMember("fieldDelimiter");
214  }
215 
220  MutableStorage()->removeMember("fieldDelimiter");
221  }
222 
223 
227  const StringPiece get_field_delimiter() const {
228  const Json::Value& v = Storage("fieldDelimiter");
229  if (v == Json::Value::null) return StringPiece("");
230  return StringPiece(v.asCString());
231  }
232 
244  void set_field_delimiter(const StringPiece& value) {
245  *MutableStorage("fieldDelimiter") = value.data();
246  }
247 
253  bool has_quote() const {
254  return Storage().isMember("quote");
255  }
256 
260  void clear_quote() {
261  MutableStorage()->removeMember("quote");
262  }
263 
264 
268  const StringPiece get_quote() const {
269  const Json::Value& v = Storage("quote");
270  if (v == Json::Value::null) return StringPiece("");
271  return StringPiece(v.asCString());
272  }
273 
287  void set_quote(const StringPiece& value) {
288  *MutableStorage("quote") = value.data();
289  }
290 
296  bool has_skip_leading_rows() const {
297  return Storage().isMember("skipLeadingRows");
298  }
299 
304  MutableStorage()->removeMember("skipLeadingRows");
305  }
306 
307 
311  int64 get_skip_leading_rows() const {
312  const Json::Value& storage = Storage("skipLeadingRows");
313  return client::JsonValueToCppValueHelper<int64 >(storage);
314  }
315 
333  void set_skip_leading_rows(int64 value) {
334  client::SetJsonValueFromCppValueHelper<int64 >(
335  value, MutableStorage("skipLeadingRows"));
336  }
337 
338  private:
339  void operator=(const CsvOptions&);
340 }; // CsvOptions
341 } // namespace google_bigquery_api
342 #endif // GOOGLE_BIGQUERY_API_CSV_OPTIONS_H_
void clear_quote()
Definition: csv_options.h:260
void clear_encoding()
Definition: csv_options.h:179
void clear_allow_quoted_newlines()
Definition: csv_options.h:141
bool has_allow_jagged_rows() const
Definition: csv_options.h:93
bool has_allow_quoted_newlines() const
Definition: csv_options.h:134
bool get_allow_quoted_newlines() const
Definition: csv_options.h:149
void set_allow_jagged_rows(bool value)
Definition: csv_options.h:124
const StringPiece get_encoding() const
Definition: csv_options.h:187
Definition: aggregate_classification_metrics.cc:39
bool get_allow_jagged_rows() const
Definition: csv_options.h:108
const StringPiece GetTypeName() const
Definition: csv_options.h:84
void set_encoding(const StringPiece &value)
Definition: csv_options.h:203
void set_allow_quoted_newlines(bool value)
Definition: csv_options.h:162
void clear_allow_jagged_rows()
Definition: csv_options.h:100
void clear_field_delimiter()
Definition: csv_options.h:219
void clear_skip_leading_rows()
Definition: csv_options.h:303
Definition: aggregate_classification_metrics.h:37
bool has_skip_leading_rows() const
Definition: csv_options.h:296
void set_field_delimiter(const StringPiece &value)
Definition: csv_options.h:244
bool has_quote() const
Definition: csv_options.h:253
const StringPiece get_quote() const
Definition: csv_options.h:268
void set_quote(const StringPiece &value)
Definition: csv_options.h:287
bool has_field_delimiter() const
Definition: csv_options.h:212
void set_skip_leading_rows(int64 value)
Definition: csv_options.h:333
Definition: csv_options.h:51
const StringPiece get_field_delimiter() const
Definition: csv_options.h:227
int64 get_skip_leading_rows() const
Definition: csv_options.h:311
bool has_encoding() const
Definition: csv_options.h:172