1# coding: utf-8
2"""
3    Kubernetes
4
5    No description provided (generated by Swagger Codegen
6    https://github.com/swagger-api/swagger-codegen)
7
8    OpenAPI spec version: v1.14.4
9
10    Generated by: https://github.com/swagger-api/swagger-codegen.git
11"""
12
13from __future__ import absolute_import
14
15import sys
16import os
17import re
18
19# python 2 and python 3 compatibility library
20from six import iteritems
21
22from ..api_client import ApiClient
23
24
25class AppsV1beta2Api(object):
26  """
27    NOTE: This class is auto generated by the swagger code generator program.
28    Do not edit the class manually.
29    Ref: https://github.com/swagger-api/swagger-codegen
30    """
31
32  def __init__(self, api_client=None):
33    if api_client is None:
34      api_client = ApiClient()
35    self.api_client = api_client
36
37  def create_namespaced_controller_revision(self, namespace, body, **kwargs):
38    """
39        create a ControllerRevision
40        This method makes a synchronous HTTP request by default. To make an
41        asynchronous HTTP request, please pass async_req=True
42        >>> thread = api.create_namespaced_controller_revision(namespace, body,
43        async_req=True)
44        >>> result = thread.get()
45
46        :param async_req bool
47        :param str namespace: object name and auth scope, such as for teams and
48        projects (required)
49        :param V1beta2ControllerRevision body: (required)
50        :param str pretty: If 'true', then the output is pretty printed.
51        :param str dry_run: When present, indicates that modifications should
52        not be persisted. An invalid or unrecognized dryRun directive will
53        result in an error response and no further processing of the request.
54        Valid values are: - All: all dry run stages will be processed
55        :param str field_manager: fieldManager is a name associated with the
56        actor or entity that is making these changes. The value must be less
57        than or 128 characters long, and only contain printable characters, as
58        defined by https://golang.org/pkg/unicode/#IsPrint.
59        :return: V1beta2ControllerRevision
60                 If the method is called asynchronously,
61                 returns the request thread.
62        """
63    kwargs['_return_http_data_only'] = True
64    if kwargs.get('async_req'):
65      return self.create_namespaced_controller_revision_with_http_info(
66          namespace, body, **kwargs)
67    else:
68      (data) = self.create_namespaced_controller_revision_with_http_info(
69          namespace, body, **kwargs)
70      return data
71
72  def create_namespaced_controller_revision_with_http_info(
73      self, namespace, body, **kwargs):
74    """
75        create a ControllerRevision
76        This method makes a synchronous HTTP request by default. To make an
77        asynchronous HTTP request, please pass async_req=True
78        >>> thread =
79        api.create_namespaced_controller_revision_with_http_info(namespace,
80        body, async_req=True)
81        >>> result = thread.get()
82
83        :param async_req bool
84        :param str namespace: object name and auth scope, such as for teams and
85        projects (required)
86        :param V1beta2ControllerRevision body: (required)
87        :param str pretty: If 'true', then the output is pretty printed.
88        :param str dry_run: When present, indicates that modifications should
89        not be persisted. An invalid or unrecognized dryRun directive will
90        result in an error response and no further processing of the request.
91        Valid values are: - All: all dry run stages will be processed
92        :param str field_manager: fieldManager is a name associated with the
93        actor or entity that is making these changes. The value must be less
94        than or 128 characters long, and only contain printable characters, as
95        defined by https://golang.org/pkg/unicode/#IsPrint.
96        :return: V1beta2ControllerRevision
97                 If the method is called asynchronously,
98                 returns the request thread.
99        """
100
101    all_params = ['namespace', 'body', 'pretty', 'dry_run', 'field_manager']
102    all_params.append('async_req')
103    all_params.append('_return_http_data_only')
104    all_params.append('_preload_content')
105    all_params.append('_request_timeout')
106
107    params = locals()
108    for key, val in iteritems(params['kwargs']):
109      if key not in all_params:
110        raise TypeError("Got an unexpected keyword argument '%s'"
111                        ' to method create_namespaced_controller_revision' %
112                        key)
113      params[key] = val
114    del params['kwargs']
115    # verify the required parameter 'namespace' is set
116    if ('namespace' not in params) or (params['namespace'] is None):
117      raise ValueError(
118          'Missing the required parameter `namespace` when calling `create_namespaced_controller_revision`'
119      )
120    # verify the required parameter 'body' is set
121    if ('body' not in params) or (params['body'] is None):
122      raise ValueError(
123          'Missing the required parameter `body` when calling `create_namespaced_controller_revision`'
124      )
125
126    collection_formats = {}
127
128    path_params = {}
129    if 'namespace' in params:
130      path_params['namespace'] = params['namespace']
131
132    query_params = []
133    if 'pretty' in params:
134      query_params.append(('pretty', params['pretty']))
135    if 'dry_run' in params:
136      query_params.append(('dryRun', params['dry_run']))
137    if 'field_manager' in params:
138      query_params.append(('fieldManager', params['field_manager']))
139
140    header_params = {}
141
142    form_params = []
143    local_var_files = {}
144
145    body_params = None
146    if 'body' in params:
147      body_params = params['body']
148    # HTTP header `Accept`
149    header_params['Accept'] = self.api_client.\
150        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
151
152    # HTTP header `Content-Type`
153    header_params['Content-Type'] = self.api_client.\
154        select_header_content_type(['*/*'])
155
156    # Authentication setting
157    auth_settings = ['BearerToken']
158
159    return self.api_client.call_api(
160        '/apis/apps/v1beta2/namespaces/{namespace}/controllerrevisions',
161        'POST',
162        path_params,
163        query_params,
164        header_params,
165        body=body_params,
166        post_params=form_params,
167        files=local_var_files,
168        response_type='V1beta2ControllerRevision',
169        auth_settings=auth_settings,
170        async_req=params.get('async_req'),
171        _return_http_data_only=params.get('_return_http_data_only'),
172        _preload_content=params.get('_preload_content', True),
173        _request_timeout=params.get('_request_timeout'),
174        collection_formats=collection_formats)
175
176  def create_namespaced_daemon_set(self, namespace, body, **kwargs):
177    """
178        create a DaemonSet
179        This method makes a synchronous HTTP request by default. To make an
180        asynchronous HTTP request, please pass async_req=True
181        >>> thread = api.create_namespaced_daemon_set(namespace, body,
182        async_req=True)
183        >>> result = thread.get()
184
185        :param async_req bool
186        :param str namespace: object name and auth scope, such as for teams and
187        projects (required)
188        :param V1beta2DaemonSet body: (required)
189        :param str pretty: If 'true', then the output is pretty printed.
190        :param str dry_run: When present, indicates that modifications should
191        not be persisted. An invalid or unrecognized dryRun directive will
192        result in an error response and no further processing of the request.
193        Valid values are: - All: all dry run stages will be processed
194        :param str field_manager: fieldManager is a name associated with the
195        actor or entity that is making these changes. The value must be less
196        than or 128 characters long, and only contain printable characters, as
197        defined by https://golang.org/pkg/unicode/#IsPrint.
198        :return: V1beta2DaemonSet
199                 If the method is called asynchronously,
200                 returns the request thread.
201        """
202    kwargs['_return_http_data_only'] = True
203    if kwargs.get('async_req'):
204      return self.create_namespaced_daemon_set_with_http_info(
205          namespace, body, **kwargs)
206    else:
207      (data) = self.create_namespaced_daemon_set_with_http_info(
208          namespace, body, **kwargs)
209      return data
210
211  def create_namespaced_daemon_set_with_http_info(self, namespace, body,
212                                                  **kwargs):
213    """
214        create a DaemonSet
215        This method makes a synchronous HTTP request by default. To make an
216        asynchronous HTTP request, please pass async_req=True
217        >>> thread = api.create_namespaced_daemon_set_with_http_info(namespace,
218        body, async_req=True)
219        >>> result = thread.get()
220
221        :param async_req bool
222        :param str namespace: object name and auth scope, such as for teams and
223        projects (required)
224        :param V1beta2DaemonSet body: (required)
225        :param str pretty: If 'true', then the output is pretty printed.
226        :param str dry_run: When present, indicates that modifications should
227        not be persisted. An invalid or unrecognized dryRun directive will
228        result in an error response and no further processing of the request.
229        Valid values are: - All: all dry run stages will be processed
230        :param str field_manager: fieldManager is a name associated with the
231        actor or entity that is making these changes. The value must be less
232        than or 128 characters long, and only contain printable characters, as
233        defined by https://golang.org/pkg/unicode/#IsPrint.
234        :return: V1beta2DaemonSet
235                 If the method is called asynchronously,
236                 returns the request thread.
237        """
238
239    all_params = ['namespace', 'body', 'pretty', 'dry_run', 'field_manager']
240    all_params.append('async_req')
241    all_params.append('_return_http_data_only')
242    all_params.append('_preload_content')
243    all_params.append('_request_timeout')
244
245    params = locals()
246    for key, val in iteritems(params['kwargs']):
247      if key not in all_params:
248        raise TypeError("Got an unexpected keyword argument '%s'"
249                        ' to method create_namespaced_daemon_set' % key)
250      params[key] = val
251    del params['kwargs']
252    # verify the required parameter 'namespace' is set
253    if ('namespace' not in params) or (params['namespace'] is None):
254      raise ValueError(
255          'Missing the required parameter `namespace` when calling `create_namespaced_daemon_set`'
256      )
257    # verify the required parameter 'body' is set
258    if ('body' not in params) or (params['body'] is None):
259      raise ValueError(
260          'Missing the required parameter `body` when calling `create_namespaced_daemon_set`'
261      )
262
263    collection_formats = {}
264
265    path_params = {}
266    if 'namespace' in params:
267      path_params['namespace'] = params['namespace']
268
269    query_params = []
270    if 'pretty' in params:
271      query_params.append(('pretty', params['pretty']))
272    if 'dry_run' in params:
273      query_params.append(('dryRun', params['dry_run']))
274    if 'field_manager' in params:
275      query_params.append(('fieldManager', params['field_manager']))
276
277    header_params = {}
278
279    form_params = []
280    local_var_files = {}
281
282    body_params = None
283    if 'body' in params:
284      body_params = params['body']
285    # HTTP header `Accept`
286    header_params['Accept'] = self.api_client.\
287        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
288
289    # HTTP header `Content-Type`
290    header_params['Content-Type'] = self.api_client.\
291        select_header_content_type(['*/*'])
292
293    # Authentication setting
294    auth_settings = ['BearerToken']
295
296    return self.api_client.call_api(
297        '/apis/apps/v1beta2/namespaces/{namespace}/daemonsets',
298        'POST',
299        path_params,
300        query_params,
301        header_params,
302        body=body_params,
303        post_params=form_params,
304        files=local_var_files,
305        response_type='V1beta2DaemonSet',
306        auth_settings=auth_settings,
307        async_req=params.get('async_req'),
308        _return_http_data_only=params.get('_return_http_data_only'),
309        _preload_content=params.get('_preload_content', True),
310        _request_timeout=params.get('_request_timeout'),
311        collection_formats=collection_formats)
312
313  def create_namespaced_deployment(self, namespace, body, **kwargs):
314    """
315        create a Deployment
316        This method makes a synchronous HTTP request by default. To make an
317        asynchronous HTTP request, please pass async_req=True
318        >>> thread = api.create_namespaced_deployment(namespace, body,
319        async_req=True)
320        >>> result = thread.get()
321
322        :param async_req bool
323        :param str namespace: object name and auth scope, such as for teams and
324        projects (required)
325        :param V1beta2Deployment body: (required)
326        :param str pretty: If 'true', then the output is pretty printed.
327        :param str dry_run: When present, indicates that modifications should
328        not be persisted. An invalid or unrecognized dryRun directive will
329        result in an error response and no further processing of the request.
330        Valid values are: - All: all dry run stages will be processed
331        :param str field_manager: fieldManager is a name associated with the
332        actor or entity that is making these changes. The value must be less
333        than or 128 characters long, and only contain printable characters, as
334        defined by https://golang.org/pkg/unicode/#IsPrint.
335        :return: V1beta2Deployment
336                 If the method is called asynchronously,
337                 returns the request thread.
338        """
339    kwargs['_return_http_data_only'] = True
340    if kwargs.get('async_req'):
341      return self.create_namespaced_deployment_with_http_info(
342          namespace, body, **kwargs)
343    else:
344      (data) = self.create_namespaced_deployment_with_http_info(
345          namespace, body, **kwargs)
346      return data
347
348  def create_namespaced_deployment_with_http_info(self, namespace, body,
349                                                  **kwargs):
350    """
351        create a Deployment
352        This method makes a synchronous HTTP request by default. To make an
353        asynchronous HTTP request, please pass async_req=True
354        >>> thread = api.create_namespaced_deployment_with_http_info(namespace,
355        body, async_req=True)
356        >>> result = thread.get()
357
358        :param async_req bool
359        :param str namespace: object name and auth scope, such as for teams and
360        projects (required)
361        :param V1beta2Deployment body: (required)
362        :param str pretty: If 'true', then the output is pretty printed.
363        :param str dry_run: When present, indicates that modifications should
364        not be persisted. An invalid or unrecognized dryRun directive will
365        result in an error response and no further processing of the request.
366        Valid values are: - All: all dry run stages will be processed
367        :param str field_manager: fieldManager is a name associated with the
368        actor or entity that is making these changes. The value must be less
369        than or 128 characters long, and only contain printable characters, as
370        defined by https://golang.org/pkg/unicode/#IsPrint.
371        :return: V1beta2Deployment
372                 If the method is called asynchronously,
373                 returns the request thread.
374        """
375
376    all_params = ['namespace', 'body', 'pretty', 'dry_run', 'field_manager']
377    all_params.append('async_req')
378    all_params.append('_return_http_data_only')
379    all_params.append('_preload_content')
380    all_params.append('_request_timeout')
381
382    params = locals()
383    for key, val in iteritems(params['kwargs']):
384      if key not in all_params:
385        raise TypeError("Got an unexpected keyword argument '%s'"
386                        ' to method create_namespaced_deployment' % key)
387      params[key] = val
388    del params['kwargs']
389    # verify the required parameter 'namespace' is set
390    if ('namespace' not in params) or (params['namespace'] is None):
391      raise ValueError(
392          'Missing the required parameter `namespace` when calling `create_namespaced_deployment`'
393      )
394    # verify the required parameter 'body' is set
395    if ('body' not in params) or (params['body'] is None):
396      raise ValueError(
397          'Missing the required parameter `body` when calling `create_namespaced_deployment`'
398      )
399
400    collection_formats = {}
401
402    path_params = {}
403    if 'namespace' in params:
404      path_params['namespace'] = params['namespace']
405
406    query_params = []
407    if 'pretty' in params:
408      query_params.append(('pretty', params['pretty']))
409    if 'dry_run' in params:
410      query_params.append(('dryRun', params['dry_run']))
411    if 'field_manager' in params:
412      query_params.append(('fieldManager', params['field_manager']))
413
414    header_params = {}
415
416    form_params = []
417    local_var_files = {}
418
419    body_params = None
420    if 'body' in params:
421      body_params = params['body']
422    # HTTP header `Accept`
423    header_params['Accept'] = self.api_client.\
424        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
425
426    # HTTP header `Content-Type`
427    header_params['Content-Type'] = self.api_client.\
428        select_header_content_type(['*/*'])
429
430    # Authentication setting
431    auth_settings = ['BearerToken']
432
433    return self.api_client.call_api(
434        '/apis/apps/v1beta2/namespaces/{namespace}/deployments',
435        'POST',
436        path_params,
437        query_params,
438        header_params,
439        body=body_params,
440        post_params=form_params,
441        files=local_var_files,
442        response_type='V1beta2Deployment',
443        auth_settings=auth_settings,
444        async_req=params.get('async_req'),
445        _return_http_data_only=params.get('_return_http_data_only'),
446        _preload_content=params.get('_preload_content', True),
447        _request_timeout=params.get('_request_timeout'),
448        collection_formats=collection_formats)
449
450  def create_namespaced_replica_set(self, namespace, body, **kwargs):
451    """
452        create a ReplicaSet
453        This method makes a synchronous HTTP request by default. To make an
454        asynchronous HTTP request, please pass async_req=True
455        >>> thread = api.create_namespaced_replica_set(namespace, body,
456        async_req=True)
457        >>> result = thread.get()
458
459        :param async_req bool
460        :param str namespace: object name and auth scope, such as for teams and
461        projects (required)
462        :param V1beta2ReplicaSet body: (required)
463        :param str pretty: If 'true', then the output is pretty printed.
464        :param str dry_run: When present, indicates that modifications should
465        not be persisted. An invalid or unrecognized dryRun directive will
466        result in an error response and no further processing of the request.
467        Valid values are: - All: all dry run stages will be processed
468        :param str field_manager: fieldManager is a name associated with the
469        actor or entity that is making these changes. The value must be less
470        than or 128 characters long, and only contain printable characters, as
471        defined by https://golang.org/pkg/unicode/#IsPrint.
472        :return: V1beta2ReplicaSet
473                 If the method is called asynchronously,
474                 returns the request thread.
475        """
476    kwargs['_return_http_data_only'] = True
477    if kwargs.get('async_req'):
478      return self.create_namespaced_replica_set_with_http_info(
479          namespace, body, **kwargs)
480    else:
481      (data) = self.create_namespaced_replica_set_with_http_info(
482          namespace, body, **kwargs)
483      return data
484
485  def create_namespaced_replica_set_with_http_info(self, namespace, body,
486                                                   **kwargs):
487    """
488        create a ReplicaSet
489        This method makes a synchronous HTTP request by default. To make an
490        asynchronous HTTP request, please pass async_req=True
491        >>> thread = api.create_namespaced_replica_set_with_http_info(namespace,
492        body, async_req=True)
493        >>> result = thread.get()
494
495        :param async_req bool
496        :param str namespace: object name and auth scope, such as for teams and
497        projects (required)
498        :param V1beta2ReplicaSet body: (required)
499        :param str pretty: If 'true', then the output is pretty printed.
500        :param str dry_run: When present, indicates that modifications should
501        not be persisted. An invalid or unrecognized dryRun directive will
502        result in an error response and no further processing of the request.
503        Valid values are: - All: all dry run stages will be processed
504        :param str field_manager: fieldManager is a name associated with the
505        actor or entity that is making these changes. The value must be less
506        than or 128 characters long, and only contain printable characters, as
507        defined by https://golang.org/pkg/unicode/#IsPrint.
508        :return: V1beta2ReplicaSet
509                 If the method is called asynchronously,
510                 returns the request thread.
511        """
512
513    all_params = ['namespace', 'body', 'pretty', 'dry_run', 'field_manager']
514    all_params.append('async_req')
515    all_params.append('_return_http_data_only')
516    all_params.append('_preload_content')
517    all_params.append('_request_timeout')
518
519    params = locals()
520    for key, val in iteritems(params['kwargs']):
521      if key not in all_params:
522        raise TypeError("Got an unexpected keyword argument '%s'"
523                        ' to method create_namespaced_replica_set' % key)
524      params[key] = val
525    del params['kwargs']
526    # verify the required parameter 'namespace' is set
527    if ('namespace' not in params) or (params['namespace'] is None):
528      raise ValueError(
529          'Missing the required parameter `namespace` when calling `create_namespaced_replica_set`'
530      )
531    # verify the required parameter 'body' is set
532    if ('body' not in params) or (params['body'] is None):
533      raise ValueError(
534          'Missing the required parameter `body` when calling `create_namespaced_replica_set`'
535      )
536
537    collection_formats = {}
538
539    path_params = {}
540    if 'namespace' in params:
541      path_params['namespace'] = params['namespace']
542
543    query_params = []
544    if 'pretty' in params:
545      query_params.append(('pretty', params['pretty']))
546    if 'dry_run' in params:
547      query_params.append(('dryRun', params['dry_run']))
548    if 'field_manager' in params:
549      query_params.append(('fieldManager', params['field_manager']))
550
551    header_params = {}
552
553    form_params = []
554    local_var_files = {}
555
556    body_params = None
557    if 'body' in params:
558      body_params = params['body']
559    # HTTP header `Accept`
560    header_params['Accept'] = self.api_client.\
561        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
562
563    # HTTP header `Content-Type`
564    header_params['Content-Type'] = self.api_client.\
565        select_header_content_type(['*/*'])
566
567    # Authentication setting
568    auth_settings = ['BearerToken']
569
570    return self.api_client.call_api(
571        '/apis/apps/v1beta2/namespaces/{namespace}/replicasets',
572        'POST',
573        path_params,
574        query_params,
575        header_params,
576        body=body_params,
577        post_params=form_params,
578        files=local_var_files,
579        response_type='V1beta2ReplicaSet',
580        auth_settings=auth_settings,
581        async_req=params.get('async_req'),
582        _return_http_data_only=params.get('_return_http_data_only'),
583        _preload_content=params.get('_preload_content', True),
584        _request_timeout=params.get('_request_timeout'),
585        collection_formats=collection_formats)
586
587  def create_namespaced_stateful_set(self, namespace, body, **kwargs):
588    """
589        create a StatefulSet
590        This method makes a synchronous HTTP request by default. To make an
591        asynchronous HTTP request, please pass async_req=True
592        >>> thread = api.create_namespaced_stateful_set(namespace, body,
593        async_req=True)
594        >>> result = thread.get()
595
596        :param async_req bool
597        :param str namespace: object name and auth scope, such as for teams and
598        projects (required)
599        :param V1beta2StatefulSet body: (required)
600        :param str pretty: If 'true', then the output is pretty printed.
601        :param str dry_run: When present, indicates that modifications should
602        not be persisted. An invalid or unrecognized dryRun directive will
603        result in an error response and no further processing of the request.
604        Valid values are: - All: all dry run stages will be processed
605        :param str field_manager: fieldManager is a name associated with the
606        actor or entity that is making these changes. The value must be less
607        than or 128 characters long, and only contain printable characters, as
608        defined by https://golang.org/pkg/unicode/#IsPrint.
609        :return: V1beta2StatefulSet
610                 If the method is called asynchronously,
611                 returns the request thread.
612        """
613    kwargs['_return_http_data_only'] = True
614    if kwargs.get('async_req'):
615      return self.create_namespaced_stateful_set_with_http_info(
616          namespace, body, **kwargs)
617    else:
618      (data) = self.create_namespaced_stateful_set_with_http_info(
619          namespace, body, **kwargs)
620      return data
621
622  def create_namespaced_stateful_set_with_http_info(self, namespace, body,
623                                                    **kwargs):
624    """
625        create a StatefulSet
626        This method makes a synchronous HTTP request by default. To make an
627        asynchronous HTTP request, please pass async_req=True
628        >>> thread =
629        api.create_namespaced_stateful_set_with_http_info(namespace, body,
630        async_req=True)
631        >>> result = thread.get()
632
633        :param async_req bool
634        :param str namespace: object name and auth scope, such as for teams and
635        projects (required)
636        :param V1beta2StatefulSet body: (required)
637        :param str pretty: If 'true', then the output is pretty printed.
638        :param str dry_run: When present, indicates that modifications should
639        not be persisted. An invalid or unrecognized dryRun directive will
640        result in an error response and no further processing of the request.
641        Valid values are: - All: all dry run stages will be processed
642        :param str field_manager: fieldManager is a name associated with the
643        actor or entity that is making these changes. The value must be less
644        than or 128 characters long, and only contain printable characters, as
645        defined by https://golang.org/pkg/unicode/#IsPrint.
646        :return: V1beta2StatefulSet
647                 If the method is called asynchronously,
648                 returns the request thread.
649        """
650
651    all_params = ['namespace', 'body', 'pretty', 'dry_run', 'field_manager']
652    all_params.append('async_req')
653    all_params.append('_return_http_data_only')
654    all_params.append('_preload_content')
655    all_params.append('_request_timeout')
656
657    params = locals()
658    for key, val in iteritems(params['kwargs']):
659      if key not in all_params:
660        raise TypeError("Got an unexpected keyword argument '%s'"
661                        ' to method create_namespaced_stateful_set' % key)
662      params[key] = val
663    del params['kwargs']
664    # verify the required parameter 'namespace' is set
665    if ('namespace' not in params) or (params['namespace'] is None):
666      raise ValueError(
667          'Missing the required parameter `namespace` when calling `create_namespaced_stateful_set`'
668      )
669    # verify the required parameter 'body' is set
670    if ('body' not in params) or (params['body'] is None):
671      raise ValueError(
672          'Missing the required parameter `body` when calling `create_namespaced_stateful_set`'
673      )
674
675    collection_formats = {}
676
677    path_params = {}
678    if 'namespace' in params:
679      path_params['namespace'] = params['namespace']
680
681    query_params = []
682    if 'pretty' in params:
683      query_params.append(('pretty', params['pretty']))
684    if 'dry_run' in params:
685      query_params.append(('dryRun', params['dry_run']))
686    if 'field_manager' in params:
687      query_params.append(('fieldManager', params['field_manager']))
688
689    header_params = {}
690
691    form_params = []
692    local_var_files = {}
693
694    body_params = None
695    if 'body' in params:
696      body_params = params['body']
697    # HTTP header `Accept`
698    header_params['Accept'] = self.api_client.\
699        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
700
701    # HTTP header `Content-Type`
702    header_params['Content-Type'] = self.api_client.\
703        select_header_content_type(['*/*'])
704
705    # Authentication setting
706    auth_settings = ['BearerToken']
707
708    return self.api_client.call_api(
709        '/apis/apps/v1beta2/namespaces/{namespace}/statefulsets',
710        'POST',
711        path_params,
712        query_params,
713        header_params,
714        body=body_params,
715        post_params=form_params,
716        files=local_var_files,
717        response_type='V1beta2StatefulSet',
718        auth_settings=auth_settings,
719        async_req=params.get('async_req'),
720        _return_http_data_only=params.get('_return_http_data_only'),
721        _preload_content=params.get('_preload_content', True),
722        _request_timeout=params.get('_request_timeout'),
723        collection_formats=collection_formats)
724
725  def delete_collection_namespaced_controller_revision(self, namespace,
726                                                       **kwargs):
727    """
728        delete collection of ControllerRevision
729        This method makes a synchronous HTTP request by default. To make an
730        asynchronous HTTP request, please pass async_req=True
731        >>> thread =
732        api.delete_collection_namespaced_controller_revision(namespace,
733        async_req=True)
734        >>> result = thread.get()
735
736        :param async_req bool
737        :param str namespace: object name and auth scope, such as for teams and
738        projects (required)
739        :param str pretty: If 'true', then the output is pretty printed.
740        :param str _continue: The continue option should be set when retrieving
741        more results from the server. Since this value is server defined,
742        clients may only use the continue value from a previous query result
743        with identical query parameters (except for the value of continue) and
744        the server may reject a continue value it does not recognize. If the
745        specified continue value is no longer valid whether due to expiration
746        (generally five to fifteen minutes) or a configuration change on the
747        server, the server will respond with a 410 ResourceExpired error
748        together with a continue token. If the client needs a consistent list,
749        it must restart their list without the continue field. Otherwise, the
750        client may send another list request with the token received with the
751        410 error, the server will respond with a list starting from the next
752        key, but from the latest snapshot, which is inconsistent from the
753        previous list results - objects that are created, modified, or deleted
754        after the first list request will be included in the response, as long
755        as their keys are after the \"next key\".  This field is not supported
756        when watch is true. Clients may start a watch from the last
757        resourceVersion value returned by the server and not miss any
758        modifications.
759        :param str field_selector: A selector to restrict the list of returned
760        objects by their fields. Defaults to everything.
761        :param str label_selector: A selector to restrict the list of returned
762        objects by their labels. Defaults to everything.
763        :param int limit: limit is a maximum number of responses to return for a
764        list call. If more items exist, the server will set the `continue` field
765        on the list metadata to a value that can be used with the same initial
766        query to retrieve the next set of results. Setting a limit may return
767        fewer than the requested amount of items (up to zero items) in the event
768        all requested objects are filtered out and clients should only use the
769        presence of the continue field to determine whether more results are
770        available. Servers may choose not to support the limit argument and will
771        return all of the available results. If limit is specified and the
772        continue field is empty, clients may assume that no more results are
773        available. This field is not supported if watch is true.  The server
774        guarantees that the objects returned when using continue will be
775        identical to issuing a single list call without a limit - that is, no
776        objects created, modified, or deleted after the first request is issued
777        will be included in any subsequent continued requests. This is sometimes
778        referred to as a consistent snapshot, and ensures that a client that is
779        using limit to receive smaller chunks of a very large result can ensure
780        they see all possible objects. If objects are updated during a chunked
781        list the version of the object that was present at the time the first
782        list result was calculated is returned.
783        :param str resource_version: When specified with a watch call, shows
784        changes that occur after that particular version of a resource. Defaults
785        to changes from the beginning of history. When specified for list: - if
786        unset, then the result is returned from remote storage based on
787        quorum-read flag; - if it's 0, then we simply return what we currently
788        have in cache, no guarantee; - if set to non zero, then the result is at
789        least as fresh as given rv.
790        :param int timeout_seconds: Timeout for the list/watch call. This limits
791        the duration of the call, regardless of any activity or inactivity.
792        :param bool watch: Watch for changes to the described resources and
793        return them as a stream of add, update, and remove notifications.
794        Specify resourceVersion.
795        :return: V1Status
796                 If the method is called asynchronously,
797                 returns the request thread.
798        """
799    kwargs['_return_http_data_only'] = True
800    if kwargs.get('async_req'):
801      return self.delete_collection_namespaced_controller_revision_with_http_info(
802          namespace, **kwargs)
803    else:
804      (data
805      ) = self.delete_collection_namespaced_controller_revision_with_http_info(
806          namespace, **kwargs)
807      return data
808
809  def delete_collection_namespaced_controller_revision_with_http_info(
810      self, namespace, **kwargs):
811    """
812        delete collection of ControllerRevision
813        This method makes a synchronous HTTP request by default. To make an
814        asynchronous HTTP request, please pass async_req=True
815        >>> thread =
816        api.delete_collection_namespaced_controller_revision_with_http_info(namespace,
817        async_req=True)
818        >>> result = thread.get()
819
820        :param async_req bool
821        :param str namespace: object name and auth scope, such as for teams and
822        projects (required)
823        :param str pretty: If 'true', then the output is pretty printed.
824        :param str _continue: The continue option should be set when retrieving
825        more results from the server. Since this value is server defined,
826        clients may only use the continue value from a previous query result
827        with identical query parameters (except for the value of continue) and
828        the server may reject a continue value it does not recognize. If the
829        specified continue value is no longer valid whether due to expiration
830        (generally five to fifteen minutes) or a configuration change on the
831        server, the server will respond with a 410 ResourceExpired error
832        together with a continue token. If the client needs a consistent list,
833        it must restart their list without the continue field. Otherwise, the
834        client may send another list request with the token received with the
835        410 error, the server will respond with a list starting from the next
836        key, but from the latest snapshot, which is inconsistent from the
837        previous list results - objects that are created, modified, or deleted
838        after the first list request will be included in the response, as long
839        as their keys are after the \"next key\".  This field is not supported
840        when watch is true. Clients may start a watch from the last
841        resourceVersion value returned by the server and not miss any
842        modifications.
843        :param str field_selector: A selector to restrict the list of returned
844        objects by their fields. Defaults to everything.
845        :param str label_selector: A selector to restrict the list of returned
846        objects by their labels. Defaults to everything.
847        :param int limit: limit is a maximum number of responses to return for a
848        list call. If more items exist, the server will set the `continue` field
849        on the list metadata to a value that can be used with the same initial
850        query to retrieve the next set of results. Setting a limit may return
851        fewer than the requested amount of items (up to zero items) in the event
852        all requested objects are filtered out and clients should only use the
853        presence of the continue field to determine whether more results are
854        available. Servers may choose not to support the limit argument and will
855        return all of the available results. If limit is specified and the
856        continue field is empty, clients may assume that no more results are
857        available. This field is not supported if watch is true.  The server
858        guarantees that the objects returned when using continue will be
859        identical to issuing a single list call without a limit - that is, no
860        objects created, modified, or deleted after the first request is issued
861        will be included in any subsequent continued requests. This is sometimes
862        referred to as a consistent snapshot, and ensures that a client that is
863        using limit to receive smaller chunks of a very large result can ensure
864        they see all possible objects. If objects are updated during a chunked
865        list the version of the object that was present at the time the first
866        list result was calculated is returned.
867        :param str resource_version: When specified with a watch call, shows
868        changes that occur after that particular version of a resource. Defaults
869        to changes from the beginning of history. When specified for list: - if
870        unset, then the result is returned from remote storage based on
871        quorum-read flag; - if it's 0, then we simply return what we currently
872        have in cache, no guarantee; - if set to non zero, then the result is at
873        least as fresh as given rv.
874        :param int timeout_seconds: Timeout for the list/watch call. This limits
875        the duration of the call, regardless of any activity or inactivity.
876        :param bool watch: Watch for changes to the described resources and
877        return them as a stream of add, update, and remove notifications.
878        Specify resourceVersion.
879        :return: V1Status
880                 If the method is called asynchronously,
881                 returns the request thread.
882        """
883
884    all_params = [
885        'namespace', 'pretty', '_continue', 'field_selector', 'label_selector',
886        'limit', 'resource_version', 'timeout_seconds', 'watch'
887    ]
888    all_params.append('async_req')
889    all_params.append('_return_http_data_only')
890    all_params.append('_preload_content')
891    all_params.append('_request_timeout')
892
893    params = locals()
894    for key, val in iteritems(params['kwargs']):
895      if key not in all_params:
896        raise TypeError(
897            "Got an unexpected keyword argument '%s'"
898            ' to method delete_collection_namespaced_controller_revision' % key)
899      params[key] = val
900    del params['kwargs']
901    # verify the required parameter 'namespace' is set
902    if ('namespace' not in params) or (params['namespace'] is None):
903      raise ValueError(
904          'Missing the required parameter `namespace` when calling `delete_collection_namespaced_controller_revision`'
905      )
906
907    collection_formats = {}
908
909    path_params = {}
910    if 'namespace' in params:
911      path_params['namespace'] = params['namespace']
912
913    query_params = []
914    if 'pretty' in params:
915      query_params.append(('pretty', params['pretty']))
916    if '_continue' in params:
917      query_params.append(('continue', params['_continue']))
918    if 'field_selector' in params:
919      query_params.append(('fieldSelector', params['field_selector']))
920    if 'label_selector' in params:
921      query_params.append(('labelSelector', params['label_selector']))
922    if 'limit' in params:
923      query_params.append(('limit', params['limit']))
924    if 'resource_version' in params:
925      query_params.append(('resourceVersion', params['resource_version']))
926    if 'timeout_seconds' in params:
927      query_params.append(('timeoutSeconds', params['timeout_seconds']))
928    if 'watch' in params:
929      query_params.append(('watch', params['watch']))
930
931    header_params = {}
932
933    form_params = []
934    local_var_files = {}
935
936    body_params = None
937    # HTTP header `Accept`
938    header_params['Accept'] = self.api_client.\
939        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
940
941    # HTTP header `Content-Type`
942    header_params['Content-Type'] = self.api_client.\
943        select_header_content_type(['*/*'])
944
945    # Authentication setting
946    auth_settings = ['BearerToken']
947
948    return self.api_client.call_api(
949        '/apis/apps/v1beta2/namespaces/{namespace}/controllerrevisions',
950        'DELETE',
951        path_params,
952        query_params,
953        header_params,
954        body=body_params,
955        post_params=form_params,
956        files=local_var_files,
957        response_type='V1Status',
958        auth_settings=auth_settings,
959        async_req=params.get('async_req'),
960        _return_http_data_only=params.get('_return_http_data_only'),
961        _preload_content=params.get('_preload_content', True),
962        _request_timeout=params.get('_request_timeout'),
963        collection_formats=collection_formats)
964
965  def delete_collection_namespaced_daemon_set(self, namespace, **kwargs):
966    """
967        delete collection of DaemonSet
968        This method makes a synchronous HTTP request by default. To make an
969        asynchronous HTTP request, please pass async_req=True
970        >>> thread = api.delete_collection_namespaced_daemon_set(namespace,
971        async_req=True)
972        >>> result = thread.get()
973
974        :param async_req bool
975        :param str namespace: object name and auth scope, such as for teams and
976        projects (required)
977        :param str pretty: If 'true', then the output is pretty printed.
978        :param str _continue: The continue option should be set when retrieving
979        more results from the server. Since this value is server defined,
980        clients may only use the continue value from a previous query result
981        with identical query parameters (except for the value of continue) and
982        the server may reject a continue value it does not recognize. If the
983        specified continue value is no longer valid whether due to expiration
984        (generally five to fifteen minutes) or a configuration change on the
985        server, the server will respond with a 410 ResourceExpired error
986        together with a continue token. If the client needs a consistent list,
987        it must restart their list without the continue field. Otherwise, the
988        client may send another list request with the token received with the
989        410 error, the server will respond with a list starting from the next
990        key, but from the latest snapshot, which is inconsistent from the
991        previous list results - objects that are created, modified, or deleted
992        after the first list request will be included in the response, as long
993        as their keys are after the \"next key\".  This field is not supported
994        when watch is true. Clients may start a watch from the last
995        resourceVersion value returned by the server and not miss any
996        modifications.
997        :param str field_selector: A selector to restrict the list of returned
998        objects by their fields. Defaults to everything.
999        :param str label_selector: A selector to restrict the list of returned
1000        objects by their labels. Defaults to everything.
1001        :param int limit: limit is a maximum number of responses to return for a
1002        list call. If more items exist, the server will set the `continue` field
1003        on the list metadata to a value that can be used with the same initial
1004        query to retrieve the next set of results. Setting a limit may return
1005        fewer than the requested amount of items (up to zero items) in the event
1006        all requested objects are filtered out and clients should only use the
1007        presence of the continue field to determine whether more results are
1008        available. Servers may choose not to support the limit argument and will
1009        return all of the available results. If limit is specified and the
1010        continue field is empty, clients may assume that no more results are
1011        available. This field is not supported if watch is true.  The server
1012        guarantees that the objects returned when using continue will be
1013        identical to issuing a single list call without a limit - that is, no
1014        objects created, modified, or deleted after the first request is issued
1015        will be included in any subsequent continued requests. This is sometimes
1016        referred to as a consistent snapshot, and ensures that a client that is
1017        using limit to receive smaller chunks of a very large result can ensure
1018        they see all possible objects. If objects are updated during a chunked
1019        list the version of the object that was present at the time the first
1020        list result was calculated is returned.
1021        :param str resource_version: When specified with a watch call, shows
1022        changes that occur after that particular version of a resource. Defaults
1023        to changes from the beginning of history. When specified for list: - if
1024        unset, then the result is returned from remote storage based on
1025        quorum-read flag; - if it's 0, then we simply return what we currently
1026        have in cache, no guarantee; - if set to non zero, then the result is at
1027        least as fresh as given rv.
1028        :param int timeout_seconds: Timeout for the list/watch call. This limits
1029        the duration of the call, regardless of any activity or inactivity.
1030        :param bool watch: Watch for changes to the described resources and
1031        return them as a stream of add, update, and remove notifications.
1032        Specify resourceVersion.
1033        :return: V1Status
1034                 If the method is called asynchronously,
1035                 returns the request thread.
1036        """
1037    kwargs['_return_http_data_only'] = True
1038    if kwargs.get('async_req'):
1039      return self.delete_collection_namespaced_daemon_set_with_http_info(
1040          namespace, **kwargs)
1041    else:
1042      (data) = self.delete_collection_namespaced_daemon_set_with_http_info(
1043          namespace, **kwargs)
1044      return data
1045
1046  def delete_collection_namespaced_daemon_set_with_http_info(
1047      self, namespace, **kwargs):
1048    """
1049        delete collection of DaemonSet
1050        This method makes a synchronous HTTP request by default. To make an
1051        asynchronous HTTP request, please pass async_req=True
1052        >>> thread =
1053        api.delete_collection_namespaced_daemon_set_with_http_info(namespace,
1054        async_req=True)
1055        >>> result = thread.get()
1056
1057        :param async_req bool
1058        :param str namespace: object name and auth scope, such as for teams and
1059        projects (required)
1060        :param str pretty: If 'true', then the output is pretty printed.
1061        :param str _continue: The continue option should be set when retrieving
1062        more results from the server. Since this value is server defined,
1063        clients may only use the continue value from a previous query result
1064        with identical query parameters (except for the value of continue) and
1065        the server may reject a continue value it does not recognize. If the
1066        specified continue value is no longer valid whether due to expiration
1067        (generally five to fifteen minutes) or a configuration change on the
1068        server, the server will respond with a 410 ResourceExpired error
1069        together with a continue token. If the client needs a consistent list,
1070        it must restart their list without the continue field. Otherwise, the
1071        client may send another list request with the token received with the
1072        410 error, the server will respond with a list starting from the next
1073        key, but from the latest snapshot, which is inconsistent from the
1074        previous list results - objects that are created, modified, or deleted
1075        after the first list request will be included in the response, as long
1076        as their keys are after the \"next key\".  This field is not supported
1077        when watch is true. Clients may start a watch from the last
1078        resourceVersion value returned by the server and not miss any
1079        modifications.
1080        :param str field_selector: A selector to restrict the list of returned
1081        objects by their fields. Defaults to everything.
1082        :param str label_selector: A selector to restrict the list of returned
1083        objects by their labels. Defaults to everything.
1084        :param int limit: limit is a maximum number of responses to return for a
1085        list call. If more items exist, the server will set the `continue` field
1086        on the list metadata to a value that can be used with the same initial
1087        query to retrieve the next set of results. Setting a limit may return
1088        fewer than the requested amount of items (up to zero items) in the event
1089        all requested objects are filtered out and clients should only use the
1090        presence of the continue field to determine whether more results are
1091        available. Servers may choose not to support the limit argument and will
1092        return all of the available results. If limit is specified and the
1093        continue field is empty, clients may assume that no more results are
1094        available. This field is not supported if watch is true.  The server
1095        guarantees that the objects returned when using continue will be
1096        identical to issuing a single list call without a limit - that is, no
1097        objects created, modified, or deleted after the first request is issued
1098        will be included in any subsequent continued requests. This is sometimes
1099        referred to as a consistent snapshot, and ensures that a client that is
1100        using limit to receive smaller chunks of a very large result can ensure
1101        they see all possible objects. If objects are updated during a chunked
1102        list the version of the object that was present at the time the first
1103        list result was calculated is returned.
1104        :param str resource_version: When specified with a watch call, shows
1105        changes that occur after that particular version of a resource. Defaults
1106        to changes from the beginning of history. When specified for list: - if
1107        unset, then the result is returned from remote storage based on
1108        quorum-read flag; - if it's 0, then we simply return what we currently
1109        have in cache, no guarantee; - if set to non zero, then the result is at
1110        least as fresh as given rv.
1111        :param int timeout_seconds: Timeout for the list/watch call. This limits
1112        the duration of the call, regardless of any activity or inactivity.
1113        :param bool watch: Watch for changes to the described resources and
1114        return them as a stream of add, update, and remove notifications.
1115        Specify resourceVersion.
1116        :return: V1Status
1117                 If the method is called asynchronously,
1118                 returns the request thread.
1119        """
1120
1121    all_params = [
1122        'namespace', 'pretty', '_continue', 'field_selector', 'label_selector',
1123        'limit', 'resource_version', 'timeout_seconds', 'watch'
1124    ]
1125    all_params.append('async_req')
1126    all_params.append('_return_http_data_only')
1127    all_params.append('_preload_content')
1128    all_params.append('_request_timeout')
1129
1130    params = locals()
1131    for key, val in iteritems(params['kwargs']):
1132      if key not in all_params:
1133        raise TypeError("Got an unexpected keyword argument '%s'"
1134                        ' to method delete_collection_namespaced_daemon_set' %
1135                        key)
1136      params[key] = val
1137    del params['kwargs']
1138    # verify the required parameter 'namespace' is set
1139    if ('namespace' not in params) or (params['namespace'] is None):
1140      raise ValueError(
1141          'Missing the required parameter `namespace` when calling `delete_collection_namespaced_daemon_set`'
1142      )
1143
1144    collection_formats = {}
1145
1146    path_params = {}
1147    if 'namespace' in params:
1148      path_params['namespace'] = params['namespace']
1149
1150    query_params = []
1151    if 'pretty' in params:
1152      query_params.append(('pretty', params['pretty']))
1153    if '_continue' in params:
1154      query_params.append(('continue', params['_continue']))
1155    if 'field_selector' in params:
1156      query_params.append(('fieldSelector', params['field_selector']))
1157    if 'label_selector' in params:
1158      query_params.append(('labelSelector', params['label_selector']))
1159    if 'limit' in params:
1160      query_params.append(('limit', params['limit']))
1161    if 'resource_version' in params:
1162      query_params.append(('resourceVersion', params['resource_version']))
1163    if 'timeout_seconds' in params:
1164      query_params.append(('timeoutSeconds', params['timeout_seconds']))
1165    if 'watch' in params:
1166      query_params.append(('watch', params['watch']))
1167
1168    header_params = {}
1169
1170    form_params = []
1171    local_var_files = {}
1172
1173    body_params = None
1174    # HTTP header `Accept`
1175    header_params['Accept'] = self.api_client.\
1176        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
1177
1178    # HTTP header `Content-Type`
1179    header_params['Content-Type'] = self.api_client.\
1180        select_header_content_type(['*/*'])
1181
1182    # Authentication setting
1183    auth_settings = ['BearerToken']
1184
1185    return self.api_client.call_api(
1186        '/apis/apps/v1beta2/namespaces/{namespace}/daemonsets',
1187        'DELETE',
1188        path_params,
1189        query_params,
1190        header_params,
1191        body=body_params,
1192        post_params=form_params,
1193        files=local_var_files,
1194        response_type='V1Status',
1195        auth_settings=auth_settings,
1196        async_req=params.get('async_req'),
1197        _return_http_data_only=params.get('_return_http_data_only'),
1198        _preload_content=params.get('_preload_content', True),
1199        _request_timeout=params.get('_request_timeout'),
1200        collection_formats=collection_formats)
1201
1202  def delete_collection_namespaced_deployment(self, namespace, **kwargs):
1203    """
1204        delete collection of Deployment
1205        This method makes a synchronous HTTP request by default. To make an
1206        asynchronous HTTP request, please pass async_req=True
1207        >>> thread = api.delete_collection_namespaced_deployment(namespace,
1208        async_req=True)
1209        >>> result = thread.get()
1210
1211        :param async_req bool
1212        :param str namespace: object name and auth scope, such as for teams and
1213        projects (required)
1214        :param str pretty: If 'true', then the output is pretty printed.
1215        :param str _continue: The continue option should be set when retrieving
1216        more results from the server. Since this value is server defined,
1217        clients may only use the continue value from a previous query result
1218        with identical query parameters (except for the value of continue) and
1219        the server may reject a continue value it does not recognize. If the
1220        specified continue value is no longer valid whether due to expiration
1221        (generally five to fifteen minutes) or a configuration change on the
1222        server, the server will respond with a 410 ResourceExpired error
1223        together with a continue token. If the client needs a consistent list,
1224        it must restart their list without the continue field. Otherwise, the
1225        client may send another list request with the token received with the
1226        410 error, the server will respond with a list starting from the next
1227        key, but from the latest snapshot, which is inconsistent from the
1228        previous list results - objects that are created, modified, or deleted
1229        after the first list request will be included in the response, as long
1230        as their keys are after the \"next key\".  This field is not supported
1231        when watch is true. Clients may start a watch from the last
1232        resourceVersion value returned by the server and not miss any
1233        modifications.
1234        :param str field_selector: A selector to restrict the list of returned
1235        objects by their fields. Defaults to everything.
1236        :param str label_selector: A selector to restrict the list of returned
1237        objects by their labels. Defaults to everything.
1238        :param int limit: limit is a maximum number of responses to return for a
1239        list call. If more items exist, the server will set the `continue` field
1240        on the list metadata to a value that can be used with the same initial
1241        query to retrieve the next set of results. Setting a limit may return
1242        fewer than the requested amount of items (up to zero items) in the event
1243        all requested objects are filtered out and clients should only use the
1244        presence of the continue field to determine whether more results are
1245        available. Servers may choose not to support the limit argument and will
1246        return all of the available results. If limit is specified and the
1247        continue field is empty, clients may assume that no more results are
1248        available. This field is not supported if watch is true.  The server
1249        guarantees that the objects returned when using continue will be
1250        identical to issuing a single list call without a limit - that is, no
1251        objects created, modified, or deleted after the first request is issued
1252        will be included in any subsequent continued requests. This is sometimes
1253        referred to as a consistent snapshot, and ensures that a client that is
1254        using limit to receive smaller chunks of a very large result can ensure
1255        they see all possible objects. If objects are updated during a chunked
1256        list the version of the object that was present at the time the first
1257        list result was calculated is returned.
1258        :param str resource_version: When specified with a watch call, shows
1259        changes that occur after that particular version of a resource. Defaults
1260        to changes from the beginning of history. When specified for list: - if
1261        unset, then the result is returned from remote storage based on
1262        quorum-read flag; - if it's 0, then we simply return what we currently
1263        have in cache, no guarantee; - if set to non zero, then the result is at
1264        least as fresh as given rv.
1265        :param int timeout_seconds: Timeout for the list/watch call. This limits
1266        the duration of the call, regardless of any activity or inactivity.
1267        :param bool watch: Watch for changes to the described resources and
1268        return them as a stream of add, update, and remove notifications.
1269        Specify resourceVersion.
1270        :return: V1Status
1271                 If the method is called asynchronously,
1272                 returns the request thread.
1273        """
1274    kwargs['_return_http_data_only'] = True
1275    if kwargs.get('async_req'):
1276      return self.delete_collection_namespaced_deployment_with_http_info(
1277          namespace, **kwargs)
1278    else:
1279      (data) = self.delete_collection_namespaced_deployment_with_http_info(
1280          namespace, **kwargs)
1281      return data
1282
1283  def delete_collection_namespaced_deployment_with_http_info(
1284      self, namespace, **kwargs):
1285    """
1286        delete collection of Deployment
1287        This method makes a synchronous HTTP request by default. To make an
1288        asynchronous HTTP request, please pass async_req=True
1289        >>> thread =
1290        api.delete_collection_namespaced_deployment_with_http_info(namespace,
1291        async_req=True)
1292        >>> result = thread.get()
1293
1294        :param async_req bool
1295        :param str namespace: object name and auth scope, such as for teams and
1296        projects (required)
1297        :param str pretty: If 'true', then the output is pretty printed.
1298        :param str _continue: The continue option should be set when retrieving
1299        more results from the server. Since this value is server defined,
1300        clients may only use the continue value from a previous query result
1301        with identical query parameters (except for the value of continue) and
1302        the server may reject a continue value it does not recognize. If the
1303        specified continue value is no longer valid whether due to expiration
1304        (generally five to fifteen minutes) or a configuration change on the
1305        server, the server will respond with a 410 ResourceExpired error
1306        together with a continue token. If the client needs a consistent list,
1307        it must restart their list without the continue field. Otherwise, the
1308        client may send another list request with the token received with the
1309        410 error, the server will respond with a list starting from the next
1310        key, but from the latest snapshot, which is inconsistent from the
1311        previous list results - objects that are created, modified, or deleted
1312        after the first list request will be included in the response, as long
1313        as their keys are after the \"next key\".  This field is not supported
1314        when watch is true. Clients may start a watch from the last
1315        resourceVersion value returned by the server and not miss any
1316        modifications.
1317        :param str field_selector: A selector to restrict the list of returned
1318        objects by their fields. Defaults to everything.
1319        :param str label_selector: A selector to restrict the list of returned
1320        objects by their labels. Defaults to everything.
1321        :param int limit: limit is a maximum number of responses to return for a
1322        list call. If more items exist, the server will set the `continue` field
1323        on the list metadata to a value that can be used with the same initial
1324        query to retrieve the next set of results. Setting a limit may return
1325        fewer than the requested amount of items (up to zero items) in the event
1326        all requested objects are filtered out and clients should only use the
1327        presence of the continue field to determine whether more results are
1328        available. Servers may choose not to support the limit argument and will
1329        return all of the available results. If limit is specified and the
1330        continue field is empty, clients may assume that no more results are
1331        available. This field is not supported if watch is true.  The server
1332        guarantees that the objects returned when using continue will be
1333        identical to issuing a single list call without a limit - that is, no
1334        objects created, modified, or deleted after the first request is issued
1335        will be included in any subsequent continued requests. This is sometimes
1336        referred to as a consistent snapshot, and ensures that a client that is
1337        using limit to receive smaller chunks of a very large result can ensure
1338        they see all possible objects. If objects are updated during a chunked
1339        list the version of the object that was present at the time the first
1340        list result was calculated is returned.
1341        :param str resource_version: When specified with a watch call, shows
1342        changes that occur after that particular version of a resource. Defaults
1343        to changes from the beginning of history. When specified for list: - if
1344        unset, then the result is returned from remote storage based on
1345        quorum-read flag; - if it's 0, then we simply return what we currently
1346        have in cache, no guarantee; - if set to non zero, then the result is at
1347        least as fresh as given rv.
1348        :param int timeout_seconds: Timeout for the list/watch call. This limits
1349        the duration of the call, regardless of any activity or inactivity.
1350        :param bool watch: Watch for changes to the described resources and
1351        return them as a stream of add, update, and remove notifications.
1352        Specify resourceVersion.
1353        :return: V1Status
1354                 If the method is called asynchronously,
1355                 returns the request thread.
1356        """
1357
1358    all_params = [
1359        'namespace', 'pretty', '_continue', 'field_selector', 'label_selector',
1360        'limit', 'resource_version', 'timeout_seconds', 'watch'
1361    ]
1362    all_params.append('async_req')
1363    all_params.append('_return_http_data_only')
1364    all_params.append('_preload_content')
1365    all_params.append('_request_timeout')
1366
1367    params = locals()
1368    for key, val in iteritems(params['kwargs']):
1369      if key not in all_params:
1370        raise TypeError("Got an unexpected keyword argument '%s'"
1371                        ' to method delete_collection_namespaced_deployment' %
1372                        key)
1373      params[key] = val
1374    del params['kwargs']
1375    # verify the required parameter 'namespace' is set
1376    if ('namespace' not in params) or (params['namespace'] is None):
1377      raise ValueError(
1378          'Missing the required parameter `namespace` when calling `delete_collection_namespaced_deployment`'
1379      )
1380
1381    collection_formats = {}
1382
1383    path_params = {}
1384    if 'namespace' in params:
1385      path_params['namespace'] = params['namespace']
1386
1387    query_params = []
1388    if 'pretty' in params:
1389      query_params.append(('pretty', params['pretty']))
1390    if '_continue' in params:
1391      query_params.append(('continue', params['_continue']))
1392    if 'field_selector' in params:
1393      query_params.append(('fieldSelector', params['field_selector']))
1394    if 'label_selector' in params:
1395      query_params.append(('labelSelector', params['label_selector']))
1396    if 'limit' in params:
1397      query_params.append(('limit', params['limit']))
1398    if 'resource_version' in params:
1399      query_params.append(('resourceVersion', params['resource_version']))
1400    if 'timeout_seconds' in params:
1401      query_params.append(('timeoutSeconds', params['timeout_seconds']))
1402    if 'watch' in params:
1403      query_params.append(('watch', params['watch']))
1404
1405    header_params = {}
1406
1407    form_params = []
1408    local_var_files = {}
1409
1410    body_params = None
1411    # HTTP header `Accept`
1412    header_params['Accept'] = self.api_client.\
1413        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
1414
1415    # HTTP header `Content-Type`
1416    header_params['Content-Type'] = self.api_client.\
1417        select_header_content_type(['*/*'])
1418
1419    # Authentication setting
1420    auth_settings = ['BearerToken']
1421
1422    return self.api_client.call_api(
1423        '/apis/apps/v1beta2/namespaces/{namespace}/deployments',
1424        'DELETE',
1425        path_params,
1426        query_params,
1427        header_params,
1428        body=body_params,
1429        post_params=form_params,
1430        files=local_var_files,
1431        response_type='V1Status',
1432        auth_settings=auth_settings,
1433        async_req=params.get('async_req'),
1434        _return_http_data_only=params.get('_return_http_data_only'),
1435        _preload_content=params.get('_preload_content', True),
1436        _request_timeout=params.get('_request_timeout'),
1437        collection_formats=collection_formats)
1438
1439  def delete_collection_namespaced_replica_set(self, namespace, **kwargs):
1440    """
1441        delete collection of ReplicaSet
1442        This method makes a synchronous HTTP request by default. To make an
1443        asynchronous HTTP request, please pass async_req=True
1444        >>> thread = api.delete_collection_namespaced_replica_set(namespace,
1445        async_req=True)
1446        >>> result = thread.get()
1447
1448        :param async_req bool
1449        :param str namespace: object name and auth scope, such as for teams and
1450        projects (required)
1451        :param str pretty: If 'true', then the output is pretty printed.
1452        :param str _continue: The continue option should be set when retrieving
1453        more results from the server. Since this value is server defined,
1454        clients may only use the continue value from a previous query result
1455        with identical query parameters (except for the value of continue) and
1456        the server may reject a continue value it does not recognize. If the
1457        specified continue value is no longer valid whether due to expiration
1458        (generally five to fifteen minutes) or a configuration change on the
1459        server, the server will respond with a 410 ResourceExpired error
1460        together with a continue token. If the client needs a consistent list,
1461        it must restart their list without the continue field. Otherwise, the
1462        client may send another list request with the token received with the
1463        410 error, the server will respond with a list starting from the next
1464        key, but from the latest snapshot, which is inconsistent from the
1465        previous list results - objects that are created, modified, or deleted
1466        after the first list request will be included in the response, as long
1467        as their keys are after the \"next key\".  This field is not supported
1468        when watch is true. Clients may start a watch from the last
1469        resourceVersion value returned by the server and not miss any
1470        modifications.
1471        :param str field_selector: A selector to restrict the list of returned
1472        objects by their fields. Defaults to everything.
1473        :param str label_selector: A selector to restrict the list of returned
1474        objects by their labels. Defaults to everything.
1475        :param int limit: limit is a maximum number of responses to return for a
1476        list call. If more items exist, the server will set the `continue` field
1477        on the list metadata to a value that can be used with the same initial
1478        query to retrieve the next set of results. Setting a limit may return
1479        fewer than the requested amount of items (up to zero items) in the event
1480        all requested objects are filtered out and clients should only use the
1481        presence of the continue field to determine whether more results are
1482        available. Servers may choose not to support the limit argument and will
1483        return all of the available results. If limit is specified and the
1484        continue field is empty, clients may assume that no more results are
1485        available. This field is not supported if watch is true.  The server
1486        guarantees that the objects returned when using continue will be
1487        identical to issuing a single list call without a limit - that is, no
1488        objects created, modified, or deleted after the first request is issued
1489        will be included in any subsequent continued requests. This is sometimes
1490        referred to as a consistent snapshot, and ensures that a client that is
1491        using limit to receive smaller chunks of a very large result can ensure
1492        they see all possible objects. If objects are updated during a chunked
1493        list the version of the object that was present at the time the first
1494        list result was calculated is returned.
1495        :param str resource_version: When specified with a watch call, shows
1496        changes that occur after that particular version of a resource. Defaults
1497        to changes from the beginning of history. When specified for list: - if
1498        unset, then the result is returned from remote storage based on
1499        quorum-read flag; - if it's 0, then we simply return what we currently
1500        have in cache, no guarantee; - if set to non zero, then the result is at
1501        least as fresh as given rv.
1502        :param int timeout_seconds: Timeout for the list/watch call. This limits
1503        the duration of the call, regardless of any activity or inactivity.
1504        :param bool watch: Watch for changes to the described resources and
1505        return them as a stream of add, update, and remove notifications.
1506        Specify resourceVersion.
1507        :return: V1Status
1508                 If the method is called asynchronously,
1509                 returns the request thread.
1510        """
1511    kwargs['_return_http_data_only'] = True
1512    if kwargs.get('async_req'):
1513      return self.delete_collection_namespaced_replica_set_with_http_info(
1514          namespace, **kwargs)
1515    else:
1516      (data) = self.delete_collection_namespaced_replica_set_with_http_info(
1517          namespace, **kwargs)
1518      return data
1519
1520  def delete_collection_namespaced_replica_set_with_http_info(
1521      self, namespace, **kwargs):
1522    """
1523        delete collection of ReplicaSet
1524        This method makes a synchronous HTTP request by default. To make an
1525        asynchronous HTTP request, please pass async_req=True
1526        >>> thread =
1527        api.delete_collection_namespaced_replica_set_with_http_info(namespace,
1528        async_req=True)
1529        >>> result = thread.get()
1530
1531        :param async_req bool
1532        :param str namespace: object name and auth scope, such as for teams and
1533        projects (required)
1534        :param str pretty: If 'true', then the output is pretty printed.
1535        :param str _continue: The continue option should be set when retrieving
1536        more results from the server. Since this value is server defined,
1537        clients may only use the continue value from a previous query result
1538        with identical query parameters (except for the value of continue) and
1539        the server may reject a continue value it does not recognize. If the
1540        specified continue value is no longer valid whether due to expiration
1541        (generally five to fifteen minutes) or a configuration change on the
1542        server, the server will respond with a 410 ResourceExpired error
1543        together with a continue token. If the client needs a consistent list,
1544        it must restart their list without the continue field. Otherwise, the
1545        client may send another list request with the token received with the
1546        410 error, the server will respond with a list starting from the next
1547        key, but from the latest snapshot, which is inconsistent from the
1548        previous list results - objects that are created, modified, or deleted
1549        after the first list request will be included in the response, as long
1550        as their keys are after the \"next key\".  This field is not supported
1551        when watch is true. Clients may start a watch from the last
1552        resourceVersion value returned by the server and not miss any
1553        modifications.
1554        :param str field_selector: A selector to restrict the list of returned
1555        objects by their fields. Defaults to everything.
1556        :param str label_selector: A selector to restrict the list of returned
1557        objects by their labels. Defaults to everything.
1558        :param int limit: limit is a maximum number of responses to return for a
1559        list call. If more items exist, the server will set the `continue` field
1560        on the list metadata to a value that can be used with the same initial
1561        query to retrieve the next set of results. Setting a limit may return
1562        fewer than the requested amount of items (up to zero items) in the event
1563        all requested objects are filtered out and clients should only use the
1564        presence of the continue field to determine whether more results are
1565        available. Servers may choose not to support the limit argument and will
1566        return all of the available results. If limit is specified and the
1567        continue field is empty, clients may assume that no more results are
1568        available. This field is not supported if watch is true.  The server
1569        guarantees that the objects returned when using continue will be
1570        identical to issuing a single list call without a limit - that is, no
1571        objects created, modified, or deleted after the first request is issued
1572        will be included in any subsequent continued requests. This is sometimes
1573        referred to as a consistent snapshot, and ensures that a client that is
1574        using limit to receive smaller chunks of a very large result can ensure
1575        they see all possible objects. If objects are updated during a chunked
1576        list the version of the object that was present at the time the first
1577        list result was calculated is returned.
1578        :param str resource_version: When specified with a watch call, shows
1579        changes that occur after that particular version of a resource. Defaults
1580        to changes from the beginning of history. When specified for list: - if
1581        unset, then the result is returned from remote storage based on
1582        quorum-read flag; - if it's 0, then we simply return what we currently
1583        have in cache, no guarantee; - if set to non zero, then the result is at
1584        least as fresh as given rv.
1585        :param int timeout_seconds: Timeout for the list/watch call. This limits
1586        the duration of the call, regardless of any activity or inactivity.
1587        :param bool watch: Watch for changes to the described resources and
1588        return them as a stream of add, update, and remove notifications.
1589        Specify resourceVersion.
1590        :return: V1Status
1591                 If the method is called asynchronously,
1592                 returns the request thread.
1593        """
1594
1595    all_params = [
1596        'namespace', 'pretty', '_continue', 'field_selector', 'label_selector',
1597        'limit', 'resource_version', 'timeout_seconds', 'watch'
1598    ]
1599    all_params.append('async_req')
1600    all_params.append('_return_http_data_only')
1601    all_params.append('_preload_content')
1602    all_params.append('_request_timeout')
1603
1604    params = locals()
1605    for key, val in iteritems(params['kwargs']):
1606      if key not in all_params:
1607        raise TypeError("Got an unexpected keyword argument '%s'"
1608                        ' to method delete_collection_namespaced_replica_set' %
1609                        key)
1610      params[key] = val
1611    del params['kwargs']
1612    # verify the required parameter 'namespace' is set
1613    if ('namespace' not in params) or (params['namespace'] is None):
1614      raise ValueError(
1615          'Missing the required parameter `namespace` when calling `delete_collection_namespaced_replica_set`'
1616      )
1617
1618    collection_formats = {}
1619
1620    path_params = {}
1621    if 'namespace' in params:
1622      path_params['namespace'] = params['namespace']
1623
1624    query_params = []
1625    if 'pretty' in params:
1626      query_params.append(('pretty', params['pretty']))
1627    if '_continue' in params:
1628      query_params.append(('continue', params['_continue']))
1629    if 'field_selector' in params:
1630      query_params.append(('fieldSelector', params['field_selector']))
1631    if 'label_selector' in params:
1632      query_params.append(('labelSelector', params['label_selector']))
1633    if 'limit' in params:
1634      query_params.append(('limit', params['limit']))
1635    if 'resource_version' in params:
1636      query_params.append(('resourceVersion', params['resource_version']))
1637    if 'timeout_seconds' in params:
1638      query_params.append(('timeoutSeconds', params['timeout_seconds']))
1639    if 'watch' in params:
1640      query_params.append(('watch', params['watch']))
1641
1642    header_params = {}
1643
1644    form_params = []
1645    local_var_files = {}
1646
1647    body_params = None
1648    # HTTP header `Accept`
1649    header_params['Accept'] = self.api_client.\
1650        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
1651
1652    # HTTP header `Content-Type`
1653    header_params['Content-Type'] = self.api_client.\
1654        select_header_content_type(['*/*'])
1655
1656    # Authentication setting
1657    auth_settings = ['BearerToken']
1658
1659    return self.api_client.call_api(
1660        '/apis/apps/v1beta2/namespaces/{namespace}/replicasets',
1661        'DELETE',
1662        path_params,
1663        query_params,
1664        header_params,
1665        body=body_params,
1666        post_params=form_params,
1667        files=local_var_files,
1668        response_type='V1Status',
1669        auth_settings=auth_settings,
1670        async_req=params.get('async_req'),
1671        _return_http_data_only=params.get('_return_http_data_only'),
1672        _preload_content=params.get('_preload_content', True),
1673        _request_timeout=params.get('_request_timeout'),
1674        collection_formats=collection_formats)
1675
1676  def delete_collection_namespaced_stateful_set(self, namespace, **kwargs):
1677    """
1678        delete collection of StatefulSet
1679        This method makes a synchronous HTTP request by default. To make an
1680        asynchronous HTTP request, please pass async_req=True
1681        >>> thread = api.delete_collection_namespaced_stateful_set(namespace,
1682        async_req=True)
1683        >>> result = thread.get()
1684
1685        :param async_req bool
1686        :param str namespace: object name and auth scope, such as for teams and
1687        projects (required)
1688        :param str pretty: If 'true', then the output is pretty printed.
1689        :param str _continue: The continue option should be set when retrieving
1690        more results from the server. Since this value is server defined,
1691        clients may only use the continue value from a previous query result
1692        with identical query parameters (except for the value of continue) and
1693        the server may reject a continue value it does not recognize. If the
1694        specified continue value is no longer valid whether due to expiration
1695        (generally five to fifteen minutes) or a configuration change on the
1696        server, the server will respond with a 410 ResourceExpired error
1697        together with a continue token. If the client needs a consistent list,
1698        it must restart their list without the continue field. Otherwise, the
1699        client may send another list request with the token received with the
1700        410 error, the server will respond with a list starting from the next
1701        key, but from the latest snapshot, which is inconsistent from the
1702        previous list results - objects that are created, modified, or deleted
1703        after the first list request will be included in the response, as long
1704        as their keys are after the \"next key\".  This field is not supported
1705        when watch is true. Clients may start a watch from the last
1706        resourceVersion value returned by the server and not miss any
1707        modifications.
1708        :param str field_selector: A selector to restrict the list of returned
1709        objects by their fields. Defaults to everything.
1710        :param str label_selector: A selector to restrict the list of returned
1711        objects by their labels. Defaults to everything.
1712        :param int limit: limit is a maximum number of responses to return for a
1713        list call. If more items exist, the server will set the `continue` field
1714        on the list metadata to a value that can be used with the same initial
1715        query to retrieve the next set of results. Setting a limit may return
1716        fewer than the requested amount of items (up to zero items) in the event
1717        all requested objects are filtered out and clients should only use the
1718        presence of the continue field to determine whether more results are
1719        available. Servers may choose not to support the limit argument and will
1720        return all of the available results. If limit is specified and the
1721        continue field is empty, clients may assume that no more results are
1722        available. This field is not supported if watch is true.  The server
1723        guarantees that the objects returned when using continue will be
1724        identical to issuing a single list call without a limit - that is, no
1725        objects created, modified, or deleted after the first request is issued
1726        will be included in any subsequent continued requests. This is sometimes
1727        referred to as a consistent snapshot, and ensures that a client that is
1728        using limit to receive smaller chunks of a very large result can ensure
1729        they see all possible objects. If objects are updated during a chunked
1730        list the version of the object that was present at the time the first
1731        list result was calculated is returned.
1732        :param str resource_version: When specified with a watch call, shows
1733        changes that occur after that particular version of a resource. Defaults
1734        to changes from the beginning of history. When specified for list: - if
1735        unset, then the result is returned from remote storage based on
1736        quorum-read flag; - if it's 0, then we simply return what we currently
1737        have in cache, no guarantee; - if set to non zero, then the result is at
1738        least as fresh as given rv.
1739        :param int timeout_seconds: Timeout for the list/watch call. This limits
1740        the duration of the call, regardless of any activity or inactivity.
1741        :param bool watch: Watch for changes to the described resources and
1742        return them as a stream of add, update, and remove notifications.
1743        Specify resourceVersion.
1744        :return: V1Status
1745                 If the method is called asynchronously,
1746                 returns the request thread.
1747        """
1748    kwargs['_return_http_data_only'] = True
1749    if kwargs.get('async_req'):
1750      return self.delete_collection_namespaced_stateful_set_with_http_info(
1751          namespace, **kwargs)
1752    else:
1753      (data) = self.delete_collection_namespaced_stateful_set_with_http_info(
1754          namespace, **kwargs)
1755      return data
1756
1757  def delete_collection_namespaced_stateful_set_with_http_info(
1758      self, namespace, **kwargs):
1759    """
1760        delete collection of StatefulSet
1761        This method makes a synchronous HTTP request by default. To make an
1762        asynchronous HTTP request, please pass async_req=True
1763        >>> thread =
1764        api.delete_collection_namespaced_stateful_set_with_http_info(namespace,
1765        async_req=True)
1766        >>> result = thread.get()
1767
1768        :param async_req bool
1769        :param str namespace: object name and auth scope, such as for teams and
1770        projects (required)
1771        :param str pretty: If 'true', then the output is pretty printed.
1772        :param str _continue: The continue option should be set when retrieving
1773        more results from the server. Since this value is server defined,
1774        clients may only use the continue value from a previous query result
1775        with identical query parameters (except for the value of continue) and
1776        the server may reject a continue value it does not recognize. If the
1777        specified continue value is no longer valid whether due to expiration
1778        (generally five to fifteen minutes) or a configuration change on the
1779        server, the server will respond with a 410 ResourceExpired error
1780        together with a continue token. If the client needs a consistent list,
1781        it must restart their list without the continue field. Otherwise, the
1782        client may send another list request with the token received with the
1783        410 error, the server will respond with a list starting from the next
1784        key, but from the latest snapshot, which is inconsistent from the
1785        previous list results - objects that are created, modified, or deleted
1786        after the first list request will be included in the response, as long
1787        as their keys are after the \"next key\".  This field is not supported
1788        when watch is true. Clients may start a watch from the last
1789        resourceVersion value returned by the server and not miss any
1790        modifications.
1791        :param str field_selector: A selector to restrict the list of returned
1792        objects by their fields. Defaults to everything.
1793        :param str label_selector: A selector to restrict the list of returned
1794        objects by their labels. Defaults to everything.
1795        :param int limit: limit is a maximum number of responses to return for a
1796        list call. If more items exist, the server will set the `continue` field
1797        on the list metadata to a value that can be used with the same initial
1798        query to retrieve the next set of results. Setting a limit may return
1799        fewer than the requested amount of items (up to zero items) in the event
1800        all requested objects are filtered out and clients should only use the
1801        presence of the continue field to determine whether more results are
1802        available. Servers may choose not to support the limit argument and will
1803        return all of the available results. If limit is specified and the
1804        continue field is empty, clients may assume that no more results are
1805        available. This field is not supported if watch is true.  The server
1806        guarantees that the objects returned when using continue will be
1807        identical to issuing a single list call without a limit - that is, no
1808        objects created, modified, or deleted after the first request is issued
1809        will be included in any subsequent continued requests. This is sometimes
1810        referred to as a consistent snapshot, and ensures that a client that is
1811        using limit to receive smaller chunks of a very large result can ensure
1812        they see all possible objects. If objects are updated during a chunked
1813        list the version of the object that was present at the time the first
1814        list result was calculated is returned.
1815        :param str resource_version: When specified with a watch call, shows
1816        changes that occur after that particular version of a resource. Defaults
1817        to changes from the beginning of history. When specified for list: - if
1818        unset, then the result is returned from remote storage based on
1819        quorum-read flag; - if it's 0, then we simply return what we currently
1820        have in cache, no guarantee; - if set to non zero, then the result is at
1821        least as fresh as given rv.
1822        :param int timeout_seconds: Timeout for the list/watch call. This limits
1823        the duration of the call, regardless of any activity or inactivity.
1824        :param bool watch: Watch for changes to the described resources and
1825        return them as a stream of add, update, and remove notifications.
1826        Specify resourceVersion.
1827        :return: V1Status
1828                 If the method is called asynchronously,
1829                 returns the request thread.
1830        """
1831
1832    all_params = [
1833        'namespace', 'pretty', '_continue', 'field_selector', 'label_selector',
1834        'limit', 'resource_version', 'timeout_seconds', 'watch'
1835    ]
1836    all_params.append('async_req')
1837    all_params.append('_return_http_data_only')
1838    all_params.append('_preload_content')
1839    all_params.append('_request_timeout')
1840
1841    params = locals()
1842    for key, val in iteritems(params['kwargs']):
1843      if key not in all_params:
1844        raise TypeError("Got an unexpected keyword argument '%s'"
1845                        ' to method delete_collection_namespaced_stateful_set' %
1846                        key)
1847      params[key] = val
1848    del params['kwargs']
1849    # verify the required parameter 'namespace' is set
1850    if ('namespace' not in params) or (params['namespace'] is None):
1851      raise ValueError(
1852          'Missing the required parameter `namespace` when calling `delete_collection_namespaced_stateful_set`'
1853      )
1854
1855    collection_formats = {}
1856
1857    path_params = {}
1858    if 'namespace' in params:
1859      path_params['namespace'] = params['namespace']
1860
1861    query_params = []
1862    if 'pretty' in params:
1863      query_params.append(('pretty', params['pretty']))
1864    if '_continue' in params:
1865      query_params.append(('continue', params['_continue']))
1866    if 'field_selector' in params:
1867      query_params.append(('fieldSelector', params['field_selector']))
1868    if 'label_selector' in params:
1869      query_params.append(('labelSelector', params['label_selector']))
1870    if 'limit' in params:
1871      query_params.append(('limit', params['limit']))
1872    if 'resource_version' in params:
1873      query_params.append(('resourceVersion', params['resource_version']))
1874    if 'timeout_seconds' in params:
1875      query_params.append(('timeoutSeconds', params['timeout_seconds']))
1876    if 'watch' in params:
1877      query_params.append(('watch', params['watch']))
1878
1879    header_params = {}
1880
1881    form_params = []
1882    local_var_files = {}
1883
1884    body_params = None
1885    # HTTP header `Accept`
1886    header_params['Accept'] = self.api_client.\
1887        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
1888
1889    # HTTP header `Content-Type`
1890    header_params['Content-Type'] = self.api_client.\
1891        select_header_content_type(['*/*'])
1892
1893    # Authentication setting
1894    auth_settings = ['BearerToken']
1895
1896    return self.api_client.call_api(
1897        '/apis/apps/v1beta2/namespaces/{namespace}/statefulsets',
1898        'DELETE',
1899        path_params,
1900        query_params,
1901        header_params,
1902        body=body_params,
1903        post_params=form_params,
1904        files=local_var_files,
1905        response_type='V1Status',
1906        auth_settings=auth_settings,
1907        async_req=params.get('async_req'),
1908        _return_http_data_only=params.get('_return_http_data_only'),
1909        _preload_content=params.get('_preload_content', True),
1910        _request_timeout=params.get('_request_timeout'),
1911        collection_formats=collection_formats)
1912
1913  def delete_namespaced_controller_revision(self, name, namespace, **kwargs):
1914    """
1915        delete a ControllerRevision
1916        This method makes a synchronous HTTP request by default. To make an
1917        asynchronous HTTP request, please pass async_req=True
1918        >>> thread = api.delete_namespaced_controller_revision(name, namespace,
1919        async_req=True)
1920        >>> result = thread.get()
1921
1922        :param async_req bool
1923        :param str name: name of the ControllerRevision (required)
1924        :param str namespace: object name and auth scope, such as for teams and
1925        projects (required)
1926        :param str pretty: If 'true', then the output is pretty printed.
1927        :param V1DeleteOptions body:
1928        :param str dry_run: When present, indicates that modifications should
1929        not be persisted. An invalid or unrecognized dryRun directive will
1930        result in an error response and no further processing of the request.
1931        Valid values are: - All: all dry run stages will be processed
1932        :param int grace_period_seconds: The duration in seconds before the
1933        object should be deleted. Value must be non-negative integer. The value
1934        zero indicates delete immediately. If this value is nil, the default
1935        grace period for the specified type will be used. Defaults to a per
1936        object value if not specified. zero means delete immediately.
1937        :param bool orphan_dependents: Deprecated: please use the
1938        PropagationPolicy, this field will be deprecated in 1.7. Should the
1939        dependent objects be orphaned. If true/false, the \"orphan\" finalizer
1940        will be added to/removed from the object's finalizers list. Either this
1941        field or PropagationPolicy may be set, but not both.
1942        :param str propagation_policy: Whether and how garbage collection will
1943        be performed. Either this field or OrphanDependents may be set, but not
1944        both. The default policy is decided by the existing finalizer set in the
1945        metadata.finalizers and the resource-specific default policy. Acceptable
1946        values are: 'Orphan' - orphan the dependents; 'Background' - allow the
1947        garbage collector to delete the dependents in the background;
1948        'Foreground' - a cascading policy that deletes all dependents in the
1949        foreground.
1950        :return: V1Status
1951                 If the method is called asynchronously,
1952                 returns the request thread.
1953        """
1954    kwargs['_return_http_data_only'] = True
1955    if kwargs.get('async_req'):
1956      return self.delete_namespaced_controller_revision_with_http_info(
1957          name, namespace, **kwargs)
1958    else:
1959      (data) = self.delete_namespaced_controller_revision_with_http_info(
1960          name, namespace, **kwargs)
1961      return data
1962
1963  def delete_namespaced_controller_revision_with_http_info(
1964      self, name, namespace, **kwargs):
1965    """
1966        delete a ControllerRevision
1967        This method makes a synchronous HTTP request by default. To make an
1968        asynchronous HTTP request, please pass async_req=True
1969        >>> thread =
1970        api.delete_namespaced_controller_revision_with_http_info(name,
1971        namespace, async_req=True)
1972        >>> result = thread.get()
1973
1974        :param async_req bool
1975        :param str name: name of the ControllerRevision (required)
1976        :param str namespace: object name and auth scope, such as for teams and
1977        projects (required)
1978        :param str pretty: If 'true', then the output is pretty printed.
1979        :param V1DeleteOptions body:
1980        :param str dry_run: When present, indicates that modifications should
1981        not be persisted. An invalid or unrecognized dryRun directive will
1982        result in an error response and no further processing of the request.
1983        Valid values are: - All: all dry run stages will be processed
1984        :param int grace_period_seconds: The duration in seconds before the
1985        object should be deleted. Value must be non-negative integer. The value
1986        zero indicates delete immediately. If this value is nil, the default
1987        grace period for the specified type will be used. Defaults to a per
1988        object value if not specified. zero means delete immediately.
1989        :param bool orphan_dependents: Deprecated: please use the
1990        PropagationPolicy, this field will be deprecated in 1.7. Should the
1991        dependent objects be orphaned. If true/false, the \"orphan\" finalizer
1992        will be added to/removed from the object's finalizers list. Either this
1993        field or PropagationPolicy may be set, but not both.
1994        :param str propagation_policy: Whether and how garbage collection will
1995        be performed. Either this field or OrphanDependents may be set, but not
1996        both. The default policy is decided by the existing finalizer set in the
1997        metadata.finalizers and the resource-specific default policy. Acceptable
1998        values are: 'Orphan' - orphan the dependents; 'Background' - allow the
1999        garbage collector to delete the dependents in the background;
2000        'Foreground' - a cascading policy that deletes all dependents in the
2001        foreground.
2002        :return: V1Status
2003                 If the method is called asynchronously,
2004                 returns the request thread.
2005        """
2006
2007    all_params = [
2008        'name', 'namespace', 'pretty', 'body', 'dry_run',
2009        'grace_period_seconds', 'orphan_dependents', 'propagation_policy'
2010    ]
2011    all_params.append('async_req')
2012    all_params.append('_return_http_data_only')
2013    all_params.append('_preload_content')
2014    all_params.append('_request_timeout')
2015
2016    params = locals()
2017    for key, val in iteritems(params['kwargs']):
2018      if key not in all_params:
2019        raise TypeError("Got an unexpected keyword argument '%s'"
2020                        ' to method delete_namespaced_controller_revision' %
2021                        key)
2022      params[key] = val
2023    del params['kwargs']
2024    # verify the required parameter 'name' is set
2025    if ('name' not in params) or (params['name'] is None):
2026      raise ValueError(
2027          'Missing the required parameter `name` when calling `delete_namespaced_controller_revision`'
2028      )
2029    # verify the required parameter 'namespace' is set
2030    if ('namespace' not in params) or (params['namespace'] is None):
2031      raise ValueError(
2032          'Missing the required parameter `namespace` when calling `delete_namespaced_controller_revision`'
2033      )
2034
2035    collection_formats = {}
2036
2037    path_params = {}
2038    if 'name' in params:
2039      path_params['name'] = params['name']
2040    if 'namespace' in params:
2041      path_params['namespace'] = params['namespace']
2042
2043    query_params = []
2044    if 'pretty' in params:
2045      query_params.append(('pretty', params['pretty']))
2046    if 'dry_run' in params:
2047      query_params.append(('dryRun', params['dry_run']))
2048    if 'grace_period_seconds' in params:
2049      query_params.append(
2050          ('gracePeriodSeconds', params['grace_period_seconds']))
2051    if 'orphan_dependents' in params:
2052      query_params.append(('orphanDependents', params['orphan_dependents']))
2053    if 'propagation_policy' in params:
2054      query_params.append(('propagationPolicy', params['propagation_policy']))
2055
2056    header_params = {}
2057
2058    form_params = []
2059    local_var_files = {}
2060
2061    body_params = None
2062    if 'body' in params:
2063      body_params = params['body']
2064    # HTTP header `Accept`
2065    header_params['Accept'] = self.api_client.\
2066        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
2067
2068    # HTTP header `Content-Type`
2069    header_params['Content-Type'] = self.api_client.\
2070        select_header_content_type(['*/*'])
2071
2072    # Authentication setting
2073    auth_settings = ['BearerToken']
2074
2075    return self.api_client.call_api(
2076        '/apis/apps/v1beta2/namespaces/{namespace}/controllerrevisions/{name}',
2077        'DELETE',
2078        path_params,
2079        query_params,
2080        header_params,
2081        body=body_params,
2082        post_params=form_params,
2083        files=local_var_files,
2084        response_type='V1Status',
2085        auth_settings=auth_settings,
2086        async_req=params.get('async_req'),
2087        _return_http_data_only=params.get('_return_http_data_only'),
2088        _preload_content=params.get('_preload_content', True),
2089        _request_timeout=params.get('_request_timeout'),
2090        collection_formats=collection_formats)
2091
2092  def delete_namespaced_daemon_set(self, name, namespace, **kwargs):
2093    """
2094        delete a DaemonSet
2095        This method makes a synchronous HTTP request by default. To make an
2096        asynchronous HTTP request, please pass async_req=True
2097        >>> thread = api.delete_namespaced_daemon_set(name, namespace,
2098        async_req=True)
2099        >>> result = thread.get()
2100
2101        :param async_req bool
2102        :param str name: name of the DaemonSet (required)
2103        :param str namespace: object name and auth scope, such as for teams and
2104        projects (required)
2105        :param str pretty: If 'true', then the output is pretty printed.
2106        :param V1DeleteOptions body:
2107        :param str dry_run: When present, indicates that modifications should
2108        not be persisted. An invalid or unrecognized dryRun directive will
2109        result in an error response and no further processing of the request.
2110        Valid values are: - All: all dry run stages will be processed
2111        :param int grace_period_seconds: The duration in seconds before the
2112        object should be deleted. Value must be non-negative integer. The value
2113        zero indicates delete immediately. If this value is nil, the default
2114        grace period for the specified type will be used. Defaults to a per
2115        object value if not specified. zero means delete immediately.
2116        :param bool orphan_dependents: Deprecated: please use the
2117        PropagationPolicy, this field will be deprecated in 1.7. Should the
2118        dependent objects be orphaned. If true/false, the \"orphan\" finalizer
2119        will be added to/removed from the object's finalizers list. Either this
2120        field or PropagationPolicy may be set, but not both.
2121        :param str propagation_policy: Whether and how garbage collection will
2122        be performed. Either this field or OrphanDependents may be set, but not
2123        both. The default policy is decided by the existing finalizer set in the
2124        metadata.finalizers and the resource-specific default policy. Acceptable
2125        values are: 'Orphan' - orphan the dependents; 'Background' - allow the
2126        garbage collector to delete the dependents in the background;
2127        'Foreground' - a cascading policy that deletes all dependents in the
2128        foreground.
2129        :return: V1Status
2130                 If the method is called asynchronously,
2131                 returns the request thread.
2132        """
2133    kwargs['_return_http_data_only'] = True
2134    if kwargs.get('async_req'):
2135      return self.delete_namespaced_daemon_set_with_http_info(
2136          name, namespace, **kwargs)
2137    else:
2138      (data) = self.delete_namespaced_daemon_set_with_http_info(
2139          name, namespace, **kwargs)
2140      return data
2141
2142  def delete_namespaced_daemon_set_with_http_info(self, name, namespace,
2143                                                  **kwargs):
2144    """
2145        delete a DaemonSet
2146        This method makes a synchronous HTTP request by default. To make an
2147        asynchronous HTTP request, please pass async_req=True
2148        >>> thread = api.delete_namespaced_daemon_set_with_http_info(name,
2149        namespace, async_req=True)
2150        >>> result = thread.get()
2151
2152        :param async_req bool
2153        :param str name: name of the DaemonSet (required)
2154        :param str namespace: object name and auth scope, such as for teams and
2155        projects (required)
2156        :param str pretty: If 'true', then the output is pretty printed.
2157        :param V1DeleteOptions body:
2158        :param str dry_run: When present, indicates that modifications should
2159        not be persisted. An invalid or unrecognized dryRun directive will
2160        result in an error response and no further processing of the request.
2161        Valid values are: - All: all dry run stages will be processed
2162        :param int grace_period_seconds: The duration in seconds before the
2163        object should be deleted. Value must be non-negative integer. The value
2164        zero indicates delete immediately. If this value is nil, the default
2165        grace period for the specified type will be used. Defaults to a per
2166        object value if not specified. zero means delete immediately.
2167        :param bool orphan_dependents: Deprecated: please use the
2168        PropagationPolicy, this field will be deprecated in 1.7. Should the
2169        dependent objects be orphaned. If true/false, the \"orphan\" finalizer
2170        will be added to/removed from the object's finalizers list. Either this
2171        field or PropagationPolicy may be set, but not both.
2172        :param str propagation_policy: Whether and how garbage collection will
2173        be performed. Either this field or OrphanDependents may be set, but not
2174        both. The default policy is decided by the existing finalizer set in the
2175        metadata.finalizers and the resource-specific default policy. Acceptable
2176        values are: 'Orphan' - orphan the dependents; 'Background' - allow the
2177        garbage collector to delete the dependents in the background;
2178        'Foreground' - a cascading policy that deletes all dependents in the
2179        foreground.
2180        :return: V1Status
2181                 If the method is called asynchronously,
2182                 returns the request thread.
2183        """
2184
2185    all_params = [
2186        'name', 'namespace', 'pretty', 'body', 'dry_run',
2187        'grace_period_seconds', 'orphan_dependents', 'propagation_policy'
2188    ]
2189    all_params.append('async_req')
2190    all_params.append('_return_http_data_only')
2191    all_params.append('_preload_content')
2192    all_params.append('_request_timeout')
2193
2194    params = locals()
2195    for key, val in iteritems(params['kwargs']):
2196      if key not in all_params:
2197        raise TypeError("Got an unexpected keyword argument '%s'"
2198                        ' to method delete_namespaced_daemon_set' % key)
2199      params[key] = val
2200    del params['kwargs']
2201    # verify the required parameter 'name' is set
2202    if ('name' not in params) or (params['name'] is None):
2203      raise ValueError(
2204          'Missing the required parameter `name` when calling `delete_namespaced_daemon_set`'
2205      )
2206    # verify the required parameter 'namespace' is set
2207    if ('namespace' not in params) or (params['namespace'] is None):
2208      raise ValueError(
2209          'Missing the required parameter `namespace` when calling `delete_namespaced_daemon_set`'
2210      )
2211
2212    collection_formats = {}
2213
2214    path_params = {}
2215    if 'name' in params:
2216      path_params['name'] = params['name']
2217    if 'namespace' in params:
2218      path_params['namespace'] = params['namespace']
2219
2220    query_params = []
2221    if 'pretty' in params:
2222      query_params.append(('pretty', params['pretty']))
2223    if 'dry_run' in params:
2224      query_params.append(('dryRun', params['dry_run']))
2225    if 'grace_period_seconds' in params:
2226      query_params.append(
2227          ('gracePeriodSeconds', params['grace_period_seconds']))
2228    if 'orphan_dependents' in params:
2229      query_params.append(('orphanDependents', params['orphan_dependents']))
2230    if 'propagation_policy' in params:
2231      query_params.append(('propagationPolicy', params['propagation_policy']))
2232
2233    header_params = {}
2234
2235    form_params = []
2236    local_var_files = {}
2237
2238    body_params = None
2239    if 'body' in params:
2240      body_params = params['body']
2241    # HTTP header `Accept`
2242    header_params['Accept'] = self.api_client.\
2243        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
2244
2245    # HTTP header `Content-Type`
2246    header_params['Content-Type'] = self.api_client.\
2247        select_header_content_type(['*/*'])
2248
2249    # Authentication setting
2250    auth_settings = ['BearerToken']
2251
2252    return self.api_client.call_api(
2253        '/apis/apps/v1beta2/namespaces/{namespace}/daemonsets/{name}',
2254        'DELETE',
2255        path_params,
2256        query_params,
2257        header_params,
2258        body=body_params,
2259        post_params=form_params,
2260        files=local_var_files,
2261        response_type='V1Status',
2262        auth_settings=auth_settings,
2263        async_req=params.get('async_req'),
2264        _return_http_data_only=params.get('_return_http_data_only'),
2265        _preload_content=params.get('_preload_content', True),
2266        _request_timeout=params.get('_request_timeout'),
2267        collection_formats=collection_formats)
2268
2269  def delete_namespaced_deployment(self, name, namespace, **kwargs):
2270    """
2271        delete a Deployment
2272        This method makes a synchronous HTTP request by default. To make an
2273        asynchronous HTTP request, please pass async_req=True
2274        >>> thread = api.delete_namespaced_deployment(name, namespace,
2275        async_req=True)
2276        >>> result = thread.get()
2277
2278        :param async_req bool
2279        :param str name: name of the Deployment (required)
2280        :param str namespace: object name and auth scope, such as for teams and
2281        projects (required)
2282        :param str pretty: If 'true', then the output is pretty printed.
2283        :param V1DeleteOptions body:
2284        :param str dry_run: When present, indicates that modifications should
2285        not be persisted. An invalid or unrecognized dryRun directive will
2286        result in an error response and no further processing of the request.
2287        Valid values are: - All: all dry run stages will be processed
2288        :param int grace_period_seconds: The duration in seconds before the
2289        object should be deleted. Value must be non-negative integer. The value
2290        zero indicates delete immediately. If this value is nil, the default
2291        grace period for the specified type will be used. Defaults to a per
2292        object value if not specified. zero means delete immediately.
2293        :param bool orphan_dependents: Deprecated: please use the
2294        PropagationPolicy, this field will be deprecated in 1.7. Should the
2295        dependent objects be orphaned. If true/false, the \"orphan\" finalizer
2296        will be added to/removed from the object's finalizers list. Either this
2297        field or PropagationPolicy may be set, but not both.
2298        :param str propagation_policy: Whether and how garbage collection will
2299        be performed. Either this field or OrphanDependents may be set, but not
2300        both. The default policy is decided by the existing finalizer set in the
2301        metadata.finalizers and the resource-specific default policy. Acceptable
2302        values are: 'Orphan' - orphan the dependents; 'Background' - allow the
2303        garbage collector to delete the dependents in the background;
2304        'Foreground' - a cascading policy that deletes all dependents in the
2305        foreground.
2306        :return: V1Status
2307                 If the method is called asynchronously,
2308                 returns the request thread.
2309        """
2310    kwargs['_return_http_data_only'] = True
2311    if kwargs.get('async_req'):
2312      return self.delete_namespaced_deployment_with_http_info(
2313          name, namespace, **kwargs)
2314    else:
2315      (data) = self.delete_namespaced_deployment_with_http_info(
2316          name, namespace, **kwargs)
2317      return data
2318
2319  def delete_namespaced_deployment_with_http_info(self, name, namespace,
2320                                                  **kwargs):
2321    """
2322        delete a Deployment
2323        This method makes a synchronous HTTP request by default. To make an
2324        asynchronous HTTP request, please pass async_req=True
2325        >>> thread = api.delete_namespaced_deployment_with_http_info(name,
2326        namespace, async_req=True)
2327        >>> result = thread.get()
2328
2329        :param async_req bool
2330        :param str name: name of the Deployment (required)
2331        :param str namespace: object name and auth scope, such as for teams and
2332        projects (required)
2333        :param str pretty: If 'true', then the output is pretty printed.
2334        :param V1DeleteOptions body:
2335        :param str dry_run: When present, indicates that modifications should
2336        not be persisted. An invalid or unrecognized dryRun directive will
2337        result in an error response and no further processing of the request.
2338        Valid values are: - All: all dry run stages will be processed
2339        :param int grace_period_seconds: The duration in seconds before the
2340        object should be deleted. Value must be non-negative integer. The value
2341        zero indicates delete immediately. If this value is nil, the default
2342        grace period for the specified type will be used. Defaults to a per
2343        object value if not specified. zero means delete immediately.
2344        :param bool orphan_dependents: Deprecated: please use the
2345        PropagationPolicy, this field will be deprecated in 1.7. Should the
2346        dependent objects be orphaned. If true/false, the \"orphan\" finalizer
2347        will be added to/removed from the object's finalizers list. Either this
2348        field or PropagationPolicy may be set, but not both.
2349        :param str propagation_policy: Whether and how garbage collection will
2350        be performed. Either this field or OrphanDependents may be set, but not
2351        both. The default policy is decided by the existing finalizer set in the
2352        metadata.finalizers and the resource-specific default policy. Acceptable
2353        values are: 'Orphan' - orphan the dependents; 'Background' - allow the
2354        garbage collector to delete the dependents in the background;
2355        'Foreground' - a cascading policy that deletes all dependents in the
2356        foreground.
2357        :return: V1Status
2358                 If the method is called asynchronously,
2359                 returns the request thread.
2360        """
2361
2362    all_params = [
2363        'name', 'namespace', 'pretty', 'body', 'dry_run',
2364        'grace_period_seconds', 'orphan_dependents', 'propagation_policy'
2365    ]
2366    all_params.append('async_req')
2367    all_params.append('_return_http_data_only')
2368    all_params.append('_preload_content')
2369    all_params.append('_request_timeout')
2370
2371    params = locals()
2372    for key, val in iteritems(params['kwargs']):
2373      if key not in all_params:
2374        raise TypeError("Got an unexpected keyword argument '%s'"
2375                        ' to method delete_namespaced_deployment' % key)
2376      params[key] = val
2377    del params['kwargs']
2378    # verify the required parameter 'name' is set
2379    if ('name' not in params) or (params['name'] is None):
2380      raise ValueError(
2381          'Missing the required parameter `name` when calling `delete_namespaced_deployment`'
2382      )
2383    # verify the required parameter 'namespace' is set
2384    if ('namespace' not in params) or (params['namespace'] is None):
2385      raise ValueError(
2386          'Missing the required parameter `namespace` when calling `delete_namespaced_deployment`'
2387      )
2388
2389    collection_formats = {}
2390
2391    path_params = {}
2392    if 'name' in params:
2393      path_params['name'] = params['name']
2394    if 'namespace' in params:
2395      path_params['namespace'] = params['namespace']
2396
2397    query_params = []
2398    if 'pretty' in params:
2399      query_params.append(('pretty', params['pretty']))
2400    if 'dry_run' in params:
2401      query_params.append(('dryRun', params['dry_run']))
2402    if 'grace_period_seconds' in params:
2403      query_params.append(
2404          ('gracePeriodSeconds', params['grace_period_seconds']))
2405    if 'orphan_dependents' in params:
2406      query_params.append(('orphanDependents', params['orphan_dependents']))
2407    if 'propagation_policy' in params:
2408      query_params.append(('propagationPolicy', params['propagation_policy']))
2409
2410    header_params = {}
2411
2412    form_params = []
2413    local_var_files = {}
2414
2415    body_params = None
2416    if 'body' in params:
2417      body_params = params['body']
2418    # HTTP header `Accept`
2419    header_params['Accept'] = self.api_client.\
2420        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
2421
2422    # HTTP header `Content-Type`
2423    header_params['Content-Type'] = self.api_client.\
2424        select_header_content_type(['*/*'])
2425
2426    # Authentication setting
2427    auth_settings = ['BearerToken']
2428
2429    return self.api_client.call_api(
2430        '/apis/apps/v1beta2/namespaces/{namespace}/deployments/{name}',
2431        'DELETE',
2432        path_params,
2433        query_params,
2434        header_params,
2435        body=body_params,
2436        post_params=form_params,
2437        files=local_var_files,
2438        response_type='V1Status',
2439        auth_settings=auth_settings,
2440        async_req=params.get('async_req'),
2441        _return_http_data_only=params.get('_return_http_data_only'),
2442        _preload_content=params.get('_preload_content', True),
2443        _request_timeout=params.get('_request_timeout'),
2444        collection_formats=collection_formats)
2445
2446  def delete_namespaced_replica_set(self, name, namespace, **kwargs):
2447    """
2448        delete a ReplicaSet
2449        This method makes a synchronous HTTP request by default. To make an
2450        asynchronous HTTP request, please pass async_req=True
2451        >>> thread = api.delete_namespaced_replica_set(name, namespace,
2452        async_req=True)
2453        >>> result = thread.get()
2454
2455        :param async_req bool
2456        :param str name: name of the ReplicaSet (required)
2457        :param str namespace: object name and auth scope, such as for teams and
2458        projects (required)
2459        :param str pretty: If 'true', then the output is pretty printed.
2460        :param V1DeleteOptions body:
2461        :param str dry_run: When present, indicates that modifications should
2462        not be persisted. An invalid or unrecognized dryRun directive will
2463        result in an error response and no further processing of the request.
2464        Valid values are: - All: all dry run stages will be processed
2465        :param int grace_period_seconds: The duration in seconds before the
2466        object should be deleted. Value must be non-negative integer. The value
2467        zero indicates delete immediately. If this value is nil, the default
2468        grace period for the specified type will be used. Defaults to a per
2469        object value if not specified. zero means delete immediately.
2470        :param bool orphan_dependents: Deprecated: please use the
2471        PropagationPolicy, this field will be deprecated in 1.7. Should the
2472        dependent objects be orphaned. If true/false, the \"orphan\" finalizer
2473        will be added to/removed from the object's finalizers list. Either this
2474        field or PropagationPolicy may be set, but not both.
2475        :param str propagation_policy: Whether and how garbage collection will
2476        be performed. Either this field or OrphanDependents may be set, but not
2477        both. The default policy is decided by the existing finalizer set in the
2478        metadata.finalizers and the resource-specific default policy. Acceptable
2479        values are: 'Orphan' - orphan the dependents; 'Background' - allow the
2480        garbage collector to delete the dependents in the background;
2481        'Foreground' - a cascading policy that deletes all dependents in the
2482        foreground.
2483        :return: V1Status
2484                 If the method is called asynchronously,
2485                 returns the request thread.
2486        """
2487    kwargs['_return_http_data_only'] = True
2488    if kwargs.get('async_req'):
2489      return self.delete_namespaced_replica_set_with_http_info(
2490          name, namespace, **kwargs)
2491    else:
2492      (data) = self.delete_namespaced_replica_set_with_http_info(
2493          name, namespace, **kwargs)
2494      return data
2495
2496  def delete_namespaced_replica_set_with_http_info(self, name, namespace,
2497                                                   **kwargs):
2498    """
2499        delete a ReplicaSet
2500        This method makes a synchronous HTTP request by default. To make an
2501        asynchronous HTTP request, please pass async_req=True
2502        >>> thread = api.delete_namespaced_replica_set_with_http_info(name,
2503        namespace, async_req=True)
2504        >>> result = thread.get()
2505
2506        :param async_req bool
2507        :param str name: name of the ReplicaSet (required)
2508        :param str namespace: object name and auth scope, such as for teams and
2509        projects (required)
2510        :param str pretty: If 'true', then the output is pretty printed.
2511        :param V1DeleteOptions body:
2512        :param str dry_run: When present, indicates that modifications should
2513        not be persisted. An invalid or unrecognized dryRun directive will
2514        result in an error response and no further processing of the request.
2515        Valid values are: - All: all dry run stages will be processed
2516        :param int grace_period_seconds: The duration in seconds before the
2517        object should be deleted. Value must be non-negative integer. The value
2518        zero indicates delete immediately. If this value is nil, the default
2519        grace period for the specified type will be used. Defaults to a per
2520        object value if not specified. zero means delete immediately.
2521        :param bool orphan_dependents: Deprecated: please use the
2522        PropagationPolicy, this field will be deprecated in 1.7. Should the
2523        dependent objects be orphaned. If true/false, the \"orphan\" finalizer
2524        will be added to/removed from the object's finalizers list. Either this
2525        field or PropagationPolicy may be set, but not both.
2526        :param str propagation_policy: Whether and how garbage collection will
2527        be performed. Either this field or OrphanDependents may be set, but not
2528        both. The default policy is decided by the existing finalizer set in the
2529        metadata.finalizers and the resource-specific default policy. Acceptable
2530        values are: 'Orphan' - orphan the dependents; 'Background' - allow the
2531        garbage collector to delete the dependents in the background;
2532        'Foreground' - a cascading policy that deletes all dependents in the
2533        foreground.
2534        :return: V1Status
2535                 If the method is called asynchronously,
2536                 returns the request thread.
2537        """
2538
2539    all_params = [
2540        'name', 'namespace', 'pretty', 'body', 'dry_run',
2541        'grace_period_seconds', 'orphan_dependents', 'propagation_policy'
2542    ]
2543    all_params.append('async_req')
2544    all_params.append('_return_http_data_only')
2545    all_params.append('_preload_content')
2546    all_params.append('_request_timeout')
2547
2548    params = locals()
2549    for key, val in iteritems(params['kwargs']):
2550      if key not in all_params:
2551        raise TypeError("Got an unexpected keyword argument '%s'"
2552                        ' to method delete_namespaced_replica_set' % key)
2553      params[key] = val
2554    del params['kwargs']
2555    # verify the required parameter 'name' is set
2556    if ('name' not in params) or (params['name'] is None):
2557      raise ValueError(
2558          'Missing the required parameter `name` when calling `delete_namespaced_replica_set`'
2559      )
2560    # verify the required parameter 'namespace' is set
2561    if ('namespace' not in params) or (params['namespace'] is None):
2562      raise ValueError(
2563          'Missing the required parameter `namespace` when calling `delete_namespaced_replica_set`'
2564      )
2565
2566    collection_formats = {}
2567
2568    path_params = {}
2569    if 'name' in params:
2570      path_params['name'] = params['name']
2571    if 'namespace' in params:
2572      path_params['namespace'] = params['namespace']
2573
2574    query_params = []
2575    if 'pretty' in params:
2576      query_params.append(('pretty', params['pretty']))
2577    if 'dry_run' in params:
2578      query_params.append(('dryRun', params['dry_run']))
2579    if 'grace_period_seconds' in params:
2580      query_params.append(
2581          ('gracePeriodSeconds', params['grace_period_seconds']))
2582    if 'orphan_dependents' in params:
2583      query_params.append(('orphanDependents', params['orphan_dependents']))
2584    if 'propagation_policy' in params:
2585      query_params.append(('propagationPolicy', params['propagation_policy']))
2586
2587    header_params = {}
2588
2589    form_params = []
2590    local_var_files = {}
2591
2592    body_params = None
2593    if 'body' in params:
2594      body_params = params['body']
2595    # HTTP header `Accept`
2596    header_params['Accept'] = self.api_client.\
2597        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
2598
2599    # HTTP header `Content-Type`
2600    header_params['Content-Type'] = self.api_client.\
2601        select_header_content_type(['*/*'])
2602
2603    # Authentication setting
2604    auth_settings = ['BearerToken']
2605
2606    return self.api_client.call_api(
2607        '/apis/apps/v1beta2/namespaces/{namespace}/replicasets/{name}',
2608        'DELETE',
2609        path_params,
2610        query_params,
2611        header_params,
2612        body=body_params,
2613        post_params=form_params,
2614        files=local_var_files,
2615        response_type='V1Status',
2616        auth_settings=auth_settings,
2617        async_req=params.get('async_req'),
2618        _return_http_data_only=params.get('_return_http_data_only'),
2619        _preload_content=params.get('_preload_content', True),
2620        _request_timeout=params.get('_request_timeout'),
2621        collection_formats=collection_formats)
2622
2623  def delete_namespaced_stateful_set(self, name, namespace, **kwargs):
2624    """
2625        delete a StatefulSet
2626        This method makes a synchronous HTTP request by default. To make an
2627        asynchronous HTTP request, please pass async_req=True
2628        >>> thread = api.delete_namespaced_stateful_set(name, namespace,
2629        async_req=True)
2630        >>> result = thread.get()
2631
2632        :param async_req bool
2633        :param str name: name of the StatefulSet (required)
2634        :param str namespace: object name and auth scope, such as for teams and
2635        projects (required)
2636        :param str pretty: If 'true', then the output is pretty printed.
2637        :param V1DeleteOptions body:
2638        :param str dry_run: When present, indicates that modifications should
2639        not be persisted. An invalid or unrecognized dryRun directive will
2640        result in an error response and no further processing of the request.
2641        Valid values are: - All: all dry run stages will be processed
2642        :param int grace_period_seconds: The duration in seconds before the
2643        object should be deleted. Value must be non-negative integer. The value
2644        zero indicates delete immediately. If this value is nil, the default
2645        grace period for the specified type will be used. Defaults to a per
2646        object value if not specified. zero means delete immediately.
2647        :param bool orphan_dependents: Deprecated: please use the
2648        PropagationPolicy, this field will be deprecated in 1.7. Should the
2649        dependent objects be orphaned. If true/false, the \"orphan\" finalizer
2650        will be added to/removed from the object's finalizers list. Either this
2651        field or PropagationPolicy may be set, but not both.
2652        :param str propagation_policy: Whether and how garbage collection will
2653        be performed. Either this field or OrphanDependents may be set, but not
2654        both. The default policy is decided by the existing finalizer set in the
2655        metadata.finalizers and the resource-specific default policy. Acceptable
2656        values are: 'Orphan' - orphan the dependents; 'Background' - allow the
2657        garbage collector to delete the dependents in the background;
2658        'Foreground' - a cascading policy that deletes all dependents in the
2659        foreground.
2660        :return: V1Status
2661                 If the method is called asynchronously,
2662                 returns the request thread.
2663        """
2664    kwargs['_return_http_data_only'] = True
2665    if kwargs.get('async_req'):
2666      return self.delete_namespaced_stateful_set_with_http_info(
2667          name, namespace, **kwargs)
2668    else:
2669      (data) = self.delete_namespaced_stateful_set_with_http_info(
2670          name, namespace, **kwargs)
2671      return data
2672
2673  def delete_namespaced_stateful_set_with_http_info(self, name, namespace,
2674                                                    **kwargs):
2675    """
2676        delete a StatefulSet
2677        This method makes a synchronous HTTP request by default. To make an
2678        asynchronous HTTP request, please pass async_req=True
2679        >>> thread = api.delete_namespaced_stateful_set_with_http_info(name,
2680        namespace, async_req=True)
2681        >>> result = thread.get()
2682
2683        :param async_req bool
2684        :param str name: name of the StatefulSet (required)
2685        :param str namespace: object name and auth scope, such as for teams and
2686        projects (required)
2687        :param str pretty: If 'true', then the output is pretty printed.
2688        :param V1DeleteOptions body:
2689        :param str dry_run: When present, indicates that modifications should
2690        not be persisted. An invalid or unrecognized dryRun directive will
2691        result in an error response and no further processing of the request.
2692        Valid values are: - All: all dry run stages will be processed
2693        :param int grace_period_seconds: The duration in seconds before the
2694        object should be deleted. Value must be non-negative integer. The value
2695        zero indicates delete immediately. If this value is nil, the default
2696        grace period for the specified type will be used. Defaults to a per
2697        object value if not specified. zero means delete immediately.
2698        :param bool orphan_dependents: Deprecated: please use the
2699        PropagationPolicy, this field will be deprecated in 1.7. Should the
2700        dependent objects be orphaned. If true/false, the \"orphan\" finalizer
2701        will be added to/removed from the object's finalizers list. Either this
2702        field or PropagationPolicy may be set, but not both.
2703        :param str propagation_policy: Whether and how garbage collection will
2704        be performed. Either this field or OrphanDependents may be set, but not
2705        both. The default policy is decided by the existing finalizer set in the
2706        metadata.finalizers and the resource-specific default policy. Acceptable
2707        values are: 'Orphan' - orphan the dependents; 'Background' - allow the
2708        garbage collector to delete the dependents in the background;
2709        'Foreground' - a cascading policy that deletes all dependents in the
2710        foreground.
2711        :return: V1Status
2712                 If the method is called asynchronously,
2713                 returns the request thread.
2714        """
2715
2716    all_params = [
2717        'name', 'namespace', 'pretty', 'body', 'dry_run',
2718        'grace_period_seconds', 'orphan_dependents', 'propagation_policy'
2719    ]
2720    all_params.append('async_req')
2721    all_params.append('_return_http_data_only')
2722    all_params.append('_preload_content')
2723    all_params.append('_request_timeout')
2724
2725    params = locals()
2726    for key, val in iteritems(params['kwargs']):
2727      if key not in all_params:
2728        raise TypeError("Got an unexpected keyword argument '%s'"
2729                        ' to method delete_namespaced_stateful_set' % key)
2730      params[key] = val
2731    del params['kwargs']
2732    # verify the required parameter 'name' is set
2733    if ('name' not in params) or (params['name'] is None):
2734      raise ValueError(
2735          'Missing the required parameter `name` when calling `delete_namespaced_stateful_set`'
2736      )
2737    # verify the required parameter 'namespace' is set
2738    if ('namespace' not in params) or (params['namespace'] is None):
2739      raise ValueError(
2740          'Missing the required parameter `namespace` when calling `delete_namespaced_stateful_set`'
2741      )
2742
2743    collection_formats = {}
2744
2745    path_params = {}
2746    if 'name' in params:
2747      path_params['name'] = params['name']
2748    if 'namespace' in params:
2749      path_params['namespace'] = params['namespace']
2750
2751    query_params = []
2752    if 'pretty' in params:
2753      query_params.append(('pretty', params['pretty']))
2754    if 'dry_run' in params:
2755      query_params.append(('dryRun', params['dry_run']))
2756    if 'grace_period_seconds' in params:
2757      query_params.append(
2758          ('gracePeriodSeconds', params['grace_period_seconds']))
2759    if 'orphan_dependents' in params:
2760      query_params.append(('orphanDependents', params['orphan_dependents']))
2761    if 'propagation_policy' in params:
2762      query_params.append(('propagationPolicy', params['propagation_policy']))
2763
2764    header_params = {}
2765
2766    form_params = []
2767    local_var_files = {}
2768
2769    body_params = None
2770    if 'body' in params:
2771      body_params = params['body']
2772    # HTTP header `Accept`
2773    header_params['Accept'] = self.api_client.\
2774        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
2775
2776    # HTTP header `Content-Type`
2777    header_params['Content-Type'] = self.api_client.\
2778        select_header_content_type(['*/*'])
2779
2780    # Authentication setting
2781    auth_settings = ['BearerToken']
2782
2783    return self.api_client.call_api(
2784        '/apis/apps/v1beta2/namespaces/{namespace}/statefulsets/{name}',
2785        'DELETE',
2786        path_params,
2787        query_params,
2788        header_params,
2789        body=body_params,
2790        post_params=form_params,
2791        files=local_var_files,
2792        response_type='V1Status',
2793        auth_settings=auth_settings,
2794        async_req=params.get('async_req'),
2795        _return_http_data_only=params.get('_return_http_data_only'),
2796        _preload_content=params.get('_preload_content', True),
2797        _request_timeout=params.get('_request_timeout'),
2798        collection_formats=collection_formats)
2799
2800  def get_api_resources(self, **kwargs):
2801    """
2802        get available resources
2803        This method makes a synchronous HTTP request by default. To make an
2804        asynchronous HTTP request, please pass async_req=True
2805        >>> thread = api.get_api_resources(async_req=True)
2806        >>> result = thread.get()
2807
2808        :param async_req bool
2809        :return: V1APIResourceList
2810                 If the method is called asynchronously,
2811                 returns the request thread.
2812        """
2813    kwargs['_return_http_data_only'] = True
2814    if kwargs.get('async_req'):
2815      return self.get_api_resources_with_http_info(**kwargs)
2816    else:
2817      (data) = self.get_api_resources_with_http_info(**kwargs)
2818      return data
2819
2820  def get_api_resources_with_http_info(self, **kwargs):
2821    """
2822        get available resources
2823        This method makes a synchronous HTTP request by default. To make an
2824        asynchronous HTTP request, please pass async_req=True
2825        >>> thread = api.get_api_resources_with_http_info(async_req=True)
2826        >>> result = thread.get()
2827
2828        :param async_req bool
2829        :return: V1APIResourceList
2830                 If the method is called asynchronously,
2831                 returns the request thread.
2832        """
2833
2834    all_params = []
2835    all_params.append('async_req')
2836    all_params.append('_return_http_data_only')
2837    all_params.append('_preload_content')
2838    all_params.append('_request_timeout')
2839
2840    params = locals()
2841    for key, val in iteritems(params['kwargs']):
2842      if key not in all_params:
2843        raise TypeError("Got an unexpected keyword argument '%s'"
2844                        ' to method get_api_resources' % key)
2845      params[key] = val
2846    del params['kwargs']
2847
2848    collection_formats = {}
2849
2850    path_params = {}
2851
2852    query_params = []
2853
2854    header_params = {}
2855
2856    form_params = []
2857    local_var_files = {}
2858
2859    body_params = None
2860    # HTTP header `Accept`
2861    header_params['Accept'] = self.api_client.\
2862        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
2863
2864    # HTTP header `Content-Type`
2865    header_params['Content-Type'] = self.api_client.\
2866        select_header_content_type(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
2867
2868    # Authentication setting
2869    auth_settings = ['BearerToken']
2870
2871    return self.api_client.call_api(
2872        '/apis/apps/v1beta2/',
2873        'GET',
2874        path_params,
2875        query_params,
2876        header_params,
2877        body=body_params,
2878        post_params=form_params,
2879        files=local_var_files,
2880        response_type='V1APIResourceList',
2881        auth_settings=auth_settings,
2882        async_req=params.get('async_req'),
2883        _return_http_data_only=params.get('_return_http_data_only'),
2884        _preload_content=params.get('_preload_content', True),
2885        _request_timeout=params.get('_request_timeout'),
2886        collection_formats=collection_formats)
2887
2888  def list_controller_revision_for_all_namespaces(self, **kwargs):
2889    """
2890        list or watch objects of kind ControllerRevision
2891        This method makes a synchronous HTTP request by default. To make an
2892        asynchronous HTTP request, please pass async_req=True
2893        >>> thread =
2894        api.list_controller_revision_for_all_namespaces(async_req=True)
2895        >>> result = thread.get()
2896
2897        :param async_req bool
2898        :param str _continue: The continue option should be set when retrieving
2899        more results from the server. Since this value is server defined,
2900        clients may only use the continue value from a previous query result
2901        with identical query parameters (except for the value of continue) and
2902        the server may reject a continue value it does not recognize. If the
2903        specified continue value is no longer valid whether due to expiration
2904        (generally five to fifteen minutes) or a configuration change on the
2905        server, the server will respond with a 410 ResourceExpired error
2906        together with a continue token. If the client needs a consistent list,
2907        it must restart their list without the continue field. Otherwise, the
2908        client may send another list request with the token received with the
2909        410 error, the server will respond with a list starting from the next
2910        key, but from the latest snapshot, which is inconsistent from the
2911        previous list results - objects that are created, modified, or deleted
2912        after the first list request will be included in the response, as long
2913        as their keys are after the \"next key\".  This field is not supported
2914        when watch is true. Clients may start a watch from the last
2915        resourceVersion value returned by the server and not miss any
2916        modifications.
2917        :param str field_selector: A selector to restrict the list of returned
2918        objects by their fields. Defaults to everything.
2919        :param str label_selector: A selector to restrict the list of returned
2920        objects by their labels. Defaults to everything.
2921        :param int limit: limit is a maximum number of responses to return for a
2922        list call. If more items exist, the server will set the `continue` field
2923        on the list metadata to a value that can be used with the same initial
2924        query to retrieve the next set of results. Setting a limit may return
2925        fewer than the requested amount of items (up to zero items) in the event
2926        all requested objects are filtered out and clients should only use the
2927        presence of the continue field to determine whether more results are
2928        available. Servers may choose not to support the limit argument and will
2929        return all of the available results. If limit is specified and the
2930        continue field is empty, clients may assume that no more results are
2931        available. This field is not supported if watch is true.  The server
2932        guarantees that the objects returned when using continue will be
2933        identical to issuing a single list call without a limit - that is, no
2934        objects created, modified, or deleted after the first request is issued
2935        will be included in any subsequent continued requests. This is sometimes
2936        referred to as a consistent snapshot, and ensures that a client that is
2937        using limit to receive smaller chunks of a very large result can ensure
2938        they see all possible objects. If objects are updated during a chunked
2939        list the version of the object that was present at the time the first
2940        list result was calculated is returned.
2941        :param str pretty: If 'true', then the output is pretty printed.
2942        :param str resource_version: When specified with a watch call, shows
2943        changes that occur after that particular version of a resource. Defaults
2944        to changes from the beginning of history. When specified for list: - if
2945        unset, then the result is returned from remote storage based on
2946        quorum-read flag; - if it's 0, then we simply return what we currently
2947        have in cache, no guarantee; - if set to non zero, then the result is at
2948        least as fresh as given rv.
2949        :param int timeout_seconds: Timeout for the list/watch call. This limits
2950        the duration of the call, regardless of any activity or inactivity.
2951        :param bool watch: Watch for changes to the described resources and
2952        return them as a stream of add, update, and remove notifications.
2953        Specify resourceVersion.
2954        :return: V1beta2ControllerRevisionList
2955                 If the method is called asynchronously,
2956                 returns the request thread.
2957        """
2958    kwargs['_return_http_data_only'] = True
2959    if kwargs.get('async_req'):
2960      return self.list_controller_revision_for_all_namespaces_with_http_info(
2961          **kwargs)
2962    else:
2963      (data) = self.list_controller_revision_for_all_namespaces_with_http_info(
2964          **kwargs)
2965      return data
2966
2967  def list_controller_revision_for_all_namespaces_with_http_info(
2968      self, **kwargs):
2969    """
2970        list or watch objects of kind ControllerRevision
2971        This method makes a synchronous HTTP request by default. To make an
2972        asynchronous HTTP request, please pass async_req=True
2973        >>> thread =
2974        api.list_controller_revision_for_all_namespaces_with_http_info(async_req=True)
2975        >>> result = thread.get()
2976
2977        :param async_req bool
2978        :param str _continue: The continue option should be set when retrieving
2979        more results from the server. Since this value is server defined,
2980        clients may only use the continue value from a previous query result
2981        with identical query parameters (except for the value of continue) and
2982        the server may reject a continue value it does not recognize. If the
2983        specified continue value is no longer valid whether due to expiration
2984        (generally five to fifteen minutes) or a configuration change on the
2985        server, the server will respond with a 410 ResourceExpired error
2986        together with a continue token. If the client needs a consistent list,
2987        it must restart their list without the continue field. Otherwise, the
2988        client may send another list request with the token received with the
2989        410 error, the server will respond with a list starting from the next
2990        key, but from the latest snapshot, which is inconsistent from the
2991        previous list results - objects that are created, modified, or deleted
2992        after the first list request will be included in the response, as long
2993        as their keys are after the \"next key\".  This field is not supported
2994        when watch is true. Clients may start a watch from the last
2995        resourceVersion value returned by the server and not miss any
2996        modifications.
2997        :param str field_selector: A selector to restrict the list of returned
2998        objects by their fields. Defaults to everything.
2999        :param str label_selector: A selector to restrict the list of returned
3000        objects by their labels. Defaults to everything.
3001        :param int limit: limit is a maximum number of responses to return for a
3002        list call. If more items exist, the server will set the `continue` field
3003        on the list metadata to a value that can be used with the same initial
3004        query to retrieve the next set of results. Setting a limit may return
3005        fewer than the requested amount of items (up to zero items) in the event
3006        all requested objects are filtered out and clients should only use the
3007        presence of the continue field to determine whether more results are
3008        available. Servers may choose not to support the limit argument and will
3009        return all of the available results. If limit is specified and the
3010        continue field is empty, clients may assume that no more results are
3011        available. This field is not supported if watch is true.  The server
3012        guarantees that the objects returned when using continue will be
3013        identical to issuing a single list call without a limit - that is, no
3014        objects created, modified, or deleted after the first request is issued
3015        will be included in any subsequent continued requests. This is sometimes
3016        referred to as a consistent snapshot, and ensures that a client that is
3017        using limit to receive smaller chunks of a very large result can ensure
3018        they see all possible objects. If objects are updated during a chunked
3019        list the version of the object that was present at the time the first
3020        list result was calculated is returned.
3021        :param str pretty: If 'true', then the output is pretty printed.
3022        :param str resource_version: When specified with a watch call, shows
3023        changes that occur after that particular version of a resource. Defaults
3024        to changes from the beginning of history. When specified for list: - if
3025        unset, then the result is returned from remote storage based on
3026        quorum-read flag; - if it's 0, then we simply return what we currently
3027        have in cache, no guarantee; - if set to non zero, then the result is at
3028        least as fresh as given rv.
3029        :param int timeout_seconds: Timeout for the list/watch call. This limits
3030        the duration of the call, regardless of any activity or inactivity.
3031        :param bool watch: Watch for changes to the described resources and
3032        return them as a stream of add, update, and remove notifications.
3033        Specify resourceVersion.
3034        :return: V1beta2ControllerRevisionList
3035                 If the method is called asynchronously,
3036                 returns the request thread.
3037        """
3038
3039    all_params = [
3040        '_continue', 'field_selector', 'label_selector', 'limit', 'pretty',
3041        'resource_version', 'timeout_seconds', 'watch'
3042    ]
3043    all_params.append('async_req')
3044    all_params.append('_return_http_data_only')
3045    all_params.append('_preload_content')
3046    all_params.append('_request_timeout')
3047
3048    params = locals()
3049    for key, val in iteritems(params['kwargs']):
3050      if key not in all_params:
3051        raise TypeError(
3052            "Got an unexpected keyword argument '%s'"
3053            ' to method list_controller_revision_for_all_namespaces' % key)
3054      params[key] = val
3055    del params['kwargs']
3056
3057    collection_formats = {}
3058
3059    path_params = {}
3060
3061    query_params = []
3062    if '_continue' in params:
3063      query_params.append(('continue', params['_continue']))
3064    if 'field_selector' in params:
3065      query_params.append(('fieldSelector', params['field_selector']))
3066    if 'label_selector' in params:
3067      query_params.append(('labelSelector', params['label_selector']))
3068    if 'limit' in params:
3069      query_params.append(('limit', params['limit']))
3070    if 'pretty' in params:
3071      query_params.append(('pretty', params['pretty']))
3072    if 'resource_version' in params:
3073      query_params.append(('resourceVersion', params['resource_version']))
3074    if 'timeout_seconds' in params:
3075      query_params.append(('timeoutSeconds', params['timeout_seconds']))
3076    if 'watch' in params:
3077      query_params.append(('watch', params['watch']))
3078
3079    header_params = {}
3080
3081    form_params = []
3082    local_var_files = {}
3083
3084    body_params = None
3085    # HTTP header `Accept`
3086    header_params['Accept'] = self.api_client.\
3087        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'])
3088
3089    # HTTP header `Content-Type`
3090    header_params['Content-Type'] = self.api_client.\
3091        select_header_content_type(['*/*'])
3092
3093    # Authentication setting
3094    auth_settings = ['BearerToken']
3095
3096    return self.api_client.call_api(
3097        '/apis/apps/v1beta2/controllerrevisions',
3098        'GET',
3099        path_params,
3100        query_params,
3101        header_params,
3102        body=body_params,
3103        post_params=form_params,
3104        files=local_var_files,
3105        response_type='V1beta2ControllerRevisionList',
3106        auth_settings=auth_settings,
3107        async_req=params.get('async_req'),
3108        _return_http_data_only=params.get('_return_http_data_only'),
3109        _preload_content=params.get('_preload_content', True),
3110        _request_timeout=params.get('_request_timeout'),
3111        collection_formats=collection_formats)
3112
3113  def list_daemon_set_for_all_namespaces(self, **kwargs):
3114    """
3115        list or watch objects of kind DaemonSet
3116        This method makes a synchronous HTTP request by default. To make an
3117        asynchronous HTTP request, please pass async_req=True
3118        >>> thread = api.list_daemon_set_for_all_namespaces(async_req=True)
3119        >>> result = thread.get()
3120
3121        :param async_req bool
3122        :param str _continue: The continue option should be set when retrieving
3123        more results from the server. Since this value is server defined,
3124        clients may only use the continue value from a previous query result
3125        with identical query parameters (except for the value of continue) and
3126        the server may reject a continue value it does not recognize. If the
3127        specified continue value is no longer valid whether due to expiration
3128        (generally five to fifteen minutes) or a configuration change on the
3129        server, the server will respond with a 410 ResourceExpired error
3130        together with a continue token. If the client needs a consistent list,
3131        it must restart their list without the continue field. Otherwise, the
3132        client may send another list request with the token received with the
3133        410 error, the server will respond with a list starting from the next
3134        key, but from the latest snapshot, which is inconsistent from the
3135        previous list results - objects that are created, modified, or deleted
3136        after the first list request will be included in the response, as long
3137        as their keys are after the \"next key\".  This field is not supported
3138        when watch is true. Clients may start a watch from the last
3139        resourceVersion value returned by the server and not miss any
3140        modifications.
3141        :param str field_selector: A selector to restrict the list of returned
3142        objects by their fields. Defaults to everything.
3143        :param str label_selector: A selector to restrict the list of returned
3144        objects by their labels. Defaults to everything.
3145        :param int limit: limit is a maximum number of responses to return for a
3146        list call. If more items exist, the server will set the `continue` field
3147        on the list metadata to a value that can be used with the same initial
3148        query to retrieve the next set of results. Setting a limit may return
3149        fewer than the requested amount of items (up to zero items) in the event
3150        all requested objects are filtered out and clients should only use the
3151        presence of the continue field to determine whether more results are
3152        available. Servers may choose not to support the limit argument and will
3153        return all of the available results. If limit is specified and the
3154        continue field is empty, clients may assume that no more results are
3155        available. This field is not supported if watch is true.  The server
3156        guarantees that the objects returned when using continue will be
3157        identical to issuing a single list call without a limit - that is, no
3158        objects created, modified, or deleted after the first request is issued
3159        will be included in any subsequent continued requests. This is sometimes
3160        referred to as a consistent snapshot, and ensures that a client that is
3161        using limit to receive smaller chunks of a very large result can ensure
3162        they see all possible objects. If objects are updated during a chunked
3163        list the version of the object that was present at the time the first
3164        list result was calculated is returned.
3165        :param str pretty: If 'true', then the output is pretty printed.
3166        :param str resource_version: When specified with a watch call, shows
3167        changes that occur after that particular version of a resource. Defaults
3168        to changes from the beginning of history. When specified for list: - if
3169        unset, then the result is returned from remote storage based on
3170        quorum-read flag; - if it's 0, then we simply return what we currently
3171        have in cache, no guarantee; - if set to non zero, then the result is at
3172        least as fresh as given rv.
3173        :param int timeout_seconds: Timeout for the list/watch call. This limits
3174        the duration of the call, regardless of any activity or inactivity.
3175        :param bool watch: Watch for changes to the described resources and
3176        return them as a stream of add, update, and remove notifications.
3177        Specify resourceVersion.
3178        :return: V1beta2DaemonSetList
3179                 If the method is called asynchronously,
3180                 returns the request thread.
3181        """
3182    kwargs['_return_http_data_only'] = True
3183    if kwargs.get('async_req'):
3184      return self.list_daemon_set_for_all_namespaces_with_http_info(**kwargs)
3185    else:
3186      (data) = self.list_daemon_set_for_all_namespaces_with_http_info(**kwargs)
3187      return data
3188
3189  def list_daemon_set_for_all_namespaces_with_http_info(self, **kwargs):
3190    """
3191        list or watch objects of kind DaemonSet
3192        This method makes a synchronous HTTP request by default. To make an
3193        asynchronous HTTP request, please pass async_req=True
3194        >>> thread =
3195        api.list_daemon_set_for_all_namespaces_with_http_info(async_req=True)
3196        >>> result = thread.get()
3197
3198        :param async_req bool
3199        :param str _continue: The continue option should be set when retrieving
3200        more results from the server. Since this value is server defined,
3201        clients may only use the continue value from a previous query result
3202        with identical query parameters (except for the value of continue) and
3203        the server may reject a continue value it does not recognize. If the
3204        specified continue value is no longer valid whether due to expiration
3205        (generally five to fifteen minutes) or a configuration change on the
3206        server, the server will respond with a 410 ResourceExpired error
3207        together with a continue token. If the client needs a consistent list,
3208        it must restart their list without the continue field. Otherwise, the
3209        client may send another list request with the token received with the
3210        410 error, the server will respond with a list starting from the next
3211        key, but from the latest snapshot, which is inconsistent from the
3212        previous list results - objects that are created, modified, or deleted
3213        after the first list request will be included in the response, as long
3214        as their keys are after the \"next key\".  This field is not supported
3215        when watch is true. Clients may start a watch from the last
3216        resourceVersion value returned by the server and not miss any
3217        modifications.
3218        :param str field_selector: A selector to restrict the list of returned
3219        objects by their fields. Defaults to everything.
3220        :param str label_selector: A selector to restrict the list of returned
3221        objects by their labels. Defaults to everything.
3222        :param int limit: limit is a maximum number of responses to return for a
3223        list call. If more items exist, the server will set the `continue` field
3224        on the list metadata to a value that can be used with the same initial
3225        query to retrieve the next set of results. Setting a limit may return
3226        fewer than the requested amount of items (up to zero items) in the event
3227        all requested objects are filtered out and clients should only use the
3228        presence of the continue field to determine whether more results are
3229        available. Servers may choose not to support the limit argument and will
3230        return all of the available results. If limit is specified and the
3231        continue field is empty, clients may assume that no more results are
3232        available. This field is not supported if watch is true.  The server
3233        guarantees that the objects returned when using continue will be
3234        identical to issuing a single list call without a limit - that is, no
3235        objects created, modified, or deleted after the first request is issued
3236        will be included in any subsequent continued requests. This is sometimes
3237        referred to as a consistent snapshot, and ensures that a client that is
3238        using limit to receive smaller chunks of a very large result can ensure
3239        they see all possible objects. If objects are updated during a chunked
3240        list the version of the object that was present at the time the first
3241        list result was calculated is returned.
3242        :param str pretty: If 'true', then the output is pretty printed.
3243        :param str resource_version: When specified with a watch call, shows
3244        changes that occur after that particular version of a resource. Defaults
3245        to changes from the beginning of history. When specified for list: - if
3246        unset, then the result is returned from remote storage based on
3247        quorum-read flag; - if it's 0, then we simply return what we currently
3248        have in cache, no guarantee; - if set to non zero, then the result is at
3249        least as fresh as given rv.
3250        :param int timeout_seconds: Timeout for the list/watch call. This limits
3251        the duration of the call, regardless of any activity or inactivity.
3252        :param bool watch: Watch for changes to the described resources and
3253        return them as a stream of add, update, and remove notifications.
3254        Specify resourceVersion.
3255        :return: V1beta2DaemonSetList
3256                 If the method is called asynchronously,
3257                 returns the request thread.
3258        """
3259
3260    all_params = [
3261        '_continue', 'field_selector', 'label_selector', 'limit', 'pretty',
3262        'resource_version', 'timeout_seconds', 'watch'
3263    ]
3264    all_params.append('async_req')
3265    all_params.append('_return_http_data_only')
3266    all_params.append('_preload_content')
3267    all_params.append('_request_timeout')
3268
3269    params = locals()
3270    for key, val in iteritems(params['kwargs']):
3271      if key not in all_params:
3272        raise TypeError("Got an unexpected keyword argument '%s'"
3273                        ' to method list_daemon_set_for_all_namespaces' % key)
3274      params[key] = val
3275    del params['kwargs']
3276
3277    collection_formats = {}
3278
3279    path_params = {}
3280
3281    query_params = []
3282    if '_continue' in params:
3283      query_params.append(('continue', params['_continue']))
3284    if 'field_selector' in params:
3285      query_params.append(('fieldSelector', params['field_selector']))
3286    if 'label_selector' in params:
3287      query_params.append(('labelSelector', params['label_selector']))
3288    if 'limit' in params:
3289      query_params.append(('limit', params['limit']))
3290    if 'pretty' in params:
3291      query_params.append(('pretty', params['pretty']))
3292    if 'resource_version' in params:
3293      query_params.append(('resourceVersion', params['resource_version']))
3294    if 'timeout_seconds' in params:
3295      query_params.append(('timeoutSeconds', params['timeout_seconds']))
3296    if 'watch' in params:
3297      query_params.append(('watch', params['watch']))
3298
3299    header_params = {}
3300
3301    form_params = []
3302    local_var_files = {}
3303
3304    body_params = None
3305    # HTTP header `Accept`
3306    header_params['Accept'] = self.api_client.\
3307        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'])
3308
3309    # HTTP header `Content-Type`
3310    header_params['Content-Type'] = self.api_client.\
3311        select_header_content_type(['*/*'])
3312
3313    # Authentication setting
3314    auth_settings = ['BearerToken']
3315
3316    return self.api_client.call_api(
3317        '/apis/apps/v1beta2/daemonsets',
3318        'GET',
3319        path_params,
3320        query_params,
3321        header_params,
3322        body=body_params,
3323        post_params=form_params,
3324        files=local_var_files,
3325        response_type='V1beta2DaemonSetList',
3326        auth_settings=auth_settings,
3327        async_req=params.get('async_req'),
3328        _return_http_data_only=params.get('_return_http_data_only'),
3329        _preload_content=params.get('_preload_content', True),
3330        _request_timeout=params.get('_request_timeout'),
3331        collection_formats=collection_formats)
3332
3333  def list_deployment_for_all_namespaces(self, **kwargs):
3334    """
3335        list or watch objects of kind Deployment
3336        This method makes a synchronous HTTP request by default. To make an
3337        asynchronous HTTP request, please pass async_req=True
3338        >>> thread = api.list_deployment_for_all_namespaces(async_req=True)
3339        >>> result = thread.get()
3340
3341        :param async_req bool
3342        :param str _continue: The continue option should be set when retrieving
3343        more results from the server. Since this value is server defined,
3344        clients may only use the continue value from a previous query result
3345        with identical query parameters (except for the value of continue) and
3346        the server may reject a continue value it does not recognize. If the
3347        specified continue value is no longer valid whether due to expiration
3348        (generally five to fifteen minutes) or a configuration change on the
3349        server, the server will respond with a 410 ResourceExpired error
3350        together with a continue token. If the client needs a consistent list,
3351        it must restart their list without the continue field. Otherwise, the
3352        client may send another list request with the token received with the
3353        410 error, the server will respond with a list starting from the next
3354        key, but from the latest snapshot, which is inconsistent from the
3355        previous list results - objects that are created, modified, or deleted
3356        after the first list request will be included in the response, as long
3357        as their keys are after the \"next key\".  This field is not supported
3358        when watch is true. Clients may start a watch from the last
3359        resourceVersion value returned by the server and not miss any
3360        modifications.
3361        :param str field_selector: A selector to restrict the list of returned
3362        objects by their fields. Defaults to everything.
3363        :param str label_selector: A selector to restrict the list of returned
3364        objects by their labels. Defaults to everything.
3365        :param int limit: limit is a maximum number of responses to return for a
3366        list call. If more items exist, the server will set the `continue` field
3367        on the list metadata to a value that can be used with the same initial
3368        query to retrieve the next set of results. Setting a limit may return
3369        fewer than the requested amount of items (up to zero items) in the event
3370        all requested objects are filtered out and clients should only use the
3371        presence of the continue field to determine whether more results are
3372        available. Servers may choose not to support the limit argument and will
3373        return all of the available results. If limit is specified and the
3374        continue field is empty, clients may assume that no more results are
3375        available. This field is not supported if watch is true.  The server
3376        guarantees that the objects returned when using continue will be
3377        identical to issuing a single list call without a limit - that is, no
3378        objects created, modified, or deleted after the first request is issued
3379        will be included in any subsequent continued requests. This is sometimes
3380        referred to as a consistent snapshot, and ensures that a client that is
3381        using limit to receive smaller chunks of a very large result can ensure
3382        they see all possible objects. If objects are updated during a chunked
3383        list the version of the object that was present at the time the first
3384        list result was calculated is returned.
3385        :param str pretty: If 'true', then the output is pretty printed.
3386        :param str resource_version: When specified with a watch call, shows
3387        changes that occur after that particular version of a resource. Defaults
3388        to changes from the beginning of history. When specified for list: - if
3389        unset, then the result is returned from remote storage based on
3390        quorum-read flag; - if it's 0, then we simply return what we currently
3391        have in cache, no guarantee; - if set to non zero, then the result is at
3392        least as fresh as given rv.
3393        :param int timeout_seconds: Timeout for the list/watch call. This limits
3394        the duration of the call, regardless of any activity or inactivity.
3395        :param bool watch: Watch for changes to the described resources and
3396        return them as a stream of add, update, and remove notifications.
3397        Specify resourceVersion.
3398        :return: V1beta2DeploymentList
3399                 If the method is called asynchronously,
3400                 returns the request thread.
3401        """
3402    kwargs['_return_http_data_only'] = True
3403    if kwargs.get('async_req'):
3404      return self.list_deployment_for_all_namespaces_with_http_info(**kwargs)
3405    else:
3406      (data) = self.list_deployment_for_all_namespaces_with_http_info(**kwargs)
3407      return data
3408
3409  def list_deployment_for_all_namespaces_with_http_info(self, **kwargs):
3410    """
3411        list or watch objects of kind Deployment
3412        This method makes a synchronous HTTP request by default. To make an
3413        asynchronous HTTP request, please pass async_req=True
3414        >>> thread =
3415        api.list_deployment_for_all_namespaces_with_http_info(async_req=True)
3416        >>> result = thread.get()
3417
3418        :param async_req bool
3419        :param str _continue: The continue option should be set when retrieving
3420        more results from the server. Since this value is server defined,
3421        clients may only use the continue value from a previous query result
3422        with identical query parameters (except for the value of continue) and
3423        the server may reject a continue value it does not recognize. If the
3424        specified continue value is no longer valid whether due to expiration
3425        (generally five to fifteen minutes) or a configuration change on the
3426        server, the server will respond with a 410 ResourceExpired error
3427        together with a continue token. If the client needs a consistent list,
3428        it must restart their list without the continue field. Otherwise, the
3429        client may send another list request with the token received with the
3430        410 error, the server will respond with a list starting from the next
3431        key, but from the latest snapshot, which is inconsistent from the
3432        previous list results - objects that are created, modified, or deleted
3433        after the first list request will be included in the response, as long
3434        as their keys are after the \"next key\".  This field is not supported
3435        when watch is true. Clients may start a watch from the last
3436        resourceVersion value returned by the server and not miss any
3437        modifications.
3438        :param str field_selector: A selector to restrict the list of returned
3439        objects by their fields. Defaults to everything.
3440        :param str label_selector: A selector to restrict the list of returned
3441        objects by their labels. Defaults to everything.
3442        :param int limit: limit is a maximum number of responses to return for a
3443        list call. If more items exist, the server will set the `continue` field
3444        on the list metadata to a value that can be used with the same initial
3445        query to retrieve the next set of results. Setting a limit may return
3446        fewer than the requested amount of items (up to zero items) in the event
3447        all requested objects are filtered out and clients should only use the
3448        presence of the continue field to determine whether more results are
3449        available. Servers may choose not to support the limit argument and will
3450        return all of the available results. If limit is specified and the
3451        continue field is empty, clients may assume that no more results are
3452        available. This field is not supported if watch is true.  The server
3453        guarantees that the objects returned when using continue will be
3454        identical to issuing a single list call without a limit - that is, no
3455        objects created, modified, or deleted after the first request is issued
3456        will be included in any subsequent continued requests. This is sometimes
3457        referred to as a consistent snapshot, and ensures that a client that is
3458        using limit to receive smaller chunks of a very large result can ensure
3459        they see all possible objects. If objects are updated during a chunked
3460        list the version of the object that was present at the time the first
3461        list result was calculated is returned.
3462        :param str pretty: If 'true', then the output is pretty printed.
3463        :param str resource_version: When specified with a watch call, shows
3464        changes that occur after that particular version of a resource. Defaults
3465        to changes from the beginning of history. When specified for list: - if
3466        unset, then the result is returned from remote storage based on
3467        quorum-read flag; - if it's 0, then we simply return what we currently
3468        have in cache, no guarantee; - if set to non zero, then the result is at
3469        least as fresh as given rv.
3470        :param int timeout_seconds: Timeout for the list/watch call. This limits
3471        the duration of the call, regardless of any activity or inactivity.
3472        :param bool watch: Watch for changes to the described resources and
3473        return them as a stream of add, update, and remove notifications.
3474        Specify resourceVersion.
3475        :return: V1beta2DeploymentList
3476                 If the method is called asynchronously,
3477                 returns the request thread.
3478        """
3479
3480    all_params = [
3481        '_continue', 'field_selector', 'label_selector', 'limit', 'pretty',
3482        'resource_version', 'timeout_seconds', 'watch'
3483    ]
3484    all_params.append('async_req')
3485    all_params.append('_return_http_data_only')
3486    all_params.append('_preload_content')
3487    all_params.append('_request_timeout')
3488
3489    params = locals()
3490    for key, val in iteritems(params['kwargs']):
3491      if key not in all_params:
3492        raise TypeError("Got an unexpected keyword argument '%s'"
3493                        ' to method list_deployment_for_all_namespaces' % key)
3494      params[key] = val
3495    del params['kwargs']
3496
3497    collection_formats = {}
3498
3499    path_params = {}
3500
3501    query_params = []
3502    if '_continue' in params:
3503      query_params.append(('continue', params['_continue']))
3504    if 'field_selector' in params:
3505      query_params.append(('fieldSelector', params['field_selector']))
3506    if 'label_selector' in params:
3507      query_params.append(('labelSelector', params['label_selector']))
3508    if 'limit' in params:
3509      query_params.append(('limit', params['limit']))
3510    if 'pretty' in params:
3511      query_params.append(('pretty', params['pretty']))
3512    if 'resource_version' in params:
3513      query_params.append(('resourceVersion', params['resource_version']))
3514    if 'timeout_seconds' in params:
3515      query_params.append(('timeoutSeconds', params['timeout_seconds']))
3516    if 'watch' in params:
3517      query_params.append(('watch', params['watch']))
3518
3519    header_params = {}
3520
3521    form_params = []
3522    local_var_files = {}
3523
3524    body_params = None
3525    # HTTP header `Accept`
3526    header_params['Accept'] = self.api_client.\
3527        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'])
3528
3529    # HTTP header `Content-Type`
3530    header_params['Content-Type'] = self.api_client.\
3531        select_header_content_type(['*/*'])
3532
3533    # Authentication setting
3534    auth_settings = ['BearerToken']
3535
3536    return self.api_client.call_api(
3537        '/apis/apps/v1beta2/deployments',
3538        'GET',
3539        path_params,
3540        query_params,
3541        header_params,
3542        body=body_params,
3543        post_params=form_params,
3544        files=local_var_files,
3545        response_type='V1beta2DeploymentList',
3546        auth_settings=auth_settings,
3547        async_req=params.get('async_req'),
3548        _return_http_data_only=params.get('_return_http_data_only'),
3549        _preload_content=params.get('_preload_content', True),
3550        _request_timeout=params.get('_request_timeout'),
3551        collection_formats=collection_formats)
3552
3553  def list_namespaced_controller_revision(self, namespace, **kwargs):
3554    """
3555        list or watch objects of kind ControllerRevision
3556        This method makes a synchronous HTTP request by default. To make an
3557        asynchronous HTTP request, please pass async_req=True
3558        >>> thread = api.list_namespaced_controller_revision(namespace,
3559        async_req=True)
3560        >>> result = thread.get()
3561
3562        :param async_req bool
3563        :param str namespace: object name and auth scope, such as for teams and
3564        projects (required)
3565        :param str pretty: If 'true', then the output is pretty printed.
3566        :param str _continue: The continue option should be set when retrieving
3567        more results from the server. Since this value is server defined,
3568        clients may only use the continue value from a previous query result
3569        with identical query parameters (except for the value of continue) and
3570        the server may reject a continue value it does not recognize. If the
3571        specified continue value is no longer valid whether due to expiration
3572        (generally five to fifteen minutes) or a configuration change on the
3573        server, the server will respond with a 410 ResourceExpired error
3574        together with a continue token. If the client needs a consistent list,
3575        it must restart their list without the continue field. Otherwise, the
3576        client may send another list request with the token received with the
3577        410 error, the server will respond with a list starting from the next
3578        key, but from the latest snapshot, which is inconsistent from the
3579        previous list results - objects that are created, modified, or deleted
3580        after the first list request will be included in the response, as long
3581        as their keys are after the \"next key\".  This field is not supported
3582        when watch is true. Clients may start a watch from the last
3583        resourceVersion value returned by the server and not miss any
3584        modifications.
3585        :param str field_selector: A selector to restrict the list of returned
3586        objects by their fields. Defaults to everything.
3587        :param str label_selector: A selector to restrict the list of returned
3588        objects by their labels. Defaults to everything.
3589        :param int limit: limit is a maximum number of responses to return for a
3590        list call. If more items exist, the server will set the `continue` field
3591        on the list metadata to a value that can be used with the same initial
3592        query to retrieve the next set of results. Setting a limit may return
3593        fewer than the requested amount of items (up to zero items) in the event
3594        all requested objects are filtered out and clients should only use the
3595        presence of the continue field to determine whether more results are
3596        available. Servers may choose not to support the limit argument and will
3597        return all of the available results. If limit is specified and the
3598        continue field is empty, clients may assume that no more results are
3599        available. This field is not supported if watch is true.  The server
3600        guarantees that the objects returned when using continue will be
3601        identical to issuing a single list call without a limit - that is, no
3602        objects created, modified, or deleted after the first request is issued
3603        will be included in any subsequent continued requests. This is sometimes
3604        referred to as a consistent snapshot, and ensures that a client that is
3605        using limit to receive smaller chunks of a very large result can ensure
3606        they see all possible objects. If objects are updated during a chunked
3607        list the version of the object that was present at the time the first
3608        list result was calculated is returned.
3609        :param str resource_version: When specified with a watch call, shows
3610        changes that occur after that particular version of a resource. Defaults
3611        to changes from the beginning of history. When specified for list: - if
3612        unset, then the result is returned from remote storage based on
3613        quorum-read flag; - if it's 0, then we simply return what we currently
3614        have in cache, no guarantee; - if set to non zero, then the result is at
3615        least as fresh as given rv.
3616        :param int timeout_seconds: Timeout for the list/watch call. This limits
3617        the duration of the call, regardless of any activity or inactivity.
3618        :param bool watch: Watch for changes to the described resources and
3619        return them as a stream of add, update, and remove notifications.
3620        Specify resourceVersion.
3621        :return: V1beta2ControllerRevisionList
3622                 If the method is called asynchronously,
3623                 returns the request thread.
3624        """
3625    kwargs['_return_http_data_only'] = True
3626    if kwargs.get('async_req'):
3627      return self.list_namespaced_controller_revision_with_http_info(
3628          namespace, **kwargs)
3629    else:
3630      (data) = self.list_namespaced_controller_revision_with_http_info(
3631          namespace, **kwargs)
3632      return data
3633
3634  def list_namespaced_controller_revision_with_http_info(
3635      self, namespace, **kwargs):
3636    """
3637        list or watch objects of kind ControllerRevision
3638        This method makes a synchronous HTTP request by default. To make an
3639        asynchronous HTTP request, please pass async_req=True
3640        >>> thread =
3641        api.list_namespaced_controller_revision_with_http_info(namespace,
3642        async_req=True)
3643        >>> result = thread.get()
3644
3645        :param async_req bool
3646        :param str namespace: object name and auth scope, such as for teams and
3647        projects (required)
3648        :param str pretty: If 'true', then the output is pretty printed.
3649        :param str _continue: The continue option should be set when retrieving
3650        more results from the server. Since this value is server defined,
3651        clients may only use the continue value from a previous query result
3652        with identical query parameters (except for the value of continue) and
3653        the server may reject a continue value it does not recognize. If the
3654        specified continue value is no longer valid whether due to expiration
3655        (generally five to fifteen minutes) or a configuration change on the
3656        server, the server will respond with a 410 ResourceExpired error
3657        together with a continue token. If the client needs a consistent list,
3658        it must restart their list without the continue field. Otherwise, the
3659        client may send another list request with the token received with the
3660        410 error, the server will respond with a list starting from the next
3661        key, but from the latest snapshot, which is inconsistent from the
3662        previous list results - objects that are created, modified, or deleted
3663        after the first list request will be included in the response, as long
3664        as their keys are after the \"next key\".  This field is not supported
3665        when watch is true. Clients may start a watch from the last
3666        resourceVersion value returned by the server and not miss any
3667        modifications.
3668        :param str field_selector: A selector to restrict the list of returned
3669        objects by their fields. Defaults to everything.
3670        :param str label_selector: A selector to restrict the list of returned
3671        objects by their labels. Defaults to everything.
3672        :param int limit: limit is a maximum number of responses to return for a
3673        list call. If more items exist, the server will set the `continue` field
3674        on the list metadata to a value that can be used with the same initial
3675        query to retrieve the next set of results. Setting a limit may return
3676        fewer than the requested amount of items (up to zero items) in the event
3677        all requested objects are filtered out and clients should only use the
3678        presence of the continue field to determine whether more results are
3679        available. Servers may choose not to support the limit argument and will
3680        return all of the available results. If limit is specified and the
3681        continue field is empty, clients may assume that no more results are
3682        available. This field is not supported if watch is true.  The server
3683        guarantees that the objects returned when using continue will be
3684        identical to issuing a single list call without a limit - that is, no
3685        objects created, modified, or deleted after the first request is issued
3686        will be included in any subsequent continued requests. This is sometimes
3687        referred to as a consistent snapshot, and ensures that a client that is
3688        using limit to receive smaller chunks of a very large result can ensure
3689        they see all possible objects. If objects are updated during a chunked
3690        list the version of the object that was present at the time the first
3691        list result was calculated is returned.
3692        :param str resource_version: When specified with a watch call, shows
3693        changes that occur after that particular version of a resource. Defaults
3694        to changes from the beginning of history. When specified for list: - if
3695        unset, then the result is returned from remote storage based on
3696        quorum-read flag; - if it's 0, then we simply return what we currently
3697        have in cache, no guarantee; - if set to non zero, then the result is at
3698        least as fresh as given rv.
3699        :param int timeout_seconds: Timeout for the list/watch call. This limits
3700        the duration of the call, regardless of any activity or inactivity.
3701        :param bool watch: Watch for changes to the described resources and
3702        return them as a stream of add, update, and remove notifications.
3703        Specify resourceVersion.
3704        :return: V1beta2ControllerRevisionList
3705                 If the method is called asynchronously,
3706                 returns the request thread.
3707        """
3708
3709    all_params = [
3710        'namespace', 'pretty', '_continue', 'field_selector', 'label_selector',
3711        'limit', 'resource_version', 'timeout_seconds', 'watch'
3712    ]
3713    all_params.append('async_req')
3714    all_params.append('_return_http_data_only')
3715    all_params.append('_preload_content')
3716    all_params.append('_request_timeout')
3717
3718    params = locals()
3719    for key, val in iteritems(params['kwargs']):
3720      if key not in all_params:
3721        raise TypeError("Got an unexpected keyword argument '%s'"
3722                        ' to method list_namespaced_controller_revision' % key)
3723      params[key] = val
3724    del params['kwargs']
3725    # verify the required parameter 'namespace' is set
3726    if ('namespace' not in params) or (params['namespace'] is None):
3727      raise ValueError(
3728          'Missing the required parameter `namespace` when calling `list_namespaced_controller_revision`'
3729      )
3730
3731    collection_formats = {}
3732
3733    path_params = {}
3734    if 'namespace' in params:
3735      path_params['namespace'] = params['namespace']
3736
3737    query_params = []
3738    if 'pretty' in params:
3739      query_params.append(('pretty', params['pretty']))
3740    if '_continue' in params:
3741      query_params.append(('continue', params['_continue']))
3742    if 'field_selector' in params:
3743      query_params.append(('fieldSelector', params['field_selector']))
3744    if 'label_selector' in params:
3745      query_params.append(('labelSelector', params['label_selector']))
3746    if 'limit' in params:
3747      query_params.append(('limit', params['limit']))
3748    if 'resource_version' in params:
3749      query_params.append(('resourceVersion', params['resource_version']))
3750    if 'timeout_seconds' in params:
3751      query_params.append(('timeoutSeconds', params['timeout_seconds']))
3752    if 'watch' in params:
3753      query_params.append(('watch', params['watch']))
3754
3755    header_params = {}
3756
3757    form_params = []
3758    local_var_files = {}
3759
3760    body_params = None
3761    # HTTP header `Accept`
3762    header_params['Accept'] = self.api_client.\
3763        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'])
3764
3765    # HTTP header `Content-Type`
3766    header_params['Content-Type'] = self.api_client.\
3767        select_header_content_type(['*/*'])
3768
3769    # Authentication setting
3770    auth_settings = ['BearerToken']
3771
3772    return self.api_client.call_api(
3773        '/apis/apps/v1beta2/namespaces/{namespace}/controllerrevisions',
3774        'GET',
3775        path_params,
3776        query_params,
3777        header_params,
3778        body=body_params,
3779        post_params=form_params,
3780        files=local_var_files,
3781        response_type='V1beta2ControllerRevisionList',
3782        auth_settings=auth_settings,
3783        async_req=params.get('async_req'),
3784        _return_http_data_only=params.get('_return_http_data_only'),
3785        _preload_content=params.get('_preload_content', True),
3786        _request_timeout=params.get('_request_timeout'),
3787        collection_formats=collection_formats)
3788
3789  def list_namespaced_daemon_set(self, namespace, **kwargs):
3790    """
3791        list or watch objects of kind DaemonSet
3792        This method makes a synchronous HTTP request by default. To make an
3793        asynchronous HTTP request, please pass async_req=True
3794        >>> thread = api.list_namespaced_daemon_set(namespace, async_req=True)
3795        >>> result = thread.get()
3796
3797        :param async_req bool
3798        :param str namespace: object name and auth scope, such as for teams and
3799        projects (required)
3800        :param str pretty: If 'true', then the output is pretty printed.
3801        :param str _continue: The continue option should be set when retrieving
3802        more results from the server. Since this value is server defined,
3803        clients may only use the continue value from a previous query result
3804        with identical query parameters (except for the value of continue) and
3805        the server may reject a continue value it does not recognize. If the
3806        specified continue value is no longer valid whether due to expiration
3807        (generally five to fifteen minutes) or a configuration change on the
3808        server, the server will respond with a 410 ResourceExpired error
3809        together with a continue token. If the client needs a consistent list,
3810        it must restart their list without the continue field. Otherwise, the
3811        client may send another list request with the token received with the
3812        410 error, the server will respond with a list starting from the next
3813        key, but from the latest snapshot, which is inconsistent from the
3814        previous list results - objects that are created, modified, or deleted
3815        after the first list request will be included in the response, as long
3816        as their keys are after the \"next key\".  This field is not supported
3817        when watch is true. Clients may start a watch from the last
3818        resourceVersion value returned by the server and not miss any
3819        modifications.
3820        :param str field_selector: A selector to restrict the list of returned
3821        objects by their fields. Defaults to everything.
3822        :param str label_selector: A selector to restrict the list of returned
3823        objects by their labels. Defaults to everything.
3824        :param int limit: limit is a maximum number of responses to return for a
3825        list call. If more items exist, the server will set the `continue` field
3826        on the list metadata to a value that can be used with the same initial
3827        query to retrieve the next set of results. Setting a limit may return
3828        fewer than the requested amount of items (up to zero items) in the event
3829        all requested objects are filtered out and clients should only use the
3830        presence of the continue field to determine whether more results are
3831        available. Servers may choose not to support the limit argument and will
3832        return all of the available results. If limit is specified and the
3833        continue field is empty, clients may assume that no more results are
3834        available. This field is not supported if watch is true.  The server
3835        guarantees that the objects returned when using continue will be
3836        identical to issuing a single list call without a limit - that is, no
3837        objects created, modified, or deleted after the first request is issued
3838        will be included in any subsequent continued requests. This is sometimes
3839        referred to as a consistent snapshot, and ensures that a client that is
3840        using limit to receive smaller chunks of a very large result can ensure
3841        they see all possible objects. If objects are updated during a chunked
3842        list the version of the object that was present at the time the first
3843        list result was calculated is returned.
3844        :param str resource_version: When specified with a watch call, shows
3845        changes that occur after that particular version of a resource. Defaults
3846        to changes from the beginning of history. When specified for list: - if
3847        unset, then the result is returned from remote storage based on
3848        quorum-read flag; - if it's 0, then we simply return what we currently
3849        have in cache, no guarantee; - if set to non zero, then the result is at
3850        least as fresh as given rv.
3851        :param int timeout_seconds: Timeout for the list/watch call. This limits
3852        the duration of the call, regardless of any activity or inactivity.
3853        :param bool watch: Watch for changes to the described resources and
3854        return them as a stream of add, update, and remove notifications.
3855        Specify resourceVersion.
3856        :return: V1beta2DaemonSetList
3857                 If the method is called asynchronously,
3858                 returns the request thread.
3859        """
3860    kwargs['_return_http_data_only'] = True
3861    if kwargs.get('async_req'):
3862      return self.list_namespaced_daemon_set_with_http_info(namespace, **kwargs)
3863    else:
3864      (data) = self.list_namespaced_daemon_set_with_http_info(
3865          namespace, **kwargs)
3866      return data
3867
3868  def list_namespaced_daemon_set_with_http_info(self, namespace, **kwargs):
3869    """
3870        list or watch objects of kind DaemonSet
3871        This method makes a synchronous HTTP request by default. To make an
3872        asynchronous HTTP request, please pass async_req=True
3873        >>> thread = api.list_namespaced_daemon_set_with_http_info(namespace,
3874        async_req=True)
3875        >>> result = thread.get()
3876
3877        :param async_req bool
3878        :param str namespace: object name and auth scope, such as for teams and
3879        projects (required)
3880        :param str pretty: If 'true', then the output is pretty printed.
3881        :param str _continue: The continue option should be set when retrieving
3882        more results from the server. Since this value is server defined,
3883        clients may only use the continue value from a previous query result
3884        with identical query parameters (except for the value of continue) and
3885        the server may reject a continue value it does not recognize. If the
3886        specified continue value is no longer valid whether due to expiration
3887        (generally five to fifteen minutes) or a configuration change on the
3888        server, the server will respond with a 410 ResourceExpired error
3889        together with a continue token. If the client needs a consistent list,
3890        it must restart their list without the continue field. Otherwise, the
3891        client may send another list request with the token received with the
3892        410 error, the server will respond with a list starting from the next
3893        key, but from the latest snapshot, which is inconsistent from the
3894        previous list results - objects that are created, modified, or deleted
3895        after the first list request will be included in the response, as long
3896        as their keys are after the \"next key\".  This field is not supported
3897        when watch is true. Clients may start a watch from the last
3898        resourceVersion value returned by the server and not miss any
3899        modifications.
3900        :param str field_selector: A selector to restrict the list of returned
3901        objects by their fields. Defaults to everything.
3902        :param str label_selector: A selector to restrict the list of returned
3903        objects by their labels. Defaults to everything.
3904        :param int limit: limit is a maximum number of responses to return for a
3905        list call. If more items exist, the server will set the `continue` field
3906        on the list metadata to a value that can be used with the same initial
3907        query to retrieve the next set of results. Setting a limit may return
3908        fewer than the requested amount of items (up to zero items) in the event
3909        all requested objects are filtered out and clients should only use the
3910        presence of the continue field to determine whether more results are
3911        available. Servers may choose not to support the limit argument and will
3912        return all of the available results. If limit is specified and the
3913        continue field is empty, clients may assume that no more results are
3914        available. This field is not supported if watch is true.  The server
3915        guarantees that the objects returned when using continue will be
3916        identical to issuing a single list call without a limit - that is, no
3917        objects created, modified, or deleted after the first request is issued
3918        will be included in any subsequent continued requests. This is sometimes
3919        referred to as a consistent snapshot, and ensures that a client that is
3920        using limit to receive smaller chunks of a very large result can ensure
3921        they see all possible objects. If objects are updated during a chunked
3922        list the version of the object that was present at the time the first
3923        list result was calculated is returned.
3924        :param str resource_version: When specified with a watch call, shows
3925        changes that occur after that particular version of a resource. Defaults
3926        to changes from the beginning of history. When specified for list: - if
3927        unset, then the result is returned from remote storage based on
3928        quorum-read flag; - if it's 0, then we simply return what we currently
3929        have in cache, no guarantee; - if set to non zero, then the result is at
3930        least as fresh as given rv.
3931        :param int timeout_seconds: Timeout for the list/watch call. This limits
3932        the duration of the call, regardless of any activity or inactivity.
3933        :param bool watch: Watch for changes to the described resources and
3934        return them as a stream of add, update, and remove notifications.
3935        Specify resourceVersion.
3936        :return: V1beta2DaemonSetList
3937                 If the method is called asynchronously,
3938                 returns the request thread.
3939        """
3940
3941    all_params = [
3942        'namespace', 'pretty', '_continue', 'field_selector', 'label_selector',
3943        'limit', 'resource_version', 'timeout_seconds', 'watch'
3944    ]
3945    all_params.append('async_req')
3946    all_params.append('_return_http_data_only')
3947    all_params.append('_preload_content')
3948    all_params.append('_request_timeout')
3949
3950    params = locals()
3951    for key, val in iteritems(params['kwargs']):
3952      if key not in all_params:
3953        raise TypeError("Got an unexpected keyword argument '%s'"
3954                        ' to method list_namespaced_daemon_set' % key)
3955      params[key] = val
3956    del params['kwargs']
3957    # verify the required parameter 'namespace' is set
3958    if ('namespace' not in params) or (params['namespace'] is None):
3959      raise ValueError(
3960          'Missing the required parameter `namespace` when calling `list_namespaced_daemon_set`'
3961      )
3962
3963    collection_formats = {}
3964
3965    path_params = {}
3966    if 'namespace' in params:
3967      path_params['namespace'] = params['namespace']
3968
3969    query_params = []
3970    if 'pretty' in params:
3971      query_params.append(('pretty', params['pretty']))
3972    if '_continue' in params:
3973      query_params.append(('continue', params['_continue']))
3974    if 'field_selector' in params:
3975      query_params.append(('fieldSelector', params['field_selector']))
3976    if 'label_selector' in params:
3977      query_params.append(('labelSelector', params['label_selector']))
3978    if 'limit' in params:
3979      query_params.append(('limit', params['limit']))
3980    if 'resource_version' in params:
3981      query_params.append(('resourceVersion', params['resource_version']))
3982    if 'timeout_seconds' in params:
3983      query_params.append(('timeoutSeconds', params['timeout_seconds']))
3984    if 'watch' in params:
3985      query_params.append(('watch', params['watch']))
3986
3987    header_params = {}
3988
3989    form_params = []
3990    local_var_files = {}
3991
3992    body_params = None
3993    # HTTP header `Accept`
3994    header_params['Accept'] = self.api_client.\
3995        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'])
3996
3997    # HTTP header `Content-Type`
3998    header_params['Content-Type'] = self.api_client.\
3999        select_header_content_type(['*/*'])
4000
4001    # Authentication setting
4002    auth_settings = ['BearerToken']
4003
4004    return self.api_client.call_api(
4005        '/apis/apps/v1beta2/namespaces/{namespace}/daemonsets',
4006        'GET',
4007        path_params,
4008        query_params,
4009        header_params,
4010        body=body_params,
4011        post_params=form_params,
4012        files=local_var_files,
4013        response_type='V1beta2DaemonSetList',
4014        auth_settings=auth_settings,
4015        async_req=params.get('async_req'),
4016        _return_http_data_only=params.get('_return_http_data_only'),
4017        _preload_content=params.get('_preload_content', True),
4018        _request_timeout=params.get('_request_timeout'),
4019        collection_formats=collection_formats)
4020
4021  def list_namespaced_deployment(self, namespace, **kwargs):
4022    """
4023        list or watch objects of kind Deployment
4024        This method makes a synchronous HTTP request by default. To make an
4025        asynchronous HTTP request, please pass async_req=True
4026        >>> thread = api.list_namespaced_deployment(namespace, async_req=True)
4027        >>> result = thread.get()
4028
4029        :param async_req bool
4030        :param str namespace: object name and auth scope, such as for teams and
4031        projects (required)
4032        :param str pretty: If 'true', then the output is pretty printed.
4033        :param str _continue: The continue option should be set when retrieving
4034        more results from the server. Since this value is server defined,
4035        clients may only use the continue value from a previous query result
4036        with identical query parameters (except for the value of continue) and
4037        the server may reject a continue value it does not recognize. If the
4038        specified continue value is no longer valid whether due to expiration
4039        (generally five to fifteen minutes) or a configuration change on the
4040        server, the server will respond with a 410 ResourceExpired error
4041        together with a continue token. If the client needs a consistent list,
4042        it must restart their list without the continue field. Otherwise, the
4043        client may send another list request with the token received with the
4044        410 error, the server will respond with a list starting from the next
4045        key, but from the latest snapshot, which is inconsistent from the
4046        previous list results - objects that are created, modified, or deleted
4047        after the first list request will be included in the response, as long
4048        as their keys are after the \"next key\".  This field is not supported
4049        when watch is true. Clients may start a watch from the last
4050        resourceVersion value returned by the server and not miss any
4051        modifications.
4052        :param str field_selector: A selector to restrict the list of returned
4053        objects by their fields. Defaults to everything.
4054        :param str label_selector: A selector to restrict the list of returned
4055        objects by their labels. Defaults to everything.
4056        :param int limit: limit is a maximum number of responses to return for a
4057        list call. If more items exist, the server will set the `continue` field
4058        on the list metadata to a value that can be used with the same initial
4059        query to retrieve the next set of results. Setting a limit may return
4060        fewer than the requested amount of items (up to zero items) in the event
4061        all requested objects are filtered out and clients should only use the
4062        presence of the continue field to determine whether more results are
4063        available. Servers may choose not to support the limit argument and will
4064        return all of the available results. If limit is specified and the
4065        continue field is empty, clients may assume that no more results are
4066        available. This field is not supported if watch is true.  The server
4067        guarantees that the objects returned when using continue will be
4068        identical to issuing a single list call without a limit - that is, no
4069        objects created, modified, or deleted after the first request is issued
4070        will be included in any subsequent continued requests. This is sometimes
4071        referred to as a consistent snapshot, and ensures that a client that is
4072        using limit to receive smaller chunks of a very large result can ensure
4073        they see all possible objects. If objects are updated during a chunked
4074        list the version of the object that was present at the time the first
4075        list result was calculated is returned.
4076        :param str resource_version: When specified with a watch call, shows
4077        changes that occur after that particular version of a resource. Defaults
4078        to changes from the beginning of history. When specified for list: - if
4079        unset, then the result is returned from remote storage based on
4080        quorum-read flag; - if it's 0, then we simply return what we currently
4081        have in cache, no guarantee; - if set to non zero, then the result is at
4082        least as fresh as given rv.
4083        :param int timeout_seconds: Timeout for the list/watch call. This limits
4084        the duration of the call, regardless of any activity or inactivity.
4085        :param bool watch: Watch for changes to the described resources and
4086        return them as a stream of add, update, and remove notifications.
4087        Specify resourceVersion.
4088        :return: V1beta2DeploymentList
4089                 If the method is called asynchronously,
4090                 returns the request thread.
4091        """
4092    kwargs['_return_http_data_only'] = True
4093    if kwargs.get('async_req'):
4094      return self.list_namespaced_deployment_with_http_info(namespace, **kwargs)
4095    else:
4096      (data) = self.list_namespaced_deployment_with_http_info(
4097          namespace, **kwargs)
4098      return data
4099
4100  def list_namespaced_deployment_with_http_info(self, namespace, **kwargs):
4101    """
4102        list or watch objects of kind Deployment
4103        This method makes a synchronous HTTP request by default. To make an
4104        asynchronous HTTP request, please pass async_req=True
4105        >>> thread = api.list_namespaced_deployment_with_http_info(namespace,
4106        async_req=True)
4107        >>> result = thread.get()
4108
4109        :param async_req bool
4110        :param str namespace: object name and auth scope, such as for teams and
4111        projects (required)
4112        :param str pretty: If 'true', then the output is pretty printed.
4113        :param str _continue: The continue option should be set when retrieving
4114        more results from the server. Since this value is server defined,
4115        clients may only use the continue value from a previous query result
4116        with identical query parameters (except for the value of continue) and
4117        the server may reject a continue value it does not recognize. If the
4118        specified continue value is no longer valid whether due to expiration
4119        (generally five to fifteen minutes) or a configuration change on the
4120        server, the server will respond with a 410 ResourceExpired error
4121        together with a continue token. If the client needs a consistent list,
4122        it must restart their list without the continue field. Otherwise, the
4123        client may send another list request with the token received with the
4124        410 error, the server will respond with a list starting from the next
4125        key, but from the latest snapshot, which is inconsistent from the
4126        previous list results - objects that are created, modified, or deleted
4127        after the first list request will be included in the response, as long
4128        as their keys are after the \"next key\".  This field is not supported
4129        when watch is true. Clients may start a watch from the last
4130        resourceVersion value returned by the server and not miss any
4131        modifications.
4132        :param str field_selector: A selector to restrict the list of returned
4133        objects by their fields. Defaults to everything.
4134        :param str label_selector: A selector to restrict the list of returned
4135        objects by their labels. Defaults to everything.
4136        :param int limit: limit is a maximum number of responses to return for a
4137        list call. If more items exist, the server will set the `continue` field
4138        on the list metadata to a value that can be used with the same initial
4139        query to retrieve the next set of results. Setting a limit may return
4140        fewer than the requested amount of items (up to zero items) in the event
4141        all requested objects are filtered out and clients should only use the
4142        presence of the continue field to determine whether more results are
4143        available. Servers may choose not to support the limit argument and will
4144        return all of the available results. If limit is specified and the
4145        continue field is empty, clients may assume that no more results are
4146        available. This field is not supported if watch is true.  The server
4147        guarantees that the objects returned when using continue will be
4148        identical to issuing a single list call without a limit - that is, no
4149        objects created, modified, or deleted after the first request is issued
4150        will be included in any subsequent continued requests. This is sometimes
4151        referred to as a consistent snapshot, and ensures that a client that is
4152        using limit to receive smaller chunks of a very large result can ensure
4153        they see all possible objects. If objects are updated during a chunked
4154        list the version of the object that was present at the time the first
4155        list result was calculated is returned.
4156        :param str resource_version: When specified with a watch call, shows
4157        changes that occur after that particular version of a resource. Defaults
4158        to changes from the beginning of history. When specified for list: - if
4159        unset, then the result is returned from remote storage based on
4160        quorum-read flag; - if it's 0, then we simply return what we currently
4161        have in cache, no guarantee; - if set to non zero, then the result is at
4162        least as fresh as given rv.
4163        :param int timeout_seconds: Timeout for the list/watch call. This limits
4164        the duration of the call, regardless of any activity or inactivity.
4165        :param bool watch: Watch for changes to the described resources and
4166        return them as a stream of add, update, and remove notifications.
4167        Specify resourceVersion.
4168        :return: V1beta2DeploymentList
4169                 If the method is called asynchronously,
4170                 returns the request thread.
4171        """
4172
4173    all_params = [
4174        'namespace', 'pretty', '_continue', 'field_selector', 'label_selector',
4175        'limit', 'resource_version', 'timeout_seconds', 'watch'
4176    ]
4177    all_params.append('async_req')
4178    all_params.append('_return_http_data_only')
4179    all_params.append('_preload_content')
4180    all_params.append('_request_timeout')
4181
4182    params = locals()
4183    for key, val in iteritems(params['kwargs']):
4184      if key not in all_params:
4185        raise TypeError("Got an unexpected keyword argument '%s'"
4186                        ' to method list_namespaced_deployment' % key)
4187      params[key] = val
4188    del params['kwargs']
4189    # verify the required parameter 'namespace' is set
4190    if ('namespace' not in params) or (params['namespace'] is None):
4191      raise ValueError(
4192          'Missing the required parameter `namespace` when calling `list_namespaced_deployment`'
4193      )
4194
4195    collection_formats = {}
4196
4197    path_params = {}
4198    if 'namespace' in params:
4199      path_params['namespace'] = params['namespace']
4200
4201    query_params = []
4202    if 'pretty' in params:
4203      query_params.append(('pretty', params['pretty']))
4204    if '_continue' in params:
4205      query_params.append(('continue', params['_continue']))
4206    if 'field_selector' in params:
4207      query_params.append(('fieldSelector', params['field_selector']))
4208    if 'label_selector' in params:
4209      query_params.append(('labelSelector', params['label_selector']))
4210    if 'limit' in params:
4211      query_params.append(('limit', params['limit']))
4212    if 'resource_version' in params:
4213      query_params.append(('resourceVersion', params['resource_version']))
4214    if 'timeout_seconds' in params:
4215      query_params.append(('timeoutSeconds', params['timeout_seconds']))
4216    if 'watch' in params:
4217      query_params.append(('watch', params['watch']))
4218
4219    header_params = {}
4220
4221    form_params = []
4222    local_var_files = {}
4223
4224    body_params = None
4225    # HTTP header `Accept`
4226    header_params['Accept'] = self.api_client.\
4227        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'])
4228
4229    # HTTP header `Content-Type`
4230    header_params['Content-Type'] = self.api_client.\
4231        select_header_content_type(['*/*'])
4232
4233    # Authentication setting
4234    auth_settings = ['BearerToken']
4235
4236    return self.api_client.call_api(
4237        '/apis/apps/v1beta2/namespaces/{namespace}/deployments',
4238        'GET',
4239        path_params,
4240        query_params,
4241        header_params,
4242        body=body_params,
4243        post_params=form_params,
4244        files=local_var_files,
4245        response_type='V1beta2DeploymentList',
4246        auth_settings=auth_settings,
4247        async_req=params.get('async_req'),
4248        _return_http_data_only=params.get('_return_http_data_only'),
4249        _preload_content=params.get('_preload_content', True),
4250        _request_timeout=params.get('_request_timeout'),
4251        collection_formats=collection_formats)
4252
4253  def list_namespaced_replica_set(self, namespace, **kwargs):
4254    """
4255        list or watch objects of kind ReplicaSet
4256        This method makes a synchronous HTTP request by default. To make an
4257        asynchronous HTTP request, please pass async_req=True
4258        >>> thread = api.list_namespaced_replica_set(namespace, async_req=True)
4259        >>> result = thread.get()
4260
4261        :param async_req bool
4262        :param str namespace: object name and auth scope, such as for teams and
4263        projects (required)
4264        :param str pretty: If 'true', then the output is pretty printed.
4265        :param str _continue: The continue option should be set when retrieving
4266        more results from the server. Since this value is server defined,
4267        clients may only use the continue value from a previous query result
4268        with identical query parameters (except for the value of continue) and
4269        the server may reject a continue value it does not recognize. If the
4270        specified continue value is no longer valid whether due to expiration
4271        (generally five to fifteen minutes) or a configuration change on the
4272        server, the server will respond with a 410 ResourceExpired error
4273        together with a continue token. If the client needs a consistent list,
4274        it must restart their list without the continue field. Otherwise, the
4275        client may send another list request with the token received with the
4276        410 error, the server will respond with a list starting from the next
4277        key, but from the latest snapshot, which is inconsistent from the
4278        previous list results - objects that are created, modified, or deleted
4279        after the first list request will be included in the response, as long
4280        as their keys are after the \"next key\".  This field is not supported
4281        when watch is true. Clients may start a watch from the last
4282        resourceVersion value returned by the server and not miss any
4283        modifications.
4284        :param str field_selector: A selector to restrict the list of returned
4285        objects by their fields. Defaults to everything.
4286        :param str label_selector: A selector to restrict the list of returned
4287        objects by their labels. Defaults to everything.
4288        :param int limit: limit is a maximum number of responses to return for a
4289        list call. If more items exist, the server will set the `continue` field
4290        on the list metadata to a value that can be used with the same initial
4291        query to retrieve the next set of results. Setting a limit may return
4292        fewer than the requested amount of items (up to zero items) in the event
4293        all requested objects are filtered out and clients should only use the
4294        presence of the continue field to determine whether more results are
4295        available. Servers may choose not to support the limit argument and will
4296        return all of the available results. If limit is specified and the
4297        continue field is empty, clients may assume that no more results are
4298        available. This field is not supported if watch is true.  The server
4299        guarantees that the objects returned when using continue will be
4300        identical to issuing a single list call without a limit - that is, no
4301        objects created, modified, or deleted after the first request is issued
4302        will be included in any subsequent continued requests. This is sometimes
4303        referred to as a consistent snapshot, and ensures that a client that is
4304        using limit to receive smaller chunks of a very large result can ensure
4305        they see all possible objects. If objects are updated during a chunked
4306        list the version of the object that was present at the time the first
4307        list result was calculated is returned.
4308        :param str resource_version: When specified with a watch call, shows
4309        changes that occur after that particular version of a resource. Defaults
4310        to changes from the beginning of history. When specified for list: - if
4311        unset, then the result is returned from remote storage based on
4312        quorum-read flag; - if it's 0, then we simply return what we currently
4313        have in cache, no guarantee; - if set to non zero, then the result is at
4314        least as fresh as given rv.
4315        :param int timeout_seconds: Timeout for the list/watch call. This limits
4316        the duration of the call, regardless of any activity or inactivity.
4317        :param bool watch: Watch for changes to the described resources and
4318        return them as a stream of add, update, and remove notifications.
4319        Specify resourceVersion.
4320        :return: V1beta2ReplicaSetList
4321                 If the method is called asynchronously,
4322                 returns the request thread.
4323        """
4324    kwargs['_return_http_data_only'] = True
4325    if kwargs.get('async_req'):
4326      return self.list_namespaced_replica_set_with_http_info(
4327          namespace, **kwargs)
4328    else:
4329      (data) = self.list_namespaced_replica_set_with_http_info(
4330          namespace, **kwargs)
4331      return data
4332
4333  def list_namespaced_replica_set_with_http_info(self, namespace, **kwargs):
4334    """
4335        list or watch objects of kind ReplicaSet
4336        This method makes a synchronous HTTP request by default. To make an
4337        asynchronous HTTP request, please pass async_req=True
4338        >>> thread = api.list_namespaced_replica_set_with_http_info(namespace,
4339        async_req=True)
4340        >>> result = thread.get()
4341
4342        :param async_req bool
4343        :param str namespace: object name and auth scope, such as for teams and
4344        projects (required)
4345        :param str pretty: If 'true', then the output is pretty printed.
4346        :param str _continue: The continue option should be set when retrieving
4347        more results from the server. Since this value is server defined,
4348        clients may only use the continue value from a previous query result
4349        with identical query parameters (except for the value of continue) and
4350        the server may reject a continue value it does not recognize. If the
4351        specified continue value is no longer valid whether due to expiration
4352        (generally five to fifteen minutes) or a configuration change on the
4353        server, the server will respond with a 410 ResourceExpired error
4354        together with a continue token. If the client needs a consistent list,
4355        it must restart their list without the continue field. Otherwise, the
4356        client may send another list request with the token received with the
4357        410 error, the server will respond with a list starting from the next
4358        key, but from the latest snapshot, which is inconsistent from the
4359        previous list results - objects that are created, modified, or deleted
4360        after the first list request will be included in the response, as long
4361        as their keys are after the \"next key\".  This field is not supported
4362        when watch is true. Clients may start a watch from the last
4363        resourceVersion value returned by the server and not miss any
4364        modifications.
4365        :param str field_selector: A selector to restrict the list of returned
4366        objects by their fields. Defaults to everything.
4367        :param str label_selector: A selector to restrict the list of returned
4368        objects by their labels. Defaults to everything.
4369        :param int limit: limit is a maximum number of responses to return for a
4370        list call. If more items exist, the server will set the `continue` field
4371        on the list metadata to a value that can be used with the same initial
4372        query to retrieve the next set of results. Setting a limit may return
4373        fewer than the requested amount of items (up to zero items) in the event
4374        all requested objects are filtered out and clients should only use the
4375        presence of the continue field to determine whether more results are
4376        available. Servers may choose not to support the limit argument and will
4377        return all of the available results. If limit is specified and the
4378        continue field is empty, clients may assume that no more results are
4379        available. This field is not supported if watch is true.  The server
4380        guarantees that the objects returned when using continue will be
4381        identical to issuing a single list call without a limit - that is, no
4382        objects created, modified, or deleted after the first request is issued
4383        will be included in any subsequent continued requests. This is sometimes
4384        referred to as a consistent snapshot, and ensures that a client that is
4385        using limit to receive smaller chunks of a very large result can ensure
4386        they see all possible objects. If objects are updated during a chunked
4387        list the version of the object that was present at the time the first
4388        list result was calculated is returned.
4389        :param str resource_version: When specified with a watch call, shows
4390        changes that occur after that particular version of a resource. Defaults
4391        to changes from the beginning of history. When specified for list: - if
4392        unset, then the result is returned from remote storage based on
4393        quorum-read flag; - if it's 0, then we simply return what we currently
4394        have in cache, no guarantee; - if set to non zero, then the result is at
4395        least as fresh as given rv.
4396        :param int timeout_seconds: Timeout for the list/watch call. This limits
4397        the duration of the call, regardless of any activity or inactivity.
4398        :param bool watch: Watch for changes to the described resources and
4399        return them as a stream of add, update, and remove notifications.
4400        Specify resourceVersion.
4401        :return: V1beta2ReplicaSetList
4402                 If the method is called asynchronously,
4403                 returns the request thread.
4404        """
4405
4406    all_params = [
4407        'namespace', 'pretty', '_continue', 'field_selector', 'label_selector',
4408        'limit', 'resource_version', 'timeout_seconds', 'watch'
4409    ]
4410    all_params.append('async_req')
4411    all_params.append('_return_http_data_only')
4412    all_params.append('_preload_content')
4413    all_params.append('_request_timeout')
4414
4415    params = locals()
4416    for key, val in iteritems(params['kwargs']):
4417      if key not in all_params:
4418        raise TypeError("Got an unexpected keyword argument '%s'"
4419                        ' to method list_namespaced_replica_set' % key)
4420      params[key] = val
4421    del params['kwargs']
4422    # verify the required parameter 'namespace' is set
4423    if ('namespace' not in params) or (params['namespace'] is None):
4424      raise ValueError(
4425          'Missing the required parameter `namespace` when calling `list_namespaced_replica_set`'
4426      )
4427
4428    collection_formats = {}
4429
4430    path_params = {}
4431    if 'namespace' in params:
4432      path_params['namespace'] = params['namespace']
4433
4434    query_params = []
4435    if 'pretty' in params:
4436      query_params.append(('pretty', params['pretty']))
4437    if '_continue' in params:
4438      query_params.append(('continue', params['_continue']))
4439    if 'field_selector' in params:
4440      query_params.append(('fieldSelector', params['field_selector']))
4441    if 'label_selector' in params:
4442      query_params.append(('labelSelector', params['label_selector']))
4443    if 'limit' in params:
4444      query_params.append(('limit', params['limit']))
4445    if 'resource_version' in params:
4446      query_params.append(('resourceVersion', params['resource_version']))
4447    if 'timeout_seconds' in params:
4448      query_params.append(('timeoutSeconds', params['timeout_seconds']))
4449    if 'watch' in params:
4450      query_params.append(('watch', params['watch']))
4451
4452    header_params = {}
4453
4454    form_params = []
4455    local_var_files = {}
4456
4457    body_params = None
4458    # HTTP header `Accept`
4459    header_params['Accept'] = self.api_client.\
4460        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'])
4461
4462    # HTTP header `Content-Type`
4463    header_params['Content-Type'] = self.api_client.\
4464        select_header_content_type(['*/*'])
4465
4466    # Authentication setting
4467    auth_settings = ['BearerToken']
4468
4469    return self.api_client.call_api(
4470        '/apis/apps/v1beta2/namespaces/{namespace}/replicasets',
4471        'GET',
4472        path_params,
4473        query_params,
4474        header_params,
4475        body=body_params,
4476        post_params=form_params,
4477        files=local_var_files,
4478        response_type='V1beta2ReplicaSetList',
4479        auth_settings=auth_settings,
4480        async_req=params.get('async_req'),
4481        _return_http_data_only=params.get('_return_http_data_only'),
4482        _preload_content=params.get('_preload_content', True),
4483        _request_timeout=params.get('_request_timeout'),
4484        collection_formats=collection_formats)
4485
4486  def list_namespaced_stateful_set(self, namespace, **kwargs):
4487    """
4488        list or watch objects of kind StatefulSet
4489        This method makes a synchronous HTTP request by default. To make an
4490        asynchronous HTTP request, please pass async_req=True
4491        >>> thread = api.list_namespaced_stateful_set(namespace, async_req=True)
4492        >>> result = thread.get()
4493
4494        :param async_req bool
4495        :param str namespace: object name and auth scope, such as for teams and
4496        projects (required)
4497        :param str pretty: If 'true', then the output is pretty printed.
4498        :param str _continue: The continue option should be set when retrieving
4499        more results from the server. Since this value is server defined,
4500        clients may only use the continue value from a previous query result
4501        with identical query parameters (except for the value of continue) and
4502        the server may reject a continue value it does not recognize. If the
4503        specified continue value is no longer valid whether due to expiration
4504        (generally five to fifteen minutes) or a configuration change on the
4505        server, the server will respond with a 410 ResourceExpired error
4506        together with a continue token. If the client needs a consistent list,
4507        it must restart their list without the continue field. Otherwise, the
4508        client may send another list request with the token received with the
4509        410 error, the server will respond with a list starting from the next
4510        key, but from the latest snapshot, which is inconsistent from the
4511        previous list results - objects that are created, modified, or deleted
4512        after the first list request will be included in the response, as long
4513        as their keys are after the \"next key\".  This field is not supported
4514        when watch is true. Clients may start a watch from the last
4515        resourceVersion value returned by the server and not miss any
4516        modifications.
4517        :param str field_selector: A selector to restrict the list of returned
4518        objects by their fields. Defaults to everything.
4519        :param str label_selector: A selector to restrict the list of returned
4520        objects by their labels. Defaults to everything.
4521        :param int limit: limit is a maximum number of responses to return for a
4522        list call. If more items exist, the server will set the `continue` field
4523        on the list metadata to a value that can be used with the same initial
4524        query to retrieve the next set of results. Setting a limit may return
4525        fewer than the requested amount of items (up to zero items) in the event
4526        all requested objects are filtered out and clients should only use the
4527        presence of the continue field to determine whether more results are
4528        available. Servers may choose not to support the limit argument and will
4529        return all of the available results. If limit is specified and the
4530        continue field is empty, clients may assume that no more results are
4531        available. This field is not supported if watch is true.  The server
4532        guarantees that the objects returned when using continue will be
4533        identical to issuing a single list call without a limit - that is, no
4534        objects created, modified, or deleted after the first request is issued
4535        will be included in any subsequent continued requests. This is sometimes
4536        referred to as a consistent snapshot, and ensures that a client that is
4537        using limit to receive smaller chunks of a very large result can ensure
4538        they see all possible objects. If objects are updated during a chunked
4539        list the version of the object that was present at the time the first
4540        list result was calculated is returned.
4541        :param str resource_version: When specified with a watch call, shows
4542        changes that occur after that particular version of a resource. Defaults
4543        to changes from the beginning of history. When specified for list: - if
4544        unset, then the result is returned from remote storage based on
4545        quorum-read flag; - if it's 0, then we simply return what we currently
4546        have in cache, no guarantee; - if set to non zero, then the result is at
4547        least as fresh as given rv.
4548        :param int timeout_seconds: Timeout for the list/watch call. This limits
4549        the duration of the call, regardless of any activity or inactivity.
4550        :param bool watch: Watch for changes to the described resources and
4551        return them as a stream of add, update, and remove notifications.
4552        Specify resourceVersion.
4553        :return: V1beta2StatefulSetList
4554                 If the method is called asynchronously,
4555                 returns the request thread.
4556        """
4557    kwargs['_return_http_data_only'] = True
4558    if kwargs.get('async_req'):
4559      return self.list_namespaced_stateful_set_with_http_info(
4560          namespace, **kwargs)
4561    else:
4562      (data) = self.list_namespaced_stateful_set_with_http_info(
4563          namespace, **kwargs)
4564      return data
4565
4566  def list_namespaced_stateful_set_with_http_info(self, namespace, **kwargs):
4567    """
4568        list or watch objects of kind StatefulSet
4569        This method makes a synchronous HTTP request by default. To make an
4570        asynchronous HTTP request, please pass async_req=True
4571        >>> thread = api.list_namespaced_stateful_set_with_http_info(namespace,
4572        async_req=True)
4573        >>> result = thread.get()
4574
4575        :param async_req bool
4576        :param str namespace: object name and auth scope, such as for teams and
4577        projects (required)
4578        :param str pretty: If 'true', then the output is pretty printed.
4579        :param str _continue: The continue option should be set when retrieving
4580        more results from the server. Since this value is server defined,
4581        clients may only use the continue value from a previous query result
4582        with identical query parameters (except for the value of continue) and
4583        the server may reject a continue value it does not recognize. If the
4584        specified continue value is no longer valid whether due to expiration
4585        (generally five to fifteen minutes) or a configuration change on the
4586        server, the server will respond with a 410 ResourceExpired error
4587        together with a continue token. If the client needs a consistent list,
4588        it must restart their list without the continue field. Otherwise, the
4589        client may send another list request with the token received with the
4590        410 error, the server will respond with a list starting from the next
4591        key, but from the latest snapshot, which is inconsistent from the
4592        previous list results - objects that are created, modified, or deleted
4593        after the first list request will be included in the response, as long
4594        as their keys are after the \"next key\".  This field is not supported
4595        when watch is true. Clients may start a watch from the last
4596        resourceVersion value returned by the server and not miss any
4597        modifications.
4598        :param str field_selector: A selector to restrict the list of returned
4599        objects by their fields. Defaults to everything.
4600        :param str label_selector: A selector to restrict the list of returned
4601        objects by their labels. Defaults to everything.
4602        :param int limit: limit is a maximum number of responses to return for a
4603        list call. If more items exist, the server will set the `continue` field
4604        on the list metadata to a value that can be used with the same initial
4605        query to retrieve the next set of results. Setting a limit may return
4606        fewer than the requested amount of items (up to zero items) in the event
4607        all requested objects are filtered out and clients should only use the
4608        presence of the continue field to determine whether more results are
4609        available. Servers may choose not to support the limit argument and will
4610        return all of the available results. If limit is specified and the
4611        continue field is empty, clients may assume that no more results are
4612        available. This field is not supported if watch is true.  The server
4613        guarantees that the objects returned when using continue will be
4614        identical to issuing a single list call without a limit - that is, no
4615        objects created, modified, or deleted after the first request is issued
4616        will be included in any subsequent continued requests. This is sometimes
4617        referred to as a consistent snapshot, and ensures that a client that is
4618        using limit to receive smaller chunks of a very large result can ensure
4619        they see all possible objects. If objects are updated during a chunked
4620        list the version of the object that was present at the time the first
4621        list result was calculated is returned.
4622        :param str resource_version: When specified with a watch call, shows
4623        changes that occur after that particular version of a resource. Defaults
4624        to changes from the beginning of history. When specified for list: - if
4625        unset, then the result is returned from remote storage based on
4626        quorum-read flag; - if it's 0, then we simply return what we currently
4627        have in cache, no guarantee; - if set to non zero, then the result is at
4628        least as fresh as given rv.
4629        :param int timeout_seconds: Timeout for the list/watch call. This limits
4630        the duration of the call, regardless of any activity or inactivity.
4631        :param bool watch: Watch for changes to the described resources and
4632        return them as a stream of add, update, and remove notifications.
4633        Specify resourceVersion.
4634        :return: V1beta2StatefulSetList
4635                 If the method is called asynchronously,
4636                 returns the request thread.
4637        """
4638
4639    all_params = [
4640        'namespace', 'pretty', '_continue', 'field_selector', 'label_selector',
4641        'limit', 'resource_version', 'timeout_seconds', 'watch'
4642    ]
4643    all_params.append('async_req')
4644    all_params.append('_return_http_data_only')
4645    all_params.append('_preload_content')
4646    all_params.append('_request_timeout')
4647
4648    params = locals()
4649    for key, val in iteritems(params['kwargs']):
4650      if key not in all_params:
4651        raise TypeError("Got an unexpected keyword argument '%s'"
4652                        ' to method list_namespaced_stateful_set' % key)
4653      params[key] = val
4654    del params['kwargs']
4655    # verify the required parameter 'namespace' is set
4656    if ('namespace' not in params) or (params['namespace'] is None):
4657      raise ValueError(
4658          'Missing the required parameter `namespace` when calling `list_namespaced_stateful_set`'
4659      )
4660
4661    collection_formats = {}
4662
4663    path_params = {}
4664    if 'namespace' in params:
4665      path_params['namespace'] = params['namespace']
4666
4667    query_params = []
4668    if 'pretty' in params:
4669      query_params.append(('pretty', params['pretty']))
4670    if '_continue' in params:
4671      query_params.append(('continue', params['_continue']))
4672    if 'field_selector' in params:
4673      query_params.append(('fieldSelector', params['field_selector']))
4674    if 'label_selector' in params:
4675      query_params.append(('labelSelector', params['label_selector']))
4676    if 'limit' in params:
4677      query_params.append(('limit', params['limit']))
4678    if 'resource_version' in params:
4679      query_params.append(('resourceVersion', params['resource_version']))
4680    if 'timeout_seconds' in params:
4681      query_params.append(('timeoutSeconds', params['timeout_seconds']))
4682    if 'watch' in params:
4683      query_params.append(('watch', params['watch']))
4684
4685    header_params = {}
4686
4687    form_params = []
4688    local_var_files = {}
4689
4690    body_params = None
4691    # HTTP header `Accept`
4692    header_params['Accept'] = self.api_client.\
4693        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'])
4694
4695    # HTTP header `Content-Type`
4696    header_params['Content-Type'] = self.api_client.\
4697        select_header_content_type(['*/*'])
4698
4699    # Authentication setting
4700    auth_settings = ['BearerToken']
4701
4702    return self.api_client.call_api(
4703        '/apis/apps/v1beta2/namespaces/{namespace}/statefulsets',
4704        'GET',
4705        path_params,
4706        query_params,
4707        header_params,
4708        body=body_params,
4709        post_params=form_params,
4710        files=local_var_files,
4711        response_type='V1beta2StatefulSetList',
4712        auth_settings=auth_settings,
4713        async_req=params.get('async_req'),
4714        _return_http_data_only=params.get('_return_http_data_only'),
4715        _preload_content=params.get('_preload_content', True),
4716        _request_timeout=params.get('_request_timeout'),
4717        collection_formats=collection_formats)
4718
4719  def list_replica_set_for_all_namespaces(self, **kwargs):
4720    """
4721        list or watch objects of kind ReplicaSet
4722        This method makes a synchronous HTTP request by default. To make an
4723        asynchronous HTTP request, please pass async_req=True
4724        >>> thread = api.list_replica_set_for_all_namespaces(async_req=True)
4725        >>> result = thread.get()
4726
4727        :param async_req bool
4728        :param str _continue: The continue option should be set when retrieving
4729        more results from the server. Since this value is server defined,
4730        clients may only use the continue value from a previous query result
4731        with identical query parameters (except for the value of continue) and
4732        the server may reject a continue value it does not recognize. If the
4733        specified continue value is no longer valid whether due to expiration
4734        (generally five to fifteen minutes) or a configuration change on the
4735        server, the server will respond with a 410 ResourceExpired error
4736        together with a continue token. If the client needs a consistent list,
4737        it must restart their list without the continue field. Otherwise, the
4738        client may send another list request with the token received with the
4739        410 error, the server will respond with a list starting from the next
4740        key, but from the latest snapshot, which is inconsistent from the
4741        previous list results - objects that are created, modified, or deleted
4742        after the first list request will be included in the response, as long
4743        as their keys are after the \"next key\".  This field is not supported
4744        when watch is true. Clients may start a watch from the last
4745        resourceVersion value returned by the server and not miss any
4746        modifications.
4747        :param str field_selector: A selector to restrict the list of returned
4748        objects by their fields. Defaults to everything.
4749        :param str label_selector: A selector to restrict the list of returned
4750        objects by their labels. Defaults to everything.
4751        :param int limit: limit is a maximum number of responses to return for a
4752        list call. If more items exist, the server will set the `continue` field
4753        on the list metadata to a value that can be used with the same initial
4754        query to retrieve the next set of results. Setting a limit may return
4755        fewer than the requested amount of items (up to zero items) in the event
4756        all requested objects are filtered out and clients should only use the
4757        presence of the continue field to determine whether more results are
4758        available. Servers may choose not to support the limit argument and will
4759        return all of the available results. If limit is specified and the
4760        continue field is empty, clients may assume that no more results are
4761        available. This field is not supported if watch is true.  The server
4762        guarantees that the objects returned when using continue will be
4763        identical to issuing a single list call without a limit - that is, no
4764        objects created, modified, or deleted after the first request is issued
4765        will be included in any subsequent continued requests. This is sometimes
4766        referred to as a consistent snapshot, and ensures that a client that is
4767        using limit to receive smaller chunks of a very large result can ensure
4768        they see all possible objects. If objects are updated during a chunked
4769        list the version of the object that was present at the time the first
4770        list result was calculated is returned.
4771        :param str pretty: If 'true', then the output is pretty printed.
4772        :param str resource_version: When specified with a watch call, shows
4773        changes that occur after that particular version of a resource. Defaults
4774        to changes from the beginning of history. When specified for list: - if
4775        unset, then the result is returned from remote storage based on
4776        quorum-read flag; - if it's 0, then we simply return what we currently
4777        have in cache, no guarantee; - if set to non zero, then the result is at
4778        least as fresh as given rv.
4779        :param int timeout_seconds: Timeout for the list/watch call. This limits
4780        the duration of the call, regardless of any activity or inactivity.
4781        :param bool watch: Watch for changes to the described resources and
4782        return them as a stream of add, update, and remove notifications.
4783        Specify resourceVersion.
4784        :return: V1beta2ReplicaSetList
4785                 If the method is called asynchronously,
4786                 returns the request thread.
4787        """
4788    kwargs['_return_http_data_only'] = True
4789    if kwargs.get('async_req'):
4790      return self.list_replica_set_for_all_namespaces_with_http_info(**kwargs)
4791    else:
4792      (data) = self.list_replica_set_for_all_namespaces_with_http_info(**kwargs)
4793      return data
4794
4795  def list_replica_set_for_all_namespaces_with_http_info(self, **kwargs):
4796    """
4797        list or watch objects of kind ReplicaSet
4798        This method makes a synchronous HTTP request by default. To make an
4799        asynchronous HTTP request, please pass async_req=True
4800        >>> thread =
4801        api.list_replica_set_for_all_namespaces_with_http_info(async_req=True)
4802        >>> result = thread.get()
4803
4804        :param async_req bool
4805        :param str _continue: The continue option should be set when retrieving
4806        more results from the server. Since this value is server defined,
4807        clients may only use the continue value from a previous query result
4808        with identical query parameters (except for the value of continue) and
4809        the server may reject a continue value it does not recognize. If the
4810        specified continue value is no longer valid whether due to expiration
4811        (generally five to fifteen minutes) or a configuration change on the
4812        server, the server will respond with a 410 ResourceExpired error
4813        together with a continue token. If the client needs a consistent list,
4814        it must restart their list without the continue field. Otherwise, the
4815        client may send another list request with the token received with the
4816        410 error, the server will respond with a list starting from the next
4817        key, but from the latest snapshot, which is inconsistent from the
4818        previous list results - objects that are created, modified, or deleted
4819        after the first list request will be included in the response, as long
4820        as their keys are after the \"next key\".  This field is not supported
4821        when watch is true. Clients may start a watch from the last
4822        resourceVersion value returned by the server and not miss any
4823        modifications.
4824        :param str field_selector: A selector to restrict the list of returned
4825        objects by their fields. Defaults to everything.
4826        :param str label_selector: A selector to restrict the list of returned
4827        objects by their labels. Defaults to everything.
4828        :param int limit: limit is a maximum number of responses to return for a
4829        list call. If more items exist, the server will set the `continue` field
4830        on the list metadata to a value that can be used with the same initial
4831        query to retrieve the next set of results. Setting a limit may return
4832        fewer than the requested amount of items (up to zero items) in the event
4833        all requested objects are filtered out and clients should only use the
4834        presence of the continue field to determine whether more results are
4835        available. Servers may choose not to support the limit argument and will
4836        return all of the available results. If limit is specified and the
4837        continue field is empty, clients may assume that no more results are
4838        available. This field is not supported if watch is true.  The server
4839        guarantees that the objects returned when using continue will be
4840        identical to issuing a single list call without a limit - that is, no
4841        objects created, modified, or deleted after the first request is issued
4842        will be included in any subsequent continued requests. This is sometimes
4843        referred to as a consistent snapshot, and ensures that a client that is
4844        using limit to receive smaller chunks of a very large result can ensure
4845        they see all possible objects. If objects are updated during a chunked
4846        list the version of the object that was present at the time the first
4847        list result was calculated is returned.
4848        :param str pretty: If 'true', then the output is pretty printed.
4849        :param str resource_version: When specified with a watch call, shows
4850        changes that occur after that particular version of a resource. Defaults
4851        to changes from the beginning of history. When specified for list: - if
4852        unset, then the result is returned from remote storage based on
4853        quorum-read flag; - if it's 0, then we simply return what we currently
4854        have in cache, no guarantee; - if set to non zero, then the result is at
4855        least as fresh as given rv.
4856        :param int timeout_seconds: Timeout for the list/watch call. This limits
4857        the duration of the call, regardless of any activity or inactivity.
4858        :param bool watch: Watch for changes to the described resources and
4859        return them as a stream of add, update, and remove notifications.
4860        Specify resourceVersion.
4861        :return: V1beta2ReplicaSetList
4862                 If the method is called asynchronously,
4863                 returns the request thread.
4864        """
4865
4866    all_params = [
4867        '_continue', 'field_selector', 'label_selector', 'limit', 'pretty',
4868        'resource_version', 'timeout_seconds', 'watch'
4869    ]
4870    all_params.append('async_req')
4871    all_params.append('_return_http_data_only')
4872    all_params.append('_preload_content')
4873    all_params.append('_request_timeout')
4874
4875    params = locals()
4876    for key, val in iteritems(params['kwargs']):
4877      if key not in all_params:
4878        raise TypeError("Got an unexpected keyword argument '%s'"
4879                        ' to method list_replica_set_for_all_namespaces' % key)
4880      params[key] = val
4881    del params['kwargs']
4882
4883    collection_formats = {}
4884
4885    path_params = {}
4886
4887    query_params = []
4888    if '_continue' in params:
4889      query_params.append(('continue', params['_continue']))
4890    if 'field_selector' in params:
4891      query_params.append(('fieldSelector', params['field_selector']))
4892    if 'label_selector' in params:
4893      query_params.append(('labelSelector', params['label_selector']))
4894    if 'limit' in params:
4895      query_params.append(('limit', params['limit']))
4896    if 'pretty' in params:
4897      query_params.append(('pretty', params['pretty']))
4898    if 'resource_version' in params:
4899      query_params.append(('resourceVersion', params['resource_version']))
4900    if 'timeout_seconds' in params:
4901      query_params.append(('timeoutSeconds', params['timeout_seconds']))
4902    if 'watch' in params:
4903      query_params.append(('watch', params['watch']))
4904
4905    header_params = {}
4906
4907    form_params = []
4908    local_var_files = {}
4909
4910    body_params = None
4911    # HTTP header `Accept`
4912    header_params['Accept'] = self.api_client.\
4913        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'])
4914
4915    # HTTP header `Content-Type`
4916    header_params['Content-Type'] = self.api_client.\
4917        select_header_content_type(['*/*'])
4918
4919    # Authentication setting
4920    auth_settings = ['BearerToken']
4921
4922    return self.api_client.call_api(
4923        '/apis/apps/v1beta2/replicasets',
4924        'GET',
4925        path_params,
4926        query_params,
4927        header_params,
4928        body=body_params,
4929        post_params=form_params,
4930        files=local_var_files,
4931        response_type='V1beta2ReplicaSetList',
4932        auth_settings=auth_settings,
4933        async_req=params.get('async_req'),
4934        _return_http_data_only=params.get('_return_http_data_only'),
4935        _preload_content=params.get('_preload_content', True),
4936        _request_timeout=params.get('_request_timeout'),
4937        collection_formats=collection_formats)
4938
4939  def list_stateful_set_for_all_namespaces(self, **kwargs):
4940    """
4941        list or watch objects of kind StatefulSet
4942        This method makes a synchronous HTTP request by default. To make an
4943        asynchronous HTTP request, please pass async_req=True
4944        >>> thread = api.list_stateful_set_for_all_namespaces(async_req=True)
4945        >>> result = thread.get()
4946
4947        :param async_req bool
4948        :param str _continue: The continue option should be set when retrieving
4949        more results from the server. Since this value is server defined,
4950        clients may only use the continue value from a previous query result
4951        with identical query parameters (except for the value of continue) and
4952        the server may reject a continue value it does not recognize. If the
4953        specified continue value is no longer valid whether due to expiration
4954        (generally five to fifteen minutes) or a configuration change on the
4955        server, the server will respond with a 410 ResourceExpired error
4956        together with a continue token. If the client needs a consistent list,
4957        it must restart their list without the continue field. Otherwise, the
4958        client may send another list request with the token received with the
4959        410 error, the server will respond with a list starting from the next
4960        key, but from the latest snapshot, which is inconsistent from the
4961        previous list results - objects that are created, modified, or deleted
4962        after the first list request will be included in the response, as long
4963        as their keys are after the \"next key\".  This field is not supported
4964        when watch is true. Clients may start a watch from the last
4965        resourceVersion value returned by the server and not miss any
4966        modifications.
4967        :param str field_selector: A selector to restrict the list of returned
4968        objects by their fields. Defaults to everything.
4969        :param str label_selector: A selector to restrict the list of returned
4970        objects by their labels. Defaults to everything.
4971        :param int limit: limit is a maximum number of responses to return for a
4972        list call. If more items exist, the server will set the `continue` field
4973        on the list metadata to a value that can be used with the same initial
4974        query to retrieve the next set of results. Setting a limit may return
4975        fewer than the requested amount of items (up to zero items) in the event
4976        all requested objects are filtered out and clients should only use the
4977        presence of the continue field to determine whether more results are
4978        available. Servers may choose not to support the limit argument and will
4979        return all of the available results. If limit is specified and the
4980        continue field is empty, clients may assume that no more results are
4981        available. This field is not supported if watch is true.  The server
4982        guarantees that the objects returned when using continue will be
4983        identical to issuing a single list call without a limit - that is, no
4984        objects created, modified, or deleted after the first request is issued
4985        will be included in any subsequent continued requests. This is sometimes
4986        referred to as a consistent snapshot, and ensures that a client that is
4987        using limit to receive smaller chunks of a very large result can ensure
4988        they see all possible objects. If objects are updated during a chunked
4989        list the version of the object that was present at the time the first
4990        list result was calculated is returned.
4991        :param str pretty: If 'true', then the output is pretty printed.
4992        :param str resource_version: When specified with a watch call, shows
4993        changes that occur after that particular version of a resource. Defaults
4994        to changes from the beginning of history. When specified for list: - if
4995        unset, then the result is returned from remote storage based on
4996        quorum-read flag; - if it's 0, then we simply return what we currently
4997        have in cache, no guarantee; - if set to non zero, then the result is at
4998        least as fresh as given rv.
4999        :param int timeout_seconds: Timeout for the list/watch call. This limits
5000        the duration of the call, regardless of any activity or inactivity.
5001        :param bool watch: Watch for changes to the described resources and
5002        return them as a stream of add, update, and remove notifications.
5003        Specify resourceVersion.
5004        :return: V1beta2StatefulSetList
5005                 If the method is called asynchronously,
5006                 returns the request thread.
5007        """
5008    kwargs['_return_http_data_only'] = True
5009    if kwargs.get('async_req'):
5010      return self.list_stateful_set_for_all_namespaces_with_http_info(**kwargs)
5011    else:
5012      (data) = self.list_stateful_set_for_all_namespaces_with_http_info(
5013          **kwargs)
5014      return data
5015
5016  def list_stateful_set_for_all_namespaces_with_http_info(self, **kwargs):
5017    """
5018        list or watch objects of kind StatefulSet
5019        This method makes a synchronous HTTP request by default. To make an
5020        asynchronous HTTP request, please pass async_req=True
5021        >>> thread =
5022        api.list_stateful_set_for_all_namespaces_with_http_info(async_req=True)
5023        >>> result = thread.get()
5024
5025        :param async_req bool
5026        :param str _continue: The continue option should be set when retrieving
5027        more results from the server. Since this value is server defined,
5028        clients may only use the continue value from a previous query result
5029        with identical query parameters (except for the value of continue) and
5030        the server may reject a continue value it does not recognize. If the
5031        specified continue value is no longer valid whether due to expiration
5032        (generally five to fifteen minutes) or a configuration change on the
5033        server, the server will respond with a 410 ResourceExpired error
5034        together with a continue token. If the client needs a consistent list,
5035        it must restart their list without the continue field. Otherwise, the
5036        client may send another list request with the token received with the
5037        410 error, the server will respond with a list starting from the next
5038        key, but from the latest snapshot, which is inconsistent from the
5039        previous list results - objects that are created, modified, or deleted
5040        after the first list request will be included in the response, as long
5041        as their keys are after the \"next key\".  This field is not supported
5042        when watch is true. Clients may start a watch from the last
5043        resourceVersion value returned by the server and not miss any
5044        modifications.
5045        :param str field_selector: A selector to restrict the list of returned
5046        objects by their fields. Defaults to everything.
5047        :param str label_selector: A selector to restrict the list of returned
5048        objects by their labels. Defaults to everything.
5049        :param int limit: limit is a maximum number of responses to return for a
5050        list call. If more items exist, the server will set the `continue` field
5051        on the list metadata to a value that can be used with the same initial
5052        query to retrieve the next set of results. Setting a limit may return
5053        fewer than the requested amount of items (up to zero items) in the event
5054        all requested objects are filtered out and clients should only use the
5055        presence of the continue field to determine whether more results are
5056        available. Servers may choose not to support the limit argument and will
5057        return all of the available results. If limit is specified and the
5058        continue field is empty, clients may assume that no more results are
5059        available. This field is not supported if watch is true.  The server
5060        guarantees that the objects returned when using continue will be
5061        identical to issuing a single list call without a limit - that is, no
5062        objects created, modified, or deleted after the first request is issued
5063        will be included in any subsequent continued requests. This is sometimes
5064        referred to as a consistent snapshot, and ensures that a client that is
5065        using limit to receive smaller chunks of a very large result can ensure
5066        they see all possible objects. If objects are updated during a chunked
5067        list the version of the object that was present at the time the first
5068        list result was calculated is returned.
5069        :param str pretty: If 'true', then the output is pretty printed.
5070        :param str resource_version: When specified with a watch call, shows
5071        changes that occur after that particular version of a resource. Defaults
5072        to changes from the beginning of history. When specified for list: - if
5073        unset, then the result is returned from remote storage based on
5074        quorum-read flag; - if it's 0, then we simply return what we currently
5075        have in cache, no guarantee; - if set to non zero, then the result is at
5076        least as fresh as given rv.
5077        :param int timeout_seconds: Timeout for the list/watch call. This limits
5078        the duration of the call, regardless of any activity or inactivity.
5079        :param bool watch: Watch for changes to the described resources and
5080        return them as a stream of add, update, and remove notifications.
5081        Specify resourceVersion.
5082        :return: V1beta2StatefulSetList
5083                 If the method is called asynchronously,
5084                 returns the request thread.
5085        """
5086
5087    all_params = [
5088        '_continue', 'field_selector', 'label_selector', 'limit', 'pretty',
5089        'resource_version', 'timeout_seconds', 'watch'
5090    ]
5091    all_params.append('async_req')
5092    all_params.append('_return_http_data_only')
5093    all_params.append('_preload_content')
5094    all_params.append('_request_timeout')
5095
5096    params = locals()
5097    for key, val in iteritems(params['kwargs']):
5098      if key not in all_params:
5099        raise TypeError("Got an unexpected keyword argument '%s'"
5100                        ' to method list_stateful_set_for_all_namespaces' % key)
5101      params[key] = val
5102    del params['kwargs']
5103
5104    collection_formats = {}
5105
5106    path_params = {}
5107
5108    query_params = []
5109    if '_continue' in params:
5110      query_params.append(('continue', params['_continue']))
5111    if 'field_selector' in params:
5112      query_params.append(('fieldSelector', params['field_selector']))
5113    if 'label_selector' in params:
5114      query_params.append(('labelSelector', params['label_selector']))
5115    if 'limit' in params:
5116      query_params.append(('limit', params['limit']))
5117    if 'pretty' in params:
5118      query_params.append(('pretty', params['pretty']))
5119    if 'resource_version' in params:
5120      query_params.append(('resourceVersion', params['resource_version']))
5121    if 'timeout_seconds' in params:
5122      query_params.append(('timeoutSeconds', params['timeout_seconds']))
5123    if 'watch' in params:
5124      query_params.append(('watch', params['watch']))
5125
5126    header_params = {}
5127
5128    form_params = []
5129    local_var_files = {}
5130
5131    body_params = None
5132    # HTTP header `Accept`
5133    header_params['Accept'] = self.api_client.\
5134        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'])
5135
5136    # HTTP header `Content-Type`
5137    header_params['Content-Type'] = self.api_client.\
5138        select_header_content_type(['*/*'])
5139
5140    # Authentication setting
5141    auth_settings = ['BearerToken']
5142
5143    return self.api_client.call_api(
5144        '/apis/apps/v1beta2/statefulsets',
5145        'GET',
5146        path_params,
5147        query_params,
5148        header_params,
5149        body=body_params,
5150        post_params=form_params,
5151        files=local_var_files,
5152        response_type='V1beta2StatefulSetList',
5153        auth_settings=auth_settings,
5154        async_req=params.get('async_req'),
5155        _return_http_data_only=params.get('_return_http_data_only'),
5156        _preload_content=params.get('_preload_content', True),
5157        _request_timeout=params.get('_request_timeout'),
5158        collection_formats=collection_formats)
5159
5160  def patch_namespaced_controller_revision(self, name, namespace, body,
5161                                           **kwargs):
5162    """
5163        partially update the specified ControllerRevision
5164        This method makes a synchronous HTTP request by default. To make an
5165        asynchronous HTTP request, please pass async_req=True
5166        >>> thread = api.patch_namespaced_controller_revision(name, namespace,
5167        body, async_req=True)
5168        >>> result = thread.get()
5169
5170        :param async_req bool
5171        :param str name: name of the ControllerRevision (required)
5172        :param str namespace: object name and auth scope, such as for teams and
5173        projects (required)
5174        :param object body: (required)
5175        :param str pretty: If 'true', then the output is pretty printed.
5176        :param str dry_run: When present, indicates that modifications should
5177        not be persisted. An invalid or unrecognized dryRun directive will
5178        result in an error response and no further processing of the request.
5179        Valid values are: - All: all dry run stages will be processed
5180        :param str field_manager: fieldManager is a name associated with the
5181        actor or entity that is making these changes. The value must be less
5182        than or 128 characters long, and only contain printable characters, as
5183        defined by https://golang.org/pkg/unicode/#IsPrint. This field is
5184        required for apply requests (application/apply-patch) but optional for
5185        non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
5186        :param bool force: Force is going to \"force\" Apply requests. It means
5187        user will re-acquire conflicting fields owned by other people. Force
5188        flag must be unset for non-apply patch requests.
5189        :return: V1beta2ControllerRevision
5190                 If the method is called asynchronously,
5191                 returns the request thread.
5192        """
5193    kwargs['_return_http_data_only'] = True
5194    if kwargs.get('async_req'):
5195      return self.patch_namespaced_controller_revision_with_http_info(
5196          name, namespace, body, **kwargs)
5197    else:
5198      (data) = self.patch_namespaced_controller_revision_with_http_info(
5199          name, namespace, body, **kwargs)
5200      return data
5201
5202  def patch_namespaced_controller_revision_with_http_info(
5203      self, name, namespace, body, **kwargs):
5204    """
5205        partially update the specified ControllerRevision
5206        This method makes a synchronous HTTP request by default. To make an
5207        asynchronous HTTP request, please pass async_req=True
5208        >>> thread =
5209        api.patch_namespaced_controller_revision_with_http_info(name, namespace,
5210        body, async_req=True)
5211        >>> result = thread.get()
5212
5213        :param async_req bool
5214        :param str name: name of the ControllerRevision (required)
5215        :param str namespace: object name and auth scope, such as for teams and
5216        projects (required)
5217        :param object body: (required)
5218        :param str pretty: If 'true', then the output is pretty printed.
5219        :param str dry_run: When present, indicates that modifications should
5220        not be persisted. An invalid or unrecognized dryRun directive will
5221        result in an error response and no further processing of the request.
5222        Valid values are: - All: all dry run stages will be processed
5223        :param str field_manager: fieldManager is a name associated with the
5224        actor or entity that is making these changes. The value must be less
5225        than or 128 characters long, and only contain printable characters, as
5226        defined by https://golang.org/pkg/unicode/#IsPrint. This field is
5227        required for apply requests (application/apply-patch) but optional for
5228        non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
5229        :param bool force: Force is going to \"force\" Apply requests. It means
5230        user will re-acquire conflicting fields owned by other people. Force
5231        flag must be unset for non-apply patch requests.
5232        :return: V1beta2ControllerRevision
5233                 If the method is called asynchronously,
5234                 returns the request thread.
5235        """
5236
5237    all_params = [
5238        'name', 'namespace', 'body', 'pretty', 'dry_run', 'field_manager',
5239        'force'
5240    ]
5241    all_params.append('async_req')
5242    all_params.append('_return_http_data_only')
5243    all_params.append('_preload_content')
5244    all_params.append('_request_timeout')
5245
5246    params = locals()
5247    for key, val in iteritems(params['kwargs']):
5248      if key not in all_params:
5249        raise TypeError("Got an unexpected keyword argument '%s'"
5250                        ' to method patch_namespaced_controller_revision' % key)
5251      params[key] = val
5252    del params['kwargs']
5253    # verify the required parameter 'name' is set
5254    if ('name' not in params) or (params['name'] is None):
5255      raise ValueError(
5256          'Missing the required parameter `name` when calling `patch_namespaced_controller_revision`'
5257      )
5258    # verify the required parameter 'namespace' is set
5259    if ('namespace' not in params) or (params['namespace'] is None):
5260      raise ValueError(
5261          'Missing the required parameter `namespace` when calling `patch_namespaced_controller_revision`'
5262      )
5263    # verify the required parameter 'body' is set
5264    if ('body' not in params) or (params['body'] is None):
5265      raise ValueError(
5266          'Missing the required parameter `body` when calling `patch_namespaced_controller_revision`'
5267      )
5268
5269    collection_formats = {}
5270
5271    path_params = {}
5272    if 'name' in params:
5273      path_params['name'] = params['name']
5274    if 'namespace' in params:
5275      path_params['namespace'] = params['namespace']
5276
5277    query_params = []
5278    if 'pretty' in params:
5279      query_params.append(('pretty', params['pretty']))
5280    if 'dry_run' in params:
5281      query_params.append(('dryRun', params['dry_run']))
5282    if 'field_manager' in params:
5283      query_params.append(('fieldManager', params['field_manager']))
5284    if 'force' in params:
5285      query_params.append(('force', params['force']))
5286
5287    header_params = {}
5288
5289    form_params = []
5290    local_var_files = {}
5291
5292    body_params = None
5293    if 'body' in params:
5294      body_params = params['body']
5295    # HTTP header `Accept`
5296    header_params['Accept'] = self.api_client.\
5297        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
5298
5299    # HTTP header `Content-Type`
5300    header_params['Content-Type'] = self.api_client.\
5301        select_header_content_type(['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json'])
5302
5303    # Authentication setting
5304    auth_settings = ['BearerToken']
5305
5306    return self.api_client.call_api(
5307        '/apis/apps/v1beta2/namespaces/{namespace}/controllerrevisions/{name}',
5308        'PATCH',
5309        path_params,
5310        query_params,
5311        header_params,
5312        body=body_params,
5313        post_params=form_params,
5314        files=local_var_files,
5315        response_type='V1beta2ControllerRevision',
5316        auth_settings=auth_settings,
5317        async_req=params.get('async_req'),
5318        _return_http_data_only=params.get('_return_http_data_only'),
5319        _preload_content=params.get('_preload_content', True),
5320        _request_timeout=params.get('_request_timeout'),
5321        collection_formats=collection_formats)
5322
5323  def patch_namespaced_daemon_set(self, name, namespace, body, **kwargs):
5324    """
5325        partially update the specified DaemonSet
5326        This method makes a synchronous HTTP request by default. To make an
5327        asynchronous HTTP request, please pass async_req=True
5328        >>> thread = api.patch_namespaced_daemon_set(name, namespace, body,
5329        async_req=True)
5330        >>> result = thread.get()
5331
5332        :param async_req bool
5333        :param str name: name of the DaemonSet (required)
5334        :param str namespace: object name and auth scope, such as for teams and
5335        projects (required)
5336        :param object body: (required)
5337        :param str pretty: If 'true', then the output is pretty printed.
5338        :param str dry_run: When present, indicates that modifications should
5339        not be persisted. An invalid or unrecognized dryRun directive will
5340        result in an error response and no further processing of the request.
5341        Valid values are: - All: all dry run stages will be processed
5342        :param str field_manager: fieldManager is a name associated with the
5343        actor or entity that is making these changes. The value must be less
5344        than or 128 characters long, and only contain printable characters, as
5345        defined by https://golang.org/pkg/unicode/#IsPrint. This field is
5346        required for apply requests (application/apply-patch) but optional for
5347        non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
5348        :param bool force: Force is going to \"force\" Apply requests. It means
5349        user will re-acquire conflicting fields owned by other people. Force
5350        flag must be unset for non-apply patch requests.
5351        :return: V1beta2DaemonSet
5352                 If the method is called asynchronously,
5353                 returns the request thread.
5354        """
5355    kwargs['_return_http_data_only'] = True
5356    if kwargs.get('async_req'):
5357      return self.patch_namespaced_daemon_set_with_http_info(
5358          name, namespace, body, **kwargs)
5359    else:
5360      (data) = self.patch_namespaced_daemon_set_with_http_info(
5361          name, namespace, body, **kwargs)
5362      return data
5363
5364  def patch_namespaced_daemon_set_with_http_info(self, name, namespace, body,
5365                                                 **kwargs):
5366    """
5367        partially update the specified DaemonSet
5368        This method makes a synchronous HTTP request by default. To make an
5369        asynchronous HTTP request, please pass async_req=True
5370        >>> thread = api.patch_namespaced_daemon_set_with_http_info(name,
5371        namespace, body, async_req=True)
5372        >>> result = thread.get()
5373
5374        :param async_req bool
5375        :param str name: name of the DaemonSet (required)
5376        :param str namespace: object name and auth scope, such as for teams and
5377        projects (required)
5378        :param object body: (required)
5379        :param str pretty: If 'true', then the output is pretty printed.
5380        :param str dry_run: When present, indicates that modifications should
5381        not be persisted. An invalid or unrecognized dryRun directive will
5382        result in an error response and no further processing of the request.
5383        Valid values are: - All: all dry run stages will be processed
5384        :param str field_manager: fieldManager is a name associated with the
5385        actor or entity that is making these changes. The value must be less
5386        than or 128 characters long, and only contain printable characters, as
5387        defined by https://golang.org/pkg/unicode/#IsPrint. This field is
5388        required for apply requests (application/apply-patch) but optional for
5389        non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
5390        :param bool force: Force is going to \"force\" Apply requests. It means
5391        user will re-acquire conflicting fields owned by other people. Force
5392        flag must be unset for non-apply patch requests.
5393        :return: V1beta2DaemonSet
5394                 If the method is called asynchronously,
5395                 returns the request thread.
5396        """
5397
5398    all_params = [
5399        'name', 'namespace', 'body', 'pretty', 'dry_run', 'field_manager',
5400        'force'
5401    ]
5402    all_params.append('async_req')
5403    all_params.append('_return_http_data_only')
5404    all_params.append('_preload_content')
5405    all_params.append('_request_timeout')
5406
5407    params = locals()
5408    for key, val in iteritems(params['kwargs']):
5409      if key not in all_params:
5410        raise TypeError("Got an unexpected keyword argument '%s'"
5411                        ' to method patch_namespaced_daemon_set' % key)
5412      params[key] = val
5413    del params['kwargs']
5414    # verify the required parameter 'name' is set
5415    if ('name' not in params) or (params['name'] is None):
5416      raise ValueError(
5417          'Missing the required parameter `name` when calling `patch_namespaced_daemon_set`'
5418      )
5419    # verify the required parameter 'namespace' is set
5420    if ('namespace' not in params) or (params['namespace'] is None):
5421      raise ValueError(
5422          'Missing the required parameter `namespace` when calling `patch_namespaced_daemon_set`'
5423      )
5424    # verify the required parameter 'body' is set
5425    if ('body' not in params) or (params['body'] is None):
5426      raise ValueError(
5427          'Missing the required parameter `body` when calling `patch_namespaced_daemon_set`'
5428      )
5429
5430    collection_formats = {}
5431
5432    path_params = {}
5433    if 'name' in params:
5434      path_params['name'] = params['name']
5435    if 'namespace' in params:
5436      path_params['namespace'] = params['namespace']
5437
5438    query_params = []
5439    if 'pretty' in params:
5440      query_params.append(('pretty', params['pretty']))
5441    if 'dry_run' in params:
5442      query_params.append(('dryRun', params['dry_run']))
5443    if 'field_manager' in params:
5444      query_params.append(('fieldManager', params['field_manager']))
5445    if 'force' in params:
5446      query_params.append(('force', params['force']))
5447
5448    header_params = {}
5449
5450    form_params = []
5451    local_var_files = {}
5452
5453    body_params = None
5454    if 'body' in params:
5455      body_params = params['body']
5456    # HTTP header `Accept`
5457    header_params['Accept'] = self.api_client.\
5458        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
5459
5460    # HTTP header `Content-Type`
5461    header_params['Content-Type'] = self.api_client.\
5462        select_header_content_type(['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json'])
5463
5464    # Authentication setting
5465    auth_settings = ['BearerToken']
5466
5467    return self.api_client.call_api(
5468        '/apis/apps/v1beta2/namespaces/{namespace}/daemonsets/{name}',
5469        'PATCH',
5470        path_params,
5471        query_params,
5472        header_params,
5473        body=body_params,
5474        post_params=form_params,
5475        files=local_var_files,
5476        response_type='V1beta2DaemonSet',
5477        auth_settings=auth_settings,
5478        async_req=params.get('async_req'),
5479        _return_http_data_only=params.get('_return_http_data_only'),
5480        _preload_content=params.get('_preload_content', True),
5481        _request_timeout=params.get('_request_timeout'),
5482        collection_formats=collection_formats)
5483
5484  def patch_namespaced_daemon_set_status(self, name, namespace, body, **kwargs):
5485    """
5486        partially update status of the specified DaemonSet
5487        This method makes a synchronous HTTP request by default. To make an
5488        asynchronous HTTP request, please pass async_req=True
5489        >>> thread = api.patch_namespaced_daemon_set_status(name, namespace,
5490        body, async_req=True)
5491        >>> result = thread.get()
5492
5493        :param async_req bool
5494        :param str name: name of the DaemonSet (required)
5495        :param str namespace: object name and auth scope, such as for teams and
5496        projects (required)
5497        :param object body: (required)
5498        :param str pretty: If 'true', then the output is pretty printed.
5499        :param str dry_run: When present, indicates that modifications should
5500        not be persisted. An invalid or unrecognized dryRun directive will
5501        result in an error response and no further processing of the request.
5502        Valid values are: - All: all dry run stages will be processed
5503        :param str field_manager: fieldManager is a name associated with the
5504        actor or entity that is making these changes. The value must be less
5505        than or 128 characters long, and only contain printable characters, as
5506        defined by https://golang.org/pkg/unicode/#IsPrint. This field is
5507        required for apply requests (application/apply-patch) but optional for
5508        non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
5509        :param bool force: Force is going to \"force\" Apply requests. It means
5510        user will re-acquire conflicting fields owned by other people. Force
5511        flag must be unset for non-apply patch requests.
5512        :return: V1beta2DaemonSet
5513                 If the method is called asynchronously,
5514                 returns the request thread.
5515        """
5516    kwargs['_return_http_data_only'] = True
5517    if kwargs.get('async_req'):
5518      return self.patch_namespaced_daemon_set_status_with_http_info(
5519          name, namespace, body, **kwargs)
5520    else:
5521      (data) = self.patch_namespaced_daemon_set_status_with_http_info(
5522          name, namespace, body, **kwargs)
5523      return data
5524
5525  def patch_namespaced_daemon_set_status_with_http_info(self, name, namespace,
5526                                                        body, **kwargs):
5527    """
5528        partially update status of the specified DaemonSet
5529        This method makes a synchronous HTTP request by default. To make an
5530        asynchronous HTTP request, please pass async_req=True
5531        >>> thread = api.patch_namespaced_daemon_set_status_with_http_info(name,
5532        namespace, body, async_req=True)
5533        >>> result = thread.get()
5534
5535        :param async_req bool
5536        :param str name: name of the DaemonSet (required)
5537        :param str namespace: object name and auth scope, such as for teams and
5538        projects (required)
5539        :param object body: (required)
5540        :param str pretty: If 'true', then the output is pretty printed.
5541        :param str dry_run: When present, indicates that modifications should
5542        not be persisted. An invalid or unrecognized dryRun directive will
5543        result in an error response and no further processing of the request.
5544        Valid values are: - All: all dry run stages will be processed
5545        :param str field_manager: fieldManager is a name associated with the
5546        actor or entity that is making these changes. The value must be less
5547        than or 128 characters long, and only contain printable characters, as
5548        defined by https://golang.org/pkg/unicode/#IsPrint. This field is
5549        required for apply requests (application/apply-patch) but optional for
5550        non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
5551        :param bool force: Force is going to \"force\" Apply requests. It means
5552        user will re-acquire conflicting fields owned by other people. Force
5553        flag must be unset for non-apply patch requests.
5554        :return: V1beta2DaemonSet
5555                 If the method is called asynchronously,
5556                 returns the request thread.
5557        """
5558
5559    all_params = [
5560        'name', 'namespace', 'body', 'pretty', 'dry_run', 'field_manager',
5561        'force'
5562    ]
5563    all_params.append('async_req')
5564    all_params.append('_return_http_data_only')
5565    all_params.append('_preload_content')
5566    all_params.append('_request_timeout')
5567
5568    params = locals()
5569    for key, val in iteritems(params['kwargs']):
5570      if key not in all_params:
5571        raise TypeError("Got an unexpected keyword argument '%s'"
5572                        ' to method patch_namespaced_daemon_set_status' % key)
5573      params[key] = val
5574    del params['kwargs']
5575    # verify the required parameter 'name' is set
5576    if ('name' not in params) or (params['name'] is None):
5577      raise ValueError(
5578          'Missing the required parameter `name` when calling `patch_namespaced_daemon_set_status`'
5579      )
5580    # verify the required parameter 'namespace' is set
5581    if ('namespace' not in params) or (params['namespace'] is None):
5582      raise ValueError(
5583          'Missing the required parameter `namespace` when calling `patch_namespaced_daemon_set_status`'
5584      )
5585    # verify the required parameter 'body' is set
5586    if ('body' not in params) or (params['body'] is None):
5587      raise ValueError(
5588          'Missing the required parameter `body` when calling `patch_namespaced_daemon_set_status`'
5589      )
5590
5591    collection_formats = {}
5592
5593    path_params = {}
5594    if 'name' in params:
5595      path_params['name'] = params['name']
5596    if 'namespace' in params:
5597      path_params['namespace'] = params['namespace']
5598
5599    query_params = []
5600    if 'pretty' in params:
5601      query_params.append(('pretty', params['pretty']))
5602    if 'dry_run' in params:
5603      query_params.append(('dryRun', params['dry_run']))
5604    if 'field_manager' in params:
5605      query_params.append(('fieldManager', params['field_manager']))
5606    if 'force' in params:
5607      query_params.append(('force', params['force']))
5608
5609    header_params = {}
5610
5611    form_params = []
5612    local_var_files = {}
5613
5614    body_params = None
5615    if 'body' in params:
5616      body_params = params['body']
5617    # HTTP header `Accept`
5618    header_params['Accept'] = self.api_client.\
5619        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
5620
5621    # HTTP header `Content-Type`
5622    header_params['Content-Type'] = self.api_client.\
5623        select_header_content_type(['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json'])
5624
5625    # Authentication setting
5626    auth_settings = ['BearerToken']
5627
5628    return self.api_client.call_api(
5629        '/apis/apps/v1beta2/namespaces/{namespace}/daemonsets/{name}/status',
5630        'PATCH',
5631        path_params,
5632        query_params,
5633        header_params,
5634        body=body_params,
5635        post_params=form_params,
5636        files=local_var_files,
5637        response_type='V1beta2DaemonSet',
5638        auth_settings=auth_settings,
5639        async_req=params.get('async_req'),
5640        _return_http_data_only=params.get('_return_http_data_only'),
5641        _preload_content=params.get('_preload_content', True),
5642        _request_timeout=params.get('_request_timeout'),
5643        collection_formats=collection_formats)
5644
5645  def patch_namespaced_deployment(self, name, namespace, body, **kwargs):
5646    """
5647        partially update the specified Deployment
5648        This method makes a synchronous HTTP request by default. To make an
5649        asynchronous HTTP request, please pass async_req=True
5650        >>> thread = api.patch_namespaced_deployment(name, namespace, body,
5651        async_req=True)
5652        >>> result = thread.get()
5653
5654        :param async_req bool
5655        :param str name: name of the Deployment (required)
5656        :param str namespace: object name and auth scope, such as for teams and
5657        projects (required)
5658        :param object body: (required)
5659        :param str pretty: If 'true', then the output is pretty printed.
5660        :param str dry_run: When present, indicates that modifications should
5661        not be persisted. An invalid or unrecognized dryRun directive will
5662        result in an error response and no further processing of the request.
5663        Valid values are: - All: all dry run stages will be processed
5664        :param str field_manager: fieldManager is a name associated with the
5665        actor or entity that is making these changes. The value must be less
5666        than or 128 characters long, and only contain printable characters, as
5667        defined by https://golang.org/pkg/unicode/#IsPrint. This field is
5668        required for apply requests (application/apply-patch) but optional for
5669        non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
5670        :param bool force: Force is going to \"force\" Apply requests. It means
5671        user will re-acquire conflicting fields owned by other people. Force
5672        flag must be unset for non-apply patch requests.
5673        :return: V1beta2Deployment
5674                 If the method is called asynchronously,
5675                 returns the request thread.
5676        """
5677    kwargs['_return_http_data_only'] = True
5678    if kwargs.get('async_req'):
5679      return self.patch_namespaced_deployment_with_http_info(
5680          name, namespace, body, **kwargs)
5681    else:
5682      (data) = self.patch_namespaced_deployment_with_http_info(
5683          name, namespace, body, **kwargs)
5684      return data
5685
5686  def patch_namespaced_deployment_with_http_info(self, name, namespace, body,
5687                                                 **kwargs):
5688    """
5689        partially update the specified Deployment
5690        This method makes a synchronous HTTP request by default. To make an
5691        asynchronous HTTP request, please pass async_req=True
5692        >>> thread = api.patch_namespaced_deployment_with_http_info(name,
5693        namespace, body, async_req=True)
5694        >>> result = thread.get()
5695
5696        :param async_req bool
5697        :param str name: name of the Deployment (required)
5698        :param str namespace: object name and auth scope, such as for teams and
5699        projects (required)
5700        :param object body: (required)
5701        :param str pretty: If 'true', then the output is pretty printed.
5702        :param str dry_run: When present, indicates that modifications should
5703        not be persisted. An invalid or unrecognized dryRun directive will
5704        result in an error response and no further processing of the request.
5705        Valid values are: - All: all dry run stages will be processed
5706        :param str field_manager: fieldManager is a name associated with the
5707        actor or entity that is making these changes. The value must be less
5708        than or 128 characters long, and only contain printable characters, as
5709        defined by https://golang.org/pkg/unicode/#IsPrint. This field is
5710        required for apply requests (application/apply-patch) but optional for
5711        non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
5712        :param bool force: Force is going to \"force\" Apply requests. It means
5713        user will re-acquire conflicting fields owned by other people. Force
5714        flag must be unset for non-apply patch requests.
5715        :return: V1beta2Deployment
5716                 If the method is called asynchronously,
5717                 returns the request thread.
5718        """
5719
5720    all_params = [
5721        'name', 'namespace', 'body', 'pretty', 'dry_run', 'field_manager',
5722        'force'
5723    ]
5724    all_params.append('async_req')
5725    all_params.append('_return_http_data_only')
5726    all_params.append('_preload_content')
5727    all_params.append('_request_timeout')
5728
5729    params = locals()
5730    for key, val in iteritems(params['kwargs']):
5731      if key not in all_params:
5732        raise TypeError("Got an unexpected keyword argument '%s'"
5733                        ' to method patch_namespaced_deployment' % key)
5734      params[key] = val
5735    del params['kwargs']
5736    # verify the required parameter 'name' is set
5737    if ('name' not in params) or (params['name'] is None):
5738      raise ValueError(
5739          'Missing the required parameter `name` when calling `patch_namespaced_deployment`'
5740      )
5741    # verify the required parameter 'namespace' is set
5742    if ('namespace' not in params) or (params['namespace'] is None):
5743      raise ValueError(
5744          'Missing the required parameter `namespace` when calling `patch_namespaced_deployment`'
5745      )
5746    # verify the required parameter 'body' is set
5747    if ('body' not in params) or (params['body'] is None):
5748      raise ValueError(
5749          'Missing the required parameter `body` when calling `patch_namespaced_deployment`'
5750      )
5751
5752    collection_formats = {}
5753
5754    path_params = {}
5755    if 'name' in params:
5756      path_params['name'] = params['name']
5757    if 'namespace' in params:
5758      path_params['namespace'] = params['namespace']
5759
5760    query_params = []
5761    if 'pretty' in params:
5762      query_params.append(('pretty', params['pretty']))
5763    if 'dry_run' in params:
5764      query_params.append(('dryRun', params['dry_run']))
5765    if 'field_manager' in params:
5766      query_params.append(('fieldManager', params['field_manager']))
5767    if 'force' in params:
5768      query_params.append(('force', params['force']))
5769
5770    header_params = {}
5771
5772    form_params = []
5773    local_var_files = {}
5774
5775    body_params = None
5776    if 'body' in params:
5777      body_params = params['body']
5778    # HTTP header `Accept`
5779    header_params['Accept'] = self.api_client.\
5780        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
5781
5782    # HTTP header `Content-Type`
5783    header_params['Content-Type'] = self.api_client.\
5784        select_header_content_type(['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json'])
5785
5786    # Authentication setting
5787    auth_settings = ['BearerToken']
5788
5789    return self.api_client.call_api(
5790        '/apis/apps/v1beta2/namespaces/{namespace}/deployments/{name}',
5791        'PATCH',
5792        path_params,
5793        query_params,
5794        header_params,
5795        body=body_params,
5796        post_params=form_params,
5797        files=local_var_files,
5798        response_type='V1beta2Deployment',
5799        auth_settings=auth_settings,
5800        async_req=params.get('async_req'),
5801        _return_http_data_only=params.get('_return_http_data_only'),
5802        _preload_content=params.get('_preload_content', True),
5803        _request_timeout=params.get('_request_timeout'),
5804        collection_formats=collection_formats)
5805
5806  def patch_namespaced_deployment_scale(self, name, namespace, body, **kwargs):
5807    """
5808        partially update scale of the specified Deployment
5809        This method makes a synchronous HTTP request by default. To make an
5810        asynchronous HTTP request, please pass async_req=True
5811        >>> thread = api.patch_namespaced_deployment_scale(name, namespace,
5812        body, async_req=True)
5813        >>> result = thread.get()
5814
5815        :param async_req bool
5816        :param str name: name of the Scale (required)
5817        :param str namespace: object name and auth scope, such as for teams and
5818        projects (required)
5819        :param object body: (required)
5820        :param str pretty: If 'true', then the output is pretty printed.
5821        :param str dry_run: When present, indicates that modifications should
5822        not be persisted. An invalid or unrecognized dryRun directive will
5823        result in an error response and no further processing of the request.
5824        Valid values are: - All: all dry run stages will be processed
5825        :param str field_manager: fieldManager is a name associated with the
5826        actor or entity that is making these changes. The value must be less
5827        than or 128 characters long, and only contain printable characters, as
5828        defined by https://golang.org/pkg/unicode/#IsPrint. This field is
5829        required for apply requests (application/apply-patch) but optional for
5830        non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
5831        :param bool force: Force is going to \"force\" Apply requests. It means
5832        user will re-acquire conflicting fields owned by other people. Force
5833        flag must be unset for non-apply patch requests.
5834        :return: V1beta2Scale
5835                 If the method is called asynchronously,
5836                 returns the request thread.
5837        """
5838    kwargs['_return_http_data_only'] = True
5839    if kwargs.get('async_req'):
5840      return self.patch_namespaced_deployment_scale_with_http_info(
5841          name, namespace, body, **kwargs)
5842    else:
5843      (data) = self.patch_namespaced_deployment_scale_with_http_info(
5844          name, namespace, body, **kwargs)
5845      return data
5846
5847  def patch_namespaced_deployment_scale_with_http_info(self, name, namespace,
5848                                                       body, **kwargs):
5849    """
5850        partially update scale of the specified Deployment
5851        This method makes a synchronous HTTP request by default. To make an
5852        asynchronous HTTP request, please pass async_req=True
5853        >>> thread = api.patch_namespaced_deployment_scale_with_http_info(name,
5854        namespace, body, async_req=True)
5855        >>> result = thread.get()
5856
5857        :param async_req bool
5858        :param str name: name of the Scale (required)
5859        :param str namespace: object name and auth scope, such as for teams and
5860        projects (required)
5861        :param object body: (required)
5862        :param str pretty: If 'true', then the output is pretty printed.
5863        :param str dry_run: When present, indicates that modifications should
5864        not be persisted. An invalid or unrecognized dryRun directive will
5865        result in an error response and no further processing of the request.
5866        Valid values are: - All: all dry run stages will be processed
5867        :param str field_manager: fieldManager is a name associated with the
5868        actor or entity that is making these changes. The value must be less
5869        than or 128 characters long, and only contain printable characters, as
5870        defined by https://golang.org/pkg/unicode/#IsPrint. This field is
5871        required for apply requests (application/apply-patch) but optional for
5872        non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
5873        :param bool force: Force is going to \"force\" Apply requests. It means
5874        user will re-acquire conflicting fields owned by other people. Force
5875        flag must be unset for non-apply patch requests.
5876        :return: V1beta2Scale
5877                 If the method is called asynchronously,
5878                 returns the request thread.
5879        """
5880
5881    all_params = [
5882        'name', 'namespace', 'body', 'pretty', 'dry_run', 'field_manager',
5883        'force'
5884    ]
5885    all_params.append('async_req')
5886    all_params.append('_return_http_data_only')
5887    all_params.append('_preload_content')
5888    all_params.append('_request_timeout')
5889
5890    params = locals()
5891    for key, val in iteritems(params['kwargs']):
5892      if key not in all_params:
5893        raise TypeError("Got an unexpected keyword argument '%s'"
5894                        ' to method patch_namespaced_deployment_scale' % key)
5895      params[key] = val
5896    del params['kwargs']
5897    # verify the required parameter 'name' is set
5898    if ('name' not in params) or (params['name'] is None):
5899      raise ValueError(
5900          'Missing the required parameter `name` when calling `patch_namespaced_deployment_scale`'
5901      )
5902    # verify the required parameter 'namespace' is set
5903    if ('namespace' not in params) or (params['namespace'] is None):
5904      raise ValueError(
5905          'Missing the required parameter `namespace` when calling `patch_namespaced_deployment_scale`'
5906      )
5907    # verify the required parameter 'body' is set
5908    if ('body' not in params) or (params['body'] is None):
5909      raise ValueError(
5910          'Missing the required parameter `body` when calling `patch_namespaced_deployment_scale`'
5911      )
5912
5913    collection_formats = {}
5914
5915    path_params = {}
5916    if 'name' in params:
5917      path_params['name'] = params['name']
5918    if 'namespace' in params:
5919      path_params['namespace'] = params['namespace']
5920
5921    query_params = []
5922    if 'pretty' in params:
5923      query_params.append(('pretty', params['pretty']))
5924    if 'dry_run' in params:
5925      query_params.append(('dryRun', params['dry_run']))
5926    if 'field_manager' in params:
5927      query_params.append(('fieldManager', params['field_manager']))
5928    if 'force' in params:
5929      query_params.append(('force', params['force']))
5930
5931    header_params = {}
5932
5933    form_params = []
5934    local_var_files = {}
5935
5936    body_params = None
5937    if 'body' in params:
5938      body_params = params['body']
5939    # HTTP header `Accept`
5940    header_params['Accept'] = self.api_client.\
5941        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
5942
5943    # HTTP header `Content-Type`
5944    header_params['Content-Type'] = self.api_client.\
5945        select_header_content_type(['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json'])
5946
5947    # Authentication setting
5948    auth_settings = ['BearerToken']
5949
5950    return self.api_client.call_api(
5951        '/apis/apps/v1beta2/namespaces/{namespace}/deployments/{name}/scale',
5952        'PATCH',
5953        path_params,
5954        query_params,
5955        header_params,
5956        body=body_params,
5957        post_params=form_params,
5958        files=local_var_files,
5959        response_type='V1beta2Scale',
5960        auth_settings=auth_settings,
5961        async_req=params.get('async_req'),
5962        _return_http_data_only=params.get('_return_http_data_only'),
5963        _preload_content=params.get('_preload_content', True),
5964        _request_timeout=params.get('_request_timeout'),
5965        collection_formats=collection_formats)
5966
5967  def patch_namespaced_deployment_status(self, name, namespace, body, **kwargs):
5968    """
5969        partially update status of the specified Deployment
5970        This method makes a synchronous HTTP request by default. To make an
5971        asynchronous HTTP request, please pass async_req=True
5972        >>> thread = api.patch_namespaced_deployment_status(name, namespace,
5973        body, async_req=True)
5974        >>> result = thread.get()
5975
5976        :param async_req bool
5977        :param str name: name of the Deployment (required)
5978        :param str namespace: object name and auth scope, such as for teams and
5979        projects (required)
5980        :param object body: (required)
5981        :param str pretty: If 'true', then the output is pretty printed.
5982        :param str dry_run: When present, indicates that modifications should
5983        not be persisted. An invalid or unrecognized dryRun directive will
5984        result in an error response and no further processing of the request.
5985        Valid values are: - All: all dry run stages will be processed
5986        :param str field_manager: fieldManager is a name associated with the
5987        actor or entity that is making these changes. The value must be less
5988        than or 128 characters long, and only contain printable characters, as
5989        defined by https://golang.org/pkg/unicode/#IsPrint. This field is
5990        required for apply requests (application/apply-patch) but optional for
5991        non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
5992        :param bool force: Force is going to \"force\" Apply requests. It means
5993        user will re-acquire conflicting fields owned by other people. Force
5994        flag must be unset for non-apply patch requests.
5995        :return: V1beta2Deployment
5996                 If the method is called asynchronously,
5997                 returns the request thread.
5998        """
5999    kwargs['_return_http_data_only'] = True
6000    if kwargs.get('async_req'):
6001      return self.patch_namespaced_deployment_status_with_http_info(
6002          name, namespace, body, **kwargs)
6003    else:
6004      (data) = self.patch_namespaced_deployment_status_with_http_info(
6005          name, namespace, body, **kwargs)
6006      return data
6007
6008  def patch_namespaced_deployment_status_with_http_info(self, name, namespace,
6009                                                        body, **kwargs):
6010    """
6011        partially update status of the specified Deployment
6012        This method makes a synchronous HTTP request by default. To make an
6013        asynchronous HTTP request, please pass async_req=True
6014        >>> thread = api.patch_namespaced_deployment_status_with_http_info(name,
6015        namespace, body, async_req=True)
6016        >>> result = thread.get()
6017
6018        :param async_req bool
6019        :param str name: name of the Deployment (required)
6020        :param str namespace: object name and auth scope, such as for teams and
6021        projects (required)
6022        :param object body: (required)
6023        :param str pretty: If 'true', then the output is pretty printed.
6024        :param str dry_run: When present, indicates that modifications should
6025        not be persisted. An invalid or unrecognized dryRun directive will
6026        result in an error response and no further processing of the request.
6027        Valid values are: - All: all dry run stages will be processed
6028        :param str field_manager: fieldManager is a name associated with the
6029        actor or entity that is making these changes. The value must be less
6030        than or 128 characters long, and only contain printable characters, as
6031        defined by https://golang.org/pkg/unicode/#IsPrint. This field is
6032        required for apply requests (application/apply-patch) but optional for
6033        non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
6034        :param bool force: Force is going to \"force\" Apply requests. It means
6035        user will re-acquire conflicting fields owned by other people. Force
6036        flag must be unset for non-apply patch requests.
6037        :return: V1beta2Deployment
6038                 If the method is called asynchronously,
6039                 returns the request thread.
6040        """
6041
6042    all_params = [
6043        'name', 'namespace', 'body', 'pretty', 'dry_run', 'field_manager',
6044        'force'
6045    ]
6046    all_params.append('async_req')
6047    all_params.append('_return_http_data_only')
6048    all_params.append('_preload_content')
6049    all_params.append('_request_timeout')
6050
6051    params = locals()
6052    for key, val in iteritems(params['kwargs']):
6053      if key not in all_params:
6054        raise TypeError("Got an unexpected keyword argument '%s'"
6055                        ' to method patch_namespaced_deployment_status' % key)
6056      params[key] = val
6057    del params['kwargs']
6058    # verify the required parameter 'name' is set
6059    if ('name' not in params) or (params['name'] is None):
6060      raise ValueError(
6061          'Missing the required parameter `name` when calling `patch_namespaced_deployment_status`'
6062      )
6063    # verify the required parameter 'namespace' is set
6064    if ('namespace' not in params) or (params['namespace'] is None):
6065      raise ValueError(
6066          'Missing the required parameter `namespace` when calling `patch_namespaced_deployment_status`'
6067      )
6068    # verify the required parameter 'body' is set
6069    if ('body' not in params) or (params['body'] is None):
6070      raise ValueError(
6071          'Missing the required parameter `body` when calling `patch_namespaced_deployment_status`'
6072      )
6073
6074    collection_formats = {}
6075
6076    path_params = {}
6077    if 'name' in params:
6078      path_params['name'] = params['name']
6079    if 'namespace' in params:
6080      path_params['namespace'] = params['namespace']
6081
6082    query_params = []
6083    if 'pretty' in params:
6084      query_params.append(('pretty', params['pretty']))
6085    if 'dry_run' in params:
6086      query_params.append(('dryRun', params['dry_run']))
6087    if 'field_manager' in params:
6088      query_params.append(('fieldManager', params['field_manager']))
6089    if 'force' in params:
6090      query_params.append(('force', params['force']))
6091
6092    header_params = {}
6093
6094    form_params = []
6095    local_var_files = {}
6096
6097    body_params = None
6098    if 'body' in params:
6099      body_params = params['body']
6100    # HTTP header `Accept`
6101    header_params['Accept'] = self.api_client.\
6102        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
6103
6104    # HTTP header `Content-Type`
6105    header_params['Content-Type'] = self.api_client.\
6106        select_header_content_type(['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json'])
6107
6108    # Authentication setting
6109    auth_settings = ['BearerToken']
6110
6111    return self.api_client.call_api(
6112        '/apis/apps/v1beta2/namespaces/{namespace}/deployments/{name}/status',
6113        'PATCH',
6114        path_params,
6115        query_params,
6116        header_params,
6117        body=body_params,
6118        post_params=form_params,
6119        files=local_var_files,
6120        response_type='V1beta2Deployment',
6121        auth_settings=auth_settings,
6122        async_req=params.get('async_req'),
6123        _return_http_data_only=params.get('_return_http_data_only'),
6124        _preload_content=params.get('_preload_content', True),
6125        _request_timeout=params.get('_request_timeout'),
6126        collection_formats=collection_formats)
6127
6128  def patch_namespaced_replica_set(self, name, namespace, body, **kwargs):
6129    """
6130        partially update the specified ReplicaSet
6131        This method makes a synchronous HTTP request by default. To make an
6132        asynchronous HTTP request, please pass async_req=True
6133        >>> thread = api.patch_namespaced_replica_set(name, namespace, body,
6134        async_req=True)
6135        >>> result = thread.get()
6136
6137        :param async_req bool
6138        :param str name: name of the ReplicaSet (required)
6139        :param str namespace: object name and auth scope, such as for teams and
6140        projects (required)
6141        :param object body: (required)
6142        :param str pretty: If 'true', then the output is pretty printed.
6143        :param str dry_run: When present, indicates that modifications should
6144        not be persisted. An invalid or unrecognized dryRun directive will
6145        result in an error response and no further processing of the request.
6146        Valid values are: - All: all dry run stages will be processed
6147        :param str field_manager: fieldManager is a name associated with the
6148        actor or entity that is making these changes. The value must be less
6149        than or 128 characters long, and only contain printable characters, as
6150        defined by https://golang.org/pkg/unicode/#IsPrint. This field is
6151        required for apply requests (application/apply-patch) but optional for
6152        non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
6153        :param bool force: Force is going to \"force\" Apply requests. It means
6154        user will re-acquire conflicting fields owned by other people. Force
6155        flag must be unset for non-apply patch requests.
6156        :return: V1beta2ReplicaSet
6157                 If the method is called asynchronously,
6158                 returns the request thread.
6159        """
6160    kwargs['_return_http_data_only'] = True
6161    if kwargs.get('async_req'):
6162      return self.patch_namespaced_replica_set_with_http_info(
6163          name, namespace, body, **kwargs)
6164    else:
6165      (data) = self.patch_namespaced_replica_set_with_http_info(
6166          name, namespace, body, **kwargs)
6167      return data
6168
6169  def patch_namespaced_replica_set_with_http_info(self, name, namespace, body,
6170                                                  **kwargs):
6171    """
6172        partially update the specified ReplicaSet
6173        This method makes a synchronous HTTP request by default. To make an
6174        asynchronous HTTP request, please pass async_req=True
6175        >>> thread = api.patch_namespaced_replica_set_with_http_info(name,
6176        namespace, body, async_req=True)
6177        >>> result = thread.get()
6178
6179        :param async_req bool
6180        :param str name: name of the ReplicaSet (required)
6181        :param str namespace: object name and auth scope, such as for teams and
6182        projects (required)
6183        :param object body: (required)
6184        :param str pretty: If 'true', then the output is pretty printed.
6185        :param str dry_run: When present, indicates that modifications should
6186        not be persisted. An invalid or unrecognized dryRun directive will
6187        result in an error response and no further processing of the request.
6188        Valid values are: - All: all dry run stages will be processed
6189        :param str field_manager: fieldManager is a name associated with the
6190        actor or entity that is making these changes. The value must be less
6191        than or 128 characters long, and only contain printable characters, as
6192        defined by https://golang.org/pkg/unicode/#IsPrint. This field is
6193        required for apply requests (application/apply-patch) but optional for
6194        non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
6195        :param bool force: Force is going to \"force\" Apply requests. It means
6196        user will re-acquire conflicting fields owned by other people. Force
6197        flag must be unset for non-apply patch requests.
6198        :return: V1beta2ReplicaSet
6199                 If the method is called asynchronously,
6200                 returns the request thread.
6201        """
6202
6203    all_params = [
6204        'name', 'namespace', 'body', 'pretty', 'dry_run', 'field_manager',
6205        'force'
6206    ]
6207    all_params.append('async_req')
6208    all_params.append('_return_http_data_only')
6209    all_params.append('_preload_content')
6210    all_params.append('_request_timeout')
6211
6212    params = locals()
6213    for key, val in iteritems(params['kwargs']):
6214      if key not in all_params:
6215        raise TypeError("Got an unexpected keyword argument '%s'"
6216                        ' to method patch_namespaced_replica_set' % key)
6217      params[key] = val
6218    del params['kwargs']
6219    # verify the required parameter 'name' is set
6220    if ('name' not in params) or (params['name'] is None):
6221      raise ValueError(
6222          'Missing the required parameter `name` when calling `patch_namespaced_replica_set`'
6223      )
6224    # verify the required parameter 'namespace' is set
6225    if ('namespace' not in params) or (params['namespace'] is None):
6226      raise ValueError(
6227          'Missing the required parameter `namespace` when calling `patch_namespaced_replica_set`'
6228      )
6229    # verify the required parameter 'body' is set
6230    if ('body' not in params) or (params['body'] is None):
6231      raise ValueError(
6232          'Missing the required parameter `body` when calling `patch_namespaced_replica_set`'
6233      )
6234
6235    collection_formats = {}
6236
6237    path_params = {}
6238    if 'name' in params:
6239      path_params['name'] = params['name']
6240    if 'namespace' in params:
6241      path_params['namespace'] = params['namespace']
6242
6243    query_params = []
6244    if 'pretty' in params:
6245      query_params.append(('pretty', params['pretty']))
6246    if 'dry_run' in params:
6247      query_params.append(('dryRun', params['dry_run']))
6248    if 'field_manager' in params:
6249      query_params.append(('fieldManager', params['field_manager']))
6250    if 'force' in params:
6251      query_params.append(('force', params['force']))
6252
6253    header_params = {}
6254
6255    form_params = []
6256    local_var_files = {}
6257
6258    body_params = None
6259    if 'body' in params:
6260      body_params = params['body']
6261    # HTTP header `Accept`
6262    header_params['Accept'] = self.api_client.\
6263        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
6264
6265    # HTTP header `Content-Type`
6266    header_params['Content-Type'] = self.api_client.\
6267        select_header_content_type(['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json'])
6268
6269    # Authentication setting
6270    auth_settings = ['BearerToken']
6271
6272    return self.api_client.call_api(
6273        '/apis/apps/v1beta2/namespaces/{namespace}/replicasets/{name}',
6274        'PATCH',
6275        path_params,
6276        query_params,
6277        header_params,
6278        body=body_params,
6279        post_params=form_params,
6280        files=local_var_files,
6281        response_type='V1beta2ReplicaSet',
6282        auth_settings=auth_settings,
6283        async_req=params.get('async_req'),
6284        _return_http_data_only=params.get('_return_http_data_only'),
6285        _preload_content=params.get('_preload_content', True),
6286        _request_timeout=params.get('_request_timeout'),
6287        collection_formats=collection_formats)
6288
6289  def patch_namespaced_replica_set_scale(self, name, namespace, body, **kwargs):
6290    """
6291        partially update scale of the specified ReplicaSet
6292        This method makes a synchronous HTTP request by default. To make an
6293        asynchronous HTTP request, please pass async_req=True
6294        >>> thread = api.patch_namespaced_replica_set_scale(name, namespace,
6295        body, async_req=True)
6296        >>> result = thread.get()
6297
6298        :param async_req bool
6299        :param str name: name of the Scale (required)
6300        :param str namespace: object name and auth scope, such as for teams and
6301        projects (required)
6302        :param object body: (required)
6303        :param str pretty: If 'true', then the output is pretty printed.
6304        :param str dry_run: When present, indicates that modifications should
6305        not be persisted. An invalid or unrecognized dryRun directive will
6306        result in an error response and no further processing of the request.
6307        Valid values are: - All: all dry run stages will be processed
6308        :param str field_manager: fieldManager is a name associated with the
6309        actor or entity that is making these changes. The value must be less
6310        than or 128 characters long, and only contain printable characters, as
6311        defined by https://golang.org/pkg/unicode/#IsPrint. This field is
6312        required for apply requests (application/apply-patch) but optional for
6313        non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
6314        :param bool force: Force is going to \"force\" Apply requests. It means
6315        user will re-acquire conflicting fields owned by other people. Force
6316        flag must be unset for non-apply patch requests.
6317        :return: V1beta2Scale
6318                 If the method is called asynchronously,
6319                 returns the request thread.
6320        """
6321    kwargs['_return_http_data_only'] = True
6322    if kwargs.get('async_req'):
6323      return self.patch_namespaced_replica_set_scale_with_http_info(
6324          name, namespace, body, **kwargs)
6325    else:
6326      (data) = self.patch_namespaced_replica_set_scale_with_http_info(
6327          name, namespace, body, **kwargs)
6328      return data
6329
6330  def patch_namespaced_replica_set_scale_with_http_info(self, name, namespace,
6331                                                        body, **kwargs):
6332    """
6333        partially update scale of the specified ReplicaSet
6334        This method makes a synchronous HTTP request by default. To make an
6335        asynchronous HTTP request, please pass async_req=True
6336        >>> thread = api.patch_namespaced_replica_set_scale_with_http_info(name,
6337        namespace, body, async_req=True)
6338        >>> result = thread.get()
6339
6340        :param async_req bool
6341        :param str name: name of the Scale (required)
6342        :param str namespace: object name and auth scope, such as for teams and
6343        projects (required)
6344        :param object body: (required)
6345        :param str pretty: If 'true', then the output is pretty printed.
6346        :param str dry_run: When present, indicates that modifications should
6347        not be persisted. An invalid or unrecognized dryRun directive will
6348        result in an error response and no further processing of the request.
6349        Valid values are: - All: all dry run stages will be processed
6350        :param str field_manager: fieldManager is a name associated with the
6351        actor or entity that is making these changes. The value must be less
6352        than or 128 characters long, and only contain printable characters, as
6353        defined by https://golang.org/pkg/unicode/#IsPrint. This field is
6354        required for apply requests (application/apply-patch) but optional for
6355        non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
6356        :param bool force: Force is going to \"force\" Apply requests. It means
6357        user will re-acquire conflicting fields owned by other people. Force
6358        flag must be unset for non-apply patch requests.
6359        :return: V1beta2Scale
6360                 If the method is called asynchronously,
6361                 returns the request thread.
6362        """
6363
6364    all_params = [
6365        'name', 'namespace', 'body', 'pretty', 'dry_run', 'field_manager',
6366        'force'
6367    ]
6368    all_params.append('async_req')
6369    all_params.append('_return_http_data_only')
6370    all_params.append('_preload_content')
6371    all_params.append('_request_timeout')
6372
6373    params = locals()
6374    for key, val in iteritems(params['kwargs']):
6375      if key not in all_params:
6376        raise TypeError("Got an unexpected keyword argument '%s'"
6377                        ' to method patch_namespaced_replica_set_scale' % key)
6378      params[key] = val
6379    del params['kwargs']
6380    # verify the required parameter 'name' is set
6381    if ('name' not in params) or (params['name'] is None):
6382      raise ValueError(
6383          'Missing the required parameter `name` when calling `patch_namespaced_replica_set_scale`'
6384      )
6385    # verify the required parameter 'namespace' is set
6386    if ('namespace' not in params) or (params['namespace'] is None):
6387      raise ValueError(
6388          'Missing the required parameter `namespace` when calling `patch_namespaced_replica_set_scale`'
6389      )
6390    # verify the required parameter 'body' is set
6391    if ('body' not in params) or (params['body'] is None):
6392      raise ValueError(
6393          'Missing the required parameter `body` when calling `patch_namespaced_replica_set_scale`'
6394      )
6395
6396    collection_formats = {}
6397
6398    path_params = {}
6399    if 'name' in params:
6400      path_params['name'] = params['name']
6401    if 'namespace' in params:
6402      path_params['namespace'] = params['namespace']
6403
6404    query_params = []
6405    if 'pretty' in params:
6406      query_params.append(('pretty', params['pretty']))
6407    if 'dry_run' in params:
6408      query_params.append(('dryRun', params['dry_run']))
6409    if 'field_manager' in params:
6410      query_params.append(('fieldManager', params['field_manager']))
6411    if 'force' in params:
6412      query_params.append(('force', params['force']))
6413
6414    header_params = {}
6415
6416    form_params = []
6417    local_var_files = {}
6418
6419    body_params = None
6420    if 'body' in params:
6421      body_params = params['body']
6422    # HTTP header `Accept`
6423    header_params['Accept'] = self.api_client.\
6424        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
6425
6426    # HTTP header `Content-Type`
6427    header_params['Content-Type'] = self.api_client.\
6428        select_header_content_type(['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json'])
6429
6430    # Authentication setting
6431    auth_settings = ['BearerToken']
6432
6433    return self.api_client.call_api(
6434        '/apis/apps/v1beta2/namespaces/{namespace}/replicasets/{name}/scale',
6435        'PATCH',
6436        path_params,
6437        query_params,
6438        header_params,
6439        body=body_params,
6440        post_params=form_params,
6441        files=local_var_files,
6442        response_type='V1beta2Scale',
6443        auth_settings=auth_settings,
6444        async_req=params.get('async_req'),
6445        _return_http_data_only=params.get('_return_http_data_only'),
6446        _preload_content=params.get('_preload_content', True),
6447        _request_timeout=params.get('_request_timeout'),
6448        collection_formats=collection_formats)
6449
6450  def patch_namespaced_replica_set_status(self, name, namespace, body,
6451                                          **kwargs):
6452    """
6453        partially update status of the specified ReplicaSet
6454        This method makes a synchronous HTTP request by default. To make an
6455        asynchronous HTTP request, please pass async_req=True
6456        >>> thread = api.patch_namespaced_replica_set_status(name, namespace,
6457        body, async_req=True)
6458        >>> result = thread.get()
6459
6460        :param async_req bool
6461        :param str name: name of the ReplicaSet (required)
6462        :param str namespace: object name and auth scope, such as for teams and
6463        projects (required)
6464        :param object body: (required)
6465        :param str pretty: If 'true', then the output is pretty printed.
6466        :param str dry_run: When present, indicates that modifications should
6467        not be persisted. An invalid or unrecognized dryRun directive will
6468        result in an error response and no further processing of the request.
6469        Valid values are: - All: all dry run stages will be processed
6470        :param str field_manager: fieldManager is a name associated with the
6471        actor or entity that is making these changes. The value must be less
6472        than or 128 characters long, and only contain printable characters, as
6473        defined by https://golang.org/pkg/unicode/#IsPrint. This field is
6474        required for apply requests (application/apply-patch) but optional for
6475        non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
6476        :param bool force: Force is going to \"force\" Apply requests. It means
6477        user will re-acquire conflicting fields owned by other people. Force
6478        flag must be unset for non-apply patch requests.
6479        :return: V1beta2ReplicaSet
6480                 If the method is called asynchronously,
6481                 returns the request thread.
6482        """
6483    kwargs['_return_http_data_only'] = True
6484    if kwargs.get('async_req'):
6485      return self.patch_namespaced_replica_set_status_with_http_info(
6486          name, namespace, body, **kwargs)
6487    else:
6488      (data) = self.patch_namespaced_replica_set_status_with_http_info(
6489          name, namespace, body, **kwargs)
6490      return data
6491
6492  def patch_namespaced_replica_set_status_with_http_info(
6493      self, name, namespace, body, **kwargs):
6494    """
6495        partially update status of the specified ReplicaSet
6496        This method makes a synchronous HTTP request by default. To make an
6497        asynchronous HTTP request, please pass async_req=True
6498        >>> thread =
6499        api.patch_namespaced_replica_set_status_with_http_info(name, namespace,
6500        body, async_req=True)
6501        >>> result = thread.get()
6502
6503        :param async_req bool
6504        :param str name: name of the ReplicaSet (required)
6505        :param str namespace: object name and auth scope, such as for teams and
6506        projects (required)
6507        :param object body: (required)
6508        :param str pretty: If 'true', then the output is pretty printed.
6509        :param str dry_run: When present, indicates that modifications should
6510        not be persisted. An invalid or unrecognized dryRun directive will
6511        result in an error response and no further processing of the request.
6512        Valid values are: - All: all dry run stages will be processed
6513        :param str field_manager: fieldManager is a name associated with the
6514        actor or entity that is making these changes. The value must be less
6515        than or 128 characters long, and only contain printable characters, as
6516        defined by https://golang.org/pkg/unicode/#IsPrint. This field is
6517        required for apply requests (application/apply-patch) but optional for
6518        non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
6519        :param bool force: Force is going to \"force\" Apply requests. It means
6520        user will re-acquire conflicting fields owned by other people. Force
6521        flag must be unset for non-apply patch requests.
6522        :return: V1beta2ReplicaSet
6523                 If the method is called asynchronously,
6524                 returns the request thread.
6525        """
6526
6527    all_params = [
6528        'name', 'namespace', 'body', 'pretty', 'dry_run', 'field_manager',
6529        'force'
6530    ]
6531    all_params.append('async_req')
6532    all_params.append('_return_http_data_only')
6533    all_params.append('_preload_content')
6534    all_params.append('_request_timeout')
6535
6536    params = locals()
6537    for key, val in iteritems(params['kwargs']):
6538      if key not in all_params:
6539        raise TypeError("Got an unexpected keyword argument '%s'"
6540                        ' to method patch_namespaced_replica_set_status' % key)
6541      params[key] = val
6542    del params['kwargs']
6543    # verify the required parameter 'name' is set
6544    if ('name' not in params) or (params['name'] is None):
6545      raise ValueError(
6546          'Missing the required parameter `name` when calling `patch_namespaced_replica_set_status`'
6547      )
6548    # verify the required parameter 'namespace' is set
6549    if ('namespace' not in params) or (params['namespace'] is None):
6550      raise ValueError(
6551          'Missing the required parameter `namespace` when calling `patch_namespaced_replica_set_status`'
6552      )
6553    # verify the required parameter 'body' is set
6554    if ('body' not in params) or (params['body'] is None):
6555      raise ValueError(
6556          'Missing the required parameter `body` when calling `patch_namespaced_replica_set_status`'
6557      )
6558
6559    collection_formats = {}
6560
6561    path_params = {}
6562    if 'name' in params:
6563      path_params['name'] = params['name']
6564    if 'namespace' in params:
6565      path_params['namespace'] = params['namespace']
6566
6567    query_params = []
6568    if 'pretty' in params:
6569      query_params.append(('pretty', params['pretty']))
6570    if 'dry_run' in params:
6571      query_params.append(('dryRun', params['dry_run']))
6572    if 'field_manager' in params:
6573      query_params.append(('fieldManager', params['field_manager']))
6574    if 'force' in params:
6575      query_params.append(('force', params['force']))
6576
6577    header_params = {}
6578
6579    form_params = []
6580    local_var_files = {}
6581
6582    body_params = None
6583    if 'body' in params:
6584      body_params = params['body']
6585    # HTTP header `Accept`
6586    header_params['Accept'] = self.api_client.\
6587        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
6588
6589    # HTTP header `Content-Type`
6590    header_params['Content-Type'] = self.api_client.\
6591        select_header_content_type(['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json'])
6592
6593    # Authentication setting
6594    auth_settings = ['BearerToken']
6595
6596    return self.api_client.call_api(
6597        '/apis/apps/v1beta2/namespaces/{namespace}/replicasets/{name}/status',
6598        'PATCH',
6599        path_params,
6600        query_params,
6601        header_params,
6602        body=body_params,
6603        post_params=form_params,
6604        files=local_var_files,
6605        response_type='V1beta2ReplicaSet',
6606        auth_settings=auth_settings,
6607        async_req=params.get('async_req'),
6608        _return_http_data_only=params.get('_return_http_data_only'),
6609        _preload_content=params.get('_preload_content', True),
6610        _request_timeout=params.get('_request_timeout'),
6611        collection_formats=collection_formats)
6612
6613  def patch_namespaced_stateful_set(self, name, namespace, body, **kwargs):
6614    """
6615        partially update the specified StatefulSet
6616        This method makes a synchronous HTTP request by default. To make an
6617        asynchronous HTTP request, please pass async_req=True
6618        >>> thread = api.patch_namespaced_stateful_set(name, namespace, body,
6619        async_req=True)
6620        >>> result = thread.get()
6621
6622        :param async_req bool
6623        :param str name: name of the StatefulSet (required)
6624        :param str namespace: object name and auth scope, such as for teams and
6625        projects (required)
6626        :param object body: (required)
6627        :param str pretty: If 'true', then the output is pretty printed.
6628        :param str dry_run: When present, indicates that modifications should
6629        not be persisted. An invalid or unrecognized dryRun directive will
6630        result in an error response and no further processing of the request.
6631        Valid values are: - All: all dry run stages will be processed
6632        :param str field_manager: fieldManager is a name associated with the
6633        actor or entity that is making these changes. The value must be less
6634        than or 128 characters long, and only contain printable characters, as
6635        defined by https://golang.org/pkg/unicode/#IsPrint. This field is
6636        required for apply requests (application/apply-patch) but optional for
6637        non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
6638        :param bool force: Force is going to \"force\" Apply requests. It means
6639        user will re-acquire conflicting fields owned by other people. Force
6640        flag must be unset for non-apply patch requests.
6641        :return: V1beta2StatefulSet
6642                 If the method is called asynchronously,
6643                 returns the request thread.
6644        """
6645    kwargs['_return_http_data_only'] = True
6646    if kwargs.get('async_req'):
6647      return self.patch_namespaced_stateful_set_with_http_info(
6648          name, namespace, body, **kwargs)
6649    else:
6650      (data) = self.patch_namespaced_stateful_set_with_http_info(
6651          name, namespace, body, **kwargs)
6652      return data
6653
6654  def patch_namespaced_stateful_set_with_http_info(self, name, namespace, body,
6655                                                   **kwargs):
6656    """
6657        partially update the specified StatefulSet
6658        This method makes a synchronous HTTP request by default. To make an
6659        asynchronous HTTP request, please pass async_req=True
6660        >>> thread = api.patch_namespaced_stateful_set_with_http_info(name,
6661        namespace, body, async_req=True)
6662        >>> result = thread.get()
6663
6664        :param async_req bool
6665        :param str name: name of the StatefulSet (required)
6666        :param str namespace: object name and auth scope, such as for teams and
6667        projects (required)
6668        :param object body: (required)
6669        :param str pretty: If 'true', then the output is pretty printed.
6670        :param str dry_run: When present, indicates that modifications should
6671        not be persisted. An invalid or unrecognized dryRun directive will
6672        result in an error response and no further processing of the request.
6673        Valid values are: - All: all dry run stages will be processed
6674        :param str field_manager: fieldManager is a name associated with the
6675        actor or entity that is making these changes. The value must be less
6676        than or 128 characters long, and only contain printable characters, as
6677        defined by https://golang.org/pkg/unicode/#IsPrint. This field is
6678        required for apply requests (application/apply-patch) but optional for
6679        non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
6680        :param bool force: Force is going to \"force\" Apply requests. It means
6681        user will re-acquire conflicting fields owned by other people. Force
6682        flag must be unset for non-apply patch requests.
6683        :return: V1beta2StatefulSet
6684                 If the method is called asynchronously,
6685                 returns the request thread.
6686        """
6687
6688    all_params = [
6689        'name', 'namespace', 'body', 'pretty', 'dry_run', 'field_manager',
6690        'force'
6691    ]
6692    all_params.append('async_req')
6693    all_params.append('_return_http_data_only')
6694    all_params.append('_preload_content')
6695    all_params.append('_request_timeout')
6696
6697    params = locals()
6698    for key, val in iteritems(params['kwargs']):
6699      if key not in all_params:
6700        raise TypeError("Got an unexpected keyword argument '%s'"
6701                        ' to method patch_namespaced_stateful_set' % key)
6702      params[key] = val
6703    del params['kwargs']
6704    # verify the required parameter 'name' is set
6705    if ('name' not in params) or (params['name'] is None):
6706      raise ValueError(
6707          'Missing the required parameter `name` when calling `patch_namespaced_stateful_set`'
6708      )
6709    # verify the required parameter 'namespace' is set
6710    if ('namespace' not in params) or (params['namespace'] is None):
6711      raise ValueError(
6712          'Missing the required parameter `namespace` when calling `patch_namespaced_stateful_set`'
6713      )
6714    # verify the required parameter 'body' is set
6715    if ('body' not in params) or (params['body'] is None):
6716      raise ValueError(
6717          'Missing the required parameter `body` when calling `patch_namespaced_stateful_set`'
6718      )
6719
6720    collection_formats = {}
6721
6722    path_params = {}
6723    if 'name' in params:
6724      path_params['name'] = params['name']
6725    if 'namespace' in params:
6726      path_params['namespace'] = params['namespace']
6727
6728    query_params = []
6729    if 'pretty' in params:
6730      query_params.append(('pretty', params['pretty']))
6731    if 'dry_run' in params:
6732      query_params.append(('dryRun', params['dry_run']))
6733    if 'field_manager' in params:
6734      query_params.append(('fieldManager', params['field_manager']))
6735    if 'force' in params:
6736      query_params.append(('force', params['force']))
6737
6738    header_params = {}
6739
6740    form_params = []
6741    local_var_files = {}
6742
6743    body_params = None
6744    if 'body' in params:
6745      body_params = params['body']
6746    # HTTP header `Accept`
6747    header_params['Accept'] = self.api_client.\
6748        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
6749
6750    # HTTP header `Content-Type`
6751    header_params['Content-Type'] = self.api_client.\
6752        select_header_content_type(['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json'])
6753
6754    # Authentication setting
6755    auth_settings = ['BearerToken']
6756
6757    return self.api_client.call_api(
6758        '/apis/apps/v1beta2/namespaces/{namespace}/statefulsets/{name}',
6759        'PATCH',
6760        path_params,
6761        query_params,
6762        header_params,
6763        body=body_params,
6764        post_params=form_params,
6765        files=local_var_files,
6766        response_type='V1beta2StatefulSet',
6767        auth_settings=auth_settings,
6768        async_req=params.get('async_req'),
6769        _return_http_data_only=params.get('_return_http_data_only'),
6770        _preload_content=params.get('_preload_content', True),
6771        _request_timeout=params.get('_request_timeout'),
6772        collection_formats=collection_formats)
6773
6774  def patch_namespaced_stateful_set_scale(self, name, namespace, body,
6775                                          **kwargs):
6776    """
6777        partially update scale of the specified StatefulSet
6778        This method makes a synchronous HTTP request by default. To make an
6779        asynchronous HTTP request, please pass async_req=True
6780        >>> thread = api.patch_namespaced_stateful_set_scale(name, namespace,
6781        body, async_req=True)
6782        >>> result = thread.get()
6783
6784        :param async_req bool
6785        :param str name: name of the Scale (required)
6786        :param str namespace: object name and auth scope, such as for teams and
6787        projects (required)
6788        :param object body: (required)
6789        :param str pretty: If 'true', then the output is pretty printed.
6790        :param str dry_run: When present, indicates that modifications should
6791        not be persisted. An invalid or unrecognized dryRun directive will
6792        result in an error response and no further processing of the request.
6793        Valid values are: - All: all dry run stages will be processed
6794        :param str field_manager: fieldManager is a name associated with the
6795        actor or entity that is making these changes. The value must be less
6796        than or 128 characters long, and only contain printable characters, as
6797        defined by https://golang.org/pkg/unicode/#IsPrint. This field is
6798        required for apply requests (application/apply-patch) but optional for
6799        non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
6800        :param bool force: Force is going to \"force\" Apply requests. It means
6801        user will re-acquire conflicting fields owned by other people. Force
6802        flag must be unset for non-apply patch requests.
6803        :return: V1beta2Scale
6804                 If the method is called asynchronously,
6805                 returns the request thread.
6806        """
6807    kwargs['_return_http_data_only'] = True
6808    if kwargs.get('async_req'):
6809      return self.patch_namespaced_stateful_set_scale_with_http_info(
6810          name, namespace, body, **kwargs)
6811    else:
6812      (data) = self.patch_namespaced_stateful_set_scale_with_http_info(
6813          name, namespace, body, **kwargs)
6814      return data
6815
6816  def patch_namespaced_stateful_set_scale_with_http_info(
6817      self, name, namespace, body, **kwargs):
6818    """
6819        partially update scale of the specified StatefulSet
6820        This method makes a synchronous HTTP request by default. To make an
6821        asynchronous HTTP request, please pass async_req=True
6822        >>> thread =
6823        api.patch_namespaced_stateful_set_scale_with_http_info(name, namespace,
6824        body, async_req=True)
6825        >>> result = thread.get()
6826
6827        :param async_req bool
6828        :param str name: name of the Scale (required)
6829        :param str namespace: object name and auth scope, such as for teams and
6830        projects (required)
6831        :param object body: (required)
6832        :param str pretty: If 'true', then the output is pretty printed.
6833        :param str dry_run: When present, indicates that modifications should
6834        not be persisted. An invalid or unrecognized dryRun directive will
6835        result in an error response and no further processing of the request.
6836        Valid values are: - All: all dry run stages will be processed
6837        :param str field_manager: fieldManager is a name associated with the
6838        actor or entity that is making these changes. The value must be less
6839        than or 128 characters long, and only contain printable characters, as
6840        defined by https://golang.org/pkg/unicode/#IsPrint. This field is
6841        required for apply requests (application/apply-patch) but optional for
6842        non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
6843        :param bool force: Force is going to \"force\" Apply requests. It means
6844        user will re-acquire conflicting fields owned by other people. Force
6845        flag must be unset for non-apply patch requests.
6846        :return: V1beta2Scale
6847                 If the method is called asynchronously,
6848                 returns the request thread.
6849        """
6850
6851    all_params = [
6852        'name', 'namespace', 'body', 'pretty', 'dry_run', 'field_manager',
6853        'force'
6854    ]
6855    all_params.append('async_req')
6856    all_params.append('_return_http_data_only')
6857    all_params.append('_preload_content')
6858    all_params.append('_request_timeout')
6859
6860    params = locals()
6861    for key, val in iteritems(params['kwargs']):
6862      if key not in all_params:
6863        raise TypeError("Got an unexpected keyword argument '%s'"
6864                        ' to method patch_namespaced_stateful_set_scale' % key)
6865      params[key] = val
6866    del params['kwargs']
6867    # verify the required parameter 'name' is set
6868    if ('name' not in params) or (params['name'] is None):
6869      raise ValueError(
6870          'Missing the required parameter `name` when calling `patch_namespaced_stateful_set_scale`'
6871      )
6872    # verify the required parameter 'namespace' is set
6873    if ('namespace' not in params) or (params['namespace'] is None):
6874      raise ValueError(
6875          'Missing the required parameter `namespace` when calling `patch_namespaced_stateful_set_scale`'
6876      )
6877    # verify the required parameter 'body' is set
6878    if ('body' not in params) or (params['body'] is None):
6879      raise ValueError(
6880          'Missing the required parameter `body` when calling `patch_namespaced_stateful_set_scale`'
6881      )
6882
6883    collection_formats = {}
6884
6885    path_params = {}
6886    if 'name' in params:
6887      path_params['name'] = params['name']
6888    if 'namespace' in params:
6889      path_params['namespace'] = params['namespace']
6890
6891    query_params = []
6892    if 'pretty' in params:
6893      query_params.append(('pretty', params['pretty']))
6894    if 'dry_run' in params:
6895      query_params.append(('dryRun', params['dry_run']))
6896    if 'field_manager' in params:
6897      query_params.append(('fieldManager', params['field_manager']))
6898    if 'force' in params:
6899      query_params.append(('force', params['force']))
6900
6901    header_params = {}
6902
6903    form_params = []
6904    local_var_files = {}
6905
6906    body_params = None
6907    if 'body' in params:
6908      body_params = params['body']
6909    # HTTP header `Accept`
6910    header_params['Accept'] = self.api_client.\
6911        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
6912
6913    # HTTP header `Content-Type`
6914    header_params['Content-Type'] = self.api_client.\
6915        select_header_content_type(['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json'])
6916
6917    # Authentication setting
6918    auth_settings = ['BearerToken']
6919
6920    return self.api_client.call_api(
6921        '/apis/apps/v1beta2/namespaces/{namespace}/statefulsets/{name}/scale',
6922        'PATCH',
6923        path_params,
6924        query_params,
6925        header_params,
6926        body=body_params,
6927        post_params=form_params,
6928        files=local_var_files,
6929        response_type='V1beta2Scale',
6930        auth_settings=auth_settings,
6931        async_req=params.get('async_req'),
6932        _return_http_data_only=params.get('_return_http_data_only'),
6933        _preload_content=params.get('_preload_content', True),
6934        _request_timeout=params.get('_request_timeout'),
6935        collection_formats=collection_formats)
6936
6937  def patch_namespaced_stateful_set_status(self, name, namespace, body,
6938                                           **kwargs):
6939    """
6940        partially update status of the specified StatefulSet
6941        This method makes a synchronous HTTP request by default. To make an
6942        asynchronous HTTP request, please pass async_req=True
6943        >>> thread = api.patch_namespaced_stateful_set_status(name, namespace,
6944        body, async_req=True)
6945        >>> result = thread.get()
6946
6947        :param async_req bool
6948        :param str name: name of the StatefulSet (required)
6949        :param str namespace: object name and auth scope, such as for teams and
6950        projects (required)
6951        :param object body: (required)
6952        :param str pretty: If 'true', then the output is pretty printed.
6953        :param str dry_run: When present, indicates that modifications should
6954        not be persisted. An invalid or unrecognized dryRun directive will
6955        result in an error response and no further processing of the request.
6956        Valid values are: - All: all dry run stages will be processed
6957        :param str field_manager: fieldManager is a name associated with the
6958        actor or entity that is making these changes. The value must be less
6959        than or 128 characters long, and only contain printable characters, as
6960        defined by https://golang.org/pkg/unicode/#IsPrint. This field is
6961        required for apply requests (application/apply-patch) but optional for
6962        non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
6963        :param bool force: Force is going to \"force\" Apply requests. It means
6964        user will re-acquire conflicting fields owned by other people. Force
6965        flag must be unset for non-apply patch requests.
6966        :return: V1beta2StatefulSet
6967                 If the method is called asynchronously,
6968                 returns the request thread.
6969        """
6970    kwargs['_return_http_data_only'] = True
6971    if kwargs.get('async_req'):
6972      return self.patch_namespaced_stateful_set_status_with_http_info(
6973          name, namespace, body, **kwargs)
6974    else:
6975      (data) = self.patch_namespaced_stateful_set_status_with_http_info(
6976          name, namespace, body, **kwargs)
6977      return data
6978
6979  def patch_namespaced_stateful_set_status_with_http_info(
6980      self, name, namespace, body, **kwargs):
6981    """
6982        partially update status of the specified StatefulSet
6983        This method makes a synchronous HTTP request by default. To make an
6984        asynchronous HTTP request, please pass async_req=True
6985        >>> thread =
6986        api.patch_namespaced_stateful_set_status_with_http_info(name, namespace,
6987        body, async_req=True)
6988        >>> result = thread.get()
6989
6990        :param async_req bool
6991        :param str name: name of the StatefulSet (required)
6992        :param str namespace: object name and auth scope, such as for teams and
6993        projects (required)
6994        :param object body: (required)
6995        :param str pretty: If 'true', then the output is pretty printed.
6996        :param str dry_run: When present, indicates that modifications should
6997        not be persisted. An invalid or unrecognized dryRun directive will
6998        result in an error response and no further processing of the request.
6999        Valid values are: - All: all dry run stages will be processed
7000        :param str field_manager: fieldManager is a name associated with the
7001        actor or entity that is making these changes. The value must be less
7002        than or 128 characters long, and only contain printable characters, as
7003        defined by https://golang.org/pkg/unicode/#IsPrint. This field is
7004        required for apply requests (application/apply-patch) but optional for
7005        non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
7006        :param bool force: Force is going to \"force\" Apply requests. It means
7007        user will re-acquire conflicting fields owned by other people. Force
7008        flag must be unset for non-apply patch requests.
7009        :return: V1beta2StatefulSet
7010                 If the method is called asynchronously,
7011                 returns the request thread.
7012        """
7013
7014    all_params = [
7015        'name', 'namespace', 'body', 'pretty', 'dry_run', 'field_manager',
7016        'force'
7017    ]
7018    all_params.append('async_req')
7019    all_params.append('_return_http_data_only')
7020    all_params.append('_preload_content')
7021    all_params.append('_request_timeout')
7022
7023    params = locals()
7024    for key, val in iteritems(params['kwargs']):
7025      if key not in all_params:
7026        raise TypeError("Got an unexpected keyword argument '%s'"
7027                        ' to method patch_namespaced_stateful_set_status' % key)
7028      params[key] = val
7029    del params['kwargs']
7030    # verify the required parameter 'name' is set
7031    if ('name' not in params) or (params['name'] is None):
7032      raise ValueError(
7033          'Missing the required parameter `name` when calling `patch_namespaced_stateful_set_status`'
7034      )
7035    # verify the required parameter 'namespace' is set
7036    if ('namespace' not in params) or (params['namespace'] is None):
7037      raise ValueError(
7038          'Missing the required parameter `namespace` when calling `patch_namespaced_stateful_set_status`'
7039      )
7040    # verify the required parameter 'body' is set
7041    if ('body' not in params) or (params['body'] is None):
7042      raise ValueError(
7043          'Missing the required parameter `body` when calling `patch_namespaced_stateful_set_status`'
7044      )
7045
7046    collection_formats = {}
7047
7048    path_params = {}
7049    if 'name' in params:
7050      path_params['name'] = params['name']
7051    if 'namespace' in params:
7052      path_params['namespace'] = params['namespace']
7053
7054    query_params = []
7055    if 'pretty' in params:
7056      query_params.append(('pretty', params['pretty']))
7057    if 'dry_run' in params:
7058      query_params.append(('dryRun', params['dry_run']))
7059    if 'field_manager' in params:
7060      query_params.append(('fieldManager', params['field_manager']))
7061    if 'force' in params:
7062      query_params.append(('force', params['force']))
7063
7064    header_params = {}
7065
7066    form_params = []
7067    local_var_files = {}
7068
7069    body_params = None
7070    if 'body' in params:
7071      body_params = params['body']
7072    # HTTP header `Accept`
7073    header_params['Accept'] = self.api_client.\
7074        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
7075
7076    # HTTP header `Content-Type`
7077    header_params['Content-Type'] = self.api_client.\
7078        select_header_content_type(['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json'])
7079
7080    # Authentication setting
7081    auth_settings = ['BearerToken']
7082
7083    return self.api_client.call_api(
7084        '/apis/apps/v1beta2/namespaces/{namespace}/statefulsets/{name}/status',
7085        'PATCH',
7086        path_params,
7087        query_params,
7088        header_params,
7089        body=body_params,
7090        post_params=form_params,
7091        files=local_var_files,
7092        response_type='V1beta2StatefulSet',
7093        auth_settings=auth_settings,
7094        async_req=params.get('async_req'),
7095        _return_http_data_only=params.get('_return_http_data_only'),
7096        _preload_content=params.get('_preload_content', True),
7097        _request_timeout=params.get('_request_timeout'),
7098        collection_formats=collection_formats)
7099
7100  def read_namespaced_controller_revision(self, name, namespace, **kwargs):
7101    """
7102        read the specified ControllerRevision
7103        This method makes a synchronous HTTP request by default. To make an
7104        asynchronous HTTP request, please pass async_req=True
7105        >>> thread = api.read_namespaced_controller_revision(name, namespace,
7106        async_req=True)
7107        >>> result = thread.get()
7108
7109        :param async_req bool
7110        :param str name: name of the ControllerRevision (required)
7111        :param str namespace: object name and auth scope, such as for teams and
7112        projects (required)
7113        :param str pretty: If 'true', then the output is pretty printed.
7114        :param bool exact: Should the export be exact.  Exact export maintains
7115        cluster-specific fields like 'Namespace'. Deprecated. Planned for
7116        removal in 1.18.
7117        :param bool export: Should this value be exported.  Export strips fields
7118        that a user can not specify. Deprecated. Planned for removal in 1.18.
7119        :return: V1beta2ControllerRevision
7120                 If the method is called asynchronously,
7121                 returns the request thread.
7122        """
7123    kwargs['_return_http_data_only'] = True
7124    if kwargs.get('async_req'):
7125      return self.read_namespaced_controller_revision_with_http_info(
7126          name, namespace, **kwargs)
7127    else:
7128      (data) = self.read_namespaced_controller_revision_with_http_info(
7129          name, namespace, **kwargs)
7130      return data
7131
7132  def read_namespaced_controller_revision_with_http_info(
7133      self, name, namespace, **kwargs):
7134    """
7135        read the specified ControllerRevision
7136        This method makes a synchronous HTTP request by default. To make an
7137        asynchronous HTTP request, please pass async_req=True
7138        >>> thread =
7139        api.read_namespaced_controller_revision_with_http_info(name, namespace,
7140        async_req=True)
7141        >>> result = thread.get()
7142
7143        :param async_req bool
7144        :param str name: name of the ControllerRevision (required)
7145        :param str namespace: object name and auth scope, such as for teams and
7146        projects (required)
7147        :param str pretty: If 'true', then the output is pretty printed.
7148        :param bool exact: Should the export be exact.  Exact export maintains
7149        cluster-specific fields like 'Namespace'. Deprecated. Planned for
7150        removal in 1.18.
7151        :param bool export: Should this value be exported.  Export strips fields
7152        that a user can not specify. Deprecated. Planned for removal in 1.18.
7153        :return: V1beta2ControllerRevision
7154                 If the method is called asynchronously,
7155                 returns the request thread.
7156        """
7157
7158    all_params = ['name', 'namespace', 'pretty', 'exact', 'export']
7159    all_params.append('async_req')
7160    all_params.append('_return_http_data_only')
7161    all_params.append('_preload_content')
7162    all_params.append('_request_timeout')
7163
7164    params = locals()
7165    for key, val in iteritems(params['kwargs']):
7166      if key not in all_params:
7167        raise TypeError("Got an unexpected keyword argument '%s'"
7168                        ' to method read_namespaced_controller_revision' % key)
7169      params[key] = val
7170    del params['kwargs']
7171    # verify the required parameter 'name' is set
7172    if ('name' not in params) or (params['name'] is None):
7173      raise ValueError(
7174          'Missing the required parameter `name` when calling `read_namespaced_controller_revision`'
7175      )
7176    # verify the required parameter 'namespace' is set
7177    if ('namespace' not in params) or (params['namespace'] is None):
7178      raise ValueError(
7179          'Missing the required parameter `namespace` when calling `read_namespaced_controller_revision`'
7180      )
7181
7182    collection_formats = {}
7183
7184    path_params = {}
7185    if 'name' in params:
7186      path_params['name'] = params['name']
7187    if 'namespace' in params:
7188      path_params['namespace'] = params['namespace']
7189
7190    query_params = []
7191    if 'pretty' in params:
7192      query_params.append(('pretty', params['pretty']))
7193    if 'exact' in params:
7194      query_params.append(('exact', params['exact']))
7195    if 'export' in params:
7196      query_params.append(('export', params['export']))
7197
7198    header_params = {}
7199
7200    form_params = []
7201    local_var_files = {}
7202
7203    body_params = None
7204    # HTTP header `Accept`
7205    header_params['Accept'] = self.api_client.\
7206        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
7207
7208    # HTTP header `Content-Type`
7209    header_params['Content-Type'] = self.api_client.\
7210        select_header_content_type(['*/*'])
7211
7212    # Authentication setting
7213    auth_settings = ['BearerToken']
7214
7215    return self.api_client.call_api(
7216        '/apis/apps/v1beta2/namespaces/{namespace}/controllerrevisions/{name}',
7217        'GET',
7218        path_params,
7219        query_params,
7220        header_params,
7221        body=body_params,
7222        post_params=form_params,
7223        files=local_var_files,
7224        response_type='V1beta2ControllerRevision',
7225        auth_settings=auth_settings,
7226        async_req=params.get('async_req'),
7227        _return_http_data_only=params.get('_return_http_data_only'),
7228        _preload_content=params.get('_preload_content', True),
7229        _request_timeout=params.get('_request_timeout'),
7230        collection_formats=collection_formats)
7231
7232  def read_namespaced_daemon_set(self, name, namespace, **kwargs):
7233    """
7234        read the specified DaemonSet
7235        This method makes a synchronous HTTP request by default. To make an
7236        asynchronous HTTP request, please pass async_req=True
7237        >>> thread = api.read_namespaced_daemon_set(name, namespace,
7238        async_req=True)
7239        >>> result = thread.get()
7240
7241        :param async_req bool
7242        :param str name: name of the DaemonSet (required)
7243        :param str namespace: object name and auth scope, such as for teams and
7244        projects (required)
7245        :param str pretty: If 'true', then the output is pretty printed.
7246        :param bool exact: Should the export be exact.  Exact export maintains
7247        cluster-specific fields like 'Namespace'. Deprecated. Planned for
7248        removal in 1.18.
7249        :param bool export: Should this value be exported.  Export strips fields
7250        that a user can not specify. Deprecated. Planned for removal in 1.18.
7251        :return: V1beta2DaemonSet
7252                 If the method is called asynchronously,
7253                 returns the request thread.
7254        """
7255    kwargs['_return_http_data_only'] = True
7256    if kwargs.get('async_req'):
7257      return self.read_namespaced_daemon_set_with_http_info(
7258          name, namespace, **kwargs)
7259    else:
7260      (data) = self.read_namespaced_daemon_set_with_http_info(
7261          name, namespace, **kwargs)
7262      return data
7263
7264  def read_namespaced_daemon_set_with_http_info(self, name, namespace,
7265                                                **kwargs):
7266    """
7267        read the specified DaemonSet
7268        This method makes a synchronous HTTP request by default. To make an
7269        asynchronous HTTP request, please pass async_req=True
7270        >>> thread = api.read_namespaced_daemon_set_with_http_info(name,
7271        namespace, async_req=True)
7272        >>> result = thread.get()
7273
7274        :param async_req bool
7275        :param str name: name of the DaemonSet (required)
7276        :param str namespace: object name and auth scope, such as for teams and
7277        projects (required)
7278        :param str pretty: If 'true', then the output is pretty printed.
7279        :param bool exact: Should the export be exact.  Exact export maintains
7280        cluster-specific fields like 'Namespace'. Deprecated. Planned for
7281        removal in 1.18.
7282        :param bool export: Should this value be exported.  Export strips fields
7283        that a user can not specify. Deprecated. Planned for removal in 1.18.
7284        :return: V1beta2DaemonSet
7285                 If the method is called asynchronously,
7286                 returns the request thread.
7287        """
7288
7289    all_params = ['name', 'namespace', 'pretty', 'exact', 'export']
7290    all_params.append('async_req')
7291    all_params.append('_return_http_data_only')
7292    all_params.append('_preload_content')
7293    all_params.append('_request_timeout')
7294
7295    params = locals()
7296    for key, val in iteritems(params['kwargs']):
7297      if key not in all_params:
7298        raise TypeError("Got an unexpected keyword argument '%s'"
7299                        ' to method read_namespaced_daemon_set' % key)
7300      params[key] = val
7301    del params['kwargs']
7302    # verify the required parameter 'name' is set
7303    if ('name' not in params) or (params['name'] is None):
7304      raise ValueError(
7305          'Missing the required parameter `name` when calling `read_namespaced_daemon_set`'
7306      )
7307    # verify the required parameter 'namespace' is set
7308    if ('namespace' not in params) or (params['namespace'] is None):
7309      raise ValueError(
7310          'Missing the required parameter `namespace` when calling `read_namespaced_daemon_set`'
7311      )
7312
7313    collection_formats = {}
7314
7315    path_params = {}
7316    if 'name' in params:
7317      path_params['name'] = params['name']
7318    if 'namespace' in params:
7319      path_params['namespace'] = params['namespace']
7320
7321    query_params = []
7322    if 'pretty' in params:
7323      query_params.append(('pretty', params['pretty']))
7324    if 'exact' in params:
7325      query_params.append(('exact', params['exact']))
7326    if 'export' in params:
7327      query_params.append(('export', params['export']))
7328
7329    header_params = {}
7330
7331    form_params = []
7332    local_var_files = {}
7333
7334    body_params = None
7335    # HTTP header `Accept`
7336    header_params['Accept'] = self.api_client.\
7337        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
7338
7339    # HTTP header `Content-Type`
7340    header_params['Content-Type'] = self.api_client.\
7341        select_header_content_type(['*/*'])
7342
7343    # Authentication setting
7344    auth_settings = ['BearerToken']
7345
7346    return self.api_client.call_api(
7347        '/apis/apps/v1beta2/namespaces/{namespace}/daemonsets/{name}',
7348        'GET',
7349        path_params,
7350        query_params,
7351        header_params,
7352        body=body_params,
7353        post_params=form_params,
7354        files=local_var_files,
7355        response_type='V1beta2DaemonSet',
7356        auth_settings=auth_settings,
7357        async_req=params.get('async_req'),
7358        _return_http_data_only=params.get('_return_http_data_only'),
7359        _preload_content=params.get('_preload_content', True),
7360        _request_timeout=params.get('_request_timeout'),
7361        collection_formats=collection_formats)
7362
7363  def read_namespaced_daemon_set_status(self, name, namespace, **kwargs):
7364    """
7365        read status of the specified DaemonSet
7366        This method makes a synchronous HTTP request by default. To make an
7367        asynchronous HTTP request, please pass async_req=True
7368        >>> thread = api.read_namespaced_daemon_set_status(name, namespace,
7369        async_req=True)
7370        >>> result = thread.get()
7371
7372        :param async_req bool
7373        :param str name: name of the DaemonSet (required)
7374        :param str namespace: object name and auth scope, such as for teams and
7375        projects (required)
7376        :param str pretty: If 'true', then the output is pretty printed.
7377        :return: V1beta2DaemonSet
7378                 If the method is called asynchronously,
7379                 returns the request thread.
7380        """
7381    kwargs['_return_http_data_only'] = True
7382    if kwargs.get('async_req'):
7383      return self.read_namespaced_daemon_set_status_with_http_info(
7384          name, namespace, **kwargs)
7385    else:
7386      (data) = self.read_namespaced_daemon_set_status_with_http_info(
7387          name, namespace, **kwargs)
7388      return data
7389
7390  def read_namespaced_daemon_set_status_with_http_info(self, name, namespace,
7391                                                       **kwargs):
7392    """
7393        read status of the specified DaemonSet
7394        This method makes a synchronous HTTP request by default. To make an
7395        asynchronous HTTP request, please pass async_req=True
7396        >>> thread = api.read_namespaced_daemon_set_status_with_http_info(name,
7397        namespace, async_req=True)
7398        >>> result = thread.get()
7399
7400        :param async_req bool
7401        :param str name: name of the DaemonSet (required)
7402        :param str namespace: object name and auth scope, such as for teams and
7403        projects (required)
7404        :param str pretty: If 'true', then the output is pretty printed.
7405        :return: V1beta2DaemonSet
7406                 If the method is called asynchronously,
7407                 returns the request thread.
7408        """
7409
7410    all_params = ['name', 'namespace', 'pretty']
7411    all_params.append('async_req')
7412    all_params.append('_return_http_data_only')
7413    all_params.append('_preload_content')
7414    all_params.append('_request_timeout')
7415
7416    params = locals()
7417    for key, val in iteritems(params['kwargs']):
7418      if key not in all_params:
7419        raise TypeError("Got an unexpected keyword argument '%s'"
7420                        ' to method read_namespaced_daemon_set_status' % key)
7421      params[key] = val
7422    del params['kwargs']
7423    # verify the required parameter 'name' is set
7424    if ('name' not in params) or (params['name'] is None):
7425      raise ValueError(
7426          'Missing the required parameter `name` when calling `read_namespaced_daemon_set_status`'
7427      )
7428    # verify the required parameter 'namespace' is set
7429    if ('namespace' not in params) or (params['namespace'] is None):
7430      raise ValueError(
7431          'Missing the required parameter `namespace` when calling `read_namespaced_daemon_set_status`'
7432      )
7433
7434    collection_formats = {}
7435
7436    path_params = {}
7437    if 'name' in params:
7438      path_params['name'] = params['name']
7439    if 'namespace' in params:
7440      path_params['namespace'] = params['namespace']
7441
7442    query_params = []
7443    if 'pretty' in params:
7444      query_params.append(('pretty', params['pretty']))
7445
7446    header_params = {}
7447
7448    form_params = []
7449    local_var_files = {}
7450
7451    body_params = None
7452    # HTTP header `Accept`
7453    header_params['Accept'] = self.api_client.\
7454        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
7455
7456    # HTTP header `Content-Type`
7457    header_params['Content-Type'] = self.api_client.\
7458        select_header_content_type(['*/*'])
7459
7460    # Authentication setting
7461    auth_settings = ['BearerToken']
7462
7463    return self.api_client.call_api(
7464        '/apis/apps/v1beta2/namespaces/{namespace}/daemonsets/{name}/status',
7465        'GET',
7466        path_params,
7467        query_params,
7468        header_params,
7469        body=body_params,
7470        post_params=form_params,
7471        files=local_var_files,
7472        response_type='V1beta2DaemonSet',
7473        auth_settings=auth_settings,
7474        async_req=params.get('async_req'),
7475        _return_http_data_only=params.get('_return_http_data_only'),
7476        _preload_content=params.get('_preload_content', True),
7477        _request_timeout=params.get('_request_timeout'),
7478        collection_formats=collection_formats)
7479
7480  def read_namespaced_deployment(self, name, namespace, **kwargs):
7481    """
7482        read the specified Deployment
7483        This method makes a synchronous HTTP request by default. To make an
7484        asynchronous HTTP request, please pass async_req=True
7485        >>> thread = api.read_namespaced_deployment(name, namespace,
7486        async_req=True)
7487        >>> result = thread.get()
7488
7489        :param async_req bool
7490        :param str name: name of the Deployment (required)
7491        :param str namespace: object name and auth scope, such as for teams and
7492        projects (required)
7493        :param str pretty: If 'true', then the output is pretty printed.
7494        :param bool exact: Should the export be exact.  Exact export maintains
7495        cluster-specific fields like 'Namespace'. Deprecated. Planned for
7496        removal in 1.18.
7497        :param bool export: Should this value be exported.  Export strips fields
7498        that a user can not specify. Deprecated. Planned for removal in 1.18.
7499        :return: V1beta2Deployment
7500                 If the method is called asynchronously,
7501                 returns the request thread.
7502        """
7503    kwargs['_return_http_data_only'] = True
7504    if kwargs.get('async_req'):
7505      return self.read_namespaced_deployment_with_http_info(
7506          name, namespace, **kwargs)
7507    else:
7508      (data) = self.read_namespaced_deployment_with_http_info(
7509          name, namespace, **kwargs)
7510      return data
7511
7512  def read_namespaced_deployment_with_http_info(self, name, namespace,
7513                                                **kwargs):
7514    """
7515        read the specified Deployment
7516        This method makes a synchronous HTTP request by default. To make an
7517        asynchronous HTTP request, please pass async_req=True
7518        >>> thread = api.read_namespaced_deployment_with_http_info(name,
7519        namespace, async_req=True)
7520        >>> result = thread.get()
7521
7522        :param async_req bool
7523        :param str name: name of the Deployment (required)
7524        :param str namespace: object name and auth scope, such as for teams and
7525        projects (required)
7526        :param str pretty: If 'true', then the output is pretty printed.
7527        :param bool exact: Should the export be exact.  Exact export maintains
7528        cluster-specific fields like 'Namespace'. Deprecated. Planned for
7529        removal in 1.18.
7530        :param bool export: Should this value be exported.  Export strips fields
7531        that a user can not specify. Deprecated. Planned for removal in 1.18.
7532        :return: V1beta2Deployment
7533                 If the method is called asynchronously,
7534                 returns the request thread.
7535        """
7536
7537    all_params = ['name', 'namespace', 'pretty', 'exact', 'export']
7538    all_params.append('async_req')
7539    all_params.append('_return_http_data_only')
7540    all_params.append('_preload_content')
7541    all_params.append('_request_timeout')
7542
7543    params = locals()
7544    for key, val in iteritems(params['kwargs']):
7545      if key not in all_params:
7546        raise TypeError("Got an unexpected keyword argument '%s'"
7547                        ' to method read_namespaced_deployment' % key)
7548      params[key] = val
7549    del params['kwargs']
7550    # verify the required parameter 'name' is set
7551    if ('name' not in params) or (params['name'] is None):
7552      raise ValueError(
7553          'Missing the required parameter `name` when calling `read_namespaced_deployment`'
7554      )
7555    # verify the required parameter 'namespace' is set
7556    if ('namespace' not in params) or (params['namespace'] is None):
7557      raise ValueError(
7558          'Missing the required parameter `namespace` when calling `read_namespaced_deployment`'
7559      )
7560
7561    collection_formats = {}
7562
7563    path_params = {}
7564    if 'name' in params:
7565      path_params['name'] = params['name']
7566    if 'namespace' in params:
7567      path_params['namespace'] = params['namespace']
7568
7569    query_params = []
7570    if 'pretty' in params:
7571      query_params.append(('pretty', params['pretty']))
7572    if 'exact' in params:
7573      query_params.append(('exact', params['exact']))
7574    if 'export' in params:
7575      query_params.append(('export', params['export']))
7576
7577    header_params = {}
7578
7579    form_params = []
7580    local_var_files = {}
7581
7582    body_params = None
7583    # HTTP header `Accept`
7584    header_params['Accept'] = self.api_client.\
7585        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
7586
7587    # HTTP header `Content-Type`
7588    header_params['Content-Type'] = self.api_client.\
7589        select_header_content_type(['*/*'])
7590
7591    # Authentication setting
7592    auth_settings = ['BearerToken']
7593
7594    return self.api_client.call_api(
7595        '/apis/apps/v1beta2/namespaces/{namespace}/deployments/{name}',
7596        'GET',
7597        path_params,
7598        query_params,
7599        header_params,
7600        body=body_params,
7601        post_params=form_params,
7602        files=local_var_files,
7603        response_type='V1beta2Deployment',
7604        auth_settings=auth_settings,
7605        async_req=params.get('async_req'),
7606        _return_http_data_only=params.get('_return_http_data_only'),
7607        _preload_content=params.get('_preload_content', True),
7608        _request_timeout=params.get('_request_timeout'),
7609        collection_formats=collection_formats)
7610
7611  def read_namespaced_deployment_scale(self, name, namespace, **kwargs):
7612    """
7613        read scale of the specified Deployment
7614        This method makes a synchronous HTTP request by default. To make an
7615        asynchronous HTTP request, please pass async_req=True
7616        >>> thread = api.read_namespaced_deployment_scale(name, namespace,
7617        async_req=True)
7618        >>> result = thread.get()
7619
7620        :param async_req bool
7621        :param str name: name of the Scale (required)
7622        :param str namespace: object name and auth scope, such as for teams and
7623        projects (required)
7624        :param str pretty: If 'true', then the output is pretty printed.
7625        :return: V1beta2Scale
7626                 If the method is called asynchronously,
7627                 returns the request thread.
7628        """
7629    kwargs['_return_http_data_only'] = True
7630    if kwargs.get('async_req'):
7631      return self.read_namespaced_deployment_scale_with_http_info(
7632          name, namespace, **kwargs)
7633    else:
7634      (data) = self.read_namespaced_deployment_scale_with_http_info(
7635          name, namespace, **kwargs)
7636      return data
7637
7638  def read_namespaced_deployment_scale_with_http_info(self, name, namespace,
7639                                                      **kwargs):
7640    """
7641        read scale of the specified Deployment
7642        This method makes a synchronous HTTP request by default. To make an
7643        asynchronous HTTP request, please pass async_req=True
7644        >>> thread = api.read_namespaced_deployment_scale_with_http_info(name,
7645        namespace, async_req=True)
7646        >>> result = thread.get()
7647
7648        :param async_req bool
7649        :param str name: name of the Scale (required)
7650        :param str namespace: object name and auth scope, such as for teams and
7651        projects (required)
7652        :param str pretty: If 'true', then the output is pretty printed.
7653        :return: V1beta2Scale
7654                 If the method is called asynchronously,
7655                 returns the request thread.
7656        """
7657
7658    all_params = ['name', 'namespace', 'pretty']
7659    all_params.append('async_req')
7660    all_params.append('_return_http_data_only')
7661    all_params.append('_preload_content')
7662    all_params.append('_request_timeout')
7663
7664    params = locals()
7665    for key, val in iteritems(params['kwargs']):
7666      if key not in all_params:
7667        raise TypeError("Got an unexpected keyword argument '%s'"
7668                        ' to method read_namespaced_deployment_scale' % key)
7669      params[key] = val
7670    del params['kwargs']
7671    # verify the required parameter 'name' is set
7672    if ('name' not in params) or (params['name'] is None):
7673      raise ValueError(
7674          'Missing the required parameter `name` when calling `read_namespaced_deployment_scale`'
7675      )
7676    # verify the required parameter 'namespace' is set
7677    if ('namespace' not in params) or (params['namespace'] is None):
7678      raise ValueError(
7679          'Missing the required parameter `namespace` when calling `read_namespaced_deployment_scale`'
7680      )
7681
7682    collection_formats = {}
7683
7684    path_params = {}
7685    if 'name' in params:
7686      path_params['name'] = params['name']
7687    if 'namespace' in params:
7688      path_params['namespace'] = params['namespace']
7689
7690    query_params = []
7691    if 'pretty' in params:
7692      query_params.append(('pretty', params['pretty']))
7693
7694    header_params = {}
7695
7696    form_params = []
7697    local_var_files = {}
7698
7699    body_params = None
7700    # HTTP header `Accept`
7701    header_params['Accept'] = self.api_client.\
7702        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
7703
7704    # HTTP header `Content-Type`
7705    header_params['Content-Type'] = self.api_client.\
7706        select_header_content_type(['*/*'])
7707
7708    # Authentication setting
7709    auth_settings = ['BearerToken']
7710
7711    return self.api_client.call_api(
7712        '/apis/apps/v1beta2/namespaces/{namespace}/deployments/{name}/scale',
7713        'GET',
7714        path_params,
7715        query_params,
7716        header_params,
7717        body=body_params,
7718        post_params=form_params,
7719        files=local_var_files,
7720        response_type='V1beta2Scale',
7721        auth_settings=auth_settings,
7722        async_req=params.get('async_req'),
7723        _return_http_data_only=params.get('_return_http_data_only'),
7724        _preload_content=params.get('_preload_content', True),
7725        _request_timeout=params.get('_request_timeout'),
7726        collection_formats=collection_formats)
7727
7728  def read_namespaced_deployment_status(self, name, namespace, **kwargs):
7729    """
7730        read status of the specified Deployment
7731        This method makes a synchronous HTTP request by default. To make an
7732        asynchronous HTTP request, please pass async_req=True
7733        >>> thread = api.read_namespaced_deployment_status(name, namespace,
7734        async_req=True)
7735        >>> result = thread.get()
7736
7737        :param async_req bool
7738        :param str name: name of the Deployment (required)
7739        :param str namespace: object name and auth scope, such as for teams and
7740        projects (required)
7741        :param str pretty: If 'true', then the output is pretty printed.
7742        :return: V1beta2Deployment
7743                 If the method is called asynchronously,
7744                 returns the request thread.
7745        """
7746    kwargs['_return_http_data_only'] = True
7747    if kwargs.get('async_req'):
7748      return self.read_namespaced_deployment_status_with_http_info(
7749          name, namespace, **kwargs)
7750    else:
7751      (data) = self.read_namespaced_deployment_status_with_http_info(
7752          name, namespace, **kwargs)
7753      return data
7754
7755  def read_namespaced_deployment_status_with_http_info(self, name, namespace,
7756                                                       **kwargs):
7757    """
7758        read status of the specified Deployment
7759        This method makes a synchronous HTTP request by default. To make an
7760        asynchronous HTTP request, please pass async_req=True
7761        >>> thread = api.read_namespaced_deployment_status_with_http_info(name,
7762        namespace, async_req=True)
7763        >>> result = thread.get()
7764
7765        :param async_req bool
7766        :param str name: name of the Deployment (required)
7767        :param str namespace: object name and auth scope, such as for teams and
7768        projects (required)
7769        :param str pretty: If 'true', then the output is pretty printed.
7770        :return: V1beta2Deployment
7771                 If the method is called asynchronously,
7772                 returns the request thread.
7773        """
7774
7775    all_params = ['name', 'namespace', 'pretty']
7776    all_params.append('async_req')
7777    all_params.append('_return_http_data_only')
7778    all_params.append('_preload_content')
7779    all_params.append('_request_timeout')
7780
7781    params = locals()
7782    for key, val in iteritems(params['kwargs']):
7783      if key not in all_params:
7784        raise TypeError("Got an unexpected keyword argument '%s'"
7785                        ' to method read_namespaced_deployment_status' % key)
7786      params[key] = val
7787    del params['kwargs']
7788    # verify the required parameter 'name' is set
7789    if ('name' not in params) or (params['name'] is None):
7790      raise ValueError(
7791          'Missing the required parameter `name` when calling `read_namespaced_deployment_status`'
7792      )
7793    # verify the required parameter 'namespace' is set
7794    if ('namespace' not in params) or (params['namespace'] is None):
7795      raise ValueError(
7796          'Missing the required parameter `namespace` when calling `read_namespaced_deployment_status`'
7797      )
7798
7799    collection_formats = {}
7800
7801    path_params = {}
7802    if 'name' in params:
7803      path_params['name'] = params['name']
7804    if 'namespace' in params:
7805      path_params['namespace'] = params['namespace']
7806
7807    query_params = []
7808    if 'pretty' in params:
7809      query_params.append(('pretty', params['pretty']))
7810
7811    header_params = {}
7812
7813    form_params = []
7814    local_var_files = {}
7815
7816    body_params = None
7817    # HTTP header `Accept`
7818    header_params['Accept'] = self.api_client.\
7819        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
7820
7821    # HTTP header `Content-Type`
7822    header_params['Content-Type'] = self.api_client.\
7823        select_header_content_type(['*/*'])
7824
7825    # Authentication setting
7826    auth_settings = ['BearerToken']
7827
7828    return self.api_client.call_api(
7829        '/apis/apps/v1beta2/namespaces/{namespace}/deployments/{name}/status',
7830        'GET',
7831        path_params,
7832        query_params,
7833        header_params,
7834        body=body_params,
7835        post_params=form_params,
7836        files=local_var_files,
7837        response_type='V1beta2Deployment',
7838        auth_settings=auth_settings,
7839        async_req=params.get('async_req'),
7840        _return_http_data_only=params.get('_return_http_data_only'),
7841        _preload_content=params.get('_preload_content', True),
7842        _request_timeout=params.get('_request_timeout'),
7843        collection_formats=collection_formats)
7844
7845  def read_namespaced_replica_set(self, name, namespace, **kwargs):
7846    """
7847        read the specified ReplicaSet
7848        This method makes a synchronous HTTP request by default. To make an
7849        asynchronous HTTP request, please pass async_req=True
7850        >>> thread = api.read_namespaced_replica_set(name, namespace,
7851        async_req=True)
7852        >>> result = thread.get()
7853
7854        :param async_req bool
7855        :param str name: name of the ReplicaSet (required)
7856        :param str namespace: object name and auth scope, such as for teams and
7857        projects (required)
7858        :param str pretty: If 'true', then the output is pretty printed.
7859        :param bool exact: Should the export be exact.  Exact export maintains
7860        cluster-specific fields like 'Namespace'. Deprecated. Planned for
7861        removal in 1.18.
7862        :param bool export: Should this value be exported.  Export strips fields
7863        that a user can not specify. Deprecated. Planned for removal in 1.18.
7864        :return: V1beta2ReplicaSet
7865                 If the method is called asynchronously,
7866                 returns the request thread.
7867        """
7868    kwargs['_return_http_data_only'] = True
7869    if kwargs.get('async_req'):
7870      return self.read_namespaced_replica_set_with_http_info(
7871          name, namespace, **kwargs)
7872    else:
7873      (data) = self.read_namespaced_replica_set_with_http_info(
7874          name, namespace, **kwargs)
7875      return data
7876
7877  def read_namespaced_replica_set_with_http_info(self, name, namespace,
7878                                                 **kwargs):
7879    """
7880        read the specified ReplicaSet
7881        This method makes a synchronous HTTP request by default. To make an
7882        asynchronous HTTP request, please pass async_req=True
7883        >>> thread = api.read_namespaced_replica_set_with_http_info(name,
7884        namespace, async_req=True)
7885        >>> result = thread.get()
7886
7887        :param async_req bool
7888        :param str name: name of the ReplicaSet (required)
7889        :param str namespace: object name and auth scope, such as for teams and
7890        projects (required)
7891        :param str pretty: If 'true', then the output is pretty printed.
7892        :param bool exact: Should the export be exact.  Exact export maintains
7893        cluster-specific fields like 'Namespace'. Deprecated. Planned for
7894        removal in 1.18.
7895        :param bool export: Should this value be exported.  Export strips fields
7896        that a user can not specify. Deprecated. Planned for removal in 1.18.
7897        :return: V1beta2ReplicaSet
7898                 If the method is called asynchronously,
7899                 returns the request thread.
7900        """
7901
7902    all_params = ['name', 'namespace', 'pretty', 'exact', 'export']
7903    all_params.append('async_req')
7904    all_params.append('_return_http_data_only')
7905    all_params.append('_preload_content')
7906    all_params.append('_request_timeout')
7907
7908    params = locals()
7909    for key, val in iteritems(params['kwargs']):
7910      if key not in all_params:
7911        raise TypeError("Got an unexpected keyword argument '%s'"
7912                        ' to method read_namespaced_replica_set' % key)
7913      params[key] = val
7914    del params['kwargs']
7915    # verify the required parameter 'name' is set
7916    if ('name' not in params) or (params['name'] is None):
7917      raise ValueError(
7918          'Missing the required parameter `name` when calling `read_namespaced_replica_set`'
7919      )
7920    # verify the required parameter 'namespace' is set
7921    if ('namespace' not in params) or (params['namespace'] is None):
7922      raise ValueError(
7923          'Missing the required parameter `namespace` when calling `read_namespaced_replica_set`'
7924      )
7925
7926    collection_formats = {}
7927
7928    path_params = {}
7929    if 'name' in params:
7930      path_params['name'] = params['name']
7931    if 'namespace' in params:
7932      path_params['namespace'] = params['namespace']
7933
7934    query_params = []
7935    if 'pretty' in params:
7936      query_params.append(('pretty', params['pretty']))
7937    if 'exact' in params:
7938      query_params.append(('exact', params['exact']))
7939    if 'export' in params:
7940      query_params.append(('export', params['export']))
7941
7942    header_params = {}
7943
7944    form_params = []
7945    local_var_files = {}
7946
7947    body_params = None
7948    # HTTP header `Accept`
7949    header_params['Accept'] = self.api_client.\
7950        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
7951
7952    # HTTP header `Content-Type`
7953    header_params['Content-Type'] = self.api_client.\
7954        select_header_content_type(['*/*'])
7955
7956    # Authentication setting
7957    auth_settings = ['BearerToken']
7958
7959    return self.api_client.call_api(
7960        '/apis/apps/v1beta2/namespaces/{namespace}/replicasets/{name}',
7961        'GET',
7962        path_params,
7963        query_params,
7964        header_params,
7965        body=body_params,
7966        post_params=form_params,
7967        files=local_var_files,
7968        response_type='V1beta2ReplicaSet',
7969        auth_settings=auth_settings,
7970        async_req=params.get('async_req'),
7971        _return_http_data_only=params.get('_return_http_data_only'),
7972        _preload_content=params.get('_preload_content', True),
7973        _request_timeout=params.get('_request_timeout'),
7974        collection_formats=collection_formats)
7975
7976  def read_namespaced_replica_set_scale(self, name, namespace, **kwargs):
7977    """
7978        read scale of the specified ReplicaSet
7979        This method makes a synchronous HTTP request by default. To make an
7980        asynchronous HTTP request, please pass async_req=True
7981        >>> thread = api.read_namespaced_replica_set_scale(name, namespace,
7982        async_req=True)
7983        >>> result = thread.get()
7984
7985        :param async_req bool
7986        :param str name: name of the Scale (required)
7987        :param str namespace: object name and auth scope, such as for teams and
7988        projects (required)
7989        :param str pretty: If 'true', then the output is pretty printed.
7990        :return: V1beta2Scale
7991                 If the method is called asynchronously,
7992                 returns the request thread.
7993        """
7994    kwargs['_return_http_data_only'] = True
7995    if kwargs.get('async_req'):
7996      return self.read_namespaced_replica_set_scale_with_http_info(
7997          name, namespace, **kwargs)
7998    else:
7999      (data) = self.read_namespaced_replica_set_scale_with_http_info(
8000          name, namespace, **kwargs)
8001      return data
8002
8003  def read_namespaced_replica_set_scale_with_http_info(self, name, namespace,
8004                                                       **kwargs):
8005    """
8006        read scale of the specified ReplicaSet
8007        This method makes a synchronous HTTP request by default. To make an
8008        asynchronous HTTP request, please pass async_req=True
8009        >>> thread = api.read_namespaced_replica_set_scale_with_http_info(name,
8010        namespace, async_req=True)
8011        >>> result = thread.get()
8012
8013        :param async_req bool
8014        :param str name: name of the Scale (required)
8015        :param str namespace: object name and auth scope, such as for teams and
8016        projects (required)
8017        :param str pretty: If 'true', then the output is pretty printed.
8018        :return: V1beta2Scale
8019                 If the method is called asynchronously,
8020                 returns the request thread.
8021        """
8022
8023    all_params = ['name', 'namespace', 'pretty']
8024    all_params.append('async_req')
8025    all_params.append('_return_http_data_only')
8026    all_params.append('_preload_content')
8027    all_params.append('_request_timeout')
8028
8029    params = locals()
8030    for key, val in iteritems(params['kwargs']):
8031      if key not in all_params:
8032        raise TypeError("Got an unexpected keyword argument '%s'"
8033                        ' to method read_namespaced_replica_set_scale' % key)
8034      params[key] = val
8035    del params['kwargs']
8036    # verify the required parameter 'name' is set
8037    if ('name' not in params) or (params['name'] is None):
8038      raise ValueError(
8039          'Missing the required parameter `name` when calling `read_namespaced_replica_set_scale`'
8040      )
8041    # verify the required parameter 'namespace' is set
8042    if ('namespace' not in params) or (params['namespace'] is None):
8043      raise ValueError(
8044          'Missing the required parameter `namespace` when calling `read_namespaced_replica_set_scale`'
8045      )
8046
8047    collection_formats = {}
8048
8049    path_params = {}
8050    if 'name' in params:
8051      path_params['name'] = params['name']
8052    if 'namespace' in params:
8053      path_params['namespace'] = params['namespace']
8054
8055    query_params = []
8056    if 'pretty' in params:
8057      query_params.append(('pretty', params['pretty']))
8058
8059    header_params = {}
8060
8061    form_params = []
8062    local_var_files = {}
8063
8064    body_params = None
8065    # HTTP header `Accept`
8066    header_params['Accept'] = self.api_client.\
8067        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
8068
8069    # HTTP header `Content-Type`
8070    header_params['Content-Type'] = self.api_client.\
8071        select_header_content_type(['*/*'])
8072
8073    # Authentication setting
8074    auth_settings = ['BearerToken']
8075
8076    return self.api_client.call_api(
8077        '/apis/apps/v1beta2/namespaces/{namespace}/replicasets/{name}/scale',
8078        'GET',
8079        path_params,
8080        query_params,
8081        header_params,
8082        body=body_params,
8083        post_params=form_params,
8084        files=local_var_files,
8085        response_type='V1beta2Scale',
8086        auth_settings=auth_settings,
8087        async_req=params.get('async_req'),
8088        _return_http_data_only=params.get('_return_http_data_only'),
8089        _preload_content=params.get('_preload_content', True),
8090        _request_timeout=params.get('_request_timeout'),
8091        collection_formats=collection_formats)
8092
8093  def read_namespaced_replica_set_status(self, name, namespace, **kwargs):
8094    """
8095        read status of the specified ReplicaSet
8096        This method makes a synchronous HTTP request by default. To make an
8097        asynchronous HTTP request, please pass async_req=True
8098        >>> thread = api.read_namespaced_replica_set_status(name, namespace,
8099        async_req=True)
8100        >>> result = thread.get()
8101
8102        :param async_req bool
8103        :param str name: name of the ReplicaSet (required)
8104        :param str namespace: object name and auth scope, such as for teams and
8105        projects (required)
8106        :param str pretty: If 'true', then the output is pretty printed.
8107        :return: V1beta2ReplicaSet
8108                 If the method is called asynchronously,
8109                 returns the request thread.
8110        """
8111    kwargs['_return_http_data_only'] = True
8112    if kwargs.get('async_req'):
8113      return self.read_namespaced_replica_set_status_with_http_info(
8114          name, namespace, **kwargs)
8115    else:
8116      (data) = self.read_namespaced_replica_set_status_with_http_info(
8117          name, namespace, **kwargs)
8118      return data
8119
8120  def read_namespaced_replica_set_status_with_http_info(self, name, namespace,
8121                                                        **kwargs):
8122    """
8123        read status of the specified ReplicaSet
8124        This method makes a synchronous HTTP request by default. To make an
8125        asynchronous HTTP request, please pass async_req=True
8126        >>> thread = api.read_namespaced_replica_set_status_with_http_info(name,
8127        namespace, async_req=True)
8128        >>> result = thread.get()
8129
8130        :param async_req bool
8131        :param str name: name of the ReplicaSet (required)
8132        :param str namespace: object name and auth scope, such as for teams and
8133        projects (required)
8134        :param str pretty: If 'true', then the output is pretty printed.
8135        :return: V1beta2ReplicaSet
8136                 If the method is called asynchronously,
8137                 returns the request thread.
8138        """
8139
8140    all_params = ['name', 'namespace', 'pretty']
8141    all_params.append('async_req')
8142    all_params.append('_return_http_data_only')
8143    all_params.append('_preload_content')
8144    all_params.append('_request_timeout')
8145
8146    params = locals()
8147    for key, val in iteritems(params['kwargs']):
8148      if key not in all_params:
8149        raise TypeError("Got an unexpected keyword argument '%s'"
8150                        ' to method read_namespaced_replica_set_status' % key)
8151      params[key] = val
8152    del params['kwargs']
8153    # verify the required parameter 'name' is set
8154    if ('name' not in params) or (params['name'] is None):
8155      raise ValueError(
8156          'Missing the required parameter `name` when calling `read_namespaced_replica_set_status`'
8157      )
8158    # verify the required parameter 'namespace' is set
8159    if ('namespace' not in params) or (params['namespace'] is None):
8160      raise ValueError(
8161          'Missing the required parameter `namespace` when calling `read_namespaced_replica_set_status`'
8162      )
8163
8164    collection_formats = {}
8165
8166    path_params = {}
8167    if 'name' in params:
8168      path_params['name'] = params['name']
8169    if 'namespace' in params:
8170      path_params['namespace'] = params['namespace']
8171
8172    query_params = []
8173    if 'pretty' in params:
8174      query_params.append(('pretty', params['pretty']))
8175
8176    header_params = {}
8177
8178    form_params = []
8179    local_var_files = {}
8180
8181    body_params = None
8182    # HTTP header `Accept`
8183    header_params['Accept'] = self.api_client.\
8184        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
8185
8186    # HTTP header `Content-Type`
8187    header_params['Content-Type'] = self.api_client.\
8188        select_header_content_type(['*/*'])
8189
8190    # Authentication setting
8191    auth_settings = ['BearerToken']
8192
8193    return self.api_client.call_api(
8194        '/apis/apps/v1beta2/namespaces/{namespace}/replicasets/{name}/status',
8195        'GET',
8196        path_params,
8197        query_params,
8198        header_params,
8199        body=body_params,
8200        post_params=form_params,
8201        files=local_var_files,
8202        response_type='V1beta2ReplicaSet',
8203        auth_settings=auth_settings,
8204        async_req=params.get('async_req'),
8205        _return_http_data_only=params.get('_return_http_data_only'),
8206        _preload_content=params.get('_preload_content', True),
8207        _request_timeout=params.get('_request_timeout'),
8208        collection_formats=collection_formats)
8209
8210  def read_namespaced_stateful_set(self, name, namespace, **kwargs):
8211    """
8212        read the specified StatefulSet
8213        This method makes a synchronous HTTP request by default. To make an
8214        asynchronous HTTP request, please pass async_req=True
8215        >>> thread = api.read_namespaced_stateful_set(name, namespace,
8216        async_req=True)
8217        >>> result = thread.get()
8218
8219        :param async_req bool
8220        :param str name: name of the StatefulSet (required)
8221        :param str namespace: object name and auth scope, such as for teams and
8222        projects (required)
8223        :param str pretty: If 'true', then the output is pretty printed.
8224        :param bool exact: Should the export be exact.  Exact export maintains
8225        cluster-specific fields like 'Namespace'. Deprecated. Planned for
8226        removal in 1.18.
8227        :param bool export: Should this value be exported.  Export strips fields
8228        that a user can not specify. Deprecated. Planned for removal in 1.18.
8229        :return: V1beta2StatefulSet
8230                 If the method is called asynchronously,
8231                 returns the request thread.
8232        """
8233    kwargs['_return_http_data_only'] = True
8234    if kwargs.get('async_req'):
8235      return self.read_namespaced_stateful_set_with_http_info(
8236          name, namespace, **kwargs)
8237    else:
8238      (data) = self.read_namespaced_stateful_set_with_http_info(
8239          name, namespace, **kwargs)
8240      return data
8241
8242  def read_namespaced_stateful_set_with_http_info(self, name, namespace,
8243                                                  **kwargs):
8244    """
8245        read the specified StatefulSet
8246        This method makes a synchronous HTTP request by default. To make an
8247        asynchronous HTTP request, please pass async_req=True
8248        >>> thread = api.read_namespaced_stateful_set_with_http_info(name,
8249        namespace, async_req=True)
8250        >>> result = thread.get()
8251
8252        :param async_req bool
8253        :param str name: name of the StatefulSet (required)
8254        :param str namespace: object name and auth scope, such as for teams and
8255        projects (required)
8256        :param str pretty: If 'true', then the output is pretty printed.
8257        :param bool exact: Should the export be exact.  Exact export maintains
8258        cluster-specific fields like 'Namespace'. Deprecated. Planned for
8259        removal in 1.18.
8260        :param bool export: Should this value be exported.  Export strips fields
8261        that a user can not specify. Deprecated. Planned for removal in 1.18.
8262        :return: V1beta2StatefulSet
8263                 If the method is called asynchronously,
8264                 returns the request thread.
8265        """
8266
8267    all_params = ['name', 'namespace', 'pretty', 'exact', 'export']
8268    all_params.append('async_req')
8269    all_params.append('_return_http_data_only')
8270    all_params.append('_preload_content')
8271    all_params.append('_request_timeout')
8272
8273    params = locals()
8274    for key, val in iteritems(params['kwargs']):
8275      if key not in all_params:
8276        raise TypeError("Got an unexpected keyword argument '%s'"
8277                        ' to method read_namespaced_stateful_set' % key)
8278      params[key] = val
8279    del params['kwargs']
8280    # verify the required parameter 'name' is set
8281    if ('name' not in params) or (params['name'] is None):
8282      raise ValueError(
8283          'Missing the required parameter `name` when calling `read_namespaced_stateful_set`'
8284      )
8285    # verify the required parameter 'namespace' is set
8286    if ('namespace' not in params) or (params['namespace'] is None):
8287      raise ValueError(
8288          'Missing the required parameter `namespace` when calling `read_namespaced_stateful_set`'
8289      )
8290
8291    collection_formats = {}
8292
8293    path_params = {}
8294    if 'name' in params:
8295      path_params['name'] = params['name']
8296    if 'namespace' in params:
8297      path_params['namespace'] = params['namespace']
8298
8299    query_params = []
8300    if 'pretty' in params:
8301      query_params.append(('pretty', params['pretty']))
8302    if 'exact' in params:
8303      query_params.append(('exact', params['exact']))
8304    if 'export' in params:
8305      query_params.append(('export', params['export']))
8306
8307    header_params = {}
8308
8309    form_params = []
8310    local_var_files = {}
8311
8312    body_params = None
8313    # HTTP header `Accept`
8314    header_params['Accept'] = self.api_client.\
8315        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
8316
8317    # HTTP header `Content-Type`
8318    header_params['Content-Type'] = self.api_client.\
8319        select_header_content_type(['*/*'])
8320
8321    # Authentication setting
8322    auth_settings = ['BearerToken']
8323
8324    return self.api_client.call_api(
8325        '/apis/apps/v1beta2/namespaces/{namespace}/statefulsets/{name}',
8326        'GET',
8327        path_params,
8328        query_params,
8329        header_params,
8330        body=body_params,
8331        post_params=form_params,
8332        files=local_var_files,
8333        response_type='V1beta2StatefulSet',
8334        auth_settings=auth_settings,
8335        async_req=params.get('async_req'),
8336        _return_http_data_only=params.get('_return_http_data_only'),
8337        _preload_content=params.get('_preload_content', True),
8338        _request_timeout=params.get('_request_timeout'),
8339        collection_formats=collection_formats)
8340
8341  def read_namespaced_stateful_set_scale(self, name, namespace, **kwargs):
8342    """
8343        read scale of the specified StatefulSet
8344        This method makes a synchronous HTTP request by default. To make an
8345        asynchronous HTTP request, please pass async_req=True
8346        >>> thread = api.read_namespaced_stateful_set_scale(name, namespace,
8347        async_req=True)
8348        >>> result = thread.get()
8349
8350        :param async_req bool
8351        :param str name: name of the Scale (required)
8352        :param str namespace: object name and auth scope, such as for teams and
8353        projects (required)
8354        :param str pretty: If 'true', then the output is pretty printed.
8355        :return: V1beta2Scale
8356                 If the method is called asynchronously,
8357                 returns the request thread.
8358        """
8359    kwargs['_return_http_data_only'] = True
8360    if kwargs.get('async_req'):
8361      return self.read_namespaced_stateful_set_scale_with_http_info(
8362          name, namespace, **kwargs)
8363    else:
8364      (data) = self.read_namespaced_stateful_set_scale_with_http_info(
8365          name, namespace, **kwargs)
8366      return data
8367
8368  def read_namespaced_stateful_set_scale_with_http_info(self, name, namespace,
8369                                                        **kwargs):
8370    """
8371        read scale of the specified StatefulSet
8372        This method makes a synchronous HTTP request by default. To make an
8373        asynchronous HTTP request, please pass async_req=True
8374        >>> thread = api.read_namespaced_stateful_set_scale_with_http_info(name,
8375        namespace, async_req=True)
8376        >>> result = thread.get()
8377
8378        :param async_req bool
8379        :param str name: name of the Scale (required)
8380        :param str namespace: object name and auth scope, such as for teams and
8381        projects (required)
8382        :param str pretty: If 'true', then the output is pretty printed.
8383        :return: V1beta2Scale
8384                 If the method is called asynchronously,
8385                 returns the request thread.
8386        """
8387
8388    all_params = ['name', 'namespace', 'pretty']
8389    all_params.append('async_req')
8390    all_params.append('_return_http_data_only')
8391    all_params.append('_preload_content')
8392    all_params.append('_request_timeout')
8393
8394    params = locals()
8395    for key, val in iteritems(params['kwargs']):
8396      if key not in all_params:
8397        raise TypeError("Got an unexpected keyword argument '%s'"
8398                        ' to method read_namespaced_stateful_set_scale' % key)
8399      params[key] = val
8400    del params['kwargs']
8401    # verify the required parameter 'name' is set
8402    if ('name' not in params) or (params['name'] is None):
8403      raise ValueError(
8404          'Missing the required parameter `name` when calling `read_namespaced_stateful_set_scale`'
8405      )
8406    # verify the required parameter 'namespace' is set
8407    if ('namespace' not in params) or (params['namespace'] is None):
8408      raise ValueError(
8409          'Missing the required parameter `namespace` when calling `read_namespaced_stateful_set_scale`'
8410      )
8411
8412    collection_formats = {}
8413
8414    path_params = {}
8415    if 'name' in params:
8416      path_params['name'] = params['name']
8417    if 'namespace' in params:
8418      path_params['namespace'] = params['namespace']
8419
8420    query_params = []
8421    if 'pretty' in params:
8422      query_params.append(('pretty', params['pretty']))
8423
8424    header_params = {}
8425
8426    form_params = []
8427    local_var_files = {}
8428
8429    body_params = None
8430    # HTTP header `Accept`
8431    header_params['Accept'] = self.api_client.\
8432        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
8433
8434    # HTTP header `Content-Type`
8435    header_params['Content-Type'] = self.api_client.\
8436        select_header_content_type(['*/*'])
8437
8438    # Authentication setting
8439    auth_settings = ['BearerToken']
8440
8441    return self.api_client.call_api(
8442        '/apis/apps/v1beta2/namespaces/{namespace}/statefulsets/{name}/scale',
8443        'GET',
8444        path_params,
8445        query_params,
8446        header_params,
8447        body=body_params,
8448        post_params=form_params,
8449        files=local_var_files,
8450        response_type='V1beta2Scale',
8451        auth_settings=auth_settings,
8452        async_req=params.get('async_req'),
8453        _return_http_data_only=params.get('_return_http_data_only'),
8454        _preload_content=params.get('_preload_content', True),
8455        _request_timeout=params.get('_request_timeout'),
8456        collection_formats=collection_formats)
8457
8458  def read_namespaced_stateful_set_status(self, name, namespace, **kwargs):
8459    """
8460        read status of the specified StatefulSet
8461        This method makes a synchronous HTTP request by default. To make an
8462        asynchronous HTTP request, please pass async_req=True
8463        >>> thread = api.read_namespaced_stateful_set_status(name, namespace,
8464        async_req=True)
8465        >>> result = thread.get()
8466
8467        :param async_req bool
8468        :param str name: name of the StatefulSet (required)
8469        :param str namespace: object name and auth scope, such as for teams and
8470        projects (required)
8471        :param str pretty: If 'true', then the output is pretty printed.
8472        :return: V1beta2StatefulSet
8473                 If the method is called asynchronously,
8474                 returns the request thread.
8475        """
8476    kwargs['_return_http_data_only'] = True
8477    if kwargs.get('async_req'):
8478      return self.read_namespaced_stateful_set_status_with_http_info(
8479          name, namespace, **kwargs)
8480    else:
8481      (data) = self.read_namespaced_stateful_set_status_with_http_info(
8482          name, namespace, **kwargs)
8483      return data
8484
8485  def read_namespaced_stateful_set_status_with_http_info(
8486      self, name, namespace, **kwargs):
8487    """
8488        read status of the specified StatefulSet
8489        This method makes a synchronous HTTP request by default. To make an
8490        asynchronous HTTP request, please pass async_req=True
8491        >>> thread =
8492        api.read_namespaced_stateful_set_status_with_http_info(name, namespace,
8493        async_req=True)
8494        >>> result = thread.get()
8495
8496        :param async_req bool
8497        :param str name: name of the StatefulSet (required)
8498        :param str namespace: object name and auth scope, such as for teams and
8499        projects (required)
8500        :param str pretty: If 'true', then the output is pretty printed.
8501        :return: V1beta2StatefulSet
8502                 If the method is called asynchronously,
8503                 returns the request thread.
8504        """
8505
8506    all_params = ['name', 'namespace', 'pretty']
8507    all_params.append('async_req')
8508    all_params.append('_return_http_data_only')
8509    all_params.append('_preload_content')
8510    all_params.append('_request_timeout')
8511
8512    params = locals()
8513    for key, val in iteritems(params['kwargs']):
8514      if key not in all_params:
8515        raise TypeError("Got an unexpected keyword argument '%s'"
8516                        ' to method read_namespaced_stateful_set_status' % key)
8517      params[key] = val
8518    del params['kwargs']
8519    # verify the required parameter 'name' is set
8520    if ('name' not in params) or (params['name'] is None):
8521      raise ValueError(
8522          'Missing the required parameter `name` when calling `read_namespaced_stateful_set_status`'
8523      )
8524    # verify the required parameter 'namespace' is set
8525    if ('namespace' not in params) or (params['namespace'] is None):
8526      raise ValueError(
8527          'Missing the required parameter `namespace` when calling `read_namespaced_stateful_set_status`'
8528      )
8529
8530    collection_formats = {}
8531
8532    path_params = {}
8533    if 'name' in params:
8534      path_params['name'] = params['name']
8535    if 'namespace' in params:
8536      path_params['namespace'] = params['namespace']
8537
8538    query_params = []
8539    if 'pretty' in params:
8540      query_params.append(('pretty', params['pretty']))
8541
8542    header_params = {}
8543
8544    form_params = []
8545    local_var_files = {}
8546
8547    body_params = None
8548    # HTTP header `Accept`
8549    header_params['Accept'] = self.api_client.\
8550        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
8551
8552    # HTTP header `Content-Type`
8553    header_params['Content-Type'] = self.api_client.\
8554        select_header_content_type(['*/*'])
8555
8556    # Authentication setting
8557    auth_settings = ['BearerToken']
8558
8559    return self.api_client.call_api(
8560        '/apis/apps/v1beta2/namespaces/{namespace}/statefulsets/{name}/status',
8561        'GET',
8562        path_params,
8563        query_params,
8564        header_params,
8565        body=body_params,
8566        post_params=form_params,
8567        files=local_var_files,
8568        response_type='V1beta2StatefulSet',
8569        auth_settings=auth_settings,
8570        async_req=params.get('async_req'),
8571        _return_http_data_only=params.get('_return_http_data_only'),
8572        _preload_content=params.get('_preload_content', True),
8573        _request_timeout=params.get('_request_timeout'),
8574        collection_formats=collection_formats)
8575
8576  def replace_namespaced_controller_revision(self, name, namespace, body,
8577                                             **kwargs):
8578    """
8579        replace the specified ControllerRevision
8580        This method makes a synchronous HTTP request by default. To make an
8581        asynchronous HTTP request, please pass async_req=True
8582        >>> thread = api.replace_namespaced_controller_revision(name, namespace,
8583        body, async_req=True)
8584        >>> result = thread.get()
8585
8586        :param async_req bool
8587        :param str name: name of the ControllerRevision (required)
8588        :param str namespace: object name and auth scope, such as for teams and
8589        projects (required)
8590        :param V1beta2ControllerRevision body: (required)
8591        :param str pretty: If 'true', then the output is pretty printed.
8592        :param str dry_run: When present, indicates that modifications should
8593        not be persisted. An invalid or unrecognized dryRun directive will
8594        result in an error response and no further processing of the request.
8595        Valid values are: - All: all dry run stages will be processed
8596        :param str field_manager: fieldManager is a name associated with the
8597        actor or entity that is making these changes. The value must be less
8598        than or 128 characters long, and only contain printable characters, as
8599        defined by https://golang.org/pkg/unicode/#IsPrint.
8600        :return: V1beta2ControllerRevision
8601                 If the method is called asynchronously,
8602                 returns the request thread.
8603        """
8604    kwargs['_return_http_data_only'] = True
8605    if kwargs.get('async_req'):
8606      return self.replace_namespaced_controller_revision_with_http_info(
8607          name, namespace, body, **kwargs)
8608    else:
8609      (data) = self.replace_namespaced_controller_revision_with_http_info(
8610          name, namespace, body, **kwargs)
8611      return data
8612
8613  def replace_namespaced_controller_revision_with_http_info(
8614      self, name, namespace, body, **kwargs):
8615    """
8616        replace the specified ControllerRevision
8617        This method makes a synchronous HTTP request by default. To make an
8618        asynchronous HTTP request, please pass async_req=True
8619        >>> thread =
8620        api.replace_namespaced_controller_revision_with_http_info(name,
8621        namespace, body, async_req=True)
8622        >>> result = thread.get()
8623
8624        :param async_req bool
8625        :param str name: name of the ControllerRevision (required)
8626        :param str namespace: object name and auth scope, such as for teams and
8627        projects (required)
8628        :param V1beta2ControllerRevision body: (required)
8629        :param str pretty: If 'true', then the output is pretty printed.
8630        :param str dry_run: When present, indicates that modifications should
8631        not be persisted. An invalid or unrecognized dryRun directive will
8632        result in an error response and no further processing of the request.
8633        Valid values are: - All: all dry run stages will be processed
8634        :param str field_manager: fieldManager is a name associated with the
8635        actor or entity that is making these changes. The value must be less
8636        than or 128 characters long, and only contain printable characters, as
8637        defined by https://golang.org/pkg/unicode/#IsPrint.
8638        :return: V1beta2ControllerRevision
8639                 If the method is called asynchronously,
8640                 returns the request thread.
8641        """
8642
8643    all_params = [
8644        'name', 'namespace', 'body', 'pretty', 'dry_run', 'field_manager'
8645    ]
8646    all_params.append('async_req')
8647    all_params.append('_return_http_data_only')
8648    all_params.append('_preload_content')
8649    all_params.append('_request_timeout')
8650
8651    params = locals()
8652    for key, val in iteritems(params['kwargs']):
8653      if key not in all_params:
8654        raise TypeError("Got an unexpected keyword argument '%s'"
8655                        ' to method replace_namespaced_controller_revision' %
8656                        key)
8657      params[key] = val
8658    del params['kwargs']
8659    # verify the required parameter 'name' is set
8660    if ('name' not in params) or (params['name'] is None):
8661      raise ValueError(
8662          'Missing the required parameter `name` when calling `replace_namespaced_controller_revision`'
8663      )
8664    # verify the required parameter 'namespace' is set
8665    if ('namespace' not in params) or (params['namespace'] is None):
8666      raise ValueError(
8667          'Missing the required parameter `namespace` when calling `replace_namespaced_controller_revision`'
8668      )
8669    # verify the required parameter 'body' is set
8670    if ('body' not in params) or (params['body'] is None):
8671      raise ValueError(
8672          'Missing the required parameter `body` when calling `replace_namespaced_controller_revision`'
8673      )
8674
8675    collection_formats = {}
8676
8677    path_params = {}
8678    if 'name' in params:
8679      path_params['name'] = params['name']
8680    if 'namespace' in params:
8681      path_params['namespace'] = params['namespace']
8682
8683    query_params = []
8684    if 'pretty' in params:
8685      query_params.append(('pretty', params['pretty']))
8686    if 'dry_run' in params:
8687      query_params.append(('dryRun', params['dry_run']))
8688    if 'field_manager' in params:
8689      query_params.append(('fieldManager', params['field_manager']))
8690
8691    header_params = {}
8692
8693    form_params = []
8694    local_var_files = {}
8695
8696    body_params = None
8697    if 'body' in params:
8698      body_params = params['body']
8699    # HTTP header `Accept`
8700    header_params['Accept'] = self.api_client.\
8701        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
8702
8703    # HTTP header `Content-Type`
8704    header_params['Content-Type'] = self.api_client.\
8705        select_header_content_type(['*/*'])
8706
8707    # Authentication setting
8708    auth_settings = ['BearerToken']
8709
8710    return self.api_client.call_api(
8711        '/apis/apps/v1beta2/namespaces/{namespace}/controllerrevisions/{name}',
8712        'PUT',
8713        path_params,
8714        query_params,
8715        header_params,
8716        body=body_params,
8717        post_params=form_params,
8718        files=local_var_files,
8719        response_type='V1beta2ControllerRevision',
8720        auth_settings=auth_settings,
8721        async_req=params.get('async_req'),
8722        _return_http_data_only=params.get('_return_http_data_only'),
8723        _preload_content=params.get('_preload_content', True),
8724        _request_timeout=params.get('_request_timeout'),
8725        collection_formats=collection_formats)
8726
8727  def replace_namespaced_daemon_set(self, name, namespace, body, **kwargs):
8728    """
8729        replace the specified DaemonSet
8730        This method makes a synchronous HTTP request by default. To make an
8731        asynchronous HTTP request, please pass async_req=True
8732        >>> thread = api.replace_namespaced_daemon_set(name, namespace, body,
8733        async_req=True)
8734        >>> result = thread.get()
8735
8736        :param async_req bool
8737        :param str name: name of the DaemonSet (required)
8738        :param str namespace: object name and auth scope, such as for teams and
8739        projects (required)
8740        :param V1beta2DaemonSet body: (required)
8741        :param str pretty: If 'true', then the output is pretty printed.
8742        :param str dry_run: When present, indicates that modifications should
8743        not be persisted. An invalid or unrecognized dryRun directive will
8744        result in an error response and no further processing of the request.
8745        Valid values are: - All: all dry run stages will be processed
8746        :param str field_manager: fieldManager is a name associated with the
8747        actor or entity that is making these changes. The value must be less
8748        than or 128 characters long, and only contain printable characters, as
8749        defined by https://golang.org/pkg/unicode/#IsPrint.
8750        :return: V1beta2DaemonSet
8751                 If the method is called asynchronously,
8752                 returns the request thread.
8753        """
8754    kwargs['_return_http_data_only'] = True
8755    if kwargs.get('async_req'):
8756      return self.replace_namespaced_daemon_set_with_http_info(
8757          name, namespace, body, **kwargs)
8758    else:
8759      (data) = self.replace_namespaced_daemon_set_with_http_info(
8760          name, namespace, body, **kwargs)
8761      return data
8762
8763  def replace_namespaced_daemon_set_with_http_info(self, name, namespace, body,
8764                                                   **kwargs):
8765    """
8766        replace the specified DaemonSet
8767        This method makes a synchronous HTTP request by default. To make an
8768        asynchronous HTTP request, please pass async_req=True
8769        >>> thread = api.replace_namespaced_daemon_set_with_http_info(name,
8770        namespace, body, async_req=True)
8771        >>> result = thread.get()
8772
8773        :param async_req bool
8774        :param str name: name of the DaemonSet (required)
8775        :param str namespace: object name and auth scope, such as for teams and
8776        projects (required)
8777        :param V1beta2DaemonSet body: (required)
8778        :param str pretty: If 'true', then the output is pretty printed.
8779        :param str dry_run: When present, indicates that modifications should
8780        not be persisted. An invalid or unrecognized dryRun directive will
8781        result in an error response and no further processing of the request.
8782        Valid values are: - All: all dry run stages will be processed
8783        :param str field_manager: fieldManager is a name associated with the
8784        actor or entity that is making these changes. The value must be less
8785        than or 128 characters long, and only contain printable characters, as
8786        defined by https://golang.org/pkg/unicode/#IsPrint.
8787        :return: V1beta2DaemonSet
8788                 If the method is called asynchronously,
8789                 returns the request thread.
8790        """
8791
8792    all_params = [
8793        'name', 'namespace', 'body', 'pretty', 'dry_run', 'field_manager'
8794    ]
8795    all_params.append('async_req')
8796    all_params.append('_return_http_data_only')
8797    all_params.append('_preload_content')
8798    all_params.append('_request_timeout')
8799
8800    params = locals()
8801    for key, val in iteritems(params['kwargs']):
8802      if key not in all_params:
8803        raise TypeError("Got an unexpected keyword argument '%s'"
8804                        ' to method replace_namespaced_daemon_set' % key)
8805      params[key] = val
8806    del params['kwargs']
8807    # verify the required parameter 'name' is set
8808    if ('name' not in params) or (params['name'] is None):
8809      raise ValueError(
8810          'Missing the required parameter `name` when calling `replace_namespaced_daemon_set`'
8811      )
8812    # verify the required parameter 'namespace' is set
8813    if ('namespace' not in params) or (params['namespace'] is None):
8814      raise ValueError(
8815          'Missing the required parameter `namespace` when calling `replace_namespaced_daemon_set`'
8816      )
8817    # verify the required parameter 'body' is set
8818    if ('body' not in params) or (params['body'] is None):
8819      raise ValueError(
8820          'Missing the required parameter `body` when calling `replace_namespaced_daemon_set`'
8821      )
8822
8823    collection_formats = {}
8824
8825    path_params = {}
8826    if 'name' in params:
8827      path_params['name'] = params['name']
8828    if 'namespace' in params:
8829      path_params['namespace'] = params['namespace']
8830
8831    query_params = []
8832    if 'pretty' in params:
8833      query_params.append(('pretty', params['pretty']))
8834    if 'dry_run' in params:
8835      query_params.append(('dryRun', params['dry_run']))
8836    if 'field_manager' in params:
8837      query_params.append(('fieldManager', params['field_manager']))
8838
8839    header_params = {}
8840
8841    form_params = []
8842    local_var_files = {}
8843
8844    body_params = None
8845    if 'body' in params:
8846      body_params = params['body']
8847    # HTTP header `Accept`
8848    header_params['Accept'] = self.api_client.\
8849        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
8850
8851    # HTTP header `Content-Type`
8852    header_params['Content-Type'] = self.api_client.\
8853        select_header_content_type(['*/*'])
8854
8855    # Authentication setting
8856    auth_settings = ['BearerToken']
8857
8858    return self.api_client.call_api(
8859        '/apis/apps/v1beta2/namespaces/{namespace}/daemonsets/{name}',
8860        'PUT',
8861        path_params,
8862        query_params,
8863        header_params,
8864        body=body_params,
8865        post_params=form_params,
8866        files=local_var_files,
8867        response_type='V1beta2DaemonSet',
8868        auth_settings=auth_settings,
8869        async_req=params.get('async_req'),
8870        _return_http_data_only=params.get('_return_http_data_only'),
8871        _preload_content=params.get('_preload_content', True),
8872        _request_timeout=params.get('_request_timeout'),
8873        collection_formats=collection_formats)
8874
8875  def replace_namespaced_daemon_set_status(self, name, namespace, body,
8876                                           **kwargs):
8877    """
8878        replace status of the specified DaemonSet
8879        This method makes a synchronous HTTP request by default. To make an
8880        asynchronous HTTP request, please pass async_req=True
8881        >>> thread = api.replace_namespaced_daemon_set_status(name, namespace,
8882        body, async_req=True)
8883        >>> result = thread.get()
8884
8885        :param async_req bool
8886        :param str name: name of the DaemonSet (required)
8887        :param str namespace: object name and auth scope, such as for teams and
8888        projects (required)
8889        :param V1beta2DaemonSet body: (required)
8890        :param str pretty: If 'true', then the output is pretty printed.
8891        :param str dry_run: When present, indicates that modifications should
8892        not be persisted. An invalid or unrecognized dryRun directive will
8893        result in an error response and no further processing of the request.
8894        Valid values are: - All: all dry run stages will be processed
8895        :param str field_manager: fieldManager is a name associated with the
8896        actor or entity that is making these changes. The value must be less
8897        than or 128 characters long, and only contain printable characters, as
8898        defined by https://golang.org/pkg/unicode/#IsPrint.
8899        :return: V1beta2DaemonSet
8900                 If the method is called asynchronously,
8901                 returns the request thread.
8902        """
8903    kwargs['_return_http_data_only'] = True
8904    if kwargs.get('async_req'):
8905      return self.replace_namespaced_daemon_set_status_with_http_info(
8906          name, namespace, body, **kwargs)
8907    else:
8908      (data) = self.replace_namespaced_daemon_set_status_with_http_info(
8909          name, namespace, body, **kwargs)
8910      return data
8911
8912  def replace_namespaced_daemon_set_status_with_http_info(
8913      self, name, namespace, body, **kwargs):
8914    """
8915        replace status of the specified DaemonSet
8916        This method makes a synchronous HTTP request by default. To make an
8917        asynchronous HTTP request, please pass async_req=True
8918        >>> thread =
8919        api.replace_namespaced_daemon_set_status_with_http_info(name, namespace,
8920        body, async_req=True)
8921        >>> result = thread.get()
8922
8923        :param async_req bool
8924        :param str name: name of the DaemonSet (required)
8925        :param str namespace: object name and auth scope, such as for teams and
8926        projects (required)
8927        :param V1beta2DaemonSet body: (required)
8928        :param str pretty: If 'true', then the output is pretty printed.
8929        :param str dry_run: When present, indicates that modifications should
8930        not be persisted. An invalid or unrecognized dryRun directive will
8931        result in an error response and no further processing of the request.
8932        Valid values are: - All: all dry run stages will be processed
8933        :param str field_manager: fieldManager is a name associated with the
8934        actor or entity that is making these changes. The value must be less
8935        than or 128 characters long, and only contain printable characters, as
8936        defined by https://golang.org/pkg/unicode/#IsPrint.
8937        :return: V1beta2DaemonSet
8938                 If the method is called asynchronously,
8939                 returns the request thread.
8940        """
8941
8942    all_params = [
8943        'name', 'namespace', 'body', 'pretty', 'dry_run', 'field_manager'
8944    ]
8945    all_params.append('async_req')
8946    all_params.append('_return_http_data_only')
8947    all_params.append('_preload_content')
8948    all_params.append('_request_timeout')
8949
8950    params = locals()
8951    for key, val in iteritems(params['kwargs']):
8952      if key not in all_params:
8953        raise TypeError("Got an unexpected keyword argument '%s'"
8954                        ' to method replace_namespaced_daemon_set_status' % key)
8955      params[key] = val
8956    del params['kwargs']
8957    # verify the required parameter 'name' is set
8958    if ('name' not in params) or (params['name'] is None):
8959      raise ValueError(
8960          'Missing the required parameter `name` when calling `replace_namespaced_daemon_set_status`'
8961      )
8962    # verify the required parameter 'namespace' is set
8963    if ('namespace' not in params) or (params['namespace'] is None):
8964      raise ValueError(
8965          'Missing the required parameter `namespace` when calling `replace_namespaced_daemon_set_status`'
8966      )
8967    # verify the required parameter 'body' is set
8968    if ('body' not in params) or (params['body'] is None):
8969      raise ValueError(
8970          'Missing the required parameter `body` when calling `replace_namespaced_daemon_set_status`'
8971      )
8972
8973    collection_formats = {}
8974
8975    path_params = {}
8976    if 'name' in params:
8977      path_params['name'] = params['name']
8978    if 'namespace' in params:
8979      path_params['namespace'] = params['namespace']
8980
8981    query_params = []
8982    if 'pretty' in params:
8983      query_params.append(('pretty', params['pretty']))
8984    if 'dry_run' in params:
8985      query_params.append(('dryRun', params['dry_run']))
8986    if 'field_manager' in params:
8987      query_params.append(('fieldManager', params['field_manager']))
8988
8989    header_params = {}
8990
8991    form_params = []
8992    local_var_files = {}
8993
8994    body_params = None
8995    if 'body' in params:
8996      body_params = params['body']
8997    # HTTP header `Accept`
8998    header_params['Accept'] = self.api_client.\
8999        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
9000
9001    # HTTP header `Content-Type`
9002    header_params['Content-Type'] = self.api_client.\
9003        select_header_content_type(['*/*'])
9004
9005    # Authentication setting
9006    auth_settings = ['BearerToken']
9007
9008    return self.api_client.call_api(
9009        '/apis/apps/v1beta2/namespaces/{namespace}/daemonsets/{name}/status',
9010        'PUT',
9011        path_params,
9012        query_params,
9013        header_params,
9014        body=body_params,
9015        post_params=form_params,
9016        files=local_var_files,
9017        response_type='V1beta2DaemonSet',
9018        auth_settings=auth_settings,
9019        async_req=params.get('async_req'),
9020        _return_http_data_only=params.get('_return_http_data_only'),
9021        _preload_content=params.get('_preload_content', True),
9022        _request_timeout=params.get('_request_timeout'),
9023        collection_formats=collection_formats)
9024
9025  def replace_namespaced_deployment(self, name, namespace, body, **kwargs):
9026    """
9027        replace the specified Deployment
9028        This method makes a synchronous HTTP request by default. To make an
9029        asynchronous HTTP request, please pass async_req=True
9030        >>> thread = api.replace_namespaced_deployment(name, namespace, body,
9031        async_req=True)
9032        >>> result = thread.get()
9033
9034        :param async_req bool
9035        :param str name: name of the Deployment (required)
9036        :param str namespace: object name and auth scope, such as for teams and
9037        projects (required)
9038        :param V1beta2Deployment body: (required)
9039        :param str pretty: If 'true', then the output is pretty printed.
9040        :param str dry_run: When present, indicates that modifications should
9041        not be persisted. An invalid or unrecognized dryRun directive will
9042        result in an error response and no further processing of the request.
9043        Valid values are: - All: all dry run stages will be processed
9044        :param str field_manager: fieldManager is a name associated with the
9045        actor or entity that is making these changes. The value must be less
9046        than or 128 characters long, and only contain printable characters, as
9047        defined by https://golang.org/pkg/unicode/#IsPrint.
9048        :return: V1beta2Deployment
9049                 If the method is called asynchronously,
9050                 returns the request thread.
9051        """
9052    kwargs['_return_http_data_only'] = True
9053    if kwargs.get('async_req'):
9054      return self.replace_namespaced_deployment_with_http_info(
9055          name, namespace, body, **kwargs)
9056    else:
9057      (data) = self.replace_namespaced_deployment_with_http_info(
9058          name, namespace, body, **kwargs)
9059      return data
9060
9061  def replace_namespaced_deployment_with_http_info(self, name, namespace, body,
9062                                                   **kwargs):
9063    """
9064        replace the specified Deployment
9065        This method makes a synchronous HTTP request by default. To make an
9066        asynchronous HTTP request, please pass async_req=True
9067        >>> thread = api.replace_namespaced_deployment_with_http_info(name,
9068        namespace, body, async_req=True)
9069        >>> result = thread.get()
9070
9071        :param async_req bool
9072        :param str name: name of the Deployment (required)
9073        :param str namespace: object name and auth scope, such as for teams and
9074        projects (required)
9075        :param V1beta2Deployment body: (required)
9076        :param str pretty: If 'true', then the output is pretty printed.
9077        :param str dry_run: When present, indicates that modifications should
9078        not be persisted. An invalid or unrecognized dryRun directive will
9079        result in an error response and no further processing of the request.
9080        Valid values are: - All: all dry run stages will be processed
9081        :param str field_manager: fieldManager is a name associated with the
9082        actor or entity that is making these changes. The value must be less
9083        than or 128 characters long, and only contain printable characters, as
9084        defined by https://golang.org/pkg/unicode/#IsPrint.
9085        :return: V1beta2Deployment
9086                 If the method is called asynchronously,
9087                 returns the request thread.
9088        """
9089
9090    all_params = [
9091        'name', 'namespace', 'body', 'pretty', 'dry_run', 'field_manager'
9092    ]
9093    all_params.append('async_req')
9094    all_params.append('_return_http_data_only')
9095    all_params.append('_preload_content')
9096    all_params.append('_request_timeout')
9097
9098    params = locals()
9099    for key, val in iteritems(params['kwargs']):
9100      if key not in all_params:
9101        raise TypeError("Got an unexpected keyword argument '%s'"
9102                        ' to method replace_namespaced_deployment' % key)
9103      params[key] = val
9104    del params['kwargs']
9105    # verify the required parameter 'name' is set
9106    if ('name' not in params) or (params['name'] is None):
9107      raise ValueError(
9108          'Missing the required parameter `name` when calling `replace_namespaced_deployment`'
9109      )
9110    # verify the required parameter 'namespace' is set
9111    if ('namespace' not in params) or (params['namespace'] is None):
9112      raise ValueError(
9113          'Missing the required parameter `namespace` when calling `replace_namespaced_deployment`'
9114      )
9115    # verify the required parameter 'body' is set
9116    if ('body' not in params) or (params['body'] is None):
9117      raise ValueError(
9118          'Missing the required parameter `body` when calling `replace_namespaced_deployment`'
9119      )
9120
9121    collection_formats = {}
9122
9123    path_params = {}
9124    if 'name' in params:
9125      path_params['name'] = params['name']
9126    if 'namespace' in params:
9127      path_params['namespace'] = params['namespace']
9128
9129    query_params = []
9130    if 'pretty' in params:
9131      query_params.append(('pretty', params['pretty']))
9132    if 'dry_run' in params:
9133      query_params.append(('dryRun', params['dry_run']))
9134    if 'field_manager' in params:
9135      query_params.append(('fieldManager', params['field_manager']))
9136
9137    header_params = {}
9138
9139    form_params = []
9140    local_var_files = {}
9141
9142    body_params = None
9143    if 'body' in params:
9144      body_params = params['body']
9145    # HTTP header `Accept`
9146    header_params['Accept'] = self.api_client.\
9147        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
9148
9149    # HTTP header `Content-Type`
9150    header_params['Content-Type'] = self.api_client.\
9151        select_header_content_type(['*/*'])
9152
9153    # Authentication setting
9154    auth_settings = ['BearerToken']
9155
9156    return self.api_client.call_api(
9157        '/apis/apps/v1beta2/namespaces/{namespace}/deployments/{name}',
9158        'PUT',
9159        path_params,
9160        query_params,
9161        header_params,
9162        body=body_params,
9163        post_params=form_params,
9164        files=local_var_files,
9165        response_type='V1beta2Deployment',
9166        auth_settings=auth_settings,
9167        async_req=params.get('async_req'),
9168        _return_http_data_only=params.get('_return_http_data_only'),
9169        _preload_content=params.get('_preload_content', True),
9170        _request_timeout=params.get('_request_timeout'),
9171        collection_formats=collection_formats)
9172
9173  def replace_namespaced_deployment_scale(self, name, namespace, body,
9174                                          **kwargs):
9175    """
9176        replace scale of the specified Deployment
9177        This method makes a synchronous HTTP request by default. To make an
9178        asynchronous HTTP request, please pass async_req=True
9179        >>> thread = api.replace_namespaced_deployment_scale(name, namespace,
9180        body, async_req=True)
9181        >>> result = thread.get()
9182
9183        :param async_req bool
9184        :param str name: name of the Scale (required)
9185        :param str namespace: object name and auth scope, such as for teams and
9186        projects (required)
9187        :param V1beta2Scale body: (required)
9188        :param str pretty: If 'true', then the output is pretty printed.
9189        :param str dry_run: When present, indicates that modifications should
9190        not be persisted. An invalid or unrecognized dryRun directive will
9191        result in an error response and no further processing of the request.
9192        Valid values are: - All: all dry run stages will be processed
9193        :param str field_manager: fieldManager is a name associated with the
9194        actor or entity that is making these changes. The value must be less
9195        than or 128 characters long, and only contain printable characters, as
9196        defined by https://golang.org/pkg/unicode/#IsPrint.
9197        :return: V1beta2Scale
9198                 If the method is called asynchronously,
9199                 returns the request thread.
9200        """
9201    kwargs['_return_http_data_only'] = True
9202    if kwargs.get('async_req'):
9203      return self.replace_namespaced_deployment_scale_with_http_info(
9204          name, namespace, body, **kwargs)
9205    else:
9206      (data) = self.replace_namespaced_deployment_scale_with_http_info(
9207          name, namespace, body, **kwargs)
9208      return data
9209
9210  def replace_namespaced_deployment_scale_with_http_info(
9211      self, name, namespace, body, **kwargs):
9212    """
9213        replace scale of the specified Deployment
9214        This method makes a synchronous HTTP request by default. To make an
9215        asynchronous HTTP request, please pass async_req=True
9216        >>> thread =
9217        api.replace_namespaced_deployment_scale_with_http_info(name, namespace,
9218        body, async_req=True)
9219        >>> result = thread.get()
9220
9221        :param async_req bool
9222        :param str name: name of the Scale (required)
9223        :param str namespace: object name and auth scope, such as for teams and
9224        projects (required)
9225        :param V1beta2Scale body: (required)
9226        :param str pretty: If 'true', then the output is pretty printed.
9227        :param str dry_run: When present, indicates that modifications should
9228        not be persisted. An invalid or unrecognized dryRun directive will
9229        result in an error response and no further processing of the request.
9230        Valid values are: - All: all dry run stages will be processed
9231        :param str field_manager: fieldManager is a name associated with the
9232        actor or entity that is making these changes. The value must be less
9233        than or 128 characters long, and only contain printable characters, as
9234        defined by https://golang.org/pkg/unicode/#IsPrint.
9235        :return: V1beta2Scale
9236                 If the method is called asynchronously,
9237                 returns the request thread.
9238        """
9239
9240    all_params = [
9241        'name', 'namespace', 'body', 'pretty', 'dry_run', 'field_manager'
9242    ]
9243    all_params.append('async_req')
9244    all_params.append('_return_http_data_only')
9245    all_params.append('_preload_content')
9246    all_params.append('_request_timeout')
9247
9248    params = locals()
9249    for key, val in iteritems(params['kwargs']):
9250      if key not in all_params:
9251        raise TypeError("Got an unexpected keyword argument '%s'"
9252                        ' to method replace_namespaced_deployment_scale' % key)
9253      params[key] = val
9254    del params['kwargs']
9255    # verify the required parameter 'name' is set
9256    if ('name' not in params) or (params['name'] is None):
9257      raise ValueError(
9258          'Missing the required parameter `name` when calling `replace_namespaced_deployment_scale`'
9259      )
9260    # verify the required parameter 'namespace' is set
9261    if ('namespace' not in params) or (params['namespace'] is None):
9262      raise ValueError(
9263          'Missing the required parameter `namespace` when calling `replace_namespaced_deployment_scale`'
9264      )
9265    # verify the required parameter 'body' is set
9266    if ('body' not in params) or (params['body'] is None):
9267      raise ValueError(
9268          'Missing the required parameter `body` when calling `replace_namespaced_deployment_scale`'
9269      )
9270
9271    collection_formats = {}
9272
9273    path_params = {}
9274    if 'name' in params:
9275      path_params['name'] = params['name']
9276    if 'namespace' in params:
9277      path_params['namespace'] = params['namespace']
9278
9279    query_params = []
9280    if 'pretty' in params:
9281      query_params.append(('pretty', params['pretty']))
9282    if 'dry_run' in params:
9283      query_params.append(('dryRun', params['dry_run']))
9284    if 'field_manager' in params:
9285      query_params.append(('fieldManager', params['field_manager']))
9286
9287    header_params = {}
9288
9289    form_params = []
9290    local_var_files = {}
9291
9292    body_params = None
9293    if 'body' in params:
9294      body_params = params['body']
9295    # HTTP header `Accept`
9296    header_params['Accept'] = self.api_client.\
9297        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
9298
9299    # HTTP header `Content-Type`
9300    header_params['Content-Type'] = self.api_client.\
9301        select_header_content_type(['*/*'])
9302
9303    # Authentication setting
9304    auth_settings = ['BearerToken']
9305
9306    return self.api_client.call_api(
9307        '/apis/apps/v1beta2/namespaces/{namespace}/deployments/{name}/scale',
9308        'PUT',
9309        path_params,
9310        query_params,
9311        header_params,
9312        body=body_params,
9313        post_params=form_params,
9314        files=local_var_files,
9315        response_type='V1beta2Scale',
9316        auth_settings=auth_settings,
9317        async_req=params.get('async_req'),
9318        _return_http_data_only=params.get('_return_http_data_only'),
9319        _preload_content=params.get('_preload_content', True),
9320        _request_timeout=params.get('_request_timeout'),
9321        collection_formats=collection_formats)
9322
9323  def replace_namespaced_deployment_status(self, name, namespace, body,
9324                                           **kwargs):
9325    """
9326        replace status of the specified Deployment
9327        This method makes a synchronous HTTP request by default. To make an
9328        asynchronous HTTP request, please pass async_req=True
9329        >>> thread = api.replace_namespaced_deployment_status(name, namespace,
9330        body, async_req=True)
9331        >>> result = thread.get()
9332
9333        :param async_req bool
9334        :param str name: name of the Deployment (required)
9335        :param str namespace: object name and auth scope, such as for teams and
9336        projects (required)
9337        :param V1beta2Deployment body: (required)
9338        :param str pretty: If 'true', then the output is pretty printed.
9339        :param str dry_run: When present, indicates that modifications should
9340        not be persisted. An invalid or unrecognized dryRun directive will
9341        result in an error response and no further processing of the request.
9342        Valid values are: - All: all dry run stages will be processed
9343        :param str field_manager: fieldManager is a name associated with the
9344        actor or entity that is making these changes. The value must be less
9345        than or 128 characters long, and only contain printable characters, as
9346        defined by https://golang.org/pkg/unicode/#IsPrint.
9347        :return: V1beta2Deployment
9348                 If the method is called asynchronously,
9349                 returns the request thread.
9350        """
9351    kwargs['_return_http_data_only'] = True
9352    if kwargs.get('async_req'):
9353      return self.replace_namespaced_deployment_status_with_http_info(
9354          name, namespace, body, **kwargs)
9355    else:
9356      (data) = self.replace_namespaced_deployment_status_with_http_info(
9357          name, namespace, body, **kwargs)
9358      return data
9359
9360  def replace_namespaced_deployment_status_with_http_info(
9361      self, name, namespace, body, **kwargs):
9362    """
9363        replace status of the specified Deployment
9364        This method makes a synchronous HTTP request by default. To make an
9365        asynchronous HTTP request, please pass async_req=True
9366        >>> thread =
9367        api.replace_namespaced_deployment_status_with_http_info(name, namespace,
9368        body, async_req=True)
9369        >>> result = thread.get()
9370
9371        :param async_req bool
9372        :param str name: name of the Deployment (required)
9373        :param str namespace: object name and auth scope, such as for teams and
9374        projects (required)
9375        :param V1beta2Deployment body: (required)
9376        :param str pretty: If 'true', then the output is pretty printed.
9377        :param str dry_run: When present, indicates that modifications should
9378        not be persisted. An invalid or unrecognized dryRun directive will
9379        result in an error response and no further processing of the request.
9380        Valid values are: - All: all dry run stages will be processed
9381        :param str field_manager: fieldManager is a name associated with the
9382        actor or entity that is making these changes. The value must be less
9383        than or 128 characters long, and only contain printable characters, as
9384        defined by https://golang.org/pkg/unicode/#IsPrint.
9385        :return: V1beta2Deployment
9386                 If the method is called asynchronously,
9387                 returns the request thread.
9388        """
9389
9390    all_params = [
9391        'name', 'namespace', 'body', 'pretty', 'dry_run', 'field_manager'
9392    ]
9393    all_params.append('async_req')
9394    all_params.append('_return_http_data_only')
9395    all_params.append('_preload_content')
9396    all_params.append('_request_timeout')
9397
9398    params = locals()
9399    for key, val in iteritems(params['kwargs']):
9400      if key not in all_params:
9401        raise TypeError("Got an unexpected keyword argument '%s'"
9402                        ' to method replace_namespaced_deployment_status' % key)
9403      params[key] = val
9404    del params['kwargs']
9405    # verify the required parameter 'name' is set
9406    if ('name' not in params) or (params['name'] is None):
9407      raise ValueError(
9408          'Missing the required parameter `name` when calling `replace_namespaced_deployment_status`'
9409      )
9410    # verify the required parameter 'namespace' is set
9411    if ('namespace' not in params) or (params['namespace'] is None):
9412      raise ValueError(
9413          'Missing the required parameter `namespace` when calling `replace_namespaced_deployment_status`'
9414      )
9415    # verify the required parameter 'body' is set
9416    if ('body' not in params) or (params['body'] is None):
9417      raise ValueError(
9418          'Missing the required parameter `body` when calling `replace_namespaced_deployment_status`'
9419      )
9420
9421    collection_formats = {}
9422
9423    path_params = {}
9424    if 'name' in params:
9425      path_params['name'] = params['name']
9426    if 'namespace' in params:
9427      path_params['namespace'] = params['namespace']
9428
9429    query_params = []
9430    if 'pretty' in params:
9431      query_params.append(('pretty', params['pretty']))
9432    if 'dry_run' in params:
9433      query_params.append(('dryRun', params['dry_run']))
9434    if 'field_manager' in params:
9435      query_params.append(('fieldManager', params['field_manager']))
9436
9437    header_params = {}
9438
9439    form_params = []
9440    local_var_files = {}
9441
9442    body_params = None
9443    if 'body' in params:
9444      body_params = params['body']
9445    # HTTP header `Accept`
9446    header_params['Accept'] = self.api_client.\
9447        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
9448
9449    # HTTP header `Content-Type`
9450    header_params['Content-Type'] = self.api_client.\
9451        select_header_content_type(['*/*'])
9452
9453    # Authentication setting
9454    auth_settings = ['BearerToken']
9455
9456    return self.api_client.call_api(
9457        '/apis/apps/v1beta2/namespaces/{namespace}/deployments/{name}/status',
9458        'PUT',
9459        path_params,
9460        query_params,
9461        header_params,
9462        body=body_params,
9463        post_params=form_params,
9464        files=local_var_files,
9465        response_type='V1beta2Deployment',
9466        auth_settings=auth_settings,
9467        async_req=params.get('async_req'),
9468        _return_http_data_only=params.get('_return_http_data_only'),
9469        _preload_content=params.get('_preload_content', True),
9470        _request_timeout=params.get('_request_timeout'),
9471        collection_formats=collection_formats)
9472
9473  def replace_namespaced_replica_set(self, name, namespace, body, **kwargs):
9474    """
9475        replace the specified ReplicaSet
9476        This method makes a synchronous HTTP request by default. To make an
9477        asynchronous HTTP request, please pass async_req=True
9478        >>> thread = api.replace_namespaced_replica_set(name, namespace, body,
9479        async_req=True)
9480        >>> result = thread.get()
9481
9482        :param async_req bool
9483        :param str name: name of the ReplicaSet (required)
9484        :param str namespace: object name and auth scope, such as for teams and
9485        projects (required)
9486        :param V1beta2ReplicaSet body: (required)
9487        :param str pretty: If 'true', then the output is pretty printed.
9488        :param str dry_run: When present, indicates that modifications should
9489        not be persisted. An invalid or unrecognized dryRun directive will
9490        result in an error response and no further processing of the request.
9491        Valid values are: - All: all dry run stages will be processed
9492        :param str field_manager: fieldManager is a name associated with the
9493        actor or entity that is making these changes. The value must be less
9494        than or 128 characters long, and only contain printable characters, as
9495        defined by https://golang.org/pkg/unicode/#IsPrint.
9496        :return: V1beta2ReplicaSet
9497                 If the method is called asynchronously,
9498                 returns the request thread.
9499        """
9500    kwargs['_return_http_data_only'] = True
9501    if kwargs.get('async_req'):
9502      return self.replace_namespaced_replica_set_with_http_info(
9503          name, namespace, body, **kwargs)
9504    else:
9505      (data) = self.replace_namespaced_replica_set_with_http_info(
9506          name, namespace, body, **kwargs)
9507      return data
9508
9509  def replace_namespaced_replica_set_with_http_info(self, name, namespace, body,
9510                                                    **kwargs):
9511    """
9512        replace the specified ReplicaSet
9513        This method makes a synchronous HTTP request by default. To make an
9514        asynchronous HTTP request, please pass async_req=True
9515        >>> thread = api.replace_namespaced_replica_set_with_http_info(name,
9516        namespace, body, async_req=True)
9517        >>> result = thread.get()
9518
9519        :param async_req bool
9520        :param str name: name of the ReplicaSet (required)
9521        :param str namespace: object name and auth scope, such as for teams and
9522        projects (required)
9523        :param V1beta2ReplicaSet body: (required)
9524        :param str pretty: If 'true', then the output is pretty printed.
9525        :param str dry_run: When present, indicates that modifications should
9526        not be persisted. An invalid or unrecognized dryRun directive will
9527        result in an error response and no further processing of the request.
9528        Valid values are: - All: all dry run stages will be processed
9529        :param str field_manager: fieldManager is a name associated with the
9530        actor or entity that is making these changes. The value must be less
9531        than or 128 characters long, and only contain printable characters, as
9532        defined by https://golang.org/pkg/unicode/#IsPrint.
9533        :return: V1beta2ReplicaSet
9534                 If the method is called asynchronously,
9535                 returns the request thread.
9536        """
9537
9538    all_params = [
9539        'name', 'namespace', 'body', 'pretty', 'dry_run', 'field_manager'
9540    ]
9541    all_params.append('async_req')
9542    all_params.append('_return_http_data_only')
9543    all_params.append('_preload_content')
9544    all_params.append('_request_timeout')
9545
9546    params = locals()
9547    for key, val in iteritems(params['kwargs']):
9548      if key not in all_params:
9549        raise TypeError("Got an unexpected keyword argument '%s'"
9550                        ' to method replace_namespaced_replica_set' % key)
9551      params[key] = val
9552    del params['kwargs']
9553    # verify the required parameter 'name' is set
9554    if ('name' not in params) or (params['name'] is None):
9555      raise ValueError(
9556          'Missing the required parameter `name` when calling `replace_namespaced_replica_set`'
9557      )
9558    # verify the required parameter 'namespace' is set
9559    if ('namespace' not in params) or (params['namespace'] is None):
9560      raise ValueError(
9561          'Missing the required parameter `namespace` when calling `replace_namespaced_replica_set`'
9562      )
9563    # verify the required parameter 'body' is set
9564    if ('body' not in params) or (params['body'] is None):
9565      raise ValueError(
9566          'Missing the required parameter `body` when calling `replace_namespaced_replica_set`'
9567      )
9568
9569    collection_formats = {}
9570
9571    path_params = {}
9572    if 'name' in params:
9573      path_params['name'] = params['name']
9574    if 'namespace' in params:
9575      path_params['namespace'] = params['namespace']
9576
9577    query_params = []
9578    if 'pretty' in params:
9579      query_params.append(('pretty', params['pretty']))
9580    if 'dry_run' in params:
9581      query_params.append(('dryRun', params['dry_run']))
9582    if 'field_manager' in params:
9583      query_params.append(('fieldManager', params['field_manager']))
9584
9585    header_params = {}
9586
9587    form_params = []
9588    local_var_files = {}
9589
9590    body_params = None
9591    if 'body' in params:
9592      body_params = params['body']
9593    # HTTP header `Accept`
9594    header_params['Accept'] = self.api_client.\
9595        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
9596
9597    # HTTP header `Content-Type`
9598    header_params['Content-Type'] = self.api_client.\
9599        select_header_content_type(['*/*'])
9600
9601    # Authentication setting
9602    auth_settings = ['BearerToken']
9603
9604    return self.api_client.call_api(
9605        '/apis/apps/v1beta2/namespaces/{namespace}/replicasets/{name}',
9606        'PUT',
9607        path_params,
9608        query_params,
9609        header_params,
9610        body=body_params,
9611        post_params=form_params,
9612        files=local_var_files,
9613        response_type='V1beta2ReplicaSet',
9614        auth_settings=auth_settings,
9615        async_req=params.get('async_req'),
9616        _return_http_data_only=params.get('_return_http_data_only'),
9617        _preload_content=params.get('_preload_content', True),
9618        _request_timeout=params.get('_request_timeout'),
9619        collection_formats=collection_formats)
9620
9621  def replace_namespaced_replica_set_scale(self, name, namespace, body,
9622                                           **kwargs):
9623    """
9624        replace scale of the specified ReplicaSet
9625        This method makes a synchronous HTTP request by default. To make an
9626        asynchronous HTTP request, please pass async_req=True
9627        >>> thread = api.replace_namespaced_replica_set_scale(name, namespace,
9628        body, async_req=True)
9629        >>> result = thread.get()
9630
9631        :param async_req bool
9632        :param str name: name of the Scale (required)
9633        :param str namespace: object name and auth scope, such as for teams and
9634        projects (required)
9635        :param V1beta2Scale body: (required)
9636        :param str pretty: If 'true', then the output is pretty printed.
9637        :param str dry_run: When present, indicates that modifications should
9638        not be persisted. An invalid or unrecognized dryRun directive will
9639        result in an error response and no further processing of the request.
9640        Valid values are: - All: all dry run stages will be processed
9641        :param str field_manager: fieldManager is a name associated with the
9642        actor or entity that is making these changes. The value must be less
9643        than or 128 characters long, and only contain printable characters, as
9644        defined by https://golang.org/pkg/unicode/#IsPrint.
9645        :return: V1beta2Scale
9646                 If the method is called asynchronously,
9647                 returns the request thread.
9648        """
9649    kwargs['_return_http_data_only'] = True
9650    if kwargs.get('async_req'):
9651      return self.replace_namespaced_replica_set_scale_with_http_info(
9652          name, namespace, body, **kwargs)
9653    else:
9654      (data) = self.replace_namespaced_replica_set_scale_with_http_info(
9655          name, namespace, body, **kwargs)
9656      return data
9657
9658  def replace_namespaced_replica_set_scale_with_http_info(
9659      self, name, namespace, body, **kwargs):
9660    """
9661        replace scale of the specified ReplicaSet
9662        This method makes a synchronous HTTP request by default. To make an
9663        asynchronous HTTP request, please pass async_req=True
9664        >>> thread =
9665        api.replace_namespaced_replica_set_scale_with_http_info(name, namespace,
9666        body, async_req=True)
9667        >>> result = thread.get()
9668
9669        :param async_req bool
9670        :param str name: name of the Scale (required)
9671        :param str namespace: object name and auth scope, such as for teams and
9672        projects (required)
9673        :param V1beta2Scale body: (required)
9674        :param str pretty: If 'true', then the output is pretty printed.
9675        :param str dry_run: When present, indicates that modifications should
9676        not be persisted. An invalid or unrecognized dryRun directive will
9677        result in an error response and no further processing of the request.
9678        Valid values are: - All: all dry run stages will be processed
9679        :param str field_manager: fieldManager is a name associated with the
9680        actor or entity that is making these changes. The value must be less
9681        than or 128 characters long, and only contain printable characters, as
9682        defined by https://golang.org/pkg/unicode/#IsPrint.
9683        :return: V1beta2Scale
9684                 If the method is called asynchronously,
9685                 returns the request thread.
9686        """
9687
9688    all_params = [
9689        'name', 'namespace', 'body', 'pretty', 'dry_run', 'field_manager'
9690    ]
9691    all_params.append('async_req')
9692    all_params.append('_return_http_data_only')
9693    all_params.append('_preload_content')
9694    all_params.append('_request_timeout')
9695
9696    params = locals()
9697    for key, val in iteritems(params['kwargs']):
9698      if key not in all_params:
9699        raise TypeError("Got an unexpected keyword argument '%s'"
9700                        ' to method replace_namespaced_replica_set_scale' % key)
9701      params[key] = val
9702    del params['kwargs']
9703    # verify the required parameter 'name' is set
9704    if ('name' not in params) or (params['name'] is None):
9705      raise ValueError(
9706          'Missing the required parameter `name` when calling `replace_namespaced_replica_set_scale`'
9707      )
9708    # verify the required parameter 'namespace' is set
9709    if ('namespace' not in params) or (params['namespace'] is None):
9710      raise ValueError(
9711          'Missing the required parameter `namespace` when calling `replace_namespaced_replica_set_scale`'
9712      )
9713    # verify the required parameter 'body' is set
9714    if ('body' not in params) or (params['body'] is None):
9715      raise ValueError(
9716          'Missing the required parameter `body` when calling `replace_namespaced_replica_set_scale`'
9717      )
9718
9719    collection_formats = {}
9720
9721    path_params = {}
9722    if 'name' in params:
9723      path_params['name'] = params['name']
9724    if 'namespace' in params:
9725      path_params['namespace'] = params['namespace']
9726
9727    query_params = []
9728    if 'pretty' in params:
9729      query_params.append(('pretty', params['pretty']))
9730    if 'dry_run' in params:
9731      query_params.append(('dryRun', params['dry_run']))
9732    if 'field_manager' in params:
9733      query_params.append(('fieldManager', params['field_manager']))
9734
9735    header_params = {}
9736
9737    form_params = []
9738    local_var_files = {}
9739
9740    body_params = None
9741    if 'body' in params:
9742      body_params = params['body']
9743    # HTTP header `Accept`
9744    header_params['Accept'] = self.api_client.\
9745        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
9746
9747    # HTTP header `Content-Type`
9748    header_params['Content-Type'] = self.api_client.\
9749        select_header_content_type(['*/*'])
9750
9751    # Authentication setting
9752    auth_settings = ['BearerToken']
9753
9754    return self.api_client.call_api(
9755        '/apis/apps/v1beta2/namespaces/{namespace}/replicasets/{name}/scale',
9756        'PUT',
9757        path_params,
9758        query_params,
9759        header_params,
9760        body=body_params,
9761        post_params=form_params,
9762        files=local_var_files,
9763        response_type='V1beta2Scale',
9764        auth_settings=auth_settings,
9765        async_req=params.get('async_req'),
9766        _return_http_data_only=params.get('_return_http_data_only'),
9767        _preload_content=params.get('_preload_content', True),
9768        _request_timeout=params.get('_request_timeout'),
9769        collection_formats=collection_formats)
9770
9771  def replace_namespaced_replica_set_status(self, name, namespace, body,
9772                                            **kwargs):
9773    """
9774        replace status of the specified ReplicaSet
9775        This method makes a synchronous HTTP request by default. To make an
9776        asynchronous HTTP request, please pass async_req=True
9777        >>> thread = api.replace_namespaced_replica_set_status(name, namespace,
9778        body, async_req=True)
9779        >>> result = thread.get()
9780
9781        :param async_req bool
9782        :param str name: name of the ReplicaSet (required)
9783        :param str namespace: object name and auth scope, such as for teams and
9784        projects (required)
9785        :param V1beta2ReplicaSet body: (required)
9786        :param str pretty: If 'true', then the output is pretty printed.
9787        :param str dry_run: When present, indicates that modifications should
9788        not be persisted. An invalid or unrecognized dryRun directive will
9789        result in an error response and no further processing of the request.
9790        Valid values are: - All: all dry run stages will be processed
9791        :param str field_manager: fieldManager is a name associated with the
9792        actor or entity that is making these changes. The value must be less
9793        than or 128 characters long, and only contain printable characters, as
9794        defined by https://golang.org/pkg/unicode/#IsPrint.
9795        :return: V1beta2ReplicaSet
9796                 If the method is called asynchronously,
9797                 returns the request thread.
9798        """
9799    kwargs['_return_http_data_only'] = True
9800    if kwargs.get('async_req'):
9801      return self.replace_namespaced_replica_set_status_with_http_info(
9802          name, namespace, body, **kwargs)
9803    else:
9804      (data) = self.replace_namespaced_replica_set_status_with_http_info(
9805          name, namespace, body, **kwargs)
9806      return data
9807
9808  def replace_namespaced_replica_set_status_with_http_info(
9809      self, name, namespace, body, **kwargs):
9810    """
9811        replace status of the specified ReplicaSet
9812        This method makes a synchronous HTTP request by default. To make an
9813        asynchronous HTTP request, please pass async_req=True
9814        >>> thread = api.replace_namespaced_replica_set_status_with_http_info(name, namespace, body, async_req=True)
9815        >>> result = thread.get()
9816
9817        :param async_req bool
9818        :param str name: name of the ReplicaSet (required)
9819        :param str namespace: object name and auth scope, such as for teams and projects (required)
9820        :param V1beta2ReplicaSet body: (required)
9821        :param str pretty: If 'true', then the output is pretty printed.
9822        :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
9823        :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
9824        :return: V1beta2ReplicaSet
9825                 If the method is called asynchronously,
9826                 returns the request thread.
9827        """
9828
9829    all_params = [
9830        'name', 'namespace', 'body', 'pretty', 'dry_run', 'field_manager'
9831    ]
9832    all_params.append('async_req')
9833    all_params.append('_return_http_data_only')
9834    all_params.append('_preload_content')
9835    all_params.append('_request_timeout')
9836
9837    params = locals()
9838    for key, val in iteritems(params['kwargs']):
9839      if key not in all_params:
9840        raise TypeError("Got an unexpected keyword argument '%s'"
9841                        ' to method replace_namespaced_replica_set_status' %
9842                        key)
9843      params[key] = val
9844    del params['kwargs']
9845    # verify the required parameter 'name' is set
9846    if ('name' not in params) or (params['name'] is None):
9847      raise ValueError(
9848          'Missing the required parameter `name` when calling `replace_namespaced_replica_set_status`'
9849      )
9850    # verify the required parameter 'namespace' is set
9851    if ('namespace' not in params) or (params['namespace'] is None):
9852      raise ValueError(
9853          'Missing the required parameter `namespace` when calling `replace_namespaced_replica_set_status`'
9854      )
9855    # verify the required parameter 'body' is set
9856    if ('body' not in params) or (params['body'] is None):
9857      raise ValueError(
9858          'Missing the required parameter `body` when calling `replace_namespaced_replica_set_status`'
9859      )
9860
9861    collection_formats = {}
9862
9863    path_params = {}
9864    if 'name' in params:
9865      path_params['name'] = params['name']
9866    if 'namespace' in params:
9867      path_params['namespace'] = params['namespace']
9868
9869    query_params = []
9870    if 'pretty' in params:
9871      query_params.append(('pretty', params['pretty']))
9872    if 'dry_run' in params:
9873      query_params.append(('dryRun', params['dry_run']))
9874    if 'field_manager' in params:
9875      query_params.append(('fieldManager', params['field_manager']))
9876
9877    header_params = {}
9878
9879    form_params = []
9880    local_var_files = {}
9881
9882    body_params = None
9883    if 'body' in params:
9884      body_params = params['body']
9885    # HTTP header `Accept`
9886    header_params['Accept'] = self.api_client.\
9887        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
9888
9889    # HTTP header `Content-Type`
9890    header_params['Content-Type'] = self.api_client.\
9891        select_header_content_type(['*/*'])
9892
9893    # Authentication setting
9894    auth_settings = ['BearerToken']
9895
9896    return self.api_client.call_api(
9897        '/apis/apps/v1beta2/namespaces/{namespace}/replicasets/{name}/status',
9898        'PUT',
9899        path_params,
9900        query_params,
9901        header_params,
9902        body=body_params,
9903        post_params=form_params,
9904        files=local_var_files,
9905        response_type='V1beta2ReplicaSet',
9906        auth_settings=auth_settings,
9907        async_req=params.get('async_req'),
9908        _return_http_data_only=params.get('_return_http_data_only'),
9909        _preload_content=params.get('_preload_content', True),
9910        _request_timeout=params.get('_request_timeout'),
9911        collection_formats=collection_formats)
9912
9913  def replace_namespaced_stateful_set(self, name, namespace, body, **kwargs):
9914    """
9915        replace the specified StatefulSet
9916        This method makes a synchronous HTTP request by default. To make an
9917        asynchronous HTTP request, please pass async_req=True
9918        >>> thread = api.replace_namespaced_stateful_set(name, namespace, body, async_req=True)
9919        >>> result = thread.get()
9920
9921        :param async_req bool
9922        :param str name: name of the StatefulSet (required)
9923        :param str namespace: object name and auth scope, such as for teams and projects (required)
9924        :param V1beta2StatefulSet body: (required)
9925        :param str pretty: If 'true', then the output is pretty printed.
9926        :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
9927        :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
9928        :return: V1beta2StatefulSet
9929                 If the method is called asynchronously,
9930                 returns the request thread.
9931        """
9932    kwargs['_return_http_data_only'] = True
9933    if kwargs.get('async_req'):
9934      return self.replace_namespaced_stateful_set_with_http_info(
9935          name, namespace, body, **kwargs)
9936    else:
9937      (data) = self.replace_namespaced_stateful_set_with_http_info(
9938          name, namespace, body, **kwargs)
9939      return data
9940
9941  def replace_namespaced_stateful_set_with_http_info(self, name, namespace,
9942                                                     body, **kwargs):
9943    """
9944        replace the specified StatefulSet
9945        This method makes a synchronous HTTP request by default. To make an
9946        asynchronous HTTP request, please pass async_req=True
9947        >>> thread = api.replace_namespaced_stateful_set_with_http_info(name, namespace, body, async_req=True)
9948        >>> result = thread.get()
9949
9950        :param async_req bool
9951        :param str name: name of the StatefulSet (required)
9952        :param str namespace: object name and auth scope, such as for teams and projects (required)
9953        :param V1beta2StatefulSet body: (required)
9954        :param str pretty: If 'true', then the output is pretty printed.
9955        :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
9956        :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
9957        :return: V1beta2StatefulSet
9958                 If the method is called asynchronously,
9959                 returns the request thread.
9960        """
9961
9962    all_params = [
9963        'name', 'namespace', 'body', 'pretty', 'dry_run', 'field_manager'
9964    ]
9965    all_params.append('async_req')
9966    all_params.append('_return_http_data_only')
9967    all_params.append('_preload_content')
9968    all_params.append('_request_timeout')
9969
9970    params = locals()
9971    for key, val in iteritems(params['kwargs']):
9972      if key not in all_params:
9973        raise TypeError("Got an unexpected keyword argument '%s'"
9974                        ' to method replace_namespaced_stateful_set' % key)
9975      params[key] = val
9976    del params['kwargs']
9977    # verify the required parameter 'name' is set
9978    if ('name' not in params) or (params['name'] is None):
9979      raise ValueError(
9980          'Missing the required parameter `name` when calling `replace_namespaced_stateful_set`'
9981      )
9982    # verify the required parameter 'namespace' is set
9983    if ('namespace' not in params) or (params['namespace'] is None):
9984      raise ValueError(
9985          'Missing the required parameter `namespace` when calling `replace_namespaced_stateful_set`'
9986      )
9987    # verify the required parameter 'body' is set
9988    if ('body' not in params) or (params['body'] is None):
9989      raise ValueError(
9990          'Missing the required parameter `body` when calling `replace_namespaced_stateful_set`'
9991      )
9992
9993    collection_formats = {}
9994
9995    path_params = {}
9996    if 'name' in params:
9997      path_params['name'] = params['name']
9998    if 'namespace' in params:
9999      path_params['namespace'] = params['namespace']
10000
10001    query_params = []
10002    if 'pretty' in params:
10003      query_params.append(('pretty', params['pretty']))
10004    if 'dry_run' in params:
10005      query_params.append(('dryRun', params['dry_run']))
10006    if 'field_manager' in params:
10007      query_params.append(('fieldManager', params['field_manager']))
10008
10009    header_params = {}
10010
10011    form_params = []
10012    local_var_files = {}
10013
10014    body_params = None
10015    if 'body' in params:
10016      body_params = params['body']
10017    # HTTP header `Accept`
10018    header_params['Accept'] = self.api_client.\
10019        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
10020
10021    # HTTP header `Content-Type`
10022    header_params['Content-Type'] = self.api_client.\
10023        select_header_content_type(['*/*'])
10024
10025    # Authentication setting
10026    auth_settings = ['BearerToken']
10027
10028    return self.api_client.call_api(
10029        '/apis/apps/v1beta2/namespaces/{namespace}/statefulsets/{name}',
10030        'PUT',
10031        path_params,
10032        query_params,
10033        header_params,
10034        body=body_params,
10035        post_params=form_params,
10036        files=local_var_files,
10037        response_type='V1beta2StatefulSet',
10038        auth_settings=auth_settings,
10039        async_req=params.get('async_req'),
10040        _return_http_data_only=params.get('_return_http_data_only'),
10041        _preload_content=params.get('_preload_content', True),
10042        _request_timeout=params.get('_request_timeout'),
10043        collection_formats=collection_formats)
10044
10045  def replace_namespaced_stateful_set_scale(self, name, namespace, body,
10046                                            **kwargs):
10047    """
10048        replace scale of the specified StatefulSet
10049        This method makes a synchronous HTTP request by default. To make an
10050        asynchronous HTTP request, please pass async_req=True
10051        >>> thread = api.replace_namespaced_stateful_set_scale(name, namespace, body, async_req=True)
10052        >>> result = thread.get()
10053
10054        :param async_req bool
10055        :param str name: name of the Scale (required)
10056        :param str namespace: object name and auth scope, such as for teams and projects (required)
10057        :param V1beta2Scale body: (required)
10058        :param str pretty: If 'true', then the output is pretty printed.
10059        :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
10060        :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
10061        :return: V1beta2Scale
10062                 If the method is called asynchronously,
10063                 returns the request thread.
10064        """
10065    kwargs['_return_http_data_only'] = True
10066    if kwargs.get('async_req'):
10067      return self.replace_namespaced_stateful_set_scale_with_http_info(
10068          name, namespace, body, **kwargs)
10069    else:
10070      (data) = self.replace_namespaced_stateful_set_scale_with_http_info(
10071          name, namespace, body, **kwargs)
10072      return data
10073
10074  def replace_namespaced_stateful_set_scale_with_http_info(
10075      self, name, namespace, body, **kwargs):
10076    """
10077        replace scale of the specified StatefulSet
10078        This method makes a synchronous HTTP request by default. To make an
10079        asynchronous HTTP request, please pass async_req=True
10080        >>> thread = api.replace_namespaced_stateful_set_scale_with_http_info(name, namespace, body, async_req=True)
10081        >>> result = thread.get()
10082
10083        :param async_req bool
10084        :param str name: name of the Scale (required)
10085        :param str namespace: object name and auth scope, such as for teams and projects (required)
10086        :param V1beta2Scale body: (required)
10087        :param str pretty: If 'true', then the output is pretty printed.
10088        :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
10089        :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
10090        :return: V1beta2Scale
10091                 If the method is called asynchronously,
10092                 returns the request thread.
10093        """
10094
10095    all_params = [
10096        'name', 'namespace', 'body', 'pretty', 'dry_run', 'field_manager'
10097    ]
10098    all_params.append('async_req')
10099    all_params.append('_return_http_data_only')
10100    all_params.append('_preload_content')
10101    all_params.append('_request_timeout')
10102
10103    params = locals()
10104    for key, val in iteritems(params['kwargs']):
10105      if key not in all_params:
10106        raise TypeError("Got an unexpected keyword argument '%s'"
10107                        ' to method replace_namespaced_stateful_set_scale' %
10108                        key)
10109      params[key] = val
10110    del params['kwargs']
10111    # verify the required parameter 'name' is set
10112    if ('name' not in params) or (params['name'] is None):
10113      raise ValueError(
10114          'Missing the required parameter `name` when calling `replace_namespaced_stateful_set_scale`'
10115      )
10116    # verify the required parameter 'namespace' is set
10117    if ('namespace' not in params) or (params['namespace'] is None):
10118      raise ValueError(
10119          'Missing the required parameter `namespace` when calling `replace_namespaced_stateful_set_scale`'
10120      )
10121    # verify the required parameter 'body' is set
10122    if ('body' not in params) or (params['body'] is None):
10123      raise ValueError(
10124          'Missing the required parameter `body` when calling `replace_namespaced_stateful_set_scale`'
10125      )
10126
10127    collection_formats = {}
10128
10129    path_params = {}
10130    if 'name' in params:
10131      path_params['name'] = params['name']
10132    if 'namespace' in params:
10133      path_params['namespace'] = params['namespace']
10134
10135    query_params = []
10136    if 'pretty' in params:
10137      query_params.append(('pretty', params['pretty']))
10138    if 'dry_run' in params:
10139      query_params.append(('dryRun', params['dry_run']))
10140    if 'field_manager' in params:
10141      query_params.append(('fieldManager', params['field_manager']))
10142
10143    header_params = {}
10144
10145    form_params = []
10146    local_var_files = {}
10147
10148    body_params = None
10149    if 'body' in params:
10150      body_params = params['body']
10151    # HTTP header `Accept`
10152    header_params['Accept'] = self.api_client.\
10153        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
10154
10155    # HTTP header `Content-Type`
10156    header_params['Content-Type'] = self.api_client.\
10157        select_header_content_type(['*/*'])
10158
10159    # Authentication setting
10160    auth_settings = ['BearerToken']
10161
10162    return self.api_client.call_api(
10163        '/apis/apps/v1beta2/namespaces/{namespace}/statefulsets/{name}/scale',
10164        'PUT',
10165        path_params,
10166        query_params,
10167        header_params,
10168        body=body_params,
10169        post_params=form_params,
10170        files=local_var_files,
10171        response_type='V1beta2Scale',
10172        auth_settings=auth_settings,
10173        async_req=params.get('async_req'),
10174        _return_http_data_only=params.get('_return_http_data_only'),
10175        _preload_content=params.get('_preload_content', True),
10176        _request_timeout=params.get('_request_timeout'),
10177        collection_formats=collection_formats)
10178
10179  def replace_namespaced_stateful_set_status(self, name, namespace, body,
10180                                             **kwargs):
10181    """
10182        replace status of the specified StatefulSet
10183        This method makes a synchronous HTTP request by default. To make an
10184        asynchronous HTTP request, please pass async_req=True
10185        >>> thread = api.replace_namespaced_stateful_set_status(name, namespace, body, async_req=True)
10186        >>> result = thread.get()
10187
10188        :param async_req bool
10189        :param str name: name of the StatefulSet (required)
10190        :param str namespace: object name and auth scope, such as for teams and projects (required)
10191        :param V1beta2StatefulSet body: (required)
10192        :param str pretty: If 'true', then the output is pretty printed.
10193        :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
10194        :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
10195        :return: V1beta2StatefulSet
10196                 If the method is called asynchronously,
10197                 returns the request thread.
10198        """
10199    kwargs['_return_http_data_only'] = True
10200    if kwargs.get('async_req'):
10201      return self.replace_namespaced_stateful_set_status_with_http_info(
10202          name, namespace, body, **kwargs)
10203    else:
10204      (data) = self.replace_namespaced_stateful_set_status_with_http_info(
10205          name, namespace, body, **kwargs)
10206      return data
10207
10208  def replace_namespaced_stateful_set_status_with_http_info(
10209      self, name, namespace, body, **kwargs):
10210    """
10211        replace status of the specified StatefulSet
10212        This method makes a synchronous HTTP request by default. To make an
10213        asynchronous HTTP request, please pass async_req=True
10214        >>> thread = api.replace_namespaced_stateful_set_status_with_http_info(name, namespace, body, async_req=True)
10215        >>> result = thread.get()
10216
10217        :param async_req bool
10218        :param str name: name of the StatefulSet (required)
10219        :param str namespace: object name and auth scope, such as for teams and projects (required)
10220        :param V1beta2StatefulSet body: (required)
10221        :param str pretty: If 'true', then the output is pretty printed.
10222        :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
10223        :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
10224        :return: V1beta2StatefulSet
10225                 If the method is called asynchronously,
10226                 returns the request thread.
10227        """
10228
10229    all_params = [
10230        'name', 'namespace', 'body', 'pretty', 'dry_run', 'field_manager'
10231    ]
10232    all_params.append('async_req')
10233    all_params.append('_return_http_data_only')
10234    all_params.append('_preload_content')
10235    all_params.append('_request_timeout')
10236
10237    params = locals()
10238    for key, val in iteritems(params['kwargs']):
10239      if key not in all_params:
10240        raise TypeError("Got an unexpected keyword argument '%s'"
10241                        ' to method replace_namespaced_stateful_set_status' %
10242                        key)
10243      params[key] = val
10244    del params['kwargs']
10245    # verify the required parameter 'name' is set
10246    if ('name' not in params) or (params['name'] is None):
10247      raise ValueError(
10248          'Missing the required parameter `name` when calling `replace_namespaced_stateful_set_status`'
10249      )
10250    # verify the required parameter 'namespace' is set
10251    if ('namespace' not in params) or (params['namespace'] is None):
10252      raise ValueError(
10253          'Missing the required parameter `namespace` when calling `replace_namespaced_stateful_set_status`'
10254      )
10255    # verify the required parameter 'body' is set
10256    if ('body' not in params) or (params['body'] is None):
10257      raise ValueError(
10258          'Missing the required parameter `body` when calling `replace_namespaced_stateful_set_status`'
10259      )
10260
10261    collection_formats = {}
10262
10263    path_params = {}
10264    if 'name' in params:
10265      path_params['name'] = params['name']
10266    if 'namespace' in params:
10267      path_params['namespace'] = params['namespace']
10268
10269    query_params = []
10270    if 'pretty' in params:
10271      query_params.append(('pretty', params['pretty']))
10272    if 'dry_run' in params:
10273      query_params.append(('dryRun', params['dry_run']))
10274    if 'field_manager' in params:
10275      query_params.append(('fieldManager', params['field_manager']))
10276
10277    header_params = {}
10278
10279    form_params = []
10280    local_var_files = {}
10281
10282    body_params = None
10283    if 'body' in params:
10284      body_params = params['body']
10285    # HTTP header `Accept`
10286    header_params['Accept'] = self.api_client.\
10287        select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
10288
10289    # HTTP header `Content-Type`
10290    header_params['Content-Type'] = self.api_client.\
10291        select_header_content_type(['*/*'])
10292
10293    # Authentication setting
10294    auth_settings = ['BearerToken']
10295
10296    return self.api_client.call_api(
10297        '/apis/apps/v1beta2/namespaces/{namespace}/statefulsets/{name}/status',
10298        'PUT',
10299        path_params,
10300        query_params,
10301        header_params,
10302        body=body_params,
10303        post_params=form_params,
10304        files=local_var_files,
10305        response_type='V1beta2StatefulSet',
10306        auth_settings=auth_settings,
10307        async_req=params.get('async_req'),
10308        _return_http_data_only=params.get('_return_http_data_only'),
10309        _preload_content=params.get('_preload_content', True),
10310        _request_timeout=params.get('_request_timeout'),
10311        collection_formats=collection_formats)
10312