Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit c123726

Browse files
committedAug 16, 2023
wip
1 parent 691a7f1 commit c123726

File tree

8 files changed

+103
-21
lines changed

8 files changed

+103
-21
lines changed
 

‎.openapi-generator/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6.5.0
1+
6.6.0

‎README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,8 +217,9 @@ Class | Method | HTTP request | Description
217217

218218
## Documentation For Authorization
219219

220-
Authentication schemes defined for the API:
221-
## coderbot_auth
220+
Authentication schemes defined for the API:
221+
<a id="coderbot_auth"></a>
222+
### coderbot_auth
222223

223224
- **Type**: Bearer authentication
224225

‎cloud_api_robot_client/configuration.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ def __init__(
9191
server_variables=None,
9292
server_operation_index=None,
9393
server_operation_variables=None,
94+
access_token=None,
9495
):
9596
"""Constructor
9697
"""
@@ -110,6 +111,9 @@ def __init__(
110111
"""
111112
# Authentication Settings
112113
self.disabled_client_side_validations = disabled_client_side_validations
114+
self.access_token = None
115+
"""access token for OAuth/Bearer
116+
"""
113117
self.logger = {}
114118
"""Logging Settings
115119
"""
@@ -148,6 +152,10 @@ def __init__(
148152
self.assert_hostname = None
149153
"""Set this to True/False to enable/disable SSL hostname verification.
150154
"""
155+
self.tls_server_name = None
156+
"""SSL/TLS Server Name Indication (SNI)
157+
Set this to the SNI value expected by the server.
158+
"""
151159

152160
self.connection_pool_maxsize = multiprocessing.cpu_count() * 5
153161
"""urllib3 connection pool's maximum number of connections saved

‎cloud_api_robot_client/model/robot_credentials.py

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,26 @@ class properties:
4040
token = schemas.StrSchema
4141

4242

43+
class name(
44+
schemas.StrSchema
45+
):
46+
47+
48+
class MetaOapg:
49+
max_length = 64
50+
min_length = 1
51+
52+
53+
class description(
54+
schemas.StrSchema
55+
):
56+
57+
58+
class MetaOapg:
59+
max_length = 256
60+
min_length = 1
61+
62+
4363
class org_name(
4464
schemas.StrSchema
4565
):
@@ -60,13 +80,21 @@ class MetaOapg:
6080
min_length = 0
6181
__annotations__ = {
6282
"token": token,
83+
"name": name,
84+
"description": description,
6385
"org_name": org_name,
6486
"org_description": org_description,
6587
}
6688

6789
@typing.overload
6890
def __getitem__(self, name: typing_extensions.Literal["token"]) -> MetaOapg.properties.token: ...
6991

92+
@typing.overload
93+
def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ...
94+
95+
@typing.overload
96+
def __getitem__(self, name: typing_extensions.Literal["description"]) -> MetaOapg.properties.description: ...
97+
7098
@typing.overload
7199
def __getitem__(self, name: typing_extensions.Literal["org_name"]) -> MetaOapg.properties.org_name: ...
72100

@@ -76,14 +104,20 @@ def __getitem__(self, name: typing_extensions.Literal["org_description"]) -> Met
76104
@typing.overload
77105
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
78106

79-
def __getitem__(self, name: typing.Union[typing_extensions.Literal["token", "org_name", "org_description", ], str]):
107+
def __getitem__(self, name: typing.Union[typing_extensions.Literal["token", "name", "description", "org_name", "org_description", ], str]):
80108
# dict_instance[name] accessor
81109
return super().__getitem__(name)
82110

83111

84112
@typing.overload
85113
def get_item_oapg(self, name: typing_extensions.Literal["token"]) -> typing.Union[MetaOapg.properties.token, schemas.Unset]: ...
86114

115+
@typing.overload
116+
def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> typing.Union[MetaOapg.properties.name, schemas.Unset]: ...
117+
118+
@typing.overload
119+
def get_item_oapg(self, name: typing_extensions.Literal["description"]) -> typing.Union[MetaOapg.properties.description, schemas.Unset]: ...
120+
87121
@typing.overload
88122
def get_item_oapg(self, name: typing_extensions.Literal["org_name"]) -> typing.Union[MetaOapg.properties.org_name, schemas.Unset]: ...
89123

@@ -93,14 +127,16 @@ def get_item_oapg(self, name: typing_extensions.Literal["org_description"]) -> t
93127
@typing.overload
94128
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
95129

96-
def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["token", "org_name", "org_description", ], str]):
130+
def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["token", "name", "description", "org_name", "org_description", ], str]):
97131
return super().get_item_oapg(name)
98132

99133

