1"""Generated client library for fusiontables version v1."""
2# NOTE: This file is autogenerated and should not be edited by hand.
3from apitools.base.py import base_api
4from samples.fusiontables_sample.fusiontables_v1 import fusiontables_v1_messages as messages
5
6
7class FusiontablesV1(base_api.BaseApiClient):
8  """Generated client library for service fusiontables version v1."""
9
10  MESSAGES_MODULE = messages
11  BASE_URL = u'https://www.googleapis.com/fusiontables/v1/'
12
13  _PACKAGE = u'fusiontables'
14  _SCOPES = [u'https://www.googleapis.com/auth/fusiontables', u'https://www.googleapis.com/auth/fusiontables.readonly']
15  _VERSION = u'v1'
16  _CLIENT_ID = '1042881264118.apps.googleusercontent.com'
17  _CLIENT_SECRET = 'x_Tw5K8nnjoRAqULM9PFAC2b'
18  _USER_AGENT = 'x_Tw5K8nnjoRAqULM9PFAC2b'
19  _CLIENT_CLASS_NAME = u'FusiontablesV1'
20  _URL_VERSION = u'v1'
21  _API_KEY = None
22
23  def __init__(self, url='', credentials=None,
24               get_credentials=True, http=None, model=None,
25               log_request=False, log_response=False,
26               credentials_args=None, default_global_params=None,
27               additional_http_headers=None):
28    """Create a new fusiontables handle."""
29    url = url or self.BASE_URL
30    super(FusiontablesV1, self).__init__(
31        url, credentials=credentials,
32        get_credentials=get_credentials, http=http, model=model,
33        log_request=log_request, log_response=log_response,
34        credentials_args=credentials_args,
35        default_global_params=default_global_params,
36        additional_http_headers=additional_http_headers)
37    self.column = self.ColumnService(self)
38    self.query = self.QueryService(self)
39    self.style = self.StyleService(self)
40    self.table = self.TableService(self)
41    self.task = self.TaskService(self)
42    self.template = self.TemplateService(self)
43
44  class ColumnService(base_api.BaseApiService):
45    """Service class for the column resource."""
46
47    _NAME = u'column'
48
49    def __init__(self, client):
50      super(FusiontablesV1.ColumnService, self).__init__(client)
51      self._upload_configs = {
52          }
53
54    def Delete(self, request, global_params=None):
55      """Deletes the column.
56
57      Args:
58        request: (FusiontablesColumnDeleteRequest) input message
59        global_params: (StandardQueryParameters, default: None) global arguments
60      Returns:
61        (FusiontablesColumnDeleteResponse) The response message.
62      """
63      config = self.GetMethodConfig('Delete')
64      return self._RunMethod(
65          config, request, global_params=global_params)
66
67    Delete.method_config = lambda: base_api.ApiMethodInfo(
68        http_method=u'DELETE',
69        method_id=u'fusiontables.column.delete',
70        ordered_params=[u'tableId', u'columnId'],
71        path_params=[u'columnId', u'tableId'],
72        query_params=[],
73        relative_path=u'tables/{tableId}/columns/{columnId}',
74        request_field='',
75        request_type_name=u'FusiontablesColumnDeleteRequest',
76        response_type_name=u'FusiontablesColumnDeleteResponse',
77        supports_download=False,
78    )
79
80    def Get(self, request, global_params=None):
81      """Retrieves a specific column by its id.
82
83      Args:
84        request: (FusiontablesColumnGetRequest) input message
85        global_params: (StandardQueryParameters, default: None) global arguments
86      Returns:
87        (Column) The response message.
88      """
89      config = self.GetMethodConfig('Get')
90      return self._RunMethod(
91          config, request, global_params=global_params)
92
93    Get.method_config = lambda: base_api.ApiMethodInfo(
94        http_method=u'GET',
95        method_id=u'fusiontables.column.get',
96        ordered_params=[u'tableId', u'columnId'],
97        path_params=[u'columnId', u'tableId'],
98        query_params=[],
99        relative_path=u'tables/{tableId}/columns/{columnId}',
100        request_field='',
101        request_type_name=u'FusiontablesColumnGetRequest',
102        response_type_name=u'Column',
103        supports_download=False,
104    )
105
106    def Insert(self, request, global_params=None):
107      """Adds a new column to the table.
108
109      Args:
110        request: (FusiontablesColumnInsertRequest) input message
111        global_params: (StandardQueryParameters, default: None) global arguments
112      Returns:
113        (Column) The response message.
114      """
115      config = self.GetMethodConfig('Insert')
116      return self._RunMethod(
117          config, request, global_params=global_params)
118
119    Insert.method_config = lambda: base_api.ApiMethodInfo(
120        http_method=u'POST',
121        method_id=u'fusiontables.column.insert',
122        ordered_params=[u'tableId'],
123        path_params=[u'tableId'],
124        query_params=[],
125        relative_path=u'tables/{tableId}/columns',
126        request_field=u'column',
127        request_type_name=u'FusiontablesColumnInsertRequest',
128        response_type_name=u'Column',
129        supports_download=False,
130    )
131
132    def List(self, request, global_params=None):
133      """Retrieves a list of columns.
134
135      Args:
136        request: (FusiontablesColumnListRequest) input message
137        global_params: (StandardQueryParameters, default: None) global arguments
138      Returns:
139        (ColumnList) The response message.
140      """
141      config = self.GetMethodConfig('List')
142      return self._RunMethod(
143          config, request, global_params=global_params)
144
145    List.method_config = lambda: base_api.ApiMethodInfo(
146        http_method=u'GET',
147        method_id=u'fusiontables.column.list',
148        ordered_params=[u'tableId'],
149        path_params=[u'tableId'],
150        query_params=[u'maxResults', u'pageToken'],
151        relative_path=u'tables/{tableId}/columns',
152        request_field='',
153        request_type_name=u'FusiontablesColumnListRequest',
154        response_type_name=u'ColumnList',
155        supports_download=False,
156    )
157
158    def Patch(self, request, global_params=None):
159      """Updates the name or type of an existing column. This method supports patch semantics.
160
161      Args:
162        request: (FusiontablesColumnPatchRequest) input message
163        global_params: (StandardQueryParameters, default: None) global arguments
164      Returns:
165        (Column) The response message.
166      """
167      config = self.GetMethodConfig('Patch')
168      return self._RunMethod(
169          config, request, global_params=global_params)
170
171    Patch.method_config = lambda: base_api.ApiMethodInfo(
172        http_method=u'PATCH',
173        method_id=u'fusiontables.column.patch',
174        ordered_params=[u'tableId', u'columnId'],
175        path_params=[u'columnId', u'tableId'],
176        query_params=[],
177        relative_path=u'tables/{tableId}/columns/{columnId}',
178        request_field=u'column',
179        request_type_name=u'FusiontablesColumnPatchRequest',
180        response_type_name=u'Column',
181        supports_download=False,
182    )
183
184    def Update(self, request, global_params=None):
185      """Updates the name or type of an existing column.
186
187      Args:
188        request: (FusiontablesColumnUpdateRequest) input message
189        global_params: (StandardQueryParameters, default: None) global arguments
190      Returns:
191        (Column) The response message.
192      """
193      config = self.GetMethodConfig('Update')
194      return self._RunMethod(
195          config, request, global_params=global_params)
196
197    Update.method_config = lambda: base_api.ApiMethodInfo(
198        http_method=u'PUT',
199        method_id=u'fusiontables.column.update',
200        ordered_params=[u'tableId', u'columnId'],
201        path_params=[u'columnId', u'tableId'],
202        query_params=[],
203        relative_path=u'tables/{tableId}/columns/{columnId}',
204        request_field=u'column',
205        request_type_name=u'FusiontablesColumnUpdateRequest',
206        response_type_name=u'Column',
207        supports_download=False,
208    )
209
210  class QueryService(base_api.BaseApiService):
211    """Service class for the query resource."""
212
213    _NAME = u'query'
214
215    def __init__(self, client):
216      super(FusiontablesV1.QueryService, self).__init__(client)
217      self._upload_configs = {
218          }
219
220    def Sql(self, request, global_params=None, download=None):
221      """Executes an SQL SELECT/INSERT/UPDATE/DELETE/SHOW/DESCRIBE/CREATE statement.
222
223      Args:
224        request: (FusiontablesQuerySqlRequest) input message
225        global_params: (StandardQueryParameters, default: None) global arguments
226        download: (Download, default: None) If present, download
227            data from the request via this stream.
228      Returns:
229        (Sqlresponse) The response message.
230      """
231      config = self.GetMethodConfig('Sql')
232      return self._RunMethod(
233          config, request, global_params=global_params,
234          download=download)
235
236    Sql.method_config = lambda: base_api.ApiMethodInfo(
237        http_method=u'POST',
238        method_id=u'fusiontables.query.sql',
239        ordered_params=[u'sql'],
240        path_params=[],
241        query_params=[u'hdrs', u'sql', u'typed'],
242        relative_path=u'query',
243        request_field='',
244        request_type_name=u'FusiontablesQuerySqlRequest',
245        response_type_name=u'Sqlresponse',
246        supports_download=True,
247    )
248
249    def SqlGet(self, request, global_params=None, download=None):
250      """Executes an SQL SELECT/SHOW/DESCRIBE statement.
251
252      Args:
253        request: (FusiontablesQuerySqlGetRequest) input message
254        global_params: (StandardQueryParameters, default: None) global arguments
255        download: (Download, default: None) If present, download
256            data from the request via this stream.
257      Returns:
258        (Sqlresponse) The response message.
259      """
260      config = self.GetMethodConfig('SqlGet')
261      return self._RunMethod(
262          config, request, global_params=global_params,
263          download=download)
264
265    SqlGet.method_config = lambda: base_api.ApiMethodInfo(
266        http_method=u'GET',
267        method_id=u'fusiontables.query.sqlGet',
268        ordered_params=[u'sql'],
269        path_params=[],
270        query_params=[u'hdrs', u'sql', u'typed'],
271        relative_path=u'query',
272        request_field='',
273        request_type_name=u'FusiontablesQuerySqlGetRequest',
274        response_type_name=u'Sqlresponse',
275        supports_download=True,
276    )
277
278  class StyleService(base_api.BaseApiService):
279    """Service class for the style resource."""
280
281    _NAME = u'style'
282
283    def __init__(self, client):
284      super(FusiontablesV1.StyleService, self).__init__(client)
285      self._upload_configs = {
286          }
287
288    def Delete(self, request, global_params=None):
289      """Deletes a style.
290
291      Args:
292        request: (FusiontablesStyleDeleteRequest) input message
293        global_params: (StandardQueryParameters, default: None) global arguments
294      Returns:
295        (FusiontablesStyleDeleteResponse) The response message.
296      """
297      config = self.GetMethodConfig('Delete')
298      return self._RunMethod(
299          config, request, global_params=global_params)
300
301    Delete.method_config = lambda: base_api.ApiMethodInfo(
302        http_method=u'DELETE',
303        method_id=u'fusiontables.style.delete',
304        ordered_params=[u'tableId', u'styleId'],
305        path_params=[u'styleId', u'tableId'],
306        query_params=[],
307        relative_path=u'tables/{tableId}/styles/{styleId}',
308        request_field='',
309        request_type_name=u'FusiontablesStyleDeleteRequest',
310        response_type_name=u'FusiontablesStyleDeleteResponse',
311        supports_download=False,
312    )
313
314    def Get(self, request, global_params=None):
315      """Gets a specific style.
316
317      Args:
318        request: (FusiontablesStyleGetRequest) input message
319        global_params: (StandardQueryParameters, default: None) global arguments
320      Returns:
321        (StyleSetting) The response message.
322      """
323      config = self.GetMethodConfig('Get')
324      return self._RunMethod(
325          config, request, global_params=global_params)
326
327    Get.method_config = lambda: base_api.ApiMethodInfo(
328        http_method=u'GET',
329        method_id=u'fusiontables.style.get',
330        ordered_params=[u'tableId', u'styleId'],
331        path_params=[u'styleId', u'tableId'],
332        query_params=[],
333        relative_path=u'tables/{tableId}/styles/{styleId}',
334        request_field='',
335        request_type_name=u'FusiontablesStyleGetRequest',
336        response_type_name=u'StyleSetting',
337        supports_download=False,
338    )
339
340    def Insert(self, request, global_params=None):
341      """Adds a new style for the table.
342
343      Args:
344        request: (StyleSetting) input message
345        global_params: (StandardQueryParameters, default: None) global arguments
346      Returns:
347        (StyleSetting) The response message.
348      """
349      config = self.GetMethodConfig('Insert')
350      return self._RunMethod(
351          config, request, global_params=global_params)
352
353    Insert.method_config = lambda: base_api.ApiMethodInfo(
354        http_method=u'POST',
355        method_id=u'fusiontables.style.insert',
356        ordered_params=[u'tableId'],
357        path_params=[u'tableId'],
358        query_params=[],
359        relative_path=u'tables/{tableId}/styles',
360        request_field='<request>',
361        request_type_name=u'StyleSetting',
362        response_type_name=u'StyleSetting',
363        supports_download=False,
364    )
365
366    def List(self, request, global_params=None):
367      """Retrieves a list of styles.
368
369      Args:
370        request: (FusiontablesStyleListRequest) input message
371        global_params: (StandardQueryParameters, default: None) global arguments
372      Returns:
373        (StyleSettingList) The response message.
374      """
375      config = self.GetMethodConfig('List')
376      return self._RunMethod(
377          config, request, global_params=global_params)
378
379    List.method_config = lambda: base_api.ApiMethodInfo(
380        http_method=u'GET',
381        method_id=u'fusiontables.style.list',
382        ordered_params=[u'tableId'],
383        path_params=[u'tableId'],
384        query_params=[u'maxResults', u'pageToken'],
385        relative_path=u'tables/{tableId}/styles',
386        request_field='',
387        request_type_name=u'FusiontablesStyleListRequest',
388        response_type_name=u'StyleSettingList',
389        supports_download=False,
390    )
391
392    def Patch(self, request, global_params=None):
393      """Updates an existing style. This method supports patch semantics.
394
395      Args:
396        request: (StyleSetting) input message
397        global_params: (StandardQueryParameters, default: None) global arguments
398      Returns:
399        (StyleSetting) The response message.
400      """
401      config = self.GetMethodConfig('Patch')
402      return self._RunMethod(
403          config, request, global_params=global_params)
404
405    Patch.method_config = lambda: base_api.ApiMethodInfo(
406        http_method=u'PATCH',
407        method_id=u'fusiontables.style.patch',
408        ordered_params=[u'tableId', u'styleId'],
409        path_params=[u'styleId', u'tableId'],
410        query_params=[],
411        relative_path=u'tables/{tableId}/styles/{styleId}',
412        request_field='<request>',
413        request_type_name=u'StyleSetting',
414        response_type_name=u'StyleSetting',
415        supports_download=False,
416    )
417
418    def Update(self, request, global_params=None):
419      """Updates an existing style.
420
421      Args:
422        request: (StyleSetting) input message
423        global_params: (StandardQueryParameters, default: None) global arguments
424      Returns:
425        (StyleSetting) The response message.
426      """
427      config = self.GetMethodConfig('Update')
428      return self._RunMethod(
429          config, request, global_params=global_params)
430
431    Update.method_config = lambda: base_api.ApiMethodInfo(
432        http_method=u'PUT',
433        method_id=u'fusiontables.style.update',
434        ordered_params=[u'tableId', u'styleId'],
435        path_params=[u'styleId', u'tableId'],
436        query_params=[],
437        relative_path=u'tables/{tableId}/styles/{styleId}',
438        request_field='<request>',
439        request_type_name=u'StyleSetting',
440        response_type_name=u'StyleSetting',
441        supports_download=False,
442    )
443
444  class TableService(base_api.BaseApiService):
445    """Service class for the table resource."""
446
447    _NAME = u'table'
448
449    def __init__(self, client):
450      super(FusiontablesV1.TableService, self).__init__(client)
451      self._upload_configs = {
452          'ImportRows': base_api.ApiUploadInfo(
453              accept=['application/octet-stream'],
454              max_size=262144000,
455              resumable_multipart=True,
456              resumable_path=u'/resumable/upload/fusiontables/v1/tables/{tableId}/import',
457              simple_multipart=True,
458              simple_path=u'/upload/fusiontables/v1/tables/{tableId}/import',
459          ),
460          'ImportTable': base_api.ApiUploadInfo(
461              accept=['application/octet-stream'],
462              max_size=262144000,
463              resumable_multipart=True,
464              resumable_path=u'/resumable/upload/fusiontables/v1/tables/import',
465              simple_multipart=True,
466              simple_path=u'/upload/fusiontables/v1/tables/import',
467          ),
468          }
469
470    def Copy(self, request, global_params=None):
471      """Copies a table.
472
473      Args:
474        request: (FusiontablesTableCopyRequest) input message
475        global_params: (StandardQueryParameters, default: None) global arguments
476      Returns:
477        (Table) The response message.
478      """
479      config = self.GetMethodConfig('Copy')
480      return self._RunMethod(
481          config, request, global_params=global_params)
482
483    Copy.method_config = lambda: base_api.ApiMethodInfo(
484        http_method=u'POST',
485        method_id=u'fusiontables.table.copy',
486        ordered_params=[u'tableId'],
487        path_params=[u'tableId'],
488        query_params=[u'copyPresentation'],
489        relative_path=u'tables/{tableId}/copy',
490        request_field='',
491        request_type_name=u'FusiontablesTableCopyRequest',
492        response_type_name=u'Table',
493        supports_download=False,
494    )
495
496    def Delete(self, request, global_params=None):
497      """Deletes a table.
498
499      Args:
500        request: (FusiontablesTableDeleteRequest) input message
501        global_params: (StandardQueryParameters, default: None) global arguments
502      Returns:
503        (FusiontablesTableDeleteResponse) The response message.
504      """
505      config = self.GetMethodConfig('Delete')
506      return self._RunMethod(
507          config, request, global_params=global_params)
508
509    Delete.method_config = lambda: base_api.ApiMethodInfo(
510        http_method=u'DELETE',
511        method_id=u'fusiontables.table.delete',
512        ordered_params=[u'tableId'],
513        path_params=[u'tableId'],
514        query_params=[],
515        relative_path=u'tables/{tableId}',
516        request_field='',
517        request_type_name=u'FusiontablesTableDeleteRequest',
518        response_type_name=u'FusiontablesTableDeleteResponse',
519        supports_download=False,
520    )
521
522    def Get(self, request, global_params=None):
523      """Retrieves a specific table by its id.
524
525      Args:
526        request: (FusiontablesTableGetRequest) input message
527        global_params: (StandardQueryParameters, default: None) global arguments
528      Returns:
529        (Table) The response message.
530      """
531      config = self.GetMethodConfig('Get')
532      return self._RunMethod(
533          config, request, global_params=global_params)
534
535    Get.method_config = lambda: base_api.ApiMethodInfo(
536        http_method=u'GET',
537        method_id=u'fusiontables.table.get',
538        ordered_params=[u'tableId'],
539        path_params=[u'tableId'],
540        query_params=[],
541        relative_path=u'tables/{tableId}',
542        request_field='',
543        request_type_name=u'FusiontablesTableGetRequest',
544        response_type_name=u'Table',
545        supports_download=False,
546    )
547
548    def ImportRows(self, request, global_params=None, upload=None):
549      """Import more rows into a table.
550
551      Args:
552        request: (FusiontablesTableImportRowsRequest) input message
553        global_params: (StandardQueryParameters, default: None) global arguments
554        upload: (Upload, default: None) If present, upload
555            this stream with the request.
556      Returns:
557        (Import) The response message.
558      """
559      config = self.GetMethodConfig('ImportRows')
560      upload_config = self.GetUploadConfig('ImportRows')
561      return self._RunMethod(
562          config, request, global_params=global_params,
563          upload=upload, upload_config=upload_config)
564
565    ImportRows.method_config = lambda: base_api.ApiMethodInfo(
566        http_method=u'POST',
567        method_id=u'fusiontables.table.importRows',
568        ordered_params=[u'tableId'],
569        path_params=[u'tableId'],
570        query_params=[u'delimiter', u'encoding', u'endLine', u'isStrict', u'startLine'],
571        relative_path=u'tables/{tableId}/import',
572        request_field='',
573        request_type_name=u'FusiontablesTableImportRowsRequest',
574        response_type_name=u'Import',
575        supports_download=False,
576    )
577
578    def ImportTable(self, request, global_params=None, upload=None):
579      """Import a new table.
580
581      Args:
582        request: (FusiontablesTableImportTableRequest) input message
583        global_params: (StandardQueryParameters, default: None) global arguments
584        upload: (Upload, default: None) If present, upload
585            this stream with the request.
586      Returns:
587        (Table) The response message.
588      """
589      config = self.GetMethodConfig('ImportTable')
590      upload_config = self.GetUploadConfig('ImportTable')
591      return self._RunMethod(
592          config, request, global_params=global_params,
593          upload=upload, upload_config=upload_config)
594
595    ImportTable.method_config = lambda: base_api.ApiMethodInfo(
596        http_method=u'POST',
597        method_id=u'fusiontables.table.importTable',
598        ordered_params=[u'name'],
599        path_params=[],
600        query_params=[u'delimiter', u'encoding', u'name'],
601        relative_path=u'tables/import',
602        request_field='',
603        request_type_name=u'FusiontablesTableImportTableRequest',
604        response_type_name=u'Table',
605        supports_download=False,
606    )
607
608    def Insert(self, request, global_params=None):
609      """Creates a new table.
610
611      Args:
612        request: (Table) input message
613        global_params: (StandardQueryParameters, default: None) global arguments
614      Returns:
615        (Table) The response message.
616      """
617      config = self.GetMethodConfig('Insert')
618      return self._RunMethod(
619          config, request, global_params=global_params)
620
621    Insert.method_config = lambda: base_api.ApiMethodInfo(
622        http_method=u'POST',
623        method_id=u'fusiontables.table.insert',
624        ordered_params=[],
625        path_params=[],
626        query_params=[],
627        relative_path=u'tables',
628        request_field='<request>',
629        request_type_name=u'Table',
630        response_type_name=u'Table',
631        supports_download=False,
632    )
633
634    def List(self, request, global_params=None):
635      """Retrieves a list of tables a user owns.
636
637      Args:
638        request: (FusiontablesTableListRequest) input message
639        global_params: (StandardQueryParameters, default: None) global arguments
640      Returns:
641        (TableList) The response message.
642      """
643      config = self.GetMethodConfig('List')
644      return self._RunMethod(
645          config, request, global_params=global_params)
646
647    List.method_config = lambda: base_api.ApiMethodInfo(
648        http_method=u'GET',
649        method_id=u'fusiontables.table.list',
650        ordered_params=[],
651        path_params=[],
652        query_params=[u'maxResults', u'pageToken'],
653        relative_path=u'tables',
654        request_field='',
655        request_type_name=u'FusiontablesTableListRequest',
656        response_type_name=u'TableList',
657        supports_download=False,
658    )
659
660    def Patch(self, request, global_params=None):
661      """Updates an existing table. Unless explicitly requested, only the name, description, and attribution will be updated. This method supports patch semantics.
662
663      Args:
664        request: (FusiontablesTablePatchRequest) input message
665        global_params: (StandardQueryParameters, default: None) global arguments
666      Returns:
667        (Table) The response message.
668      """
669      config = self.GetMethodConfig('Patch')
670      return self._RunMethod(
671          config, request, global_params=global_params)
672
673    Patch.method_config = lambda: base_api.ApiMethodInfo(
674        http_method=u'PATCH',
675        method_id=u'fusiontables.table.patch',
676        ordered_params=[u'tableId'],
677        path_params=[u'tableId'],
678        query_params=[u'replaceViewDefinition'],
679        relative_path=u'tables/{tableId}',
680        request_field=u'table',
681        request_type_name=u'FusiontablesTablePatchRequest',
682        response_type_name=u'Table',
683        supports_download=False,
684    )
685
686    def Update(self, request, global_params=None):
687      """Updates an existing table. Unless explicitly requested, only the name, description, and attribution will be updated.
688
689      Args:
690        request: (FusiontablesTableUpdateRequest) input message
691        global_params: (StandardQueryParameters, default: None) global arguments
692      Returns:
693        (Table) The response message.
694      """
695      config = self.GetMethodConfig('Update')
696      return self._RunMethod(
697          config, request, global_params=global_params)
698
699    Update.method_config = lambda: base_api.ApiMethodInfo(
700        http_method=u'PUT',
701        method_id=u'fusiontables.table.update',
702        ordered_params=[u'tableId'],
703        path_params=[u'tableId'],
704        query_params=[u'replaceViewDefinition'],
705        relative_path=u'tables/{tableId}',
706        request_field=u'table',
707        request_type_name=u'FusiontablesTableUpdateRequest',
708        response_type_name=u'Table',
709        supports_download=False,
710    )
711
712  class TaskService(base_api.BaseApiService):
713    """Service class for the task resource."""
714
715    _NAME = u'task'
716
717    def __init__(self, client):
718      super(FusiontablesV1.TaskService, self).__init__(client)
719      self._upload_configs = {
720          }
721
722    def Delete(self, request, global_params=None):
723      """Deletes the task, unless already started.
724
725      Args:
726        request: (FusiontablesTaskDeleteRequest) input message
727        global_params: (StandardQueryParameters, default: None) global arguments
728      Returns:
729        (FusiontablesTaskDeleteResponse) The response message.
730      """
731      config = self.GetMethodConfig('Delete')
732      return self._RunMethod(
733          config, request, global_params=global_params)
734
735    Delete.method_config = lambda: base_api.ApiMethodInfo(
736        http_method=u'DELETE',
737        method_id=u'fusiontables.task.delete',
738        ordered_params=[u'tableId', u'taskId'],
739        path_params=[u'tableId', u'taskId'],
740        query_params=[],
741        relative_path=u'tables/{tableId}/tasks/{taskId}',
742        request_field='',
743        request_type_name=u'FusiontablesTaskDeleteRequest',
744        response_type_name=u'FusiontablesTaskDeleteResponse',
745        supports_download=False,
746    )
747
748    def Get(self, request, global_params=None):
749      """Retrieves a specific task by its id.
750
751      Args:
752        request: (FusiontablesTaskGetRequest) input message
753        global_params: (StandardQueryParameters, default: None) global arguments
754      Returns:
755        (Task) The response message.
756      """
757      config = self.GetMethodConfig('Get')
758      return self._RunMethod(
759          config, request, global_params=global_params)
760
761    Get.method_config = lambda: base_api.ApiMethodInfo(
762        http_method=u'GET',
763        method_id=u'fusiontables.task.get',
764        ordered_params=[u'tableId', u'taskId'],
765        path_params=[u'tableId', u'taskId'],
766        query_params=[],
767        relative_path=u'tables/{tableId}/tasks/{taskId}',
768        request_field='',
769        request_type_name=u'FusiontablesTaskGetRequest',
770        response_type_name=u'Task',
771        supports_download=False,
772    )
773
774    def List(self, request, global_params=None):
775      """Retrieves a list of tasks.
776
777      Args:
778        request: (FusiontablesTaskListRequest) input message
779        global_params: (StandardQueryParameters, default: None) global arguments
780      Returns:
781        (TaskList) The response message.
782      """
783      config = self.GetMethodConfig('List')
784      return self._RunMethod(
785          config, request, global_params=global_params)
786
787    List.method_config = lambda: base_api.ApiMethodInfo(
788        http_method=u'GET',
789        method_id=u'fusiontables.task.list',
790        ordered_params=[u'tableId'],
791        path_params=[u'tableId'],
792        query_params=[u'maxResults', u'pageToken', u'startIndex'],
793        relative_path=u'tables/{tableId}/tasks',
794        request_field='',
795        request_type_name=u'FusiontablesTaskListRequest',
796        response_type_name=u'TaskList',
797        supports_download=False,
798    )
799
800  class TemplateService(base_api.BaseApiService):
801    """Service class for the template resource."""
802
803    _NAME = u'template'
804
805    def __init__(self, client):
806      super(FusiontablesV1.TemplateService, self).__init__(client)
807      self._upload_configs = {
808          }
809
810    def Delete(self, request, global_params=None):
811      """Deletes a template.
812
813      Args:
814        request: (FusiontablesTemplateDeleteRequest) input message
815        global_params: (StandardQueryParameters, default: None) global arguments
816      Returns:
817        (FusiontablesTemplateDeleteResponse) The response message.
818      """
819      config = self.GetMethodConfig('Delete')
820      return self._RunMethod(
821          config, request, global_params=global_params)
822
823    Delete.method_config = lambda: base_api.ApiMethodInfo(
824        http_method=u'DELETE',
825        method_id=u'fusiontables.template.delete',
826        ordered_params=[u'tableId', u'templateId'],
827        path_params=[u'tableId', u'templateId'],
828        query_params=[],
829        relative_path=u'tables/{tableId}/templates/{templateId}',
830        request_field='',
831        request_type_name=u'FusiontablesTemplateDeleteRequest',
832        response_type_name=u'FusiontablesTemplateDeleteResponse',
833        supports_download=False,
834    )
835
836    def Get(self, request, global_params=None):
837      """Retrieves a specific template by its id.
838
839      Args:
840        request: (FusiontablesTemplateGetRequest) input message
841        global_params: (StandardQueryParameters, default: None) global arguments
842      Returns:
843        (Template) The response message.
844      """
845      config = self.GetMethodConfig('Get')
846      return self._RunMethod(
847          config, request, global_params=global_params)
848
849    Get.method_config = lambda: base_api.ApiMethodInfo(
850        http_method=u'GET',
851        method_id=u'fusiontables.template.get',
852        ordered_params=[u'tableId', u'templateId'],
853        path_params=[u'tableId', u'templateId'],
854        query_params=[],
855        relative_path=u'tables/{tableId}/templates/{templateId}',
856        request_field='',
857        request_type_name=u'FusiontablesTemplateGetRequest',
858        response_type_name=u'Template',
859        supports_download=False,
860    )
861
862    def Insert(self, request, global_params=None):
863      """Creates a new template for the table.
864
865      Args:
866        request: (Template) input message
867        global_params: (StandardQueryParameters, default: None) global arguments
868      Returns:
869        (Template) The response message.
870      """
871      config = self.GetMethodConfig('Insert')
872      return self._RunMethod(
873          config, request, global_params=global_params)
874
875    Insert.method_config = lambda: base_api.ApiMethodInfo(
876        http_method=u'POST',
877        method_id=u'fusiontables.template.insert',
878        ordered_params=[u'tableId'],
879        path_params=[u'tableId'],
880        query_params=[],
881        relative_path=u'tables/{tableId}/templates',
882        request_field='<request>',
883        request_type_name=u'Template',
884        response_type_name=u'Template',
885        supports_download=False,
886    )
887
888    def List(self, request, global_params=None):
889      """Retrieves a list of templates.
890
891      Args:
892        request: (FusiontablesTemplateListRequest) input message
893        global_params: (StandardQueryParameters, default: None) global arguments
894      Returns:
895        (TemplateList) The response message.
896      """
897      config = self.GetMethodConfig('List')
898      return self._RunMethod(
899          config, request, global_params=global_params)
900
901    List.method_config = lambda: base_api.ApiMethodInfo(
902        http_method=u'GET',
903        method_id=u'fusiontables.template.list',
904        ordered_params=[u'tableId'],
905        path_params=[u'tableId'],
906        query_params=[u'maxResults', u'pageToken'],
907        relative_path=u'tables/{tableId}/templates',
908        request_field='',
909        request_type_name=u'FusiontablesTemplateListRequest',
910        response_type_name=u'TemplateList',
911        supports_download=False,
912    )
913
914    def Patch(self, request, global_params=None):
915      """Updates an existing template. This method supports patch semantics.
916
917      Args:
918        request: (Template) input message
919        global_params: (StandardQueryParameters, default: None) global arguments
920      Returns:
921        (Template) The response message.
922      """
923      config = self.GetMethodConfig('Patch')
924      return self._RunMethod(
925          config, request, global_params=global_params)
926
927    Patch.method_config = lambda: base_api.ApiMethodInfo(
928        http_method=u'PATCH',
929        method_id=u'fusiontables.template.patch',
930        ordered_params=[u'tableId', u'templateId'],
931        path_params=[u'tableId', u'templateId'],
932        query_params=[],
933        relative_path=u'tables/{tableId}/templates/{templateId}',
934        request_field='<request>',
935        request_type_name=u'Template',
936        response_type_name=u'Template',
937        supports_download=False,
938    )
939
940    def Update(self, request, global_params=None):
941      """Updates an existing template.
942
943      Args:
944        request: (Template) input message
945        global_params: (StandardQueryParameters, default: None) global arguments
946      Returns:
947        (Template) The response message.
948      """
949      config = self.GetMethodConfig('Update')
950      return self._RunMethod(
951          config, request, global_params=global_params)
952
953    Update.method_config = lambda: base_api.ApiMethodInfo(
954        http_method=u'PUT',
955        method_id=u'fusiontables.template.update',
956        ordered_params=[u'tableId', u'templateId'],
957        path_params=[u'tableId', u'templateId'],
958        query_params=[],
959        relative_path=u'tables/{tableId}/templates/{templateId}',
960        request_field='<request>',
961        request_type_name=u'Template',
962        response_type_name=u'Template',
963        supports_download=False,
964    )
965