|
| 1 | +# coding: utf-8 |
| 2 | + |
| 3 | +""" |
| 4 | + Kubernetes |
| 5 | +
|
| 6 | + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) |
| 7 | +
|
| 8 | + OpenAPI spec version: v1.8.1 |
| 9 | + |
| 10 | + Generated by: https://github.com/swagger-api/swagger-codegen.git |
| 11 | +""" |
| 12 | + |
| 13 | + |
| 14 | +from __future__ import absolute_import |
| 15 | + |
| 16 | +import sys |
| 17 | +import os |
| 18 | +import re |
| 19 | + |
| 20 | +# python 2 and python 3 compatibility library |
| 21 | +from six import iteritems |
| 22 | + |
| 23 | +from ..api_client import ApiClient |
| 24 | + |
| 25 | + |
| 26 | +class ApiextensionsApi(object): |
| 27 | + """ |
| 28 | + NOTE: This class is auto generated by the swagger code generator program. |
| 29 | + Do not edit the class manually. |
| 30 | + Ref: https://github.com/swagger-api/swagger-codegen |
| 31 | + """ |
| 32 | + |
| 33 | + def __init__(self, api_client=None): |
| 34 | + if api_client is None: |
| 35 | + api_client = ApiClient() |
| 36 | + self.api_client = api_client |
| 37 | + |
| 38 | + def get_api_group(self, **kwargs): |
| 39 | + """ |
| 40 | + get information of a group |
| 41 | + This method makes a synchronous HTTP request by default. To make an |
| 42 | + asynchronous HTTP request, please pass async=True |
| 43 | + >>> thread = api.get_api_group(async=True) |
| 44 | + >>> result = thread.get() |
| 45 | +
|
| 46 | + :param async bool |
| 47 | + :return: V1APIGroup |
| 48 | + If the method is called asynchronously, |
| 49 | + returns the request thread. |
| 50 | + """ |
| 51 | + kwargs['_return_http_data_only'] = True |
| 52 | + if kwargs.get('async'): |
| 53 | + return self.get_api_group_with_http_info(**kwargs) |
| 54 | + else: |
| 55 | + (data) = self.get_api_group_with_http_info(**kwargs) |
| 56 | + return data |
| 57 | + |
| 58 | + def get_api_group_with_http_info(self, **kwargs): |
| 59 | + """ |
| 60 | + get information of a group |
| 61 | + This method makes a synchronous HTTP request by default. To make an |
| 62 | + asynchronous HTTP request, please pass async=True |
| 63 | + >>> thread = api.get_api_group_with_http_info(async=True) |
| 64 | + >>> result = thread.get() |
| 65 | +
|
| 66 | + :param async bool |
| 67 | + :return: V1APIGroup |
| 68 | + If the method is called asynchronously, |
| 69 | + returns the request thread. |
| 70 | + """ |
| 71 | + |
| 72 | + all_params = [] |
| 73 | + all_params.append('async') |
| 74 | + all_params.append('_return_http_data_only') |
| 75 | + all_params.append('_preload_content') |
| 76 | + all_params.append('_request_timeout') |
| 77 | + |
| 78 | + params = locals() |
| 79 | + for key, val in iteritems(params['kwargs']): |
| 80 | + if key not in all_params: |
| 81 | + raise TypeError( |
| 82 | + "Got an unexpected keyword argument '%s'" |
| 83 | + " to method get_api_group" % key |
| 84 | + ) |
| 85 | + params[key] = val |
| 86 | + del params['kwargs'] |
| 87 | + |
| 88 | + collection_formats = {} |
| 89 | + |
| 90 | + path_params = {} |
| 91 | + |
| 92 | + query_params = [] |
| 93 | + |
| 94 | + header_params = {} |
| 95 | + |
| 96 | + form_params = [] |
| 97 | + local_var_files = {} |
| 98 | + |
| 99 | + body_params = None |
| 100 | + # HTTP header `Accept` |
| 101 | + header_params['Accept'] = self.api_client.\ |
| 102 | + select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) |
| 103 | + |
| 104 | + # HTTP header `Content-Type` |
| 105 | + header_params['Content-Type'] = self.api_client.\ |
| 106 | + select_header_content_type(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) |
| 107 | + |
| 108 | + # Authentication setting |
| 109 | + auth_settings = ['BearerToken'] |
| 110 | + |
| 111 | + return self.api_client.call_api('/apis/apiextensions.k8s.io/', 'GET', |
| 112 | + path_params, |
| 113 | + query_params, |
| 114 | + header_params, |
| 115 | + body=body_params, |
| 116 | + post_params=form_params, |
| 117 | + files=local_var_files, |
| 118 | + response_type='V1APIGroup', |
| 119 | + auth_settings=auth_settings, |
| 120 | + async=params.get('async'), |
| 121 | + _return_http_data_only=params.get('_return_http_data_only'), |
| 122 | + _preload_content=params.get('_preload_content', True), |
| 123 | + _request_timeout=params.get('_request_timeout'), |
| 124 | + collection_formats=collection_formats) |
0 commit comments