100134
def __new__(
101135
cls,
102136
*_args: typing.Union[dict, frozendict.frozendict, ],
103137
token: typing.Union[MetaOapg.properties.token, str, schemas.Unset] = schemas.unset,
138+
name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset,
139+
description: typing.Union[MetaOapg.properties.description, str, schemas.Unset] = schemas.unset,
104140
org_name: typing.Union[MetaOapg.properties.org_name, str, schemas.Unset] = schemas.unset,
105141
org_description: typing.Union[MetaOapg.properties.org_description, str, schemas.Unset] = schemas.unset,
106142
_configuration: typing.Optional[schemas.Configuration] = None,
@@ -110,6 +146,8 @@ def __new__(
110146
cls,
111147
*_args,
112148
token=token,
149+
name=name,
150+
description=description,
113151
org_name=org_name,
114152
org_description=org_description,
115153
_configuration=_configuration,

‎cloud_api_robot_client/model/robot_credentials.pyi

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,18 @@ class RobotCredentials(
4040
token = schemas.StrSchema
4141

4242

43+
class name(
44+
schemas.StrSchema
45+
):
46+
pass
47+
48+
49+
class description(
50+
schemas.StrSchema
51+
):
52+
pass
53+
54+
4355
class org_name(
4456
schemas.StrSchema
4557
):
@@ -52,13 +64,21 @@ class RobotCredentials(
5264
pass
5365
__annotations__ = {
5466
"token": token,
67+
"name": name,
68+
"description": description,
5569
"org_name": org_name,
5670
"org_description": org_description,
5771
}
5872

5973
@typing.overload
6074
def __getitem__(self, name: typing_extensions.Literal["token"]) -> MetaOapg.properties.token: ...
6175

76+
@typing.overload
77+
def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ...
78+
79+
@typing.overload
80+
def __getitem__(self, name: typing_extensions.Literal["description"]) -> MetaOapg.properties.description: ...
81+
6282
@typing.overload
6383
def __getitem__(self, name: typing_extensions.Literal["org_name"]) -> MetaOapg.properties.org_name: ...
6484

@@ -68,14 +88,20 @@ class RobotCredentials(
6888
@typing.overload
6989
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
7090

71-
def __getitem__(self, name: typing.Union[typing_extensions.Literal["token", "org_name", "org_description", ], str]):
91+
def __getitem__(self, name: typing.Union[typing_extensions.Literal["token", "name", "description", "org_name", "org_description", ], str]):
7292
# dict_instance[name] accessor
7393
return super().__getitem__(name)
7494

7595

7696
@typing.overload
7797
def get_item_oapg(self, name: typing_extensions.Literal["token"]) -> typing.Union[MetaOapg.properties.token, schemas.Unset]: ...
7898

99+
@typing.overload
100+
def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> typing.Union[MetaOapg.properties.name, schemas.Unset]: ...
101+
102+
@typing.overload
103+
def get_item_oapg(self, name: typing_extensions.Literal["description"]) -> typing.Union[MetaOapg.properties.description, schemas.Unset]: ...
104+
79105
@typing.overload
80106
def get_item_oapg(self, name: typing_extensions.Literal["org_name"]) -> typing.Union[MetaOapg.properties.org_name, schemas.Unset]: ...
81107

@@ -85,14 +111,16 @@ class RobotCredentials(
85111
@typing.overload
86112
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
87113

88-
def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["token", "org_name", "org_description", ], str]):
114+
def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["token", "name", "description", "org_name", "org_description", ], str]):
89115
return super().get_item_oapg(name)
90116

91117

92118
def __new__(
93119
cls,
94120
*_args: typing.Union[dict, frozendict.frozendict, ],
95121
token: typing.Union[MetaOapg.properties.token, str, schemas.Unset] = schemas.unset,
122+
name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset,
123+
description: typing.Union[MetaOapg.properties.description, str, schemas.Unset] = schemas.unset,
96124
org_name: typing.Union[MetaOapg.properties.org_name, str, schemas.Unset] = schemas.unset,
97125
org_description: typing.Union[MetaOapg.properties.org_description, str, schemas.Unset] = schemas.unset,
98126
_configuration: typing.Optional[schemas.Configuration] = None,
@@ -102,6 +130,8 @@ class RobotCredentials(
102130
cls,
103131
*_args,
104132
token=token,
133+
name=name,
134+
description=description,
105135
org_name=org_name,
106136
org_description=org_description,
107137
_configuration=_configuration,

‎cloud_api_robot_client/rest.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ def __init__(self, configuration, pools_size=4, maxsize=None):
5454
if configuration.retries is not None:
5555
addition_pool_args['retries'] = configuration.retries
5656

57+
if configuration.tls_server_name:
58+
addition_pool_args['server_hostname'] = configuration.tls_server_name
59+
5760
if configuration.socket_options is not None:
5861
addition_pool_args['socket_options'] = configuration.socket_options
5962

‎docs/apis/tags/RobotSyncApi.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<a name="__pageTop"></a>
1+
<a id="__pageTop"></a>
22
# cloud_api_robot_client.apis.tags.robot_sync_api.RobotSyncApi
33

44
All URIs are relative to *https://api.coderbot.org/api/v1*
@@ -20,7 +20,7 @@ Method | HTTP request | Description
2020
[**update_robot_data**](#update_robot_data) | **put** /robot/data | Update CoderBot data
2121

2222
# **create_robot_activity**
23-
<a name="create_robot_activity"></a>
23+
<a id="create_robot_activity"></a>
2424
> Activity create_robot_activity(activity)
2525
2626
Create a new robot activity
@@ -137,7 +137,7 @@ headers | Unset | headers were not defined |
137137
[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md)
138138

139139
# **create_robot_program**
140-
<a name="create_robot_program"></a>
140+
<a id="create_robot_program"></a>
141141
> Program create_robot_program(program)
142142
143143
Create new robot program
@@ -255,7 +255,7 @@ headers | Unset | headers were not defined |
255255
[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md)
256256

257257
# **delete_robot_activity**
258-
<a name="delete_robot_activity"></a>
258+
<a id="delete_robot_activity"></a>
259259
> delete_robot_activity(activity_id)
260260
261261
Delete robot activity
@@ -361,7 +361,7 @@ headers | Unset | headers were not defined |
361361
[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md)
362362

363363
# **delete_robot_program**
364-
<a name="delete_robot_program"></a>
364+
<a id="delete_robot_program"></a>
365365
> delete_robot_program(program_id)
366366
367367
Delete robot program
@@ -467,7 +467,7 @@ headers | Unset | headers were not defined |
467467
[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md)
468468

469469
# **get_robot_activities**
470-
<a name="get_robot_activities"></a>
470+
<a id="get_robot_activities"></a>
471471
> [Activity] get_robot_activities()
472472
473473
Get robot activities
@@ -562,7 +562,7 @@ headers | Unset | headers were not defined |
562562
[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md)
563563

564564
# **get_robot_data**
565-
<a name="get_robot_data"></a>
565+
<a id="get_robot_data"></a>
566566
> Robot get_robot_data()
567567
568568
Get robot data
@@ -651,7 +651,7 @@ headers | Unset | headers were not defined |
651651
[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md)
652652

653653
# **get_robot_programs**
654-
<a name="get_robot_programs"></a>
654+
<a id="get_robot_programs"></a>
655655
> [Program] get_robot_programs()
656656
657657
Get robot programs
@@ -746,7 +746,7 @@ headers | Unset | headers were not defined |
746746
[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md)
747747

748748
# **get_robot_setting**
749-
<a name="get_robot_setting"></a>
749+
<a id="get_robot_setting"></a>
750750
> Setting get_robot_setting()
751751
752752
Get robot data
@@ -835,7 +835,7 @@ headers | Unset | headers were not defined |
835835
[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md)
836836

837837
# **register_robot**
838-
<a name="register_robot"></a>
838+
<a id="register_robot"></a>
839839
> RobotCredentials register_robot()
840840
841841
Register robot with OTP
@@ -938,7 +938,7 @@ No authorization required
938938
[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md)
939939

940940
# **set_robot_activity**
941-
<a name="set_robot_activity"></a>
941+
<a id="set_robot_activity"></a>
942942
> Activity set_robot_activity(activity_idactivity)
943943
944944
Set robot activity
@@ -1074,7 +1074,7 @@ headers | Unset | headers were not defined |
10741074
[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md)
10751075

10761076
# **set_robot_program**
1077-
<a name="set_robot_program"></a>
1077+
<a id="set_robot_program"></a>
10781078
> Program set_robot_program(program_idprogram)
10791079
10801080
Put robot program
@@ -1211,7 +1211,7 @@ headers | Unset | headers were not defined |
12111211
[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md)
12121212

12131213
# **set_robot_setting**
1214-
<a name="set_robot_setting"></a>
1214+
<a id="set_robot_setting"></a>
12151215
> Setting set_robot_setting(setting)
12161216
12171217
Set robot settings
@@ -1328,7 +1328,7 @@ headers | Unset | headers were not defined |
13281328
[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md)
13291329

13301330
# **update_robot_data**
1331-
<a name="update_robot_data"></a>
1331+
<a id="update_robot_data"></a>
13321332
> update_robot_data(robot)
13331333
13341334
Update CoderBot data

‎docs/models/RobotCredentials.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ dict, frozendict.frozendict, | frozendict.frozendict, | |
99
Key | Input Type | Accessed Type | Description | Notes
1010
------------ | ------------- | ------------- | ------------- | -------------
1111
**token** | str, | str, | | [optional]
12+
**name** | str, | str, | | [optional]
13+
**description** | str, | str, | | [optional]
1214
**org_name** | str, | str, | | [optional]
1315
**org_description** | str, | str, | | [optional]
1416
**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional]

0 commit comments

Comments
 (0)