From e86eec901a1207b99fe53afd3c32f3b18aa7bc85 Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Sun, 13 Nov 2022 14:24:06 +0100 Subject: [PATCH] Use submodules for generated SDK --- README.md | 2 +- build.gradle | 11 +- example/javascript/.gitignore | 1 + example/javascript/package-lock.json | 2195 +++++++++++++++++ example/javascript/package.json | 14 + example/javascript/short.js | 15 + example/{ => python}/configure_single_node.py | 0 example/{ => python}/short.py | 0 garage-admin-sdk-golang | 1 + garage-admin-sdk-js | 1 + garage-admin-sdk-python | 1 + golang/.gitignore | 24 - golang/.openapi-generator-ignore | 23 - golang/.openapi-generator/FILES | 80 - golang/.openapi-generator/VERSION | 1 - golang/.travis.yml | 8 - golang/README.md | 180 -- golang/api/openapi.yaml | 1439 ----------- golang/api_bucket.go | 1409 ----------- golang/api_key.go | 767 ------ golang/api_layout.go | 431 ---- golang/api_nodes.go | 238 -- golang/client.go | 572 ----- golang/configuration.go | 230 -- golang/docs/AddKeyRequest.md | 56 - golang/docs/AddNode200ResponseInner.md | 92 - golang/docs/AllowBucketKeyRequest.md | 93 - .../docs/AllowBucketKeyRequestPermissions.md | 93 - golang/docs/BucketApi.md | 835 ------- golang/docs/BucketInfo.md | 274 -- golang/docs/BucketInfoQuotas.md | 102 - golang/docs/BucketInfoWebsiteConfig.md | 82 - golang/docs/BucketKeyInfo.md | 134 - golang/docs/ClusterLayout.md | 93 - golang/docs/CreateBucketRequest.md | 82 - golang/docs/CreateBucketRequestLocalAlias.md | 108 - .../CreateBucketRequestLocalAliasAllow.md | 108 - golang/docs/GetNodes200Response.md | 114 - golang/docs/ImportKeyRequest.md | 93 - golang/docs/KeyApi.md | 488 ---- golang/docs/KeyInfo.md | 160 -- golang/docs/KeyInfoBucketsInner.md | 134 - golang/docs/KeyInfoBucketsInnerPermissions.md | 108 - golang/docs/KeyInfoPermissions.md | 56 - golang/docs/LayoutApi.md | 265 -- golang/docs/LayoutVersion.md | 56 - golang/docs/ListBuckets200ResponseInner.md | 103 - ...uckets200ResponseInnerLocalAliasesInner.md | 72 - golang/docs/ListKeys200ResponseInner.md | 77 - golang/docs/NodeClusterInfo.md | 103 - golang/docs/NodeNetworkInfo.md | 124 - golang/docs/NodesApi.md | 137 - golang/docs/UpdateBucketRequest.md | 82 - golang/docs/UpdateBucketRequestQuotas.md | 102 - .../docs/UpdateBucketRequestWebsiteAccess.md | 108 - golang/docs/UpdateKeyRequest.md | 108 - golang/docs/UpdateKeyRequestAllow.md | 56 - golang/docs/UpdateKeyRequestDeny.md | 56 - golang/git_push.sh | 57 - golang/go.mod | 7 - golang/go.sum | 13 - golang/model_add_key_request.go | 115 - golang/model_add_node_200_response_inner.go | 161 -- golang/model_allow_bucket_key_request.go | 166 -- ...el_allow_bucket_key_request_permissions.go | 166 -- golang/model_bucket_info.go | 413 ---- golang/model_bucket_info_quotas.go | 171 -- golang/model_bucket_info_website_config.go | 151 -- golang/model_bucket_key_info.go | 223 -- golang/model_cluster_layout.go | 166 -- golang/model_create_bucket_request.go | 151 -- ...model_create_bucket_request_local_alias.go | 187 -- ...create_bucket_request_local_alias_allow.go | 187 -- golang/model_get_nodes_200_response.go | 195 -- golang/model_import_key_request.go | 166 -- golang/model_key_info.go | 259 -- golang/model_key_info_buckets_inner.go | 223 -- ...odel_key_info_buckets_inner_permissions.go | 187 -- golang/model_key_info_permissions.go | 115 - golang/model_layout_version.go | 115 - .../model_list_buckets_200_response_inner.go | 180 -- ..._200_response_inner_local_aliases_inner.go | 137 - golang/model_list_keys_200_response_inner.go | 144 -- golang/model_node_cluster_info.go | 169 -- golang/model_node_network_info.go | 197 -- golang/model_update_bucket_request.go | 151 -- golang/model_update_bucket_request_quotas.go | 171 -- ...el_update_bucket_request_website_access.go | 187 -- golang/model_update_key_request.go | 187 -- golang/model_update_key_request_allow.go | 115 - golang/model_update_key_request_deny.go | 115 - golang/response.go | 47 - golang/utils.go | 328 --- javascript/.babelrc | 33 - javascript/.gitignore | 130 - javascript/.openapi-generator-ignore | 23 - javascript/.openapi-generator/FILES | 77 - javascript/.openapi-generator/VERSION | 1 - javascript/.travis.yml | 5 - javascript/README.md | 198 -- javascript/docs/AddKeyRequest.md | 9 - javascript/docs/AddNode200ResponseInner.md | 10 - javascript/docs/AllowBucketKeyRequest.md | 11 - .../docs/AllowBucketKeyRequestPermissions.md | 11 - javascript/docs/BucketApi.md | 618 ----- javascript/docs/BucketInfo.md | 17 - javascript/docs/BucketInfoQuotas.md | 10 - javascript/docs/BucketInfoWebsiteConfig.md | 10 - javascript/docs/BucketKeyInfo.md | 12 - javascript/docs/ClusterLayout.md | 11 - javascript/docs/CreateBucketRequest.md | 10 - .../docs/CreateBucketRequestLocalAlias.md | 11 - .../CreateBucketRequestLocalAliasAllow.md | 11 - javascript/docs/GetNodes200Response.md | 12 - javascript/docs/ImportKeyRequest.md | 11 - javascript/docs/KeyApi.md | 356 --- javascript/docs/KeyInfo.md | 13 - javascript/docs/KeyInfoBucketsInner.md | 12 - .../docs/KeyInfoBucketsInnerPermissions.md | 11 - javascript/docs/KeyInfoPermissions.md | 9 - javascript/docs/LayoutApi.md | 204 -- javascript/docs/LayoutVersion.md | 9 - .../docs/ListBuckets200ResponseInner.md | 11 - ...uckets200ResponseInnerLocalAliasesInner.md | 10 - javascript/docs/ListKeys200ResponseInner.md | 10 - javascript/docs/NodeClusterInfo.md | 11 - javascript/docs/NodeNetworkInfo.md | 12 - javascript/docs/NodesApi.md | 104 - javascript/docs/UpdateBucketRequest.md | 10 - javascript/docs/UpdateBucketRequestQuotas.md | 10 - .../docs/UpdateBucketRequestWebsiteAccess.md | 11 - javascript/docs/UpdateKeyRequest.md | 11 - javascript/docs/UpdateKeyRequestAllow.md | 9 - javascript/docs/UpdateKeyRequestDeny.md | 9 - javascript/git_push.sh | 57 - javascript/mocha.opts | 1 - javascript/package.json | 46 - javascript/src/ApiClient.js | 692 ------ javascript/src/api/BucketApi.js | 589 ----- javascript/src/api/KeyApi.js | 339 --- javascript/src/api/LayoutApi.js | 200 -- javascript/src/api/NodesApi.js | 118 - javascript/src/index.js | 293 --- javascript/src/model/AddKeyRequest.js | 71 - .../src/model/AddNode200ResponseInner.js | 79 - javascript/src/model/AllowBucketKeyRequest.js | 94 - .../model/AllowBucketKeyRequestPermissions.js | 93 - javascript/src/model/BucketInfo.js | 138 -- javascript/src/model/BucketInfoQuotas.js | 79 - .../src/model/BucketInfoWebsiteConfig.js | 79 - javascript/src/model/BucketKeyInfo.js | 96 - javascript/src/model/ClusterLayout.js | 94 - javascript/src/model/CreateBucketRequest.js | 80 - .../model/CreateBucketRequestLocalAlias.js | 88 - .../CreateBucketRequestLocalAliasAllow.js | 87 - javascript/src/model/GetNodes200Response.js | 105 - javascript/src/model/ImportKeyRequest.js | 93 - javascript/src/model/KeyInfo.js | 105 - javascript/src/model/KeyInfoBucketsInner.js | 96 - .../model/KeyInfoBucketsInnerPermissions.js | 87 - javascript/src/model/KeyInfoPermissions.js | 71 - javascript/src/model/LayoutVersion.js | 71 - .../src/model/ListBuckets200ResponseInner.js | 90 - ...uckets200ResponseInnerLocalAliasesInner.js | 83 - .../src/model/ListKeys200ResponseInner.js | 81 - javascript/src/model/NodeClusterInfo.js | 94 - javascript/src/model/NodeNetworkInfo.js | 103 - javascript/src/model/UpdateBucketRequest.js | 81 - .../src/model/UpdateBucketRequestQuotas.js | 79 - .../model/UpdateBucketRequestWebsiteAccess.js | 87 - javascript/src/model/UpdateKeyRequest.js | 89 - javascript/src/model/UpdateKeyRequestAllow.js | 71 - javascript/src/model/UpdateKeyRequestDeny.js | 71 - javascript/test/api/BucketApi.spec.js | 173 -- javascript/test/api/KeyApi.spec.js | 123 - javascript/test/api/LayoutApi.spec.js | 93 - javascript/test/api/NodesApi.spec.js | 73 - javascript/test/model/AddKeyRequest.spec.js | 65 - .../model/AddNode200ResponseInner.spec.js | 71 - .../test/model/AllowBucketKeyRequest.spec.js | 77 - .../AllowBucketKeyRequestPermissions.spec.js | 77 - javascript/test/model/BucketInfo.spec.js | 113 - .../test/model/BucketInfoQuotas.spec.js | 71 - .../model/BucketInfoWebsiteConfig.spec.js | 71 - javascript/test/model/BucketKeyInfo.spec.js | 83 - javascript/test/model/ClusterLayout.spec.js | 77 - .../test/model/CreateBucketRequest.spec.js | 71 - .../CreateBucketRequestLocalAlias.spec.js | 77 - ...CreateBucketRequestLocalAliasAllow.spec.js | 77 - .../test/model/GetNodes200Response.spec.js | 83 - .../test/model/ImportKeyRequest.spec.js | 77 - javascript/test/model/KeyInfo.spec.js | 89 - .../test/model/KeyInfoBucketsInner.spec.js | 83 - .../KeyInfoBucketsInnerPermissions.spec.js | 77 - .../test/model/KeyInfoPermissions.spec.js | 65 - javascript/test/model/LayoutVersion.spec.js | 65 - .../model/ListBuckets200ResponseInner.spec.js | 77 - ...s200ResponseInnerLocalAliasesInner.spec.js | 71 - .../model/ListKeys200ResponseInner.spec.js | 71 - javascript/test/model/NodeClusterInfo.spec.js | 77 - javascript/test/model/NodeNetworkInfo.spec.js | 83 - .../test/model/UpdateBucketRequest.spec.js | 71 - .../model/UpdateBucketRequestQuotas.spec.js | 71 - .../UpdateBucketRequestWebsiteAccess.spec.js | 77 - .../test/model/UpdateKeyRequest.spec.js | 77 - .../test/model/UpdateKeyRequestAllow.spec.js | 65 - .../test/model/UpdateKeyRequestDeny.spec.js | 65 - python/.gitignore | 66 - python/.gitlab-ci.yml | 24 - python/.openapi-generator-ignore | 23 - python/.openapi-generator/FILES | 89 - python/.openapi-generator/VERSION | 1 - python/.travis.yml | 13 - python/README.md | 198 -- python/docs/AddKeyRequest.md | 12 - python/docs/AddNode200ResponseInner.md | 13 - python/docs/AllowBucketKeyRequest.md | 14 - .../docs/AllowBucketKeyRequestPermissions.md | 14 - python/docs/BucketApi.md | 1024 -------- python/docs/BucketInfo.md | 20 - python/docs/BucketInfoQuotas.md | 13 - python/docs/BucketInfoWebsiteConfig.md | 13 - python/docs/BucketKeyInfo.md | 15 - python/docs/ClusterLayout.md | 14 - python/docs/ConnectPost200ResponseInner.md | 13 - python/docs/CreateBucketRequest.md | 13 - python/docs/CreateBucketRequestLocalAlias.md | 14 - .../CreateBucketRequestLocalAliasAllow.md | 14 - python/docs/GetNodes200Response.md | 15 - python/docs/ImportKeyRequest.md | 14 - python/docs/KeyApi.md | 577 ----- python/docs/KeyGetRequest.md | 12 - python/docs/KeyIdAccessKeyDeleteRequest.md | 14 - .../docs/KeyIdAccessKeyDeleteRequestAllow.md | 12 - .../docs/KeyIdAccessKeyDeleteRequestDeny.md | 12 - python/docs/KeyImportPostRequest.md | 14 - python/docs/KeyInfo.md | 16 - python/docs/KeyInfoBucketsInner.md | 15 - python/docs/KeyInfoBucketsInnerPermissions.md | 14 - python/docs/KeyInfoPermissions.md | 12 - python/docs/LayoutApi.md | 330 --- python/docs/LayoutVersion.md | 12 - python/docs/ListBuckets200ResponseInner.md | 14 - ...uckets200ResponseInnerLocalAliasesInner.md | 13 - python/docs/ListKeys200ResponseInner.md | 13 - python/docs/MembershipApi.md | 89 - python/docs/NodeClusterInfo.md | 14 - python/docs/NodeNetworkInfo.md | 15 - python/docs/NodesApi.md | 163 -- python/docs/StatusGet200Response.md | 15 - python/docs/UpdateBucketRequest.md | 13 - python/docs/UpdateBucketRequestQuotas.md | 13 - .../docs/UpdateBucketRequestWebsiteAccess.md | 14 - python/docs/UpdateKeyRequest.md | 14 - python/docs/UpdateKeyRequestAllow.md | 12 - python/docs/UpdateKeyRequestDeny.md | 12 - python/garage_admin_sdk/__init__.py | 27 - python/garage_admin_sdk/api/__init__.py | 3 - python/garage_admin_sdk/api/bucket_api.py | 1710 ------------- python/garage_admin_sdk/api/key_api.py | 979 -------- python/garage_admin_sdk/api/layout_api.py | 561 ----- python/garage_admin_sdk/api/membership_api.py | 167 -- python/garage_admin_sdk/api/nodes_api.py | 296 --- python/garage_admin_sdk/api_client.py | 896 ------- python/garage_admin_sdk/apis/__init__.py | 20 - python/garage_admin_sdk/configuration.py | 454 ---- python/garage_admin_sdk/exceptions.py | 158 -- python/garage_admin_sdk/model/__init__.py | 5 - .../garage_admin_sdk/model/add_key_request.py | 263 -- .../model/add_node200_response_inner.py | 267 -- .../model/allow_bucket_key_request.py | 287 --- .../allow_bucket_key_request_permissions.py | 281 --- python/garage_admin_sdk/model/bucket_info.py | 305 --- .../model/bucket_info_quotas.py | 267 -- .../model/bucket_info_website_config.py | 267 -- .../garage_admin_sdk/model/bucket_key_info.py | 281 --- .../garage_admin_sdk/model/cluster_layout.py | 287 --- .../model/connect_post200_response_inner.py | 267 -- .../model/create_bucket_request.py | 273 -- .../create_bucket_request_local_alias.py | 277 --- ...create_bucket_request_local_alias_allow.py | 271 -- .../model/get_nodes200_response.py | 295 --- .../model/import_key_request.py | 281 --- .../garage_admin_sdk/model/key_get_request.py | 263 -- .../model/key_id_access_key_delete_request.py | 279 --- .../key_id_access_key_delete_request_allow.py | 263 -- .../key_id_access_key_delete_request_deny.py | 263 -- .../model/key_import_post_request.py | 271 -- python/garage_admin_sdk/model/key_info.py | 287 --- .../model/key_info_buckets_inner.py | 281 --- .../key_info_buckets_inner_permissions.py | 271 -- .../model/key_info_permissions.py | 263 -- .../garage_admin_sdk/model/layout_version.py | 263 -- .../model/list_buckets200_response_inner.py | 283 --- ...s200_response_inner_local_aliases_inner.py | 275 --- .../model/list_keys200_response_inner.py | 273 -- .../model/node_cluster_info.py | 281 --- .../model/node_network_info.py | 287 --- .../model/status_get200_response.py | 283 --- .../model/update_bucket_request.py | 275 --- .../model/update_bucket_request_quotas.py | 267 -- .../update_bucket_request_website_access.py | 271 -- .../model/update_key_request.py | 279 --- .../model/update_key_request_allow.py | 263 -- .../model/update_key_request_deny.py | 263 -- python/garage_admin_sdk/model_utils.py | 2058 ---------------- python/garage_admin_sdk/models/__init__.py | 41 - python/garage_admin_sdk/rest.py | 352 --- python/git_push.sh | 57 - python/requirements.txt | 3 - python/setup.cfg | 2 - python/setup.py | 42 - python/test-requirements.txt | 1 - python/test/__init__.py | 0 python/test/test_add_key_request.py | 35 - .../test/test_add_node200_response_inner.py | 35 - python/test/test_allow_bucket_key_request.py | 37 - ...st_allow_bucket_key_request_permissions.py | 35 - python/test/test_bucket_api.py | 112 - python/test/test_bucket_info.py | 41 - python/test/test_bucket_info_quotas.py | 35 - .../test/test_bucket_info_website_config.py | 35 - python/test/test_bucket_key_info.py | 37 - python/test/test_cluster_layout.py | 37 - .../test_connect_post200_response_inner.py | 35 - python/test/test_create_bucket_request.py | 37 - .../test_create_bucket_request_local_alias.py | 37 - ...create_bucket_request_local_alias_allow.py | 35 - python/test/test_get_nodes200_response.py | 39 - python/test/test_import_key_request.py | 35 - python/test/test_key_api.py | 77 - python/test/test_key_get_request.py | 35 - .../test_key_id_access_key_delete_request.py | 39 - ..._key_id_access_key_delete_request_allow.py | 35 - ...t_key_id_access_key_delete_request_deny.py | 35 - python/test/test_key_import_post_request.py | 35 - python/test/test_key_info.py | 39 - python/test/test_key_info_buckets_inner.py | 37 - ...test_key_info_buckets_inner_permissions.py | 35 - python/test/test_key_info_permissions.py | 35 - python/test/test_layout_api.py | 56 - python/test/test_layout_version.py | 35 - .../test_list_buckets200_response_inner.py | 37 - ...s200_response_inner_local_aliases_inner.py | 35 - .../test/test_list_keys200_response_inner.py | 35 - python/test/test_membership_api.py | 42 - python/test/test_node_cluster_info.py | 35 - python/test/test_node_network_info.py | 35 - python/test/test_nodes_api.py | 35 - python/test/test_status_get200_response.py | 39 - python/test/test_update_bucket_request.py | 39 - .../test/test_update_bucket_request_quotas.py | 35 - ...st_update_bucket_request_website_access.py | 35 - python/test/test_update_key_request.py | 39 - python/test/test_update_key_request_allow.py | 35 - python/test/test_update_key_request_deny.py | 35 - python/tox.ini | 9 - 357 files changed, 2236 insertions(+), 48440 deletions(-) create mode 100644 example/javascript/.gitignore create mode 100644 example/javascript/package-lock.json create mode 100644 example/javascript/package.json create mode 100644 example/javascript/short.js rename example/{ => python}/configure_single_node.py (100%) rename example/{ => python}/short.py (100%) create mode 160000 garage-admin-sdk-golang create mode 160000 garage-admin-sdk-js create mode 160000 garage-admin-sdk-python delete mode 100644 golang/.gitignore delete mode 100644 golang/.openapi-generator-ignore delete mode 100644 golang/.openapi-generator/FILES delete mode 100644 golang/.openapi-generator/VERSION delete mode 100644 golang/.travis.yml delete mode 100644 golang/README.md delete mode 100644 golang/api/openapi.yaml delete mode 100644 golang/api_bucket.go delete mode 100644 golang/api_key.go delete mode 100644 golang/api_layout.go delete mode 100644 golang/api_nodes.go delete mode 100644 golang/client.go delete mode 100644 golang/configuration.go delete mode 100644 golang/docs/AddKeyRequest.md delete mode 100644 golang/docs/AddNode200ResponseInner.md delete mode 100644 golang/docs/AllowBucketKeyRequest.md delete mode 100644 golang/docs/AllowBucketKeyRequestPermissions.md delete mode 100644 golang/docs/BucketApi.md delete mode 100644 golang/docs/BucketInfo.md delete mode 100644 golang/docs/BucketInfoQuotas.md delete mode 100644 golang/docs/BucketInfoWebsiteConfig.md delete mode 100644 golang/docs/BucketKeyInfo.md delete mode 100644 golang/docs/ClusterLayout.md delete mode 100644 golang/docs/CreateBucketRequest.md delete mode 100644 golang/docs/CreateBucketRequestLocalAlias.md delete mode 100644 golang/docs/CreateBucketRequestLocalAliasAllow.md delete mode 100644 golang/docs/GetNodes200Response.md delete mode 100644 golang/docs/ImportKeyRequest.md delete mode 100644 golang/docs/KeyApi.md delete mode 100644 golang/docs/KeyInfo.md delete mode 100644 golang/docs/KeyInfoBucketsInner.md delete mode 100644 golang/docs/KeyInfoBucketsInnerPermissions.md delete mode 100644 golang/docs/KeyInfoPermissions.md delete mode 100644 golang/docs/LayoutApi.md delete mode 100644 golang/docs/LayoutVersion.md delete mode 100644 golang/docs/ListBuckets200ResponseInner.md delete mode 100644 golang/docs/ListBuckets200ResponseInnerLocalAliasesInner.md delete mode 100644 golang/docs/ListKeys200ResponseInner.md delete mode 100644 golang/docs/NodeClusterInfo.md delete mode 100644 golang/docs/NodeNetworkInfo.md delete mode 100644 golang/docs/NodesApi.md delete mode 100644 golang/docs/UpdateBucketRequest.md delete mode 100644 golang/docs/UpdateBucketRequestQuotas.md delete mode 100644 golang/docs/UpdateBucketRequestWebsiteAccess.md delete mode 100644 golang/docs/UpdateKeyRequest.md delete mode 100644 golang/docs/UpdateKeyRequestAllow.md delete mode 100644 golang/docs/UpdateKeyRequestDeny.md delete mode 100644 golang/git_push.sh delete mode 100644 golang/go.mod delete mode 100644 golang/go.sum delete mode 100644 golang/model_add_key_request.go delete mode 100644 golang/model_add_node_200_response_inner.go delete mode 100644 golang/model_allow_bucket_key_request.go delete mode 100644 golang/model_allow_bucket_key_request_permissions.go delete mode 100644 golang/model_bucket_info.go delete mode 100644 golang/model_bucket_info_quotas.go delete mode 100644 golang/model_bucket_info_website_config.go delete mode 100644 golang/model_bucket_key_info.go delete mode 100644 golang/model_cluster_layout.go delete mode 100644 golang/model_create_bucket_request.go delete mode 100644 golang/model_create_bucket_request_local_alias.go delete mode 100644 golang/model_create_bucket_request_local_alias_allow.go delete mode 100644 golang/model_get_nodes_200_response.go delete mode 100644 golang/model_import_key_request.go delete mode 100644 golang/model_key_info.go delete mode 100644 golang/model_key_info_buckets_inner.go delete mode 100644 golang/model_key_info_buckets_inner_permissions.go delete mode 100644 golang/model_key_info_permissions.go delete mode 100644 golang/model_layout_version.go delete mode 100644 golang/model_list_buckets_200_response_inner.go delete mode 100644 golang/model_list_buckets_200_response_inner_local_aliases_inner.go delete mode 100644 golang/model_list_keys_200_response_inner.go delete mode 100644 golang/model_node_cluster_info.go delete mode 100644 golang/model_node_network_info.go delete mode 100644 golang/model_update_bucket_request.go delete mode 100644 golang/model_update_bucket_request_quotas.go delete mode 100644 golang/model_update_bucket_request_website_access.go delete mode 100644 golang/model_update_key_request.go delete mode 100644 golang/model_update_key_request_allow.go delete mode 100644 golang/model_update_key_request_deny.go delete mode 100644 golang/response.go delete mode 100644 golang/utils.go delete mode 100644 javascript/.babelrc delete mode 100644 javascript/.gitignore delete mode 100644 javascript/.openapi-generator-ignore delete mode 100644 javascript/.openapi-generator/FILES delete mode 100644 javascript/.openapi-generator/VERSION delete mode 100644 javascript/.travis.yml delete mode 100644 javascript/README.md delete mode 100644 javascript/docs/AddKeyRequest.md delete mode 100644 javascript/docs/AddNode200ResponseInner.md delete mode 100644 javascript/docs/AllowBucketKeyRequest.md delete mode 100644 javascript/docs/AllowBucketKeyRequestPermissions.md delete mode 100644 javascript/docs/BucketApi.md delete mode 100644 javascript/docs/BucketInfo.md delete mode 100644 javascript/docs/BucketInfoQuotas.md delete mode 100644 javascript/docs/BucketInfoWebsiteConfig.md delete mode 100644 javascript/docs/BucketKeyInfo.md delete mode 100644 javascript/docs/ClusterLayout.md delete mode 100644 javascript/docs/CreateBucketRequest.md delete mode 100644 javascript/docs/CreateBucketRequestLocalAlias.md delete mode 100644 javascript/docs/CreateBucketRequestLocalAliasAllow.md delete mode 100644 javascript/docs/GetNodes200Response.md delete mode 100644 javascript/docs/ImportKeyRequest.md delete mode 100644 javascript/docs/KeyApi.md delete mode 100644 javascript/docs/KeyInfo.md delete mode 100644 javascript/docs/KeyInfoBucketsInner.md delete mode 100644 javascript/docs/KeyInfoBucketsInnerPermissions.md delete mode 100644 javascript/docs/KeyInfoPermissions.md delete mode 100644 javascript/docs/LayoutApi.md delete mode 100644 javascript/docs/LayoutVersion.md delete mode 100644 javascript/docs/ListBuckets200ResponseInner.md delete mode 100644 javascript/docs/ListBuckets200ResponseInnerLocalAliasesInner.md delete mode 100644 javascript/docs/ListKeys200ResponseInner.md delete mode 100644 javascript/docs/NodeClusterInfo.md delete mode 100644 javascript/docs/NodeNetworkInfo.md delete mode 100644 javascript/docs/NodesApi.md delete mode 100644 javascript/docs/UpdateBucketRequest.md delete mode 100644 javascript/docs/UpdateBucketRequestQuotas.md delete mode 100644 javascript/docs/UpdateBucketRequestWebsiteAccess.md delete mode 100644 javascript/docs/UpdateKeyRequest.md delete mode 100644 javascript/docs/UpdateKeyRequestAllow.md delete mode 100644 javascript/docs/UpdateKeyRequestDeny.md delete mode 100644 javascript/git_push.sh delete mode 100644 javascript/mocha.opts delete mode 100644 javascript/package.json delete mode 100644 javascript/src/ApiClient.js delete mode 100644 javascript/src/api/BucketApi.js delete mode 100644 javascript/src/api/KeyApi.js delete mode 100644 javascript/src/api/LayoutApi.js delete mode 100644 javascript/src/api/NodesApi.js delete mode 100644 javascript/src/index.js delete mode 100644 javascript/src/model/AddKeyRequest.js delete mode 100644 javascript/src/model/AddNode200ResponseInner.js delete mode 100644 javascript/src/model/AllowBucketKeyRequest.js delete mode 100644 javascript/src/model/AllowBucketKeyRequestPermissions.js delete mode 100644 javascript/src/model/BucketInfo.js delete mode 100644 javascript/src/model/BucketInfoQuotas.js delete mode 100644 javascript/src/model/BucketInfoWebsiteConfig.js delete mode 100644 javascript/src/model/BucketKeyInfo.js delete mode 100644 javascript/src/model/ClusterLayout.js delete mode 100644 javascript/src/model/CreateBucketRequest.js delete mode 100644 javascript/src/model/CreateBucketRequestLocalAlias.js delete mode 100644 javascript/src/model/CreateBucketRequestLocalAliasAllow.js delete mode 100644 javascript/src/model/GetNodes200Response.js delete mode 100644 javascript/src/model/ImportKeyRequest.js delete mode 100644 javascript/src/model/KeyInfo.js delete mode 100644 javascript/src/model/KeyInfoBucketsInner.js delete mode 100644 javascript/src/model/KeyInfoBucketsInnerPermissions.js delete mode 100644 javascript/src/model/KeyInfoPermissions.js delete mode 100644 javascript/src/model/LayoutVersion.js delete mode 100644 javascript/src/model/ListBuckets200ResponseInner.js delete mode 100644 javascript/src/model/ListBuckets200ResponseInnerLocalAliasesInner.js delete mode 100644 javascript/src/model/ListKeys200ResponseInner.js delete mode 100644 javascript/src/model/NodeClusterInfo.js delete mode 100644 javascript/src/model/NodeNetworkInfo.js delete mode 100644 javascript/src/model/UpdateBucketRequest.js delete mode 100644 javascript/src/model/UpdateBucketRequestQuotas.js delete mode 100644 javascript/src/model/UpdateBucketRequestWebsiteAccess.js delete mode 100644 javascript/src/model/UpdateKeyRequest.js delete mode 100644 javascript/src/model/UpdateKeyRequestAllow.js delete mode 100644 javascript/src/model/UpdateKeyRequestDeny.js delete mode 100644 javascript/test/api/BucketApi.spec.js delete mode 100644 javascript/test/api/KeyApi.spec.js delete mode 100644 javascript/test/api/LayoutApi.spec.js delete mode 100644 javascript/test/api/NodesApi.spec.js delete mode 100644 javascript/test/model/AddKeyRequest.spec.js delete mode 100644 javascript/test/model/AddNode200ResponseInner.spec.js delete mode 100644 javascript/test/model/AllowBucketKeyRequest.spec.js delete mode 100644 javascript/test/model/AllowBucketKeyRequestPermissions.spec.js delete mode 100644 javascript/test/model/BucketInfo.spec.js delete mode 100644 javascript/test/model/BucketInfoQuotas.spec.js delete mode 100644 javascript/test/model/BucketInfoWebsiteConfig.spec.js delete mode 100644 javascript/test/model/BucketKeyInfo.spec.js delete mode 100644 javascript/test/model/ClusterLayout.spec.js delete mode 100644 javascript/test/model/CreateBucketRequest.spec.js delete mode 100644 javascript/test/model/CreateBucketRequestLocalAlias.spec.js delete mode 100644 javascript/test/model/CreateBucketRequestLocalAliasAllow.spec.js delete mode 100644 javascript/test/model/GetNodes200Response.spec.js delete mode 100644 javascript/test/model/ImportKeyRequest.spec.js delete mode 100644 javascript/test/model/KeyInfo.spec.js delete mode 100644 javascript/test/model/KeyInfoBucketsInner.spec.js delete mode 100644 javascript/test/model/KeyInfoBucketsInnerPermissions.spec.js delete mode 100644 javascript/test/model/KeyInfoPermissions.spec.js delete mode 100644 javascript/test/model/LayoutVersion.spec.js delete mode 100644 javascript/test/model/ListBuckets200ResponseInner.spec.js delete mode 100644 javascript/test/model/ListBuckets200ResponseInnerLocalAliasesInner.spec.js delete mode 100644 javascript/test/model/ListKeys200ResponseInner.spec.js delete mode 100644 javascript/test/model/NodeClusterInfo.spec.js delete mode 100644 javascript/test/model/NodeNetworkInfo.spec.js delete mode 100644 javascript/test/model/UpdateBucketRequest.spec.js delete mode 100644 javascript/test/model/UpdateBucketRequestQuotas.spec.js delete mode 100644 javascript/test/model/UpdateBucketRequestWebsiteAccess.spec.js delete mode 100644 javascript/test/model/UpdateKeyRequest.spec.js delete mode 100644 javascript/test/model/UpdateKeyRequestAllow.spec.js delete mode 100644 javascript/test/model/UpdateKeyRequestDeny.spec.js delete mode 100644 python/.gitignore delete mode 100644 python/.gitlab-ci.yml delete mode 100644 python/.openapi-generator-ignore delete mode 100644 python/.openapi-generator/FILES delete mode 100644 python/.openapi-generator/VERSION delete mode 100644 python/.travis.yml delete mode 100644 python/README.md delete mode 100644 python/docs/AddKeyRequest.md delete mode 100644 python/docs/AddNode200ResponseInner.md delete mode 100644 python/docs/AllowBucketKeyRequest.md delete mode 100644 python/docs/AllowBucketKeyRequestPermissions.md delete mode 100644 python/docs/BucketApi.md delete mode 100644 python/docs/BucketInfo.md delete mode 100644 python/docs/BucketInfoQuotas.md delete mode 100644 python/docs/BucketInfoWebsiteConfig.md delete mode 100644 python/docs/BucketKeyInfo.md delete mode 100644 python/docs/ClusterLayout.md delete mode 100644 python/docs/ConnectPost200ResponseInner.md delete mode 100644 python/docs/CreateBucketRequest.md delete mode 100644 python/docs/CreateBucketRequestLocalAlias.md delete mode 100644 python/docs/CreateBucketRequestLocalAliasAllow.md delete mode 100644 python/docs/GetNodes200Response.md delete mode 100644 python/docs/ImportKeyRequest.md delete mode 100644 python/docs/KeyApi.md delete mode 100644 python/docs/KeyGetRequest.md delete mode 100644 python/docs/KeyIdAccessKeyDeleteRequest.md delete mode 100644 python/docs/KeyIdAccessKeyDeleteRequestAllow.md delete mode 100644 python/docs/KeyIdAccessKeyDeleteRequestDeny.md delete mode 100644 python/docs/KeyImportPostRequest.md delete mode 100644 python/docs/KeyInfo.md delete mode 100644 python/docs/KeyInfoBucketsInner.md delete mode 100644 python/docs/KeyInfoBucketsInnerPermissions.md delete mode 100644 python/docs/KeyInfoPermissions.md delete mode 100644 python/docs/LayoutApi.md delete mode 100644 python/docs/LayoutVersion.md delete mode 100644 python/docs/ListBuckets200ResponseInner.md delete mode 100644 python/docs/ListBuckets200ResponseInnerLocalAliasesInner.md delete mode 100644 python/docs/ListKeys200ResponseInner.md delete mode 100644 python/docs/MembershipApi.md delete mode 100644 python/docs/NodeClusterInfo.md delete mode 100644 python/docs/NodeNetworkInfo.md delete mode 100644 python/docs/NodesApi.md delete mode 100644 python/docs/StatusGet200Response.md delete mode 100644 python/docs/UpdateBucketRequest.md delete mode 100644 python/docs/UpdateBucketRequestQuotas.md delete mode 100644 python/docs/UpdateBucketRequestWebsiteAccess.md delete mode 100644 python/docs/UpdateKeyRequest.md delete mode 100644 python/docs/UpdateKeyRequestAllow.md delete mode 100644 python/docs/UpdateKeyRequestDeny.md delete mode 100644 python/garage_admin_sdk/__init__.py delete mode 100644 python/garage_admin_sdk/api/__init__.py delete mode 100644 python/garage_admin_sdk/api/bucket_api.py delete mode 100644 python/garage_admin_sdk/api/key_api.py delete mode 100644 python/garage_admin_sdk/api/layout_api.py delete mode 100644 python/garage_admin_sdk/api/membership_api.py delete mode 100644 python/garage_admin_sdk/api/nodes_api.py delete mode 100644 python/garage_admin_sdk/api_client.py delete mode 100644 python/garage_admin_sdk/apis/__init__.py delete mode 100644 python/garage_admin_sdk/configuration.py delete mode 100644 python/garage_admin_sdk/exceptions.py delete mode 100644 python/garage_admin_sdk/model/__init__.py delete mode 100644 python/garage_admin_sdk/model/add_key_request.py delete mode 100644 python/garage_admin_sdk/model/add_node200_response_inner.py delete mode 100644 python/garage_admin_sdk/model/allow_bucket_key_request.py delete mode 100644 python/garage_admin_sdk/model/allow_bucket_key_request_permissions.py delete mode 100644 python/garage_admin_sdk/model/bucket_info.py delete mode 100644 python/garage_admin_sdk/model/bucket_info_quotas.py delete mode 100644 python/garage_admin_sdk/model/bucket_info_website_config.py delete mode 100644 python/garage_admin_sdk/model/bucket_key_info.py delete mode 100644 python/garage_admin_sdk/model/cluster_layout.py delete mode 100644 python/garage_admin_sdk/model/connect_post200_response_inner.py delete mode 100644 python/garage_admin_sdk/model/create_bucket_request.py delete mode 100644 python/garage_admin_sdk/model/create_bucket_request_local_alias.py delete mode 100644 python/garage_admin_sdk/model/create_bucket_request_local_alias_allow.py delete mode 100644 python/garage_admin_sdk/model/get_nodes200_response.py delete mode 100644 python/garage_admin_sdk/model/import_key_request.py delete mode 100644 python/garage_admin_sdk/model/key_get_request.py delete mode 100644 python/garage_admin_sdk/model/key_id_access_key_delete_request.py delete mode 100644 python/garage_admin_sdk/model/key_id_access_key_delete_request_allow.py delete mode 100644 python/garage_admin_sdk/model/key_id_access_key_delete_request_deny.py delete mode 100644 python/garage_admin_sdk/model/key_import_post_request.py delete mode 100644 python/garage_admin_sdk/model/key_info.py delete mode 100644 python/garage_admin_sdk/model/key_info_buckets_inner.py delete mode 100644 python/garage_admin_sdk/model/key_info_buckets_inner_permissions.py delete mode 100644 python/garage_admin_sdk/model/key_info_permissions.py delete mode 100644 python/garage_admin_sdk/model/layout_version.py delete mode 100644 python/garage_admin_sdk/model/list_buckets200_response_inner.py delete mode 100644 python/garage_admin_sdk/model/list_buckets200_response_inner_local_aliases_inner.py delete mode 100644 python/garage_admin_sdk/model/list_keys200_response_inner.py delete mode 100644 python/garage_admin_sdk/model/node_cluster_info.py delete mode 100644 python/garage_admin_sdk/model/node_network_info.py delete mode 100644 python/garage_admin_sdk/model/status_get200_response.py delete mode 100644 python/garage_admin_sdk/model/update_bucket_request.py delete mode 100644 python/garage_admin_sdk/model/update_bucket_request_quotas.py delete mode 100644 python/garage_admin_sdk/model/update_bucket_request_website_access.py delete mode 100644 python/garage_admin_sdk/model/update_key_request.py delete mode 100644 python/garage_admin_sdk/model/update_key_request_allow.py delete mode 100644 python/garage_admin_sdk/model/update_key_request_deny.py delete mode 100644 python/garage_admin_sdk/model_utils.py delete mode 100644 python/garage_admin_sdk/models/__init__.py delete mode 100644 python/garage_admin_sdk/rest.py delete mode 100644 python/git_push.sh delete mode 100644 python/requirements.txt delete mode 100644 python/setup.cfg delete mode 100644 python/setup.py delete mode 100644 python/test-requirements.txt delete mode 100644 python/test/__init__.py delete mode 100644 python/test/test_add_key_request.py delete mode 100644 python/test/test_add_node200_response_inner.py delete mode 100644 python/test/test_allow_bucket_key_request.py delete mode 100644 python/test/test_allow_bucket_key_request_permissions.py delete mode 100644 python/test/test_bucket_api.py delete mode 100644 python/test/test_bucket_info.py delete mode 100644 python/test/test_bucket_info_quotas.py delete mode 100644 python/test/test_bucket_info_website_config.py delete mode 100644 python/test/test_bucket_key_info.py delete mode 100644 python/test/test_cluster_layout.py delete mode 100644 python/test/test_connect_post200_response_inner.py delete mode 100644 python/test/test_create_bucket_request.py delete mode 100644 python/test/test_create_bucket_request_local_alias.py delete mode 100644 python/test/test_create_bucket_request_local_alias_allow.py delete mode 100644 python/test/test_get_nodes200_response.py delete mode 100644 python/test/test_import_key_request.py delete mode 100644 python/test/test_key_api.py delete mode 100644 python/test/test_key_get_request.py delete mode 100644 python/test/test_key_id_access_key_delete_request.py delete mode 100644 python/test/test_key_id_access_key_delete_request_allow.py delete mode 100644 python/test/test_key_id_access_key_delete_request_deny.py delete mode 100644 python/test/test_key_import_post_request.py delete mode 100644 python/test/test_key_info.py delete mode 100644 python/test/test_key_info_buckets_inner.py delete mode 100644 python/test/test_key_info_buckets_inner_permissions.py delete mode 100644 python/test/test_key_info_permissions.py delete mode 100644 python/test/test_layout_api.py delete mode 100644 python/test/test_layout_version.py delete mode 100644 python/test/test_list_buckets200_response_inner.py delete mode 100644 python/test/test_list_buckets200_response_inner_local_aliases_inner.py delete mode 100644 python/test/test_list_keys200_response_inner.py delete mode 100644 python/test/test_membership_api.py delete mode 100644 python/test/test_node_cluster_info.py delete mode 100644 python/test/test_node_network_info.py delete mode 100644 python/test/test_nodes_api.py delete mode 100644 python/test/test_status_get200_response.py delete mode 100644 python/test/test_update_bucket_request.py delete mode 100644 python/test/test_update_bucket_request_quotas.py delete mode 100644 python/test/test_update_bucket_request_website_access.py delete mode 100644 python/test/test_update_key_request.py delete mode 100644 python/test/test_update_key_request_allow.py delete mode 100644 python/test/test_update_key_request_deny.py delete mode 100644 python/tox.ini diff --git a/README.md b/README.md index 4fa1827..1e50dcc 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ You need at least Python 3.6, pip, and setuptools. Because the python package is in a subfolder, the command is a bit more complicated than usual: ```bash -pip3 install --user 'git+https://git.deuxfleurs.fr/quentin/garage-admin-sdk#egg=garage-admin-sdk&subdirectory=python' +pip3 install --user 'git+https://git.deuxfleurs.fr/quentin/garage-admin-sdk-python' ``` Now, let imagine you have a fresh Garage instance running on localhost, with the admin API configured on port 3903 with the bearer `s3cr3t`: diff --git a/build.gradle b/build.gradle index 91120ba..6271e54 100644 --- a/build.gradle +++ b/build.gradle @@ -10,7 +10,7 @@ task validate(type: org.openapitools.generator.gradle.plugin.tasks.ValidateTask) task buildPythonClient(type: org.openapitools.generator.gradle.plugin.tasks.GenerateTask) { generatorName = "python" inputSpec = "./garage/doc/api/garage-admin-v0.yml" - outputDir = "$rootDir/python" + outputDir = "$rootDir/garage-admin-sdk-python" configOptions = [ packageName: "garage_admin_sdk", packageVersion: "0.8.0", @@ -21,7 +21,7 @@ task buildPythonClient(type: org.openapitools.generator.gradle.plugin.tasks.Gene task buildGoClient(type: org.openapitools.generator.gradle.plugin.tasks.GenerateTask) { generatorName = "go" inputSpec = "./garage/doc/api/garage-admin-v0.yml" - outputDir = "$rootDir/golang" + outputDir = "$rootDir/garage-admin-sdk-golang" configOptions = [ packageName: "garage", packageVersion: "0.8.0", @@ -31,10 +31,13 @@ task buildGoClient(type: org.openapitools.generator.gradle.plugin.tasks.Generate task buildJavascriptClient(type: org.openapitools.generator.gradle.plugin.tasks.GenerateTask) { generatorName = "javascript" inputSpec = "./garage/doc/api/garage-admin-v0.yml" - outputDir = "$rootDir/javascript" + outputDir = "$rootDir/garage-admin-sdk-js" configOptions = [ - packageName: "garage", + packageName: "garage-admin-sdk-js", moduleName: "garage", + npmName: "garage-admin-sdk-js", + npmRepository: "@dxflrs/garage-admin-sdk-js", packageVersion: "0.8.0", + usePromises: "true", ] } diff --git a/example/javascript/.gitignore b/example/javascript/.gitignore new file mode 100644 index 0000000..3c3629e --- /dev/null +++ b/example/javascript/.gitignore @@ -0,0 +1 @@ +node_modules diff --git a/example/javascript/package-lock.json b/example/javascript/package-lock.json new file mode 100644 index 0000000..8c07b85 --- /dev/null +++ b/example/javascript/package-lock.json @@ -0,0 +1,2195 @@ +{ + "name": "sdk-example", + "version": "1.0.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "sdk-example", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "garage_administration_api_v0garage_v0_8_0": "git+https://git.deuxfleurs.fr/quentin/garage-admin-sdk-js.git" + } + }, + "node_modules/@ampproject/remapping": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz", + "integrity": "sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w==", + "peer": true, + "dependencies": { + "@jridgewell/gen-mapping": "^0.1.0", + "@jridgewell/trace-mapping": "^0.3.9" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/cli": { + "version": "7.19.3", + "resolved": "https://registry.npmjs.org/@babel/cli/-/cli-7.19.3.tgz", + "integrity": "sha512-643/TybmaCAe101m2tSVHi9UKpETXP9c/Ff4mD2tAwkdP6esKIfaauZFc67vGEM6r9fekbEGid+sZhbEnSe3dg==", + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.8", + "commander": "^4.0.1", + "convert-source-map": "^1.1.0", + "fs-readdir-recursive": "^1.1.0", + "glob": "^7.2.0", + "make-dir": "^2.1.0", + "slash": "^2.0.0" + }, + "bin": { + "babel": "bin/babel.js", + "babel-external-helpers": "bin/babel-external-helpers.js" + }, + "engines": { + "node": ">=6.9.0" + }, + "optionalDependencies": { + "@nicolo-ribaudo/chokidar-2": "2.1.8-no-fsevents.3", + "chokidar": "^3.4.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz", + "integrity": "sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==", + "peer": true, + "dependencies": { + "@babel/highlight": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/compat-data": { + "version": "7.20.1", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.20.1.tgz", + "integrity": "sha512-EWZ4mE2diW3QALKvDMiXnbZpRvlj+nayZ112nK93SnhqOtpdsbVD4W+2tEoT3YNBAG9RBR0ISY758ZkOgsn6pQ==", + "peer": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/core": { + "version": "7.20.2", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.20.2.tgz", + "integrity": "sha512-w7DbG8DtMrJcFOi4VrLm+8QM4az8Mo+PuLBKLp2zrYRCow8W/f9xiXm5sN53C8HksCyDQwCKha9JiDoIyPjT2g==", + "peer": true, + "dependencies": { + "@ampproject/remapping": "^2.1.0", + "@babel/code-frame": "^7.18.6", + "@babel/generator": "^7.20.2", + "@babel/helper-compilation-targets": "^7.20.0", + "@babel/helper-module-transforms": "^7.20.2", + "@babel/helpers": "^7.20.1", + "@babel/parser": "^7.20.2", + "@babel/template": "^7.18.10", + "@babel/traverse": "^7.20.1", + "@babel/types": "^7.20.2", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.1", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@babel/generator": { + "version": "7.20.4", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.20.4.tgz", + "integrity": "sha512-luCf7yk/cm7yab6CAW1aiFnmEfBJplb/JojV56MYEK7ziWfGmFlTfmL9Ehwfy4gFhbjBfWO1wj7/TuSbVNEEtA==", + "peer": true, + "dependencies": { + "@babel/types": "^7.20.2", + "@jridgewell/gen-mapping": "^0.3.2", + "jsesc": "^2.5.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/generator/node_modules/@jridgewell/gen-mapping": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", + "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", + "peer": true, + "dependencies": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/helper-compilation-targets": { + "version": "7.20.0", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.20.0.tgz", + "integrity": "sha512-0jp//vDGp9e8hZzBc6N/KwA5ZK3Wsm/pfm4CrY7vzegkVxc65SgSn6wYOnwHe9Js9HRQ1YTCKLGPzDtaS3RoLQ==", + "peer": true, + "dependencies": { + "@babel/compat-data": "^7.20.0", + "@babel/helper-validator-option": "^7.18.6", + "browserslist": "^4.21.3", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-environment-visitor": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz", + "integrity": "sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==", + "peer": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-function-name": { + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.19.0.tgz", + "integrity": "sha512-WAwHBINyrpqywkUH0nTnNgI5ina5TFn85HKS0pbPDfxFfhyR/aNQEn4hGi1P1JyT//I0t4OgXUlofzWILRvS5w==", + "peer": true, + "dependencies": { + "@babel/template": "^7.18.10", + "@babel/types": "^7.19.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-hoist-variables": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz", + "integrity": "sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==", + "peer": true, + "dependencies": { + "@babel/types": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz", + "integrity": "sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==", + "peer": true, + "dependencies": { + "@babel/types": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-transforms": { + "version": "7.20.2", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.20.2.tgz", + "integrity": "sha512-zvBKyJXRbmK07XhMuujYoJ48B5yvvmM6+wcpv6Ivj4Yg6qO7NOZOSnvZN9CRl1zz1Z4cKf8YejmCMh8clOoOeA==", + "peer": true, + "dependencies": { + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-module-imports": "^7.18.6", + "@babel/helper-simple-access": "^7.20.2", + "@babel/helper-split-export-declaration": "^7.18.6", + "@babel/helper-validator-identifier": "^7.19.1", + "@babel/template": "^7.18.10", + "@babel/traverse": "^7.20.1", + "@babel/types": "^7.20.2" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-simple-access": { + "version": "7.20.2", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.20.2.tgz", + "integrity": "sha512-+0woI/WPq59IrqDYbVGfshjT5Dmk/nnbdpcF8SnMhhXObpTq2KNBdLFRFrkVdbDOyUmHBCxzm5FHV1rACIkIbA==", + "peer": true, + "dependencies": { + "@babel/types": "^7.20.2" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-split-export-declaration": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz", + "integrity": "sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==", + "peer": true, + "dependencies": { + "@babel/types": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.19.4", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.19.4.tgz", + "integrity": "sha512-nHtDoQcuqFmwYNYPz3Rah5ph2p8PFeFCsZk9A/48dPc/rGocJ5J3hAAZ7pb76VWX3fZKu+uEr/FhH5jLx7umrw==", + "peer": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.19.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz", + "integrity": "sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==", + "peer": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-option": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz", + "integrity": "sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw==", + "peer": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helpers": { + "version": "7.20.1", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.20.1.tgz", + "integrity": "sha512-J77mUVaDTUJFZ5BpP6mMn6OIl3rEWymk2ZxDBQJUG3P+PbmyMcF3bYWvz0ma69Af1oobDqT/iAsvzhB58xhQUg==", + "peer": true, + "dependencies": { + "@babel/template": "^7.18.10", + "@babel/traverse": "^7.20.1", + "@babel/types": "^7.20.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz", + "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==", + "peer": true, + "dependencies": { + "@babel/helper-validator-identifier": "^7.18.6", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.20.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.20.3.tgz", + "integrity": "sha512-OP/s5a94frIPXwjzEcv5S/tpQfc6XhxYUnmWpgdqMWGgYCuErA3SzozaRAMQgSZWKeTJxht9aWAkUY+0UzvOFg==", + "peer": true, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/template": { + "version": "7.18.10", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.18.10.tgz", + "integrity": "sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA==", + "peer": true, + "dependencies": { + "@babel/code-frame": "^7.18.6", + "@babel/parser": "^7.18.10", + "@babel/types": "^7.18.10" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.20.1", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.20.1.tgz", + "integrity": "sha512-d3tN8fkVJwFLkHkBN479SOsw4DMZnz8cdbL/gvuDuzy3TS6Nfw80HuQqhw1pITbIruHyh7d1fMA47kWzmcUEGA==", + "peer": true, + "dependencies": { + "@babel/code-frame": "^7.18.6", + "@babel/generator": "^7.20.1", + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-function-name": "^7.19.0", + "@babel/helper-hoist-variables": "^7.18.6", + "@babel/helper-split-export-declaration": "^7.18.6", + "@babel/parser": "^7.20.1", + "@babel/types": "^7.20.0", + "debug": "^4.1.0", + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/types": { + "version": "7.20.2", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.20.2.tgz", + "integrity": "sha512-FnnvsNWgZCr232sqtXggapvlkk/tuwR/qhGzcmxI0GXLCjmPYQPzio2FbdlWuY6y1sHFfQKk+rRbUZ9VStQMog==", + "peer": true, + "dependencies": { + "@babel/helper-string-parser": "^7.19.4", + "@babel/helper-validator-identifier": "^7.19.1", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz", + "integrity": "sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w==", + "peer": true, + "dependencies": { + "@jridgewell/set-array": "^1.0.0", + "@jridgewell/sourcemap-codec": "^1.4.10" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", + "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", + "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "peer": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.14", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", + "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.17", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.17.tgz", + "integrity": "sha512-MCNzAp77qzKca9+W/+I0+sEpaUnZoeasnghNeVc41VZCEKaCH73Vq3BZZ/SzWIgrqE4H4ceI+p+b6C0mHf9T4g==", + "dependencies": { + "@jridgewell/resolve-uri": "3.1.0", + "@jridgewell/sourcemap-codec": "1.4.14" + } + }, + "node_modules/@nicolo-ribaudo/chokidar-2": { + "version": "2.1.8-no-fsevents.3", + "resolved": "https://registry.npmjs.org/@nicolo-ribaudo/chokidar-2/-/chokidar-2-2.1.8-no-fsevents.3.tgz", + "integrity": "sha512-s88O1aVtXftvp5bCPB7WnmXc5IwOZZ7YPuwNPt+GtOOXpPvad1LfbmjYv+qII7zP6RU2QGnqve27dnLycEnyEQ==", + "optional": true + }, + "node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "peer": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/anymatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", + "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "optional": true, + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + }, + "node_modules/binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "optional": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "optional": true, + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/browserslist": { + "version": "4.21.4", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.4.tgz", + "integrity": "sha512-CBHJJdDmgjl3daYjN5Cp5kbTf1mUhZoS+beLklHIvkOWscs83YAhLlF3Wsh/lciQYAcbBJgTOD44VtG31ZM4Hw==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + } + ], + "peer": true, + "dependencies": { + "caniuse-lite": "^1.0.30001400", + "electron-to-chromium": "^1.4.251", + "node-releases": "^2.0.6", + "update-browserslist-db": "^1.0.9" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dependencies": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001431", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001431.tgz", + "integrity": "sha512-zBUoFU0ZcxpvSt9IU66dXVT/3ctO1cy4y9cscs1szkPlcWb6pasYM144GqrUygUbT+k7cmUCW61cvskjcv0enQ==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + } + ], + "peer": true + }, + "node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "peer": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/chokidar": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "optional": true, + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "peer": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "peer": true + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/commander": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", + "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", + "engines": { + "node": ">= 6" + } + }, + "node_modules/component-emitter": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", + "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==" + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" + }, + "node_modules/convert-source-map": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", + "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==" + }, + "node_modules/cookiejar": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.3.tgz", + "integrity": "sha512-JxbCBUdrfr6AQjOXrxoTvAMJO4HBTUIlBzslcJPAz+/KT8yk53fXun51u+RenNYvad/+Vc2DIz5o9UxlCDymFQ==" + }, + "node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/electron-to-chromium": { + "version": "1.4.284", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.284.tgz", + "integrity": "sha512-M8WEXFuKXMYMVr45fo8mq0wUrrJHheiKZf6BArTKk9ZBYCKJEOU5H8cdWgDT+qCVZf7Na4lVUaZsA+h6uA9+PA==", + "peer": true + }, + "node_modules/escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "peer": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "peer": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/fast-safe-stringify": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz", + "integrity": "sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==" + }, + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "optional": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/form-data": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", + "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/formidable": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/formidable/-/formidable-1.2.6.tgz", + "integrity": "sha512-KcpbcpuLNOwrEjnbpMC0gS+X8ciDoZE1kkqzat4a8vrprf+s9pKNQ/QIwWfbfs4ltgmFl3MD177SNTkve3BwGQ==", + "deprecated": "Please upgrade to latest, formidable@v2 or formidable@v3! Check these notes: https://bit.ly/2ZEqIau", + "funding": { + "url": "https://ko-fi.com/tunnckoCore/commissions" + } + }, + "node_modules/fs-readdir-recursive": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz", + "integrity": "sha512-GNanXlVr2pf02+sPN40XN8HG+ePaNcvM0q5mZBd668Obwb0yD5GiUbZOFgwn8kGMY6I3mdyDJzieUy3PTYyTRA==" + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" + }, + "node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, + "node_modules/garage_administration_api_v0garage_v0_8_0": { + "version": "v0.8.0", + "resolved": "git+https://git.deuxfleurs.fr/quentin/garage-admin-sdk-js.git#10360d3b3c5596abc668ff95d6924f1dd6485509", + "license": "Unlicense", + "dependencies": { + "@babel/cli": "^7.0.0", + "superagent": "^5.3.0" + } + }, + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "peer": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/get-intrinsic": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.3.tgz", + "integrity": "sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==", + "dependencies": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "optional": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "peer": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dependencies": { + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "peer": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "optional": true, + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "optional": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "optional": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "peer": true + }, + "node_modules/jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "peer": true, + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/json5": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", + "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==", + "peer": true, + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/make-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "dependencies": { + "pify": "^4.0.1", + "semver": "^5.6.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/make-dir/node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.6.0.tgz", + "integrity": "sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg==", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "node_modules/node-releases": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.6.tgz", + "integrity": "sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==", + "peer": true + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-inspect": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz", + "integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "peer": true + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "optional": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "engines": { + "node": ">=6" + } + }, + "node_modules/qs": { + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", + "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", + "dependencies": { + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "optional": true, + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "peer": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "dependencies": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/slash": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", + "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", + "engines": { + "node": ">=6" + } + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/superagent": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/superagent/-/superagent-5.3.1.tgz", + "integrity": "sha512-wjJ/MoTid2/RuGCOFtlacyGNxN9QLMgcpYLDQlWFIhhdJ93kNscFonGvrpAHSCVjRVj++DGCglocF7Aej1KHvQ==", + "deprecated": "Please upgrade to v7.0.2+ of superagent. We have fixed numerous issues with streams, form-data, attach(), filesystem errors not bubbling up (ENOENT on attach()), and all tests are now passing. See the releases tab for more information at .", + "dependencies": { + "component-emitter": "^1.3.0", + "cookiejar": "^2.1.2", + "debug": "^4.1.1", + "fast-safe-stringify": "^2.0.7", + "form-data": "^3.0.0", + "formidable": "^1.2.2", + "methods": "^1.1.2", + "mime": "^2.4.6", + "qs": "^6.9.4", + "readable-stream": "^3.6.0", + "semver": "^7.3.2" + }, + "engines": { + "node": ">= 7.0.0" + } + }, + "node_modules/superagent/node_modules/semver": { + "version": "7.3.8", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", + "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "peer": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", + "peer": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "optional": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/update-browserslist-db": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.10.tgz", + "integrity": "sha512-OztqDenkfFkbSG+tRxBeAnCVPckDBcvibKd35yDONx6OU8N7sqgwc7rCbkJ/WcYtVRZ4ba68d6byhC21GFh7sQ==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + } + ], + "peer": true, + "dependencies": { + "escalade": "^3.1.1", + "picocolors": "^1.0.0" + }, + "bin": { + "browserslist-lint": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" + }, + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + } + }, + "dependencies": { + "@ampproject/remapping": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz", + "integrity": "sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w==", + "peer": true, + "requires": { + "@jridgewell/gen-mapping": "^0.1.0", + "@jridgewell/trace-mapping": "^0.3.9" + } + }, + "@babel/cli": { + "version": "7.19.3", + "resolved": "https://registry.npmjs.org/@babel/cli/-/cli-7.19.3.tgz", + "integrity": "sha512-643/TybmaCAe101m2tSVHi9UKpETXP9c/Ff4mD2tAwkdP6esKIfaauZFc67vGEM6r9fekbEGid+sZhbEnSe3dg==", + "requires": { + "@jridgewell/trace-mapping": "^0.3.8", + "@nicolo-ribaudo/chokidar-2": "2.1.8-no-fsevents.3", + "chokidar": "^3.4.0", + "commander": "^4.0.1", + "convert-source-map": "^1.1.0", + "fs-readdir-recursive": "^1.1.0", + "glob": "^7.2.0", + "make-dir": "^2.1.0", + "slash": "^2.0.0" + } + }, + "@babel/code-frame": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz", + "integrity": "sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==", + "peer": true, + "requires": { + "@babel/highlight": "^7.18.6" + } + }, + "@babel/compat-data": { + "version": "7.20.1", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.20.1.tgz", + "integrity": "sha512-EWZ4mE2diW3QALKvDMiXnbZpRvlj+nayZ112nK93SnhqOtpdsbVD4W+2tEoT3YNBAG9RBR0ISY758ZkOgsn6pQ==", + "peer": true + }, + "@babel/core": { + "version": "7.20.2", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.20.2.tgz", + "integrity": "sha512-w7DbG8DtMrJcFOi4VrLm+8QM4az8Mo+PuLBKLp2zrYRCow8W/f9xiXm5sN53C8HksCyDQwCKha9JiDoIyPjT2g==", + "peer": true, + "requires": { + "@ampproject/remapping": "^2.1.0", + "@babel/code-frame": "^7.18.6", + "@babel/generator": "^7.20.2", + "@babel/helper-compilation-targets": "^7.20.0", + "@babel/helper-module-transforms": "^7.20.2", + "@babel/helpers": "^7.20.1", + "@babel/parser": "^7.20.2", + "@babel/template": "^7.18.10", + "@babel/traverse": "^7.20.1", + "@babel/types": "^7.20.2", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.1", + "semver": "^6.3.0" + } + }, + "@babel/generator": { + "version": "7.20.4", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.20.4.tgz", + "integrity": "sha512-luCf7yk/cm7yab6CAW1aiFnmEfBJplb/JojV56MYEK7ziWfGmFlTfmL9Ehwfy4gFhbjBfWO1wj7/TuSbVNEEtA==", + "peer": true, + "requires": { + "@babel/types": "^7.20.2", + "@jridgewell/gen-mapping": "^0.3.2", + "jsesc": "^2.5.1" + }, + "dependencies": { + "@jridgewell/gen-mapping": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", + "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", + "peer": true, + "requires": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + } + } + } + }, + "@babel/helper-compilation-targets": { + "version": "7.20.0", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.20.0.tgz", + "integrity": "sha512-0jp//vDGp9e8hZzBc6N/KwA5ZK3Wsm/pfm4CrY7vzegkVxc65SgSn6wYOnwHe9Js9HRQ1YTCKLGPzDtaS3RoLQ==", + "peer": true, + "requires": { + "@babel/compat-data": "^7.20.0", + "@babel/helper-validator-option": "^7.18.6", + "browserslist": "^4.21.3", + "semver": "^6.3.0" + } + }, + "@babel/helper-environment-visitor": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz", + "integrity": "sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==", + "peer": true + }, + "@babel/helper-function-name": { + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.19.0.tgz", + "integrity": "sha512-WAwHBINyrpqywkUH0nTnNgI5ina5TFn85HKS0pbPDfxFfhyR/aNQEn4hGi1P1JyT//I0t4OgXUlofzWILRvS5w==", + "peer": true, + "requires": { + "@babel/template": "^7.18.10", + "@babel/types": "^7.19.0" + } + }, + "@babel/helper-hoist-variables": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz", + "integrity": "sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==", + "peer": true, + "requires": { + "@babel/types": "^7.18.6" + } + }, + "@babel/helper-module-imports": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz", + "integrity": "sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==", + "peer": true, + "requires": { + "@babel/types": "^7.18.6" + } + }, + "@babel/helper-module-transforms": { + "version": "7.20.2", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.20.2.tgz", + "integrity": "sha512-zvBKyJXRbmK07XhMuujYoJ48B5yvvmM6+wcpv6Ivj4Yg6qO7NOZOSnvZN9CRl1zz1Z4cKf8YejmCMh8clOoOeA==", + "peer": true, + "requires": { + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-module-imports": "^7.18.6", + "@babel/helper-simple-access": "^7.20.2", + "@babel/helper-split-export-declaration": "^7.18.6", + "@babel/helper-validator-identifier": "^7.19.1", + "@babel/template": "^7.18.10", + "@babel/traverse": "^7.20.1", + "@babel/types": "^7.20.2" + } + }, + "@babel/helper-simple-access": { + "version": "7.20.2", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.20.2.tgz", + "integrity": "sha512-+0woI/WPq59IrqDYbVGfshjT5Dmk/nnbdpcF8SnMhhXObpTq2KNBdLFRFrkVdbDOyUmHBCxzm5FHV1rACIkIbA==", + "peer": true, + "requires": { + "@babel/types": "^7.20.2" + } + }, + "@babel/helper-split-export-declaration": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz", + "integrity": "sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==", + "peer": true, + "requires": { + "@babel/types": "^7.18.6" + } + }, + "@babel/helper-string-parser": { + "version": "7.19.4", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.19.4.tgz", + "integrity": "sha512-nHtDoQcuqFmwYNYPz3Rah5ph2p8PFeFCsZk9A/48dPc/rGocJ5J3hAAZ7pb76VWX3fZKu+uEr/FhH5jLx7umrw==", + "peer": true + }, + "@babel/helper-validator-identifier": { + "version": "7.19.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz", + "integrity": "sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==", + "peer": true + }, + "@babel/helper-validator-option": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz", + "integrity": "sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw==", + "peer": true + }, + "@babel/helpers": { + "version": "7.20.1", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.20.1.tgz", + "integrity": "sha512-J77mUVaDTUJFZ5BpP6mMn6OIl3rEWymk2ZxDBQJUG3P+PbmyMcF3bYWvz0ma69Af1oobDqT/iAsvzhB58xhQUg==", + "peer": true, + "requires": { + "@babel/template": "^7.18.10", + "@babel/traverse": "^7.20.1", + "@babel/types": "^7.20.0" + } + }, + "@babel/highlight": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz", + "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==", + "peer": true, + "requires": { + "@babel/helper-validator-identifier": "^7.18.6", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + } + }, + "@babel/parser": { + "version": "7.20.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.20.3.tgz", + "integrity": "sha512-OP/s5a94frIPXwjzEcv5S/tpQfc6XhxYUnmWpgdqMWGgYCuErA3SzozaRAMQgSZWKeTJxht9aWAkUY+0UzvOFg==", + "peer": true + }, + "@babel/template": { + "version": "7.18.10", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.18.10.tgz", + "integrity": "sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA==", + "peer": true, + "requires": { + "@babel/code-frame": "^7.18.6", + "@babel/parser": "^7.18.10", + "@babel/types": "^7.18.10" + } + }, + "@babel/traverse": { + "version": "7.20.1", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.20.1.tgz", + "integrity": "sha512-d3tN8fkVJwFLkHkBN479SOsw4DMZnz8cdbL/gvuDuzy3TS6Nfw80HuQqhw1pITbIruHyh7d1fMA47kWzmcUEGA==", + "peer": true, + "requires": { + "@babel/code-frame": "^7.18.6", + "@babel/generator": "^7.20.1", + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-function-name": "^7.19.0", + "@babel/helper-hoist-variables": "^7.18.6", + "@babel/helper-split-export-declaration": "^7.18.6", + "@babel/parser": "^7.20.1", + "@babel/types": "^7.20.0", + "debug": "^4.1.0", + "globals": "^11.1.0" + } + }, + "@babel/types": { + "version": "7.20.2", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.20.2.tgz", + "integrity": "sha512-FnnvsNWgZCr232sqtXggapvlkk/tuwR/qhGzcmxI0GXLCjmPYQPzio2FbdlWuY6y1sHFfQKk+rRbUZ9VStQMog==", + "peer": true, + "requires": { + "@babel/helper-string-parser": "^7.19.4", + "@babel/helper-validator-identifier": "^7.19.1", + "to-fast-properties": "^2.0.0" + } + }, + "@jridgewell/gen-mapping": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz", + "integrity": "sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w==", + "peer": true, + "requires": { + "@jridgewell/set-array": "^1.0.0", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, + "@jridgewell/resolve-uri": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", + "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==" + }, + "@jridgewell/set-array": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", + "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "peer": true + }, + "@jridgewell/sourcemap-codec": { + "version": "1.4.14", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", + "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==" + }, + "@jridgewell/trace-mapping": { + "version": "0.3.17", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.17.tgz", + "integrity": "sha512-MCNzAp77qzKca9+W/+I0+sEpaUnZoeasnghNeVc41VZCEKaCH73Vq3BZZ/SzWIgrqE4H4ceI+p+b6C0mHf9T4g==", + "requires": { + "@jridgewell/resolve-uri": "3.1.0", + "@jridgewell/sourcemap-codec": "1.4.14" + } + }, + "@nicolo-ribaudo/chokidar-2": { + "version": "2.1.8-no-fsevents.3", + "resolved": "https://registry.npmjs.org/@nicolo-ribaudo/chokidar-2/-/chokidar-2-2.1.8-no-fsevents.3.tgz", + "integrity": "sha512-s88O1aVtXftvp5bCPB7WnmXc5IwOZZ7YPuwNPt+GtOOXpPvad1LfbmjYv+qII7zP6RU2QGnqve27dnLycEnyEQ==", + "optional": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "peer": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "anymatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", + "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "optional": true, + "requires": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + } + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" + }, + "balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + }, + "binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "optional": true + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "optional": true, + "requires": { + "fill-range": "^7.0.1" + } + }, + "browserslist": { + "version": "4.21.4", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.4.tgz", + "integrity": "sha512-CBHJJdDmgjl3daYjN5Cp5kbTf1mUhZoS+beLklHIvkOWscs83YAhLlF3Wsh/lciQYAcbBJgTOD44VtG31ZM4Hw==", + "peer": true, + "requires": { + "caniuse-lite": "^1.0.30001400", + "electron-to-chromium": "^1.4.251", + "node-releases": "^2.0.6", + "update-browserslist-db": "^1.0.9" + } + }, + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, + "caniuse-lite": { + "version": "1.0.30001431", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001431.tgz", + "integrity": "sha512-zBUoFU0ZcxpvSt9IU66dXVT/3ctO1cy4y9cscs1szkPlcWb6pasYM144GqrUygUbT+k7cmUCW61cvskjcv0enQ==", + "peer": true + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "peer": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "chokidar": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "optional": true, + "requires": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "fsevents": "~2.3.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "peer": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "peer": true + }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "commander": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", + "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==" + }, + "component-emitter": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", + "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==" + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" + }, + "convert-source-map": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", + "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==" + }, + "cookiejar": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.3.tgz", + "integrity": "sha512-JxbCBUdrfr6AQjOXrxoTvAMJO4HBTUIlBzslcJPAz+/KT8yk53fXun51u+RenNYvad/+Vc2DIz5o9UxlCDymFQ==" + }, + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "requires": { + "ms": "2.1.2" + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==" + }, + "electron-to-chromium": { + "version": "1.4.284", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.284.tgz", + "integrity": "sha512-M8WEXFuKXMYMVr45fo8mq0wUrrJHheiKZf6BArTKk9ZBYCKJEOU5H8cdWgDT+qCVZf7Na4lVUaZsA+h6uA9+PA==", + "peer": true + }, + "escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "peer": true + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "peer": true + }, + "fast-safe-stringify": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz", + "integrity": "sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==" + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "optional": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "form-data": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", + "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + } + }, + "formidable": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/formidable/-/formidable-1.2.6.tgz", + "integrity": "sha512-KcpbcpuLNOwrEjnbpMC0gS+X8ciDoZE1kkqzat4a8vrprf+s9pKNQ/QIwWfbfs4ltgmFl3MD177SNTkve3BwGQ==" + }, + "fs-readdir-recursive": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz", + "integrity": "sha512-GNanXlVr2pf02+sPN40XN8HG+ePaNcvM0q5mZBd668Obwb0yD5GiUbZOFgwn8kGMY6I3mdyDJzieUy3PTYyTRA==" + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" + }, + "fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "optional": true + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, + "garage_administration_api_v0garage_v0_8_0": { + "version": "git+https://git.deuxfleurs.fr/quentin/garage-admin-sdk-js.git#10360d3b3c5596abc668ff95d6924f1dd6485509", + "from": "garage_administration_api_v0garage_v0_8_0@git+https://git.deuxfleurs.fr/quentin/garage-admin-sdk-js.git", + "requires": { + "@babel/cli": "^7.0.0", + "superagent": "^5.3.0" + } + }, + "gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "peer": true + }, + "get-intrinsic": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.3.tgz", + "integrity": "sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==", + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.3" + } + }, + "glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "optional": true, + "requires": { + "is-glob": "^4.0.1" + } + }, + "globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "peer": true + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "peer": true + }, + "has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==" + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "optional": true, + "requires": { + "binary-extensions": "^2.0.0" + } + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "optional": true + }, + "is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "optional": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "optional": true + }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "peer": true + }, + "jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "peer": true + }, + "json5": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", + "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==", + "peer": true + }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "requires": { + "yallist": "^4.0.0" + } + }, + "make-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "requires": { + "pify": "^4.0.1", + "semver": "^5.6.0" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + } + } + }, + "methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==" + }, + "mime": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.6.0.tgz", + "integrity": "sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg==" + }, + "mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==" + }, + "mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "requires": { + "mime-db": "1.52.0" + } + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "node-releases": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.6.tgz", + "integrity": "sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==", + "peer": true + }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "optional": true + }, + "object-inspect": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz", + "integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==" + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "requires": { + "wrappy": "1" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==" + }, + "picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "peer": true + }, + "picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "optional": true + }, + "pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==" + }, + "qs": { + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", + "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", + "requires": { + "side-channel": "^1.0.4" + } + }, + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + }, + "readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "optional": true, + "requires": { + "picomatch": "^2.2.1" + } + }, + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "peer": true + }, + "side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "requires": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + } + }, + "slash": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", + "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==" + }, + "string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "requires": { + "safe-buffer": "~5.2.0" + } + }, + "superagent": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/superagent/-/superagent-5.3.1.tgz", + "integrity": "sha512-wjJ/MoTid2/RuGCOFtlacyGNxN9QLMgcpYLDQlWFIhhdJ93kNscFonGvrpAHSCVjRVj++DGCglocF7Aej1KHvQ==", + "requires": { + "component-emitter": "^1.3.0", + "cookiejar": "^2.1.2", + "debug": "^4.1.1", + "fast-safe-stringify": "^2.0.7", + "form-data": "^3.0.0", + "formidable": "^1.2.2", + "methods": "^1.1.2", + "mime": "^2.4.6", + "qs": "^6.9.4", + "readable-stream": "^3.6.0", + "semver": "^7.3.2" + }, + "dependencies": { + "semver": { + "version": "7.3.8", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", + "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", + "requires": { + "lru-cache": "^6.0.0" + } + } + } + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "peer": true, + "requires": { + "has-flag": "^3.0.0" + } + }, + "to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", + "peer": true + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "optional": true, + "requires": { + "is-number": "^7.0.0" + } + }, + "update-browserslist-db": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.10.tgz", + "integrity": "sha512-OztqDenkfFkbSG+tRxBeAnCVPckDBcvibKd35yDONx6OU8N7sqgwc7rCbkJ/WcYtVRZ4ba68d6byhC21GFh7sQ==", + "peer": true, + "requires": { + "escalade": "^3.1.1", + "picocolors": "^1.0.0" + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + } + } +} diff --git a/example/javascript/package.json b/example/javascript/package.json new file mode 100644 index 0000000..62e6a7e --- /dev/null +++ b/example/javascript/package.json @@ -0,0 +1,14 @@ +{ + "name": "sdk-example", + "version": "1.0.0", + "description": "", + "main": "short.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "ISC", + "dependencies": { + "garage_administration_api_v0garage_v0_8_0": "git+https://git.deuxfleurs.fr/quentin/garage-admin-sdk-js.git" + } +} diff --git a/example/javascript/short.js b/example/javascript/short.js new file mode 100644 index 0000000..253c170 --- /dev/null +++ b/example/javascript/short.js @@ -0,0 +1,15 @@ +const garage = require('garage_administration_api_v0garage_v0_8_0'); + +const api = new garage.ApiClient("http://localhost:3903/v0"); +api.authentications['bearerAuth'].accessToken = "s3cr3t"; + +const [node, layout, key, bucket] = [ + new garage.NodesApi(api), + new garage.LayoutApi(api), + new garage.KeyApi(api), + new garage.BucketApi(api), +]; + +node. + +console.log(node); diff --git a/example/configure_single_node.py b/example/python/configure_single_node.py similarity index 100% rename from example/configure_single_node.py rename to example/python/configure_single_node.py diff --git a/example/short.py b/example/python/short.py similarity index 100% rename from example/short.py rename to example/python/short.py diff --git a/garage-admin-sdk-golang b/garage-admin-sdk-golang new file mode 160000 index 0000000..6ea0a3a --- /dev/null +++ b/garage-admin-sdk-golang @@ -0,0 +1 @@ +Subproject commit 6ea0a3a7f0d0a56eaec8caf8e70cca9c8f9285d8 diff --git a/garage-admin-sdk-js b/garage-admin-sdk-js new file mode 160000 index 0000000..97a1ec9 --- /dev/null +++ b/garage-admin-sdk-js @@ -0,0 +1 @@ +Subproject commit 97a1ec97120d1376cbf93e8213bfdb4f2be9c522 diff --git a/garage-admin-sdk-python b/garage-admin-sdk-python new file mode 160000 index 0000000..9039e70 --- /dev/null +++ b/garage-admin-sdk-python @@ -0,0 +1 @@ +Subproject commit 9039e7096260d6690339c81ca9404a2d6e41554d diff --git a/golang/.gitignore b/golang/.gitignore deleted file mode 100644 index daf913b..0000000 --- a/golang/.gitignore +++ /dev/null @@ -1,24 +0,0 @@ -# Compiled Object files, Static and Dynamic libs (Shared Objects) -*.o -*.a -*.so - -# Folders -_obj -_test - -# Architecture specific extensions/prefixes -*.[568vq] -[568vq].out - -*.cgo1.go -*.cgo2.c -_cgo_defun.c -_cgo_gotypes.go -_cgo_export.* - -_testmain.go - -*.exe -*.test -*.prof diff --git a/golang/.openapi-generator-ignore b/golang/.openapi-generator-ignore deleted file mode 100644 index 7484ee5..0000000 --- a/golang/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/golang/.openapi-generator/FILES b/golang/.openapi-generator/FILES deleted file mode 100644 index a9b98fc..0000000 --- a/golang/.openapi-generator/FILES +++ /dev/null @@ -1,80 +0,0 @@ -.gitignore -.openapi-generator-ignore -.travis.yml -README.md -api/openapi.yaml -api_bucket.go -api_key.go -api_layout.go -api_nodes.go -client.go -configuration.go -docs/AddKeyRequest.md -docs/AddNode200ResponseInner.md -docs/AllowBucketKeyRequest.md -docs/AllowBucketKeyRequestPermissions.md -docs/BucketApi.md -docs/BucketInfo.md -docs/BucketInfoQuotas.md -docs/BucketInfoWebsiteConfig.md -docs/BucketKeyInfo.md -docs/ClusterLayout.md -docs/CreateBucketRequest.md -docs/CreateBucketRequestLocalAlias.md -docs/CreateBucketRequestLocalAliasAllow.md -docs/GetNodes200Response.md -docs/ImportKeyRequest.md -docs/KeyApi.md -docs/KeyInfo.md -docs/KeyInfoBucketsInner.md -docs/KeyInfoBucketsInnerPermissions.md -docs/KeyInfoPermissions.md -docs/LayoutApi.md -docs/LayoutVersion.md -docs/ListBuckets200ResponseInner.md -docs/ListBuckets200ResponseInnerLocalAliasesInner.md -docs/ListKeys200ResponseInner.md -docs/NodeClusterInfo.md -docs/NodeNetworkInfo.md -docs/NodesApi.md -docs/UpdateBucketRequest.md -docs/UpdateBucketRequestQuotas.md -docs/UpdateBucketRequestWebsiteAccess.md -docs/UpdateKeyRequest.md -docs/UpdateKeyRequestAllow.md -docs/UpdateKeyRequestDeny.md -git_push.sh -go.mod -go.sum -model_add_key_request.go -model_add_node_200_response_inner.go -model_allow_bucket_key_request.go -model_allow_bucket_key_request_permissions.go -model_bucket_info.go -model_bucket_info_quotas.go -model_bucket_info_website_config.go -model_bucket_key_info.go -model_cluster_layout.go -model_create_bucket_request.go -model_create_bucket_request_local_alias.go -model_create_bucket_request_local_alias_allow.go -model_get_nodes_200_response.go -model_import_key_request.go -model_key_info.go -model_key_info_buckets_inner.go -model_key_info_buckets_inner_permissions.go -model_key_info_permissions.go -model_layout_version.go -model_list_buckets_200_response_inner.go -model_list_buckets_200_response_inner_local_aliases_inner.go -model_list_keys_200_response_inner.go -model_node_cluster_info.go -model_node_network_info.go -model_update_bucket_request.go -model_update_bucket_request_quotas.go -model_update_bucket_request_website_access.go -model_update_key_request.go -model_update_key_request_allow.go -model_update_key_request_deny.go -response.go -utils.go diff --git a/golang/.openapi-generator/VERSION b/golang/.openapi-generator/VERSION deleted file mode 100644 index 358e78e..0000000 --- a/golang/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.1.0 \ No newline at end of file diff --git a/golang/.travis.yml b/golang/.travis.yml deleted file mode 100644 index f5cb2ce..0000000 --- a/golang/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: go - -install: - - go get -d -v . - -script: - - go build -v ./ - diff --git a/golang/README.md b/golang/README.md deleted file mode 100644 index 3061588..0000000 --- a/golang/README.md +++ /dev/null @@ -1,180 +0,0 @@ -# Go API client for garage - -Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. - -*Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - -- API version: v0.8.0 -- Package version: 0.8.0 -- Build package: org.openapitools.codegen.languages.GoClientCodegen - -## Installation - -Install the following dependencies: - -```shell -go get github.com/stretchr/testify/assert -go get golang.org/x/oauth2 -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: - -```golang -import garage "github.com/GIT_USER_ID/GIT_REPO_ID" -``` - -To use a proxy, set the environment variable `HTTP_PROXY`: - -```golang -os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port") -``` - -## Configuration of Server URL - -Default configuration comes with `Servers` field that contains server objects as defined in the OpenAPI specification. - -### Select Server Configuration - -For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`. - -```golang -ctx := context.WithValue(context.Background(), garage.ContextServerIndex, 1) -``` - -### Templated Server URL - -Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`. - -```golang -ctx := context.WithValue(context.Background(), garage.ContextServerVariables, map[string]string{ - "basePath": "v2", -}) -``` - -Note, enum values are always validated and all unused variables are silently ignored. - -### URLs Configuration per Operation - -Each operation can use different server URL defined using `OperationServers` map in the `Configuration`. -An operation is uniquely identified by `"{classname}Service.{nickname}"` string. -Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps. - -```golang -ctx := context.WithValue(context.Background(), garage.ContextOperationServerIndices, map[string]int{ - "{classname}Service.{nickname}": 2, -}) -ctx = context.WithValue(context.Background(), garage.ContextOperationServerVariables, map[string]map[string]string{ - "{classname}Service.{nickname}": { - "port": "8443", - }, -}) -``` - -## Documentation for API Endpoints - -All URIs are relative to *http://localhost:3903/v0* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*BucketApi* | [**AllowBucketKey**](docs/BucketApi.md#allowbucketkey) | **Post** /bucket/allow | Allow key -*BucketApi* | [**CreateBucket**](docs/BucketApi.md#createbucket) | **Post** /bucket | Create a bucket -*BucketApi* | [**DeleteBucket**](docs/BucketApi.md#deletebucket) | **Delete** /bucket?id={bucket_id} | Delete a bucket -*BucketApi* | [**DeleteBucketGlobalAlias**](docs/BucketApi.md#deletebucketglobalalias) | **Delete** /bucket/alias/global | Delete a global alias -*BucketApi* | [**DeleteBucketLocalAlias**](docs/BucketApi.md#deletebucketlocalalias) | **Delete** /bucket/alias/local | Delete a local alias -*BucketApi* | [**DenyBucketKey**](docs/BucketApi.md#denybucketkey) | **Post** /bucket/deny | Deny key -*BucketApi* | [**FindBucketInfo**](docs/BucketApi.md#findbucketinfo) | **Get** /bucket?globalAlias={alias} | Find a bucket -*BucketApi* | [**GetBucketInfo**](docs/BucketApi.md#getbucketinfo) | **Get** /bucket?id={bucket_id} | Get a bucket -*BucketApi* | [**ListBuckets**](docs/BucketApi.md#listbuckets) | **Get** /bucket | List all buckets -*BucketApi* | [**PutBucketGlobalAlias**](docs/BucketApi.md#putbucketglobalalias) | **Put** /bucket/alias/global | Add a global alias -*BucketApi* | [**PutBucketLocalAlias**](docs/BucketApi.md#putbucketlocalalias) | **Put** /bucket/alias/local | Add a local alias -*BucketApi* | [**UpdateBucket**](docs/BucketApi.md#updatebucket) | **Put** /bucket?id={bucket_id} | Update a bucket -*KeyApi* | [**AddKey**](docs/KeyApi.md#addkey) | **Post** /key | Create a new API key -*KeyApi* | [**DeleteKey**](docs/KeyApi.md#deletekey) | **Delete** /key?id={access_key} | Delete a key -*KeyApi* | [**GetKey**](docs/KeyApi.md#getkey) | **Get** /key?id={access_key} | Get key information -*KeyApi* | [**ImportKey**](docs/KeyApi.md#importkey) | **Post** /key/import | Import an existing key -*KeyApi* | [**ListKeys**](docs/KeyApi.md#listkeys) | **Get** /key | List all keys -*KeyApi* | [**SearchKey**](docs/KeyApi.md#searchkey) | **Get** /key?search={pattern} | Select key by pattern -*KeyApi* | [**UpdateKey**](docs/KeyApi.md#updatekey) | **Post** /key?id={access_key} | Update a key -*LayoutApi* | [**AddLayout**](docs/LayoutApi.md#addlayout) | **Post** /layout | Send modifications to the cluster layout -*LayoutApi* | [**ApplyLayout**](docs/LayoutApi.md#applylayout) | **Post** /layout/apply | Apply staged layout -*LayoutApi* | [**GetLayout**](docs/LayoutApi.md#getlayout) | **Get** /layout | Details on the current and staged layout -*LayoutApi* | [**RevertLayout**](docs/LayoutApi.md#revertlayout) | **Post** /layout/revert | Clear staged layout -*NodesApi* | [**AddNode**](docs/NodesApi.md#addnode) | **Post** /connect | Connect target node to other Garage nodes -*NodesApi* | [**GetNodes**](docs/NodesApi.md#getnodes) | **Get** /status | Status of this node and other nodes in the cluster - - -## Documentation For Models - - - [AddKeyRequest](docs/AddKeyRequest.md) - - [AddNode200ResponseInner](docs/AddNode200ResponseInner.md) - - [AllowBucketKeyRequest](docs/AllowBucketKeyRequest.md) - - [AllowBucketKeyRequestPermissions](docs/AllowBucketKeyRequestPermissions.md) - - [BucketInfo](docs/BucketInfo.md) - - [BucketInfoQuotas](docs/BucketInfoQuotas.md) - - [BucketInfoWebsiteConfig](docs/BucketInfoWebsiteConfig.md) - - [BucketKeyInfo](docs/BucketKeyInfo.md) - - [ClusterLayout](docs/ClusterLayout.md) - - [CreateBucketRequest](docs/CreateBucketRequest.md) - - [CreateBucketRequestLocalAlias](docs/CreateBucketRequestLocalAlias.md) - - [CreateBucketRequestLocalAliasAllow](docs/CreateBucketRequestLocalAliasAllow.md) - - [GetNodes200Response](docs/GetNodes200Response.md) - - [ImportKeyRequest](docs/ImportKeyRequest.md) - - [KeyInfo](docs/KeyInfo.md) - - [KeyInfoBucketsInner](docs/KeyInfoBucketsInner.md) - - [KeyInfoBucketsInnerPermissions](docs/KeyInfoBucketsInnerPermissions.md) - - [KeyInfoPermissions](docs/KeyInfoPermissions.md) - - [LayoutVersion](docs/LayoutVersion.md) - - [ListBuckets200ResponseInner](docs/ListBuckets200ResponseInner.md) - - [ListBuckets200ResponseInnerLocalAliasesInner](docs/ListBuckets200ResponseInnerLocalAliasesInner.md) - - [ListKeys200ResponseInner](docs/ListKeys200ResponseInner.md) - - [NodeClusterInfo](docs/NodeClusterInfo.md) - - [NodeNetworkInfo](docs/NodeNetworkInfo.md) - - [UpdateBucketRequest](docs/UpdateBucketRequest.md) - - [UpdateBucketRequestQuotas](docs/UpdateBucketRequestQuotas.md) - - [UpdateBucketRequestWebsiteAccess](docs/UpdateBucketRequestWebsiteAccess.md) - - [UpdateKeyRequest](docs/UpdateKeyRequest.md) - - [UpdateKeyRequestAllow](docs/UpdateKeyRequestAllow.md) - - [UpdateKeyRequestDeny](docs/UpdateKeyRequestDeny.md) - - -## Documentation For Authorization - - - -### bearerAuth - -- **Type**: HTTP Bearer token authentication - -Example - -```golang -auth := context.WithValue(context.Background(), sw.ContextAccessToken, "BEARER_TOKEN_STRING") -r, err := client.Service.Operation(auth, args) -``` - - -## Documentation for Utility Methods - -Due to the fact that model structure members are all pointers, this package contains -a number of utility functions to easily obtain pointers to values of basic types. -Each of these functions takes a value of the given basic type and returns a pointer to it: - -* `PtrBool` -* `PtrInt` -* `PtrInt32` -* `PtrInt64` -* `PtrFloat` -* `PtrFloat32` -* `PtrFloat64` -* `PtrString` -* `PtrTime` - -## Author - - - diff --git a/golang/api/openapi.yaml b/golang/api/openapi.yaml deleted file mode 100644 index 1497111..0000000 --- a/golang/api/openapi.yaml +++ /dev/null @@ -1,1439 +0,0 @@ -openapi: 3.0.0 -info: - description: | - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. - - *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - title: Garage Administration API v0+garage-v0.8.0 - version: v0.8.0 -servers: -- description: A local server - url: http://localhost:3903/v0/ -security: -- bearerAuth: [] -paths: - /status: - get: - description: | - Returns the cluster's current status, including: - - ID of the node being queried and its version of the Garage daemon - - Live nodes - - Currently configured cluster layout - - Staged changes to the cluster layout - operationId: GetNodes - responses: - "500": - description: | - The server can not answer your request because it is in a bad state - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/GetNodes_200_response' - description: | - Information about the queried node, its environment and the current layout - summary: Status of this node and other nodes in the cluster - tags: - - Nodes - /connect: - post: - description: | - Instructs this Garage node to connect to other Garage nodes at specified `@`. `node_id` is generated automatically on node start. - operationId: AddNode - requestBody: - content: - application/json: - schema: - example: - - ec79480e0ce52ae26fd00c9da684e4fa56658d9c64cdcecb094e936de0bfe71f@10.0.0.11:3901 - - 4a6ae5a1d0d33bf895f5bb4f0a418b7dc94c47c0dd2eb108d1158f3c8f60b0ff@10.0.0.12:3901 - items: - type: string - type: array - required: true - responses: - "500": - description: | - The server can not answer your request because it is in a bad state - "400": - description: | - Your request is malformed, check your JSON - "200": - content: - application/json: - schema: - example: - - success: true - error: null - - success: false - error: Handshake error - items: - $ref: '#/components/schemas/AddNode_200_response_inner' - type: array - description: | - The request has been handled correctly but it does not mean that all connection requests succeeded; some might have fail, you need to check the body! - summary: Connect target node to other Garage nodes - tags: - - Nodes - /layout: - get: - description: "Returns the cluster's current layout, including:\n - Currently\ - \ configured cluster layout\n - Staged changes to the cluster layout\n \n\ - *The info returned by this endpoint is a subset of the info returned by `GET\ - \ /status`.*\n" - operationId: GetLayout - responses: - "500": - description: | - The server can not answer your request because it is in a bad state - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/ClusterLayout' - description: | - Returns the cluster's current cluster layout: - - Currently configured cluster layout - - Staged changes to the cluster layout - summary: Details on the current and staged layout - tags: - - Layout - post: - description: | - Send modifications to the cluster layout. These modifications will be included in the staged role changes, visible in subsequent calls of `GET /layout`. Once the set of staged changes is satisfactory, the user may call `POST /layout/apply` to apply the changed changes, or `POST /layout/revert` to clear all of the staged changes in the layout. - Note that setting the capacity to `null` will configure the node as a gateway. - operationId: AddLayout - requestBody: - content: - application/json: - schema: - additionalProperties: - $ref: '#/components/schemas/NodeClusterInfo' - example: - e2ee7984ee65b260682086ec70026165903c86e601a4a5a501c1900afe28d84b: - zone: geneva - capacity: 4 - tags: - - gateway - "4a6ae5a1d0d33bf895f5bb4f0a418b7dc94c47c0dd2eb108d1158f3c8f60b0ff": null - type: object - description: | - To add a new node to the layout or to change the configuration of an existing node, simply set the values you want. - To remove a node, set it to `null` instead of passing a configuration object. - - Contrary to the CLI that may update only a subset of the fields capacity, zone and tags, when calling this API all of these values must be specified. - required: true - responses: - "500": - description: The server can not handle your request. Check your connectivity - with the rest of the cluster. - "400": - description: Invalid syntax or requested change - "200": - description: The layout modification has been correctly staged - summary: Send modifications to the cluster layout - tags: - - Layout - /layout/apply: - post: - description: | - Applies to the cluster the layout changes currently registered as staged layout changes. - operationId: ApplyLayout - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/LayoutVersion' - description: | - Similarly to the CLI, the body must include the version of the new layout that will be created, which MUST be 1 + the value of the currently existing layout in the cluster. - required: true - responses: - "500": - description: The server can not handle your request. Check your connectivity - with the rest of the cluster. - "400": - description: Invalid syntax or requested change - "200": - description: "The staged layout has been applied as the new layout of the\ - \ cluster, a rebalance has been triggered." - summary: Apply staged layout - tags: - - Layout - /layout/revert: - post: - description: | - Clears all of the staged layout changes. - operationId: RevertLayout - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/LayoutVersion' - description: | - Reverting the staged changes is done by incrementing the version number and clearing the contents of the staged change list. Similarly to the CLI, the body must include the incremented version number, which MUST be 1 + the value of the currently existing layout in the cluster. - required: true - responses: - "500": - description: The server can not handle your request. Check your connectivity - with the rest of the cluster. - "400": - description: Invalid syntax or requested change - "200": - description: "The staged layout has been cleared, you can start again sending\ - \ modification from a fresh copy with `POST /layout`." - summary: Clear staged layout - tags: - - Layout - /key: - get: - description: | - Returns all API access keys in the cluster. - operationId: ListKeys - responses: - "500": - description: The server can not handle your request. Check your connectivity - with the rest of the cluster. - "200": - content: - application/json: - schema: - example: - - id: GK31c2f218a2e44f485b94239e - name: test-key - - id: GKe10061ac9c2921f09e4c5540 - name: "" - items: - $ref: '#/components/schemas/ListKeys_200_response_inner' - type: array - description: | - Returns the key identifier (aka `AWS_ACCESS_KEY_ID`) and its associated, human friendly, name if any (otherwise return an empty string) - summary: List all keys - tags: - - Key - post: - description: | - Creates a new API access key. - operationId: AddKey - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AddKey_request' - description: | - "You can set a friendly name for this key, send an empty string instead" - required: true - responses: - "500": - description: The server can not handle your request. Check your connectivity - with the rest of the cluster. - "400": - description: Invalid syntax or requested change - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/KeyInfo' - description: The key has been added - summary: Create a new API key - tags: - - Key - /key?id={access_key}: - delete: - description: "Delete a key from the cluster. Its access will be removed from\ - \ all the buckets. Buckets are not automatically deleted and can be dangling.\ - \ You should manually delete them before. \n" - operationId: DeleteKey - parameters: - - description: The exact API access key generated by Garage - example: GK31c2f218a2e44f485b94239e - explode: false - in: path - name: access_key - required: true - schema: - type: string - style: simple - responses: - "500": - description: The server can not handle your request. Check your connectivity - with the rest of the cluster. - "200": - description: The key has been deleted - summary: Delete a key - tags: - - Key - get: - description: | - Return information about a specific key and return its information - operationId: GetKey - parameters: - - description: The exact API access key generated by Garage - example: GK31c2f218a2e44f485b94239e - explode: false - in: path - name: access_key - required: true - schema: - type: string - style: simple - responses: - "500": - description: The server can not handle your request. Check your connectivity - with the rest of the cluster. - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/KeyInfo' - description: | - Returns information about the key - summary: Get key information - tags: - - Key - post: - description: | - Updates information about the specified API access key. - operationId: UpdateKey - parameters: - - description: The exact API access key generated by Garage - example: GK31c2f218a2e44f485b94239e - explode: false - in: path - name: access_key - required: true - schema: - type: string - style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/UpdateKey_request' - description: | - For a given key, provide a first set with the permissions to grant, and a second set with the permissions to remove - required: true - responses: - "500": - description: The server can not handle your request. Check your connectivity - with the rest of the cluster. - "400": - description: Invalid syntax or requested change - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/KeyInfo' - description: | - Returns information about the key - summary: Update a key - tags: - - Key - /key?search={pattern}: - get: - description: | - Find the first key matching the given pattern based on its identifier aor friendly name and return its information. - operationId: SearchKey - parameters: - - description: A pattern (beginning or full string) corresponding to a key identifier - or friendly name - example: test-k - explode: false - in: path - name: pattern - required: true - schema: - type: string - style: simple - responses: - "500": - description: The server can not handle your request. Check your connectivity - with the rest of the cluster. - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/KeyInfo' - description: | - Returns information about the key - summary: Select key by pattern - tags: - - Key - /key/import: - post: - description: | - Imports an existing API key. This feature must only be used for migrations and backup restore. - - **Do not use it to generate custom key identifiers or you will break your Garage cluster.** - operationId: ImportKey - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ImportKey_request' - description: | - Information on the key to import - required: true - responses: - "500": - description: The server can not handle your request. Check your connectivity - with the rest of the cluster. - "400": - description: Invalid syntax or requested change - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/KeyInfo' - description: The key has been imported into the system - summary: Import an existing key - tags: - - Key - /bucket: - get: - description: | - List all the buckets on the cluster with their UUID and their global and local aliases. - operationId: ListBuckets - responses: - "500": - description: The server can not handle your request. Check your connectivity - with the rest of the cluster. - "200": - content: - application/json: - schema: - example: - - id: 70dc3bed7fe83a75e46b66e7ddef7d56e65f3c02f9f80b6749fb97eccb5e1033 - globalAliases: - - container_registry - - id: 96470e0df00ec28807138daf01915cfda2bee8eccc91dea9558c0b4855b5bf95 - localAliases: - - alias: my_documents - accessKeyid: GK31c2f218a2e44f485b94239e - - id: d7452a935e663fc1914f3a5515163a6d3724010ce8dfd9e4743ca8be5974f995 - globalAliases: - - example.com - - www.example.com - localAliases: - - alias: corp_website - accessKeyId: GKe10061ac9c2921f09e4c5540 - - alias: web - accessKeyid: GK31c2f218a2e44f485b94239e - - id: "" - items: - $ref: '#/components/schemas/ListBuckets_200_response_inner' - type: array - description: | - Returns the UUID of the bucket and all its aliases - summary: List all buckets - tags: - - Bucket - post: - description: | - Creates a new bucket, either with a global alias, a local one, or no alias at all. - Technically, you can also specify both `globalAlias` and `localAlias` and that would create two aliases. - operationId: CreateBucket - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CreateBucket_request' - description: | - Aliases to put on the new bucket - required: true - responses: - "500": - description: The server can not handle your request. Check your connectivity - with the rest of the cluster. - "400": - description: The payload is not formatted correctly - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/BucketInfo' - description: Returns exhaustive information about the bucket - summary: Create a bucket - tags: - - Bucket - /bucket?id={bucket_id}: - delete: - description: | - Delete a bucket.Deletes a storage bucket. A bucket cannot be deleted if it is not empty. - - **Warning:** this will delete all aliases associated with the bucket! - operationId: DeleteBucket - parameters: - - description: "The exact bucket identifier, a 32 bytes hexadecimal string" - example: b4018dc61b27ccb5c64ec1b24f53454bbbd180697c758c4d47a22a8921864a87 - explode: false - in: path - name: bucket_id - required: true - schema: - type: string - style: simple - responses: - "500": - description: The server can not handle your request. Check your connectivity - with the rest of the cluster. - "400": - description: Bucket is not empty - "404": - description: Bucket not found - "204": - description: Bucket has been deleted - summary: Delete a bucket - tags: - - Bucket - get: - description: | - Given a bucket identifier, get its information. - It includes its aliases, its web configuration, keys that have some permissions - on it, some statistics (number of objects, size), number of dangling multipart uploads, - and its quotas (if any). - operationId: GetBucketInfo - parameters: - - description: "The exact bucket identifier, a 32 bytes hexadecimal string" - example: b4018dc61b27ccb5c64ec1b24f53454bbbd180697c758c4d47a22a8921864a87 - explode: false - in: path - name: bucket_id - required: true - schema: - type: string - style: simple - responses: - "500": - description: The server can not handle your request. Check your connectivity - with the rest of the cluster. - "404": - description: Bucket not found - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/BucketInfo' - description: Returns exhaustive information about the bucket - summary: Get a bucket - tags: - - Bucket - put: - description: | - All fields (`websiteAccess` and `quotas`) are optionnal. - If they are present, the corresponding modifications are applied to the bucket, otherwise nothing is changed. - - In `websiteAccess`: if `enabled` is `true`, `indexDocument` must be specified. - The field `errorDocument` is optional, if no error document is set a generic - error message is displayed when errors happen. Conversely, if `enabled` is - `false`, neither `indexDocument` nor `errorDocument` must be specified. - - In `quotas`: new values of `maxSize` and `maxObjects` must both be specified, or set to `null` - to remove the quotas. An absent value will be considered the same as a `null`. It is not possible - to change only one of the two quotas. - operationId: UpdateBucket - parameters: - - description: "The exact bucket identifier, a 32 bytes hexadecimal string" - example: b4018dc61b27ccb5c64ec1b24f53454bbbd180697c758c4d47a22a8921864a87 - explode: false - in: path - name: bucket_id - required: true - schema: - type: string - style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/UpdateBucket_request' - description: | - Requested changes on the bucket. Both root fields are optionals. - required: true - responses: - "500": - description: The server can not handle your request. Check your connectivity - with the rest of the cluster. - "400": - description: "Bad request, check your body." - "404": - description: Bucket not found - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/BucketInfo' - description: Returns exhaustive information about the bucket - summary: Update a bucket - tags: - - Bucket - /bucket?globalAlias={alias}: - get: - description: | - Find a bucket by its global alias - operationId: FindBucketInfo - parameters: - - description: The exact global alias of one of the existing buckets - example: my_documents - explode: false - in: path - name: alias - required: true - schema: - type: string - style: simple - responses: - "500": - description: The server can not handle your request. Check your connectivity - with the rest of the cluster. - "404": - description: Bucket not found - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/BucketInfo' - description: Returns exhaustive information about the bucket - summary: Find a bucket - tags: - - Bucket - /bucket/allow: - post: - description: | - ⚠️ **DISCLAIMER**: Garage's developers are aware that this endpoint has an unconventional semantic. Be extra careful when implementing it, its behavior is not obvious. - - Allows a key to do read/write/owner operations on a bucket. - - Flags in permissions which have the value true will be activated. Other flags will remain unchanged (ie. they will keep their internal value). - - For example, if you set read to true, the key will be allowed to read the bucket. - If you set it to false, the key will keeps its previous read permission. - If you want to disallow read for the key, check the DenyBucketKey operation. - operationId: AllowBucketKey - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AllowBucketKey_request' - description: | - Aliases to put on the new bucket - required: true - responses: - "500": - description: The server can not handle your request. Check your connectivity - with the rest of the cluster. - "400": - description: "Bad request, check your request body" - "404": - description: Bucket not found - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/BucketInfo' - description: Returns exhaustive information about the bucket - summary: Allow key - tags: - - Bucket - /bucket/deny: - post: - description: | - ⚠️ **DISCLAIMER**: Garage's developers are aware that this endpoint has an unconventional semantic. Be extra careful when implementing it, its behavior is not obvious. - - Denies a key from doing read/write/owner operations on a bucket. - - Flags in permissions which have the value true will be deactivated. Other flags will remain unchanged. - - For example, if you set read to true, the key will be denied from reading. - If you set read to false, the key will keep its previous permissions. - If you want the key to have the reading permission, check the AllowBucketKey operation. - operationId: DenyBucketKey - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AllowBucketKey_request' - description: | - Aliases to put on the new bucket - required: true - responses: - "500": - description: The server can not handle your request. Check your connectivity - with the rest of the cluster. - "400": - description: "Bad request, check your request body" - "404": - description: Bucket not found - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/BucketInfo' - description: Returns exhaustive information about the bucket - summary: Deny key - tags: - - Bucket - /bucket/alias/global: - delete: - description: | - Delete a global alias from the target bucket - operationId: DeleteBucketGlobalAlias - parameters: - - example: e6a14cd6a27f48684579ec6b381c078ab11697e6bc8513b72b2f5307e25fff9b - explode: true - in: query - name: id - required: true - schema: - type: string - style: form - - example: my_documents - explode: true - in: query - name: alias - required: true - schema: - type: string - style: form - responses: - "500": - description: The server can not handle your request. Check your connectivity - with the rest of the cluster. - "400": - description: "Bad request, check your request body" - "404": - description: Bucket not found - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/BucketInfo' - description: Returns exhaustive information about the bucket - summary: Delete a global alias - tags: - - Bucket - put: - description: | - Add a global alias to the target bucket - operationId: PutBucketGlobalAlias - parameters: - - example: e6a14cd6a27f48684579ec6b381c078ab11697e6bc8513b72b2f5307e25fff9b - explode: true - in: query - name: id - required: true - schema: - type: string - style: form - - example: my_documents - explode: true - in: query - name: alias - required: true - schema: - type: string - style: form - responses: - "500": - description: The server can not handle your request. Check your connectivity - with the rest of the cluster. - "400": - description: "Bad request, check your request body" - "404": - description: Bucket not found - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/BucketInfo' - description: Returns exhaustive information about the bucket - summary: Add a global alias - tags: - - Bucket - /bucket/alias/local: - delete: - description: | - Delete a local alias, bound to specified account, from the target bucket - operationId: DeleteBucketLocalAlias - parameters: - - example: e6a14cd6a27f48684579ec6b381c078ab11697e6bc8513b72b2f5307e25fff9b - explode: true - in: query - name: id - required: true - schema: - type: string - style: form - - example: GK31c2f218a2e44f485b94239e - explode: true - in: query - name: accessKeyId - required: true - schema: - type: string - style: form - - example: my_documents - explode: true - in: query - name: alias - required: true - schema: - type: string - style: form - responses: - "500": - description: The server can not handle your request. Check your connectivity - with the rest of the cluster. - "400": - description: "Bad request, check your request body" - "404": - description: Bucket not found - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/BucketInfo' - description: Returns exhaustive information about the bucket - summary: Delete a local alias - tags: - - Bucket - put: - description: | - Add a local alias, bound to specified account, to the target bucket - operationId: PutBucketLocalAlias - parameters: - - example: e6a14cd6a27f48684579ec6b381c078ab11697e6bc8513b72b2f5307e25fff9b - explode: true - in: query - name: id - required: true - schema: - type: string - style: form - - example: GK31c2f218a2e44f485b94239e - explode: true - in: query - name: accessKeyId - required: true - schema: - type: string - style: form - - example: my_documents - explode: true - in: query - name: alias - required: true - schema: - type: string - style: form - responses: - "500": - description: The server can not handle your request. Check your connectivity - with the rest of the cluster. - "400": - description: "Bad request, check your request body" - "404": - description: Bucket not found - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/BucketInfo' - description: Returns exhaustive information about the bucket - summary: Add a local alias - tags: - - Bucket -components: - schemas: - NodeNetworkInfo: - properties: - addr: - example: 10.0.0.11:3901 - type: string - is_up: - example: true - type: boolean - last_seen_secs_ago: - example: 9 - nullable: true - type: integer - hostname: - example: node1 - type: string - required: - - addr - - hostname - - is_up - - last_seen_secs_ago - type: object - NodeClusterInfo: - example: - zone: dc1 - capacity: 4 - tags: - - gateway - - fast - properties: - zone: - example: dc1 - type: string - capacity: - example: 4 - nullable: true - type: integer - tags: - description: | - User defined tags, put whatever makes sense for you, these tags are not interpreted by Garage - example: - - gateway - - fast - items: - type: string - type: array - required: - - capacity - - tags - - zone - type: object - ClusterLayout: - example: - roles: - ec79480e0ce52ae26fd00c9da684e4fa56658d9c64cdcecb094e936de0bfe71f: - zone: madrid - capacity: 3 - tags: - - fast - - amd64 - "4a6ae5a1d0d33bf895f5bb4f0a418b7dc94c47c0dd2eb108d1158f3c8f60b0ff": - zone: geneva - capacity: 7 - tags: - - arm64 - stagedRoleChanges: - e2ee7984ee65b260682086ec70026165903c86e601a4a5a501c1900afe28d84b: - zone: geneva - capacity: 4 - tags: - - gateway - version: 12 - properties: - version: - example: 12 - type: integer - roles: - additionalProperties: - $ref: '#/components/schemas/NodeClusterInfo' - example: - ec79480e0ce52ae26fd00c9da684e4fa56658d9c64cdcecb094e936de0bfe71f: - zone: madrid - capacity: 3 - tags: - - fast - - amd64 - "4a6ae5a1d0d33bf895f5bb4f0a418b7dc94c47c0dd2eb108d1158f3c8f60b0ff": - zone: geneva - capacity: 7 - tags: - - arm64 - type: object - stagedRoleChanges: - additionalProperties: - $ref: '#/components/schemas/NodeClusterInfo' - example: - e2ee7984ee65b260682086ec70026165903c86e601a4a5a501c1900afe28d84b: - zone: geneva - capacity: 4 - tags: - - gateway - type: object - required: - - roles - - stagedRoleChanges - - version - type: object - LayoutVersion: - example: - version: 13 - properties: - version: - example: 13 - type: integer - type: object - KeyInfo: - example: - accessKeyId: GK31c2f218a2e44f485b94239e - secretAccessKey: b892c0665f0ada8a4755dae98baa3b133590e11dae3bcc1f9d769d67f16c3835 - permissions: - createBucket: false - buckets: - - permissions: - owner: false - read: true - write: true - localAliases: - - GK31c2f218a2e44f485b94239e:localname - - GK31c2f218a2e44f485b94239e:localname - globalAliases: - - my-bucket - - my-bucket - id: 70dc3bed7fe83a75e46b66e7ddef7d56e65f3c02f9f80b6749fb97eccb5e1033 - - permissions: - owner: false - read: true - write: true - localAliases: - - GK31c2f218a2e44f485b94239e:localname - - GK31c2f218a2e44f485b94239e:localname - globalAliases: - - my-bucket - - my-bucket - id: 70dc3bed7fe83a75e46b66e7ddef7d56e65f3c02f9f80b6749fb97eccb5e1033 - name: test-key - properties: - name: - example: test-key - type: string - accessKeyId: - example: GK31c2f218a2e44f485b94239e - type: string - secretAccessKey: - example: b892c0665f0ada8a4755dae98baa3b133590e11dae3bcc1f9d769d67f16c3835 - type: string - permissions: - $ref: '#/components/schemas/KeyInfo_permissions' - buckets: - items: - $ref: '#/components/schemas/KeyInfo_buckets_inner' - type: array - type: object - BucketInfo: - example: - websiteConfig: - indexDocument: index.html - errorDocument: error/400.html - quotas: - maxSize: 0 - maxObjects: 6 - keys: - - accessKeyId: accessKeyId - bucketLocalAliases: - - my_documents - - my_documents - permissions: - owner: true - read: true - write: true - name: name - - accessKeyId: accessKeyId - bucketLocalAliases: - - my_documents - - my_documents - permissions: - owner: true - read: true - write: true - name: name - bytes: 13189855625 - objects: 14827 - globalAliases: - - my_documents - - my_documents - id: afa8f0a22b40b1247ccd0affb869b0af5cff980924a20e4b5e0720a44deb8d39 - websiteAccess: true - unfinishedUploads: 0 - properties: - id: - example: afa8f0a22b40b1247ccd0affb869b0af5cff980924a20e4b5e0720a44deb8d39 - type: string - globalAliases: - items: - example: my_documents - type: string - type: array - websiteAccess: - example: true - type: boolean - websiteConfig: - $ref: '#/components/schemas/BucketInfo_websiteConfig' - keys: - items: - $ref: '#/components/schemas/BucketKeyInfo' - type: array - objects: - example: 14827 - type: integer - bytes: - example: 13189855625 - type: integer - unfinishedUploads: - example: 0 - type: integer - quotas: - $ref: '#/components/schemas/BucketInfo_quotas' - type: object - BucketKeyInfo: - example: - accessKeyId: accessKeyId - bucketLocalAliases: - - my_documents - - my_documents - permissions: - owner: true - read: true - write: true - name: name - properties: - accessKeyId: - type: string - name: - type: string - permissions: - $ref: '#/components/schemas/CreateBucket_request_localAlias_allow' - bucketLocalAliases: - items: - example: my_documents - type: string - type: array - type: object - GetNodes_200_response: - example: - layout: - roles: - ec79480e0ce52ae26fd00c9da684e4fa56658d9c64cdcecb094e936de0bfe71f: - zone: madrid - capacity: 3 - tags: - - fast - - amd64 - "4a6ae5a1d0d33bf895f5bb4f0a418b7dc94c47c0dd2eb108d1158f3c8f60b0ff": - zone: geneva - capacity: 7 - tags: - - arm64 - stagedRoleChanges: - e2ee7984ee65b260682086ec70026165903c86e601a4a5a501c1900afe28d84b: - zone: geneva - capacity: 4 - tags: - - gateway - version: 12 - node: ec79480e0ce52ae26fd00c9da684e4fa56658d9c64cdcecb094e936de0bfe71f - knownNodes: - ec79480e0ce52ae26fd00c9da684e4fa56658d9c64cdcecb094e936de0bfe71f: - addr: 10.0.0.11:3901 - is_up: true - last_seen_secs_ago: 9 - hostname: orion - "4a6ae5a1d0d33bf895f5bb4f0a418b7dc94c47c0dd2eb108d1158f3c8f60b0ff": - addr: 10.0.0.12:3901 - is_up: true - last_seen_secs_ago: 13 - hostname: pegasus - e2ee7984ee65b260682086ec70026165903c86e601a4a5a501c1900afe28d84b: - addr: 10.0.0.13:3901 - is_up: true - last_seen_secs_ago: 2 - hostname: neptune - garageVersion: v0.7.3 - properties: - node: - example: ec79480e0ce52ae26fd00c9da684e4fa56658d9c64cdcecb094e936de0bfe71f - type: string - garageVersion: - example: v0.7.3 - type: string - knownNodes: - additionalProperties: - $ref: '#/components/schemas/NodeNetworkInfo' - example: - ec79480e0ce52ae26fd00c9da684e4fa56658d9c64cdcecb094e936de0bfe71f: - addr: 10.0.0.11:3901 - is_up: true - last_seen_secs_ago: 9 - hostname: orion - "4a6ae5a1d0d33bf895f5bb4f0a418b7dc94c47c0dd2eb108d1158f3c8f60b0ff": - addr: 10.0.0.12:3901 - is_up: true - last_seen_secs_ago: 13 - hostname: pegasus - e2ee7984ee65b260682086ec70026165903c86e601a4a5a501c1900afe28d84b: - addr: 10.0.0.13:3901 - is_up: true - last_seen_secs_ago: 2 - hostname: neptune - type: object - layout: - $ref: '#/components/schemas/ClusterLayout' - required: - - garageVersion - - knownNodes - - layout - - node - type: object - AddNode_200_response_inner: - properties: - success: - example: true - type: boolean - error: - nullable: true - type: string - example: null - type: object - ListKeys_200_response_inner: - properties: - id: - type: string - name: - type: string - required: - - id - type: object - AddKey_request: - properties: - name: - example: test-key - type: string - type: object - UpdateKey_request_allow: - properties: - createBucket: - example: true - type: boolean - type: object - example: null - UpdateKey_request_deny: - properties: - createBucket: - example: true - type: boolean - type: object - UpdateKey_request: - properties: - name: - example: test-key - type: string - allow: - $ref: '#/components/schemas/UpdateKey_request_allow' - deny: - $ref: '#/components/schemas/UpdateKey_request_deny' - type: object - ImportKey_request: - properties: - name: - example: test-key - type: string - accessKeyId: - example: GK31c2f218a2e44f485b94239e - type: string - secretAccessKey: - example: b892c0665f0ada8a4755dae98baa3b133590e11dae3bcc1f9d769d67f16c3835 - type: string - required: - - accessKeyId - - name - - secretAccessKey - type: object - ListBuckets_200_response_inner_localAliases_inner: - properties: - alias: - type: string - accessKeyId: - type: string - required: - - accessKeyId - - alias - type: object - ListBuckets_200_response_inner: - properties: - id: - type: string - globalAliases: - items: - type: string - type: array - localAliases: - items: - $ref: '#/components/schemas/ListBuckets_200_response_inner_localAliases_inner' - type: array - required: - - id - type: object - CreateBucket_request_localAlias_allow: - example: - owner: true - read: true - write: true - properties: - read: - example: true - type: boolean - write: - example: true - type: boolean - owner: - example: true - type: boolean - type: object - CreateBucket_request_localAlias: - properties: - accessKeyId: - type: string - alias: - type: string - allow: - $ref: '#/components/schemas/CreateBucket_request_localAlias_allow' - type: object - CreateBucket_request: - properties: - globalAlias: - example: my_documents - type: string - localAlias: - $ref: '#/components/schemas/CreateBucket_request_localAlias' - type: object - UpdateBucket_request_websiteAccess: - properties: - enabled: - example: true - type: boolean - indexDocument: - example: index.html - type: string - errorDocument: - example: error/400.html - type: string - type: object - UpdateBucket_request_quotas: - properties: - maxSize: - example: 19029801 - nullable: true - type: integer - maxObjects: - nullable: true - type: integer - example: null - type: object - UpdateBucket_request: - properties: - websiteAccess: - $ref: '#/components/schemas/UpdateBucket_request_websiteAccess' - quotas: - $ref: '#/components/schemas/UpdateBucket_request_quotas' - type: object - AllowBucketKey_request_permissions: - properties: - read: - example: true - type: boolean - write: - example: true - type: boolean - owner: - example: true - type: boolean - required: - - owner - - read - - write - type: object - AllowBucketKey_request: - properties: - bucketId: - example: e6a14cd6a27f48684579ec6b381c078ab11697e6bc8513b72b2f5307e25fff9b - type: string - accessKeyId: - example: GK31c2f218a2e44f485b94239e - type: string - permissions: - $ref: '#/components/schemas/AllowBucketKey_request_permissions' - required: - - accessKeyId - - bucketId - - permissions - type: object - KeyInfo_permissions: - example: - createBucket: false - properties: - createBucket: - example: false - type: boolean - type: object - KeyInfo_buckets_inner_permissions: - example: - owner: false - read: true - write: true - properties: - read: - example: true - type: boolean - write: - example: true - type: boolean - owner: - example: false - type: boolean - type: object - KeyInfo_buckets_inner: - example: - permissions: - owner: false - read: true - write: true - localAliases: - - GK31c2f218a2e44f485b94239e:localname - - GK31c2f218a2e44f485b94239e:localname - globalAliases: - - my-bucket - - my-bucket - id: 70dc3bed7fe83a75e46b66e7ddef7d56e65f3c02f9f80b6749fb97eccb5e1033 - properties: - id: - example: 70dc3bed7fe83a75e46b66e7ddef7d56e65f3c02f9f80b6749fb97eccb5e1033 - type: string - globalAliases: - items: - example: my-bucket - type: string - type: array - localAliases: - items: - example: GK31c2f218a2e44f485b94239e:localname - type: string - type: array - permissions: - $ref: '#/components/schemas/KeyInfo_buckets_inner_permissions' - type: object - BucketInfo_websiteConfig: - example: - indexDocument: index.html - errorDocument: error/400.html - nullable: true - properties: - indexDocument: - example: index.html - type: string - errorDocument: - example: error/400.html - type: string - type: object - BucketInfo_quotas: - example: - maxSize: 0 - maxObjects: 6 - properties: - maxSize: - nullable: true - type: integer - example: null - maxObjects: - nullable: true - type: integer - example: null - type: object - securitySchemes: - bearerAuth: - scheme: bearer - type: http diff --git a/golang/api_bucket.go b/golang/api_bucket.go deleted file mode 100644 index 91ba87d..0000000 --- a/golang/api_bucket.go +++ /dev/null @@ -1,1409 +0,0 @@ -/* -Garage Administration API v0+garage-v0.8.0 - -Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - -API version: v0.8.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package garage - -import ( - "bytes" - "context" - "io/ioutil" - "net/http" - "net/url" - "strings" -) - - -// BucketApiService BucketApi service -type BucketApiService service - -type ApiAllowBucketKeyRequest struct { - ctx context.Context - ApiService *BucketApiService - allowBucketKeyRequest *AllowBucketKeyRequest -} - -// Aliases to put on the new bucket -func (r ApiAllowBucketKeyRequest) AllowBucketKeyRequest(allowBucketKeyRequest AllowBucketKeyRequest) ApiAllowBucketKeyRequest { - r.allowBucketKeyRequest = &allowBucketKeyRequest - return r -} - -func (r ApiAllowBucketKeyRequest) Execute() (*BucketInfo, *http.Response, error) { - return r.ApiService.AllowBucketKeyExecute(r) -} - -/* -AllowBucketKey Allow key - -⚠️ **DISCLAIMER**: Garage's developers are aware that this endpoint has an unconventional semantic. Be extra careful when implementing it, its behavior is not obvious. - -Allows a key to do read/write/owner operations on a bucket. - -Flags in permissions which have the value true will be activated. Other flags will remain unchanged (ie. they will keep their internal value). - -For example, if you set read to true, the key will be allowed to read the bucket. -If you set it to false, the key will keeps its previous read permission. -If you want to disallow read for the key, check the DenyBucketKey operation. - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAllowBucketKeyRequest -*/ -func (a *BucketApiService) AllowBucketKey(ctx context.Context) ApiAllowBucketKeyRequest { - return ApiAllowBucketKeyRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return BucketInfo -func (a *BucketApiService) AllowBucketKeyExecute(r ApiAllowBucketKeyRequest) (*BucketInfo, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *BucketInfo - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BucketApiService.AllowBucketKey") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/bucket/allow" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.allowBucketKeyRequest == nil { - return localVarReturnValue, nil, reportError("allowBucketKeyRequest is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.allowBucketKeyRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiCreateBucketRequest struct { - ctx context.Context - ApiService *BucketApiService - createBucketRequest *CreateBucketRequest -} - -// Aliases to put on the new bucket -func (r ApiCreateBucketRequest) CreateBucketRequest(createBucketRequest CreateBucketRequest) ApiCreateBucketRequest { - r.createBucketRequest = &createBucketRequest - return r -} - -func (r ApiCreateBucketRequest) Execute() (*BucketInfo, *http.Response, error) { - return r.ApiService.CreateBucketExecute(r) -} - -/* -CreateBucket Create a bucket - -Creates a new bucket, either with a global alias, a local one, or no alias at all. -Technically, you can also specify both `globalAlias` and `localAlias` and that would create two aliases. - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiCreateBucketRequest -*/ -func (a *BucketApiService) CreateBucket(ctx context.Context) ApiCreateBucketRequest { - return ApiCreateBucketRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return BucketInfo -func (a *BucketApiService) CreateBucketExecute(r ApiCreateBucketRequest) (*BucketInfo, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *BucketInfo - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BucketApiService.CreateBucket") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/bucket" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.createBucketRequest == nil { - return localVarReturnValue, nil, reportError("createBucketRequest is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.createBucketRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiDeleteBucketRequest struct { - ctx context.Context - ApiService *BucketApiService - bucketId string -} - -func (r ApiDeleteBucketRequest) Execute() (*http.Response, error) { - return r.ApiService.DeleteBucketExecute(r) -} - -/* -DeleteBucket Delete a bucket - -Delete a bucket.Deletes a storage bucket. A bucket cannot be deleted if it is not empty. - -**Warning:** this will delete all aliases associated with the bucket! - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param bucketId The exact bucket identifier, a 32 bytes hexadecimal string - @return ApiDeleteBucketRequest -*/ -func (a *BucketApiService) DeleteBucket(ctx context.Context, bucketId string) ApiDeleteBucketRequest { - return ApiDeleteBucketRequest{ - ApiService: a, - ctx: ctx, - bucketId: bucketId, - } -} - -// Execute executes the request -func (a *BucketApiService) DeleteBucketExecute(r ApiDeleteBucketRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BucketApiService.DeleteBucket") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/bucket?id={bucket_id}" - localVarPath = strings.Replace(localVarPath, "{"+"bucket_id"+"}", url.PathEscape(parameterToString(r.bucketId, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiDeleteBucketGlobalAliasRequest struct { - ctx context.Context - ApiService *BucketApiService - id *string - alias *string -} - -func (r ApiDeleteBucketGlobalAliasRequest) Id(id string) ApiDeleteBucketGlobalAliasRequest { - r.id = &id - return r -} - -func (r ApiDeleteBucketGlobalAliasRequest) Alias(alias string) ApiDeleteBucketGlobalAliasRequest { - r.alias = &alias - return r -} - -func (r ApiDeleteBucketGlobalAliasRequest) Execute() (*BucketInfo, *http.Response, error) { - return r.ApiService.DeleteBucketGlobalAliasExecute(r) -} - -/* -DeleteBucketGlobalAlias Delete a global alias - -Delete a global alias from the target bucket - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiDeleteBucketGlobalAliasRequest -*/ -func (a *BucketApiService) DeleteBucketGlobalAlias(ctx context.Context) ApiDeleteBucketGlobalAliasRequest { - return ApiDeleteBucketGlobalAliasRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return BucketInfo -func (a *BucketApiService) DeleteBucketGlobalAliasExecute(r ApiDeleteBucketGlobalAliasRequest) (*BucketInfo, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *BucketInfo - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BucketApiService.DeleteBucketGlobalAlias") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/bucket/alias/global" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.id == nil { - return localVarReturnValue, nil, reportError("id is required and must be specified") - } - if r.alias == nil { - return localVarReturnValue, nil, reportError("alias is required and must be specified") - } - - localVarQueryParams.Add("id", parameterToString(*r.id, "")) - localVarQueryParams.Add("alias", parameterToString(*r.alias, "")) - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiDeleteBucketLocalAliasRequest struct { - ctx context.Context - ApiService *BucketApiService - id *string - accessKeyId *string - alias *string -} - -func (r ApiDeleteBucketLocalAliasRequest) Id(id string) ApiDeleteBucketLocalAliasRequest { - r.id = &id - return r -} - -func (r ApiDeleteBucketLocalAliasRequest) AccessKeyId(accessKeyId string) ApiDeleteBucketLocalAliasRequest { - r.accessKeyId = &accessKeyId - return r -} - -func (r ApiDeleteBucketLocalAliasRequest) Alias(alias string) ApiDeleteBucketLocalAliasRequest { - r.alias = &alias - return r -} - -func (r ApiDeleteBucketLocalAliasRequest) Execute() (*BucketInfo, *http.Response, error) { - return r.ApiService.DeleteBucketLocalAliasExecute(r) -} - -/* -DeleteBucketLocalAlias Delete a local alias - -Delete a local alias, bound to specified account, from the target bucket - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiDeleteBucketLocalAliasRequest -*/ -func (a *BucketApiService) DeleteBucketLocalAlias(ctx context.Context) ApiDeleteBucketLocalAliasRequest { - return ApiDeleteBucketLocalAliasRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return BucketInfo -func (a *BucketApiService) DeleteBucketLocalAliasExecute(r ApiDeleteBucketLocalAliasRequest) (*BucketInfo, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *BucketInfo - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BucketApiService.DeleteBucketLocalAlias") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/bucket/alias/local" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.id == nil { - return localVarReturnValue, nil, reportError("id is required and must be specified") - } - if r.accessKeyId == nil { - return localVarReturnValue, nil, reportError("accessKeyId is required and must be specified") - } - if r.alias == nil { - return localVarReturnValue, nil, reportError("alias is required and must be specified") - } - - localVarQueryParams.Add("id", parameterToString(*r.id, "")) - localVarQueryParams.Add("accessKeyId", parameterToString(*r.accessKeyId, "")) - localVarQueryParams.Add("alias", parameterToString(*r.alias, "")) - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiDenyBucketKeyRequest struct { - ctx context.Context - ApiService *BucketApiService - allowBucketKeyRequest *AllowBucketKeyRequest -} - -// Aliases to put on the new bucket -func (r ApiDenyBucketKeyRequest) AllowBucketKeyRequest(allowBucketKeyRequest AllowBucketKeyRequest) ApiDenyBucketKeyRequest { - r.allowBucketKeyRequest = &allowBucketKeyRequest - return r -} - -func (r ApiDenyBucketKeyRequest) Execute() (*BucketInfo, *http.Response, error) { - return r.ApiService.DenyBucketKeyExecute(r) -} - -/* -DenyBucketKey Deny key - -⚠️ **DISCLAIMER**: Garage's developers are aware that this endpoint has an unconventional semantic. Be extra careful when implementing it, its behavior is not obvious. - -Denies a key from doing read/write/owner operations on a bucket. - -Flags in permissions which have the value true will be deactivated. Other flags will remain unchanged. - -For example, if you set read to true, the key will be denied from reading. -If you set read to false, the key will keep its previous permissions. -If you want the key to have the reading permission, check the AllowBucketKey operation. - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiDenyBucketKeyRequest -*/ -func (a *BucketApiService) DenyBucketKey(ctx context.Context) ApiDenyBucketKeyRequest { - return ApiDenyBucketKeyRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return BucketInfo -func (a *BucketApiService) DenyBucketKeyExecute(r ApiDenyBucketKeyRequest) (*BucketInfo, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *BucketInfo - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BucketApiService.DenyBucketKey") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/bucket/deny" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.allowBucketKeyRequest == nil { - return localVarReturnValue, nil, reportError("allowBucketKeyRequest is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.allowBucketKeyRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiFindBucketInfoRequest struct { - ctx context.Context - ApiService *BucketApiService - alias string -} - -func (r ApiFindBucketInfoRequest) Execute() (*BucketInfo, *http.Response, error) { - return r.ApiService.FindBucketInfoExecute(r) -} - -/* -FindBucketInfo Find a bucket - -Find a bucket by its global alias - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param alias The exact global alias of one of the existing buckets - @return ApiFindBucketInfoRequest -*/ -func (a *BucketApiService) FindBucketInfo(ctx context.Context, alias string) ApiFindBucketInfoRequest { - return ApiFindBucketInfoRequest{ - ApiService: a, - ctx: ctx, - alias: alias, - } -} - -// Execute executes the request -// @return BucketInfo -func (a *BucketApiService) FindBucketInfoExecute(r ApiFindBucketInfoRequest) (*BucketInfo, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *BucketInfo - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BucketApiService.FindBucketInfo") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/bucket?globalAlias={alias}" - localVarPath = strings.Replace(localVarPath, "{"+"alias"+"}", url.PathEscape(parameterToString(r.alias, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetBucketInfoRequest struct { - ctx context.Context - ApiService *BucketApiService - bucketId string -} - -func (r ApiGetBucketInfoRequest) Execute() (*BucketInfo, *http.Response, error) { - return r.ApiService.GetBucketInfoExecute(r) -} - -/* -GetBucketInfo Get a bucket - -Given a bucket identifier, get its information. -It includes its aliases, its web configuration, keys that have some permissions -on it, some statistics (number of objects, size), number of dangling multipart uploads, -and its quotas (if any). - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param bucketId The exact bucket identifier, a 32 bytes hexadecimal string - @return ApiGetBucketInfoRequest -*/ -func (a *BucketApiService) GetBucketInfo(ctx context.Context, bucketId string) ApiGetBucketInfoRequest { - return ApiGetBucketInfoRequest{ - ApiService: a, - ctx: ctx, - bucketId: bucketId, - } -} - -// Execute executes the request -// @return BucketInfo -func (a *BucketApiService) GetBucketInfoExecute(r ApiGetBucketInfoRequest) (*BucketInfo, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *BucketInfo - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BucketApiService.GetBucketInfo") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/bucket?id={bucket_id}" - localVarPath = strings.Replace(localVarPath, "{"+"bucket_id"+"}", url.PathEscape(parameterToString(r.bucketId, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiListBucketsRequest struct { - ctx context.Context - ApiService *BucketApiService -} - -func (r ApiListBucketsRequest) Execute() ([]ListBuckets200ResponseInner, *http.Response, error) { - return r.ApiService.ListBucketsExecute(r) -} - -/* -ListBuckets List all buckets - -List all the buckets on the cluster with their UUID and their global and local aliases. - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiListBucketsRequest -*/ -func (a *BucketApiService) ListBuckets(ctx context.Context) ApiListBucketsRequest { - return ApiListBucketsRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return []ListBuckets200ResponseInner -func (a *BucketApiService) ListBucketsExecute(r ApiListBucketsRequest) ([]ListBuckets200ResponseInner, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []ListBuckets200ResponseInner - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BucketApiService.ListBuckets") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/bucket" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiPutBucketGlobalAliasRequest struct { - ctx context.Context - ApiService *BucketApiService - id *string - alias *string -} - -func (r ApiPutBucketGlobalAliasRequest) Id(id string) ApiPutBucketGlobalAliasRequest { - r.id = &id - return r -} - -func (r ApiPutBucketGlobalAliasRequest) Alias(alias string) ApiPutBucketGlobalAliasRequest { - r.alias = &alias - return r -} - -func (r ApiPutBucketGlobalAliasRequest) Execute() (*BucketInfo, *http.Response, error) { - return r.ApiService.PutBucketGlobalAliasExecute(r) -} - -/* -PutBucketGlobalAlias Add a global alias - -Add a global alias to the target bucket - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiPutBucketGlobalAliasRequest -*/ -func (a *BucketApiService) PutBucketGlobalAlias(ctx context.Context) ApiPutBucketGlobalAliasRequest { - return ApiPutBucketGlobalAliasRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return BucketInfo -func (a *BucketApiService) PutBucketGlobalAliasExecute(r ApiPutBucketGlobalAliasRequest) (*BucketInfo, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *BucketInfo - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BucketApiService.PutBucketGlobalAlias") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/bucket/alias/global" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.id == nil { - return localVarReturnValue, nil, reportError("id is required and must be specified") - } - if r.alias == nil { - return localVarReturnValue, nil, reportError("alias is required and must be specified") - } - - localVarQueryParams.Add("id", parameterToString(*r.id, "")) - localVarQueryParams.Add("alias", parameterToString(*r.alias, "")) - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiPutBucketLocalAliasRequest struct { - ctx context.Context - ApiService *BucketApiService - id *string - accessKeyId *string - alias *string -} - -func (r ApiPutBucketLocalAliasRequest) Id(id string) ApiPutBucketLocalAliasRequest { - r.id = &id - return r -} - -func (r ApiPutBucketLocalAliasRequest) AccessKeyId(accessKeyId string) ApiPutBucketLocalAliasRequest { - r.accessKeyId = &accessKeyId - return r -} - -func (r ApiPutBucketLocalAliasRequest) Alias(alias string) ApiPutBucketLocalAliasRequest { - r.alias = &alias - return r -} - -func (r ApiPutBucketLocalAliasRequest) Execute() (*BucketInfo, *http.Response, error) { - return r.ApiService.PutBucketLocalAliasExecute(r) -} - -/* -PutBucketLocalAlias Add a local alias - -Add a local alias, bound to specified account, to the target bucket - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiPutBucketLocalAliasRequest -*/ -func (a *BucketApiService) PutBucketLocalAlias(ctx context.Context) ApiPutBucketLocalAliasRequest { - return ApiPutBucketLocalAliasRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return BucketInfo -func (a *BucketApiService) PutBucketLocalAliasExecute(r ApiPutBucketLocalAliasRequest) (*BucketInfo, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *BucketInfo - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BucketApiService.PutBucketLocalAlias") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/bucket/alias/local" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.id == nil { - return localVarReturnValue, nil, reportError("id is required and must be specified") - } - if r.accessKeyId == nil { - return localVarReturnValue, nil, reportError("accessKeyId is required and must be specified") - } - if r.alias == nil { - return localVarReturnValue, nil, reportError("alias is required and must be specified") - } - - localVarQueryParams.Add("id", parameterToString(*r.id, "")) - localVarQueryParams.Add("accessKeyId", parameterToString(*r.accessKeyId, "")) - localVarQueryParams.Add("alias", parameterToString(*r.alias, "")) - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiUpdateBucketRequest struct { - ctx context.Context - ApiService *BucketApiService - bucketId string - updateBucketRequest *UpdateBucketRequest -} - -// Requested changes on the bucket. Both root fields are optionals. -func (r ApiUpdateBucketRequest) UpdateBucketRequest(updateBucketRequest UpdateBucketRequest) ApiUpdateBucketRequest { - r.updateBucketRequest = &updateBucketRequest - return r -} - -func (r ApiUpdateBucketRequest) Execute() (*BucketInfo, *http.Response, error) { - return r.ApiService.UpdateBucketExecute(r) -} - -/* -UpdateBucket Update a bucket - -All fields (`websiteAccess` and `quotas`) are optionnal. -If they are present, the corresponding modifications are applied to the bucket, otherwise nothing is changed. - -In `websiteAccess`: if `enabled` is `true`, `indexDocument` must be specified. -The field `errorDocument` is optional, if no error document is set a generic -error message is displayed when errors happen. Conversely, if `enabled` is -`false`, neither `indexDocument` nor `errorDocument` must be specified. - -In `quotas`: new values of `maxSize` and `maxObjects` must both be specified, or set to `null` -to remove the quotas. An absent value will be considered the same as a `null`. It is not possible -to change only one of the two quotas. - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param bucketId The exact bucket identifier, a 32 bytes hexadecimal string - @return ApiUpdateBucketRequest -*/ -func (a *BucketApiService) UpdateBucket(ctx context.Context, bucketId string) ApiUpdateBucketRequest { - return ApiUpdateBucketRequest{ - ApiService: a, - ctx: ctx, - bucketId: bucketId, - } -} - -// Execute executes the request -// @return BucketInfo -func (a *BucketApiService) UpdateBucketExecute(r ApiUpdateBucketRequest) (*BucketInfo, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *BucketInfo - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BucketApiService.UpdateBucket") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/bucket?id={bucket_id}" - localVarPath = strings.Replace(localVarPath, "{"+"bucket_id"+"}", url.PathEscape(parameterToString(r.bucketId, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.updateBucketRequest == nil { - return localVarReturnValue, nil, reportError("updateBucketRequest is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.updateBucketRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} diff --git a/golang/api_key.go b/golang/api_key.go deleted file mode 100644 index 902eaf2..0000000 --- a/golang/api_key.go +++ /dev/null @@ -1,767 +0,0 @@ -/* -Garage Administration API v0+garage-v0.8.0 - -Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - -API version: v0.8.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package garage - -import ( - "bytes" - "context" - "io/ioutil" - "net/http" - "net/url" - "strings" -) - - -// KeyApiService KeyApi service -type KeyApiService service - -type ApiAddKeyRequest struct { - ctx context.Context - ApiService *KeyApiService - addKeyRequest *AddKeyRequest -} - -// \"You can set a friendly name for this key, send an empty string instead\" -func (r ApiAddKeyRequest) AddKeyRequest(addKeyRequest AddKeyRequest) ApiAddKeyRequest { - r.addKeyRequest = &addKeyRequest - return r -} - -func (r ApiAddKeyRequest) Execute() (*KeyInfo, *http.Response, error) { - return r.ApiService.AddKeyExecute(r) -} - -/* -AddKey Create a new API key - -Creates a new API access key. - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAddKeyRequest -*/ -func (a *KeyApiService) AddKey(ctx context.Context) ApiAddKeyRequest { - return ApiAddKeyRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return KeyInfo -func (a *KeyApiService) AddKeyExecute(r ApiAddKeyRequest) (*KeyInfo, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *KeyInfo - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "KeyApiService.AddKey") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/key" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.addKeyRequest == nil { - return localVarReturnValue, nil, reportError("addKeyRequest is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.addKeyRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiDeleteKeyRequest struct { - ctx context.Context - ApiService *KeyApiService - accessKey string -} - -func (r ApiDeleteKeyRequest) Execute() (*http.Response, error) { - return r.ApiService.DeleteKeyExecute(r) -} - -/* -DeleteKey Delete a key - -Delete a key from the cluster. Its access will be removed from all the buckets. Buckets are not automatically deleted and can be dangling. You should manually delete them before. - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param accessKey The exact API access key generated by Garage - @return ApiDeleteKeyRequest -*/ -func (a *KeyApiService) DeleteKey(ctx context.Context, accessKey string) ApiDeleteKeyRequest { - return ApiDeleteKeyRequest{ - ApiService: a, - ctx: ctx, - accessKey: accessKey, - } -} - -// Execute executes the request -func (a *KeyApiService) DeleteKeyExecute(r ApiDeleteKeyRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "KeyApiService.DeleteKey") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/key?id={access_key}" - localVarPath = strings.Replace(localVarPath, "{"+"access_key"+"}", url.PathEscape(parameterToString(r.accessKey, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiGetKeyRequest struct { - ctx context.Context - ApiService *KeyApiService - accessKey string -} - -func (r ApiGetKeyRequest) Execute() (*KeyInfo, *http.Response, error) { - return r.ApiService.GetKeyExecute(r) -} - -/* -GetKey Get key information - -Return information about a specific key and return its information - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param accessKey The exact API access key generated by Garage - @return ApiGetKeyRequest -*/ -func (a *KeyApiService) GetKey(ctx context.Context, accessKey string) ApiGetKeyRequest { - return ApiGetKeyRequest{ - ApiService: a, - ctx: ctx, - accessKey: accessKey, - } -} - -// Execute executes the request -// @return KeyInfo -func (a *KeyApiService) GetKeyExecute(r ApiGetKeyRequest) (*KeyInfo, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *KeyInfo - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "KeyApiService.GetKey") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/key?id={access_key}" - localVarPath = strings.Replace(localVarPath, "{"+"access_key"+"}", url.PathEscape(parameterToString(r.accessKey, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiImportKeyRequest struct { - ctx context.Context - ApiService *KeyApiService - importKeyRequest *ImportKeyRequest -} - -// Information on the key to import -func (r ApiImportKeyRequest) ImportKeyRequest(importKeyRequest ImportKeyRequest) ApiImportKeyRequest { - r.importKeyRequest = &importKeyRequest - return r -} - -func (r ApiImportKeyRequest) Execute() (*KeyInfo, *http.Response, error) { - return r.ApiService.ImportKeyExecute(r) -} - -/* -ImportKey Import an existing key - -Imports an existing API key. This feature must only be used for migrations and backup restore. - -**Do not use it to generate custom key identifiers or you will break your Garage cluster.** - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiImportKeyRequest -*/ -func (a *KeyApiService) ImportKey(ctx context.Context) ApiImportKeyRequest { - return ApiImportKeyRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return KeyInfo -func (a *KeyApiService) ImportKeyExecute(r ApiImportKeyRequest) (*KeyInfo, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *KeyInfo - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "KeyApiService.ImportKey") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/key/import" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.importKeyRequest == nil { - return localVarReturnValue, nil, reportError("importKeyRequest is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.importKeyRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiListKeysRequest struct { - ctx context.Context - ApiService *KeyApiService -} - -func (r ApiListKeysRequest) Execute() ([]ListKeys200ResponseInner, *http.Response, error) { - return r.ApiService.ListKeysExecute(r) -} - -/* -ListKeys List all keys - -Returns all API access keys in the cluster. - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiListKeysRequest -*/ -func (a *KeyApiService) ListKeys(ctx context.Context) ApiListKeysRequest { - return ApiListKeysRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return []ListKeys200ResponseInner -func (a *KeyApiService) ListKeysExecute(r ApiListKeysRequest) ([]ListKeys200ResponseInner, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []ListKeys200ResponseInner - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "KeyApiService.ListKeys") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/key" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiSearchKeyRequest struct { - ctx context.Context - ApiService *KeyApiService - pattern string -} - -func (r ApiSearchKeyRequest) Execute() (*KeyInfo, *http.Response, error) { - return r.ApiService.SearchKeyExecute(r) -} - -/* -SearchKey Select key by pattern - -Find the first key matching the given pattern based on its identifier aor friendly name and return its information. - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param pattern A pattern (beginning or full string) corresponding to a key identifier or friendly name - @return ApiSearchKeyRequest -*/ -func (a *KeyApiService) SearchKey(ctx context.Context, pattern string) ApiSearchKeyRequest { - return ApiSearchKeyRequest{ - ApiService: a, - ctx: ctx, - pattern: pattern, - } -} - -// Execute executes the request -// @return KeyInfo -func (a *KeyApiService) SearchKeyExecute(r ApiSearchKeyRequest) (*KeyInfo, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *KeyInfo - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "KeyApiService.SearchKey") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/key?search={pattern}" - localVarPath = strings.Replace(localVarPath, "{"+"pattern"+"}", url.PathEscape(parameterToString(r.pattern, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiUpdateKeyRequest struct { - ctx context.Context - ApiService *KeyApiService - accessKey string - updateKeyRequest *UpdateKeyRequest -} - -// For a given key, provide a first set with the permissions to grant, and a second set with the permissions to remove -func (r ApiUpdateKeyRequest) UpdateKeyRequest(updateKeyRequest UpdateKeyRequest) ApiUpdateKeyRequest { - r.updateKeyRequest = &updateKeyRequest - return r -} - -func (r ApiUpdateKeyRequest) Execute() (*KeyInfo, *http.Response, error) { - return r.ApiService.UpdateKeyExecute(r) -} - -/* -UpdateKey Update a key - -Updates information about the specified API access key. - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param accessKey The exact API access key generated by Garage - @return ApiUpdateKeyRequest -*/ -func (a *KeyApiService) UpdateKey(ctx context.Context, accessKey string) ApiUpdateKeyRequest { - return ApiUpdateKeyRequest{ - ApiService: a, - ctx: ctx, - accessKey: accessKey, - } -} - -// Execute executes the request -// @return KeyInfo -func (a *KeyApiService) UpdateKeyExecute(r ApiUpdateKeyRequest) (*KeyInfo, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *KeyInfo - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "KeyApiService.UpdateKey") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/key?id={access_key}" - localVarPath = strings.Replace(localVarPath, "{"+"access_key"+"}", url.PathEscape(parameterToString(r.accessKey, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.updateKeyRequest == nil { - return localVarReturnValue, nil, reportError("updateKeyRequest is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.updateKeyRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} diff --git a/golang/api_layout.go b/golang/api_layout.go deleted file mode 100644 index aa8d772..0000000 --- a/golang/api_layout.go +++ /dev/null @@ -1,431 +0,0 @@ -/* -Garage Administration API v0+garage-v0.8.0 - -Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - -API version: v0.8.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package garage - -import ( - "bytes" - "context" - "io/ioutil" - "net/http" - "net/url" -) - - -// LayoutApiService LayoutApi service -type LayoutApiService service - -type ApiAddLayoutRequest struct { - ctx context.Context - ApiService *LayoutApiService - requestBody *map[string]NodeClusterInfo -} - -// To add a new node to the layout or to change the configuration of an existing node, simply set the values you want. To remove a node, set it to `null` instead of passing a configuration object. Contrary to the CLI that may update only a subset of the fields capacity, zone and tags, when calling this API all of these values must be specified. -func (r ApiAddLayoutRequest) RequestBody(requestBody map[string]NodeClusterInfo) ApiAddLayoutRequest { - r.requestBody = &requestBody - return r -} - -func (r ApiAddLayoutRequest) Execute() (*http.Response, error) { - return r.ApiService.AddLayoutExecute(r) -} - -/* -AddLayout Send modifications to the cluster layout - -Send modifications to the cluster layout. These modifications will be included in the staged role changes, visible in subsequent calls of `GET /layout`. Once the set of staged changes is satisfactory, the user may call `POST /layout/apply` to apply the changed changes, or `POST /layout/revert` to clear all of the staged changes in the layout. -Note that setting the capacity to `null` will configure the node as a gateway. - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAddLayoutRequest -*/ -func (a *LayoutApiService) AddLayout(ctx context.Context) ApiAddLayoutRequest { - return ApiAddLayoutRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -func (a *LayoutApiService) AddLayoutExecute(r ApiAddLayoutRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LayoutApiService.AddLayout") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/layout" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.requestBody == nil { - return nil, reportError("requestBody is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.requestBody - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiApplyLayoutRequest struct { - ctx context.Context - ApiService *LayoutApiService - layoutVersion *LayoutVersion -} - -// Similarly to the CLI, the body must include the version of the new layout that will be created, which MUST be 1 + the value of the currently existing layout in the cluster. -func (r ApiApplyLayoutRequest) LayoutVersion(layoutVersion LayoutVersion) ApiApplyLayoutRequest { - r.layoutVersion = &layoutVersion - return r -} - -func (r ApiApplyLayoutRequest) Execute() (*http.Response, error) { - return r.ApiService.ApplyLayoutExecute(r) -} - -/* -ApplyLayout Apply staged layout - -Applies to the cluster the layout changes currently registered as staged layout changes. - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiApplyLayoutRequest -*/ -func (a *LayoutApiService) ApplyLayout(ctx context.Context) ApiApplyLayoutRequest { - return ApiApplyLayoutRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -func (a *LayoutApiService) ApplyLayoutExecute(r ApiApplyLayoutRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LayoutApiService.ApplyLayout") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/layout/apply" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.layoutVersion == nil { - return nil, reportError("layoutVersion is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.layoutVersion - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiGetLayoutRequest struct { - ctx context.Context - ApiService *LayoutApiService -} - -func (r ApiGetLayoutRequest) Execute() (*ClusterLayout, *http.Response, error) { - return r.ApiService.GetLayoutExecute(r) -} - -/* -GetLayout Details on the current and staged layout - -Returns the cluster's current layout, including: - - Currently configured cluster layout - - Staged changes to the cluster layout - -*The info returned by this endpoint is a subset of the info returned by `GET /status`.* - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetLayoutRequest -*/ -func (a *LayoutApiService) GetLayout(ctx context.Context) ApiGetLayoutRequest { - return ApiGetLayoutRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return ClusterLayout -func (a *LayoutApiService) GetLayoutExecute(r ApiGetLayoutRequest) (*ClusterLayout, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ClusterLayout - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LayoutApiService.GetLayout") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/layout" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiRevertLayoutRequest struct { - ctx context.Context - ApiService *LayoutApiService - layoutVersion *LayoutVersion -} - -// Reverting the staged changes is done by incrementing the version number and clearing the contents of the staged change list. Similarly to the CLI, the body must include the incremented version number, which MUST be 1 + the value of the currently existing layout in the cluster. -func (r ApiRevertLayoutRequest) LayoutVersion(layoutVersion LayoutVersion) ApiRevertLayoutRequest { - r.layoutVersion = &layoutVersion - return r -} - -func (r ApiRevertLayoutRequest) Execute() (*http.Response, error) { - return r.ApiService.RevertLayoutExecute(r) -} - -/* -RevertLayout Clear staged layout - -Clears all of the staged layout changes. - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiRevertLayoutRequest -*/ -func (a *LayoutApiService) RevertLayout(ctx context.Context) ApiRevertLayoutRequest { - return ApiRevertLayoutRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -func (a *LayoutApiService) RevertLayoutExecute(r ApiRevertLayoutRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LayoutApiService.RevertLayout") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/layout/revert" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.layoutVersion == nil { - return nil, reportError("layoutVersion is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.layoutVersion - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} diff --git a/golang/api_nodes.go b/golang/api_nodes.go deleted file mode 100644 index a534a62..0000000 --- a/golang/api_nodes.go +++ /dev/null @@ -1,238 +0,0 @@ -/* -Garage Administration API v0+garage-v0.8.0 - -Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - -API version: v0.8.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package garage - -import ( - "bytes" - "context" - "io/ioutil" - "net/http" - "net/url" -) - - -// NodesApiService NodesApi service -type NodesApiService service - -type ApiAddNodeRequest struct { - ctx context.Context - ApiService *NodesApiService - requestBody *[]string -} - -func (r ApiAddNodeRequest) RequestBody(requestBody []string) ApiAddNodeRequest { - r.requestBody = &requestBody - return r -} - -func (r ApiAddNodeRequest) Execute() ([]AddNode200ResponseInner, *http.Response, error) { - return r.ApiService.AddNodeExecute(r) -} - -/* -AddNode Connect target node to other Garage nodes - -Instructs this Garage node to connect to other Garage nodes at specified `@`. `node_id` is generated automatically on node start. - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAddNodeRequest -*/ -func (a *NodesApiService) AddNode(ctx context.Context) ApiAddNodeRequest { - return ApiAddNodeRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return []AddNode200ResponseInner -func (a *NodesApiService) AddNodeExecute(r ApiAddNodeRequest) ([]AddNode200ResponseInner, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []AddNode200ResponseInner - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "NodesApiService.AddNode") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/connect" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.requestBody == nil { - return localVarReturnValue, nil, reportError("requestBody is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.requestBody - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetNodesRequest struct { - ctx context.Context - ApiService *NodesApiService -} - -func (r ApiGetNodesRequest) Execute() (*GetNodes200Response, *http.Response, error) { - return r.ApiService.GetNodesExecute(r) -} - -/* -GetNodes Status of this node and other nodes in the cluster - -Returns the cluster's current status, including: - - ID of the node being queried and its version of the Garage daemon - - Live nodes - - Currently configured cluster layout - - Staged changes to the cluster layout - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetNodesRequest -*/ -func (a *NodesApiService) GetNodes(ctx context.Context) ApiGetNodesRequest { - return ApiGetNodesRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return GetNodes200Response -func (a *NodesApiService) GetNodesExecute(r ApiGetNodesRequest) (*GetNodes200Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GetNodes200Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "NodesApiService.GetNodes") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/status" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} diff --git a/golang/client.go b/golang/client.go deleted file mode 100644 index def2d91..0000000 --- a/golang/client.go +++ /dev/null @@ -1,572 +0,0 @@ -/* -Garage Administration API v0+garage-v0.8.0 - -Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - -API version: v0.8.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package garage - -import ( - "bytes" - "context" - "encoding/json" - "encoding/xml" - "errors" - "fmt" - "io" - "io/ioutil" - "log" - "mime/multipart" - "net/http" - "net/http/httputil" - "net/url" - "os" - "path/filepath" - "reflect" - "regexp" - "strconv" - "strings" - "time" - "unicode/utf8" - - "golang.org/x/oauth2" -) - -var ( - jsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:vnd\.[^;]+\+)?json)`) - xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`) -) - -// APIClient manages communication with the Garage Administration API v0+garage-v0.8.0 API vv0.8.0 -// In most cases there should be only one, shared, APIClient. -type APIClient struct { - cfg *Configuration - common service // Reuse a single struct instead of allocating one for each service on the heap. - - // API Services - - BucketApi *BucketApiService - - KeyApi *KeyApiService - - LayoutApi *LayoutApiService - - NodesApi *NodesApiService -} - -type service struct { - client *APIClient -} - -// NewAPIClient creates a new API client. Requires a userAgent string describing your application. -// optionally a custom http.Client to allow for advanced features such as caching. -func NewAPIClient(cfg *Configuration) *APIClient { - if cfg.HTTPClient == nil { - cfg.HTTPClient = http.DefaultClient - } - - c := &APIClient{} - c.cfg = cfg - c.common.client = c - - // API Services - c.BucketApi = (*BucketApiService)(&c.common) - c.KeyApi = (*KeyApiService)(&c.common) - c.LayoutApi = (*LayoutApiService)(&c.common) - c.NodesApi = (*NodesApiService)(&c.common) - - return c -} - -func atoi(in string) (int, error) { - return strconv.Atoi(in) -} - -// selectHeaderContentType select a content type from the available list. -func selectHeaderContentType(contentTypes []string) string { - if len(contentTypes) == 0 { - return "" - } - if contains(contentTypes, "application/json") { - return "application/json" - } - return contentTypes[0] // use the first content type specified in 'consumes' -} - -// selectHeaderAccept join all accept types and return -func selectHeaderAccept(accepts []string) string { - if len(accepts) == 0 { - return "" - } - - if contains(accepts, "application/json") { - return "application/json" - } - - return strings.Join(accepts, ",") -} - -// contains is a case insensitive match, finding needle in a haystack -func contains(haystack []string, needle string) bool { - for _, a := range haystack { - if strings.EqualFold(a, needle) { - return true - } - } - return false -} - -// Verify optional parameters are of the correct type. -func typeCheckParameter(obj interface{}, expected string, name string) error { - // Make sure there is an object. - if obj == nil { - return nil - } - - // Check the type is as expected. - if reflect.TypeOf(obj).String() != expected { - return fmt.Errorf("Expected %s to be of type %s but received %s.", name, expected, reflect.TypeOf(obj).String()) - } - return nil -} - -// parameterToString convert interface{} parameters to string, using a delimiter if format is provided. -func parameterToString(obj interface{}, collectionFormat string) string { - var delimiter string - - switch collectionFormat { - case "pipes": - delimiter = "|" - case "ssv": - delimiter = " " - case "tsv": - delimiter = "\t" - case "csv": - delimiter = "," - } - - if reflect.TypeOf(obj).Kind() == reflect.Slice { - return strings.Trim(strings.Replace(fmt.Sprint(obj), " ", delimiter, -1), "[]") - } else if t, ok := obj.(time.Time); ok { - return t.Format(time.RFC3339) - } - - return fmt.Sprintf("%v", obj) -} - -// helper for converting interface{} parameters to json strings -func parameterToJson(obj interface{}) (string, error) { - jsonBuf, err := json.Marshal(obj) - if err != nil { - return "", err - } - return string(jsonBuf), err -} - -// callAPI do the request. -func (c *APIClient) callAPI(request *http.Request) (*http.Response, error) { - if c.cfg.Debug { - dump, err := httputil.DumpRequestOut(request, true) - if err != nil { - return nil, err - } - log.Printf("\n%s\n", string(dump)) - } - - resp, err := c.cfg.HTTPClient.Do(request) - if err != nil { - return resp, err - } - - if c.cfg.Debug { - dump, err := httputil.DumpResponse(resp, true) - if err != nil { - return resp, err - } - log.Printf("\n%s\n", string(dump)) - } - return resp, err -} - -// Allow modification of underlying config for alternate implementations and testing -// Caution: modifying the configuration while live can cause data races and potentially unwanted behavior -func (c *APIClient) GetConfig() *Configuration { - return c.cfg -} - -type formFile struct { - fileBytes []byte - fileName string - formFileName string -} - -// prepareRequest build the request -func (c *APIClient) prepareRequest( - ctx context.Context, - path string, method string, - postBody interface{}, - headerParams map[string]string, - queryParams url.Values, - formParams url.Values, - formFiles []formFile) (localVarRequest *http.Request, err error) { - - var body *bytes.Buffer - - // Detect postBody type and post. - if postBody != nil { - contentType := headerParams["Content-Type"] - if contentType == "" { - contentType = detectContentType(postBody) - headerParams["Content-Type"] = contentType - } - - body, err = setBody(postBody, contentType) - if err != nil { - return nil, err - } - } - - // add form parameters and file if available. - if strings.HasPrefix(headerParams["Content-Type"], "multipart/form-data") && len(formParams) > 0 || (len(formFiles) > 0) { - if body != nil { - return nil, errors.New("Cannot specify postBody and multipart form at the same time.") - } - body = &bytes.Buffer{} - w := multipart.NewWriter(body) - - for k, v := range formParams { - for _, iv := range v { - if strings.HasPrefix(k, "@") { // file - err = addFile(w, k[1:], iv) - if err != nil { - return nil, err - } - } else { // form value - w.WriteField(k, iv) - } - } - } - for _, formFile := range formFiles { - if len(formFile.fileBytes) > 0 && formFile.fileName != "" { - w.Boundary() - part, err := w.CreateFormFile(formFile.formFileName, filepath.Base(formFile.fileName)) - if err != nil { - return nil, err - } - _, err = part.Write(formFile.fileBytes) - if err != nil { - return nil, err - } - } - } - - // Set the Boundary in the Content-Type - headerParams["Content-Type"] = w.FormDataContentType() - - // Set Content-Length - headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) - w.Close() - } - - if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 { - if body != nil { - return nil, errors.New("Cannot specify postBody and x-www-form-urlencoded form at the same time.") - } - body = &bytes.Buffer{} - body.WriteString(formParams.Encode()) - // Set Content-Length - headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) - } - - // Setup path and query parameters - url, err := url.Parse(path) - if err != nil { - return nil, err - } - - // Override request host, if applicable - if c.cfg.Host != "" { - url.Host = c.cfg.Host - } - - // Override request scheme, if applicable - if c.cfg.Scheme != "" { - url.Scheme = c.cfg.Scheme - } - - // Adding Query Param - query := url.Query() - for k, v := range queryParams { - for _, iv := range v { - query.Add(k, iv) - } - } - - // Encode the parameters. - url.RawQuery = query.Encode() - - // Generate a new request - if body != nil { - localVarRequest, err = http.NewRequest(method, url.String(), body) - } else { - localVarRequest, err = http.NewRequest(method, url.String(), nil) - } - if err != nil { - return nil, err - } - - // add header parameters, if any - if len(headerParams) > 0 { - headers := http.Header{} - for h, v := range headerParams { - headers[h] = []string{v} - } - localVarRequest.Header = headers - } - - // Add the user agent to the request. - localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent) - - if ctx != nil { - // add context to the request - localVarRequest = localVarRequest.WithContext(ctx) - - // Walk through any authentication. - - // OAuth2 authentication - if tok, ok := ctx.Value(ContextOAuth2).(oauth2.TokenSource); ok { - // We were able to grab an oauth2 token from the context - var latestToken *oauth2.Token - if latestToken, err = tok.Token(); err != nil { - return nil, err - } - - latestToken.SetAuthHeader(localVarRequest) - } - - // Basic HTTP Authentication - if auth, ok := ctx.Value(ContextBasicAuth).(BasicAuth); ok { - localVarRequest.SetBasicAuth(auth.UserName, auth.Password) - } - - // AccessToken Authentication - if auth, ok := ctx.Value(ContextAccessToken).(string); ok { - localVarRequest.Header.Add("Authorization", "Bearer "+auth) - } - - } - - for header, value := range c.cfg.DefaultHeader { - localVarRequest.Header.Add(header, value) - } - return localVarRequest, nil -} - -func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) { - if len(b) == 0 { - return nil - } - if s, ok := v.(*string); ok { - *s = string(b) - return nil - } - if f, ok := v.(**os.File); ok { - *f, err = ioutil.TempFile("", "HttpClientFile") - if err != nil { - return - } - _, err = (*f).Write(b) - if err != nil { - return - } - _, err = (*f).Seek(0, io.SeekStart) - return - } - if xmlCheck.MatchString(contentType) { - if err = xml.Unmarshal(b, v); err != nil { - return err - } - return nil - } - if jsonCheck.MatchString(contentType) { - if actualObj, ok := v.(interface{ GetActualInstance() interface{} }); ok { // oneOf, anyOf schemas - if unmarshalObj, ok := actualObj.(interface{ UnmarshalJSON([]byte) error }); ok { // make sure it has UnmarshalJSON defined - if err = unmarshalObj.UnmarshalJSON(b); err != nil { - return err - } - } else { - return errors.New("Unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined") - } - } else if err = json.Unmarshal(b, v); err != nil { // simple model - return err - } - return nil - } - return errors.New("undefined response type") -} - -// Add a file to the multipart request -func addFile(w *multipart.Writer, fieldName, path string) error { - file, err := os.Open(filepath.Clean(path)) - if err != nil { - return err - } - err = file.Close() - if err != nil { - return err - } - - part, err := w.CreateFormFile(fieldName, filepath.Base(path)) - if err != nil { - return err - } - _, err = io.Copy(part, file) - - return err -} - -// Prevent trying to import "fmt" -func reportError(format string, a ...interface{}) error { - return fmt.Errorf(format, a...) -} - -// A wrapper for strict JSON decoding -func newStrictDecoder(data []byte) *json.Decoder { - dec := json.NewDecoder(bytes.NewBuffer(data)) - dec.DisallowUnknownFields() - return dec -} - -// Set request body from an interface{} -func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) { - if bodyBuf == nil { - bodyBuf = &bytes.Buffer{} - } - - if reader, ok := body.(io.Reader); ok { - _, err = bodyBuf.ReadFrom(reader) - } else if fp, ok := body.(**os.File); ok { - _, err = bodyBuf.ReadFrom(*fp) - } else if b, ok := body.([]byte); ok { - _, err = bodyBuf.Write(b) - } else if s, ok := body.(string); ok { - _, err = bodyBuf.WriteString(s) - } else if s, ok := body.(*string); ok { - _, err = bodyBuf.WriteString(*s) - } else if jsonCheck.MatchString(contentType) { - err = json.NewEncoder(bodyBuf).Encode(body) - } else if xmlCheck.MatchString(contentType) { - err = xml.NewEncoder(bodyBuf).Encode(body) - } - - if err != nil { - return nil, err - } - - if bodyBuf.Len() == 0 { - err = fmt.Errorf("Invalid body type %s\n", contentType) - return nil, err - } - return bodyBuf, nil -} - -// detectContentType method is used to figure out `Request.Body` content type for request header -func detectContentType(body interface{}) string { - contentType := "text/plain; charset=utf-8" - kind := reflect.TypeOf(body).Kind() - - switch kind { - case reflect.Struct, reflect.Map, reflect.Ptr: - contentType = "application/json; charset=utf-8" - case reflect.String: - contentType = "text/plain; charset=utf-8" - default: - if b, ok := body.([]byte); ok { - contentType = http.DetectContentType(b) - } else if kind == reflect.Slice { - contentType = "application/json; charset=utf-8" - } - } - - return contentType -} - -// Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go -type cacheControl map[string]string - -func parseCacheControl(headers http.Header) cacheControl { - cc := cacheControl{} - ccHeader := headers.Get("Cache-Control") - for _, part := range strings.Split(ccHeader, ",") { - part = strings.Trim(part, " ") - if part == "" { - continue - } - if strings.ContainsRune(part, '=') { - keyval := strings.Split(part, "=") - cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",") - } else { - cc[part] = "" - } - } - return cc -} - -// CacheExpires helper function to determine remaining time before repeating a request. -func CacheExpires(r *http.Response) time.Time { - // Figure out when the cache expires. - var expires time.Time - now, err := time.Parse(time.RFC1123, r.Header.Get("date")) - if err != nil { - return time.Now() - } - respCacheControl := parseCacheControl(r.Header) - - if maxAge, ok := respCacheControl["max-age"]; ok { - lifetime, err := time.ParseDuration(maxAge + "s") - if err != nil { - expires = now - } else { - expires = now.Add(lifetime) - } - } else { - expiresHeader := r.Header.Get("Expires") - if expiresHeader != "" { - expires, err = time.Parse(time.RFC1123, expiresHeader) - if err != nil { - expires = now - } - } - } - return expires -} - -func strlen(s string) int { - return utf8.RuneCountInString(s) -} - -// GenericOpenAPIError Provides access to the body, error and model on returned errors. -type GenericOpenAPIError struct { - body []byte - error string - model interface{} -} - -// Error returns non-empty string if there was an error. -func (e GenericOpenAPIError) Error() string { - return e.error -} - -// Body returns the raw bytes of the response -func (e GenericOpenAPIError) Body() []byte { - return e.body -} - -// Model returns the unpacked model of the error -func (e GenericOpenAPIError) Model() interface{} { - return e.model -} diff --git a/golang/configuration.go b/golang/configuration.go deleted file mode 100644 index e800b86..0000000 --- a/golang/configuration.go +++ /dev/null @@ -1,230 +0,0 @@ -/* -Garage Administration API v0+garage-v0.8.0 - -Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - -API version: v0.8.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package garage - -import ( - "context" - "fmt" - "net/http" - "strings" -) - -// contextKeys are used to identify the type of value in the context. -// Since these are string, it is possible to get a short description of the -// context key for logging and debugging using key.String(). - -type contextKey string - -func (c contextKey) String() string { - return "auth " + string(c) -} - -var ( - // ContextOAuth2 takes an oauth2.TokenSource as authentication for the request. - ContextOAuth2 = contextKey("token") - - // ContextBasicAuth takes BasicAuth as authentication for the request. - ContextBasicAuth = contextKey("basic") - - // ContextAccessToken takes a string oauth2 access token as authentication for the request. - ContextAccessToken = contextKey("accesstoken") - - // ContextAPIKeys takes a string apikey as authentication for the request - ContextAPIKeys = contextKey("apiKeys") - - // ContextHttpSignatureAuth takes HttpSignatureAuth as authentication for the request. - ContextHttpSignatureAuth = contextKey("httpsignature") - - // ContextServerIndex uses a server configuration from the index. - ContextServerIndex = contextKey("serverIndex") - - // ContextOperationServerIndices uses a server configuration from the index mapping. - ContextOperationServerIndices = contextKey("serverOperationIndices") - - // ContextServerVariables overrides a server configuration variables. - ContextServerVariables = contextKey("serverVariables") - - // ContextOperationServerVariables overrides a server configuration variables using operation specific values. - ContextOperationServerVariables = contextKey("serverOperationVariables") -) - -// BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth -type BasicAuth struct { - UserName string `json:"userName,omitempty"` - Password string `json:"password,omitempty"` -} - -// APIKey provides API key based authentication to a request passed via context using ContextAPIKey -type APIKey struct { - Key string - Prefix string -} - -// ServerVariable stores the information about a server variable -type ServerVariable struct { - Description string - DefaultValue string - EnumValues []string -} - -// ServerConfiguration stores the information about a server -type ServerConfiguration struct { - URL string - Description string - Variables map[string]ServerVariable -} - -// ServerConfigurations stores multiple ServerConfiguration items -type ServerConfigurations []ServerConfiguration - -// Configuration stores the configuration of the API client -type Configuration struct { - Host string `json:"host,omitempty"` - Scheme string `json:"scheme,omitempty"` - DefaultHeader map[string]string `json:"defaultHeader,omitempty"` - UserAgent string `json:"userAgent,omitempty"` - Debug bool `json:"debug,omitempty"` - Servers ServerConfigurations - OperationServers map[string]ServerConfigurations - HTTPClient *http.Client -} - -// NewConfiguration returns a new Configuration object -func NewConfiguration() *Configuration { - cfg := &Configuration{ - DefaultHeader: make(map[string]string), - UserAgent: "OpenAPI-Generator/0.8.0/go", - Debug: false, - Servers: ServerConfigurations{ - { - URL: "http://localhost:3903/v0", - Description: "A local server", - }, - }, - OperationServers: map[string]ServerConfigurations{ - }, - } - return cfg -} - -// AddDefaultHeader adds a new HTTP header to the default header in the request -func (c *Configuration) AddDefaultHeader(key string, value string) { - c.DefaultHeader[key] = value -} - -// URL formats template on a index using given variables -func (sc ServerConfigurations) URL(index int, variables map[string]string) (string, error) { - if index < 0 || len(sc) <= index { - return "", fmt.Errorf("Index %v out of range %v", index, len(sc)-1) - } - server := sc[index] - url := server.URL - - // go through variables and replace placeholders - for name, variable := range server.Variables { - if value, ok := variables[name]; ok { - found := bool(len(variable.EnumValues) == 0) - for _, enumValue := range variable.EnumValues { - if value == enumValue { - found = true - } - } - if !found { - return "", fmt.Errorf("The variable %s in the server URL has invalid value %v. Must be %v", name, value, variable.EnumValues) - } - url = strings.Replace(url, "{"+name+"}", value, -1) - } else { - url = strings.Replace(url, "{"+name+"}", variable.DefaultValue, -1) - } - } - return url, nil -} - -// ServerURL returns URL based on server settings -func (c *Configuration) ServerURL(index int, variables map[string]string) (string, error) { - return c.Servers.URL(index, variables) -} - -func getServerIndex(ctx context.Context) (int, error) { - si := ctx.Value(ContextServerIndex) - if si != nil { - if index, ok := si.(int); ok { - return index, nil - } - return 0, reportError("Invalid type %T should be int", si) - } - return 0, nil -} - -func getServerOperationIndex(ctx context.Context, endpoint string) (int, error) { - osi := ctx.Value(ContextOperationServerIndices) - if osi != nil { - if operationIndices, ok := osi.(map[string]int); !ok { - return 0, reportError("Invalid type %T should be map[string]int", osi) - } else { - index, ok := operationIndices[endpoint] - if ok { - return index, nil - } - } - } - return getServerIndex(ctx) -} - -func getServerVariables(ctx context.Context) (map[string]string, error) { - sv := ctx.Value(ContextServerVariables) - if sv != nil { - if variables, ok := sv.(map[string]string); ok { - return variables, nil - } - return nil, reportError("ctx value of ContextServerVariables has invalid type %T should be map[string]string", sv) - } - return nil, nil -} - -func getServerOperationVariables(ctx context.Context, endpoint string) (map[string]string, error) { - osv := ctx.Value(ContextOperationServerVariables) - if osv != nil { - if operationVariables, ok := osv.(map[string]map[string]string); !ok { - return nil, reportError("ctx value of ContextOperationServerVariables has invalid type %T should be map[string]map[string]string", osv) - } else { - variables, ok := operationVariables[endpoint] - if ok { - return variables, nil - } - } - } - return getServerVariables(ctx) -} - -// ServerURLWithContext returns a new server URL given an endpoint -func (c *Configuration) ServerURLWithContext(ctx context.Context, endpoint string) (string, error) { - sc, ok := c.OperationServers[endpoint] - if !ok { - sc = c.Servers - } - - if ctx == nil { - return sc.URL(0, nil) - } - - index, err := getServerOperationIndex(ctx, endpoint) - if err != nil { - return "", err - } - - variables, err := getServerOperationVariables(ctx, endpoint) - if err != nil { - return "", err - } - - return sc.URL(index, variables) -} diff --git a/golang/docs/AddKeyRequest.md b/golang/docs/AddKeyRequest.md deleted file mode 100644 index f56099e..0000000 --- a/golang/docs/AddKeyRequest.md +++ /dev/null @@ -1,56 +0,0 @@ -# AddKeyRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | Pointer to **string** | | [optional] - -## Methods - -### NewAddKeyRequest - -`func NewAddKeyRequest() *AddKeyRequest` - -NewAddKeyRequest instantiates a new AddKeyRequest object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewAddKeyRequestWithDefaults - -`func NewAddKeyRequestWithDefaults() *AddKeyRequest` - -NewAddKeyRequestWithDefaults instantiates a new AddKeyRequest object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetName - -`func (o *AddKeyRequest) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *AddKeyRequest) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *AddKeyRequest) SetName(v string)` - -SetName sets Name field to given value. - -### HasName - -`func (o *AddKeyRequest) HasName() bool` - -HasName returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/golang/docs/AddNode200ResponseInner.md b/golang/docs/AddNode200ResponseInner.md deleted file mode 100644 index 913a9c8..0000000 --- a/golang/docs/AddNode200ResponseInner.md +++ /dev/null @@ -1,92 +0,0 @@ -# AddNode200ResponseInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Success** | Pointer to **bool** | | [optional] -**Error** | Pointer to **NullableString** | | [optional] - -## Methods - -### NewAddNode200ResponseInner - -`func NewAddNode200ResponseInner() *AddNode200ResponseInner` - -NewAddNode200ResponseInner instantiates a new AddNode200ResponseInner object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewAddNode200ResponseInnerWithDefaults - -`func NewAddNode200ResponseInnerWithDefaults() *AddNode200ResponseInner` - -NewAddNode200ResponseInnerWithDefaults instantiates a new AddNode200ResponseInner object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetSuccess - -`func (o *AddNode200ResponseInner) GetSuccess() bool` - -GetSuccess returns the Success field if non-nil, zero value otherwise. - -### GetSuccessOk - -`func (o *AddNode200ResponseInner) GetSuccessOk() (*bool, bool)` - -GetSuccessOk returns a tuple with the Success field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSuccess - -`func (o *AddNode200ResponseInner) SetSuccess(v bool)` - -SetSuccess sets Success field to given value. - -### HasSuccess - -`func (o *AddNode200ResponseInner) HasSuccess() bool` - -HasSuccess returns a boolean if a field has been set. - -### GetError - -`func (o *AddNode200ResponseInner) GetError() string` - -GetError returns the Error field if non-nil, zero value otherwise. - -### GetErrorOk - -`func (o *AddNode200ResponseInner) GetErrorOk() (*string, bool)` - -GetErrorOk returns a tuple with the Error field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetError - -`func (o *AddNode200ResponseInner) SetError(v string)` - -SetError sets Error field to given value. - -### HasError - -`func (o *AddNode200ResponseInner) HasError() bool` - -HasError returns a boolean if a field has been set. - -### SetErrorNil - -`func (o *AddNode200ResponseInner) SetErrorNil(b bool)` - - SetErrorNil sets the value for Error to be an explicit nil - -### UnsetError -`func (o *AddNode200ResponseInner) UnsetError()` - -UnsetError ensures that no value is present for Error, not even an explicit nil - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/golang/docs/AllowBucketKeyRequest.md b/golang/docs/AllowBucketKeyRequest.md deleted file mode 100644 index 1a57c66..0000000 --- a/golang/docs/AllowBucketKeyRequest.md +++ /dev/null @@ -1,93 +0,0 @@ -# AllowBucketKeyRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**BucketId** | **string** | | -**AccessKeyId** | **string** | | -**Permissions** | [**AllowBucketKeyRequestPermissions**](AllowBucketKeyRequestPermissions.md) | | - -## Methods - -### NewAllowBucketKeyRequest - -`func NewAllowBucketKeyRequest(bucketId string, accessKeyId string, permissions AllowBucketKeyRequestPermissions, ) *AllowBucketKeyRequest` - -NewAllowBucketKeyRequest instantiates a new AllowBucketKeyRequest object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewAllowBucketKeyRequestWithDefaults - -`func NewAllowBucketKeyRequestWithDefaults() *AllowBucketKeyRequest` - -NewAllowBucketKeyRequestWithDefaults instantiates a new AllowBucketKeyRequest object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetBucketId - -`func (o *AllowBucketKeyRequest) GetBucketId() string` - -GetBucketId returns the BucketId field if non-nil, zero value otherwise. - -### GetBucketIdOk - -`func (o *AllowBucketKeyRequest) GetBucketIdOk() (*string, bool)` - -GetBucketIdOk returns a tuple with the BucketId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetBucketId - -`func (o *AllowBucketKeyRequest) SetBucketId(v string)` - -SetBucketId sets BucketId field to given value. - - -### GetAccessKeyId - -`func (o *AllowBucketKeyRequest) GetAccessKeyId() string` - -GetAccessKeyId returns the AccessKeyId field if non-nil, zero value otherwise. - -### GetAccessKeyIdOk - -`func (o *AllowBucketKeyRequest) GetAccessKeyIdOk() (*string, bool)` - -GetAccessKeyIdOk returns a tuple with the AccessKeyId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAccessKeyId - -`func (o *AllowBucketKeyRequest) SetAccessKeyId(v string)` - -SetAccessKeyId sets AccessKeyId field to given value. - - -### GetPermissions - -`func (o *AllowBucketKeyRequest) GetPermissions() AllowBucketKeyRequestPermissions` - -GetPermissions returns the Permissions field if non-nil, zero value otherwise. - -### GetPermissionsOk - -`func (o *AllowBucketKeyRequest) GetPermissionsOk() (*AllowBucketKeyRequestPermissions, bool)` - -GetPermissionsOk returns a tuple with the Permissions field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPermissions - -`func (o *AllowBucketKeyRequest) SetPermissions(v AllowBucketKeyRequestPermissions)` - -SetPermissions sets Permissions field to given value. - - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/golang/docs/AllowBucketKeyRequestPermissions.md b/golang/docs/AllowBucketKeyRequestPermissions.md deleted file mode 100644 index 1539b04..0000000 --- a/golang/docs/AllowBucketKeyRequestPermissions.md +++ /dev/null @@ -1,93 +0,0 @@ -# AllowBucketKeyRequestPermissions - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Read** | **bool** | | -**Write** | **bool** | | -**Owner** | **bool** | | - -## Methods - -### NewAllowBucketKeyRequestPermissions - -`func NewAllowBucketKeyRequestPermissions(read bool, write bool, owner bool, ) *AllowBucketKeyRequestPermissions` - -NewAllowBucketKeyRequestPermissions instantiates a new AllowBucketKeyRequestPermissions object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewAllowBucketKeyRequestPermissionsWithDefaults - -`func NewAllowBucketKeyRequestPermissionsWithDefaults() *AllowBucketKeyRequestPermissions` - -NewAllowBucketKeyRequestPermissionsWithDefaults instantiates a new AllowBucketKeyRequestPermissions object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetRead - -`func (o *AllowBucketKeyRequestPermissions) GetRead() bool` - -GetRead returns the Read field if non-nil, zero value otherwise. - -### GetReadOk - -`func (o *AllowBucketKeyRequestPermissions) GetReadOk() (*bool, bool)` - -GetReadOk returns a tuple with the Read field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRead - -`func (o *AllowBucketKeyRequestPermissions) SetRead(v bool)` - -SetRead sets Read field to given value. - - -### GetWrite - -`func (o *AllowBucketKeyRequestPermissions) GetWrite() bool` - -GetWrite returns the Write field if non-nil, zero value otherwise. - -### GetWriteOk - -`func (o *AllowBucketKeyRequestPermissions) GetWriteOk() (*bool, bool)` - -GetWriteOk returns a tuple with the Write field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetWrite - -`func (o *AllowBucketKeyRequestPermissions) SetWrite(v bool)` - -SetWrite sets Write field to given value. - - -### GetOwner - -`func (o *AllowBucketKeyRequestPermissions) GetOwner() bool` - -GetOwner returns the Owner field if non-nil, zero value otherwise. - -### GetOwnerOk - -`func (o *AllowBucketKeyRequestPermissions) GetOwnerOk() (*bool, bool)` - -GetOwnerOk returns a tuple with the Owner field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetOwner - -`func (o *AllowBucketKeyRequestPermissions) SetOwner(v bool)` - -SetOwner sets Owner field to given value. - - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/golang/docs/BucketApi.md b/golang/docs/BucketApi.md deleted file mode 100644 index 37aabac..0000000 --- a/golang/docs/BucketApi.md +++ /dev/null @@ -1,835 +0,0 @@ -# \BucketApi - -All URIs are relative to *http://localhost:3903/v0* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**AllowBucketKey**](BucketApi.md#AllowBucketKey) | **Post** /bucket/allow | Allow key -[**CreateBucket**](BucketApi.md#CreateBucket) | **Post** /bucket | Create a bucket -[**DeleteBucket**](BucketApi.md#DeleteBucket) | **Delete** /bucket?id={bucket_id} | Delete a bucket -[**DeleteBucketGlobalAlias**](BucketApi.md#DeleteBucketGlobalAlias) | **Delete** /bucket/alias/global | Delete a global alias -[**DeleteBucketLocalAlias**](BucketApi.md#DeleteBucketLocalAlias) | **Delete** /bucket/alias/local | Delete a local alias -[**DenyBucketKey**](BucketApi.md#DenyBucketKey) | **Post** /bucket/deny | Deny key -[**FindBucketInfo**](BucketApi.md#FindBucketInfo) | **Get** /bucket?globalAlias={alias} | Find a bucket -[**GetBucketInfo**](BucketApi.md#GetBucketInfo) | **Get** /bucket?id={bucket_id} | Get a bucket -[**ListBuckets**](BucketApi.md#ListBuckets) | **Get** /bucket | List all buckets -[**PutBucketGlobalAlias**](BucketApi.md#PutBucketGlobalAlias) | **Put** /bucket/alias/global | Add a global alias -[**PutBucketLocalAlias**](BucketApi.md#PutBucketLocalAlias) | **Put** /bucket/alias/local | Add a local alias -[**UpdateBucket**](BucketApi.md#UpdateBucket) | **Put** /bucket?id={bucket_id} | Update a bucket - - - -## AllowBucketKey - -> BucketInfo AllowBucketKey(ctx).AllowBucketKeyRequest(allowBucketKeyRequest).Execute() - -Allow key - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - allowBucketKeyRequest := *openapiclient.NewAllowBucketKeyRequest("e6a14cd6a27f48684579ec6b381c078ab11697e6bc8513b72b2f5307e25fff9b", "GK31c2f218a2e44f485b94239e", *openapiclient.NewAllowBucketKeyRequestPermissions(true, true, true)) // AllowBucketKeyRequest | Aliases to put on the new bucket - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.BucketApi.AllowBucketKey(context.Background()).AllowBucketKeyRequest(allowBucketKeyRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `BucketApi.AllowBucketKey``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AllowBucketKey`: BucketInfo - fmt.Fprintf(os.Stdout, "Response from `BucketApi.AllowBucketKey`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiAllowBucketKeyRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **allowBucketKeyRequest** | [**AllowBucketKeyRequest**](AllowBucketKeyRequest.md) | Aliases to put on the new bucket | - -### Return type - -[**BucketInfo**](BucketInfo.md) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## CreateBucket - -> BucketInfo CreateBucket(ctx).CreateBucketRequest(createBucketRequest).Execute() - -Create a bucket - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - createBucketRequest := *openapiclient.NewCreateBucketRequest() // CreateBucketRequest | Aliases to put on the new bucket - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.BucketApi.CreateBucket(context.Background()).CreateBucketRequest(createBucketRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `BucketApi.CreateBucket``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `CreateBucket`: BucketInfo - fmt.Fprintf(os.Stdout, "Response from `BucketApi.CreateBucket`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiCreateBucketRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **createBucketRequest** | [**CreateBucketRequest**](CreateBucketRequest.md) | Aliases to put on the new bucket | - -### Return type - -[**BucketInfo**](BucketInfo.md) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## DeleteBucket - -> DeleteBucket(ctx, bucketId).Execute() - -Delete a bucket - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - bucketId := "b4018dc61b27ccb5c64ec1b24f53454bbbd180697c758c4d47a22a8921864a87" // string | The exact bucket identifier, a 32 bytes hexadecimal string - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.BucketApi.DeleteBucket(context.Background(), bucketId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `BucketApi.DeleteBucket``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**bucketId** | **string** | The exact bucket identifier, a 32 bytes hexadecimal string | - -### Other Parameters - -Other parameters are passed through a pointer to a apiDeleteBucketRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - - (empty response body) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## DeleteBucketGlobalAlias - -> BucketInfo DeleteBucketGlobalAlias(ctx).Id(id).Alias(alias).Execute() - -Delete a global alias - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - id := "e6a14cd6a27f48684579ec6b381c078ab11697e6bc8513b72b2f5307e25fff9b" // string | - alias := "my_documents" // string | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.BucketApi.DeleteBucketGlobalAlias(context.Background()).Id(id).Alias(alias).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `BucketApi.DeleteBucketGlobalAlias``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `DeleteBucketGlobalAlias`: BucketInfo - fmt.Fprintf(os.Stdout, "Response from `BucketApi.DeleteBucketGlobalAlias`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiDeleteBucketGlobalAliasRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **string** | | - **alias** | **string** | | - -### Return type - -[**BucketInfo**](BucketInfo.md) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## DeleteBucketLocalAlias - -> BucketInfo DeleteBucketLocalAlias(ctx).Id(id).AccessKeyId(accessKeyId).Alias(alias).Execute() - -Delete a local alias - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - id := "e6a14cd6a27f48684579ec6b381c078ab11697e6bc8513b72b2f5307e25fff9b" // string | - accessKeyId := "GK31c2f218a2e44f485b94239e" // string | - alias := "my_documents" // string | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.BucketApi.DeleteBucketLocalAlias(context.Background()).Id(id).AccessKeyId(accessKeyId).Alias(alias).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `BucketApi.DeleteBucketLocalAlias``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `DeleteBucketLocalAlias`: BucketInfo - fmt.Fprintf(os.Stdout, "Response from `BucketApi.DeleteBucketLocalAlias`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiDeleteBucketLocalAliasRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **string** | | - **accessKeyId** | **string** | | - **alias** | **string** | | - -### Return type - -[**BucketInfo**](BucketInfo.md) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## DenyBucketKey - -> BucketInfo DenyBucketKey(ctx).AllowBucketKeyRequest(allowBucketKeyRequest).Execute() - -Deny key - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - allowBucketKeyRequest := *openapiclient.NewAllowBucketKeyRequest("e6a14cd6a27f48684579ec6b381c078ab11697e6bc8513b72b2f5307e25fff9b", "GK31c2f218a2e44f485b94239e", *openapiclient.NewAllowBucketKeyRequestPermissions(true, true, true)) // AllowBucketKeyRequest | Aliases to put on the new bucket - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.BucketApi.DenyBucketKey(context.Background()).AllowBucketKeyRequest(allowBucketKeyRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `BucketApi.DenyBucketKey``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `DenyBucketKey`: BucketInfo - fmt.Fprintf(os.Stdout, "Response from `BucketApi.DenyBucketKey`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiDenyBucketKeyRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **allowBucketKeyRequest** | [**AllowBucketKeyRequest**](AllowBucketKeyRequest.md) | Aliases to put on the new bucket | - -### Return type - -[**BucketInfo**](BucketInfo.md) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## FindBucketInfo - -> BucketInfo FindBucketInfo(ctx, alias).Execute() - -Find a bucket - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - alias := "my_documents" // string | The exact global alias of one of the existing buckets - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.BucketApi.FindBucketInfo(context.Background(), alias).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `BucketApi.FindBucketInfo``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `FindBucketInfo`: BucketInfo - fmt.Fprintf(os.Stdout, "Response from `BucketApi.FindBucketInfo`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**alias** | **string** | The exact global alias of one of the existing buckets | - -### Other Parameters - -Other parameters are passed through a pointer to a apiFindBucketInfoRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[**BucketInfo**](BucketInfo.md) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetBucketInfo - -> BucketInfo GetBucketInfo(ctx, bucketId).Execute() - -Get a bucket - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - bucketId := "b4018dc61b27ccb5c64ec1b24f53454bbbd180697c758c4d47a22a8921864a87" // string | The exact bucket identifier, a 32 bytes hexadecimal string - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.BucketApi.GetBucketInfo(context.Background(), bucketId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `BucketApi.GetBucketInfo``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetBucketInfo`: BucketInfo - fmt.Fprintf(os.Stdout, "Response from `BucketApi.GetBucketInfo`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**bucketId** | **string** | The exact bucket identifier, a 32 bytes hexadecimal string | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetBucketInfoRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[**BucketInfo**](BucketInfo.md) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## ListBuckets - -> []ListBuckets200ResponseInner ListBuckets(ctx).Execute() - -List all buckets - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.BucketApi.ListBuckets(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `BucketApi.ListBuckets``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ListBuckets`: []ListBuckets200ResponseInner - fmt.Fprintf(os.Stdout, "Response from `BucketApi.ListBuckets`: %v\n", resp) -} -``` - -### Path Parameters - -This endpoint does not need any parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a apiListBucketsRequest struct via the builder pattern - - -### Return type - -[**[]ListBuckets200ResponseInner**](ListBuckets200ResponseInner.md) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## PutBucketGlobalAlias - -> BucketInfo PutBucketGlobalAlias(ctx).Id(id).Alias(alias).Execute() - -Add a global alias - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - id := "e6a14cd6a27f48684579ec6b381c078ab11697e6bc8513b72b2f5307e25fff9b" // string | - alias := "my_documents" // string | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.BucketApi.PutBucketGlobalAlias(context.Background()).Id(id).Alias(alias).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `BucketApi.PutBucketGlobalAlias``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `PutBucketGlobalAlias`: BucketInfo - fmt.Fprintf(os.Stdout, "Response from `BucketApi.PutBucketGlobalAlias`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiPutBucketGlobalAliasRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **string** | | - **alias** | **string** | | - -### Return type - -[**BucketInfo**](BucketInfo.md) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## PutBucketLocalAlias - -> BucketInfo PutBucketLocalAlias(ctx).Id(id).AccessKeyId(accessKeyId).Alias(alias).Execute() - -Add a local alias - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - id := "e6a14cd6a27f48684579ec6b381c078ab11697e6bc8513b72b2f5307e25fff9b" // string | - accessKeyId := "GK31c2f218a2e44f485b94239e" // string | - alias := "my_documents" // string | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.BucketApi.PutBucketLocalAlias(context.Background()).Id(id).AccessKeyId(accessKeyId).Alias(alias).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `BucketApi.PutBucketLocalAlias``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `PutBucketLocalAlias`: BucketInfo - fmt.Fprintf(os.Stdout, "Response from `BucketApi.PutBucketLocalAlias`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiPutBucketLocalAliasRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **string** | | - **accessKeyId** | **string** | | - **alias** | **string** | | - -### Return type - -[**BucketInfo**](BucketInfo.md) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## UpdateBucket - -> BucketInfo UpdateBucket(ctx, bucketId).UpdateBucketRequest(updateBucketRequest).Execute() - -Update a bucket - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - bucketId := "b4018dc61b27ccb5c64ec1b24f53454bbbd180697c758c4d47a22a8921864a87" // string | The exact bucket identifier, a 32 bytes hexadecimal string - updateBucketRequest := *openapiclient.NewUpdateBucketRequest() // UpdateBucketRequest | Requested changes on the bucket. Both root fields are optionals. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.BucketApi.UpdateBucket(context.Background(), bucketId).UpdateBucketRequest(updateBucketRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `BucketApi.UpdateBucket``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `UpdateBucket`: BucketInfo - fmt.Fprintf(os.Stdout, "Response from `BucketApi.UpdateBucket`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**bucketId** | **string** | The exact bucket identifier, a 32 bytes hexadecimal string | - -### Other Parameters - -Other parameters are passed through a pointer to a apiUpdateBucketRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **updateBucketRequest** | [**UpdateBucketRequest**](UpdateBucketRequest.md) | Requested changes on the bucket. Both root fields are optionals. | - -### Return type - -[**BucketInfo**](BucketInfo.md) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/golang/docs/BucketInfo.md b/golang/docs/BucketInfo.md deleted file mode 100644 index 4846745..0000000 --- a/golang/docs/BucketInfo.md +++ /dev/null @@ -1,274 +0,0 @@ -# BucketInfo - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | Pointer to **string** | | [optional] -**GlobalAliases** | Pointer to **[]string** | | [optional] -**WebsiteAccess** | Pointer to **bool** | | [optional] -**WebsiteConfig** | Pointer to [**NullableBucketInfoWebsiteConfig**](BucketInfoWebsiteConfig.md) | | [optional] -**Keys** | Pointer to [**[]BucketKeyInfo**](BucketKeyInfo.md) | | [optional] -**Objects** | Pointer to **int32** | | [optional] -**Bytes** | Pointer to **int32** | | [optional] -**UnfinishedUploads** | Pointer to **int32** | | [optional] -**Quotas** | Pointer to [**BucketInfoQuotas**](BucketInfoQuotas.md) | | [optional] - -## Methods - -### NewBucketInfo - -`func NewBucketInfo() *BucketInfo` - -NewBucketInfo instantiates a new BucketInfo object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewBucketInfoWithDefaults - -`func NewBucketInfoWithDefaults() *BucketInfo` - -NewBucketInfoWithDefaults instantiates a new BucketInfo object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetId - -`func (o *BucketInfo) GetId() string` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *BucketInfo) GetIdOk() (*string, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *BucketInfo) SetId(v string)` - -SetId sets Id field to given value. - -### HasId - -`func (o *BucketInfo) HasId() bool` - -HasId returns a boolean if a field has been set. - -### GetGlobalAliases - -`func (o *BucketInfo) GetGlobalAliases() []string` - -GetGlobalAliases returns the GlobalAliases field if non-nil, zero value otherwise. - -### GetGlobalAliasesOk - -`func (o *BucketInfo) GetGlobalAliasesOk() (*[]string, bool)` - -GetGlobalAliasesOk returns a tuple with the GlobalAliases field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetGlobalAliases - -`func (o *BucketInfo) SetGlobalAliases(v []string)` - -SetGlobalAliases sets GlobalAliases field to given value. - -### HasGlobalAliases - -`func (o *BucketInfo) HasGlobalAliases() bool` - -HasGlobalAliases returns a boolean if a field has been set. - -### GetWebsiteAccess - -`func (o *BucketInfo) GetWebsiteAccess() bool` - -GetWebsiteAccess returns the WebsiteAccess field if non-nil, zero value otherwise. - -### GetWebsiteAccessOk - -`func (o *BucketInfo) GetWebsiteAccessOk() (*bool, bool)` - -GetWebsiteAccessOk returns a tuple with the WebsiteAccess field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetWebsiteAccess - -`func (o *BucketInfo) SetWebsiteAccess(v bool)` - -SetWebsiteAccess sets WebsiteAccess field to given value. - -### HasWebsiteAccess - -`func (o *BucketInfo) HasWebsiteAccess() bool` - -HasWebsiteAccess returns a boolean if a field has been set. - -### GetWebsiteConfig - -`func (o *BucketInfo) GetWebsiteConfig() BucketInfoWebsiteConfig` - -GetWebsiteConfig returns the WebsiteConfig field if non-nil, zero value otherwise. - -### GetWebsiteConfigOk - -`func (o *BucketInfo) GetWebsiteConfigOk() (*BucketInfoWebsiteConfig, bool)` - -GetWebsiteConfigOk returns a tuple with the WebsiteConfig field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetWebsiteConfig - -`func (o *BucketInfo) SetWebsiteConfig(v BucketInfoWebsiteConfig)` - -SetWebsiteConfig sets WebsiteConfig field to given value. - -### HasWebsiteConfig - -`func (o *BucketInfo) HasWebsiteConfig() bool` - -HasWebsiteConfig returns a boolean if a field has been set. - -### SetWebsiteConfigNil - -`func (o *BucketInfo) SetWebsiteConfigNil(b bool)` - - SetWebsiteConfigNil sets the value for WebsiteConfig to be an explicit nil - -### UnsetWebsiteConfig -`func (o *BucketInfo) UnsetWebsiteConfig()` - -UnsetWebsiteConfig ensures that no value is present for WebsiteConfig, not even an explicit nil -### GetKeys - -`func (o *BucketInfo) GetKeys() []BucketKeyInfo` - -GetKeys returns the Keys field if non-nil, zero value otherwise. - -### GetKeysOk - -`func (o *BucketInfo) GetKeysOk() (*[]BucketKeyInfo, bool)` - -GetKeysOk returns a tuple with the Keys field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetKeys - -`func (o *BucketInfo) SetKeys(v []BucketKeyInfo)` - -SetKeys sets Keys field to given value. - -### HasKeys - -`func (o *BucketInfo) HasKeys() bool` - -HasKeys returns a boolean if a field has been set. - -### GetObjects - -`func (o *BucketInfo) GetObjects() int32` - -GetObjects returns the Objects field if non-nil, zero value otherwise. - -### GetObjectsOk - -`func (o *BucketInfo) GetObjectsOk() (*int32, bool)` - -GetObjectsOk returns a tuple with the Objects field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetObjects - -`func (o *BucketInfo) SetObjects(v int32)` - -SetObjects sets Objects field to given value. - -### HasObjects - -`func (o *BucketInfo) HasObjects() bool` - -HasObjects returns a boolean if a field has been set. - -### GetBytes - -`func (o *BucketInfo) GetBytes() int32` - -GetBytes returns the Bytes field if non-nil, zero value otherwise. - -### GetBytesOk - -`func (o *BucketInfo) GetBytesOk() (*int32, bool)` - -GetBytesOk returns a tuple with the Bytes field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetBytes - -`func (o *BucketInfo) SetBytes(v int32)` - -SetBytes sets Bytes field to given value. - -### HasBytes - -`func (o *BucketInfo) HasBytes() bool` - -HasBytes returns a boolean if a field has been set. - -### GetUnfinishedUploads - -`func (o *BucketInfo) GetUnfinishedUploads() int32` - -GetUnfinishedUploads returns the UnfinishedUploads field if non-nil, zero value otherwise. - -### GetUnfinishedUploadsOk - -`func (o *BucketInfo) GetUnfinishedUploadsOk() (*int32, bool)` - -GetUnfinishedUploadsOk returns a tuple with the UnfinishedUploads field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUnfinishedUploads - -`func (o *BucketInfo) SetUnfinishedUploads(v int32)` - -SetUnfinishedUploads sets UnfinishedUploads field to given value. - -### HasUnfinishedUploads - -`func (o *BucketInfo) HasUnfinishedUploads() bool` - -HasUnfinishedUploads returns a boolean if a field has been set. - -### GetQuotas - -`func (o *BucketInfo) GetQuotas() BucketInfoQuotas` - -GetQuotas returns the Quotas field if non-nil, zero value otherwise. - -### GetQuotasOk - -`func (o *BucketInfo) GetQuotasOk() (*BucketInfoQuotas, bool)` - -GetQuotasOk returns a tuple with the Quotas field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetQuotas - -`func (o *BucketInfo) SetQuotas(v BucketInfoQuotas)` - -SetQuotas sets Quotas field to given value. - -### HasQuotas - -`func (o *BucketInfo) HasQuotas() bool` - -HasQuotas returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/golang/docs/BucketInfoQuotas.md b/golang/docs/BucketInfoQuotas.md deleted file mode 100644 index 96a9942..0000000 --- a/golang/docs/BucketInfoQuotas.md +++ /dev/null @@ -1,102 +0,0 @@ -# BucketInfoQuotas - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**MaxSize** | Pointer to **NullableInt32** | | [optional] -**MaxObjects** | Pointer to **NullableInt32** | | [optional] - -## Methods - -### NewBucketInfoQuotas - -`func NewBucketInfoQuotas() *BucketInfoQuotas` - -NewBucketInfoQuotas instantiates a new BucketInfoQuotas object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewBucketInfoQuotasWithDefaults - -`func NewBucketInfoQuotasWithDefaults() *BucketInfoQuotas` - -NewBucketInfoQuotasWithDefaults instantiates a new BucketInfoQuotas object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetMaxSize - -`func (o *BucketInfoQuotas) GetMaxSize() int32` - -GetMaxSize returns the MaxSize field if non-nil, zero value otherwise. - -### GetMaxSizeOk - -`func (o *BucketInfoQuotas) GetMaxSizeOk() (*int32, bool)` - -GetMaxSizeOk returns a tuple with the MaxSize field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMaxSize - -`func (o *BucketInfoQuotas) SetMaxSize(v int32)` - -SetMaxSize sets MaxSize field to given value. - -### HasMaxSize - -`func (o *BucketInfoQuotas) HasMaxSize() bool` - -HasMaxSize returns a boolean if a field has been set. - -### SetMaxSizeNil - -`func (o *BucketInfoQuotas) SetMaxSizeNil(b bool)` - - SetMaxSizeNil sets the value for MaxSize to be an explicit nil - -### UnsetMaxSize -`func (o *BucketInfoQuotas) UnsetMaxSize()` - -UnsetMaxSize ensures that no value is present for MaxSize, not even an explicit nil -### GetMaxObjects - -`func (o *BucketInfoQuotas) GetMaxObjects() int32` - -GetMaxObjects returns the MaxObjects field if non-nil, zero value otherwise. - -### GetMaxObjectsOk - -`func (o *BucketInfoQuotas) GetMaxObjectsOk() (*int32, bool)` - -GetMaxObjectsOk returns a tuple with the MaxObjects field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMaxObjects - -`func (o *BucketInfoQuotas) SetMaxObjects(v int32)` - -SetMaxObjects sets MaxObjects field to given value. - -### HasMaxObjects - -`func (o *BucketInfoQuotas) HasMaxObjects() bool` - -HasMaxObjects returns a boolean if a field has been set. - -### SetMaxObjectsNil - -`func (o *BucketInfoQuotas) SetMaxObjectsNil(b bool)` - - SetMaxObjectsNil sets the value for MaxObjects to be an explicit nil - -### UnsetMaxObjects -`func (o *BucketInfoQuotas) UnsetMaxObjects()` - -UnsetMaxObjects ensures that no value is present for MaxObjects, not even an explicit nil - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/golang/docs/BucketInfoWebsiteConfig.md b/golang/docs/BucketInfoWebsiteConfig.md deleted file mode 100644 index 82010b5..0000000 --- a/golang/docs/BucketInfoWebsiteConfig.md +++ /dev/null @@ -1,82 +0,0 @@ -# BucketInfoWebsiteConfig - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**IndexDocument** | Pointer to **string** | | [optional] -**ErrorDocument** | Pointer to **string** | | [optional] - -## Methods - -### NewBucketInfoWebsiteConfig - -`func NewBucketInfoWebsiteConfig() *BucketInfoWebsiteConfig` - -NewBucketInfoWebsiteConfig instantiates a new BucketInfoWebsiteConfig object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewBucketInfoWebsiteConfigWithDefaults - -`func NewBucketInfoWebsiteConfigWithDefaults() *BucketInfoWebsiteConfig` - -NewBucketInfoWebsiteConfigWithDefaults instantiates a new BucketInfoWebsiteConfig object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetIndexDocument - -`func (o *BucketInfoWebsiteConfig) GetIndexDocument() string` - -GetIndexDocument returns the IndexDocument field if non-nil, zero value otherwise. - -### GetIndexDocumentOk - -`func (o *BucketInfoWebsiteConfig) GetIndexDocumentOk() (*string, bool)` - -GetIndexDocumentOk returns a tuple with the IndexDocument field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIndexDocument - -`func (o *BucketInfoWebsiteConfig) SetIndexDocument(v string)` - -SetIndexDocument sets IndexDocument field to given value. - -### HasIndexDocument - -`func (o *BucketInfoWebsiteConfig) HasIndexDocument() bool` - -HasIndexDocument returns a boolean if a field has been set. - -### GetErrorDocument - -`func (o *BucketInfoWebsiteConfig) GetErrorDocument() string` - -GetErrorDocument returns the ErrorDocument field if non-nil, zero value otherwise. - -### GetErrorDocumentOk - -`func (o *BucketInfoWebsiteConfig) GetErrorDocumentOk() (*string, bool)` - -GetErrorDocumentOk returns a tuple with the ErrorDocument field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetErrorDocument - -`func (o *BucketInfoWebsiteConfig) SetErrorDocument(v string)` - -SetErrorDocument sets ErrorDocument field to given value. - -### HasErrorDocument - -`func (o *BucketInfoWebsiteConfig) HasErrorDocument() bool` - -HasErrorDocument returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/golang/docs/BucketKeyInfo.md b/golang/docs/BucketKeyInfo.md deleted file mode 100644 index 76b6e1e..0000000 --- a/golang/docs/BucketKeyInfo.md +++ /dev/null @@ -1,134 +0,0 @@ -# BucketKeyInfo - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**AccessKeyId** | Pointer to **string** | | [optional] -**Name** | Pointer to **string** | | [optional] -**Permissions** | Pointer to [**CreateBucketRequestLocalAliasAllow**](CreateBucketRequestLocalAliasAllow.md) | | [optional] -**BucketLocalAliases** | Pointer to **[]string** | | [optional] - -## Methods - -### NewBucketKeyInfo - -`func NewBucketKeyInfo() *BucketKeyInfo` - -NewBucketKeyInfo instantiates a new BucketKeyInfo object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewBucketKeyInfoWithDefaults - -`func NewBucketKeyInfoWithDefaults() *BucketKeyInfo` - -NewBucketKeyInfoWithDefaults instantiates a new BucketKeyInfo object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetAccessKeyId - -`func (o *BucketKeyInfo) GetAccessKeyId() string` - -GetAccessKeyId returns the AccessKeyId field if non-nil, zero value otherwise. - -### GetAccessKeyIdOk - -`func (o *BucketKeyInfo) GetAccessKeyIdOk() (*string, bool)` - -GetAccessKeyIdOk returns a tuple with the AccessKeyId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAccessKeyId - -`func (o *BucketKeyInfo) SetAccessKeyId(v string)` - -SetAccessKeyId sets AccessKeyId field to given value. - -### HasAccessKeyId - -`func (o *BucketKeyInfo) HasAccessKeyId() bool` - -HasAccessKeyId returns a boolean if a field has been set. - -### GetName - -`func (o *BucketKeyInfo) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *BucketKeyInfo) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *BucketKeyInfo) SetName(v string)` - -SetName sets Name field to given value. - -### HasName - -`func (o *BucketKeyInfo) HasName() bool` - -HasName returns a boolean if a field has been set. - -### GetPermissions - -`func (o *BucketKeyInfo) GetPermissions() CreateBucketRequestLocalAliasAllow` - -GetPermissions returns the Permissions field if non-nil, zero value otherwise. - -### GetPermissionsOk - -`func (o *BucketKeyInfo) GetPermissionsOk() (*CreateBucketRequestLocalAliasAllow, bool)` - -GetPermissionsOk returns a tuple with the Permissions field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPermissions - -`func (o *BucketKeyInfo) SetPermissions(v CreateBucketRequestLocalAliasAllow)` - -SetPermissions sets Permissions field to given value. - -### HasPermissions - -`func (o *BucketKeyInfo) HasPermissions() bool` - -HasPermissions returns a boolean if a field has been set. - -### GetBucketLocalAliases - -`func (o *BucketKeyInfo) GetBucketLocalAliases() []string` - -GetBucketLocalAliases returns the BucketLocalAliases field if non-nil, zero value otherwise. - -### GetBucketLocalAliasesOk - -`func (o *BucketKeyInfo) GetBucketLocalAliasesOk() (*[]string, bool)` - -GetBucketLocalAliasesOk returns a tuple with the BucketLocalAliases field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetBucketLocalAliases - -`func (o *BucketKeyInfo) SetBucketLocalAliases(v []string)` - -SetBucketLocalAliases sets BucketLocalAliases field to given value. - -### HasBucketLocalAliases - -`func (o *BucketKeyInfo) HasBucketLocalAliases() bool` - -HasBucketLocalAliases returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/golang/docs/ClusterLayout.md b/golang/docs/ClusterLayout.md deleted file mode 100644 index 777d8fb..0000000 --- a/golang/docs/ClusterLayout.md +++ /dev/null @@ -1,93 +0,0 @@ -# ClusterLayout - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Version** | **int32** | | -**Roles** | [**map[string]NodeClusterInfo**](NodeClusterInfo.md) | | -**StagedRoleChanges** | [**map[string]NodeClusterInfo**](NodeClusterInfo.md) | | - -## Methods - -### NewClusterLayout - -`func NewClusterLayout(version int32, roles map[string]NodeClusterInfo, stagedRoleChanges map[string]NodeClusterInfo, ) *ClusterLayout` - -NewClusterLayout instantiates a new ClusterLayout object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewClusterLayoutWithDefaults - -`func NewClusterLayoutWithDefaults() *ClusterLayout` - -NewClusterLayoutWithDefaults instantiates a new ClusterLayout object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetVersion - -`func (o *ClusterLayout) GetVersion() int32` - -GetVersion returns the Version field if non-nil, zero value otherwise. - -### GetVersionOk - -`func (o *ClusterLayout) GetVersionOk() (*int32, bool)` - -GetVersionOk returns a tuple with the Version field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetVersion - -`func (o *ClusterLayout) SetVersion(v int32)` - -SetVersion sets Version field to given value. - - -### GetRoles - -`func (o *ClusterLayout) GetRoles() map[string]NodeClusterInfo` - -GetRoles returns the Roles field if non-nil, zero value otherwise. - -### GetRolesOk - -`func (o *ClusterLayout) GetRolesOk() (*map[string]NodeClusterInfo, bool)` - -GetRolesOk returns a tuple with the Roles field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRoles - -`func (o *ClusterLayout) SetRoles(v map[string]NodeClusterInfo)` - -SetRoles sets Roles field to given value. - - -### GetStagedRoleChanges - -`func (o *ClusterLayout) GetStagedRoleChanges() map[string]NodeClusterInfo` - -GetStagedRoleChanges returns the StagedRoleChanges field if non-nil, zero value otherwise. - -### GetStagedRoleChangesOk - -`func (o *ClusterLayout) GetStagedRoleChangesOk() (*map[string]NodeClusterInfo, bool)` - -GetStagedRoleChangesOk returns a tuple with the StagedRoleChanges field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetStagedRoleChanges - -`func (o *ClusterLayout) SetStagedRoleChanges(v map[string]NodeClusterInfo)` - -SetStagedRoleChanges sets StagedRoleChanges field to given value. - - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/golang/docs/CreateBucketRequest.md b/golang/docs/CreateBucketRequest.md deleted file mode 100644 index 5212752..0000000 --- a/golang/docs/CreateBucketRequest.md +++ /dev/null @@ -1,82 +0,0 @@ -# CreateBucketRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**GlobalAlias** | Pointer to **string** | | [optional] -**LocalAlias** | Pointer to [**CreateBucketRequestLocalAlias**](CreateBucketRequestLocalAlias.md) | | [optional] - -## Methods - -### NewCreateBucketRequest - -`func NewCreateBucketRequest() *CreateBucketRequest` - -NewCreateBucketRequest instantiates a new CreateBucketRequest object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewCreateBucketRequestWithDefaults - -`func NewCreateBucketRequestWithDefaults() *CreateBucketRequest` - -NewCreateBucketRequestWithDefaults instantiates a new CreateBucketRequest object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetGlobalAlias - -`func (o *CreateBucketRequest) GetGlobalAlias() string` - -GetGlobalAlias returns the GlobalAlias field if non-nil, zero value otherwise. - -### GetGlobalAliasOk - -`func (o *CreateBucketRequest) GetGlobalAliasOk() (*string, bool)` - -GetGlobalAliasOk returns a tuple with the GlobalAlias field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetGlobalAlias - -`func (o *CreateBucketRequest) SetGlobalAlias(v string)` - -SetGlobalAlias sets GlobalAlias field to given value. - -### HasGlobalAlias - -`func (o *CreateBucketRequest) HasGlobalAlias() bool` - -HasGlobalAlias returns a boolean if a field has been set. - -### GetLocalAlias - -`func (o *CreateBucketRequest) GetLocalAlias() CreateBucketRequestLocalAlias` - -GetLocalAlias returns the LocalAlias field if non-nil, zero value otherwise. - -### GetLocalAliasOk - -`func (o *CreateBucketRequest) GetLocalAliasOk() (*CreateBucketRequestLocalAlias, bool)` - -GetLocalAliasOk returns a tuple with the LocalAlias field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetLocalAlias - -`func (o *CreateBucketRequest) SetLocalAlias(v CreateBucketRequestLocalAlias)` - -SetLocalAlias sets LocalAlias field to given value. - -### HasLocalAlias - -`func (o *CreateBucketRequest) HasLocalAlias() bool` - -HasLocalAlias returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/golang/docs/CreateBucketRequestLocalAlias.md b/golang/docs/CreateBucketRequestLocalAlias.md deleted file mode 100644 index 8aee5bc..0000000 --- a/golang/docs/CreateBucketRequestLocalAlias.md +++ /dev/null @@ -1,108 +0,0 @@ -# CreateBucketRequestLocalAlias - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**AccessKeyId** | Pointer to **string** | | [optional] -**Alias** | Pointer to **string** | | [optional] -**Allow** | Pointer to [**CreateBucketRequestLocalAliasAllow**](CreateBucketRequestLocalAliasAllow.md) | | [optional] - -## Methods - -### NewCreateBucketRequestLocalAlias - -`func NewCreateBucketRequestLocalAlias() *CreateBucketRequestLocalAlias` - -NewCreateBucketRequestLocalAlias instantiates a new CreateBucketRequestLocalAlias object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewCreateBucketRequestLocalAliasWithDefaults - -`func NewCreateBucketRequestLocalAliasWithDefaults() *CreateBucketRequestLocalAlias` - -NewCreateBucketRequestLocalAliasWithDefaults instantiates a new CreateBucketRequestLocalAlias object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetAccessKeyId - -`func (o *CreateBucketRequestLocalAlias) GetAccessKeyId() string` - -GetAccessKeyId returns the AccessKeyId field if non-nil, zero value otherwise. - -### GetAccessKeyIdOk - -`func (o *CreateBucketRequestLocalAlias) GetAccessKeyIdOk() (*string, bool)` - -GetAccessKeyIdOk returns a tuple with the AccessKeyId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAccessKeyId - -`func (o *CreateBucketRequestLocalAlias) SetAccessKeyId(v string)` - -SetAccessKeyId sets AccessKeyId field to given value. - -### HasAccessKeyId - -`func (o *CreateBucketRequestLocalAlias) HasAccessKeyId() bool` - -HasAccessKeyId returns a boolean if a field has been set. - -### GetAlias - -`func (o *CreateBucketRequestLocalAlias) GetAlias() string` - -GetAlias returns the Alias field if non-nil, zero value otherwise. - -### GetAliasOk - -`func (o *CreateBucketRequestLocalAlias) GetAliasOk() (*string, bool)` - -GetAliasOk returns a tuple with the Alias field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAlias - -`func (o *CreateBucketRequestLocalAlias) SetAlias(v string)` - -SetAlias sets Alias field to given value. - -### HasAlias - -`func (o *CreateBucketRequestLocalAlias) HasAlias() bool` - -HasAlias returns a boolean if a field has been set. - -### GetAllow - -`func (o *CreateBucketRequestLocalAlias) GetAllow() CreateBucketRequestLocalAliasAllow` - -GetAllow returns the Allow field if non-nil, zero value otherwise. - -### GetAllowOk - -`func (o *CreateBucketRequestLocalAlias) GetAllowOk() (*CreateBucketRequestLocalAliasAllow, bool)` - -GetAllowOk returns a tuple with the Allow field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAllow - -`func (o *CreateBucketRequestLocalAlias) SetAllow(v CreateBucketRequestLocalAliasAllow)` - -SetAllow sets Allow field to given value. - -### HasAllow - -`func (o *CreateBucketRequestLocalAlias) HasAllow() bool` - -HasAllow returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/golang/docs/CreateBucketRequestLocalAliasAllow.md b/golang/docs/CreateBucketRequestLocalAliasAllow.md deleted file mode 100644 index 10b2d51..0000000 --- a/golang/docs/CreateBucketRequestLocalAliasAllow.md +++ /dev/null @@ -1,108 +0,0 @@ -# CreateBucketRequestLocalAliasAllow - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Read** | Pointer to **bool** | | [optional] -**Write** | Pointer to **bool** | | [optional] -**Owner** | Pointer to **bool** | | [optional] - -## Methods - -### NewCreateBucketRequestLocalAliasAllow - -`func NewCreateBucketRequestLocalAliasAllow() *CreateBucketRequestLocalAliasAllow` - -NewCreateBucketRequestLocalAliasAllow instantiates a new CreateBucketRequestLocalAliasAllow object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewCreateBucketRequestLocalAliasAllowWithDefaults - -`func NewCreateBucketRequestLocalAliasAllowWithDefaults() *CreateBucketRequestLocalAliasAllow` - -NewCreateBucketRequestLocalAliasAllowWithDefaults instantiates a new CreateBucketRequestLocalAliasAllow object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetRead - -`func (o *CreateBucketRequestLocalAliasAllow) GetRead() bool` - -GetRead returns the Read field if non-nil, zero value otherwise. - -### GetReadOk - -`func (o *CreateBucketRequestLocalAliasAllow) GetReadOk() (*bool, bool)` - -GetReadOk returns a tuple with the Read field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRead - -`func (o *CreateBucketRequestLocalAliasAllow) SetRead(v bool)` - -SetRead sets Read field to given value. - -### HasRead - -`func (o *CreateBucketRequestLocalAliasAllow) HasRead() bool` - -HasRead returns a boolean if a field has been set. - -### GetWrite - -`func (o *CreateBucketRequestLocalAliasAllow) GetWrite() bool` - -GetWrite returns the Write field if non-nil, zero value otherwise. - -### GetWriteOk - -`func (o *CreateBucketRequestLocalAliasAllow) GetWriteOk() (*bool, bool)` - -GetWriteOk returns a tuple with the Write field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetWrite - -`func (o *CreateBucketRequestLocalAliasAllow) SetWrite(v bool)` - -SetWrite sets Write field to given value. - -### HasWrite - -`func (o *CreateBucketRequestLocalAliasAllow) HasWrite() bool` - -HasWrite returns a boolean if a field has been set. - -### GetOwner - -`func (o *CreateBucketRequestLocalAliasAllow) GetOwner() bool` - -GetOwner returns the Owner field if non-nil, zero value otherwise. - -### GetOwnerOk - -`func (o *CreateBucketRequestLocalAliasAllow) GetOwnerOk() (*bool, bool)` - -GetOwnerOk returns a tuple with the Owner field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetOwner - -`func (o *CreateBucketRequestLocalAliasAllow) SetOwner(v bool)` - -SetOwner sets Owner field to given value. - -### HasOwner - -`func (o *CreateBucketRequestLocalAliasAllow) HasOwner() bool` - -HasOwner returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/golang/docs/GetNodes200Response.md b/golang/docs/GetNodes200Response.md deleted file mode 100644 index e389cc8..0000000 --- a/golang/docs/GetNodes200Response.md +++ /dev/null @@ -1,114 +0,0 @@ -# GetNodes200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Node** | **string** | | -**GarageVersion** | **string** | | -**KnownNodes** | [**map[string]NodeNetworkInfo**](NodeNetworkInfo.md) | | -**Layout** | [**ClusterLayout**](ClusterLayout.md) | | - -## Methods - -### NewGetNodes200Response - -`func NewGetNodes200Response(node string, garageVersion string, knownNodes map[string]NodeNetworkInfo, layout ClusterLayout, ) *GetNodes200Response` - -NewGetNodes200Response instantiates a new GetNodes200Response object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewGetNodes200ResponseWithDefaults - -`func NewGetNodes200ResponseWithDefaults() *GetNodes200Response` - -NewGetNodes200ResponseWithDefaults instantiates a new GetNodes200Response object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetNode - -`func (o *GetNodes200Response) GetNode() string` - -GetNode returns the Node field if non-nil, zero value otherwise. - -### GetNodeOk - -`func (o *GetNodes200Response) GetNodeOk() (*string, bool)` - -GetNodeOk returns a tuple with the Node field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetNode - -`func (o *GetNodes200Response) SetNode(v string)` - -SetNode sets Node field to given value. - - -### GetGarageVersion - -`func (o *GetNodes200Response) GetGarageVersion() string` - -GetGarageVersion returns the GarageVersion field if non-nil, zero value otherwise. - -### GetGarageVersionOk - -`func (o *GetNodes200Response) GetGarageVersionOk() (*string, bool)` - -GetGarageVersionOk returns a tuple with the GarageVersion field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetGarageVersion - -`func (o *GetNodes200Response) SetGarageVersion(v string)` - -SetGarageVersion sets GarageVersion field to given value. - - -### GetKnownNodes - -`func (o *GetNodes200Response) GetKnownNodes() map[string]NodeNetworkInfo` - -GetKnownNodes returns the KnownNodes field if non-nil, zero value otherwise. - -### GetKnownNodesOk - -`func (o *GetNodes200Response) GetKnownNodesOk() (*map[string]NodeNetworkInfo, bool)` - -GetKnownNodesOk returns a tuple with the KnownNodes field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetKnownNodes - -`func (o *GetNodes200Response) SetKnownNodes(v map[string]NodeNetworkInfo)` - -SetKnownNodes sets KnownNodes field to given value. - - -### GetLayout - -`func (o *GetNodes200Response) GetLayout() ClusterLayout` - -GetLayout returns the Layout field if non-nil, zero value otherwise. - -### GetLayoutOk - -`func (o *GetNodes200Response) GetLayoutOk() (*ClusterLayout, bool)` - -GetLayoutOk returns a tuple with the Layout field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetLayout - -`func (o *GetNodes200Response) SetLayout(v ClusterLayout)` - -SetLayout sets Layout field to given value. - - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/golang/docs/ImportKeyRequest.md b/golang/docs/ImportKeyRequest.md deleted file mode 100644 index fa051ee..0000000 --- a/golang/docs/ImportKeyRequest.md +++ /dev/null @@ -1,93 +0,0 @@ -# ImportKeyRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | | -**AccessKeyId** | **string** | | -**SecretAccessKey** | **string** | | - -## Methods - -### NewImportKeyRequest - -`func NewImportKeyRequest(name string, accessKeyId string, secretAccessKey string, ) *ImportKeyRequest` - -NewImportKeyRequest instantiates a new ImportKeyRequest object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewImportKeyRequestWithDefaults - -`func NewImportKeyRequestWithDefaults() *ImportKeyRequest` - -NewImportKeyRequestWithDefaults instantiates a new ImportKeyRequest object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetName - -`func (o *ImportKeyRequest) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *ImportKeyRequest) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *ImportKeyRequest) SetName(v string)` - -SetName sets Name field to given value. - - -### GetAccessKeyId - -`func (o *ImportKeyRequest) GetAccessKeyId() string` - -GetAccessKeyId returns the AccessKeyId field if non-nil, zero value otherwise. - -### GetAccessKeyIdOk - -`func (o *ImportKeyRequest) GetAccessKeyIdOk() (*string, bool)` - -GetAccessKeyIdOk returns a tuple with the AccessKeyId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAccessKeyId - -`func (o *ImportKeyRequest) SetAccessKeyId(v string)` - -SetAccessKeyId sets AccessKeyId field to given value. - - -### GetSecretAccessKey - -`func (o *ImportKeyRequest) GetSecretAccessKey() string` - -GetSecretAccessKey returns the SecretAccessKey field if non-nil, zero value otherwise. - -### GetSecretAccessKeyOk - -`func (o *ImportKeyRequest) GetSecretAccessKeyOk() (*string, bool)` - -GetSecretAccessKeyOk returns a tuple with the SecretAccessKey field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSecretAccessKey - -`func (o *ImportKeyRequest) SetSecretAccessKey(v string)` - -SetSecretAccessKey sets SecretAccessKey field to given value. - - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/golang/docs/KeyApi.md b/golang/docs/KeyApi.md deleted file mode 100644 index ea294df..0000000 --- a/golang/docs/KeyApi.md +++ /dev/null @@ -1,488 +0,0 @@ -# \KeyApi - -All URIs are relative to *http://localhost:3903/v0* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**AddKey**](KeyApi.md#AddKey) | **Post** /key | Create a new API key -[**DeleteKey**](KeyApi.md#DeleteKey) | **Delete** /key?id={access_key} | Delete a key -[**GetKey**](KeyApi.md#GetKey) | **Get** /key?id={access_key} | Get key information -[**ImportKey**](KeyApi.md#ImportKey) | **Post** /key/import | Import an existing key -[**ListKeys**](KeyApi.md#ListKeys) | **Get** /key | List all keys -[**SearchKey**](KeyApi.md#SearchKey) | **Get** /key?search={pattern} | Select key by pattern -[**UpdateKey**](KeyApi.md#UpdateKey) | **Post** /key?id={access_key} | Update a key - - - -## AddKey - -> KeyInfo AddKey(ctx).AddKeyRequest(addKeyRequest).Execute() - -Create a new API key - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - addKeyRequest := *openapiclient.NewAddKeyRequest() // AddKeyRequest | \"You can set a friendly name for this key, send an empty string instead\" - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.KeyApi.AddKey(context.Background()).AddKeyRequest(addKeyRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `KeyApi.AddKey``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AddKey`: KeyInfo - fmt.Fprintf(os.Stdout, "Response from `KeyApi.AddKey`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiAddKeyRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **addKeyRequest** | [**AddKeyRequest**](AddKeyRequest.md) | \"You can set a friendly name for this key, send an empty string instead\" | - -### Return type - -[**KeyInfo**](KeyInfo.md) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## DeleteKey - -> DeleteKey(ctx, accessKey).Execute() - -Delete a key - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - accessKey := "GK31c2f218a2e44f485b94239e" // string | The exact API access key generated by Garage - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.KeyApi.DeleteKey(context.Background(), accessKey).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `KeyApi.DeleteKey``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**accessKey** | **string** | The exact API access key generated by Garage | - -### Other Parameters - -Other parameters are passed through a pointer to a apiDeleteKeyRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - - (empty response body) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetKey - -> KeyInfo GetKey(ctx, accessKey).Execute() - -Get key information - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - accessKey := "GK31c2f218a2e44f485b94239e" // string | The exact API access key generated by Garage - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.KeyApi.GetKey(context.Background(), accessKey).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `KeyApi.GetKey``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetKey`: KeyInfo - fmt.Fprintf(os.Stdout, "Response from `KeyApi.GetKey`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**accessKey** | **string** | The exact API access key generated by Garage | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetKeyRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[**KeyInfo**](KeyInfo.md) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## ImportKey - -> KeyInfo ImportKey(ctx).ImportKeyRequest(importKeyRequest).Execute() - -Import an existing key - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - importKeyRequest := *openapiclient.NewImportKeyRequest("test-key", "GK31c2f218a2e44f485b94239e", "b892c0665f0ada8a4755dae98baa3b133590e11dae3bcc1f9d769d67f16c3835") // ImportKeyRequest | Information on the key to import - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.KeyApi.ImportKey(context.Background()).ImportKeyRequest(importKeyRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `KeyApi.ImportKey``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ImportKey`: KeyInfo - fmt.Fprintf(os.Stdout, "Response from `KeyApi.ImportKey`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiImportKeyRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **importKeyRequest** | [**ImportKeyRequest**](ImportKeyRequest.md) | Information on the key to import | - -### Return type - -[**KeyInfo**](KeyInfo.md) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## ListKeys - -> []ListKeys200ResponseInner ListKeys(ctx).Execute() - -List all keys - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.KeyApi.ListKeys(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `KeyApi.ListKeys``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ListKeys`: []ListKeys200ResponseInner - fmt.Fprintf(os.Stdout, "Response from `KeyApi.ListKeys`: %v\n", resp) -} -``` - -### Path Parameters - -This endpoint does not need any parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a apiListKeysRequest struct via the builder pattern - - -### Return type - -[**[]ListKeys200ResponseInner**](ListKeys200ResponseInner.md) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## SearchKey - -> KeyInfo SearchKey(ctx, pattern).Execute() - -Select key by pattern - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - pattern := "test-k" // string | A pattern (beginning or full string) corresponding to a key identifier or friendly name - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.KeyApi.SearchKey(context.Background(), pattern).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `KeyApi.SearchKey``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `SearchKey`: KeyInfo - fmt.Fprintf(os.Stdout, "Response from `KeyApi.SearchKey`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**pattern** | **string** | A pattern (beginning or full string) corresponding to a key identifier or friendly name | - -### Other Parameters - -Other parameters are passed through a pointer to a apiSearchKeyRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[**KeyInfo**](KeyInfo.md) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## UpdateKey - -> KeyInfo UpdateKey(ctx, accessKey).UpdateKeyRequest(updateKeyRequest).Execute() - -Update a key - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - accessKey := "GK31c2f218a2e44f485b94239e" // string | The exact API access key generated by Garage - updateKeyRequest := *openapiclient.NewUpdateKeyRequest() // UpdateKeyRequest | For a given key, provide a first set with the permissions to grant, and a second set with the permissions to remove - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.KeyApi.UpdateKey(context.Background(), accessKey).UpdateKeyRequest(updateKeyRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `KeyApi.UpdateKey``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `UpdateKey`: KeyInfo - fmt.Fprintf(os.Stdout, "Response from `KeyApi.UpdateKey`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**accessKey** | **string** | The exact API access key generated by Garage | - -### Other Parameters - -Other parameters are passed through a pointer to a apiUpdateKeyRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **updateKeyRequest** | [**UpdateKeyRequest**](UpdateKeyRequest.md) | For a given key, provide a first set with the permissions to grant, and a second set with the permissions to remove | - -### Return type - -[**KeyInfo**](KeyInfo.md) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/golang/docs/KeyInfo.md b/golang/docs/KeyInfo.md deleted file mode 100644 index b76a236..0000000 --- a/golang/docs/KeyInfo.md +++ /dev/null @@ -1,160 +0,0 @@ -# KeyInfo - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | Pointer to **string** | | [optional] -**AccessKeyId** | Pointer to **string** | | [optional] -**SecretAccessKey** | Pointer to **string** | | [optional] -**Permissions** | Pointer to [**KeyInfoPermissions**](KeyInfoPermissions.md) | | [optional] -**Buckets** | Pointer to [**[]KeyInfoBucketsInner**](KeyInfoBucketsInner.md) | | [optional] - -## Methods - -### NewKeyInfo - -`func NewKeyInfo() *KeyInfo` - -NewKeyInfo instantiates a new KeyInfo object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewKeyInfoWithDefaults - -`func NewKeyInfoWithDefaults() *KeyInfo` - -NewKeyInfoWithDefaults instantiates a new KeyInfo object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetName - -`func (o *KeyInfo) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *KeyInfo) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *KeyInfo) SetName(v string)` - -SetName sets Name field to given value. - -### HasName - -`func (o *KeyInfo) HasName() bool` - -HasName returns a boolean if a field has been set. - -### GetAccessKeyId - -`func (o *KeyInfo) GetAccessKeyId() string` - -GetAccessKeyId returns the AccessKeyId field if non-nil, zero value otherwise. - -### GetAccessKeyIdOk - -`func (o *KeyInfo) GetAccessKeyIdOk() (*string, bool)` - -GetAccessKeyIdOk returns a tuple with the AccessKeyId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAccessKeyId - -`func (o *KeyInfo) SetAccessKeyId(v string)` - -SetAccessKeyId sets AccessKeyId field to given value. - -### HasAccessKeyId - -`func (o *KeyInfo) HasAccessKeyId() bool` - -HasAccessKeyId returns a boolean if a field has been set. - -### GetSecretAccessKey - -`func (o *KeyInfo) GetSecretAccessKey() string` - -GetSecretAccessKey returns the SecretAccessKey field if non-nil, zero value otherwise. - -### GetSecretAccessKeyOk - -`func (o *KeyInfo) GetSecretAccessKeyOk() (*string, bool)` - -GetSecretAccessKeyOk returns a tuple with the SecretAccessKey field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSecretAccessKey - -`func (o *KeyInfo) SetSecretAccessKey(v string)` - -SetSecretAccessKey sets SecretAccessKey field to given value. - -### HasSecretAccessKey - -`func (o *KeyInfo) HasSecretAccessKey() bool` - -HasSecretAccessKey returns a boolean if a field has been set. - -### GetPermissions - -`func (o *KeyInfo) GetPermissions() KeyInfoPermissions` - -GetPermissions returns the Permissions field if non-nil, zero value otherwise. - -### GetPermissionsOk - -`func (o *KeyInfo) GetPermissionsOk() (*KeyInfoPermissions, bool)` - -GetPermissionsOk returns a tuple with the Permissions field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPermissions - -`func (o *KeyInfo) SetPermissions(v KeyInfoPermissions)` - -SetPermissions sets Permissions field to given value. - -### HasPermissions - -`func (o *KeyInfo) HasPermissions() bool` - -HasPermissions returns a boolean if a field has been set. - -### GetBuckets - -`func (o *KeyInfo) GetBuckets() []KeyInfoBucketsInner` - -GetBuckets returns the Buckets field if non-nil, zero value otherwise. - -### GetBucketsOk - -`func (o *KeyInfo) GetBucketsOk() (*[]KeyInfoBucketsInner, bool)` - -GetBucketsOk returns a tuple with the Buckets field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetBuckets - -`func (o *KeyInfo) SetBuckets(v []KeyInfoBucketsInner)` - -SetBuckets sets Buckets field to given value. - -### HasBuckets - -`func (o *KeyInfo) HasBuckets() bool` - -HasBuckets returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/golang/docs/KeyInfoBucketsInner.md b/golang/docs/KeyInfoBucketsInner.md deleted file mode 100644 index 32514e7..0000000 --- a/golang/docs/KeyInfoBucketsInner.md +++ /dev/null @@ -1,134 +0,0 @@ -# KeyInfoBucketsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | Pointer to **string** | | [optional] -**GlobalAliases** | Pointer to **[]string** | | [optional] -**LocalAliases** | Pointer to **[]string** | | [optional] -**Permissions** | Pointer to [**KeyInfoBucketsInnerPermissions**](KeyInfoBucketsInnerPermissions.md) | | [optional] - -## Methods - -### NewKeyInfoBucketsInner - -`func NewKeyInfoBucketsInner() *KeyInfoBucketsInner` - -NewKeyInfoBucketsInner instantiates a new KeyInfoBucketsInner object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewKeyInfoBucketsInnerWithDefaults - -`func NewKeyInfoBucketsInnerWithDefaults() *KeyInfoBucketsInner` - -NewKeyInfoBucketsInnerWithDefaults instantiates a new KeyInfoBucketsInner object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetId - -`func (o *KeyInfoBucketsInner) GetId() string` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *KeyInfoBucketsInner) GetIdOk() (*string, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *KeyInfoBucketsInner) SetId(v string)` - -SetId sets Id field to given value. - -### HasId - -`func (o *KeyInfoBucketsInner) HasId() bool` - -HasId returns a boolean if a field has been set. - -### GetGlobalAliases - -`func (o *KeyInfoBucketsInner) GetGlobalAliases() []string` - -GetGlobalAliases returns the GlobalAliases field if non-nil, zero value otherwise. - -### GetGlobalAliasesOk - -`func (o *KeyInfoBucketsInner) GetGlobalAliasesOk() (*[]string, bool)` - -GetGlobalAliasesOk returns a tuple with the GlobalAliases field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetGlobalAliases - -`func (o *KeyInfoBucketsInner) SetGlobalAliases(v []string)` - -SetGlobalAliases sets GlobalAliases field to given value. - -### HasGlobalAliases - -`func (o *KeyInfoBucketsInner) HasGlobalAliases() bool` - -HasGlobalAliases returns a boolean if a field has been set. - -### GetLocalAliases - -`func (o *KeyInfoBucketsInner) GetLocalAliases() []string` - -GetLocalAliases returns the LocalAliases field if non-nil, zero value otherwise. - -### GetLocalAliasesOk - -`func (o *KeyInfoBucketsInner) GetLocalAliasesOk() (*[]string, bool)` - -GetLocalAliasesOk returns a tuple with the LocalAliases field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetLocalAliases - -`func (o *KeyInfoBucketsInner) SetLocalAliases(v []string)` - -SetLocalAliases sets LocalAliases field to given value. - -### HasLocalAliases - -`func (o *KeyInfoBucketsInner) HasLocalAliases() bool` - -HasLocalAliases returns a boolean if a field has been set. - -### GetPermissions - -`func (o *KeyInfoBucketsInner) GetPermissions() KeyInfoBucketsInnerPermissions` - -GetPermissions returns the Permissions field if non-nil, zero value otherwise. - -### GetPermissionsOk - -`func (o *KeyInfoBucketsInner) GetPermissionsOk() (*KeyInfoBucketsInnerPermissions, bool)` - -GetPermissionsOk returns a tuple with the Permissions field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPermissions - -`func (o *KeyInfoBucketsInner) SetPermissions(v KeyInfoBucketsInnerPermissions)` - -SetPermissions sets Permissions field to given value. - -### HasPermissions - -`func (o *KeyInfoBucketsInner) HasPermissions() bool` - -HasPermissions returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/golang/docs/KeyInfoBucketsInnerPermissions.md b/golang/docs/KeyInfoBucketsInnerPermissions.md deleted file mode 100644 index 7c50f9e..0000000 --- a/golang/docs/KeyInfoBucketsInnerPermissions.md +++ /dev/null @@ -1,108 +0,0 @@ -# KeyInfoBucketsInnerPermissions - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Read** | Pointer to **bool** | | [optional] -**Write** | Pointer to **bool** | | [optional] -**Owner** | Pointer to **bool** | | [optional] - -## Methods - -### NewKeyInfoBucketsInnerPermissions - -`func NewKeyInfoBucketsInnerPermissions() *KeyInfoBucketsInnerPermissions` - -NewKeyInfoBucketsInnerPermissions instantiates a new KeyInfoBucketsInnerPermissions object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewKeyInfoBucketsInnerPermissionsWithDefaults - -`func NewKeyInfoBucketsInnerPermissionsWithDefaults() *KeyInfoBucketsInnerPermissions` - -NewKeyInfoBucketsInnerPermissionsWithDefaults instantiates a new KeyInfoBucketsInnerPermissions object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetRead - -`func (o *KeyInfoBucketsInnerPermissions) GetRead() bool` - -GetRead returns the Read field if non-nil, zero value otherwise. - -### GetReadOk - -`func (o *KeyInfoBucketsInnerPermissions) GetReadOk() (*bool, bool)` - -GetReadOk returns a tuple with the Read field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRead - -`func (o *KeyInfoBucketsInnerPermissions) SetRead(v bool)` - -SetRead sets Read field to given value. - -### HasRead - -`func (o *KeyInfoBucketsInnerPermissions) HasRead() bool` - -HasRead returns a boolean if a field has been set. - -### GetWrite - -`func (o *KeyInfoBucketsInnerPermissions) GetWrite() bool` - -GetWrite returns the Write field if non-nil, zero value otherwise. - -### GetWriteOk - -`func (o *KeyInfoBucketsInnerPermissions) GetWriteOk() (*bool, bool)` - -GetWriteOk returns a tuple with the Write field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetWrite - -`func (o *KeyInfoBucketsInnerPermissions) SetWrite(v bool)` - -SetWrite sets Write field to given value. - -### HasWrite - -`func (o *KeyInfoBucketsInnerPermissions) HasWrite() bool` - -HasWrite returns a boolean if a field has been set. - -### GetOwner - -`func (o *KeyInfoBucketsInnerPermissions) GetOwner() bool` - -GetOwner returns the Owner field if non-nil, zero value otherwise. - -### GetOwnerOk - -`func (o *KeyInfoBucketsInnerPermissions) GetOwnerOk() (*bool, bool)` - -GetOwnerOk returns a tuple with the Owner field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetOwner - -`func (o *KeyInfoBucketsInnerPermissions) SetOwner(v bool)` - -SetOwner sets Owner field to given value. - -### HasOwner - -`func (o *KeyInfoBucketsInnerPermissions) HasOwner() bool` - -HasOwner returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/golang/docs/KeyInfoPermissions.md b/golang/docs/KeyInfoPermissions.md deleted file mode 100644 index 1829aea..0000000 --- a/golang/docs/KeyInfoPermissions.md +++ /dev/null @@ -1,56 +0,0 @@ -# KeyInfoPermissions - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**CreateBucket** | Pointer to **bool** | | [optional] - -## Methods - -### NewKeyInfoPermissions - -`func NewKeyInfoPermissions() *KeyInfoPermissions` - -NewKeyInfoPermissions instantiates a new KeyInfoPermissions object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewKeyInfoPermissionsWithDefaults - -`func NewKeyInfoPermissionsWithDefaults() *KeyInfoPermissions` - -NewKeyInfoPermissionsWithDefaults instantiates a new KeyInfoPermissions object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetCreateBucket - -`func (o *KeyInfoPermissions) GetCreateBucket() bool` - -GetCreateBucket returns the CreateBucket field if non-nil, zero value otherwise. - -### GetCreateBucketOk - -`func (o *KeyInfoPermissions) GetCreateBucketOk() (*bool, bool)` - -GetCreateBucketOk returns a tuple with the CreateBucket field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCreateBucket - -`func (o *KeyInfoPermissions) SetCreateBucket(v bool)` - -SetCreateBucket sets CreateBucket field to given value. - -### HasCreateBucket - -`func (o *KeyInfoPermissions) HasCreateBucket() bool` - -HasCreateBucket returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/golang/docs/LayoutApi.md b/golang/docs/LayoutApi.md deleted file mode 100644 index 1ff16b5..0000000 --- a/golang/docs/LayoutApi.md +++ /dev/null @@ -1,265 +0,0 @@ -# \LayoutApi - -All URIs are relative to *http://localhost:3903/v0* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**AddLayout**](LayoutApi.md#AddLayout) | **Post** /layout | Send modifications to the cluster layout -[**ApplyLayout**](LayoutApi.md#ApplyLayout) | **Post** /layout/apply | Apply staged layout -[**GetLayout**](LayoutApi.md#GetLayout) | **Get** /layout | Details on the current and staged layout -[**RevertLayout**](LayoutApi.md#RevertLayout) | **Post** /layout/revert | Clear staged layout - - - -## AddLayout - -> AddLayout(ctx).RequestBody(requestBody).Execute() - -Send modifications to the cluster layout - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - requestBody := map[string]NodeClusterInfo{"key": *openapiclient.NewNodeClusterInfo("dc1", NullableInt32(4), []string{"Tags_example"})} // map[string]NodeClusterInfo | To add a new node to the layout or to change the configuration of an existing node, simply set the values you want. To remove a node, set it to `null` instead of passing a configuration object. Contrary to the CLI that may update only a subset of the fields capacity, zone and tags, when calling this API all of these values must be specified. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.LayoutApi.AddLayout(context.Background()).RequestBody(requestBody).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `LayoutApi.AddLayout``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiAddLayoutRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **requestBody** | [**map[string]NodeClusterInfo**](NodeClusterInfo.md) | To add a new node to the layout or to change the configuration of an existing node, simply set the values you want. To remove a node, set it to `null` instead of passing a configuration object. Contrary to the CLI that may update only a subset of the fields capacity, zone and tags, when calling this API all of these values must be specified. | - -### Return type - - (empty response body) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## ApplyLayout - -> ApplyLayout(ctx).LayoutVersion(layoutVersion).Execute() - -Apply staged layout - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - layoutVersion := *openapiclient.NewLayoutVersion() // LayoutVersion | Similarly to the CLI, the body must include the version of the new layout that will be created, which MUST be 1 + the value of the currently existing layout in the cluster. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.LayoutApi.ApplyLayout(context.Background()).LayoutVersion(layoutVersion).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `LayoutApi.ApplyLayout``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiApplyLayoutRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **layoutVersion** | [**LayoutVersion**](LayoutVersion.md) | Similarly to the CLI, the body must include the version of the new layout that will be created, which MUST be 1 + the value of the currently existing layout in the cluster. | - -### Return type - - (empty response body) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetLayout - -> ClusterLayout GetLayout(ctx).Execute() - -Details on the current and staged layout - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.LayoutApi.GetLayout(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `LayoutApi.GetLayout``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetLayout`: ClusterLayout - fmt.Fprintf(os.Stdout, "Response from `LayoutApi.GetLayout`: %v\n", resp) -} -``` - -### Path Parameters - -This endpoint does not need any parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetLayoutRequest struct via the builder pattern - - -### Return type - -[**ClusterLayout**](ClusterLayout.md) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## RevertLayout - -> RevertLayout(ctx).LayoutVersion(layoutVersion).Execute() - -Clear staged layout - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - layoutVersion := *openapiclient.NewLayoutVersion() // LayoutVersion | Reverting the staged changes is done by incrementing the version number and clearing the contents of the staged change list. Similarly to the CLI, the body must include the incremented version number, which MUST be 1 + the value of the currently existing layout in the cluster. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.LayoutApi.RevertLayout(context.Background()).LayoutVersion(layoutVersion).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `LayoutApi.RevertLayout``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiRevertLayoutRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **layoutVersion** | [**LayoutVersion**](LayoutVersion.md) | Reverting the staged changes is done by incrementing the version number and clearing the contents of the staged change list. Similarly to the CLI, the body must include the incremented version number, which MUST be 1 + the value of the currently existing layout in the cluster. | - -### Return type - - (empty response body) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/golang/docs/LayoutVersion.md b/golang/docs/LayoutVersion.md deleted file mode 100644 index 6175d85..0000000 --- a/golang/docs/LayoutVersion.md +++ /dev/null @@ -1,56 +0,0 @@ -# LayoutVersion - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Version** | Pointer to **int32** | | [optional] - -## Methods - -### NewLayoutVersion - -`func NewLayoutVersion() *LayoutVersion` - -NewLayoutVersion instantiates a new LayoutVersion object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewLayoutVersionWithDefaults - -`func NewLayoutVersionWithDefaults() *LayoutVersion` - -NewLayoutVersionWithDefaults instantiates a new LayoutVersion object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetVersion - -`func (o *LayoutVersion) GetVersion() int32` - -GetVersion returns the Version field if non-nil, zero value otherwise. - -### GetVersionOk - -`func (o *LayoutVersion) GetVersionOk() (*int32, bool)` - -GetVersionOk returns a tuple with the Version field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetVersion - -`func (o *LayoutVersion) SetVersion(v int32)` - -SetVersion sets Version field to given value. - -### HasVersion - -`func (o *LayoutVersion) HasVersion() bool` - -HasVersion returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/golang/docs/ListBuckets200ResponseInner.md b/golang/docs/ListBuckets200ResponseInner.md deleted file mode 100644 index b39d62d..0000000 --- a/golang/docs/ListBuckets200ResponseInner.md +++ /dev/null @@ -1,103 +0,0 @@ -# ListBuckets200ResponseInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **string** | | -**GlobalAliases** | Pointer to **[]string** | | [optional] -**LocalAliases** | Pointer to [**[]ListBuckets200ResponseInnerLocalAliasesInner**](ListBuckets200ResponseInnerLocalAliasesInner.md) | | [optional] - -## Methods - -### NewListBuckets200ResponseInner - -`func NewListBuckets200ResponseInner(id string, ) *ListBuckets200ResponseInner` - -NewListBuckets200ResponseInner instantiates a new ListBuckets200ResponseInner object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewListBuckets200ResponseInnerWithDefaults - -`func NewListBuckets200ResponseInnerWithDefaults() *ListBuckets200ResponseInner` - -NewListBuckets200ResponseInnerWithDefaults instantiates a new ListBuckets200ResponseInner object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetId - -`func (o *ListBuckets200ResponseInner) GetId() string` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *ListBuckets200ResponseInner) GetIdOk() (*string, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *ListBuckets200ResponseInner) SetId(v string)` - -SetId sets Id field to given value. - - -### GetGlobalAliases - -`func (o *ListBuckets200ResponseInner) GetGlobalAliases() []string` - -GetGlobalAliases returns the GlobalAliases field if non-nil, zero value otherwise. - -### GetGlobalAliasesOk - -`func (o *ListBuckets200ResponseInner) GetGlobalAliasesOk() (*[]string, bool)` - -GetGlobalAliasesOk returns a tuple with the GlobalAliases field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetGlobalAliases - -`func (o *ListBuckets200ResponseInner) SetGlobalAliases(v []string)` - -SetGlobalAliases sets GlobalAliases field to given value. - -### HasGlobalAliases - -`func (o *ListBuckets200ResponseInner) HasGlobalAliases() bool` - -HasGlobalAliases returns a boolean if a field has been set. - -### GetLocalAliases - -`func (o *ListBuckets200ResponseInner) GetLocalAliases() []ListBuckets200ResponseInnerLocalAliasesInner` - -GetLocalAliases returns the LocalAliases field if non-nil, zero value otherwise. - -### GetLocalAliasesOk - -`func (o *ListBuckets200ResponseInner) GetLocalAliasesOk() (*[]ListBuckets200ResponseInnerLocalAliasesInner, bool)` - -GetLocalAliasesOk returns a tuple with the LocalAliases field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetLocalAliases - -`func (o *ListBuckets200ResponseInner) SetLocalAliases(v []ListBuckets200ResponseInnerLocalAliasesInner)` - -SetLocalAliases sets LocalAliases field to given value. - -### HasLocalAliases - -`func (o *ListBuckets200ResponseInner) HasLocalAliases() bool` - -HasLocalAliases returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/golang/docs/ListBuckets200ResponseInnerLocalAliasesInner.md b/golang/docs/ListBuckets200ResponseInnerLocalAliasesInner.md deleted file mode 100644 index aa8295a..0000000 --- a/golang/docs/ListBuckets200ResponseInnerLocalAliasesInner.md +++ /dev/null @@ -1,72 +0,0 @@ -# ListBuckets200ResponseInnerLocalAliasesInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Alias** | **string** | | -**AccessKeyId** | **string** | | - -## Methods - -### NewListBuckets200ResponseInnerLocalAliasesInner - -`func NewListBuckets200ResponseInnerLocalAliasesInner(alias string, accessKeyId string, ) *ListBuckets200ResponseInnerLocalAliasesInner` - -NewListBuckets200ResponseInnerLocalAliasesInner instantiates a new ListBuckets200ResponseInnerLocalAliasesInner object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewListBuckets200ResponseInnerLocalAliasesInnerWithDefaults - -`func NewListBuckets200ResponseInnerLocalAliasesInnerWithDefaults() *ListBuckets200ResponseInnerLocalAliasesInner` - -NewListBuckets200ResponseInnerLocalAliasesInnerWithDefaults instantiates a new ListBuckets200ResponseInnerLocalAliasesInner object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetAlias - -`func (o *ListBuckets200ResponseInnerLocalAliasesInner) GetAlias() string` - -GetAlias returns the Alias field if non-nil, zero value otherwise. - -### GetAliasOk - -`func (o *ListBuckets200ResponseInnerLocalAliasesInner) GetAliasOk() (*string, bool)` - -GetAliasOk returns a tuple with the Alias field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAlias - -`func (o *ListBuckets200ResponseInnerLocalAliasesInner) SetAlias(v string)` - -SetAlias sets Alias field to given value. - - -### GetAccessKeyId - -`func (o *ListBuckets200ResponseInnerLocalAliasesInner) GetAccessKeyId() string` - -GetAccessKeyId returns the AccessKeyId field if non-nil, zero value otherwise. - -### GetAccessKeyIdOk - -`func (o *ListBuckets200ResponseInnerLocalAliasesInner) GetAccessKeyIdOk() (*string, bool)` - -GetAccessKeyIdOk returns a tuple with the AccessKeyId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAccessKeyId - -`func (o *ListBuckets200ResponseInnerLocalAliasesInner) SetAccessKeyId(v string)` - -SetAccessKeyId sets AccessKeyId field to given value. - - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/golang/docs/ListKeys200ResponseInner.md b/golang/docs/ListKeys200ResponseInner.md deleted file mode 100644 index 690d83a..0000000 --- a/golang/docs/ListKeys200ResponseInner.md +++ /dev/null @@ -1,77 +0,0 @@ -# ListKeys200ResponseInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **string** | | -**Name** | Pointer to **string** | | [optional] - -## Methods - -### NewListKeys200ResponseInner - -`func NewListKeys200ResponseInner(id string, ) *ListKeys200ResponseInner` - -NewListKeys200ResponseInner instantiates a new ListKeys200ResponseInner object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewListKeys200ResponseInnerWithDefaults - -`func NewListKeys200ResponseInnerWithDefaults() *ListKeys200ResponseInner` - -NewListKeys200ResponseInnerWithDefaults instantiates a new ListKeys200ResponseInner object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetId - -`func (o *ListKeys200ResponseInner) GetId() string` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *ListKeys200ResponseInner) GetIdOk() (*string, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *ListKeys200ResponseInner) SetId(v string)` - -SetId sets Id field to given value. - - -### GetName - -`func (o *ListKeys200ResponseInner) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *ListKeys200ResponseInner) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *ListKeys200ResponseInner) SetName(v string)` - -SetName sets Name field to given value. - -### HasName - -`func (o *ListKeys200ResponseInner) HasName() bool` - -HasName returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/golang/docs/NodeClusterInfo.md b/golang/docs/NodeClusterInfo.md deleted file mode 100644 index 4582c28..0000000 --- a/golang/docs/NodeClusterInfo.md +++ /dev/null @@ -1,103 +0,0 @@ -# NodeClusterInfo - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Zone** | **string** | | -**Capacity** | **NullableInt32** | | -**Tags** | **[]string** | User defined tags, put whatever makes sense for you, these tags are not interpreted by Garage | - -## Methods - -### NewNodeClusterInfo - -`func NewNodeClusterInfo(zone string, capacity NullableInt32, tags []string, ) *NodeClusterInfo` - -NewNodeClusterInfo instantiates a new NodeClusterInfo object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewNodeClusterInfoWithDefaults - -`func NewNodeClusterInfoWithDefaults() *NodeClusterInfo` - -NewNodeClusterInfoWithDefaults instantiates a new NodeClusterInfo object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetZone - -`func (o *NodeClusterInfo) GetZone() string` - -GetZone returns the Zone field if non-nil, zero value otherwise. - -### GetZoneOk - -`func (o *NodeClusterInfo) GetZoneOk() (*string, bool)` - -GetZoneOk returns a tuple with the Zone field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetZone - -`func (o *NodeClusterInfo) SetZone(v string)` - -SetZone sets Zone field to given value. - - -### GetCapacity - -`func (o *NodeClusterInfo) GetCapacity() int32` - -GetCapacity returns the Capacity field if non-nil, zero value otherwise. - -### GetCapacityOk - -`func (o *NodeClusterInfo) GetCapacityOk() (*int32, bool)` - -GetCapacityOk returns a tuple with the Capacity field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCapacity - -`func (o *NodeClusterInfo) SetCapacity(v int32)` - -SetCapacity sets Capacity field to given value. - - -### SetCapacityNil - -`func (o *NodeClusterInfo) SetCapacityNil(b bool)` - - SetCapacityNil sets the value for Capacity to be an explicit nil - -### UnsetCapacity -`func (o *NodeClusterInfo) UnsetCapacity()` - -UnsetCapacity ensures that no value is present for Capacity, not even an explicit nil -### GetTags - -`func (o *NodeClusterInfo) GetTags() []string` - -GetTags returns the Tags field if non-nil, zero value otherwise. - -### GetTagsOk - -`func (o *NodeClusterInfo) GetTagsOk() (*[]string, bool)` - -GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTags - -`func (o *NodeClusterInfo) SetTags(v []string)` - -SetTags sets Tags field to given value. - - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/golang/docs/NodeNetworkInfo.md b/golang/docs/NodeNetworkInfo.md deleted file mode 100644 index 71a52df..0000000 --- a/golang/docs/NodeNetworkInfo.md +++ /dev/null @@ -1,124 +0,0 @@ -# NodeNetworkInfo - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Addr** | **string** | | -**IsUp** | **bool** | | -**LastSeenSecsAgo** | **NullableInt32** | | -**Hostname** | **string** | | - -## Methods - -### NewNodeNetworkInfo - -`func NewNodeNetworkInfo(addr string, isUp bool, lastSeenSecsAgo NullableInt32, hostname string, ) *NodeNetworkInfo` - -NewNodeNetworkInfo instantiates a new NodeNetworkInfo object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewNodeNetworkInfoWithDefaults - -`func NewNodeNetworkInfoWithDefaults() *NodeNetworkInfo` - -NewNodeNetworkInfoWithDefaults instantiates a new NodeNetworkInfo object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetAddr - -`func (o *NodeNetworkInfo) GetAddr() string` - -GetAddr returns the Addr field if non-nil, zero value otherwise. - -### GetAddrOk - -`func (o *NodeNetworkInfo) GetAddrOk() (*string, bool)` - -GetAddrOk returns a tuple with the Addr field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAddr - -`func (o *NodeNetworkInfo) SetAddr(v string)` - -SetAddr sets Addr field to given value. - - -### GetIsUp - -`func (o *NodeNetworkInfo) GetIsUp() bool` - -GetIsUp returns the IsUp field if non-nil, zero value otherwise. - -### GetIsUpOk - -`func (o *NodeNetworkInfo) GetIsUpOk() (*bool, bool)` - -GetIsUpOk returns a tuple with the IsUp field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIsUp - -`func (o *NodeNetworkInfo) SetIsUp(v bool)` - -SetIsUp sets IsUp field to given value. - - -### GetLastSeenSecsAgo - -`func (o *NodeNetworkInfo) GetLastSeenSecsAgo() int32` - -GetLastSeenSecsAgo returns the LastSeenSecsAgo field if non-nil, zero value otherwise. - -### GetLastSeenSecsAgoOk - -`func (o *NodeNetworkInfo) GetLastSeenSecsAgoOk() (*int32, bool)` - -GetLastSeenSecsAgoOk returns a tuple with the LastSeenSecsAgo field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetLastSeenSecsAgo - -`func (o *NodeNetworkInfo) SetLastSeenSecsAgo(v int32)` - -SetLastSeenSecsAgo sets LastSeenSecsAgo field to given value. - - -### SetLastSeenSecsAgoNil - -`func (o *NodeNetworkInfo) SetLastSeenSecsAgoNil(b bool)` - - SetLastSeenSecsAgoNil sets the value for LastSeenSecsAgo to be an explicit nil - -### UnsetLastSeenSecsAgo -`func (o *NodeNetworkInfo) UnsetLastSeenSecsAgo()` - -UnsetLastSeenSecsAgo ensures that no value is present for LastSeenSecsAgo, not even an explicit nil -### GetHostname - -`func (o *NodeNetworkInfo) GetHostname() string` - -GetHostname returns the Hostname field if non-nil, zero value otherwise. - -### GetHostnameOk - -`func (o *NodeNetworkInfo) GetHostnameOk() (*string, bool)` - -GetHostnameOk returns a tuple with the Hostname field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetHostname - -`func (o *NodeNetworkInfo) SetHostname(v string)` - -SetHostname sets Hostname field to given value. - - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/golang/docs/NodesApi.md b/golang/docs/NodesApi.md deleted file mode 100644 index 792b107..0000000 --- a/golang/docs/NodesApi.md +++ /dev/null @@ -1,137 +0,0 @@ -# \NodesApi - -All URIs are relative to *http://localhost:3903/v0* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**AddNode**](NodesApi.md#AddNode) | **Post** /connect | Connect target node to other Garage nodes -[**GetNodes**](NodesApi.md#GetNodes) | **Get** /status | Status of this node and other nodes in the cluster - - - -## AddNode - -> []AddNode200ResponseInner AddNode(ctx).RequestBody(requestBody).Execute() - -Connect target node to other Garage nodes - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - requestBody := []string{"Property_example"} // []string | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.NodesApi.AddNode(context.Background()).RequestBody(requestBody).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `NodesApi.AddNode``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AddNode`: []AddNode200ResponseInner - fmt.Fprintf(os.Stdout, "Response from `NodesApi.AddNode`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiAddNodeRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **requestBody** | **[]string** | | - -### Return type - -[**[]AddNode200ResponseInner**](AddNode200ResponseInner.md) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetNodes - -> GetNodes200Response GetNodes(ctx).Execute() - -Status of this node and other nodes in the cluster - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.NodesApi.GetNodes(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `NodesApi.GetNodes``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetNodes`: GetNodes200Response - fmt.Fprintf(os.Stdout, "Response from `NodesApi.GetNodes`: %v\n", resp) -} -``` - -### Path Parameters - -This endpoint does not need any parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetNodesRequest struct via the builder pattern - - -### Return type - -[**GetNodes200Response**](GetNodes200Response.md) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/golang/docs/UpdateBucketRequest.md b/golang/docs/UpdateBucketRequest.md deleted file mode 100644 index 21b90cf..0000000 --- a/golang/docs/UpdateBucketRequest.md +++ /dev/null @@ -1,82 +0,0 @@ -# UpdateBucketRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**WebsiteAccess** | Pointer to [**UpdateBucketRequestWebsiteAccess**](UpdateBucketRequestWebsiteAccess.md) | | [optional] -**Quotas** | Pointer to [**UpdateBucketRequestQuotas**](UpdateBucketRequestQuotas.md) | | [optional] - -## Methods - -### NewUpdateBucketRequest - -`func NewUpdateBucketRequest() *UpdateBucketRequest` - -NewUpdateBucketRequest instantiates a new UpdateBucketRequest object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewUpdateBucketRequestWithDefaults - -`func NewUpdateBucketRequestWithDefaults() *UpdateBucketRequest` - -NewUpdateBucketRequestWithDefaults instantiates a new UpdateBucketRequest object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetWebsiteAccess - -`func (o *UpdateBucketRequest) GetWebsiteAccess() UpdateBucketRequestWebsiteAccess` - -GetWebsiteAccess returns the WebsiteAccess field if non-nil, zero value otherwise. - -### GetWebsiteAccessOk - -`func (o *UpdateBucketRequest) GetWebsiteAccessOk() (*UpdateBucketRequestWebsiteAccess, bool)` - -GetWebsiteAccessOk returns a tuple with the WebsiteAccess field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetWebsiteAccess - -`func (o *UpdateBucketRequest) SetWebsiteAccess(v UpdateBucketRequestWebsiteAccess)` - -SetWebsiteAccess sets WebsiteAccess field to given value. - -### HasWebsiteAccess - -`func (o *UpdateBucketRequest) HasWebsiteAccess() bool` - -HasWebsiteAccess returns a boolean if a field has been set. - -### GetQuotas - -`func (o *UpdateBucketRequest) GetQuotas() UpdateBucketRequestQuotas` - -GetQuotas returns the Quotas field if non-nil, zero value otherwise. - -### GetQuotasOk - -`func (o *UpdateBucketRequest) GetQuotasOk() (*UpdateBucketRequestQuotas, bool)` - -GetQuotasOk returns a tuple with the Quotas field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetQuotas - -`func (o *UpdateBucketRequest) SetQuotas(v UpdateBucketRequestQuotas)` - -SetQuotas sets Quotas field to given value. - -### HasQuotas - -`func (o *UpdateBucketRequest) HasQuotas() bool` - -HasQuotas returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/golang/docs/UpdateBucketRequestQuotas.md b/golang/docs/UpdateBucketRequestQuotas.md deleted file mode 100644 index 8bb00de..0000000 --- a/golang/docs/UpdateBucketRequestQuotas.md +++ /dev/null @@ -1,102 +0,0 @@ -# UpdateBucketRequestQuotas - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**MaxSize** | Pointer to **NullableInt32** | | [optional] -**MaxObjects** | Pointer to **NullableInt32** | | [optional] - -## Methods - -### NewUpdateBucketRequestQuotas - -`func NewUpdateBucketRequestQuotas() *UpdateBucketRequestQuotas` - -NewUpdateBucketRequestQuotas instantiates a new UpdateBucketRequestQuotas object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewUpdateBucketRequestQuotasWithDefaults - -`func NewUpdateBucketRequestQuotasWithDefaults() *UpdateBucketRequestQuotas` - -NewUpdateBucketRequestQuotasWithDefaults instantiates a new UpdateBucketRequestQuotas object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetMaxSize - -`func (o *UpdateBucketRequestQuotas) GetMaxSize() int32` - -GetMaxSize returns the MaxSize field if non-nil, zero value otherwise. - -### GetMaxSizeOk - -`func (o *UpdateBucketRequestQuotas) GetMaxSizeOk() (*int32, bool)` - -GetMaxSizeOk returns a tuple with the MaxSize field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMaxSize - -`func (o *UpdateBucketRequestQuotas) SetMaxSize(v int32)` - -SetMaxSize sets MaxSize field to given value. - -### HasMaxSize - -`func (o *UpdateBucketRequestQuotas) HasMaxSize() bool` - -HasMaxSize returns a boolean if a field has been set. - -### SetMaxSizeNil - -`func (o *UpdateBucketRequestQuotas) SetMaxSizeNil(b bool)` - - SetMaxSizeNil sets the value for MaxSize to be an explicit nil - -### UnsetMaxSize -`func (o *UpdateBucketRequestQuotas) UnsetMaxSize()` - -UnsetMaxSize ensures that no value is present for MaxSize, not even an explicit nil -### GetMaxObjects - -`func (o *UpdateBucketRequestQuotas) GetMaxObjects() int32` - -GetMaxObjects returns the MaxObjects field if non-nil, zero value otherwise. - -### GetMaxObjectsOk - -`func (o *UpdateBucketRequestQuotas) GetMaxObjectsOk() (*int32, bool)` - -GetMaxObjectsOk returns a tuple with the MaxObjects field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMaxObjects - -`func (o *UpdateBucketRequestQuotas) SetMaxObjects(v int32)` - -SetMaxObjects sets MaxObjects field to given value. - -### HasMaxObjects - -`func (o *UpdateBucketRequestQuotas) HasMaxObjects() bool` - -HasMaxObjects returns a boolean if a field has been set. - -### SetMaxObjectsNil - -`func (o *UpdateBucketRequestQuotas) SetMaxObjectsNil(b bool)` - - SetMaxObjectsNil sets the value for MaxObjects to be an explicit nil - -### UnsetMaxObjects -`func (o *UpdateBucketRequestQuotas) UnsetMaxObjects()` - -UnsetMaxObjects ensures that no value is present for MaxObjects, not even an explicit nil - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/golang/docs/UpdateBucketRequestWebsiteAccess.md b/golang/docs/UpdateBucketRequestWebsiteAccess.md deleted file mode 100644 index a9b2a1e..0000000 --- a/golang/docs/UpdateBucketRequestWebsiteAccess.md +++ /dev/null @@ -1,108 +0,0 @@ -# UpdateBucketRequestWebsiteAccess - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Enabled** | Pointer to **bool** | | [optional] -**IndexDocument** | Pointer to **string** | | [optional] -**ErrorDocument** | Pointer to **string** | | [optional] - -## Methods - -### NewUpdateBucketRequestWebsiteAccess - -`func NewUpdateBucketRequestWebsiteAccess() *UpdateBucketRequestWebsiteAccess` - -NewUpdateBucketRequestWebsiteAccess instantiates a new UpdateBucketRequestWebsiteAccess object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewUpdateBucketRequestWebsiteAccessWithDefaults - -`func NewUpdateBucketRequestWebsiteAccessWithDefaults() *UpdateBucketRequestWebsiteAccess` - -NewUpdateBucketRequestWebsiteAccessWithDefaults instantiates a new UpdateBucketRequestWebsiteAccess object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetEnabled - -`func (o *UpdateBucketRequestWebsiteAccess) GetEnabled() bool` - -GetEnabled returns the Enabled field if non-nil, zero value otherwise. - -### GetEnabledOk - -`func (o *UpdateBucketRequestWebsiteAccess) GetEnabledOk() (*bool, bool)` - -GetEnabledOk returns a tuple with the Enabled field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetEnabled - -`func (o *UpdateBucketRequestWebsiteAccess) SetEnabled(v bool)` - -SetEnabled sets Enabled field to given value. - -### HasEnabled - -`func (o *UpdateBucketRequestWebsiteAccess) HasEnabled() bool` - -HasEnabled returns a boolean if a field has been set. - -### GetIndexDocument - -`func (o *UpdateBucketRequestWebsiteAccess) GetIndexDocument() string` - -GetIndexDocument returns the IndexDocument field if non-nil, zero value otherwise. - -### GetIndexDocumentOk - -`func (o *UpdateBucketRequestWebsiteAccess) GetIndexDocumentOk() (*string, bool)` - -GetIndexDocumentOk returns a tuple with the IndexDocument field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIndexDocument - -`func (o *UpdateBucketRequestWebsiteAccess) SetIndexDocument(v string)` - -SetIndexDocument sets IndexDocument field to given value. - -### HasIndexDocument - -`func (o *UpdateBucketRequestWebsiteAccess) HasIndexDocument() bool` - -HasIndexDocument returns a boolean if a field has been set. - -### GetErrorDocument - -`func (o *UpdateBucketRequestWebsiteAccess) GetErrorDocument() string` - -GetErrorDocument returns the ErrorDocument field if non-nil, zero value otherwise. - -### GetErrorDocumentOk - -`func (o *UpdateBucketRequestWebsiteAccess) GetErrorDocumentOk() (*string, bool)` - -GetErrorDocumentOk returns a tuple with the ErrorDocument field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetErrorDocument - -`func (o *UpdateBucketRequestWebsiteAccess) SetErrorDocument(v string)` - -SetErrorDocument sets ErrorDocument field to given value. - -### HasErrorDocument - -`func (o *UpdateBucketRequestWebsiteAccess) HasErrorDocument() bool` - -HasErrorDocument returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/golang/docs/UpdateKeyRequest.md b/golang/docs/UpdateKeyRequest.md deleted file mode 100644 index cd8ab1a..0000000 --- a/golang/docs/UpdateKeyRequest.md +++ /dev/null @@ -1,108 +0,0 @@ -# UpdateKeyRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | Pointer to **string** | | [optional] -**Allow** | Pointer to [**UpdateKeyRequestAllow**](UpdateKeyRequestAllow.md) | | [optional] -**Deny** | Pointer to [**UpdateKeyRequestDeny**](UpdateKeyRequestDeny.md) | | [optional] - -## Methods - -### NewUpdateKeyRequest - -`func NewUpdateKeyRequest() *UpdateKeyRequest` - -NewUpdateKeyRequest instantiates a new UpdateKeyRequest object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewUpdateKeyRequestWithDefaults - -`func NewUpdateKeyRequestWithDefaults() *UpdateKeyRequest` - -NewUpdateKeyRequestWithDefaults instantiates a new UpdateKeyRequest object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetName - -`func (o *UpdateKeyRequest) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *UpdateKeyRequest) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *UpdateKeyRequest) SetName(v string)` - -SetName sets Name field to given value. - -### HasName - -`func (o *UpdateKeyRequest) HasName() bool` - -HasName returns a boolean if a field has been set. - -### GetAllow - -`func (o *UpdateKeyRequest) GetAllow() UpdateKeyRequestAllow` - -GetAllow returns the Allow field if non-nil, zero value otherwise. - -### GetAllowOk - -`func (o *UpdateKeyRequest) GetAllowOk() (*UpdateKeyRequestAllow, bool)` - -GetAllowOk returns a tuple with the Allow field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAllow - -`func (o *UpdateKeyRequest) SetAllow(v UpdateKeyRequestAllow)` - -SetAllow sets Allow field to given value. - -### HasAllow - -`func (o *UpdateKeyRequest) HasAllow() bool` - -HasAllow returns a boolean if a field has been set. - -### GetDeny - -`func (o *UpdateKeyRequest) GetDeny() UpdateKeyRequestDeny` - -GetDeny returns the Deny field if non-nil, zero value otherwise. - -### GetDenyOk - -`func (o *UpdateKeyRequest) GetDenyOk() (*UpdateKeyRequestDeny, bool)` - -GetDenyOk returns a tuple with the Deny field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDeny - -`func (o *UpdateKeyRequest) SetDeny(v UpdateKeyRequestDeny)` - -SetDeny sets Deny field to given value. - -### HasDeny - -`func (o *UpdateKeyRequest) HasDeny() bool` - -HasDeny returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/golang/docs/UpdateKeyRequestAllow.md b/golang/docs/UpdateKeyRequestAllow.md deleted file mode 100644 index d7d2b7a..0000000 --- a/golang/docs/UpdateKeyRequestAllow.md +++ /dev/null @@ -1,56 +0,0 @@ -# UpdateKeyRequestAllow - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**CreateBucket** | Pointer to **bool** | | [optional] - -## Methods - -### NewUpdateKeyRequestAllow - -`func NewUpdateKeyRequestAllow() *UpdateKeyRequestAllow` - -NewUpdateKeyRequestAllow instantiates a new UpdateKeyRequestAllow object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewUpdateKeyRequestAllowWithDefaults - -`func NewUpdateKeyRequestAllowWithDefaults() *UpdateKeyRequestAllow` - -NewUpdateKeyRequestAllowWithDefaults instantiates a new UpdateKeyRequestAllow object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetCreateBucket - -`func (o *UpdateKeyRequestAllow) GetCreateBucket() bool` - -GetCreateBucket returns the CreateBucket field if non-nil, zero value otherwise. - -### GetCreateBucketOk - -`func (o *UpdateKeyRequestAllow) GetCreateBucketOk() (*bool, bool)` - -GetCreateBucketOk returns a tuple with the CreateBucket field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCreateBucket - -`func (o *UpdateKeyRequestAllow) SetCreateBucket(v bool)` - -SetCreateBucket sets CreateBucket field to given value. - -### HasCreateBucket - -`func (o *UpdateKeyRequestAllow) HasCreateBucket() bool` - -HasCreateBucket returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/golang/docs/UpdateKeyRequestDeny.md b/golang/docs/UpdateKeyRequestDeny.md deleted file mode 100644 index f65abe0..0000000 --- a/golang/docs/UpdateKeyRequestDeny.md +++ /dev/null @@ -1,56 +0,0 @@ -# UpdateKeyRequestDeny - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**CreateBucket** | Pointer to **bool** | | [optional] - -## Methods - -### NewUpdateKeyRequestDeny - -`func NewUpdateKeyRequestDeny() *UpdateKeyRequestDeny` - -NewUpdateKeyRequestDeny instantiates a new UpdateKeyRequestDeny object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewUpdateKeyRequestDenyWithDefaults - -`func NewUpdateKeyRequestDenyWithDefaults() *UpdateKeyRequestDeny` - -NewUpdateKeyRequestDenyWithDefaults instantiates a new UpdateKeyRequestDeny object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetCreateBucket - -`func (o *UpdateKeyRequestDeny) GetCreateBucket() bool` - -GetCreateBucket returns the CreateBucket field if non-nil, zero value otherwise. - -### GetCreateBucketOk - -`func (o *UpdateKeyRequestDeny) GetCreateBucketOk() (*bool, bool)` - -GetCreateBucketOk returns a tuple with the CreateBucket field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCreateBucket - -`func (o *UpdateKeyRequestDeny) SetCreateBucket(v bool)` - -SetCreateBucket sets CreateBucket field to given value. - -### HasCreateBucket - -`func (o *UpdateKeyRequestDeny) HasCreateBucket() bool` - -HasCreateBucket returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/golang/git_push.sh b/golang/git_push.sh deleted file mode 100644 index f53a75d..0000000 --- a/golang/git_push.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 -git_host=$4 - -if [ "$git_host" = "" ]; then - git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" -fi - -if [ "$git_user_id" = "" ]; then - git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' diff --git a/golang/go.mod b/golang/go.mod deleted file mode 100644 index ead3260..0000000 --- a/golang/go.mod +++ /dev/null @@ -1,7 +0,0 @@ -module github.com/GIT_USER_ID/GIT_REPO_ID - -go 1.13 - -require ( - golang.org/x/oauth2 v0.0.0-20210323180902-22b0adad7558 -) diff --git a/golang/go.sum b/golang/go.sum deleted file mode 100644 index 734252e..0000000 --- a/golang/go.sum +++ /dev/null @@ -1,13 +0,0 @@ -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= diff --git a/golang/model_add_key_request.go b/golang/model_add_key_request.go deleted file mode 100644 index 5773c11..0000000 --- a/golang/model_add_key_request.go +++ /dev/null @@ -1,115 +0,0 @@ -/* -Garage Administration API v0+garage-v0.8.0 - -Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - -API version: v0.8.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package garage - -import ( - "encoding/json" -) - -// AddKeyRequest struct for AddKeyRequest -type AddKeyRequest struct { - Name *string `json:"name,omitempty"` -} - -// NewAddKeyRequest instantiates a new AddKeyRequest object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewAddKeyRequest() *AddKeyRequest { - this := AddKeyRequest{} - return &this -} - -// NewAddKeyRequestWithDefaults instantiates a new AddKeyRequest object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewAddKeyRequestWithDefaults() *AddKeyRequest { - this := AddKeyRequest{} - return &this -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *AddKeyRequest) GetName() string { - if o == nil || o.Name == nil { - var ret string - return ret - } - return *o.Name -} - -// GetNameOk returns a tuple with the Name field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AddKeyRequest) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *AddKeyRequest) HasName() bool { - if o != nil && o.Name != nil { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *AddKeyRequest) SetName(v string) { - o.Name = &v -} - -func (o AddKeyRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Name != nil { - toSerialize["name"] = o.Name - } - return json.Marshal(toSerialize) -} - -type NullableAddKeyRequest struct { - value *AddKeyRequest - isSet bool -} - -func (v NullableAddKeyRequest) Get() *AddKeyRequest { - return v.value -} - -func (v *NullableAddKeyRequest) Set(val *AddKeyRequest) { - v.value = val - v.isSet = true -} - -func (v NullableAddKeyRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableAddKeyRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableAddKeyRequest(val *AddKeyRequest) *NullableAddKeyRequest { - return &NullableAddKeyRequest{value: val, isSet: true} -} - -func (v NullableAddKeyRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableAddKeyRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/golang/model_add_node_200_response_inner.go b/golang/model_add_node_200_response_inner.go deleted file mode 100644 index 76fbbd8..0000000 --- a/golang/model_add_node_200_response_inner.go +++ /dev/null @@ -1,161 +0,0 @@ -/* -Garage Administration API v0+garage-v0.8.0 - -Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - -API version: v0.8.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package garage - -import ( - "encoding/json" -) - -// AddNode200ResponseInner struct for AddNode200ResponseInner -type AddNode200ResponseInner struct { - Success *bool `json:"success,omitempty"` - Error NullableString `json:"error,omitempty"` -} - -// NewAddNode200ResponseInner instantiates a new AddNode200ResponseInner object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewAddNode200ResponseInner() *AddNode200ResponseInner { - this := AddNode200ResponseInner{} - return &this -} - -// NewAddNode200ResponseInnerWithDefaults instantiates a new AddNode200ResponseInner object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewAddNode200ResponseInnerWithDefaults() *AddNode200ResponseInner { - this := AddNode200ResponseInner{} - return &this -} - -// GetSuccess returns the Success field value if set, zero value otherwise. -func (o *AddNode200ResponseInner) GetSuccess() bool { - if o == nil || o.Success == nil { - var ret bool - return ret - } - return *o.Success -} - -// GetSuccessOk returns a tuple with the Success field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AddNode200ResponseInner) GetSuccessOk() (*bool, bool) { - if o == nil || o.Success == nil { - return nil, false - } - return o.Success, true -} - -// HasSuccess returns a boolean if a field has been set. -func (o *AddNode200ResponseInner) HasSuccess() bool { - if o != nil && o.Success != nil { - return true - } - - return false -} - -// SetSuccess gets a reference to the given bool and assigns it to the Success field. -func (o *AddNode200ResponseInner) SetSuccess(v bool) { - o.Success = &v -} - -// GetError returns the Error field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *AddNode200ResponseInner) GetError() string { - if o == nil || o.Error.Get() == nil { - var ret string - return ret - } - return *o.Error.Get() -} - -// GetErrorOk returns a tuple with the Error field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *AddNode200ResponseInner) GetErrorOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Error.Get(), o.Error.IsSet() -} - -// HasError returns a boolean if a field has been set. -func (o *AddNode200ResponseInner) HasError() bool { - if o != nil && o.Error.IsSet() { - return true - } - - return false -} - -// SetError gets a reference to the given NullableString and assigns it to the Error field. -func (o *AddNode200ResponseInner) SetError(v string) { - o.Error.Set(&v) -} -// SetErrorNil sets the value for Error to be an explicit nil -func (o *AddNode200ResponseInner) SetErrorNil() { - o.Error.Set(nil) -} - -// UnsetError ensures that no value is present for Error, not even an explicit nil -func (o *AddNode200ResponseInner) UnsetError() { - o.Error.Unset() -} - -func (o AddNode200ResponseInner) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Success != nil { - toSerialize["success"] = o.Success - } - if o.Error.IsSet() { - toSerialize["error"] = o.Error.Get() - } - return json.Marshal(toSerialize) -} - -type NullableAddNode200ResponseInner struct { - value *AddNode200ResponseInner - isSet bool -} - -func (v NullableAddNode200ResponseInner) Get() *AddNode200ResponseInner { - return v.value -} - -func (v *NullableAddNode200ResponseInner) Set(val *AddNode200ResponseInner) { - v.value = val - v.isSet = true -} - -func (v NullableAddNode200ResponseInner) IsSet() bool { - return v.isSet -} - -func (v *NullableAddNode200ResponseInner) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableAddNode200ResponseInner(val *AddNode200ResponseInner) *NullableAddNode200ResponseInner { - return &NullableAddNode200ResponseInner{value: val, isSet: true} -} - -func (v NullableAddNode200ResponseInner) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableAddNode200ResponseInner) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/golang/model_allow_bucket_key_request.go b/golang/model_allow_bucket_key_request.go deleted file mode 100644 index 25d9941..0000000 --- a/golang/model_allow_bucket_key_request.go +++ /dev/null @@ -1,166 +0,0 @@ -/* -Garage Administration API v0+garage-v0.8.0 - -Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - -API version: v0.8.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package garage - -import ( - "encoding/json" -) - -// AllowBucketKeyRequest struct for AllowBucketKeyRequest -type AllowBucketKeyRequest struct { - BucketId string `json:"bucketId"` - AccessKeyId string `json:"accessKeyId"` - Permissions AllowBucketKeyRequestPermissions `json:"permissions"` -} - -// NewAllowBucketKeyRequest instantiates a new AllowBucketKeyRequest object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewAllowBucketKeyRequest(bucketId string, accessKeyId string, permissions AllowBucketKeyRequestPermissions) *AllowBucketKeyRequest { - this := AllowBucketKeyRequest{} - this.BucketId = bucketId - this.AccessKeyId = accessKeyId - this.Permissions = permissions - return &this -} - -// NewAllowBucketKeyRequestWithDefaults instantiates a new AllowBucketKeyRequest object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewAllowBucketKeyRequestWithDefaults() *AllowBucketKeyRequest { - this := AllowBucketKeyRequest{} - return &this -} - -// GetBucketId returns the BucketId field value -func (o *AllowBucketKeyRequest) GetBucketId() string { - if o == nil { - var ret string - return ret - } - - return o.BucketId -} - -// GetBucketIdOk returns a tuple with the BucketId field value -// and a boolean to check if the value has been set. -func (o *AllowBucketKeyRequest) GetBucketIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.BucketId, true -} - -// SetBucketId sets field value -func (o *AllowBucketKeyRequest) SetBucketId(v string) { - o.BucketId = v -} - -// GetAccessKeyId returns the AccessKeyId field value -func (o *AllowBucketKeyRequest) GetAccessKeyId() string { - if o == nil { - var ret string - return ret - } - - return o.AccessKeyId -} - -// GetAccessKeyIdOk returns a tuple with the AccessKeyId field value -// and a boolean to check if the value has been set. -func (o *AllowBucketKeyRequest) GetAccessKeyIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.AccessKeyId, true -} - -// SetAccessKeyId sets field value -func (o *AllowBucketKeyRequest) SetAccessKeyId(v string) { - o.AccessKeyId = v -} - -// GetPermissions returns the Permissions field value -func (o *AllowBucketKeyRequest) GetPermissions() AllowBucketKeyRequestPermissions { - if o == nil { - var ret AllowBucketKeyRequestPermissions - return ret - } - - return o.Permissions -} - -// GetPermissionsOk returns a tuple with the Permissions field value -// and a boolean to check if the value has been set. -func (o *AllowBucketKeyRequest) GetPermissionsOk() (*AllowBucketKeyRequestPermissions, bool) { - if o == nil { - return nil, false - } - return &o.Permissions, true -} - -// SetPermissions sets field value -func (o *AllowBucketKeyRequest) SetPermissions(v AllowBucketKeyRequestPermissions) { - o.Permissions = v -} - -func (o AllowBucketKeyRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["bucketId"] = o.BucketId - } - if true { - toSerialize["accessKeyId"] = o.AccessKeyId - } - if true { - toSerialize["permissions"] = o.Permissions - } - return json.Marshal(toSerialize) -} - -type NullableAllowBucketKeyRequest struct { - value *AllowBucketKeyRequest - isSet bool -} - -func (v NullableAllowBucketKeyRequest) Get() *AllowBucketKeyRequest { - return v.value -} - -func (v *NullableAllowBucketKeyRequest) Set(val *AllowBucketKeyRequest) { - v.value = val - v.isSet = true -} - -func (v NullableAllowBucketKeyRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableAllowBucketKeyRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableAllowBucketKeyRequest(val *AllowBucketKeyRequest) *NullableAllowBucketKeyRequest { - return &NullableAllowBucketKeyRequest{value: val, isSet: true} -} - -func (v NullableAllowBucketKeyRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableAllowBucketKeyRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/golang/model_allow_bucket_key_request_permissions.go b/golang/model_allow_bucket_key_request_permissions.go deleted file mode 100644 index 2b082ed..0000000 --- a/golang/model_allow_bucket_key_request_permissions.go +++ /dev/null @@ -1,166 +0,0 @@ -/* -Garage Administration API v0+garage-v0.8.0 - -Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - -API version: v0.8.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package garage - -import ( - "encoding/json" -) - -// AllowBucketKeyRequestPermissions struct for AllowBucketKeyRequestPermissions -type AllowBucketKeyRequestPermissions struct { - Read bool `json:"read"` - Write bool `json:"write"` - Owner bool `json:"owner"` -} - -// NewAllowBucketKeyRequestPermissions instantiates a new AllowBucketKeyRequestPermissions object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewAllowBucketKeyRequestPermissions(read bool, write bool, owner bool) *AllowBucketKeyRequestPermissions { - this := AllowBucketKeyRequestPermissions{} - this.Read = read - this.Write = write - this.Owner = owner - return &this -} - -// NewAllowBucketKeyRequestPermissionsWithDefaults instantiates a new AllowBucketKeyRequestPermissions object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewAllowBucketKeyRequestPermissionsWithDefaults() *AllowBucketKeyRequestPermissions { - this := AllowBucketKeyRequestPermissions{} - return &this -} - -// GetRead returns the Read field value -func (o *AllowBucketKeyRequestPermissions) GetRead() bool { - if o == nil { - var ret bool - return ret - } - - return o.Read -} - -// GetReadOk returns a tuple with the Read field value -// and a boolean to check if the value has been set. -func (o *AllowBucketKeyRequestPermissions) GetReadOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.Read, true -} - -// SetRead sets field value -func (o *AllowBucketKeyRequestPermissions) SetRead(v bool) { - o.Read = v -} - -// GetWrite returns the Write field value -func (o *AllowBucketKeyRequestPermissions) GetWrite() bool { - if o == nil { - var ret bool - return ret - } - - return o.Write -} - -// GetWriteOk returns a tuple with the Write field value -// and a boolean to check if the value has been set. -func (o *AllowBucketKeyRequestPermissions) GetWriteOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.Write, true -} - -// SetWrite sets field value -func (o *AllowBucketKeyRequestPermissions) SetWrite(v bool) { - o.Write = v -} - -// GetOwner returns the Owner field value -func (o *AllowBucketKeyRequestPermissions) GetOwner() bool { - if o == nil { - var ret bool - return ret - } - - return o.Owner -} - -// GetOwnerOk returns a tuple with the Owner field value -// and a boolean to check if the value has been set. -func (o *AllowBucketKeyRequestPermissions) GetOwnerOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.Owner, true -} - -// SetOwner sets field value -func (o *AllowBucketKeyRequestPermissions) SetOwner(v bool) { - o.Owner = v -} - -func (o AllowBucketKeyRequestPermissions) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["read"] = o.Read - } - if true { - toSerialize["write"] = o.Write - } - if true { - toSerialize["owner"] = o.Owner - } - return json.Marshal(toSerialize) -} - -type NullableAllowBucketKeyRequestPermissions struct { - value *AllowBucketKeyRequestPermissions - isSet bool -} - -func (v NullableAllowBucketKeyRequestPermissions) Get() *AllowBucketKeyRequestPermissions { - return v.value -} - -func (v *NullableAllowBucketKeyRequestPermissions) Set(val *AllowBucketKeyRequestPermissions) { - v.value = val - v.isSet = true -} - -func (v NullableAllowBucketKeyRequestPermissions) IsSet() bool { - return v.isSet -} - -func (v *NullableAllowBucketKeyRequestPermissions) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableAllowBucketKeyRequestPermissions(val *AllowBucketKeyRequestPermissions) *NullableAllowBucketKeyRequestPermissions { - return &NullableAllowBucketKeyRequestPermissions{value: val, isSet: true} -} - -func (v NullableAllowBucketKeyRequestPermissions) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableAllowBucketKeyRequestPermissions) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/golang/model_bucket_info.go b/golang/model_bucket_info.go deleted file mode 100644 index cf7b0c6..0000000 --- a/golang/model_bucket_info.go +++ /dev/null @@ -1,413 +0,0 @@ -/* -Garage Administration API v0+garage-v0.8.0 - -Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - -API version: v0.8.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package garage - -import ( - "encoding/json" -) - -// BucketInfo struct for BucketInfo -type BucketInfo struct { - Id *string `json:"id,omitempty"` - GlobalAliases []string `json:"globalAliases,omitempty"` - WebsiteAccess *bool `json:"websiteAccess,omitempty"` - WebsiteConfig NullableBucketInfoWebsiteConfig `json:"websiteConfig,omitempty"` - Keys []BucketKeyInfo `json:"keys,omitempty"` - Objects *int32 `json:"objects,omitempty"` - Bytes *int32 `json:"bytes,omitempty"` - UnfinishedUploads *int32 `json:"unfinishedUploads,omitempty"` - Quotas *BucketInfoQuotas `json:"quotas,omitempty"` -} - -// NewBucketInfo instantiates a new BucketInfo object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewBucketInfo() *BucketInfo { - this := BucketInfo{} - return &this -} - -// NewBucketInfoWithDefaults instantiates a new BucketInfo object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewBucketInfoWithDefaults() *BucketInfo { - this := BucketInfo{} - return &this -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *BucketInfo) GetId() string { - if o == nil || o.Id == nil { - var ret string - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BucketInfo) GetIdOk() (*string, bool) { - if o == nil || o.Id == nil { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *BucketInfo) HasId() bool { - if o != nil && o.Id != nil { - return true - } - - return false -} - -// SetId gets a reference to the given string and assigns it to the Id field. -func (o *BucketInfo) SetId(v string) { - o.Id = &v -} - -// GetGlobalAliases returns the GlobalAliases field value if set, zero value otherwise. -func (o *BucketInfo) GetGlobalAliases() []string { - if o == nil || o.GlobalAliases == nil { - var ret []string - return ret - } - return o.GlobalAliases -} - -// GetGlobalAliasesOk returns a tuple with the GlobalAliases field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BucketInfo) GetGlobalAliasesOk() ([]string, bool) { - if o == nil || o.GlobalAliases == nil { - return nil, false - } - return o.GlobalAliases, true -} - -// HasGlobalAliases returns a boolean if a field has been set. -func (o *BucketInfo) HasGlobalAliases() bool { - if o != nil && o.GlobalAliases != nil { - return true - } - - return false -} - -// SetGlobalAliases gets a reference to the given []string and assigns it to the GlobalAliases field. -func (o *BucketInfo) SetGlobalAliases(v []string) { - o.GlobalAliases = v -} - -// GetWebsiteAccess returns the WebsiteAccess field value if set, zero value otherwise. -func (o *BucketInfo) GetWebsiteAccess() bool { - if o == nil || o.WebsiteAccess == nil { - var ret bool - return ret - } - return *o.WebsiteAccess -} - -// GetWebsiteAccessOk returns a tuple with the WebsiteAccess field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BucketInfo) GetWebsiteAccessOk() (*bool, bool) { - if o == nil || o.WebsiteAccess == nil { - return nil, false - } - return o.WebsiteAccess, true -} - -// HasWebsiteAccess returns a boolean if a field has been set. -func (o *BucketInfo) HasWebsiteAccess() bool { - if o != nil && o.WebsiteAccess != nil { - return true - } - - return false -} - -// SetWebsiteAccess gets a reference to the given bool and assigns it to the WebsiteAccess field. -func (o *BucketInfo) SetWebsiteAccess(v bool) { - o.WebsiteAccess = &v -} - -// GetWebsiteConfig returns the WebsiteConfig field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *BucketInfo) GetWebsiteConfig() BucketInfoWebsiteConfig { - if o == nil || o.WebsiteConfig.Get() == nil { - var ret BucketInfoWebsiteConfig - return ret - } - return *o.WebsiteConfig.Get() -} - -// GetWebsiteConfigOk returns a tuple with the WebsiteConfig field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *BucketInfo) GetWebsiteConfigOk() (*BucketInfoWebsiteConfig, bool) { - if o == nil { - return nil, false - } - return o.WebsiteConfig.Get(), o.WebsiteConfig.IsSet() -} - -// HasWebsiteConfig returns a boolean if a field has been set. -func (o *BucketInfo) HasWebsiteConfig() bool { - if o != nil && o.WebsiteConfig.IsSet() { - return true - } - - return false -} - -// SetWebsiteConfig gets a reference to the given NullableBucketInfoWebsiteConfig and assigns it to the WebsiteConfig field. -func (o *BucketInfo) SetWebsiteConfig(v BucketInfoWebsiteConfig) { - o.WebsiteConfig.Set(&v) -} -// SetWebsiteConfigNil sets the value for WebsiteConfig to be an explicit nil -func (o *BucketInfo) SetWebsiteConfigNil() { - o.WebsiteConfig.Set(nil) -} - -// UnsetWebsiteConfig ensures that no value is present for WebsiteConfig, not even an explicit nil -func (o *BucketInfo) UnsetWebsiteConfig() { - o.WebsiteConfig.Unset() -} - -// GetKeys returns the Keys field value if set, zero value otherwise. -func (o *BucketInfo) GetKeys() []BucketKeyInfo { - if o == nil || o.Keys == nil { - var ret []BucketKeyInfo - return ret - } - return o.Keys -} - -// GetKeysOk returns a tuple with the Keys field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BucketInfo) GetKeysOk() ([]BucketKeyInfo, bool) { - if o == nil || o.Keys == nil { - return nil, false - } - return o.Keys, true -} - -// HasKeys returns a boolean if a field has been set. -func (o *BucketInfo) HasKeys() bool { - if o != nil && o.Keys != nil { - return true - } - - return false -} - -// SetKeys gets a reference to the given []BucketKeyInfo and assigns it to the Keys field. -func (o *BucketInfo) SetKeys(v []BucketKeyInfo) { - o.Keys = v -} - -// GetObjects returns the Objects field value if set, zero value otherwise. -func (o *BucketInfo) GetObjects() int32 { - if o == nil || o.Objects == nil { - var ret int32 - return ret - } - return *o.Objects -} - -// GetObjectsOk returns a tuple with the Objects field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BucketInfo) GetObjectsOk() (*int32, bool) { - if o == nil || o.Objects == nil { - return nil, false - } - return o.Objects, true -} - -// HasObjects returns a boolean if a field has been set. -func (o *BucketInfo) HasObjects() bool { - if o != nil && o.Objects != nil { - return true - } - - return false -} - -// SetObjects gets a reference to the given int32 and assigns it to the Objects field. -func (o *BucketInfo) SetObjects(v int32) { - o.Objects = &v -} - -// GetBytes returns the Bytes field value if set, zero value otherwise. -func (o *BucketInfo) GetBytes() int32 { - if o == nil || o.Bytes == nil { - var ret int32 - return ret - } - return *o.Bytes -} - -// GetBytesOk returns a tuple with the Bytes field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BucketInfo) GetBytesOk() (*int32, bool) { - if o == nil || o.Bytes == nil { - return nil, false - } - return o.Bytes, true -} - -// HasBytes returns a boolean if a field has been set. -func (o *BucketInfo) HasBytes() bool { - if o != nil && o.Bytes != nil { - return true - } - - return false -} - -// SetBytes gets a reference to the given int32 and assigns it to the Bytes field. -func (o *BucketInfo) SetBytes(v int32) { - o.Bytes = &v -} - -// GetUnfinishedUploads returns the UnfinishedUploads field value if set, zero value otherwise. -func (o *BucketInfo) GetUnfinishedUploads() int32 { - if o == nil || o.UnfinishedUploads == nil { - var ret int32 - return ret - } - return *o.UnfinishedUploads -} - -// GetUnfinishedUploadsOk returns a tuple with the UnfinishedUploads field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BucketInfo) GetUnfinishedUploadsOk() (*int32, bool) { - if o == nil || o.UnfinishedUploads == nil { - return nil, false - } - return o.UnfinishedUploads, true -} - -// HasUnfinishedUploads returns a boolean if a field has been set. -func (o *BucketInfo) HasUnfinishedUploads() bool { - if o != nil && o.UnfinishedUploads != nil { - return true - } - - return false -} - -// SetUnfinishedUploads gets a reference to the given int32 and assigns it to the UnfinishedUploads field. -func (o *BucketInfo) SetUnfinishedUploads(v int32) { - o.UnfinishedUploads = &v -} - -// GetQuotas returns the Quotas field value if set, zero value otherwise. -func (o *BucketInfo) GetQuotas() BucketInfoQuotas { - if o == nil || o.Quotas == nil { - var ret BucketInfoQuotas - return ret - } - return *o.Quotas -} - -// GetQuotasOk returns a tuple with the Quotas field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BucketInfo) GetQuotasOk() (*BucketInfoQuotas, bool) { - if o == nil || o.Quotas == nil { - return nil, false - } - return o.Quotas, true -} - -// HasQuotas returns a boolean if a field has been set. -func (o *BucketInfo) HasQuotas() bool { - if o != nil && o.Quotas != nil { - return true - } - - return false -} - -// SetQuotas gets a reference to the given BucketInfoQuotas and assigns it to the Quotas field. -func (o *BucketInfo) SetQuotas(v BucketInfoQuotas) { - o.Quotas = &v -} - -func (o BucketInfo) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.GlobalAliases != nil { - toSerialize["globalAliases"] = o.GlobalAliases - } - if o.WebsiteAccess != nil { - toSerialize["websiteAccess"] = o.WebsiteAccess - } - if o.WebsiteConfig.IsSet() { - toSerialize["websiteConfig"] = o.WebsiteConfig.Get() - } - if o.Keys != nil { - toSerialize["keys"] = o.Keys - } - if o.Objects != nil { - toSerialize["objects"] = o.Objects - } - if o.Bytes != nil { - toSerialize["bytes"] = o.Bytes - } - if o.UnfinishedUploads != nil { - toSerialize["unfinishedUploads"] = o.UnfinishedUploads - } - if o.Quotas != nil { - toSerialize["quotas"] = o.Quotas - } - return json.Marshal(toSerialize) -} - -type NullableBucketInfo struct { - value *BucketInfo - isSet bool -} - -func (v NullableBucketInfo) Get() *BucketInfo { - return v.value -} - -func (v *NullableBucketInfo) Set(val *BucketInfo) { - v.value = val - v.isSet = true -} - -func (v NullableBucketInfo) IsSet() bool { - return v.isSet -} - -func (v *NullableBucketInfo) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableBucketInfo(val *BucketInfo) *NullableBucketInfo { - return &NullableBucketInfo{value: val, isSet: true} -} - -func (v NullableBucketInfo) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableBucketInfo) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/golang/model_bucket_info_quotas.go b/golang/model_bucket_info_quotas.go deleted file mode 100644 index 025583a..0000000 --- a/golang/model_bucket_info_quotas.go +++ /dev/null @@ -1,171 +0,0 @@ -/* -Garage Administration API v0+garage-v0.8.0 - -Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - -API version: v0.8.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package garage - -import ( - "encoding/json" -) - -// BucketInfoQuotas struct for BucketInfoQuotas -type BucketInfoQuotas struct { - MaxSize NullableInt32 `json:"maxSize,omitempty"` - MaxObjects NullableInt32 `json:"maxObjects,omitempty"` -} - -// NewBucketInfoQuotas instantiates a new BucketInfoQuotas object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewBucketInfoQuotas() *BucketInfoQuotas { - this := BucketInfoQuotas{} - return &this -} - -// NewBucketInfoQuotasWithDefaults instantiates a new BucketInfoQuotas object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewBucketInfoQuotasWithDefaults() *BucketInfoQuotas { - this := BucketInfoQuotas{} - return &this -} - -// GetMaxSize returns the MaxSize field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *BucketInfoQuotas) GetMaxSize() int32 { - if o == nil || o.MaxSize.Get() == nil { - var ret int32 - return ret - } - return *o.MaxSize.Get() -} - -// GetMaxSizeOk returns a tuple with the MaxSize field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *BucketInfoQuotas) GetMaxSizeOk() (*int32, bool) { - if o == nil { - return nil, false - } - return o.MaxSize.Get(), o.MaxSize.IsSet() -} - -// HasMaxSize returns a boolean if a field has been set. -func (o *BucketInfoQuotas) HasMaxSize() bool { - if o != nil && o.MaxSize.IsSet() { - return true - } - - return false -} - -// SetMaxSize gets a reference to the given NullableInt32 and assigns it to the MaxSize field. -func (o *BucketInfoQuotas) SetMaxSize(v int32) { - o.MaxSize.Set(&v) -} -// SetMaxSizeNil sets the value for MaxSize to be an explicit nil -func (o *BucketInfoQuotas) SetMaxSizeNil() { - o.MaxSize.Set(nil) -} - -// UnsetMaxSize ensures that no value is present for MaxSize, not even an explicit nil -func (o *BucketInfoQuotas) UnsetMaxSize() { - o.MaxSize.Unset() -} - -// GetMaxObjects returns the MaxObjects field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *BucketInfoQuotas) GetMaxObjects() int32 { - if o == nil || o.MaxObjects.Get() == nil { - var ret int32 - return ret - } - return *o.MaxObjects.Get() -} - -// GetMaxObjectsOk returns a tuple with the MaxObjects field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *BucketInfoQuotas) GetMaxObjectsOk() (*int32, bool) { - if o == nil { - return nil, false - } - return o.MaxObjects.Get(), o.MaxObjects.IsSet() -} - -// HasMaxObjects returns a boolean if a field has been set. -func (o *BucketInfoQuotas) HasMaxObjects() bool { - if o != nil && o.MaxObjects.IsSet() { - return true - } - - return false -} - -// SetMaxObjects gets a reference to the given NullableInt32 and assigns it to the MaxObjects field. -func (o *BucketInfoQuotas) SetMaxObjects(v int32) { - o.MaxObjects.Set(&v) -} -// SetMaxObjectsNil sets the value for MaxObjects to be an explicit nil -func (o *BucketInfoQuotas) SetMaxObjectsNil() { - o.MaxObjects.Set(nil) -} - -// UnsetMaxObjects ensures that no value is present for MaxObjects, not even an explicit nil -func (o *BucketInfoQuotas) UnsetMaxObjects() { - o.MaxObjects.Unset() -} - -func (o BucketInfoQuotas) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.MaxSize.IsSet() { - toSerialize["maxSize"] = o.MaxSize.Get() - } - if o.MaxObjects.IsSet() { - toSerialize["maxObjects"] = o.MaxObjects.Get() - } - return json.Marshal(toSerialize) -} - -type NullableBucketInfoQuotas struct { - value *BucketInfoQuotas - isSet bool -} - -func (v NullableBucketInfoQuotas) Get() *BucketInfoQuotas { - return v.value -} - -func (v *NullableBucketInfoQuotas) Set(val *BucketInfoQuotas) { - v.value = val - v.isSet = true -} - -func (v NullableBucketInfoQuotas) IsSet() bool { - return v.isSet -} - -func (v *NullableBucketInfoQuotas) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableBucketInfoQuotas(val *BucketInfoQuotas) *NullableBucketInfoQuotas { - return &NullableBucketInfoQuotas{value: val, isSet: true} -} - -func (v NullableBucketInfoQuotas) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableBucketInfoQuotas) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/golang/model_bucket_info_website_config.go b/golang/model_bucket_info_website_config.go deleted file mode 100644 index 21b1ace..0000000 --- a/golang/model_bucket_info_website_config.go +++ /dev/null @@ -1,151 +0,0 @@ -/* -Garage Administration API v0+garage-v0.8.0 - -Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - -API version: v0.8.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package garage - -import ( - "encoding/json" -) - -// BucketInfoWebsiteConfig struct for BucketInfoWebsiteConfig -type BucketInfoWebsiteConfig struct { - IndexDocument *string `json:"indexDocument,omitempty"` - ErrorDocument *string `json:"errorDocument,omitempty"` -} - -// NewBucketInfoWebsiteConfig instantiates a new BucketInfoWebsiteConfig object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewBucketInfoWebsiteConfig() *BucketInfoWebsiteConfig { - this := BucketInfoWebsiteConfig{} - return &this -} - -// NewBucketInfoWebsiteConfigWithDefaults instantiates a new BucketInfoWebsiteConfig object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewBucketInfoWebsiteConfigWithDefaults() *BucketInfoWebsiteConfig { - this := BucketInfoWebsiteConfig{} - return &this -} - -// GetIndexDocument returns the IndexDocument field value if set, zero value otherwise. -func (o *BucketInfoWebsiteConfig) GetIndexDocument() string { - if o == nil || o.IndexDocument == nil { - var ret string - return ret - } - return *o.IndexDocument -} - -// GetIndexDocumentOk returns a tuple with the IndexDocument field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BucketInfoWebsiteConfig) GetIndexDocumentOk() (*string, bool) { - if o == nil || o.IndexDocument == nil { - return nil, false - } - return o.IndexDocument, true -} - -// HasIndexDocument returns a boolean if a field has been set. -func (o *BucketInfoWebsiteConfig) HasIndexDocument() bool { - if o != nil && o.IndexDocument != nil { - return true - } - - return false -} - -// SetIndexDocument gets a reference to the given string and assigns it to the IndexDocument field. -func (o *BucketInfoWebsiteConfig) SetIndexDocument(v string) { - o.IndexDocument = &v -} - -// GetErrorDocument returns the ErrorDocument field value if set, zero value otherwise. -func (o *BucketInfoWebsiteConfig) GetErrorDocument() string { - if o == nil || o.ErrorDocument == nil { - var ret string - return ret - } - return *o.ErrorDocument -} - -// GetErrorDocumentOk returns a tuple with the ErrorDocument field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BucketInfoWebsiteConfig) GetErrorDocumentOk() (*string, bool) { - if o == nil || o.ErrorDocument == nil { - return nil, false - } - return o.ErrorDocument, true -} - -// HasErrorDocument returns a boolean if a field has been set. -func (o *BucketInfoWebsiteConfig) HasErrorDocument() bool { - if o != nil && o.ErrorDocument != nil { - return true - } - - return false -} - -// SetErrorDocument gets a reference to the given string and assigns it to the ErrorDocument field. -func (o *BucketInfoWebsiteConfig) SetErrorDocument(v string) { - o.ErrorDocument = &v -} - -func (o BucketInfoWebsiteConfig) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.IndexDocument != nil { - toSerialize["indexDocument"] = o.IndexDocument - } - if o.ErrorDocument != nil { - toSerialize["errorDocument"] = o.ErrorDocument - } - return json.Marshal(toSerialize) -} - -type NullableBucketInfoWebsiteConfig struct { - value *BucketInfoWebsiteConfig - isSet bool -} - -func (v NullableBucketInfoWebsiteConfig) Get() *BucketInfoWebsiteConfig { - return v.value -} - -func (v *NullableBucketInfoWebsiteConfig) Set(val *BucketInfoWebsiteConfig) { - v.value = val - v.isSet = true -} - -func (v NullableBucketInfoWebsiteConfig) IsSet() bool { - return v.isSet -} - -func (v *NullableBucketInfoWebsiteConfig) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableBucketInfoWebsiteConfig(val *BucketInfoWebsiteConfig) *NullableBucketInfoWebsiteConfig { - return &NullableBucketInfoWebsiteConfig{value: val, isSet: true} -} - -func (v NullableBucketInfoWebsiteConfig) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableBucketInfoWebsiteConfig) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/golang/model_bucket_key_info.go b/golang/model_bucket_key_info.go deleted file mode 100644 index 74d5d38..0000000 --- a/golang/model_bucket_key_info.go +++ /dev/null @@ -1,223 +0,0 @@ -/* -Garage Administration API v0+garage-v0.8.0 - -Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - -API version: v0.8.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package garage - -import ( - "encoding/json" -) - -// BucketKeyInfo struct for BucketKeyInfo -type BucketKeyInfo struct { - AccessKeyId *string `json:"accessKeyId,omitempty"` - Name *string `json:"name,omitempty"` - Permissions *CreateBucketRequestLocalAliasAllow `json:"permissions,omitempty"` - BucketLocalAliases []string `json:"bucketLocalAliases,omitempty"` -} - -// NewBucketKeyInfo instantiates a new BucketKeyInfo object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewBucketKeyInfo() *BucketKeyInfo { - this := BucketKeyInfo{} - return &this -} - -// NewBucketKeyInfoWithDefaults instantiates a new BucketKeyInfo object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewBucketKeyInfoWithDefaults() *BucketKeyInfo { - this := BucketKeyInfo{} - return &this -} - -// GetAccessKeyId returns the AccessKeyId field value if set, zero value otherwise. -func (o *BucketKeyInfo) GetAccessKeyId() string { - if o == nil || o.AccessKeyId == nil { - var ret string - return ret - } - return *o.AccessKeyId -} - -// GetAccessKeyIdOk returns a tuple with the AccessKeyId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BucketKeyInfo) GetAccessKeyIdOk() (*string, bool) { - if o == nil || o.AccessKeyId == nil { - return nil, false - } - return o.AccessKeyId, true -} - -// HasAccessKeyId returns a boolean if a field has been set. -func (o *BucketKeyInfo) HasAccessKeyId() bool { - if o != nil && o.AccessKeyId != nil { - return true - } - - return false -} - -// SetAccessKeyId gets a reference to the given string and assigns it to the AccessKeyId field. -func (o *BucketKeyInfo) SetAccessKeyId(v string) { - o.AccessKeyId = &v -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *BucketKeyInfo) GetName() string { - if o == nil || o.Name == nil { - var ret string - return ret - } - return *o.Name -} - -// GetNameOk returns a tuple with the Name field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BucketKeyInfo) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *BucketKeyInfo) HasName() bool { - if o != nil && o.Name != nil { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *BucketKeyInfo) SetName(v string) { - o.Name = &v -} - -// GetPermissions returns the Permissions field value if set, zero value otherwise. -func (o *BucketKeyInfo) GetPermissions() CreateBucketRequestLocalAliasAllow { - if o == nil || o.Permissions == nil { - var ret CreateBucketRequestLocalAliasAllow - return ret - } - return *o.Permissions -} - -// GetPermissionsOk returns a tuple with the Permissions field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BucketKeyInfo) GetPermissionsOk() (*CreateBucketRequestLocalAliasAllow, bool) { - if o == nil || o.Permissions == nil { - return nil, false - } - return o.Permissions, true -} - -// HasPermissions returns a boolean if a field has been set. -func (o *BucketKeyInfo) HasPermissions() bool { - if o != nil && o.Permissions != nil { - return true - } - - return false -} - -// SetPermissions gets a reference to the given CreateBucketRequestLocalAliasAllow and assigns it to the Permissions field. -func (o *BucketKeyInfo) SetPermissions(v CreateBucketRequestLocalAliasAllow) { - o.Permissions = &v -} - -// GetBucketLocalAliases returns the BucketLocalAliases field value if set, zero value otherwise. -func (o *BucketKeyInfo) GetBucketLocalAliases() []string { - if o == nil || o.BucketLocalAliases == nil { - var ret []string - return ret - } - return o.BucketLocalAliases -} - -// GetBucketLocalAliasesOk returns a tuple with the BucketLocalAliases field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BucketKeyInfo) GetBucketLocalAliasesOk() ([]string, bool) { - if o == nil || o.BucketLocalAliases == nil { - return nil, false - } - return o.BucketLocalAliases, true -} - -// HasBucketLocalAliases returns a boolean if a field has been set. -func (o *BucketKeyInfo) HasBucketLocalAliases() bool { - if o != nil && o.BucketLocalAliases != nil { - return true - } - - return false -} - -// SetBucketLocalAliases gets a reference to the given []string and assigns it to the BucketLocalAliases field. -func (o *BucketKeyInfo) SetBucketLocalAliases(v []string) { - o.BucketLocalAliases = v -} - -func (o BucketKeyInfo) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.AccessKeyId != nil { - toSerialize["accessKeyId"] = o.AccessKeyId - } - if o.Name != nil { - toSerialize["name"] = o.Name - } - if o.Permissions != nil { - toSerialize["permissions"] = o.Permissions - } - if o.BucketLocalAliases != nil { - toSerialize["bucketLocalAliases"] = o.BucketLocalAliases - } - return json.Marshal(toSerialize) -} - -type NullableBucketKeyInfo struct { - value *BucketKeyInfo - isSet bool -} - -func (v NullableBucketKeyInfo) Get() *BucketKeyInfo { - return v.value -} - -func (v *NullableBucketKeyInfo) Set(val *BucketKeyInfo) { - v.value = val - v.isSet = true -} - -func (v NullableBucketKeyInfo) IsSet() bool { - return v.isSet -} - -func (v *NullableBucketKeyInfo) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableBucketKeyInfo(val *BucketKeyInfo) *NullableBucketKeyInfo { - return &NullableBucketKeyInfo{value: val, isSet: true} -} - -func (v NullableBucketKeyInfo) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableBucketKeyInfo) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/golang/model_cluster_layout.go b/golang/model_cluster_layout.go deleted file mode 100644 index 4461b15..0000000 --- a/golang/model_cluster_layout.go +++ /dev/null @@ -1,166 +0,0 @@ -/* -Garage Administration API v0+garage-v0.8.0 - -Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - -API version: v0.8.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package garage - -import ( - "encoding/json" -) - -// ClusterLayout struct for ClusterLayout -type ClusterLayout struct { - Version int32 `json:"version"` - Roles map[string]NodeClusterInfo `json:"roles"` - StagedRoleChanges map[string]NodeClusterInfo `json:"stagedRoleChanges"` -} - -// NewClusterLayout instantiates a new ClusterLayout object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewClusterLayout(version int32, roles map[string]NodeClusterInfo, stagedRoleChanges map[string]NodeClusterInfo) *ClusterLayout { - this := ClusterLayout{} - this.Version = version - this.Roles = roles - this.StagedRoleChanges = stagedRoleChanges - return &this -} - -// NewClusterLayoutWithDefaults instantiates a new ClusterLayout object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewClusterLayoutWithDefaults() *ClusterLayout { - this := ClusterLayout{} - return &this -} - -// GetVersion returns the Version field value -func (o *ClusterLayout) GetVersion() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.Version -} - -// GetVersionOk returns a tuple with the Version field value -// and a boolean to check if the value has been set. -func (o *ClusterLayout) GetVersionOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.Version, true -} - -// SetVersion sets field value -func (o *ClusterLayout) SetVersion(v int32) { - o.Version = v -} - -// GetRoles returns the Roles field value -func (o *ClusterLayout) GetRoles() map[string]NodeClusterInfo { - if o == nil { - var ret map[string]NodeClusterInfo - return ret - } - - return o.Roles -} - -// GetRolesOk returns a tuple with the Roles field value -// and a boolean to check if the value has been set. -func (o *ClusterLayout) GetRolesOk() (*map[string]NodeClusterInfo, bool) { - if o == nil { - return nil, false - } - return &o.Roles, true -} - -// SetRoles sets field value -func (o *ClusterLayout) SetRoles(v map[string]NodeClusterInfo) { - o.Roles = v -} - -// GetStagedRoleChanges returns the StagedRoleChanges field value -func (o *ClusterLayout) GetStagedRoleChanges() map[string]NodeClusterInfo { - if o == nil { - var ret map[string]NodeClusterInfo - return ret - } - - return o.StagedRoleChanges -} - -// GetStagedRoleChangesOk returns a tuple with the StagedRoleChanges field value -// and a boolean to check if the value has been set. -func (o *ClusterLayout) GetStagedRoleChangesOk() (*map[string]NodeClusterInfo, bool) { - if o == nil { - return nil, false - } - return &o.StagedRoleChanges, true -} - -// SetStagedRoleChanges sets field value -func (o *ClusterLayout) SetStagedRoleChanges(v map[string]NodeClusterInfo) { - o.StagedRoleChanges = v -} - -func (o ClusterLayout) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["version"] = o.Version - } - if true { - toSerialize["roles"] = o.Roles - } - if true { - toSerialize["stagedRoleChanges"] = o.StagedRoleChanges - } - return json.Marshal(toSerialize) -} - -type NullableClusterLayout struct { - value *ClusterLayout - isSet bool -} - -func (v NullableClusterLayout) Get() *ClusterLayout { - return v.value -} - -func (v *NullableClusterLayout) Set(val *ClusterLayout) { - v.value = val - v.isSet = true -} - -func (v NullableClusterLayout) IsSet() bool { - return v.isSet -} - -func (v *NullableClusterLayout) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableClusterLayout(val *ClusterLayout) *NullableClusterLayout { - return &NullableClusterLayout{value: val, isSet: true} -} - -func (v NullableClusterLayout) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableClusterLayout) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/golang/model_create_bucket_request.go b/golang/model_create_bucket_request.go deleted file mode 100644 index 87b7c95..0000000 --- a/golang/model_create_bucket_request.go +++ /dev/null @@ -1,151 +0,0 @@ -/* -Garage Administration API v0+garage-v0.8.0 - -Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - -API version: v0.8.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package garage - -import ( - "encoding/json" -) - -// CreateBucketRequest struct for CreateBucketRequest -type CreateBucketRequest struct { - GlobalAlias *string `json:"globalAlias,omitempty"` - LocalAlias *CreateBucketRequestLocalAlias `json:"localAlias,omitempty"` -} - -// NewCreateBucketRequest instantiates a new CreateBucketRequest object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewCreateBucketRequest() *CreateBucketRequest { - this := CreateBucketRequest{} - return &this -} - -// NewCreateBucketRequestWithDefaults instantiates a new CreateBucketRequest object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewCreateBucketRequestWithDefaults() *CreateBucketRequest { - this := CreateBucketRequest{} - return &this -} - -// GetGlobalAlias returns the GlobalAlias field value if set, zero value otherwise. -func (o *CreateBucketRequest) GetGlobalAlias() string { - if o == nil || o.GlobalAlias == nil { - var ret string - return ret - } - return *o.GlobalAlias -} - -// GetGlobalAliasOk returns a tuple with the GlobalAlias field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateBucketRequest) GetGlobalAliasOk() (*string, bool) { - if o == nil || o.GlobalAlias == nil { - return nil, false - } - return o.GlobalAlias, true -} - -// HasGlobalAlias returns a boolean if a field has been set. -func (o *CreateBucketRequest) HasGlobalAlias() bool { - if o != nil && o.GlobalAlias != nil { - return true - } - - return false -} - -// SetGlobalAlias gets a reference to the given string and assigns it to the GlobalAlias field. -func (o *CreateBucketRequest) SetGlobalAlias(v string) { - o.GlobalAlias = &v -} - -// GetLocalAlias returns the LocalAlias field value if set, zero value otherwise. -func (o *CreateBucketRequest) GetLocalAlias() CreateBucketRequestLocalAlias { - if o == nil || o.LocalAlias == nil { - var ret CreateBucketRequestLocalAlias - return ret - } - return *o.LocalAlias -} - -// GetLocalAliasOk returns a tuple with the LocalAlias field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateBucketRequest) GetLocalAliasOk() (*CreateBucketRequestLocalAlias, bool) { - if o == nil || o.LocalAlias == nil { - return nil, false - } - return o.LocalAlias, true -} - -// HasLocalAlias returns a boolean if a field has been set. -func (o *CreateBucketRequest) HasLocalAlias() bool { - if o != nil && o.LocalAlias != nil { - return true - } - - return false -} - -// SetLocalAlias gets a reference to the given CreateBucketRequestLocalAlias and assigns it to the LocalAlias field. -func (o *CreateBucketRequest) SetLocalAlias(v CreateBucketRequestLocalAlias) { - o.LocalAlias = &v -} - -func (o CreateBucketRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.GlobalAlias != nil { - toSerialize["globalAlias"] = o.GlobalAlias - } - if o.LocalAlias != nil { - toSerialize["localAlias"] = o.LocalAlias - } - return json.Marshal(toSerialize) -} - -type NullableCreateBucketRequest struct { - value *CreateBucketRequest - isSet bool -} - -func (v NullableCreateBucketRequest) Get() *CreateBucketRequest { - return v.value -} - -func (v *NullableCreateBucketRequest) Set(val *CreateBucketRequest) { - v.value = val - v.isSet = true -} - -func (v NullableCreateBucketRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableCreateBucketRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCreateBucketRequest(val *CreateBucketRequest) *NullableCreateBucketRequest { - return &NullableCreateBucketRequest{value: val, isSet: true} -} - -func (v NullableCreateBucketRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCreateBucketRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/golang/model_create_bucket_request_local_alias.go b/golang/model_create_bucket_request_local_alias.go deleted file mode 100644 index bf2661e..0000000 --- a/golang/model_create_bucket_request_local_alias.go +++ /dev/null @@ -1,187 +0,0 @@ -/* -Garage Administration API v0+garage-v0.8.0 - -Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - -API version: v0.8.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package garage - -import ( - "encoding/json" -) - -// CreateBucketRequestLocalAlias struct for CreateBucketRequestLocalAlias -type CreateBucketRequestLocalAlias struct { - AccessKeyId *string `json:"accessKeyId,omitempty"` - Alias *string `json:"alias,omitempty"` - Allow *CreateBucketRequestLocalAliasAllow `json:"allow,omitempty"` -} - -// NewCreateBucketRequestLocalAlias instantiates a new CreateBucketRequestLocalAlias object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewCreateBucketRequestLocalAlias() *CreateBucketRequestLocalAlias { - this := CreateBucketRequestLocalAlias{} - return &this -} - -// NewCreateBucketRequestLocalAliasWithDefaults instantiates a new CreateBucketRequestLocalAlias object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewCreateBucketRequestLocalAliasWithDefaults() *CreateBucketRequestLocalAlias { - this := CreateBucketRequestLocalAlias{} - return &this -} - -// GetAccessKeyId returns the AccessKeyId field value if set, zero value otherwise. -func (o *CreateBucketRequestLocalAlias) GetAccessKeyId() string { - if o == nil || o.AccessKeyId == nil { - var ret string - return ret - } - return *o.AccessKeyId -} - -// GetAccessKeyIdOk returns a tuple with the AccessKeyId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateBucketRequestLocalAlias) GetAccessKeyIdOk() (*string, bool) { - if o == nil || o.AccessKeyId == nil { - return nil, false - } - return o.AccessKeyId, true -} - -// HasAccessKeyId returns a boolean if a field has been set. -func (o *CreateBucketRequestLocalAlias) HasAccessKeyId() bool { - if o != nil && o.AccessKeyId != nil { - return true - } - - return false -} - -// SetAccessKeyId gets a reference to the given string and assigns it to the AccessKeyId field. -func (o *CreateBucketRequestLocalAlias) SetAccessKeyId(v string) { - o.AccessKeyId = &v -} - -// GetAlias returns the Alias field value if set, zero value otherwise. -func (o *CreateBucketRequestLocalAlias) GetAlias() string { - if o == nil || o.Alias == nil { - var ret string - return ret - } - return *o.Alias -} - -// GetAliasOk returns a tuple with the Alias field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateBucketRequestLocalAlias) GetAliasOk() (*string, bool) { - if o == nil || o.Alias == nil { - return nil, false - } - return o.Alias, true -} - -// HasAlias returns a boolean if a field has been set. -func (o *CreateBucketRequestLocalAlias) HasAlias() bool { - if o != nil && o.Alias != nil { - return true - } - - return false -} - -// SetAlias gets a reference to the given string and assigns it to the Alias field. -func (o *CreateBucketRequestLocalAlias) SetAlias(v string) { - o.Alias = &v -} - -// GetAllow returns the Allow field value if set, zero value otherwise. -func (o *CreateBucketRequestLocalAlias) GetAllow() CreateBucketRequestLocalAliasAllow { - if o == nil || o.Allow == nil { - var ret CreateBucketRequestLocalAliasAllow - return ret - } - return *o.Allow -} - -// GetAllowOk returns a tuple with the Allow field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateBucketRequestLocalAlias) GetAllowOk() (*CreateBucketRequestLocalAliasAllow, bool) { - if o == nil || o.Allow == nil { - return nil, false - } - return o.Allow, true -} - -// HasAllow returns a boolean if a field has been set. -func (o *CreateBucketRequestLocalAlias) HasAllow() bool { - if o != nil && o.Allow != nil { - return true - } - - return false -} - -// SetAllow gets a reference to the given CreateBucketRequestLocalAliasAllow and assigns it to the Allow field. -func (o *CreateBucketRequestLocalAlias) SetAllow(v CreateBucketRequestLocalAliasAllow) { - o.Allow = &v -} - -func (o CreateBucketRequestLocalAlias) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.AccessKeyId != nil { - toSerialize["accessKeyId"] = o.AccessKeyId - } - if o.Alias != nil { - toSerialize["alias"] = o.Alias - } - if o.Allow != nil { - toSerialize["allow"] = o.Allow - } - return json.Marshal(toSerialize) -} - -type NullableCreateBucketRequestLocalAlias struct { - value *CreateBucketRequestLocalAlias - isSet bool -} - -func (v NullableCreateBucketRequestLocalAlias) Get() *CreateBucketRequestLocalAlias { - return v.value -} - -func (v *NullableCreateBucketRequestLocalAlias) Set(val *CreateBucketRequestLocalAlias) { - v.value = val - v.isSet = true -} - -func (v NullableCreateBucketRequestLocalAlias) IsSet() bool { - return v.isSet -} - -func (v *NullableCreateBucketRequestLocalAlias) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCreateBucketRequestLocalAlias(val *CreateBucketRequestLocalAlias) *NullableCreateBucketRequestLocalAlias { - return &NullableCreateBucketRequestLocalAlias{value: val, isSet: true} -} - -func (v NullableCreateBucketRequestLocalAlias) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCreateBucketRequestLocalAlias) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/golang/model_create_bucket_request_local_alias_allow.go b/golang/model_create_bucket_request_local_alias_allow.go deleted file mode 100644 index 8a3344c..0000000 --- a/golang/model_create_bucket_request_local_alias_allow.go +++ /dev/null @@ -1,187 +0,0 @@ -/* -Garage Administration API v0+garage-v0.8.0 - -Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - -API version: v0.8.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package garage - -import ( - "encoding/json" -) - -// CreateBucketRequestLocalAliasAllow struct for CreateBucketRequestLocalAliasAllow -type CreateBucketRequestLocalAliasAllow struct { - Read *bool `json:"read,omitempty"` - Write *bool `json:"write,omitempty"` - Owner *bool `json:"owner,omitempty"` -} - -// NewCreateBucketRequestLocalAliasAllow instantiates a new CreateBucketRequestLocalAliasAllow object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewCreateBucketRequestLocalAliasAllow() *CreateBucketRequestLocalAliasAllow { - this := CreateBucketRequestLocalAliasAllow{} - return &this -} - -// NewCreateBucketRequestLocalAliasAllowWithDefaults instantiates a new CreateBucketRequestLocalAliasAllow object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewCreateBucketRequestLocalAliasAllowWithDefaults() *CreateBucketRequestLocalAliasAllow { - this := CreateBucketRequestLocalAliasAllow{} - return &this -} - -// GetRead returns the Read field value if set, zero value otherwise. -func (o *CreateBucketRequestLocalAliasAllow) GetRead() bool { - if o == nil || o.Read == nil { - var ret bool - return ret - } - return *o.Read -} - -// GetReadOk returns a tuple with the Read field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateBucketRequestLocalAliasAllow) GetReadOk() (*bool, bool) { - if o == nil || o.Read == nil { - return nil, false - } - return o.Read, true -} - -// HasRead returns a boolean if a field has been set. -func (o *CreateBucketRequestLocalAliasAllow) HasRead() bool { - if o != nil && o.Read != nil { - return true - } - - return false -} - -// SetRead gets a reference to the given bool and assigns it to the Read field. -func (o *CreateBucketRequestLocalAliasAllow) SetRead(v bool) { - o.Read = &v -} - -// GetWrite returns the Write field value if set, zero value otherwise. -func (o *CreateBucketRequestLocalAliasAllow) GetWrite() bool { - if o == nil || o.Write == nil { - var ret bool - return ret - } - return *o.Write -} - -// GetWriteOk returns a tuple with the Write field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateBucketRequestLocalAliasAllow) GetWriteOk() (*bool, bool) { - if o == nil || o.Write == nil { - return nil, false - } - return o.Write, true -} - -// HasWrite returns a boolean if a field has been set. -func (o *CreateBucketRequestLocalAliasAllow) HasWrite() bool { - if o != nil && o.Write != nil { - return true - } - - return false -} - -// SetWrite gets a reference to the given bool and assigns it to the Write field. -func (o *CreateBucketRequestLocalAliasAllow) SetWrite(v bool) { - o.Write = &v -} - -// GetOwner returns the Owner field value if set, zero value otherwise. -func (o *CreateBucketRequestLocalAliasAllow) GetOwner() bool { - if o == nil || o.Owner == nil { - var ret bool - return ret - } - return *o.Owner -} - -// GetOwnerOk returns a tuple with the Owner field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateBucketRequestLocalAliasAllow) GetOwnerOk() (*bool, bool) { - if o == nil || o.Owner == nil { - return nil, false - } - return o.Owner, true -} - -// HasOwner returns a boolean if a field has been set. -func (o *CreateBucketRequestLocalAliasAllow) HasOwner() bool { - if o != nil && o.Owner != nil { - return true - } - - return false -} - -// SetOwner gets a reference to the given bool and assigns it to the Owner field. -func (o *CreateBucketRequestLocalAliasAllow) SetOwner(v bool) { - o.Owner = &v -} - -func (o CreateBucketRequestLocalAliasAllow) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Read != nil { - toSerialize["read"] = o.Read - } - if o.Write != nil { - toSerialize["write"] = o.Write - } - if o.Owner != nil { - toSerialize["owner"] = o.Owner - } - return json.Marshal(toSerialize) -} - -type NullableCreateBucketRequestLocalAliasAllow struct { - value *CreateBucketRequestLocalAliasAllow - isSet bool -} - -func (v NullableCreateBucketRequestLocalAliasAllow) Get() *CreateBucketRequestLocalAliasAllow { - return v.value -} - -func (v *NullableCreateBucketRequestLocalAliasAllow) Set(val *CreateBucketRequestLocalAliasAllow) { - v.value = val - v.isSet = true -} - -func (v NullableCreateBucketRequestLocalAliasAllow) IsSet() bool { - return v.isSet -} - -func (v *NullableCreateBucketRequestLocalAliasAllow) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCreateBucketRequestLocalAliasAllow(val *CreateBucketRequestLocalAliasAllow) *NullableCreateBucketRequestLocalAliasAllow { - return &NullableCreateBucketRequestLocalAliasAllow{value: val, isSet: true} -} - -func (v NullableCreateBucketRequestLocalAliasAllow) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCreateBucketRequestLocalAliasAllow) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/golang/model_get_nodes_200_response.go b/golang/model_get_nodes_200_response.go deleted file mode 100644 index 4c613c8..0000000 --- a/golang/model_get_nodes_200_response.go +++ /dev/null @@ -1,195 +0,0 @@ -/* -Garage Administration API v0+garage-v0.8.0 - -Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - -API version: v0.8.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package garage - -import ( - "encoding/json" -) - -// GetNodes200Response struct for GetNodes200Response -type GetNodes200Response struct { - Node string `json:"node"` - GarageVersion string `json:"garageVersion"` - KnownNodes map[string]NodeNetworkInfo `json:"knownNodes"` - Layout ClusterLayout `json:"layout"` -} - -// NewGetNodes200Response instantiates a new GetNodes200Response object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetNodes200Response(node string, garageVersion string, knownNodes map[string]NodeNetworkInfo, layout ClusterLayout) *GetNodes200Response { - this := GetNodes200Response{} - this.Node = node - this.GarageVersion = garageVersion - this.KnownNodes = knownNodes - this.Layout = layout - return &this -} - -// NewGetNodes200ResponseWithDefaults instantiates a new GetNodes200Response object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetNodes200ResponseWithDefaults() *GetNodes200Response { - this := GetNodes200Response{} - return &this -} - -// GetNode returns the Node field value -func (o *GetNodes200Response) GetNode() string { - if o == nil { - var ret string - return ret - } - - return o.Node -} - -// GetNodeOk returns a tuple with the Node field value -// and a boolean to check if the value has been set. -func (o *GetNodes200Response) GetNodeOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Node, true -} - -// SetNode sets field value -func (o *GetNodes200Response) SetNode(v string) { - o.Node = v -} - -// GetGarageVersion returns the GarageVersion field value -func (o *GetNodes200Response) GetGarageVersion() string { - if o == nil { - var ret string - return ret - } - - return o.GarageVersion -} - -// GetGarageVersionOk returns a tuple with the GarageVersion field value -// and a boolean to check if the value has been set. -func (o *GetNodes200Response) GetGarageVersionOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.GarageVersion, true -} - -// SetGarageVersion sets field value -func (o *GetNodes200Response) SetGarageVersion(v string) { - o.GarageVersion = v -} - -// GetKnownNodes returns the KnownNodes field value -func (o *GetNodes200Response) GetKnownNodes() map[string]NodeNetworkInfo { - if o == nil { - var ret map[string]NodeNetworkInfo - return ret - } - - return o.KnownNodes -} - -// GetKnownNodesOk returns a tuple with the KnownNodes field value -// and a boolean to check if the value has been set. -func (o *GetNodes200Response) GetKnownNodesOk() (*map[string]NodeNetworkInfo, bool) { - if o == nil { - return nil, false - } - return &o.KnownNodes, true -} - -// SetKnownNodes sets field value -func (o *GetNodes200Response) SetKnownNodes(v map[string]NodeNetworkInfo) { - o.KnownNodes = v -} - -// GetLayout returns the Layout field value -func (o *GetNodes200Response) GetLayout() ClusterLayout { - if o == nil { - var ret ClusterLayout - return ret - } - - return o.Layout -} - -// GetLayoutOk returns a tuple with the Layout field value -// and a boolean to check if the value has been set. -func (o *GetNodes200Response) GetLayoutOk() (*ClusterLayout, bool) { - if o == nil { - return nil, false - } - return &o.Layout, true -} - -// SetLayout sets field value -func (o *GetNodes200Response) SetLayout(v ClusterLayout) { - o.Layout = v -} - -func (o GetNodes200Response) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["node"] = o.Node - } - if true { - toSerialize["garageVersion"] = o.GarageVersion - } - if true { - toSerialize["knownNodes"] = o.KnownNodes - } - if true { - toSerialize["layout"] = o.Layout - } - return json.Marshal(toSerialize) -} - -type NullableGetNodes200Response struct { - value *GetNodes200Response - isSet bool -} - -func (v NullableGetNodes200Response) Get() *GetNodes200Response { - return v.value -} - -func (v *NullableGetNodes200Response) Set(val *GetNodes200Response) { - v.value = val - v.isSet = true -} - -func (v NullableGetNodes200Response) IsSet() bool { - return v.isSet -} - -func (v *NullableGetNodes200Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetNodes200Response(val *GetNodes200Response) *NullableGetNodes200Response { - return &NullableGetNodes200Response{value: val, isSet: true} -} - -func (v NullableGetNodes200Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetNodes200Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/golang/model_import_key_request.go b/golang/model_import_key_request.go deleted file mode 100644 index 7411b85..0000000 --- a/golang/model_import_key_request.go +++ /dev/null @@ -1,166 +0,0 @@ -/* -Garage Administration API v0+garage-v0.8.0 - -Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - -API version: v0.8.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package garage - -import ( - "encoding/json" -) - -// ImportKeyRequest struct for ImportKeyRequest -type ImportKeyRequest struct { - Name string `json:"name"` - AccessKeyId string `json:"accessKeyId"` - SecretAccessKey string `json:"secretAccessKey"` -} - -// NewImportKeyRequest instantiates a new ImportKeyRequest object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewImportKeyRequest(name string, accessKeyId string, secretAccessKey string) *ImportKeyRequest { - this := ImportKeyRequest{} - this.Name = name - this.AccessKeyId = accessKeyId - this.SecretAccessKey = secretAccessKey - return &this -} - -// NewImportKeyRequestWithDefaults instantiates a new ImportKeyRequest object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewImportKeyRequestWithDefaults() *ImportKeyRequest { - this := ImportKeyRequest{} - return &this -} - -// GetName returns the Name field value -func (o *ImportKeyRequest) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *ImportKeyRequest) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *ImportKeyRequest) SetName(v string) { - o.Name = v -} - -// GetAccessKeyId returns the AccessKeyId field value -func (o *ImportKeyRequest) GetAccessKeyId() string { - if o == nil { - var ret string - return ret - } - - return o.AccessKeyId -} - -// GetAccessKeyIdOk returns a tuple with the AccessKeyId field value -// and a boolean to check if the value has been set. -func (o *ImportKeyRequest) GetAccessKeyIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.AccessKeyId, true -} - -// SetAccessKeyId sets field value -func (o *ImportKeyRequest) SetAccessKeyId(v string) { - o.AccessKeyId = v -} - -// GetSecretAccessKey returns the SecretAccessKey field value -func (o *ImportKeyRequest) GetSecretAccessKey() string { - if o == nil { - var ret string - return ret - } - - return o.SecretAccessKey -} - -// GetSecretAccessKeyOk returns a tuple with the SecretAccessKey field value -// and a boolean to check if the value has been set. -func (o *ImportKeyRequest) GetSecretAccessKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.SecretAccessKey, true -} - -// SetSecretAccessKey sets field value -func (o *ImportKeyRequest) SetSecretAccessKey(v string) { - o.SecretAccessKey = v -} - -func (o ImportKeyRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["name"] = o.Name - } - if true { - toSerialize["accessKeyId"] = o.AccessKeyId - } - if true { - toSerialize["secretAccessKey"] = o.SecretAccessKey - } - return json.Marshal(toSerialize) -} - -type NullableImportKeyRequest struct { - value *ImportKeyRequest - isSet bool -} - -func (v NullableImportKeyRequest) Get() *ImportKeyRequest { - return v.value -} - -func (v *NullableImportKeyRequest) Set(val *ImportKeyRequest) { - v.value = val - v.isSet = true -} - -func (v NullableImportKeyRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableImportKeyRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableImportKeyRequest(val *ImportKeyRequest) *NullableImportKeyRequest { - return &NullableImportKeyRequest{value: val, isSet: true} -} - -func (v NullableImportKeyRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableImportKeyRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/golang/model_key_info.go b/golang/model_key_info.go deleted file mode 100644 index 4ac8071..0000000 --- a/golang/model_key_info.go +++ /dev/null @@ -1,259 +0,0 @@ -/* -Garage Administration API v0+garage-v0.8.0 - -Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - -API version: v0.8.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package garage - -import ( - "encoding/json" -) - -// KeyInfo struct for KeyInfo -type KeyInfo struct { - Name *string `json:"name,omitempty"` - AccessKeyId *string `json:"accessKeyId,omitempty"` - SecretAccessKey *string `json:"secretAccessKey,omitempty"` - Permissions *KeyInfoPermissions `json:"permissions,omitempty"` - Buckets []KeyInfoBucketsInner `json:"buckets,omitempty"` -} - -// NewKeyInfo instantiates a new KeyInfo object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewKeyInfo() *KeyInfo { - this := KeyInfo{} - return &this -} - -// NewKeyInfoWithDefaults instantiates a new KeyInfo object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewKeyInfoWithDefaults() *KeyInfo { - this := KeyInfo{} - return &this -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *KeyInfo) GetName() string { - if o == nil || o.Name == nil { - var ret string - return ret - } - return *o.Name -} - -// GetNameOk returns a tuple with the Name field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *KeyInfo) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *KeyInfo) HasName() bool { - if o != nil && o.Name != nil { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *KeyInfo) SetName(v string) { - o.Name = &v -} - -// GetAccessKeyId returns the AccessKeyId field value if set, zero value otherwise. -func (o *KeyInfo) GetAccessKeyId() string { - if o == nil || o.AccessKeyId == nil { - var ret string - return ret - } - return *o.AccessKeyId -} - -// GetAccessKeyIdOk returns a tuple with the AccessKeyId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *KeyInfo) GetAccessKeyIdOk() (*string, bool) { - if o == nil || o.AccessKeyId == nil { - return nil, false - } - return o.AccessKeyId, true -} - -// HasAccessKeyId returns a boolean if a field has been set. -func (o *KeyInfo) HasAccessKeyId() bool { - if o != nil && o.AccessKeyId != nil { - return true - } - - return false -} - -// SetAccessKeyId gets a reference to the given string and assigns it to the AccessKeyId field. -func (o *KeyInfo) SetAccessKeyId(v string) { - o.AccessKeyId = &v -} - -// GetSecretAccessKey returns the SecretAccessKey field value if set, zero value otherwise. -func (o *KeyInfo) GetSecretAccessKey() string { - if o == nil || o.SecretAccessKey == nil { - var ret string - return ret - } - return *o.SecretAccessKey -} - -// GetSecretAccessKeyOk returns a tuple with the SecretAccessKey field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *KeyInfo) GetSecretAccessKeyOk() (*string, bool) { - if o == nil || o.SecretAccessKey == nil { - return nil, false - } - return o.SecretAccessKey, true -} - -// HasSecretAccessKey returns a boolean if a field has been set. -func (o *KeyInfo) HasSecretAccessKey() bool { - if o != nil && o.SecretAccessKey != nil { - return true - } - - return false -} - -// SetSecretAccessKey gets a reference to the given string and assigns it to the SecretAccessKey field. -func (o *KeyInfo) SetSecretAccessKey(v string) { - o.SecretAccessKey = &v -} - -// GetPermissions returns the Permissions field value if set, zero value otherwise. -func (o *KeyInfo) GetPermissions() KeyInfoPermissions { - if o == nil || o.Permissions == nil { - var ret KeyInfoPermissions - return ret - } - return *o.Permissions -} - -// GetPermissionsOk returns a tuple with the Permissions field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *KeyInfo) GetPermissionsOk() (*KeyInfoPermissions, bool) { - if o == nil || o.Permissions == nil { - return nil, false - } - return o.Permissions, true -} - -// HasPermissions returns a boolean if a field has been set. -func (o *KeyInfo) HasPermissions() bool { - if o != nil && o.Permissions != nil { - return true - } - - return false -} - -// SetPermissions gets a reference to the given KeyInfoPermissions and assigns it to the Permissions field. -func (o *KeyInfo) SetPermissions(v KeyInfoPermissions) { - o.Permissions = &v -} - -// GetBuckets returns the Buckets field value if set, zero value otherwise. -func (o *KeyInfo) GetBuckets() []KeyInfoBucketsInner { - if o == nil || o.Buckets == nil { - var ret []KeyInfoBucketsInner - return ret - } - return o.Buckets -} - -// GetBucketsOk returns a tuple with the Buckets field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *KeyInfo) GetBucketsOk() ([]KeyInfoBucketsInner, bool) { - if o == nil || o.Buckets == nil { - return nil, false - } - return o.Buckets, true -} - -// HasBuckets returns a boolean if a field has been set. -func (o *KeyInfo) HasBuckets() bool { - if o != nil && o.Buckets != nil { - return true - } - - return false -} - -// SetBuckets gets a reference to the given []KeyInfoBucketsInner and assigns it to the Buckets field. -func (o *KeyInfo) SetBuckets(v []KeyInfoBucketsInner) { - o.Buckets = v -} - -func (o KeyInfo) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Name != nil { - toSerialize["name"] = o.Name - } - if o.AccessKeyId != nil { - toSerialize["accessKeyId"] = o.AccessKeyId - } - if o.SecretAccessKey != nil { - toSerialize["secretAccessKey"] = o.SecretAccessKey - } - if o.Permissions != nil { - toSerialize["permissions"] = o.Permissions - } - if o.Buckets != nil { - toSerialize["buckets"] = o.Buckets - } - return json.Marshal(toSerialize) -} - -type NullableKeyInfo struct { - value *KeyInfo - isSet bool -} - -func (v NullableKeyInfo) Get() *KeyInfo { - return v.value -} - -func (v *NullableKeyInfo) Set(val *KeyInfo) { - v.value = val - v.isSet = true -} - -func (v NullableKeyInfo) IsSet() bool { - return v.isSet -} - -func (v *NullableKeyInfo) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableKeyInfo(val *KeyInfo) *NullableKeyInfo { - return &NullableKeyInfo{value: val, isSet: true} -} - -func (v NullableKeyInfo) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableKeyInfo) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/golang/model_key_info_buckets_inner.go b/golang/model_key_info_buckets_inner.go deleted file mode 100644 index 28f8927..0000000 --- a/golang/model_key_info_buckets_inner.go +++ /dev/null @@ -1,223 +0,0 @@ -/* -Garage Administration API v0+garage-v0.8.0 - -Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - -API version: v0.8.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package garage - -import ( - "encoding/json" -) - -// KeyInfoBucketsInner struct for KeyInfoBucketsInner -type KeyInfoBucketsInner struct { - Id *string `json:"id,omitempty"` - GlobalAliases []string `json:"globalAliases,omitempty"` - LocalAliases []string `json:"localAliases,omitempty"` - Permissions *KeyInfoBucketsInnerPermissions `json:"permissions,omitempty"` -} - -// NewKeyInfoBucketsInner instantiates a new KeyInfoBucketsInner object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewKeyInfoBucketsInner() *KeyInfoBucketsInner { - this := KeyInfoBucketsInner{} - return &this -} - -// NewKeyInfoBucketsInnerWithDefaults instantiates a new KeyInfoBucketsInner object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewKeyInfoBucketsInnerWithDefaults() *KeyInfoBucketsInner { - this := KeyInfoBucketsInner{} - return &this -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *KeyInfoBucketsInner) GetId() string { - if o == nil || o.Id == nil { - var ret string - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *KeyInfoBucketsInner) GetIdOk() (*string, bool) { - if o == nil || o.Id == nil { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *KeyInfoBucketsInner) HasId() bool { - if o != nil && o.Id != nil { - return true - } - - return false -} - -// SetId gets a reference to the given string and assigns it to the Id field. -func (o *KeyInfoBucketsInner) SetId(v string) { - o.Id = &v -} - -// GetGlobalAliases returns the GlobalAliases field value if set, zero value otherwise. -func (o *KeyInfoBucketsInner) GetGlobalAliases() []string { - if o == nil || o.GlobalAliases == nil { - var ret []string - return ret - } - return o.GlobalAliases -} - -// GetGlobalAliasesOk returns a tuple with the GlobalAliases field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *KeyInfoBucketsInner) GetGlobalAliasesOk() ([]string, bool) { - if o == nil || o.GlobalAliases == nil { - return nil, false - } - return o.GlobalAliases, true -} - -// HasGlobalAliases returns a boolean if a field has been set. -func (o *KeyInfoBucketsInner) HasGlobalAliases() bool { - if o != nil && o.GlobalAliases != nil { - return true - } - - return false -} - -// SetGlobalAliases gets a reference to the given []string and assigns it to the GlobalAliases field. -func (o *KeyInfoBucketsInner) SetGlobalAliases(v []string) { - o.GlobalAliases = v -} - -// GetLocalAliases returns the LocalAliases field value if set, zero value otherwise. -func (o *KeyInfoBucketsInner) GetLocalAliases() []string { - if o == nil || o.LocalAliases == nil { - var ret []string - return ret - } - return o.LocalAliases -} - -// GetLocalAliasesOk returns a tuple with the LocalAliases field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *KeyInfoBucketsInner) GetLocalAliasesOk() ([]string, bool) { - if o == nil || o.LocalAliases == nil { - return nil, false - } - return o.LocalAliases, true -} - -// HasLocalAliases returns a boolean if a field has been set. -func (o *KeyInfoBucketsInner) HasLocalAliases() bool { - if o != nil && o.LocalAliases != nil { - return true - } - - return false -} - -// SetLocalAliases gets a reference to the given []string and assigns it to the LocalAliases field. -func (o *KeyInfoBucketsInner) SetLocalAliases(v []string) { - o.LocalAliases = v -} - -// GetPermissions returns the Permissions field value if set, zero value otherwise. -func (o *KeyInfoBucketsInner) GetPermissions() KeyInfoBucketsInnerPermissions { - if o == nil || o.Permissions == nil { - var ret KeyInfoBucketsInnerPermissions - return ret - } - return *o.Permissions -} - -// GetPermissionsOk returns a tuple with the Permissions field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *KeyInfoBucketsInner) GetPermissionsOk() (*KeyInfoBucketsInnerPermissions, bool) { - if o == nil || o.Permissions == nil { - return nil, false - } - return o.Permissions, true -} - -// HasPermissions returns a boolean if a field has been set. -func (o *KeyInfoBucketsInner) HasPermissions() bool { - if o != nil && o.Permissions != nil { - return true - } - - return false -} - -// SetPermissions gets a reference to the given KeyInfoBucketsInnerPermissions and assigns it to the Permissions field. -func (o *KeyInfoBucketsInner) SetPermissions(v KeyInfoBucketsInnerPermissions) { - o.Permissions = &v -} - -func (o KeyInfoBucketsInner) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.GlobalAliases != nil { - toSerialize["globalAliases"] = o.GlobalAliases - } - if o.LocalAliases != nil { - toSerialize["localAliases"] = o.LocalAliases - } - if o.Permissions != nil { - toSerialize["permissions"] = o.Permissions - } - return json.Marshal(toSerialize) -} - -type NullableKeyInfoBucketsInner struct { - value *KeyInfoBucketsInner - isSet bool -} - -func (v NullableKeyInfoBucketsInner) Get() *KeyInfoBucketsInner { - return v.value -} - -func (v *NullableKeyInfoBucketsInner) Set(val *KeyInfoBucketsInner) { - v.value = val - v.isSet = true -} - -func (v NullableKeyInfoBucketsInner) IsSet() bool { - return v.isSet -} - -func (v *NullableKeyInfoBucketsInner) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableKeyInfoBucketsInner(val *KeyInfoBucketsInner) *NullableKeyInfoBucketsInner { - return &NullableKeyInfoBucketsInner{value: val, isSet: true} -} - -func (v NullableKeyInfoBucketsInner) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableKeyInfoBucketsInner) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/golang/model_key_info_buckets_inner_permissions.go b/golang/model_key_info_buckets_inner_permissions.go deleted file mode 100644 index df01894..0000000 --- a/golang/model_key_info_buckets_inner_permissions.go +++ /dev/null @@ -1,187 +0,0 @@ -/* -Garage Administration API v0+garage-v0.8.0 - -Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - -API version: v0.8.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package garage - -import ( - "encoding/json" -) - -// KeyInfoBucketsInnerPermissions struct for KeyInfoBucketsInnerPermissions -type KeyInfoBucketsInnerPermissions struct { - Read *bool `json:"read,omitempty"` - Write *bool `json:"write,omitempty"` - Owner *bool `json:"owner,omitempty"` -} - -// NewKeyInfoBucketsInnerPermissions instantiates a new KeyInfoBucketsInnerPermissions object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewKeyInfoBucketsInnerPermissions() *KeyInfoBucketsInnerPermissions { - this := KeyInfoBucketsInnerPermissions{} - return &this -} - -// NewKeyInfoBucketsInnerPermissionsWithDefaults instantiates a new KeyInfoBucketsInnerPermissions object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewKeyInfoBucketsInnerPermissionsWithDefaults() *KeyInfoBucketsInnerPermissions { - this := KeyInfoBucketsInnerPermissions{} - return &this -} - -// GetRead returns the Read field value if set, zero value otherwise. -func (o *KeyInfoBucketsInnerPermissions) GetRead() bool { - if o == nil || o.Read == nil { - var ret bool - return ret - } - return *o.Read -} - -// GetReadOk returns a tuple with the Read field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *KeyInfoBucketsInnerPermissions) GetReadOk() (*bool, bool) { - if o == nil || o.Read == nil { - return nil, false - } - return o.Read, true -} - -// HasRead returns a boolean if a field has been set. -func (o *KeyInfoBucketsInnerPermissions) HasRead() bool { - if o != nil && o.Read != nil { - return true - } - - return false -} - -// SetRead gets a reference to the given bool and assigns it to the Read field. -func (o *KeyInfoBucketsInnerPermissions) SetRead(v bool) { - o.Read = &v -} - -// GetWrite returns the Write field value if set, zero value otherwise. -func (o *KeyInfoBucketsInnerPermissions) GetWrite() bool { - if o == nil || o.Write == nil { - var ret bool - return ret - } - return *o.Write -} - -// GetWriteOk returns a tuple with the Write field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *KeyInfoBucketsInnerPermissions) GetWriteOk() (*bool, bool) { - if o == nil || o.Write == nil { - return nil, false - } - return o.Write, true -} - -// HasWrite returns a boolean if a field has been set. -func (o *KeyInfoBucketsInnerPermissions) HasWrite() bool { - if o != nil && o.Write != nil { - return true - } - - return false -} - -// SetWrite gets a reference to the given bool and assigns it to the Write field. -func (o *KeyInfoBucketsInnerPermissions) SetWrite(v bool) { - o.Write = &v -} - -// GetOwner returns the Owner field value if set, zero value otherwise. -func (o *KeyInfoBucketsInnerPermissions) GetOwner() bool { - if o == nil || o.Owner == nil { - var ret bool - return ret - } - return *o.Owner -} - -// GetOwnerOk returns a tuple with the Owner field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *KeyInfoBucketsInnerPermissions) GetOwnerOk() (*bool, bool) { - if o == nil || o.Owner == nil { - return nil, false - } - return o.Owner, true -} - -// HasOwner returns a boolean if a field has been set. -func (o *KeyInfoBucketsInnerPermissions) HasOwner() bool { - if o != nil && o.Owner != nil { - return true - } - - return false -} - -// SetOwner gets a reference to the given bool and assigns it to the Owner field. -func (o *KeyInfoBucketsInnerPermissions) SetOwner(v bool) { - o.Owner = &v -} - -func (o KeyInfoBucketsInnerPermissions) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Read != nil { - toSerialize["read"] = o.Read - } - if o.Write != nil { - toSerialize["write"] = o.Write - } - if o.Owner != nil { - toSerialize["owner"] = o.Owner - } - return json.Marshal(toSerialize) -} - -type NullableKeyInfoBucketsInnerPermissions struct { - value *KeyInfoBucketsInnerPermissions - isSet bool -} - -func (v NullableKeyInfoBucketsInnerPermissions) Get() *KeyInfoBucketsInnerPermissions { - return v.value -} - -func (v *NullableKeyInfoBucketsInnerPermissions) Set(val *KeyInfoBucketsInnerPermissions) { - v.value = val - v.isSet = true -} - -func (v NullableKeyInfoBucketsInnerPermissions) IsSet() bool { - return v.isSet -} - -func (v *NullableKeyInfoBucketsInnerPermissions) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableKeyInfoBucketsInnerPermissions(val *KeyInfoBucketsInnerPermissions) *NullableKeyInfoBucketsInnerPermissions { - return &NullableKeyInfoBucketsInnerPermissions{value: val, isSet: true} -} - -func (v NullableKeyInfoBucketsInnerPermissions) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableKeyInfoBucketsInnerPermissions) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/golang/model_key_info_permissions.go b/golang/model_key_info_permissions.go deleted file mode 100644 index c36db57..0000000 --- a/golang/model_key_info_permissions.go +++ /dev/null @@ -1,115 +0,0 @@ -/* -Garage Administration API v0+garage-v0.8.0 - -Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - -API version: v0.8.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package garage - -import ( - "encoding/json" -) - -// KeyInfoPermissions struct for KeyInfoPermissions -type KeyInfoPermissions struct { - CreateBucket *bool `json:"createBucket,omitempty"` -} - -// NewKeyInfoPermissions instantiates a new KeyInfoPermissions object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewKeyInfoPermissions() *KeyInfoPermissions { - this := KeyInfoPermissions{} - return &this -} - -// NewKeyInfoPermissionsWithDefaults instantiates a new KeyInfoPermissions object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewKeyInfoPermissionsWithDefaults() *KeyInfoPermissions { - this := KeyInfoPermissions{} - return &this -} - -// GetCreateBucket returns the CreateBucket field value if set, zero value otherwise. -func (o *KeyInfoPermissions) GetCreateBucket() bool { - if o == nil || o.CreateBucket == nil { - var ret bool - return ret - } - return *o.CreateBucket -} - -// GetCreateBucketOk returns a tuple with the CreateBucket field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *KeyInfoPermissions) GetCreateBucketOk() (*bool, bool) { - if o == nil || o.CreateBucket == nil { - return nil, false - } - return o.CreateBucket, true -} - -// HasCreateBucket returns a boolean if a field has been set. -func (o *KeyInfoPermissions) HasCreateBucket() bool { - if o != nil && o.CreateBucket != nil { - return true - } - - return false -} - -// SetCreateBucket gets a reference to the given bool and assigns it to the CreateBucket field. -func (o *KeyInfoPermissions) SetCreateBucket(v bool) { - o.CreateBucket = &v -} - -func (o KeyInfoPermissions) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.CreateBucket != nil { - toSerialize["createBucket"] = o.CreateBucket - } - return json.Marshal(toSerialize) -} - -type NullableKeyInfoPermissions struct { - value *KeyInfoPermissions - isSet bool -} - -func (v NullableKeyInfoPermissions) Get() *KeyInfoPermissions { - return v.value -} - -func (v *NullableKeyInfoPermissions) Set(val *KeyInfoPermissions) { - v.value = val - v.isSet = true -} - -func (v NullableKeyInfoPermissions) IsSet() bool { - return v.isSet -} - -func (v *NullableKeyInfoPermissions) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableKeyInfoPermissions(val *KeyInfoPermissions) *NullableKeyInfoPermissions { - return &NullableKeyInfoPermissions{value: val, isSet: true} -} - -func (v NullableKeyInfoPermissions) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableKeyInfoPermissions) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/golang/model_layout_version.go b/golang/model_layout_version.go deleted file mode 100644 index ae2fda0..0000000 --- a/golang/model_layout_version.go +++ /dev/null @@ -1,115 +0,0 @@ -/* -Garage Administration API v0+garage-v0.8.0 - -Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - -API version: v0.8.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package garage - -import ( - "encoding/json" -) - -// LayoutVersion struct for LayoutVersion -type LayoutVersion struct { - Version *int32 `json:"version,omitempty"` -} - -// NewLayoutVersion instantiates a new LayoutVersion object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewLayoutVersion() *LayoutVersion { - this := LayoutVersion{} - return &this -} - -// NewLayoutVersionWithDefaults instantiates a new LayoutVersion object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewLayoutVersionWithDefaults() *LayoutVersion { - this := LayoutVersion{} - return &this -} - -// GetVersion returns the Version field value if set, zero value otherwise. -func (o *LayoutVersion) GetVersion() int32 { - if o == nil || o.Version == nil { - var ret int32 - return ret - } - return *o.Version -} - -// GetVersionOk returns a tuple with the Version field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *LayoutVersion) GetVersionOk() (*int32, bool) { - if o == nil || o.Version == nil { - return nil, false - } - return o.Version, true -} - -// HasVersion returns a boolean if a field has been set. -func (o *LayoutVersion) HasVersion() bool { - if o != nil && o.Version != nil { - return true - } - - return false -} - -// SetVersion gets a reference to the given int32 and assigns it to the Version field. -func (o *LayoutVersion) SetVersion(v int32) { - o.Version = &v -} - -func (o LayoutVersion) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Version != nil { - toSerialize["version"] = o.Version - } - return json.Marshal(toSerialize) -} - -type NullableLayoutVersion struct { - value *LayoutVersion - isSet bool -} - -func (v NullableLayoutVersion) Get() *LayoutVersion { - return v.value -} - -func (v *NullableLayoutVersion) Set(val *LayoutVersion) { - v.value = val - v.isSet = true -} - -func (v NullableLayoutVersion) IsSet() bool { - return v.isSet -} - -func (v *NullableLayoutVersion) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableLayoutVersion(val *LayoutVersion) *NullableLayoutVersion { - return &NullableLayoutVersion{value: val, isSet: true} -} - -func (v NullableLayoutVersion) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableLayoutVersion) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/golang/model_list_buckets_200_response_inner.go b/golang/model_list_buckets_200_response_inner.go deleted file mode 100644 index 2d88a00..0000000 --- a/golang/model_list_buckets_200_response_inner.go +++ /dev/null @@ -1,180 +0,0 @@ -/* -Garage Administration API v0+garage-v0.8.0 - -Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - -API version: v0.8.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package garage - -import ( - "encoding/json" -) - -// ListBuckets200ResponseInner struct for ListBuckets200ResponseInner -type ListBuckets200ResponseInner struct { - Id string `json:"id"` - GlobalAliases []string `json:"globalAliases,omitempty"` - LocalAliases []ListBuckets200ResponseInnerLocalAliasesInner `json:"localAliases,omitempty"` -} - -// NewListBuckets200ResponseInner instantiates a new ListBuckets200ResponseInner object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewListBuckets200ResponseInner(id string) *ListBuckets200ResponseInner { - this := ListBuckets200ResponseInner{} - this.Id = id - return &this -} - -// NewListBuckets200ResponseInnerWithDefaults instantiates a new ListBuckets200ResponseInner object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewListBuckets200ResponseInnerWithDefaults() *ListBuckets200ResponseInner { - this := ListBuckets200ResponseInner{} - return &this -} - -// GetId returns the Id field value -func (o *ListBuckets200ResponseInner) GetId() string { - if o == nil { - var ret string - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *ListBuckets200ResponseInner) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Id, true -} - -// SetId sets field value -func (o *ListBuckets200ResponseInner) SetId(v string) { - o.Id = v -} - -// GetGlobalAliases returns the GlobalAliases field value if set, zero value otherwise. -func (o *ListBuckets200ResponseInner) GetGlobalAliases() []string { - if o == nil || o.GlobalAliases == nil { - var ret []string - return ret - } - return o.GlobalAliases -} - -// GetGlobalAliasesOk returns a tuple with the GlobalAliases field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ListBuckets200ResponseInner) GetGlobalAliasesOk() ([]string, bool) { - if o == nil || o.GlobalAliases == nil { - return nil, false - } - return o.GlobalAliases, true -} - -// HasGlobalAliases returns a boolean if a field has been set. -func (o *ListBuckets200ResponseInner) HasGlobalAliases() bool { - if o != nil && o.GlobalAliases != nil { - return true - } - - return false -} - -// SetGlobalAliases gets a reference to the given []string and assigns it to the GlobalAliases field. -func (o *ListBuckets200ResponseInner) SetGlobalAliases(v []string) { - o.GlobalAliases = v -} - -// GetLocalAliases returns the LocalAliases field value if set, zero value otherwise. -func (o *ListBuckets200ResponseInner) GetLocalAliases() []ListBuckets200ResponseInnerLocalAliasesInner { - if o == nil || o.LocalAliases == nil { - var ret []ListBuckets200ResponseInnerLocalAliasesInner - return ret - } - return o.LocalAliases -} - -// GetLocalAliasesOk returns a tuple with the LocalAliases field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ListBuckets200ResponseInner) GetLocalAliasesOk() ([]ListBuckets200ResponseInnerLocalAliasesInner, bool) { - if o == nil || o.LocalAliases == nil { - return nil, false - } - return o.LocalAliases, true -} - -// HasLocalAliases returns a boolean if a field has been set. -func (o *ListBuckets200ResponseInner) HasLocalAliases() bool { - if o != nil && o.LocalAliases != nil { - return true - } - - return false -} - -// SetLocalAliases gets a reference to the given []ListBuckets200ResponseInnerLocalAliasesInner and assigns it to the LocalAliases field. -func (o *ListBuckets200ResponseInner) SetLocalAliases(v []ListBuckets200ResponseInnerLocalAliasesInner) { - o.LocalAliases = v -} - -func (o ListBuckets200ResponseInner) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["id"] = o.Id - } - if o.GlobalAliases != nil { - toSerialize["globalAliases"] = o.GlobalAliases - } - if o.LocalAliases != nil { - toSerialize["localAliases"] = o.LocalAliases - } - return json.Marshal(toSerialize) -} - -type NullableListBuckets200ResponseInner struct { - value *ListBuckets200ResponseInner - isSet bool -} - -func (v NullableListBuckets200ResponseInner) Get() *ListBuckets200ResponseInner { - return v.value -} - -func (v *NullableListBuckets200ResponseInner) Set(val *ListBuckets200ResponseInner) { - v.value = val - v.isSet = true -} - -func (v NullableListBuckets200ResponseInner) IsSet() bool { - return v.isSet -} - -func (v *NullableListBuckets200ResponseInner) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableListBuckets200ResponseInner(val *ListBuckets200ResponseInner) *NullableListBuckets200ResponseInner { - return &NullableListBuckets200ResponseInner{value: val, isSet: true} -} - -func (v NullableListBuckets200ResponseInner) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableListBuckets200ResponseInner) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/golang/model_list_buckets_200_response_inner_local_aliases_inner.go b/golang/model_list_buckets_200_response_inner_local_aliases_inner.go deleted file mode 100644 index 2b54d9b..0000000 --- a/golang/model_list_buckets_200_response_inner_local_aliases_inner.go +++ /dev/null @@ -1,137 +0,0 @@ -/* -Garage Administration API v0+garage-v0.8.0 - -Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - -API version: v0.8.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package garage - -import ( - "encoding/json" -) - -// ListBuckets200ResponseInnerLocalAliasesInner struct for ListBuckets200ResponseInnerLocalAliasesInner -type ListBuckets200ResponseInnerLocalAliasesInner struct { - Alias string `json:"alias"` - AccessKeyId string `json:"accessKeyId"` -} - -// NewListBuckets200ResponseInnerLocalAliasesInner instantiates a new ListBuckets200ResponseInnerLocalAliasesInner object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewListBuckets200ResponseInnerLocalAliasesInner(alias string, accessKeyId string) *ListBuckets200ResponseInnerLocalAliasesInner { - this := ListBuckets200ResponseInnerLocalAliasesInner{} - this.Alias = alias - this.AccessKeyId = accessKeyId - return &this -} - -// NewListBuckets200ResponseInnerLocalAliasesInnerWithDefaults instantiates a new ListBuckets200ResponseInnerLocalAliasesInner object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewListBuckets200ResponseInnerLocalAliasesInnerWithDefaults() *ListBuckets200ResponseInnerLocalAliasesInner { - this := ListBuckets200ResponseInnerLocalAliasesInner{} - return &this -} - -// GetAlias returns the Alias field value -func (o *ListBuckets200ResponseInnerLocalAliasesInner) GetAlias() string { - if o == nil { - var ret string - return ret - } - - return o.Alias -} - -// GetAliasOk returns a tuple with the Alias field value -// and a boolean to check if the value has been set. -func (o *ListBuckets200ResponseInnerLocalAliasesInner) GetAliasOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Alias, true -} - -// SetAlias sets field value -func (o *ListBuckets200ResponseInnerLocalAliasesInner) SetAlias(v string) { - o.Alias = v -} - -// GetAccessKeyId returns the AccessKeyId field value -func (o *ListBuckets200ResponseInnerLocalAliasesInner) GetAccessKeyId() string { - if o == nil { - var ret string - return ret - } - - return o.AccessKeyId -} - -// GetAccessKeyIdOk returns a tuple with the AccessKeyId field value -// and a boolean to check if the value has been set. -func (o *ListBuckets200ResponseInnerLocalAliasesInner) GetAccessKeyIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.AccessKeyId, true -} - -// SetAccessKeyId sets field value -func (o *ListBuckets200ResponseInnerLocalAliasesInner) SetAccessKeyId(v string) { - o.AccessKeyId = v -} - -func (o ListBuckets200ResponseInnerLocalAliasesInner) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["alias"] = o.Alias - } - if true { - toSerialize["accessKeyId"] = o.AccessKeyId - } - return json.Marshal(toSerialize) -} - -type NullableListBuckets200ResponseInnerLocalAliasesInner struct { - value *ListBuckets200ResponseInnerLocalAliasesInner - isSet bool -} - -func (v NullableListBuckets200ResponseInnerLocalAliasesInner) Get() *ListBuckets200ResponseInnerLocalAliasesInner { - return v.value -} - -func (v *NullableListBuckets200ResponseInnerLocalAliasesInner) Set(val *ListBuckets200ResponseInnerLocalAliasesInner) { - v.value = val - v.isSet = true -} - -func (v NullableListBuckets200ResponseInnerLocalAliasesInner) IsSet() bool { - return v.isSet -} - -func (v *NullableListBuckets200ResponseInnerLocalAliasesInner) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableListBuckets200ResponseInnerLocalAliasesInner(val *ListBuckets200ResponseInnerLocalAliasesInner) *NullableListBuckets200ResponseInnerLocalAliasesInner { - return &NullableListBuckets200ResponseInnerLocalAliasesInner{value: val, isSet: true} -} - -func (v NullableListBuckets200ResponseInnerLocalAliasesInner) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableListBuckets200ResponseInnerLocalAliasesInner) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/golang/model_list_keys_200_response_inner.go b/golang/model_list_keys_200_response_inner.go deleted file mode 100644 index a140231..0000000 --- a/golang/model_list_keys_200_response_inner.go +++ /dev/null @@ -1,144 +0,0 @@ -/* -Garage Administration API v0+garage-v0.8.0 - -Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - -API version: v0.8.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package garage - -import ( - "encoding/json" -) - -// ListKeys200ResponseInner struct for ListKeys200ResponseInner -type ListKeys200ResponseInner struct { - Id string `json:"id"` - Name *string `json:"name,omitempty"` -} - -// NewListKeys200ResponseInner instantiates a new ListKeys200ResponseInner object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewListKeys200ResponseInner(id string) *ListKeys200ResponseInner { - this := ListKeys200ResponseInner{} - this.Id = id - return &this -} - -// NewListKeys200ResponseInnerWithDefaults instantiates a new ListKeys200ResponseInner object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewListKeys200ResponseInnerWithDefaults() *ListKeys200ResponseInner { - this := ListKeys200ResponseInner{} - return &this -} - -// GetId returns the Id field value -func (o *ListKeys200ResponseInner) GetId() string { - if o == nil { - var ret string - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *ListKeys200ResponseInner) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Id, true -} - -// SetId sets field value -func (o *ListKeys200ResponseInner) SetId(v string) { - o.Id = v -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *ListKeys200ResponseInner) GetName() string { - if o == nil || o.Name == nil { - var ret string - return ret - } - return *o.Name -} - -// GetNameOk returns a tuple with the Name field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ListKeys200ResponseInner) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *ListKeys200ResponseInner) HasName() bool { - if o != nil && o.Name != nil { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *ListKeys200ResponseInner) SetName(v string) { - o.Name = &v -} - -func (o ListKeys200ResponseInner) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["id"] = o.Id - } - if o.Name != nil { - toSerialize["name"] = o.Name - } - return json.Marshal(toSerialize) -} - -type NullableListKeys200ResponseInner struct { - value *ListKeys200ResponseInner - isSet bool -} - -func (v NullableListKeys200ResponseInner) Get() *ListKeys200ResponseInner { - return v.value -} - -func (v *NullableListKeys200ResponseInner) Set(val *ListKeys200ResponseInner) { - v.value = val - v.isSet = true -} - -func (v NullableListKeys200ResponseInner) IsSet() bool { - return v.isSet -} - -func (v *NullableListKeys200ResponseInner) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableListKeys200ResponseInner(val *ListKeys200ResponseInner) *NullableListKeys200ResponseInner { - return &NullableListKeys200ResponseInner{value: val, isSet: true} -} - -func (v NullableListKeys200ResponseInner) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableListKeys200ResponseInner) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/golang/model_node_cluster_info.go b/golang/model_node_cluster_info.go deleted file mode 100644 index bf51b60..0000000 --- a/golang/model_node_cluster_info.go +++ /dev/null @@ -1,169 +0,0 @@ -/* -Garage Administration API v0+garage-v0.8.0 - -Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - -API version: v0.8.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package garage - -import ( - "encoding/json" -) - -// NodeClusterInfo struct for NodeClusterInfo -type NodeClusterInfo struct { - Zone string `json:"zone"` - Capacity NullableInt32 `json:"capacity"` - // User defined tags, put whatever makes sense for you, these tags are not interpreted by Garage - Tags []string `json:"tags"` -} - -// NewNodeClusterInfo instantiates a new NodeClusterInfo object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewNodeClusterInfo(zone string, capacity NullableInt32, tags []string) *NodeClusterInfo { - this := NodeClusterInfo{} - this.Zone = zone - this.Capacity = capacity - this.Tags = tags - return &this -} - -// NewNodeClusterInfoWithDefaults instantiates a new NodeClusterInfo object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewNodeClusterInfoWithDefaults() *NodeClusterInfo { - this := NodeClusterInfo{} - return &this -} - -// GetZone returns the Zone field value -func (o *NodeClusterInfo) GetZone() string { - if o == nil { - var ret string - return ret - } - - return o.Zone -} - -// GetZoneOk returns a tuple with the Zone field value -// and a boolean to check if the value has been set. -func (o *NodeClusterInfo) GetZoneOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Zone, true -} - -// SetZone sets field value -func (o *NodeClusterInfo) SetZone(v string) { - o.Zone = v -} - -// GetCapacity returns the Capacity field value -// If the value is explicit nil, the zero value for int32 will be returned -func (o *NodeClusterInfo) GetCapacity() int32 { - if o == nil || o.Capacity.Get() == nil { - var ret int32 - return ret - } - - return *o.Capacity.Get() -} - -// GetCapacityOk returns a tuple with the Capacity field value -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NodeClusterInfo) GetCapacityOk() (*int32, bool) { - if o == nil { - return nil, false - } - return o.Capacity.Get(), o.Capacity.IsSet() -} - -// SetCapacity sets field value -func (o *NodeClusterInfo) SetCapacity(v int32) { - o.Capacity.Set(&v) -} - -// GetTags returns the Tags field value -func (o *NodeClusterInfo) GetTags() []string { - if o == nil { - var ret []string - return ret - } - - return o.Tags -} - -// GetTagsOk returns a tuple with the Tags field value -// and a boolean to check if the value has been set. -func (o *NodeClusterInfo) GetTagsOk() ([]string, bool) { - if o == nil { - return nil, false - } - return o.Tags, true -} - -// SetTags sets field value -func (o *NodeClusterInfo) SetTags(v []string) { - o.Tags = v -} - -func (o NodeClusterInfo) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["zone"] = o.Zone - } - if true { - toSerialize["capacity"] = o.Capacity.Get() - } - if true { - toSerialize["tags"] = o.Tags - } - return json.Marshal(toSerialize) -} - -type NullableNodeClusterInfo struct { - value *NodeClusterInfo - isSet bool -} - -func (v NullableNodeClusterInfo) Get() *NodeClusterInfo { - return v.value -} - -func (v *NullableNodeClusterInfo) Set(val *NodeClusterInfo) { - v.value = val - v.isSet = true -} - -func (v NullableNodeClusterInfo) IsSet() bool { - return v.isSet -} - -func (v *NullableNodeClusterInfo) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableNodeClusterInfo(val *NodeClusterInfo) *NullableNodeClusterInfo { - return &NullableNodeClusterInfo{value: val, isSet: true} -} - -func (v NullableNodeClusterInfo) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableNodeClusterInfo) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/golang/model_node_network_info.go b/golang/model_node_network_info.go deleted file mode 100644 index e923de4..0000000 --- a/golang/model_node_network_info.go +++ /dev/null @@ -1,197 +0,0 @@ -/* -Garage Administration API v0+garage-v0.8.0 - -Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - -API version: v0.8.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package garage - -import ( - "encoding/json" -) - -// NodeNetworkInfo struct for NodeNetworkInfo -type NodeNetworkInfo struct { - Addr string `json:"addr"` - IsUp bool `json:"is_up"` - LastSeenSecsAgo NullableInt32 `json:"last_seen_secs_ago"` - Hostname string `json:"hostname"` -} - -// NewNodeNetworkInfo instantiates a new NodeNetworkInfo object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewNodeNetworkInfo(addr string, isUp bool, lastSeenSecsAgo NullableInt32, hostname string) *NodeNetworkInfo { - this := NodeNetworkInfo{} - this.Addr = addr - this.IsUp = isUp - this.LastSeenSecsAgo = lastSeenSecsAgo - this.Hostname = hostname - return &this -} - -// NewNodeNetworkInfoWithDefaults instantiates a new NodeNetworkInfo object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewNodeNetworkInfoWithDefaults() *NodeNetworkInfo { - this := NodeNetworkInfo{} - return &this -} - -// GetAddr returns the Addr field value -func (o *NodeNetworkInfo) GetAddr() string { - if o == nil { - var ret string - return ret - } - - return o.Addr -} - -// GetAddrOk returns a tuple with the Addr field value -// and a boolean to check if the value has been set. -func (o *NodeNetworkInfo) GetAddrOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Addr, true -} - -// SetAddr sets field value -func (o *NodeNetworkInfo) SetAddr(v string) { - o.Addr = v -} - -// GetIsUp returns the IsUp field value -func (o *NodeNetworkInfo) GetIsUp() bool { - if o == nil { - var ret bool - return ret - } - - return o.IsUp -} - -// GetIsUpOk returns a tuple with the IsUp field value -// and a boolean to check if the value has been set. -func (o *NodeNetworkInfo) GetIsUpOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.IsUp, true -} - -// SetIsUp sets field value -func (o *NodeNetworkInfo) SetIsUp(v bool) { - o.IsUp = v -} - -// GetLastSeenSecsAgo returns the LastSeenSecsAgo field value -// If the value is explicit nil, the zero value for int32 will be returned -func (o *NodeNetworkInfo) GetLastSeenSecsAgo() int32 { - if o == nil || o.LastSeenSecsAgo.Get() == nil { - var ret int32 - return ret - } - - return *o.LastSeenSecsAgo.Get() -} - -// GetLastSeenSecsAgoOk returns a tuple with the LastSeenSecsAgo field value -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NodeNetworkInfo) GetLastSeenSecsAgoOk() (*int32, bool) { - if o == nil { - return nil, false - } - return o.LastSeenSecsAgo.Get(), o.LastSeenSecsAgo.IsSet() -} - -// SetLastSeenSecsAgo sets field value -func (o *NodeNetworkInfo) SetLastSeenSecsAgo(v int32) { - o.LastSeenSecsAgo.Set(&v) -} - -// GetHostname returns the Hostname field value -func (o *NodeNetworkInfo) GetHostname() string { - if o == nil { - var ret string - return ret - } - - return o.Hostname -} - -// GetHostnameOk returns a tuple with the Hostname field value -// and a boolean to check if the value has been set. -func (o *NodeNetworkInfo) GetHostnameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Hostname, true -} - -// SetHostname sets field value -func (o *NodeNetworkInfo) SetHostname(v string) { - o.Hostname = v -} - -func (o NodeNetworkInfo) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["addr"] = o.Addr - } - if true { - toSerialize["is_up"] = o.IsUp - } - if true { - toSerialize["last_seen_secs_ago"] = o.LastSeenSecsAgo.Get() - } - if true { - toSerialize["hostname"] = o.Hostname - } - return json.Marshal(toSerialize) -} - -type NullableNodeNetworkInfo struct { - value *NodeNetworkInfo - isSet bool -} - -func (v NullableNodeNetworkInfo) Get() *NodeNetworkInfo { - return v.value -} - -func (v *NullableNodeNetworkInfo) Set(val *NodeNetworkInfo) { - v.value = val - v.isSet = true -} - -func (v NullableNodeNetworkInfo) IsSet() bool { - return v.isSet -} - -func (v *NullableNodeNetworkInfo) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableNodeNetworkInfo(val *NodeNetworkInfo) *NullableNodeNetworkInfo { - return &NullableNodeNetworkInfo{value: val, isSet: true} -} - -func (v NullableNodeNetworkInfo) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableNodeNetworkInfo) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/golang/model_update_bucket_request.go b/golang/model_update_bucket_request.go deleted file mode 100644 index d1ea618..0000000 --- a/golang/model_update_bucket_request.go +++ /dev/null @@ -1,151 +0,0 @@ -/* -Garage Administration API v0+garage-v0.8.0 - -Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - -API version: v0.8.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package garage - -import ( - "encoding/json" -) - -// UpdateBucketRequest struct for UpdateBucketRequest -type UpdateBucketRequest struct { - WebsiteAccess *UpdateBucketRequestWebsiteAccess `json:"websiteAccess,omitempty"` - Quotas *UpdateBucketRequestQuotas `json:"quotas,omitempty"` -} - -// NewUpdateBucketRequest instantiates a new UpdateBucketRequest object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewUpdateBucketRequest() *UpdateBucketRequest { - this := UpdateBucketRequest{} - return &this -} - -// NewUpdateBucketRequestWithDefaults instantiates a new UpdateBucketRequest object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewUpdateBucketRequestWithDefaults() *UpdateBucketRequest { - this := UpdateBucketRequest{} - return &this -} - -// GetWebsiteAccess returns the WebsiteAccess field value if set, zero value otherwise. -func (o *UpdateBucketRequest) GetWebsiteAccess() UpdateBucketRequestWebsiteAccess { - if o == nil || o.WebsiteAccess == nil { - var ret UpdateBucketRequestWebsiteAccess - return ret - } - return *o.WebsiteAccess -} - -// GetWebsiteAccessOk returns a tuple with the WebsiteAccess field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateBucketRequest) GetWebsiteAccessOk() (*UpdateBucketRequestWebsiteAccess, bool) { - if o == nil || o.WebsiteAccess == nil { - return nil, false - } - return o.WebsiteAccess, true -} - -// HasWebsiteAccess returns a boolean if a field has been set. -func (o *UpdateBucketRequest) HasWebsiteAccess() bool { - if o != nil && o.WebsiteAccess != nil { - return true - } - - return false -} - -// SetWebsiteAccess gets a reference to the given UpdateBucketRequestWebsiteAccess and assigns it to the WebsiteAccess field. -func (o *UpdateBucketRequest) SetWebsiteAccess(v UpdateBucketRequestWebsiteAccess) { - o.WebsiteAccess = &v -} - -// GetQuotas returns the Quotas field value if set, zero value otherwise. -func (o *UpdateBucketRequest) GetQuotas() UpdateBucketRequestQuotas { - if o == nil || o.Quotas == nil { - var ret UpdateBucketRequestQuotas - return ret - } - return *o.Quotas -} - -// GetQuotasOk returns a tuple with the Quotas field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateBucketRequest) GetQuotasOk() (*UpdateBucketRequestQuotas, bool) { - if o == nil || o.Quotas == nil { - return nil, false - } - return o.Quotas, true -} - -// HasQuotas returns a boolean if a field has been set. -func (o *UpdateBucketRequest) HasQuotas() bool { - if o != nil && o.Quotas != nil { - return true - } - - return false -} - -// SetQuotas gets a reference to the given UpdateBucketRequestQuotas and assigns it to the Quotas field. -func (o *UpdateBucketRequest) SetQuotas(v UpdateBucketRequestQuotas) { - o.Quotas = &v -} - -func (o UpdateBucketRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.WebsiteAccess != nil { - toSerialize["websiteAccess"] = o.WebsiteAccess - } - if o.Quotas != nil { - toSerialize["quotas"] = o.Quotas - } - return json.Marshal(toSerialize) -} - -type NullableUpdateBucketRequest struct { - value *UpdateBucketRequest - isSet bool -} - -func (v NullableUpdateBucketRequest) Get() *UpdateBucketRequest { - return v.value -} - -func (v *NullableUpdateBucketRequest) Set(val *UpdateBucketRequest) { - v.value = val - v.isSet = true -} - -func (v NullableUpdateBucketRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableUpdateBucketRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableUpdateBucketRequest(val *UpdateBucketRequest) *NullableUpdateBucketRequest { - return &NullableUpdateBucketRequest{value: val, isSet: true} -} - -func (v NullableUpdateBucketRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableUpdateBucketRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/golang/model_update_bucket_request_quotas.go b/golang/model_update_bucket_request_quotas.go deleted file mode 100644 index 4a814c0..0000000 --- a/golang/model_update_bucket_request_quotas.go +++ /dev/null @@ -1,171 +0,0 @@ -/* -Garage Administration API v0+garage-v0.8.0 - -Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - -API version: v0.8.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package garage - -import ( - "encoding/json" -) - -// UpdateBucketRequestQuotas struct for UpdateBucketRequestQuotas -type UpdateBucketRequestQuotas struct { - MaxSize NullableInt32 `json:"maxSize,omitempty"` - MaxObjects NullableInt32 `json:"maxObjects,omitempty"` -} - -// NewUpdateBucketRequestQuotas instantiates a new UpdateBucketRequestQuotas object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewUpdateBucketRequestQuotas() *UpdateBucketRequestQuotas { - this := UpdateBucketRequestQuotas{} - return &this -} - -// NewUpdateBucketRequestQuotasWithDefaults instantiates a new UpdateBucketRequestQuotas object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewUpdateBucketRequestQuotasWithDefaults() *UpdateBucketRequestQuotas { - this := UpdateBucketRequestQuotas{} - return &this -} - -// GetMaxSize returns the MaxSize field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *UpdateBucketRequestQuotas) GetMaxSize() int32 { - if o == nil || o.MaxSize.Get() == nil { - var ret int32 - return ret - } - return *o.MaxSize.Get() -} - -// GetMaxSizeOk returns a tuple with the MaxSize field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *UpdateBucketRequestQuotas) GetMaxSizeOk() (*int32, bool) { - if o == nil { - return nil, false - } - return o.MaxSize.Get(), o.MaxSize.IsSet() -} - -// HasMaxSize returns a boolean if a field has been set. -func (o *UpdateBucketRequestQuotas) HasMaxSize() bool { - if o != nil && o.MaxSize.IsSet() { - return true - } - - return false -} - -// SetMaxSize gets a reference to the given NullableInt32 and assigns it to the MaxSize field. -func (o *UpdateBucketRequestQuotas) SetMaxSize(v int32) { - o.MaxSize.Set(&v) -} -// SetMaxSizeNil sets the value for MaxSize to be an explicit nil -func (o *UpdateBucketRequestQuotas) SetMaxSizeNil() { - o.MaxSize.Set(nil) -} - -// UnsetMaxSize ensures that no value is present for MaxSize, not even an explicit nil -func (o *UpdateBucketRequestQuotas) UnsetMaxSize() { - o.MaxSize.Unset() -} - -// GetMaxObjects returns the MaxObjects field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *UpdateBucketRequestQuotas) GetMaxObjects() int32 { - if o == nil || o.MaxObjects.Get() == nil { - var ret int32 - return ret - } - return *o.MaxObjects.Get() -} - -// GetMaxObjectsOk returns a tuple with the MaxObjects field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *UpdateBucketRequestQuotas) GetMaxObjectsOk() (*int32, bool) { - if o == nil { - return nil, false - } - return o.MaxObjects.Get(), o.MaxObjects.IsSet() -} - -// HasMaxObjects returns a boolean if a field has been set. -func (o *UpdateBucketRequestQuotas) HasMaxObjects() bool { - if o != nil && o.MaxObjects.IsSet() { - return true - } - - return false -} - -// SetMaxObjects gets a reference to the given NullableInt32 and assigns it to the MaxObjects field. -func (o *UpdateBucketRequestQuotas) SetMaxObjects(v int32) { - o.MaxObjects.Set(&v) -} -// SetMaxObjectsNil sets the value for MaxObjects to be an explicit nil -func (o *UpdateBucketRequestQuotas) SetMaxObjectsNil() { - o.MaxObjects.Set(nil) -} - -// UnsetMaxObjects ensures that no value is present for MaxObjects, not even an explicit nil -func (o *UpdateBucketRequestQuotas) UnsetMaxObjects() { - o.MaxObjects.Unset() -} - -func (o UpdateBucketRequestQuotas) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.MaxSize.IsSet() { - toSerialize["maxSize"] = o.MaxSize.Get() - } - if o.MaxObjects.IsSet() { - toSerialize["maxObjects"] = o.MaxObjects.Get() - } - return json.Marshal(toSerialize) -} - -type NullableUpdateBucketRequestQuotas struct { - value *UpdateBucketRequestQuotas - isSet bool -} - -func (v NullableUpdateBucketRequestQuotas) Get() *UpdateBucketRequestQuotas { - return v.value -} - -func (v *NullableUpdateBucketRequestQuotas) Set(val *UpdateBucketRequestQuotas) { - v.value = val - v.isSet = true -} - -func (v NullableUpdateBucketRequestQuotas) IsSet() bool { - return v.isSet -} - -func (v *NullableUpdateBucketRequestQuotas) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableUpdateBucketRequestQuotas(val *UpdateBucketRequestQuotas) *NullableUpdateBucketRequestQuotas { - return &NullableUpdateBucketRequestQuotas{value: val, isSet: true} -} - -func (v NullableUpdateBucketRequestQuotas) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableUpdateBucketRequestQuotas) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/golang/model_update_bucket_request_website_access.go b/golang/model_update_bucket_request_website_access.go deleted file mode 100644 index 9d6d077..0000000 --- a/golang/model_update_bucket_request_website_access.go +++ /dev/null @@ -1,187 +0,0 @@ -/* -Garage Administration API v0+garage-v0.8.0 - -Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - -API version: v0.8.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package garage - -import ( - "encoding/json" -) - -// UpdateBucketRequestWebsiteAccess struct for UpdateBucketRequestWebsiteAccess -type UpdateBucketRequestWebsiteAccess struct { - Enabled *bool `json:"enabled,omitempty"` - IndexDocument *string `json:"indexDocument,omitempty"` - ErrorDocument *string `json:"errorDocument,omitempty"` -} - -// NewUpdateBucketRequestWebsiteAccess instantiates a new UpdateBucketRequestWebsiteAccess object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewUpdateBucketRequestWebsiteAccess() *UpdateBucketRequestWebsiteAccess { - this := UpdateBucketRequestWebsiteAccess{} - return &this -} - -// NewUpdateBucketRequestWebsiteAccessWithDefaults instantiates a new UpdateBucketRequestWebsiteAccess object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewUpdateBucketRequestWebsiteAccessWithDefaults() *UpdateBucketRequestWebsiteAccess { - this := UpdateBucketRequestWebsiteAccess{} - return &this -} - -// GetEnabled returns the Enabled field value if set, zero value otherwise. -func (o *UpdateBucketRequestWebsiteAccess) GetEnabled() bool { - if o == nil || o.Enabled == nil { - var ret bool - return ret - } - return *o.Enabled -} - -// GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateBucketRequestWebsiteAccess) GetEnabledOk() (*bool, bool) { - if o == nil || o.Enabled == nil { - return nil, false - } - return o.Enabled, true -} - -// HasEnabled returns a boolean if a field has been set. -func (o *UpdateBucketRequestWebsiteAccess) HasEnabled() bool { - if o != nil && o.Enabled != nil { - return true - } - - return false -} - -// SetEnabled gets a reference to the given bool and assigns it to the Enabled field. -func (o *UpdateBucketRequestWebsiteAccess) SetEnabled(v bool) { - o.Enabled = &v -} - -// GetIndexDocument returns the IndexDocument field value if set, zero value otherwise. -func (o *UpdateBucketRequestWebsiteAccess) GetIndexDocument() string { - if o == nil || o.IndexDocument == nil { - var ret string - return ret - } - return *o.IndexDocument -} - -// GetIndexDocumentOk returns a tuple with the IndexDocument field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateBucketRequestWebsiteAccess) GetIndexDocumentOk() (*string, bool) { - if o == nil || o.IndexDocument == nil { - return nil, false - } - return o.IndexDocument, true -} - -// HasIndexDocument returns a boolean if a field has been set. -func (o *UpdateBucketRequestWebsiteAccess) HasIndexDocument() bool { - if o != nil && o.IndexDocument != nil { - return true - } - - return false -} - -// SetIndexDocument gets a reference to the given string and assigns it to the IndexDocument field. -func (o *UpdateBucketRequestWebsiteAccess) SetIndexDocument(v string) { - o.IndexDocument = &v -} - -// GetErrorDocument returns the ErrorDocument field value if set, zero value otherwise. -func (o *UpdateBucketRequestWebsiteAccess) GetErrorDocument() string { - if o == nil || o.ErrorDocument == nil { - var ret string - return ret - } - return *o.ErrorDocument -} - -// GetErrorDocumentOk returns a tuple with the ErrorDocument field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateBucketRequestWebsiteAccess) GetErrorDocumentOk() (*string, bool) { - if o == nil || o.ErrorDocument == nil { - return nil, false - } - return o.ErrorDocument, true -} - -// HasErrorDocument returns a boolean if a field has been set. -func (o *UpdateBucketRequestWebsiteAccess) HasErrorDocument() bool { - if o != nil && o.ErrorDocument != nil { - return true - } - - return false -} - -// SetErrorDocument gets a reference to the given string and assigns it to the ErrorDocument field. -func (o *UpdateBucketRequestWebsiteAccess) SetErrorDocument(v string) { - o.ErrorDocument = &v -} - -func (o UpdateBucketRequestWebsiteAccess) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Enabled != nil { - toSerialize["enabled"] = o.Enabled - } - if o.IndexDocument != nil { - toSerialize["indexDocument"] = o.IndexDocument - } - if o.ErrorDocument != nil { - toSerialize["errorDocument"] = o.ErrorDocument - } - return json.Marshal(toSerialize) -} - -type NullableUpdateBucketRequestWebsiteAccess struct { - value *UpdateBucketRequestWebsiteAccess - isSet bool -} - -func (v NullableUpdateBucketRequestWebsiteAccess) Get() *UpdateBucketRequestWebsiteAccess { - return v.value -} - -func (v *NullableUpdateBucketRequestWebsiteAccess) Set(val *UpdateBucketRequestWebsiteAccess) { - v.value = val - v.isSet = true -} - -func (v NullableUpdateBucketRequestWebsiteAccess) IsSet() bool { - return v.isSet -} - -func (v *NullableUpdateBucketRequestWebsiteAccess) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableUpdateBucketRequestWebsiteAccess(val *UpdateBucketRequestWebsiteAccess) *NullableUpdateBucketRequestWebsiteAccess { - return &NullableUpdateBucketRequestWebsiteAccess{value: val, isSet: true} -} - -func (v NullableUpdateBucketRequestWebsiteAccess) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableUpdateBucketRequestWebsiteAccess) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/golang/model_update_key_request.go b/golang/model_update_key_request.go deleted file mode 100644 index f32953e..0000000 --- a/golang/model_update_key_request.go +++ /dev/null @@ -1,187 +0,0 @@ -/* -Garage Administration API v0+garage-v0.8.0 - -Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - -API version: v0.8.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package garage - -import ( - "encoding/json" -) - -// UpdateKeyRequest struct for UpdateKeyRequest -type UpdateKeyRequest struct { - Name *string `json:"name,omitempty"` - Allow *UpdateKeyRequestAllow `json:"allow,omitempty"` - Deny *UpdateKeyRequestDeny `json:"deny,omitempty"` -} - -// NewUpdateKeyRequest instantiates a new UpdateKeyRequest object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewUpdateKeyRequest() *UpdateKeyRequest { - this := UpdateKeyRequest{} - return &this -} - -// NewUpdateKeyRequestWithDefaults instantiates a new UpdateKeyRequest object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewUpdateKeyRequestWithDefaults() *UpdateKeyRequest { - this := UpdateKeyRequest{} - return &this -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *UpdateKeyRequest) GetName() string { - if o == nil || o.Name == nil { - var ret string - return ret - } - return *o.Name -} - -// GetNameOk returns a tuple with the Name field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateKeyRequest) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *UpdateKeyRequest) HasName() bool { - if o != nil && o.Name != nil { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *UpdateKeyRequest) SetName(v string) { - o.Name = &v -} - -// GetAllow returns the Allow field value if set, zero value otherwise. -func (o *UpdateKeyRequest) GetAllow() UpdateKeyRequestAllow { - if o == nil || o.Allow == nil { - var ret UpdateKeyRequestAllow - return ret - } - return *o.Allow -} - -// GetAllowOk returns a tuple with the Allow field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateKeyRequest) GetAllowOk() (*UpdateKeyRequestAllow, bool) { - if o == nil || o.Allow == nil { - return nil, false - } - return o.Allow, true -} - -// HasAllow returns a boolean if a field has been set. -func (o *UpdateKeyRequest) HasAllow() bool { - if o != nil && o.Allow != nil { - return true - } - - return false -} - -// SetAllow gets a reference to the given UpdateKeyRequestAllow and assigns it to the Allow field. -func (o *UpdateKeyRequest) SetAllow(v UpdateKeyRequestAllow) { - o.Allow = &v -} - -// GetDeny returns the Deny field value if set, zero value otherwise. -func (o *UpdateKeyRequest) GetDeny() UpdateKeyRequestDeny { - if o == nil || o.Deny == nil { - var ret UpdateKeyRequestDeny - return ret - } - return *o.Deny -} - -// GetDenyOk returns a tuple with the Deny field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateKeyRequest) GetDenyOk() (*UpdateKeyRequestDeny, bool) { - if o == nil || o.Deny == nil { - return nil, false - } - return o.Deny, true -} - -// HasDeny returns a boolean if a field has been set. -func (o *UpdateKeyRequest) HasDeny() bool { - if o != nil && o.Deny != nil { - return true - } - - return false -} - -// SetDeny gets a reference to the given UpdateKeyRequestDeny and assigns it to the Deny field. -func (o *UpdateKeyRequest) SetDeny(v UpdateKeyRequestDeny) { - o.Deny = &v -} - -func (o UpdateKeyRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Name != nil { - toSerialize["name"] = o.Name - } - if o.Allow != nil { - toSerialize["allow"] = o.Allow - } - if o.Deny != nil { - toSerialize["deny"] = o.Deny - } - return json.Marshal(toSerialize) -} - -type NullableUpdateKeyRequest struct { - value *UpdateKeyRequest - isSet bool -} - -func (v NullableUpdateKeyRequest) Get() *UpdateKeyRequest { - return v.value -} - -func (v *NullableUpdateKeyRequest) Set(val *UpdateKeyRequest) { - v.value = val - v.isSet = true -} - -func (v NullableUpdateKeyRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableUpdateKeyRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableUpdateKeyRequest(val *UpdateKeyRequest) *NullableUpdateKeyRequest { - return &NullableUpdateKeyRequest{value: val, isSet: true} -} - -func (v NullableUpdateKeyRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableUpdateKeyRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/golang/model_update_key_request_allow.go b/golang/model_update_key_request_allow.go deleted file mode 100644 index e3e1e2a..0000000 --- a/golang/model_update_key_request_allow.go +++ /dev/null @@ -1,115 +0,0 @@ -/* -Garage Administration API v0+garage-v0.8.0 - -Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - -API version: v0.8.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package garage - -import ( - "encoding/json" -) - -// UpdateKeyRequestAllow struct for UpdateKeyRequestAllow -type UpdateKeyRequestAllow struct { - CreateBucket *bool `json:"createBucket,omitempty"` -} - -// NewUpdateKeyRequestAllow instantiates a new UpdateKeyRequestAllow object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewUpdateKeyRequestAllow() *UpdateKeyRequestAllow { - this := UpdateKeyRequestAllow{} - return &this -} - -// NewUpdateKeyRequestAllowWithDefaults instantiates a new UpdateKeyRequestAllow object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewUpdateKeyRequestAllowWithDefaults() *UpdateKeyRequestAllow { - this := UpdateKeyRequestAllow{} - return &this -} - -// GetCreateBucket returns the CreateBucket field value if set, zero value otherwise. -func (o *UpdateKeyRequestAllow) GetCreateBucket() bool { - if o == nil || o.CreateBucket == nil { - var ret bool - return ret - } - return *o.CreateBucket -} - -// GetCreateBucketOk returns a tuple with the CreateBucket field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateKeyRequestAllow) GetCreateBucketOk() (*bool, bool) { - if o == nil || o.CreateBucket == nil { - return nil, false - } - return o.CreateBucket, true -} - -// HasCreateBucket returns a boolean if a field has been set. -func (o *UpdateKeyRequestAllow) HasCreateBucket() bool { - if o != nil && o.CreateBucket != nil { - return true - } - - return false -} - -// SetCreateBucket gets a reference to the given bool and assigns it to the CreateBucket field. -func (o *UpdateKeyRequestAllow) SetCreateBucket(v bool) { - o.CreateBucket = &v -} - -func (o UpdateKeyRequestAllow) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.CreateBucket != nil { - toSerialize["createBucket"] = o.CreateBucket - } - return json.Marshal(toSerialize) -} - -type NullableUpdateKeyRequestAllow struct { - value *UpdateKeyRequestAllow - isSet bool -} - -func (v NullableUpdateKeyRequestAllow) Get() *UpdateKeyRequestAllow { - return v.value -} - -func (v *NullableUpdateKeyRequestAllow) Set(val *UpdateKeyRequestAllow) { - v.value = val - v.isSet = true -} - -func (v NullableUpdateKeyRequestAllow) IsSet() bool { - return v.isSet -} - -func (v *NullableUpdateKeyRequestAllow) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableUpdateKeyRequestAllow(val *UpdateKeyRequestAllow) *NullableUpdateKeyRequestAllow { - return &NullableUpdateKeyRequestAllow{value: val, isSet: true} -} - -func (v NullableUpdateKeyRequestAllow) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableUpdateKeyRequestAllow) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/golang/model_update_key_request_deny.go b/golang/model_update_key_request_deny.go deleted file mode 100644 index 8f2e51b..0000000 --- a/golang/model_update_key_request_deny.go +++ /dev/null @@ -1,115 +0,0 @@ -/* -Garage Administration API v0+garage-v0.8.0 - -Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - -API version: v0.8.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package garage - -import ( - "encoding/json" -) - -// UpdateKeyRequestDeny struct for UpdateKeyRequestDeny -type UpdateKeyRequestDeny struct { - CreateBucket *bool `json:"createBucket,omitempty"` -} - -// NewUpdateKeyRequestDeny instantiates a new UpdateKeyRequestDeny object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewUpdateKeyRequestDeny() *UpdateKeyRequestDeny { - this := UpdateKeyRequestDeny{} - return &this -} - -// NewUpdateKeyRequestDenyWithDefaults instantiates a new UpdateKeyRequestDeny object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewUpdateKeyRequestDenyWithDefaults() *UpdateKeyRequestDeny { - this := UpdateKeyRequestDeny{} - return &this -} - -// GetCreateBucket returns the CreateBucket field value if set, zero value otherwise. -func (o *UpdateKeyRequestDeny) GetCreateBucket() bool { - if o == nil || o.CreateBucket == nil { - var ret bool - return ret - } - return *o.CreateBucket -} - -// GetCreateBucketOk returns a tuple with the CreateBucket field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateKeyRequestDeny) GetCreateBucketOk() (*bool, bool) { - if o == nil || o.CreateBucket == nil { - return nil, false - } - return o.CreateBucket, true -} - -// HasCreateBucket returns a boolean if a field has been set. -func (o *UpdateKeyRequestDeny) HasCreateBucket() bool { - if o != nil && o.CreateBucket != nil { - return true - } - - return false -} - -// SetCreateBucket gets a reference to the given bool and assigns it to the CreateBucket field. -func (o *UpdateKeyRequestDeny) SetCreateBucket(v bool) { - o.CreateBucket = &v -} - -func (o UpdateKeyRequestDeny) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.CreateBucket != nil { - toSerialize["createBucket"] = o.CreateBucket - } - return json.Marshal(toSerialize) -} - -type NullableUpdateKeyRequestDeny struct { - value *UpdateKeyRequestDeny - isSet bool -} - -func (v NullableUpdateKeyRequestDeny) Get() *UpdateKeyRequestDeny { - return v.value -} - -func (v *NullableUpdateKeyRequestDeny) Set(val *UpdateKeyRequestDeny) { - v.value = val - v.isSet = true -} - -func (v NullableUpdateKeyRequestDeny) IsSet() bool { - return v.isSet -} - -func (v *NullableUpdateKeyRequestDeny) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableUpdateKeyRequestDeny(val *UpdateKeyRequestDeny) *NullableUpdateKeyRequestDeny { - return &NullableUpdateKeyRequestDeny{value: val, isSet: true} -} - -func (v NullableUpdateKeyRequestDeny) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableUpdateKeyRequestDeny) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/golang/response.go b/golang/response.go deleted file mode 100644 index b2b3651..0000000 --- a/golang/response.go +++ /dev/null @@ -1,47 +0,0 @@ -/* -Garage Administration API v0+garage-v0.8.0 - -Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - -API version: v0.8.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package garage - -import ( - "net/http" -) - -// APIResponse stores the API response returned by the server. -type APIResponse struct { - *http.Response `json:"-"` - Message string `json:"message,omitempty"` - // Operation is the name of the OpenAPI operation. - Operation string `json:"operation,omitempty"` - // RequestURL is the request URL. This value is always available, even if the - // embedded *http.Response is nil. - RequestURL string `json:"url,omitempty"` - // Method is the HTTP method used for the request. This value is always - // available, even if the embedded *http.Response is nil. - Method string `json:"method,omitempty"` - // Payload holds the contents of the response body (which may be nil or empty). - // This is provided here as the raw response.Body() reader will have already - // been drained. - Payload []byte `json:"-"` -} - -// NewAPIResponse returns a new APIResponse object. -func NewAPIResponse(r *http.Response) *APIResponse { - - response := &APIResponse{Response: r} - return response -} - -// NewAPIResponseWithError returns a new APIResponse object with the provided error message. -func NewAPIResponseWithError(errorMessage string) *APIResponse { - - response := &APIResponse{Message: errorMessage} - return response -} diff --git a/golang/utils.go b/golang/utils.go deleted file mode 100644 index 902e2b2..0000000 --- a/golang/utils.go +++ /dev/null @@ -1,328 +0,0 @@ -/* -Garage Administration API v0+garage-v0.8.0 - -Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - -API version: v0.8.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package garage - -import ( - "encoding/json" - "time" -) - -// PtrBool is a helper routine that returns a pointer to given boolean value. -func PtrBool(v bool) *bool { return &v } - -// PtrInt is a helper routine that returns a pointer to given integer value. -func PtrInt(v int) *int { return &v } - -// PtrInt32 is a helper routine that returns a pointer to given integer value. -func PtrInt32(v int32) *int32 { return &v } - -// PtrInt64 is a helper routine that returns a pointer to given integer value. -func PtrInt64(v int64) *int64 { return &v } - -// PtrFloat32 is a helper routine that returns a pointer to given float value. -func PtrFloat32(v float32) *float32 { return &v } - -// PtrFloat64 is a helper routine that returns a pointer to given float value. -func PtrFloat64(v float64) *float64 { return &v } - -// PtrString is a helper routine that returns a pointer to given string value. -func PtrString(v string) *string { return &v } - -// PtrTime is helper routine that returns a pointer to given Time value. -func PtrTime(v time.Time) *time.Time { return &v } - -type NullableBool struct { - value *bool - isSet bool -} - -func (v NullableBool) Get() *bool { - return v.value -} - -func (v *NullableBool) Set(val *bool) { - v.value = val - v.isSet = true -} - -func (v NullableBool) IsSet() bool { - return v.isSet -} - -func (v *NullableBool) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableBool(val *bool) *NullableBool { - return &NullableBool{value: val, isSet: true} -} - -func (v NullableBool) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableBool) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt struct { - value *int - isSet bool -} - -func (v NullableInt) Get() *int { - return v.value -} - -func (v *NullableInt) Set(val *int) { - v.value = val - v.isSet = true -} - -func (v NullableInt) IsSet() bool { - return v.isSet -} - -func (v *NullableInt) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt(val *int) *NullableInt { - return &NullableInt{value: val, isSet: true} -} - -func (v NullableInt) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt32 struct { - value *int32 - isSet bool -} - -func (v NullableInt32) Get() *int32 { - return v.value -} - -func (v *NullableInt32) Set(val *int32) { - v.value = val - v.isSet = true -} - -func (v NullableInt32) IsSet() bool { - return v.isSet -} - -func (v *NullableInt32) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt32(val *int32) *NullableInt32 { - return &NullableInt32{value: val, isSet: true} -} - -func (v NullableInt32) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt32) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt64 struct { - value *int64 - isSet bool -} - -func (v NullableInt64) Get() *int64 { - return v.value -} - -func (v *NullableInt64) Set(val *int64) { - v.value = val - v.isSet = true -} - -func (v NullableInt64) IsSet() bool { - return v.isSet -} - -func (v *NullableInt64) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt64(val *int64) *NullableInt64 { - return &NullableInt64{value: val, isSet: true} -} - -func (v NullableInt64) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt64) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableFloat32 struct { - value *float32 - isSet bool -} - -func (v NullableFloat32) Get() *float32 { - return v.value -} - -func (v *NullableFloat32) Set(val *float32) { - v.value = val - v.isSet = true -} - -func (v NullableFloat32) IsSet() bool { - return v.isSet -} - -func (v *NullableFloat32) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFloat32(val *float32) *NullableFloat32 { - return &NullableFloat32{value: val, isSet: true} -} - -func (v NullableFloat32) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFloat32) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableFloat64 struct { - value *float64 - isSet bool -} - -func (v NullableFloat64) Get() *float64 { - return v.value -} - -func (v *NullableFloat64) Set(val *float64) { - v.value = val - v.isSet = true -} - -func (v NullableFloat64) IsSet() bool { - return v.isSet -} - -func (v *NullableFloat64) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFloat64(val *float64) *NullableFloat64 { - return &NullableFloat64{value: val, isSet: true} -} - -func (v NullableFloat64) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFloat64) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableString struct { - value *string - isSet bool -} - -func (v NullableString) Get() *string { - return v.value -} - -func (v *NullableString) Set(val *string) { - v.value = val - v.isSet = true -} - -func (v NullableString) IsSet() bool { - return v.isSet -} - -func (v *NullableString) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableString(val *string) *NullableString { - return &NullableString{value: val, isSet: true} -} - -func (v NullableString) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableString) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableTime struct { - value *time.Time - isSet bool -} - -func (v NullableTime) Get() *time.Time { - return v.value -} - -func (v *NullableTime) Set(val *time.Time) { - v.value = val - v.isSet = true -} - -func (v NullableTime) IsSet() bool { - return v.isSet -} - -func (v *NullableTime) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableTime(val *time.Time) *NullableTime { - return &NullableTime{value: val, isSet: true} -} - -func (v NullableTime) MarshalJSON() ([]byte, error) { - return v.value.MarshalJSON() -} - -func (v *NullableTime) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/javascript/.babelrc b/javascript/.babelrc deleted file mode 100644 index c73df9d..0000000 --- a/javascript/.babelrc +++ /dev/null @@ -1,33 +0,0 @@ -{ - "presets": [ - "@babel/preset-env" - ], - "plugins": [ - "@babel/plugin-syntax-dynamic-import", - "@babel/plugin-syntax-import-meta", - "@babel/plugin-proposal-class-properties", - "@babel/plugin-proposal-json-strings", - [ - "@babel/plugin-proposal-decorators", - { - "legacy": true - } - ], - "@babel/plugin-proposal-function-sent", - "@babel/plugin-proposal-export-namespace-from", - "@babel/plugin-proposal-numeric-separator", - "@babel/plugin-proposal-throw-expressions", - "@babel/plugin-proposal-export-default-from", - "@babel/plugin-proposal-logical-assignment-operators", - "@babel/plugin-proposal-optional-chaining", - [ - "@babel/plugin-proposal-pipeline-operator", - { - "proposal": "minimal" - } - ], - "@babel/plugin-proposal-nullish-coalescing-operator", - "@babel/plugin-proposal-do-expressions", - "@babel/plugin-proposal-function-bind" - ] -} diff --git a/javascript/.gitignore b/javascript/.gitignore deleted file mode 100644 index 6a7d6d8..0000000 --- a/javascript/.gitignore +++ /dev/null @@ -1,130 +0,0 @@ -# Logs -logs -*.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* -lerna-debug.log* -.pnpm-debug.log* - -# Diagnostic reports (https://nodejs.org/api/report.html) -report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json - -# Runtime data -pids -*.pid -*.seed -*.pid.lock - -# Directory for instrumented libs generated by jscoverage/JSCover -lib-cov - -# Coverage directory used by tools like istanbul -coverage -*.lcov - -# nyc test coverage -.nyc_output - -# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) -.grunt - -# Bower dependency directory (https://bower.io/) -bower_components - -# node-waf configuration -.lock-wscript - -# Compiled binary addons (https://nodejs.org/api/addons.html) -build/Release - -# Dependency directories -node_modules/ -jspm_packages/ - -# Snowpack dependency directory (https://snowpack.dev/) -web_modules/ - -# TypeScript cache -*.tsbuildinfo - -# Optional npm cache directory -.npm - -# Optional eslint cache -.eslintcache - -# Optional stylelint cache -.stylelintcache - -# Microbundle cache -.rpt2_cache/ -.rts2_cache_cjs/ -.rts2_cache_es/ -.rts2_cache_umd/ - -# Optional REPL history -.node_repl_history - -# Output of 'npm pack' -*.tgz - -# Yarn Integrity file -.yarn-integrity - -# dotenv environment variable files -.env -.env.development.local -.env.test.local -.env.production.local -.env.local - -# parcel-bundler cache (https://parceljs.org/) -.cache -.parcel-cache - -# Next.js build output -.next -out - -# Nuxt.js build / generate output -.nuxt -dist - -# Gatsby files -.cache/ -# Comment in the public line in if your project uses Gatsby and not Next.js -# https://nextjs.org/blog/next-9-1#public-directory-support -# public - -# vuepress build output -.vuepress/dist - -# vuepress v2.x temp and cache directory -.temp -.cache - -# Docusaurus cache and generated files -.docusaurus - -# Serverless directories -.serverless/ - -# FuseBox cache -.fusebox/ - -# DynamoDB Local files -.dynamodb/ - -# TernJS port file -.tern-port - -# Stores VSCode versions used for testing VSCode extensions -.vscode-test - -# yarn v2 -.yarn/cache -.yarn/unplugged -.yarn/build-state.yml -.yarn/install-state.gz -.pnp.* \ No newline at end of file diff --git a/javascript/.openapi-generator-ignore b/javascript/.openapi-generator-ignore deleted file mode 100644 index 7484ee5..0000000 --- a/javascript/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/javascript/.openapi-generator/FILES b/javascript/.openapi-generator/FILES deleted file mode 100644 index 82ee1a4..0000000 --- a/javascript/.openapi-generator/FILES +++ /dev/null @@ -1,77 +0,0 @@ -.babelrc -.gitignore -.travis.yml -README.md -docs/AddKeyRequest.md -docs/AddNode200ResponseInner.md -docs/AllowBucketKeyRequest.md -docs/AllowBucketKeyRequestPermissions.md -docs/BucketApi.md -docs/BucketInfo.md -docs/BucketInfoQuotas.md -docs/BucketInfoWebsiteConfig.md -docs/BucketKeyInfo.md -docs/ClusterLayout.md -docs/CreateBucketRequest.md -docs/CreateBucketRequestLocalAlias.md -docs/CreateBucketRequestLocalAliasAllow.md -docs/GetNodes200Response.md -docs/ImportKeyRequest.md -docs/KeyApi.md -docs/KeyInfo.md -docs/KeyInfoBucketsInner.md -docs/KeyInfoBucketsInnerPermissions.md -docs/KeyInfoPermissions.md -docs/LayoutApi.md -docs/LayoutVersion.md -docs/ListBuckets200ResponseInner.md -docs/ListBuckets200ResponseInnerLocalAliasesInner.md -docs/ListKeys200ResponseInner.md -docs/NodeClusterInfo.md -docs/NodeNetworkInfo.md -docs/NodesApi.md -docs/UpdateBucketRequest.md -docs/UpdateBucketRequestQuotas.md -docs/UpdateBucketRequestWebsiteAccess.md -docs/UpdateKeyRequest.md -docs/UpdateKeyRequestAllow.md -docs/UpdateKeyRequestDeny.md -git_push.sh -mocha.opts -package.json -src/ApiClient.js -src/api/BucketApi.js -src/api/KeyApi.js -src/api/LayoutApi.js -src/api/NodesApi.js -src/index.js -src/model/AddKeyRequest.js -src/model/AddNode200ResponseInner.js -src/model/AllowBucketKeyRequest.js -src/model/AllowBucketKeyRequestPermissions.js -src/model/BucketInfo.js -src/model/BucketInfoQuotas.js -src/model/BucketInfoWebsiteConfig.js -src/model/BucketKeyInfo.js -src/model/ClusterLayout.js -src/model/CreateBucketRequest.js -src/model/CreateBucketRequestLocalAlias.js -src/model/CreateBucketRequestLocalAliasAllow.js -src/model/GetNodes200Response.js -src/model/ImportKeyRequest.js -src/model/KeyInfo.js -src/model/KeyInfoBucketsInner.js -src/model/KeyInfoBucketsInnerPermissions.js -src/model/KeyInfoPermissions.js -src/model/LayoutVersion.js -src/model/ListBuckets200ResponseInner.js -src/model/ListBuckets200ResponseInnerLocalAliasesInner.js -src/model/ListKeys200ResponseInner.js -src/model/NodeClusterInfo.js -src/model/NodeNetworkInfo.js -src/model/UpdateBucketRequest.js -src/model/UpdateBucketRequestQuotas.js -src/model/UpdateBucketRequestWebsiteAccess.js -src/model/UpdateKeyRequest.js -src/model/UpdateKeyRequestAllow.js -src/model/UpdateKeyRequestDeny.js diff --git a/javascript/.openapi-generator/VERSION b/javascript/.openapi-generator/VERSION deleted file mode 100644 index 358e78e..0000000 --- a/javascript/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.1.0 \ No newline at end of file diff --git a/javascript/.travis.yml b/javascript/.travis.yml deleted file mode 100644 index 0968f7a..0000000 --- a/javascript/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js -cache: npm -node_js: - - "6" - - "6.1" diff --git a/javascript/README.md b/javascript/README.md deleted file mode 100644 index 0edb76f..0000000 --- a/javascript/README.md +++ /dev/null @@ -1,198 +0,0 @@ -# garage_administration_api_v0garage_v0_8_0 - -garage - JavaScript client for garage_administration_api_v0garage_v0_8_0 -Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. - -*Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - -This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - -- API version: v0.8.0 -- Package version: v0.8.0 -- Build package: org.openapitools.codegen.languages.JavascriptClientCodegen - -## Installation - -### For [Node.js](https://nodejs.org/) - -#### npm - -To publish the library as a [npm](https://www.npmjs.com/), please follow the procedure in ["Publishing npm packages"](https://docs.npmjs.com/getting-started/publishing-npm-packages). - -Then install it via: - -```shell -npm install garage_administration_api_v0garage_v0_8_0 --save -``` - -Finally, you need to build the module: - -```shell -npm run build -``` - -##### Local development - -To use the library locally without publishing to a remote npm registry, first install the dependencies by changing into the directory containing `package.json` (and this README). Let's call this `JAVASCRIPT_CLIENT_DIR`. Then run: - -```shell -npm install -``` - -Next, [link](https://docs.npmjs.com/cli/link) it globally in npm with the following, also from `JAVASCRIPT_CLIENT_DIR`: - -```shell -npm link -``` - -To use the link you just defined in your project, switch to the directory you want to use your garage_administration_api_v0garage_v0_8_0 from, and run: - -```shell -npm link /path/to/ -``` - -Finally, you need to build the module: - -```shell -npm run build -``` - -#### git - -If the library is hosted at a git repository, e.g.https://github.com/GIT_USER_ID/GIT_REPO_ID -then install it via: - -```shell - npm install GIT_USER_ID/GIT_REPO_ID --save -``` - -### For browser - -The library also works in the browser environment via npm and [browserify](http://browserify.org/). After following -the above steps with Node.js and installing browserify with `npm install -g browserify`, -perform the following (assuming *main.js* is your entry file): - -```shell -browserify main.js > bundle.js -``` - -Then include *bundle.js* in the HTML pages. - -### Webpack Configuration - -Using Webpack you may encounter the following error: "Module not found: Error: -Cannot resolve module", most certainly you should disable AMD loader. Add/merge -the following section to your webpack config: - -```javascript -module: { - rules: [ - { - parser: { - amd: false - } - } - ] -} -``` - -## Getting Started - -Please follow the [installation](#installation) instruction and execute the following JS code: - -```javascript -var garage = require('garage_administration_api_v0garage_v0_8_0'); - -var defaultClient = garage.ApiClient.instance; -// Configure Bearer access token for authorization: bearerAuth -var bearerAuth = defaultClient.authentications['bearerAuth']; -bearerAuth.accessToken = "YOUR ACCESS TOKEN" - -var api = new garage.BucketApi() -var allowBucketKeyRequest = new garage.AllowBucketKeyRequest(); // {AllowBucketKeyRequest} Aliases to put on the new bucket -var callback = function(error, data, response) { - if (error) { - console.error(error); - } else { - console.log('API called successfully. Returned data: ' + data); - } -}; -api.allowBucketKey(allowBucketKeyRequest, callback); - -``` - -## Documentation for API Endpoints - -All URIs are relative to *http://localhost:3903/v0* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*garage.BucketApi* | [**allowBucketKey**](docs/BucketApi.md#allowBucketKey) | **POST** /bucket/allow | Allow key -*garage.BucketApi* | [**createBucket**](docs/BucketApi.md#createBucket) | **POST** /bucket | Create a bucket -*garage.BucketApi* | [**deleteBucket**](docs/BucketApi.md#deleteBucket) | **DELETE** /bucket?id={bucket_id} | Delete a bucket -*garage.BucketApi* | [**deleteBucketGlobalAlias**](docs/BucketApi.md#deleteBucketGlobalAlias) | **DELETE** /bucket/alias/global | Delete a global alias -*garage.BucketApi* | [**deleteBucketLocalAlias**](docs/BucketApi.md#deleteBucketLocalAlias) | **DELETE** /bucket/alias/local | Delete a local alias -*garage.BucketApi* | [**denyBucketKey**](docs/BucketApi.md#denyBucketKey) | **POST** /bucket/deny | Deny key -*garage.BucketApi* | [**findBucketInfo**](docs/BucketApi.md#findBucketInfo) | **GET** /bucket?globalAlias={alias} | Find a bucket -*garage.BucketApi* | [**getBucketInfo**](docs/BucketApi.md#getBucketInfo) | **GET** /bucket?id={bucket_id} | Get a bucket -*garage.BucketApi* | [**listBuckets**](docs/BucketApi.md#listBuckets) | **GET** /bucket | List all buckets -*garage.BucketApi* | [**putBucketGlobalAlias**](docs/BucketApi.md#putBucketGlobalAlias) | **PUT** /bucket/alias/global | Add a global alias -*garage.BucketApi* | [**putBucketLocalAlias**](docs/BucketApi.md#putBucketLocalAlias) | **PUT** /bucket/alias/local | Add a local alias -*garage.BucketApi* | [**updateBucket**](docs/BucketApi.md#updateBucket) | **PUT** /bucket?id={bucket_id} | Update a bucket -*garage.KeyApi* | [**addKey**](docs/KeyApi.md#addKey) | **POST** /key | Create a new API key -*garage.KeyApi* | [**deleteKey**](docs/KeyApi.md#deleteKey) | **DELETE** /key?id={access_key} | Delete a key -*garage.KeyApi* | [**getKey**](docs/KeyApi.md#getKey) | **GET** /key?id={access_key} | Get key information -*garage.KeyApi* | [**importKey**](docs/KeyApi.md#importKey) | **POST** /key/import | Import an existing key -*garage.KeyApi* | [**listKeys**](docs/KeyApi.md#listKeys) | **GET** /key | List all keys -*garage.KeyApi* | [**searchKey**](docs/KeyApi.md#searchKey) | **GET** /key?search={pattern} | Select key by pattern -*garage.KeyApi* | [**updateKey**](docs/KeyApi.md#updateKey) | **POST** /key?id={access_key} | Update a key -*garage.LayoutApi* | [**addLayout**](docs/LayoutApi.md#addLayout) | **POST** /layout | Send modifications to the cluster layout -*garage.LayoutApi* | [**applyLayout**](docs/LayoutApi.md#applyLayout) | **POST** /layout/apply | Apply staged layout -*garage.LayoutApi* | [**getLayout**](docs/LayoutApi.md#getLayout) | **GET** /layout | Details on the current and staged layout -*garage.LayoutApi* | [**revertLayout**](docs/LayoutApi.md#revertLayout) | **POST** /layout/revert | Clear staged layout -*garage.NodesApi* | [**addNode**](docs/NodesApi.md#addNode) | **POST** /connect | Connect target node to other Garage nodes -*garage.NodesApi* | [**getNodes**](docs/NodesApi.md#getNodes) | **GET** /status | Status of this node and other nodes in the cluster - - -## Documentation for Models - - - [garage.AddKeyRequest](docs/AddKeyRequest.md) - - [garage.AddNode200ResponseInner](docs/AddNode200ResponseInner.md) - - [garage.AllowBucketKeyRequest](docs/AllowBucketKeyRequest.md) - - [garage.AllowBucketKeyRequestPermissions](docs/AllowBucketKeyRequestPermissions.md) - - [garage.BucketInfo](docs/BucketInfo.md) - - [garage.BucketInfoQuotas](docs/BucketInfoQuotas.md) - - [garage.BucketInfoWebsiteConfig](docs/BucketInfoWebsiteConfig.md) - - [garage.BucketKeyInfo](docs/BucketKeyInfo.md) - - [garage.ClusterLayout](docs/ClusterLayout.md) - - [garage.CreateBucketRequest](docs/CreateBucketRequest.md) - - [garage.CreateBucketRequestLocalAlias](docs/CreateBucketRequestLocalAlias.md) - - [garage.CreateBucketRequestLocalAliasAllow](docs/CreateBucketRequestLocalAliasAllow.md) - - [garage.GetNodes200Response](docs/GetNodes200Response.md) - - [garage.ImportKeyRequest](docs/ImportKeyRequest.md) - - [garage.KeyInfo](docs/KeyInfo.md) - - [garage.KeyInfoBucketsInner](docs/KeyInfoBucketsInner.md) - - [garage.KeyInfoBucketsInnerPermissions](docs/KeyInfoBucketsInnerPermissions.md) - - [garage.KeyInfoPermissions](docs/KeyInfoPermissions.md) - - [garage.LayoutVersion](docs/LayoutVersion.md) - - [garage.ListBuckets200ResponseInner](docs/ListBuckets200ResponseInner.md) - - [garage.ListBuckets200ResponseInnerLocalAliasesInner](docs/ListBuckets200ResponseInnerLocalAliasesInner.md) - - [garage.ListKeys200ResponseInner](docs/ListKeys200ResponseInner.md) - - [garage.NodeClusterInfo](docs/NodeClusterInfo.md) - - [garage.NodeNetworkInfo](docs/NodeNetworkInfo.md) - - [garage.UpdateBucketRequest](docs/UpdateBucketRequest.md) - - [garage.UpdateBucketRequestQuotas](docs/UpdateBucketRequestQuotas.md) - - [garage.UpdateBucketRequestWebsiteAccess](docs/UpdateBucketRequestWebsiteAccess.md) - - [garage.UpdateKeyRequest](docs/UpdateKeyRequest.md) - - [garage.UpdateKeyRequestAllow](docs/UpdateKeyRequestAllow.md) - - [garage.UpdateKeyRequestDeny](docs/UpdateKeyRequestDeny.md) - - -## Documentation for Authorization - - - -### bearerAuth - -- **Type**: Bearer authentication - diff --git a/javascript/docs/AddKeyRequest.md b/javascript/docs/AddKeyRequest.md deleted file mode 100644 index 558e1b7..0000000 --- a/javascript/docs/AddKeyRequest.md +++ /dev/null @@ -1,9 +0,0 @@ -# garage.AddKeyRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] - - diff --git a/javascript/docs/AddNode200ResponseInner.md b/javascript/docs/AddNode200ResponseInner.md deleted file mode 100644 index 1d70a1d..0000000 --- a/javascript/docs/AddNode200ResponseInner.md +++ /dev/null @@ -1,10 +0,0 @@ -# garage.AddNode200ResponseInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**success** | **Boolean** | | [optional] -**error** | **String** | | [optional] - - diff --git a/javascript/docs/AllowBucketKeyRequest.md b/javascript/docs/AllowBucketKeyRequest.md deleted file mode 100644 index 815c9a5..0000000 --- a/javascript/docs/AllowBucketKeyRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# garage.AllowBucketKeyRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bucketId** | **String** | | -**accessKeyId** | **String** | | -**permissions** | [**AllowBucketKeyRequestPermissions**](AllowBucketKeyRequestPermissions.md) | | - - diff --git a/javascript/docs/AllowBucketKeyRequestPermissions.md b/javascript/docs/AllowBucketKeyRequestPermissions.md deleted file mode 100644 index e8f8357..0000000 --- a/javascript/docs/AllowBucketKeyRequestPermissions.md +++ /dev/null @@ -1,11 +0,0 @@ -# garage.AllowBucketKeyRequestPermissions - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**read** | **Boolean** | | -**write** | **Boolean** | | -**owner** | **Boolean** | | - - diff --git a/javascript/docs/BucketApi.md b/javascript/docs/BucketApi.md deleted file mode 100644 index 5251168..0000000 --- a/javascript/docs/BucketApi.md +++ /dev/null @@ -1,618 +0,0 @@ -# garage.BucketApi - -All URIs are relative to *http://localhost:3903/v0* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**allowBucketKey**](BucketApi.md#allowBucketKey) | **POST** /bucket/allow | Allow key -[**createBucket**](BucketApi.md#createBucket) | **POST** /bucket | Create a bucket -[**deleteBucket**](BucketApi.md#deleteBucket) | **DELETE** /bucket?id={bucket_id} | Delete a bucket -[**deleteBucketGlobalAlias**](BucketApi.md#deleteBucketGlobalAlias) | **DELETE** /bucket/alias/global | Delete a global alias -[**deleteBucketLocalAlias**](BucketApi.md#deleteBucketLocalAlias) | **DELETE** /bucket/alias/local | Delete a local alias -[**denyBucketKey**](BucketApi.md#denyBucketKey) | **POST** /bucket/deny | Deny key -[**findBucketInfo**](BucketApi.md#findBucketInfo) | **GET** /bucket?globalAlias={alias} | Find a bucket -[**getBucketInfo**](BucketApi.md#getBucketInfo) | **GET** /bucket?id={bucket_id} | Get a bucket -[**listBuckets**](BucketApi.md#listBuckets) | **GET** /bucket | List all buckets -[**putBucketGlobalAlias**](BucketApi.md#putBucketGlobalAlias) | **PUT** /bucket/alias/global | Add a global alias -[**putBucketLocalAlias**](BucketApi.md#putBucketLocalAlias) | **PUT** /bucket/alias/local | Add a local alias -[**updateBucket**](BucketApi.md#updateBucket) | **PUT** /bucket?id={bucket_id} | Update a bucket - - - -## allowBucketKey - -> BucketInfo allowBucketKey(allowBucketKeyRequest) - -Allow key - -⚠️ **DISCLAIMER**: Garage's developers are aware that this endpoint has an unconventional semantic. Be extra careful when implementing it, its behavior is not obvious. Allows a key to do read/write/owner operations on a bucket. Flags in permissions which have the value true will be activated. Other flags will remain unchanged (ie. they will keep their internal value). For example, if you set read to true, the key will be allowed to read the bucket. If you set it to false, the key will keeps its previous read permission. If you want to disallow read for the key, check the DenyBucketKey operation. - -### Example - -```javascript -import garage from 'garage_administration_api_v0garage_v0_8_0'; -let defaultClient = garage.ApiClient.instance; -// Configure Bearer access token for authorization: bearerAuth -let bearerAuth = defaultClient.authentications['bearerAuth']; -bearerAuth.accessToken = "YOUR ACCESS TOKEN" - -let apiInstance = new garage.BucketApi(); -let allowBucketKeyRequest = new garage.AllowBucketKeyRequest(); // AllowBucketKeyRequest | Aliases to put on the new bucket -apiInstance.allowBucketKey(allowBucketKeyRequest, (error, data, response) => { - if (error) { - console.error(error); - } else { - console.log('API called successfully. Returned data: ' + data); - } -}); -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **allowBucketKeyRequest** | [**AllowBucketKeyRequest**](AllowBucketKeyRequest.md)| Aliases to put on the new bucket | - -### Return type - -[**BucketInfo**](BucketInfo.md) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - - -## createBucket - -> BucketInfo createBucket(createBucketRequest) - -Create a bucket - -Creates a new bucket, either with a global alias, a local one, or no alias at all. Technically, you can also specify both `globalAlias` and `localAlias` and that would create two aliases. - -### Example - -```javascript -import garage from 'garage_administration_api_v0garage_v0_8_0'; -let defaultClient = garage.ApiClient.instance; -// Configure Bearer access token for authorization: bearerAuth -let bearerAuth = defaultClient.authentications['bearerAuth']; -bearerAuth.accessToken = "YOUR ACCESS TOKEN" - -let apiInstance = new garage.BucketApi(); -let createBucketRequest = new garage.CreateBucketRequest(); // CreateBucketRequest | Aliases to put on the new bucket -apiInstance.createBucket(createBucketRequest, (error, data, response) => { - if (error) { - console.error(error); - } else { - console.log('API called successfully. Returned data: ' + data); - } -}); -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **createBucketRequest** | [**CreateBucketRequest**](CreateBucketRequest.md)| Aliases to put on the new bucket | - -### Return type - -[**BucketInfo**](BucketInfo.md) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - - -## deleteBucket - -> deleteBucket(bucketId) - -Delete a bucket - -Delete a bucket.Deletes a storage bucket. A bucket cannot be deleted if it is not empty. **Warning:** this will delete all aliases associated with the bucket! - -### Example - -```javascript -import garage from 'garage_administration_api_v0garage_v0_8_0'; -let defaultClient = garage.ApiClient.instance; -// Configure Bearer access token for authorization: bearerAuth -let bearerAuth = defaultClient.authentications['bearerAuth']; -bearerAuth.accessToken = "YOUR ACCESS TOKEN" - -let apiInstance = new garage.BucketApi(); -let bucketId = b4018dc61b27ccb5c64ec1b24f53454bbbd180697c758c4d47a22a8921864a87; // String | The exact bucket identifier, a 32 bytes hexadecimal string -apiInstance.deleteBucket(bucketId, (error, data, response) => { - if (error) { - console.error(error); - } else { - console.log('API called successfully.'); - } -}); -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **bucketId** | **String**| The exact bucket identifier, a 32 bytes hexadecimal string | - -### Return type - -null (empty response body) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - - -## deleteBucketGlobalAlias - -> BucketInfo deleteBucketGlobalAlias(id, alias) - -Delete a global alias - -Delete a global alias from the target bucket - -### Example - -```javascript -import garage from 'garage_administration_api_v0garage_v0_8_0'; -let defaultClient = garage.ApiClient.instance; -// Configure Bearer access token for authorization: bearerAuth -let bearerAuth = defaultClient.authentications['bearerAuth']; -bearerAuth.accessToken = "YOUR ACCESS TOKEN" - -let apiInstance = new garage.BucketApi(); -let id = e6a14cd6a27f48684579ec6b381c078ab11697e6bc8513b72b2f5307e25fff9b; // String | -let alias = my_documents; // String | -apiInstance.deleteBucketGlobalAlias(id, alias, (error, data, response) => { - if (error) { - console.error(error); - } else { - console.log('API called successfully. Returned data: ' + data); - } -}); -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **String**| | - **alias** | **String**| | - -### Return type - -[**BucketInfo**](BucketInfo.md) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -## deleteBucketLocalAlias - -> BucketInfo deleteBucketLocalAlias(id, accessKeyId, alias) - -Delete a local alias - -Delete a local alias, bound to specified account, from the target bucket - -### Example - -```javascript -import garage from 'garage_administration_api_v0garage_v0_8_0'; -let defaultClient = garage.ApiClient.instance; -// Configure Bearer access token for authorization: bearerAuth -let bearerAuth = defaultClient.authentications['bearerAuth']; -bearerAuth.accessToken = "YOUR ACCESS TOKEN" - -let apiInstance = new garage.BucketApi(); -let id = e6a14cd6a27f48684579ec6b381c078ab11697e6bc8513b72b2f5307e25fff9b; // String | -let accessKeyId = GK31c2f218a2e44f485b94239e; // String | -let alias = my_documents; // String | -apiInstance.deleteBucketLocalAlias(id, accessKeyId, alias, (error, data, response) => { - if (error) { - console.error(error); - } else { - console.log('API called successfully. Returned data: ' + data); - } -}); -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **String**| | - **accessKeyId** | **String**| | - **alias** | **String**| | - -### Return type - -[**BucketInfo**](BucketInfo.md) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -## denyBucketKey - -> BucketInfo denyBucketKey(allowBucketKeyRequest) - -Deny key - -⚠️ **DISCLAIMER**: Garage's developers are aware that this endpoint has an unconventional semantic. Be extra careful when implementing it, its behavior is not obvious. Denies a key from doing read/write/owner operations on a bucket. Flags in permissions which have the value true will be deactivated. Other flags will remain unchanged. For example, if you set read to true, the key will be denied from reading. If you set read to false, the key will keep its previous permissions. If you want the key to have the reading permission, check the AllowBucketKey operation. - -### Example - -```javascript -import garage from 'garage_administration_api_v0garage_v0_8_0'; -let defaultClient = garage.ApiClient.instance; -// Configure Bearer access token for authorization: bearerAuth -let bearerAuth = defaultClient.authentications['bearerAuth']; -bearerAuth.accessToken = "YOUR ACCESS TOKEN" - -let apiInstance = new garage.BucketApi(); -let allowBucketKeyRequest = new garage.AllowBucketKeyRequest(); // AllowBucketKeyRequest | Aliases to put on the new bucket -apiInstance.denyBucketKey(allowBucketKeyRequest, (error, data, response) => { - if (error) { - console.error(error); - } else { - console.log('API called successfully. Returned data: ' + data); - } -}); -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **allowBucketKeyRequest** | [**AllowBucketKeyRequest**](AllowBucketKeyRequest.md)| Aliases to put on the new bucket | - -### Return type - -[**BucketInfo**](BucketInfo.md) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - - -## findBucketInfo - -> BucketInfo findBucketInfo(alias) - -Find a bucket - -Find a bucket by its global alias - -### Example - -```javascript -import garage from 'garage_administration_api_v0garage_v0_8_0'; -let defaultClient = garage.ApiClient.instance; -// Configure Bearer access token for authorization: bearerAuth -let bearerAuth = defaultClient.authentications['bearerAuth']; -bearerAuth.accessToken = "YOUR ACCESS TOKEN" - -let apiInstance = new garage.BucketApi(); -let alias = my_documents; // String | The exact global alias of one of the existing buckets -apiInstance.findBucketInfo(alias, (error, data, response) => { - if (error) { - console.error(error); - } else { - console.log('API called successfully. Returned data: ' + data); - } -}); -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **alias** | **String**| The exact global alias of one of the existing buckets | - -### Return type - -[**BucketInfo**](BucketInfo.md) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -## getBucketInfo - -> BucketInfo getBucketInfo(bucketId) - -Get a bucket - -Given a bucket identifier, get its information. It includes its aliases, its web configuration, keys that have some permissions on it, some statistics (number of objects, size), number of dangling multipart uploads, and its quotas (if any). - -### Example - -```javascript -import garage from 'garage_administration_api_v0garage_v0_8_0'; -let defaultClient = garage.ApiClient.instance; -// Configure Bearer access token for authorization: bearerAuth -let bearerAuth = defaultClient.authentications['bearerAuth']; -bearerAuth.accessToken = "YOUR ACCESS TOKEN" - -let apiInstance = new garage.BucketApi(); -let bucketId = b4018dc61b27ccb5c64ec1b24f53454bbbd180697c758c4d47a22a8921864a87; // String | The exact bucket identifier, a 32 bytes hexadecimal string -apiInstance.getBucketInfo(bucketId, (error, data, response) => { - if (error) { - console.error(error); - } else { - console.log('API called successfully. Returned data: ' + data); - } -}); -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **bucketId** | **String**| The exact bucket identifier, a 32 bytes hexadecimal string | - -### Return type - -[**BucketInfo**](BucketInfo.md) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -## listBuckets - -> [ListBuckets200ResponseInner] listBuckets() - -List all buckets - -List all the buckets on the cluster with their UUID and their global and local aliases. - -### Example - -```javascript -import garage from 'garage_administration_api_v0garage_v0_8_0'; -let defaultClient = garage.ApiClient.instance; -// Configure Bearer access token for authorization: bearerAuth -let bearerAuth = defaultClient.authentications['bearerAuth']; -bearerAuth.accessToken = "YOUR ACCESS TOKEN" - -let apiInstance = new garage.BucketApi(); -apiInstance.listBuckets((error, data, response) => { - if (error) { - console.error(error); - } else { - console.log('API called successfully. Returned data: ' + data); - } -}); -``` - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**[ListBuckets200ResponseInner]**](ListBuckets200ResponseInner.md) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -## putBucketGlobalAlias - -> BucketInfo putBucketGlobalAlias(id, alias) - -Add a global alias - -Add a global alias to the target bucket - -### Example - -```javascript -import garage from 'garage_administration_api_v0garage_v0_8_0'; -let defaultClient = garage.ApiClient.instance; -// Configure Bearer access token for authorization: bearerAuth -let bearerAuth = defaultClient.authentications['bearerAuth']; -bearerAuth.accessToken = "YOUR ACCESS TOKEN" - -let apiInstance = new garage.BucketApi(); -let id = e6a14cd6a27f48684579ec6b381c078ab11697e6bc8513b72b2f5307e25fff9b; // String | -let alias = my_documents; // String | -apiInstance.putBucketGlobalAlias(id, alias, (error, data, response) => { - if (error) { - console.error(error); - } else { - console.log('API called successfully. Returned data: ' + data); - } -}); -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **String**| | - **alias** | **String**| | - -### Return type - -[**BucketInfo**](BucketInfo.md) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -## putBucketLocalAlias - -> BucketInfo putBucketLocalAlias(id, accessKeyId, alias) - -Add a local alias - -Add a local alias, bound to specified account, to the target bucket - -### Example - -```javascript -import garage from 'garage_administration_api_v0garage_v0_8_0'; -let defaultClient = garage.ApiClient.instance; -// Configure Bearer access token for authorization: bearerAuth -let bearerAuth = defaultClient.authentications['bearerAuth']; -bearerAuth.accessToken = "YOUR ACCESS TOKEN" - -let apiInstance = new garage.BucketApi(); -let id = e6a14cd6a27f48684579ec6b381c078ab11697e6bc8513b72b2f5307e25fff9b; // String | -let accessKeyId = GK31c2f218a2e44f485b94239e; // String | -let alias = my_documents; // String | -apiInstance.putBucketLocalAlias(id, accessKeyId, alias, (error, data, response) => { - if (error) { - console.error(error); - } else { - console.log('API called successfully. Returned data: ' + data); - } -}); -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **String**| | - **accessKeyId** | **String**| | - **alias** | **String**| | - -### Return type - -[**BucketInfo**](BucketInfo.md) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -## updateBucket - -> BucketInfo updateBucket(bucketId, updateBucketRequest) - -Update a bucket - -All fields (`websiteAccess` and `quotas`) are optionnal. If they are present, the corresponding modifications are applied to the bucket, otherwise nothing is changed. In `websiteAccess`: if `enabled` is `true`, `indexDocument` must be specified. The field `errorDocument` is optional, if no error document is set a generic error message is displayed when errors happen. Conversely, if `enabled` is `false`, neither `indexDocument` nor `errorDocument` must be specified. In `quotas`: new values of `maxSize` and `maxObjects` must both be specified, or set to `null` to remove the quotas. An absent value will be considered the same as a `null`. It is not possible to change only one of the two quotas. - -### Example - -```javascript -import garage from 'garage_administration_api_v0garage_v0_8_0'; -let defaultClient = garage.ApiClient.instance; -// Configure Bearer access token for authorization: bearerAuth -let bearerAuth = defaultClient.authentications['bearerAuth']; -bearerAuth.accessToken = "YOUR ACCESS TOKEN" - -let apiInstance = new garage.BucketApi(); -let bucketId = b4018dc61b27ccb5c64ec1b24f53454bbbd180697c758c4d47a22a8921864a87; // String | The exact bucket identifier, a 32 bytes hexadecimal string -let updateBucketRequest = new garage.UpdateBucketRequest(); // UpdateBucketRequest | Requested changes on the bucket. Both root fields are optionals. -apiInstance.updateBucket(bucketId, updateBucketRequest, (error, data, response) => { - if (error) { - console.error(error); - } else { - console.log('API called successfully. Returned data: ' + data); - } -}); -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **bucketId** | **String**| The exact bucket identifier, a 32 bytes hexadecimal string | - **updateBucketRequest** | [**UpdateBucketRequest**](UpdateBucketRequest.md)| Requested changes on the bucket. Both root fields are optionals. | - -### Return type - -[**BucketInfo**](BucketInfo.md) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - diff --git a/javascript/docs/BucketInfo.md b/javascript/docs/BucketInfo.md deleted file mode 100644 index 85742e1..0000000 --- a/javascript/docs/BucketInfo.md +++ /dev/null @@ -1,17 +0,0 @@ -# garage.BucketInfo - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | | [optional] -**globalAliases** | **[String]** | | [optional] -**websiteAccess** | **Boolean** | | [optional] -**websiteConfig** | [**BucketInfoWebsiteConfig**](BucketInfoWebsiteConfig.md) | | [optional] -**keys** | [**[BucketKeyInfo]**](BucketKeyInfo.md) | | [optional] -**objects** | **Number** | | [optional] -**bytes** | **Number** | | [optional] -**unfinishedUploads** | **Number** | | [optional] -**quotas** | [**BucketInfoQuotas**](BucketInfoQuotas.md) | | [optional] - - diff --git a/javascript/docs/BucketInfoQuotas.md b/javascript/docs/BucketInfoQuotas.md deleted file mode 100644 index 3a7ebf3..0000000 --- a/javascript/docs/BucketInfoQuotas.md +++ /dev/null @@ -1,10 +0,0 @@ -# garage.BucketInfoQuotas - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**maxSize** | **Number** | | [optional] -**maxObjects** | **Number** | | [optional] - - diff --git a/javascript/docs/BucketInfoWebsiteConfig.md b/javascript/docs/BucketInfoWebsiteConfig.md deleted file mode 100644 index f9caf33..0000000 --- a/javascript/docs/BucketInfoWebsiteConfig.md +++ /dev/null @@ -1,10 +0,0 @@ -# garage.BucketInfoWebsiteConfig - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**indexDocument** | **String** | | [optional] -**errorDocument** | **String** | | [optional] - - diff --git a/javascript/docs/BucketKeyInfo.md b/javascript/docs/BucketKeyInfo.md deleted file mode 100644 index 0ce8851..0000000 --- a/javascript/docs/BucketKeyInfo.md +++ /dev/null @@ -1,12 +0,0 @@ -# garage.BucketKeyInfo - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**accessKeyId** | **String** | | [optional] -**name** | **String** | | [optional] -**permissions** | [**CreateBucketRequestLocalAliasAllow**](CreateBucketRequestLocalAliasAllow.md) | | [optional] -**bucketLocalAliases** | **[String]** | | [optional] - - diff --git a/javascript/docs/ClusterLayout.md b/javascript/docs/ClusterLayout.md deleted file mode 100644 index 7918431..0000000 --- a/javascript/docs/ClusterLayout.md +++ /dev/null @@ -1,11 +0,0 @@ -# garage.ClusterLayout - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**version** | **Number** | | -**roles** | [**{String: NodeClusterInfo}**](NodeClusterInfo.md) | | -**stagedRoleChanges** | [**{String: NodeClusterInfo}**](NodeClusterInfo.md) | | - - diff --git a/javascript/docs/CreateBucketRequest.md b/javascript/docs/CreateBucketRequest.md deleted file mode 100644 index 0d24199..0000000 --- a/javascript/docs/CreateBucketRequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# garage.CreateBucketRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**globalAlias** | **String** | | [optional] -**localAlias** | [**CreateBucketRequestLocalAlias**](CreateBucketRequestLocalAlias.md) | | [optional] - - diff --git a/javascript/docs/CreateBucketRequestLocalAlias.md b/javascript/docs/CreateBucketRequestLocalAlias.md deleted file mode 100644 index d9d7289..0000000 --- a/javascript/docs/CreateBucketRequestLocalAlias.md +++ /dev/null @@ -1,11 +0,0 @@ -# garage.CreateBucketRequestLocalAlias - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**accessKeyId** | **String** | | [optional] -**alias** | **String** | | [optional] -**allow** | [**CreateBucketRequestLocalAliasAllow**](CreateBucketRequestLocalAliasAllow.md) | | [optional] - - diff --git a/javascript/docs/CreateBucketRequestLocalAliasAllow.md b/javascript/docs/CreateBucketRequestLocalAliasAllow.md deleted file mode 100644 index 09cb07c..0000000 --- a/javascript/docs/CreateBucketRequestLocalAliasAllow.md +++ /dev/null @@ -1,11 +0,0 @@ -# garage.CreateBucketRequestLocalAliasAllow - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**read** | **Boolean** | | [optional] -**write** | **Boolean** | | [optional] -**owner** | **Boolean** | | [optional] - - diff --git a/javascript/docs/GetNodes200Response.md b/javascript/docs/GetNodes200Response.md deleted file mode 100644 index bcf6758..0000000 --- a/javascript/docs/GetNodes200Response.md +++ /dev/null @@ -1,12 +0,0 @@ -# garage.GetNodes200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**node** | **String** | | -**garageVersion** | **String** | | -**knownNodes** | [**{String: NodeNetworkInfo}**](NodeNetworkInfo.md) | | -**layout** | [**ClusterLayout**](ClusterLayout.md) | | - - diff --git a/javascript/docs/ImportKeyRequest.md b/javascript/docs/ImportKeyRequest.md deleted file mode 100644 index 3de7d4e..0000000 --- a/javascript/docs/ImportKeyRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# garage.ImportKeyRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | -**accessKeyId** | **String** | | -**secretAccessKey** | **String** | | - - diff --git a/javascript/docs/KeyApi.md b/javascript/docs/KeyApi.md deleted file mode 100644 index 99cbcde..0000000 --- a/javascript/docs/KeyApi.md +++ /dev/null @@ -1,356 +0,0 @@ -# garage.KeyApi - -All URIs are relative to *http://localhost:3903/v0* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**addKey**](KeyApi.md#addKey) | **POST** /key | Create a new API key -[**deleteKey**](KeyApi.md#deleteKey) | **DELETE** /key?id={access_key} | Delete a key -[**getKey**](KeyApi.md#getKey) | **GET** /key?id={access_key} | Get key information -[**importKey**](KeyApi.md#importKey) | **POST** /key/import | Import an existing key -[**listKeys**](KeyApi.md#listKeys) | **GET** /key | List all keys -[**searchKey**](KeyApi.md#searchKey) | **GET** /key?search={pattern} | Select key by pattern -[**updateKey**](KeyApi.md#updateKey) | **POST** /key?id={access_key} | Update a key - - - -## addKey - -> KeyInfo addKey(addKeyRequest) - -Create a new API key - -Creates a new API access key. - -### Example - -```javascript -import garage from 'garage_administration_api_v0garage_v0_8_0'; -let defaultClient = garage.ApiClient.instance; -// Configure Bearer access token for authorization: bearerAuth -let bearerAuth = defaultClient.authentications['bearerAuth']; -bearerAuth.accessToken = "YOUR ACCESS TOKEN" - -let apiInstance = new garage.KeyApi(); -let addKeyRequest = new garage.AddKeyRequest(); // AddKeyRequest | \"You can set a friendly name for this key, send an empty string instead\" -apiInstance.addKey(addKeyRequest, (error, data, response) => { - if (error) { - console.error(error); - } else { - console.log('API called successfully. Returned data: ' + data); - } -}); -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **addKeyRequest** | [**AddKeyRequest**](AddKeyRequest.md)| \"You can set a friendly name for this key, send an empty string instead\" | - -### Return type - -[**KeyInfo**](KeyInfo.md) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - - -## deleteKey - -> deleteKey(accessKey) - -Delete a key - -Delete a key from the cluster. Its access will be removed from all the buckets. Buckets are not automatically deleted and can be dangling. You should manually delete them before. - -### Example - -```javascript -import garage from 'garage_administration_api_v0garage_v0_8_0'; -let defaultClient = garage.ApiClient.instance; -// Configure Bearer access token for authorization: bearerAuth -let bearerAuth = defaultClient.authentications['bearerAuth']; -bearerAuth.accessToken = "YOUR ACCESS TOKEN" - -let apiInstance = new garage.KeyApi(); -let accessKey = GK31c2f218a2e44f485b94239e; // String | The exact API access key generated by Garage -apiInstance.deleteKey(accessKey, (error, data, response) => { - if (error) { - console.error(error); - } else { - console.log('API called successfully.'); - } -}); -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **accessKey** | **String**| The exact API access key generated by Garage | - -### Return type - -null (empty response body) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - - -## getKey - -> KeyInfo getKey(accessKey) - -Get key information - -Return information about a specific key and return its information - -### Example - -```javascript -import garage from 'garage_administration_api_v0garage_v0_8_0'; -let defaultClient = garage.ApiClient.instance; -// Configure Bearer access token for authorization: bearerAuth -let bearerAuth = defaultClient.authentications['bearerAuth']; -bearerAuth.accessToken = "YOUR ACCESS TOKEN" - -let apiInstance = new garage.KeyApi(); -let accessKey = GK31c2f218a2e44f485b94239e; // String | The exact API access key generated by Garage -apiInstance.getKey(accessKey, (error, data, response) => { - if (error) { - console.error(error); - } else { - console.log('API called successfully. Returned data: ' + data); - } -}); -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **accessKey** | **String**| The exact API access key generated by Garage | - -### Return type - -[**KeyInfo**](KeyInfo.md) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -## importKey - -> KeyInfo importKey(importKeyRequest) - -Import an existing key - -Imports an existing API key. This feature must only be used for migrations and backup restore. **Do not use it to generate custom key identifiers or you will break your Garage cluster.** - -### Example - -```javascript -import garage from 'garage_administration_api_v0garage_v0_8_0'; -let defaultClient = garage.ApiClient.instance; -// Configure Bearer access token for authorization: bearerAuth -let bearerAuth = defaultClient.authentications['bearerAuth']; -bearerAuth.accessToken = "YOUR ACCESS TOKEN" - -let apiInstance = new garage.KeyApi(); -let importKeyRequest = new garage.ImportKeyRequest(); // ImportKeyRequest | Information on the key to import -apiInstance.importKey(importKeyRequest, (error, data, response) => { - if (error) { - console.error(error); - } else { - console.log('API called successfully. Returned data: ' + data); - } -}); -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **importKeyRequest** | [**ImportKeyRequest**](ImportKeyRequest.md)| Information on the key to import | - -### Return type - -[**KeyInfo**](KeyInfo.md) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - - -## listKeys - -> [ListKeys200ResponseInner] listKeys() - -List all keys - -Returns all API access keys in the cluster. - -### Example - -```javascript -import garage from 'garage_administration_api_v0garage_v0_8_0'; -let defaultClient = garage.ApiClient.instance; -// Configure Bearer access token for authorization: bearerAuth -let bearerAuth = defaultClient.authentications['bearerAuth']; -bearerAuth.accessToken = "YOUR ACCESS TOKEN" - -let apiInstance = new garage.KeyApi(); -apiInstance.listKeys((error, data, response) => { - if (error) { - console.error(error); - } else { - console.log('API called successfully. Returned data: ' + data); - } -}); -``` - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**[ListKeys200ResponseInner]**](ListKeys200ResponseInner.md) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -## searchKey - -> KeyInfo searchKey(pattern) - -Select key by pattern - -Find the first key matching the given pattern based on its identifier aor friendly name and return its information. - -### Example - -```javascript -import garage from 'garage_administration_api_v0garage_v0_8_0'; -let defaultClient = garage.ApiClient.instance; -// Configure Bearer access token for authorization: bearerAuth -let bearerAuth = defaultClient.authentications['bearerAuth']; -bearerAuth.accessToken = "YOUR ACCESS TOKEN" - -let apiInstance = new garage.KeyApi(); -let pattern = test-k; // String | A pattern (beginning or full string) corresponding to a key identifier or friendly name -apiInstance.searchKey(pattern, (error, data, response) => { - if (error) { - console.error(error); - } else { - console.log('API called successfully. Returned data: ' + data); - } -}); -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pattern** | **String**| A pattern (beginning or full string) corresponding to a key identifier or friendly name | - -### Return type - -[**KeyInfo**](KeyInfo.md) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -## updateKey - -> KeyInfo updateKey(accessKey, updateKeyRequest) - -Update a key - -Updates information about the specified API access key. - -### Example - -```javascript -import garage from 'garage_administration_api_v0garage_v0_8_0'; -let defaultClient = garage.ApiClient.instance; -// Configure Bearer access token for authorization: bearerAuth -let bearerAuth = defaultClient.authentications['bearerAuth']; -bearerAuth.accessToken = "YOUR ACCESS TOKEN" - -let apiInstance = new garage.KeyApi(); -let accessKey = GK31c2f218a2e44f485b94239e; // String | The exact API access key generated by Garage -let updateKeyRequest = new garage.UpdateKeyRequest(); // UpdateKeyRequest | For a given key, provide a first set with the permissions to grant, and a second set with the permissions to remove -apiInstance.updateKey(accessKey, updateKeyRequest, (error, data, response) => { - if (error) { - console.error(error); - } else { - console.log('API called successfully. Returned data: ' + data); - } -}); -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **accessKey** | **String**| The exact API access key generated by Garage | - **updateKeyRequest** | [**UpdateKeyRequest**](UpdateKeyRequest.md)| For a given key, provide a first set with the permissions to grant, and a second set with the permissions to remove | - -### Return type - -[**KeyInfo**](KeyInfo.md) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - diff --git a/javascript/docs/KeyInfo.md b/javascript/docs/KeyInfo.md deleted file mode 100644 index fff00b1..0000000 --- a/javascript/docs/KeyInfo.md +++ /dev/null @@ -1,13 +0,0 @@ -# garage.KeyInfo - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] -**accessKeyId** | **String** | | [optional] -**secretAccessKey** | **String** | | [optional] -**permissions** | [**KeyInfoPermissions**](KeyInfoPermissions.md) | | [optional] -**buckets** | [**[KeyInfoBucketsInner]**](KeyInfoBucketsInner.md) | | [optional] - - diff --git a/javascript/docs/KeyInfoBucketsInner.md b/javascript/docs/KeyInfoBucketsInner.md deleted file mode 100644 index 4e43408..0000000 --- a/javascript/docs/KeyInfoBucketsInner.md +++ /dev/null @@ -1,12 +0,0 @@ -# garage.KeyInfoBucketsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | | [optional] -**globalAliases** | **[String]** | | [optional] -**localAliases** | **[String]** | | [optional] -**permissions** | [**KeyInfoBucketsInnerPermissions**](KeyInfoBucketsInnerPermissions.md) | | [optional] - - diff --git a/javascript/docs/KeyInfoBucketsInnerPermissions.md b/javascript/docs/KeyInfoBucketsInnerPermissions.md deleted file mode 100644 index 9e6b3d7..0000000 --- a/javascript/docs/KeyInfoBucketsInnerPermissions.md +++ /dev/null @@ -1,11 +0,0 @@ -# garage.KeyInfoBucketsInnerPermissions - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**read** | **Boolean** | | [optional] -**write** | **Boolean** | | [optional] -**owner** | **Boolean** | | [optional] - - diff --git a/javascript/docs/KeyInfoPermissions.md b/javascript/docs/KeyInfoPermissions.md deleted file mode 100644 index ccf75d1..0000000 --- a/javascript/docs/KeyInfoPermissions.md +++ /dev/null @@ -1,9 +0,0 @@ -# garage.KeyInfoPermissions - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**createBucket** | **Boolean** | | [optional] - - diff --git a/javascript/docs/LayoutApi.md b/javascript/docs/LayoutApi.md deleted file mode 100644 index 89d0d29..0000000 --- a/javascript/docs/LayoutApi.md +++ /dev/null @@ -1,204 +0,0 @@ -# garage.LayoutApi - -All URIs are relative to *http://localhost:3903/v0* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**addLayout**](LayoutApi.md#addLayout) | **POST** /layout | Send modifications to the cluster layout -[**applyLayout**](LayoutApi.md#applyLayout) | **POST** /layout/apply | Apply staged layout -[**getLayout**](LayoutApi.md#getLayout) | **GET** /layout | Details on the current and staged layout -[**revertLayout**](LayoutApi.md#revertLayout) | **POST** /layout/revert | Clear staged layout - - - -## addLayout - -> addLayout(requestBody) - -Send modifications to the cluster layout - -Send modifications to the cluster layout. These modifications will be included in the staged role changes, visible in subsequent calls of `GET /layout`. Once the set of staged changes is satisfactory, the user may call `POST /layout/apply` to apply the changed changes, or `POST /layout/revert` to clear all of the staged changes in the layout. Note that setting the capacity to `null` will configure the node as a gateway. - -### Example - -```javascript -import garage from 'garage_administration_api_v0garage_v0_8_0'; -let defaultClient = garage.ApiClient.instance; -// Configure Bearer access token for authorization: bearerAuth -let bearerAuth = defaultClient.authentications['bearerAuth']; -bearerAuth.accessToken = "YOUR ACCESS TOKEN" - -let apiInstance = new garage.LayoutApi(); -let requestBody = {key: new garage.NodeClusterInfo()}; // {String: NodeClusterInfo} | To add a new node to the layout or to change the configuration of an existing node, simply set the values you want. To remove a node, set it to `null` instead of passing a configuration object. Contrary to the CLI that may update only a subset of the fields capacity, zone and tags, when calling this API all of these values must be specified. -apiInstance.addLayout(requestBody, (error, data, response) => { - if (error) { - console.error(error); - } else { - console.log('API called successfully.'); - } -}); -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **requestBody** | [**{String: NodeClusterInfo}**](NodeClusterInfo.md)| To add a new node to the layout or to change the configuration of an existing node, simply set the values you want. To remove a node, set it to `null` instead of passing a configuration object. Contrary to the CLI that may update only a subset of the fields capacity, zone and tags, when calling this API all of these values must be specified. | - -### Return type - -null (empty response body) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: Not defined - - -## applyLayout - -> applyLayout(layoutVersion) - -Apply staged layout - -Applies to the cluster the layout changes currently registered as staged layout changes. - -### Example - -```javascript -import garage from 'garage_administration_api_v0garage_v0_8_0'; -let defaultClient = garage.ApiClient.instance; -// Configure Bearer access token for authorization: bearerAuth -let bearerAuth = defaultClient.authentications['bearerAuth']; -bearerAuth.accessToken = "YOUR ACCESS TOKEN" - -let apiInstance = new garage.LayoutApi(); -let layoutVersion = new garage.LayoutVersion(); // LayoutVersion | Similarly to the CLI, the body must include the version of the new layout that will be created, which MUST be 1 + the value of the currently existing layout in the cluster. -apiInstance.applyLayout(layoutVersion, (error, data, response) => { - if (error) { - console.error(error); - } else { - console.log('API called successfully.'); - } -}); -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **layoutVersion** | [**LayoutVersion**](LayoutVersion.md)| Similarly to the CLI, the body must include the version of the new layout that will be created, which MUST be 1 + the value of the currently existing layout in the cluster. | - -### Return type - -null (empty response body) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: Not defined - - -## getLayout - -> ClusterLayout getLayout() - -Details on the current and staged layout - -Returns the cluster's current layout, including: - Currently configured cluster layout - Staged changes to the cluster layout *The info returned by this endpoint is a subset of the info returned by `GET /status`.* - -### Example - -```javascript -import garage from 'garage_administration_api_v0garage_v0_8_0'; -let defaultClient = garage.ApiClient.instance; -// Configure Bearer access token for authorization: bearerAuth -let bearerAuth = defaultClient.authentications['bearerAuth']; -bearerAuth.accessToken = "YOUR ACCESS TOKEN" - -let apiInstance = new garage.LayoutApi(); -apiInstance.getLayout((error, data, response) => { - if (error) { - console.error(error); - } else { - console.log('API called successfully. Returned data: ' + data); - } -}); -``` - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**ClusterLayout**](ClusterLayout.md) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -## revertLayout - -> revertLayout(layoutVersion) - -Clear staged layout - -Clears all of the staged layout changes. - -### Example - -```javascript -import garage from 'garage_administration_api_v0garage_v0_8_0'; -let defaultClient = garage.ApiClient.instance; -// Configure Bearer access token for authorization: bearerAuth -let bearerAuth = defaultClient.authentications['bearerAuth']; -bearerAuth.accessToken = "YOUR ACCESS TOKEN" - -let apiInstance = new garage.LayoutApi(); -let layoutVersion = new garage.LayoutVersion(); // LayoutVersion | Reverting the staged changes is done by incrementing the version number and clearing the contents of the staged change list. Similarly to the CLI, the body must include the incremented version number, which MUST be 1 + the value of the currently existing layout in the cluster. -apiInstance.revertLayout(layoutVersion, (error, data, response) => { - if (error) { - console.error(error); - } else { - console.log('API called successfully.'); - } -}); -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **layoutVersion** | [**LayoutVersion**](LayoutVersion.md)| Reverting the staged changes is done by incrementing the version number and clearing the contents of the staged change list. Similarly to the CLI, the body must include the incremented version number, which MUST be 1 + the value of the currently existing layout in the cluster. | - -### Return type - -null (empty response body) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: Not defined - diff --git a/javascript/docs/LayoutVersion.md b/javascript/docs/LayoutVersion.md deleted file mode 100644 index 521aa5d..0000000 --- a/javascript/docs/LayoutVersion.md +++ /dev/null @@ -1,9 +0,0 @@ -# garage.LayoutVersion - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**version** | **Number** | | [optional] - - diff --git a/javascript/docs/ListBuckets200ResponseInner.md b/javascript/docs/ListBuckets200ResponseInner.md deleted file mode 100644 index a8369a9..0000000 --- a/javascript/docs/ListBuckets200ResponseInner.md +++ /dev/null @@ -1,11 +0,0 @@ -# garage.ListBuckets200ResponseInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | | -**globalAliases** | **[String]** | | [optional] -**localAliases** | [**[ListBuckets200ResponseInnerLocalAliasesInner]**](ListBuckets200ResponseInnerLocalAliasesInner.md) | | [optional] - - diff --git a/javascript/docs/ListBuckets200ResponseInnerLocalAliasesInner.md b/javascript/docs/ListBuckets200ResponseInnerLocalAliasesInner.md deleted file mode 100644 index 9cd2ce9..0000000 --- a/javascript/docs/ListBuckets200ResponseInnerLocalAliasesInner.md +++ /dev/null @@ -1,10 +0,0 @@ -# garage.ListBuckets200ResponseInnerLocalAliasesInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**alias** | **String** | | -**accessKeyId** | **String** | | - - diff --git a/javascript/docs/ListKeys200ResponseInner.md b/javascript/docs/ListKeys200ResponseInner.md deleted file mode 100644 index 5975ab9..0000000 --- a/javascript/docs/ListKeys200ResponseInner.md +++ /dev/null @@ -1,10 +0,0 @@ -# garage.ListKeys200ResponseInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | | -**name** | **String** | | [optional] - - diff --git a/javascript/docs/NodeClusterInfo.md b/javascript/docs/NodeClusterInfo.md deleted file mode 100644 index da13ef3..0000000 --- a/javascript/docs/NodeClusterInfo.md +++ /dev/null @@ -1,11 +0,0 @@ -# garage.NodeClusterInfo - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**zone** | **String** | | -**capacity** | **Number** | | -**tags** | **[String]** | User defined tags, put whatever makes sense for you, these tags are not interpreted by Garage | - - diff --git a/javascript/docs/NodeNetworkInfo.md b/javascript/docs/NodeNetworkInfo.md deleted file mode 100644 index 943734c..0000000 --- a/javascript/docs/NodeNetworkInfo.md +++ /dev/null @@ -1,12 +0,0 @@ -# garage.NodeNetworkInfo - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**addr** | **String** | | -**isUp** | **Boolean** | | -**lastSeenSecsAgo** | **Number** | | -**hostname** | **String** | | - - diff --git a/javascript/docs/NodesApi.md b/javascript/docs/NodesApi.md deleted file mode 100644 index 8f91109..0000000 --- a/javascript/docs/NodesApi.md +++ /dev/null @@ -1,104 +0,0 @@ -# garage.NodesApi - -All URIs are relative to *http://localhost:3903/v0* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**addNode**](NodesApi.md#addNode) | **POST** /connect | Connect target node to other Garage nodes -[**getNodes**](NodesApi.md#getNodes) | **GET** /status | Status of this node and other nodes in the cluster - - - -## addNode - -> [AddNode200ResponseInner] addNode(requestBody) - -Connect target node to other Garage nodes - -Instructs this Garage node to connect to other Garage nodes at specified `<node_id>@<net_address>`. `node_id` is generated automatically on node start. - -### Example - -```javascript -import garage from 'garage_administration_api_v0garage_v0_8_0'; -let defaultClient = garage.ApiClient.instance; -// Configure Bearer access token for authorization: bearerAuth -let bearerAuth = defaultClient.authentications['bearerAuth']; -bearerAuth.accessToken = "YOUR ACCESS TOKEN" - -let apiInstance = new garage.NodesApi(); -let requestBody = ["null"]; // [String] | -apiInstance.addNode(requestBody, (error, data, response) => { - if (error) { - console.error(error); - } else { - console.log('API called successfully. Returned data: ' + data); - } -}); -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **requestBody** | [**[String]**](String.md)| | - -### Return type - -[**[AddNode200ResponseInner]**](AddNode200ResponseInner.md) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - - -## getNodes - -> GetNodes200Response getNodes() - -Status of this node and other nodes in the cluster - -Returns the cluster's current status, including: - ID of the node being queried and its version of the Garage daemon - Live nodes - Currently configured cluster layout - Staged changes to the cluster layout - -### Example - -```javascript -import garage from 'garage_administration_api_v0garage_v0_8_0'; -let defaultClient = garage.ApiClient.instance; -// Configure Bearer access token for authorization: bearerAuth -let bearerAuth = defaultClient.authentications['bearerAuth']; -bearerAuth.accessToken = "YOUR ACCESS TOKEN" - -let apiInstance = new garage.NodesApi(); -apiInstance.getNodes((error, data, response) => { - if (error) { - console.error(error); - } else { - console.log('API called successfully. Returned data: ' + data); - } -}); -``` - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**GetNodes200Response**](GetNodes200Response.md) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - diff --git a/javascript/docs/UpdateBucketRequest.md b/javascript/docs/UpdateBucketRequest.md deleted file mode 100644 index 1786d43..0000000 --- a/javascript/docs/UpdateBucketRequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# garage.UpdateBucketRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**websiteAccess** | [**UpdateBucketRequestWebsiteAccess**](UpdateBucketRequestWebsiteAccess.md) | | [optional] -**quotas** | [**UpdateBucketRequestQuotas**](UpdateBucketRequestQuotas.md) | | [optional] - - diff --git a/javascript/docs/UpdateBucketRequestQuotas.md b/javascript/docs/UpdateBucketRequestQuotas.md deleted file mode 100644 index b344626..0000000 --- a/javascript/docs/UpdateBucketRequestQuotas.md +++ /dev/null @@ -1,10 +0,0 @@ -# garage.UpdateBucketRequestQuotas - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**maxSize** | **Number** | | [optional] -**maxObjects** | **Number** | | [optional] - - diff --git a/javascript/docs/UpdateBucketRequestWebsiteAccess.md b/javascript/docs/UpdateBucketRequestWebsiteAccess.md deleted file mode 100644 index c1fbb63..0000000 --- a/javascript/docs/UpdateBucketRequestWebsiteAccess.md +++ /dev/null @@ -1,11 +0,0 @@ -# garage.UpdateBucketRequestWebsiteAccess - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**enabled** | **Boolean** | | [optional] -**indexDocument** | **String** | | [optional] -**errorDocument** | **String** | | [optional] - - diff --git a/javascript/docs/UpdateKeyRequest.md b/javascript/docs/UpdateKeyRequest.md deleted file mode 100644 index 5fbbcd1..0000000 --- a/javascript/docs/UpdateKeyRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# garage.UpdateKeyRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] -**allow** | [**UpdateKeyRequestAllow**](UpdateKeyRequestAllow.md) | | [optional] -**deny** | [**UpdateKeyRequestDeny**](UpdateKeyRequestDeny.md) | | [optional] - - diff --git a/javascript/docs/UpdateKeyRequestAllow.md b/javascript/docs/UpdateKeyRequestAllow.md deleted file mode 100644 index 2270595..0000000 --- a/javascript/docs/UpdateKeyRequestAllow.md +++ /dev/null @@ -1,9 +0,0 @@ -# garage.UpdateKeyRequestAllow - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**createBucket** | **Boolean** | | [optional] - - diff --git a/javascript/docs/UpdateKeyRequestDeny.md b/javascript/docs/UpdateKeyRequestDeny.md deleted file mode 100644 index b8001fd..0000000 --- a/javascript/docs/UpdateKeyRequestDeny.md +++ /dev/null @@ -1,9 +0,0 @@ -# garage.UpdateKeyRequestDeny - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**createBucket** | **Boolean** | | [optional] - - diff --git a/javascript/git_push.sh b/javascript/git_push.sh deleted file mode 100644 index f53a75d..0000000 --- a/javascript/git_push.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 -git_host=$4 - -if [ "$git_host" = "" ]; then - git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" -fi - -if [ "$git_user_id" = "" ]; then - git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' diff --git a/javascript/mocha.opts b/javascript/mocha.opts deleted file mode 100644 index 9070118..0000000 --- a/javascript/mocha.opts +++ /dev/null @@ -1 +0,0 @@ ---timeout 10000 diff --git a/javascript/package.json b/javascript/package.json deleted file mode 100644 index 302ed1c..0000000 --- a/javascript/package.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "name": "garage_administration_api_v0garage_v0_8_0", - "version": "v0.8.0", - "description": "Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* ", - "license": "Unlicense", - "main": "dist/index.js", - "scripts": { - "build": "babel src -d dist", - "prepare": "npm run build", - "test": "mocha --require @babel/register --recursive" - }, - "browser": { - "fs": false - }, - "dependencies": { - "@babel/cli": "^7.0.0", - "superagent": "^5.3.0" - }, - "devDependencies": { - "@babel/core": "^7.0.0", - "@babel/plugin-proposal-class-properties": "^7.0.0", - "@babel/plugin-proposal-decorators": "^7.0.0", - "@babel/plugin-proposal-do-expressions": "^7.0.0", - "@babel/plugin-proposal-export-default-from": "^7.0.0", - "@babel/plugin-proposal-export-namespace-from": "^7.0.0", - "@babel/plugin-proposal-function-bind": "^7.0.0", - "@babel/plugin-proposal-function-sent": "^7.0.0", - "@babel/plugin-proposal-json-strings": "^7.0.0", - "@babel/plugin-proposal-logical-assignment-operators": "^7.0.0", - "@babel/plugin-proposal-nullish-coalescing-operator": "^7.0.0", - "@babel/plugin-proposal-numeric-separator": "^7.0.0", - "@babel/plugin-proposal-optional-chaining": "^7.0.0", - "@babel/plugin-proposal-pipeline-operator": "^7.0.0", - "@babel/plugin-proposal-throw-expressions": "^7.0.0", - "@babel/plugin-syntax-dynamic-import": "^7.0.0", - "@babel/plugin-syntax-import-meta": "^7.0.0", - "@babel/preset-env": "^7.0.0", - "@babel/register": "^7.0.0", - "expect.js": "^0.3.1", - "mocha": "^8.0.1", - "sinon": "^7.2.0" - }, - "files": [ - "dist" - ] -} diff --git a/javascript/src/ApiClient.js b/javascript/src/ApiClient.js deleted file mode 100644 index 39c9eeb..0000000 --- a/javascript/src/ApiClient.js +++ /dev/null @@ -1,692 +0,0 @@ -/** - * Garage Administration API v0+garage-v0.8.0 - * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - * - * The version of the OpenAPI document: v0.8.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - - -import superagent from "superagent"; -import querystring from "querystring"; - -/** -* @module ApiClient -* @version v0.8.0 -*/ - -/** -* Manages low level client-server communications, parameter marshalling, etc. There should not be any need for an -* application to use this class directly - the *Api and model classes provide the public API for the service. The -* contents of this file should be regarded as internal but are documented for completeness. -* @alias module:ApiClient -* @class -*/ -class ApiClient { - /** - * The base URL against which to resolve every API call's (relative) path. - * Overrides the default value set in spec file if present - * @param {String} basePath - */ - constructor(basePath = 'http://localhost:3903/v0') { - /** - * The base URL against which to resolve every API call's (relative) path. - * @type {String} - * @default http://localhost:3903/v0 - */ - this.basePath = basePath.replace(/\/+$/, ''); - - /** - * The authentication methods to be included for all API calls. - * @type {Array.} - */ - this.authentications = { - 'bearerAuth': {type: 'bearer'} - } - - /** - * The default HTTP headers to be included for all API calls. - * @type {Array.} - * @default {} - */ - this.defaultHeaders = { - 'User-Agent': 'OpenAPI-Generator/v0.8.0/Javascript' - }; - - /** - * The default HTTP timeout for all API calls. - * @type {Number} - * @default 60000 - */ - this.timeout = 60000; - - /** - * If set to false an additional timestamp parameter is added to all API GET calls to - * prevent browser caching - * @type {Boolean} - * @default true - */ - this.cache = true; - - /** - * If set to true, the client will save the cookies from each server - * response, and return them in the next request. - * @default false - */ - this.enableCookies = false; - - /* - * Used to save and return cookies in a node.js (non-browser) setting, - * if this.enableCookies is set to true. - */ - if (typeof window === 'undefined') { - this.agent = new superagent.agent(); - } - - /* - * Allow user to override superagent agent - */ - this.requestAgent = null; - - /* - * Allow user to add superagent plugins - */ - this.plugins = null; - - } - - /** - * Returns a string representation for an actual parameter. - * @param param The actual parameter. - * @returns {String} The string representation of param. - */ - paramToString(param) { - if (param == undefined || param == null) { - return ''; - } - if (param instanceof Date) { - return param.toJSON(); - } - if (ApiClient.canBeJsonified(param)) { - return JSON.stringify(param); - } - - return param.toString(); - } - - /** - * Returns a boolean indicating if the parameter could be JSON.stringified - * @param param The actual parameter - * @returns {Boolean} Flag indicating if param can be JSON.stringified - */ - static canBeJsonified(str) { - if (typeof str !== 'string' && typeof str !== 'object') return false; - try { - const type = str.toString(); - return type === '[object Object]' - || type === '[object Array]'; - } catch (err) { - return false; - } - }; - - /** - * Builds full URL by appending the given path to the base URL and replacing path parameter place-holders with parameter values. - * NOTE: query parameters are not handled here. - * @param {String} path The path to append to the base URL. - * @param {Object} pathParams The parameter values to append. - * @param {String} apiBasePath Base path defined in the path, operation level to override the default one - * @returns {String} The encoded path with parameter values substituted. - */ - buildUrl(path, pathParams, apiBasePath) { - if (!path.match(/^\//)) { - path = '/' + path; - } - - var url = this.basePath + path; - - // use API (operation, path) base path if defined - if (apiBasePath !== null && apiBasePath !== undefined) { - url = apiBasePath + path; - } - - url = url.replace(/\{([\w-\.]+)\}/g, (fullMatch, key) => { - var value; - if (pathParams.hasOwnProperty(key)) { - value = this.paramToString(pathParams[key]); - } else { - value = fullMatch; - } - - return encodeURIComponent(value); - }); - - return url; - } - - /** - * Checks whether the given content type represents JSON.
- * JSON content type examples:
- *
    - *
  • application/json
  • - *
  • application/json; charset=UTF8
  • - *
  • APPLICATION/JSON
  • - *
- * @param {String} contentType The MIME content type to check. - * @returns {Boolean} true if contentType represents JSON, otherwise false. - */ - isJsonMime(contentType) { - return Boolean(contentType != null && contentType.match(/^application\/json(;.*)?$/i)); - } - - /** - * Chooses a content type from the given array, with JSON preferred; i.e. return JSON if included, otherwise return the first. - * @param {Array.} contentTypes - * @returns {String} The chosen content type, preferring JSON. - */ - jsonPreferredMime(contentTypes) { - for (var i = 0; i < contentTypes.length; i++) { - if (this.isJsonMime(contentTypes[i])) { - return contentTypes[i]; - } - } - - return contentTypes[0]; - } - - /** - * Checks whether the given parameter value represents file-like content. - * @param param The parameter to check. - * @returns {Boolean} true if param represents a file. - */ - isFileParam(param) { - // fs.ReadStream in Node.js and Electron (but not in runtime like browserify) - if (typeof require === 'function') { - let fs; - try { - fs = require('fs'); - } catch (err) {} - if (fs && fs.ReadStream && param instanceof fs.ReadStream) { - return true; - } - } - - // Buffer in Node.js - if (typeof Buffer === 'function' && param instanceof Buffer) { - return true; - } - - // Blob in browser - if (typeof Blob === 'function' && param instanceof Blob) { - return true; - } - - // File in browser (it seems File object is also instance of Blob, but keep this for safe) - if (typeof File === 'function' && param instanceof File) { - return true; - } - - return false; - } - - /** - * Normalizes parameter values: - *
    - *
  • remove nils
  • - *
  • keep files and arrays
  • - *
  • format to string with `paramToString` for other cases
  • - *
- * @param {Object.} params The parameters as object properties. - * @returns {Object.} normalized parameters. - */ - normalizeParams(params) { - var newParams = {}; - for (var key in params) { - if (params.hasOwnProperty(key) && params[key] != undefined && params[key] != null) { - var value = params[key]; - if (this.isFileParam(value) || Array.isArray(value)) { - newParams[key] = value; - } else { - newParams[key] = this.paramToString(value); - } - } - } - - return newParams; - } - - /** - * Builds a string representation of an array-type actual parameter, according to the given collection format. - * @param {Array} param An array parameter. - * @param {module:ApiClient.CollectionFormatEnum} collectionFormat The array element separator strategy. - * @returns {String|Array} A string representation of the supplied collection, using the specified delimiter. Returns - * param as is if collectionFormat is multi. - */ - buildCollectionParam(param, collectionFormat) { - if (param == null) { - return null; - } - switch (collectionFormat) { - case 'csv': - return param.map(this.paramToString, this).join(','); - case 'ssv': - return param.map(this.paramToString, this).join(' '); - case 'tsv': - return param.map(this.paramToString, this).join('\t'); - case 'pipes': - return param.map(this.paramToString, this).join('|'); - case 'multi': - //return the array directly as SuperAgent will handle it as expected - return param.map(this.paramToString, this); - case 'passthrough': - return param; - default: - throw new Error('Unknown collection format: ' + collectionFormat); - } - } - - /** - * Applies authentication headers to the request. - * @param {Object} request The request object created by a superagent() call. - * @param {Array.} authNames An array of authentication method names. - */ - applyAuthToRequest(request, authNames) { - authNames.forEach((authName) => { - var auth = this.authentications[authName]; - switch (auth.type) { - case 'basic': - if (auth.username || auth.password) { - request.auth(auth.username || '', auth.password || ''); - } - - break; - case 'bearer': - if (auth.accessToken) { - var localVarBearerToken = typeof auth.accessToken === 'function' - ? auth.accessToken() - : auth.accessToken - request.set({'Authorization': 'Bearer ' + localVarBearerToken}); - } - - break; - case 'apiKey': - if (auth.apiKey) { - var data = {}; - if (auth.apiKeyPrefix) { - data[auth.name] = auth.apiKeyPrefix + ' ' + auth.apiKey; - } else { - data[auth.name] = auth.apiKey; - } - - if (auth['in'] === 'header') { - request.set(data); - } else { - request.query(data); - } - } - - break; - case 'oauth2': - if (auth.accessToken) { - request.set({'Authorization': 'Bearer ' + auth.accessToken}); - } - - break; - default: - throw new Error('Unknown authentication type: ' + auth.type); - } - }); - } - - /** - * Deserializes an HTTP response body into a value of the specified type. - * @param {Object} response A SuperAgent response object. - * @param {(String|Array.|Object.|Function)} returnType The type to return. Pass a string for simple types - * or the constructor function for a complex type. Pass an array containing the type name to return an array of that type. To - * return an object, pass an object with one property whose name is the key type and whose value is the corresponding value type: - * all properties on data will be converted to this type. - * @returns A value of the specified type. - */ - deserialize(response, returnType) { - if (response == null || returnType == null || response.status == 204) { - return null; - } - - // Rely on SuperAgent for parsing response body. - // See http://visionmedia.github.io/superagent/#parsing-response-bodies - var data = response.body; - if (data == null || (typeof data === 'object' && typeof data.length === 'undefined' && !Object.keys(data).length)) { - // SuperAgent does not always produce a body; use the unparsed response as a fallback - data = response.text; - } - - return ApiClient.convertToType(data, returnType); - } - - /** - * Callback function to receive the result of the operation. - * @callback module:ApiClient~callApiCallback - * @param {String} error Error message, if any. - * @param data The data returned by the service call. - * @param {String} response The complete HTTP response. - */ - - /** - * Invokes the REST service using the supplied settings and parameters. - * @param {String} path The base URL to invoke. - * @param {String} httpMethod The HTTP method to use. - * @param {Object.} pathParams A map of path parameters and their values. - * @param {Object.} queryParams A map of query parameters and their values. - * @param {Object.} headerParams A map of header parameters and their values. - * @param {Object.} formParams A map of form parameters and their values. - * @param {Object} bodyParam The value to pass as the request body. - * @param {Array.} authNames An array of authentication type names. - * @param {Array.} contentTypes An array of request MIME types. - * @param {Array.} accepts An array of acceptable response MIME types. - * @param {(String|Array|ObjectFunction)} returnType The required type to return; can be a string for simple types or the - * constructor for a complex type. - * @param {String} apiBasePath base path defined in the operation/path level to override the default one - * @param {module:ApiClient~callApiCallback} callback The callback function. - * @returns {Object} The SuperAgent request object. - */ - callApi(path, httpMethod, pathParams, - queryParams, headerParams, formParams, bodyParam, authNames, contentTypes, accepts, - returnType, apiBasePath, callback) { - - var url = this.buildUrl(path, pathParams, apiBasePath); - var request = superagent(httpMethod, url); - - if (this.plugins !== null) { - for (var index in this.plugins) { - if (this.plugins.hasOwnProperty(index)) { - request.use(this.plugins[index]) - } - } - } - - // apply authentications - this.applyAuthToRequest(request, authNames); - - // set query parameters - if (httpMethod.toUpperCase() === 'GET' && this.cache === false) { - queryParams['_'] = new Date().getTime(); - } - - request.query(this.normalizeParams(queryParams)); - - // set header parameters - request.set(this.defaultHeaders).set(this.normalizeParams(headerParams)); - - // set requestAgent if it is set by user - if (this.requestAgent) { - request.agent(this.requestAgent); - } - - // set request timeout - request.timeout(this.timeout); - - var contentType = this.jsonPreferredMime(contentTypes); - if (contentType) { - // Issue with superagent and multipart/form-data (https://github.com/visionmedia/superagent/issues/746) - if(contentType != 'multipart/form-data') { - request.type(contentType); - } - } - - if (contentType === 'application/x-www-form-urlencoded') { - request.send(querystring.stringify(this.normalizeParams(formParams))); - } else if (contentType == 'multipart/form-data') { - var _formParams = this.normalizeParams(formParams); - for (var key in _formParams) { - if (_formParams.hasOwnProperty(key)) { - let _formParamsValue = _formParams[key]; - if (this.isFileParam(_formParamsValue)) { - // file field - request.attach(key, _formParamsValue); - } else if (Array.isArray(_formParamsValue) && _formParamsValue.length - && this.isFileParam(_formParamsValue[0])) { - // multiple files - _formParamsValue.forEach(file => request.attach(key, file)); - } else { - request.field(key, _formParamsValue); - } - } - } - } else if (bodyParam !== null && bodyParam !== undefined) { - if (!request.header['Content-Type']) { - request.type('application/json'); - } - request.send(bodyParam); - } - - var accept = this.jsonPreferredMime(accepts); - if (accept) { - request.accept(accept); - } - - if (returnType === 'Blob') { - request.responseType('blob'); - } else if (returnType === 'String') { - request.responseType('text'); - } - - // Attach previously saved cookies, if enabled - if (this.enableCookies){ - if (typeof window === 'undefined') { - this.agent._attachCookies(request); - } - else { - request.withCredentials(); - } - } - - request.end((error, response) => { - if (callback) { - var data = null; - if (!error) { - try { - data = this.deserialize(response, returnType); - if (this.enableCookies && typeof window === 'undefined'){ - this.agent._saveCookies(response); - } - } catch (err) { - error = err; - } - } - - callback(error, data, response); - } - }); - - return request; - } - - /** - * Parses an ISO-8601 string representation or epoch representation of a date value. - * @param {String} str The date value as a string. - * @returns {Date} The parsed date object. - */ - static parseDate(str) { - if (isNaN(str)) { - return new Date(str.replace(/(\d)(T)(\d)/i, '$1 $3')); - } - return new Date(+str); - } - - /** - * Converts a value to the specified type. - * @param {(String|Object)} data The data to convert, as a string or object. - * @param {(String|Array.|Object.|Function)} type The type to return. Pass a string for simple types - * or the constructor function for a complex type. Pass an array containing the type name to return an array of that type. To - * return an object, pass an object with one property whose name is the key type and whose value is the corresponding value type: - * all properties on data will be converted to this type. - * @returns An instance of the specified type or null or undefined if data is null or undefined. - */ - static convertToType(data, type) { - if (data === null || data === undefined) - return data - - switch (type) { - case 'Boolean': - return Boolean(data); - case 'Integer': - return parseInt(data, 10); - case 'Number': - return parseFloat(data); - case 'String': - return String(data); - case 'Date': - return ApiClient.parseDate(String(data)); - case 'Blob': - return data; - default: - if (type === Object) { - // generic object, return directly - return data; - } else if (typeof type.constructFromObject === 'function') { - // for model type like User and enum class - return type.constructFromObject(data); - } else if (Array.isArray(type)) { - // for array type like: ['String'] - var itemType = type[0]; - - return data.map((item) => { - return ApiClient.convertToType(item, itemType); - }); - } else if (typeof type === 'object') { - // for plain object type like: {'String': 'Integer'} - var keyType, valueType; - for (var k in type) { - if (type.hasOwnProperty(k)) { - keyType = k; - valueType = type[k]; - break; - } - } - - var result = {}; - for (var k in data) { - if (data.hasOwnProperty(k)) { - var key = ApiClient.convertToType(k, keyType); - var value = ApiClient.convertToType(data[k], valueType); - result[key] = value; - } - } - - return result; - } else { - // for unknown type, return the data directly - return data; - } - } - } - - /** - * Gets an array of host settings - * @returns An array of host settings - */ - hostSettings() { - return [ - { - 'url': "http://localhost:3903/v0", - 'description': "A local server", - } - ]; - } - - getBasePathFromSettings(index, variables={}) { - var servers = this.hostSettings(); - - // check array index out of bound - if (index < 0 || index >= servers.length) { - throw new Error("Invalid index " + index + " when selecting the host settings. Must be less than " + servers.length); - } - - var server = servers[index]; - var url = server['url']; - - // go through variable and assign a value - for (var variable_name in server['variables']) { - if (variable_name in variables) { - let variable = server['variables'][variable_name]; - if ( !('enum_values' in variable) || variable['enum_values'].includes(variables[variable_name]) ) { - url = url.replace("{" + variable_name + "}", variables[variable_name]); - } else { - throw new Error("The variable `" + variable_name + "` in the host URL has invalid value " + variables[variable_name] + ". Must be " + server['variables'][variable_name]['enum_values'] + "."); - } - } else { - // use default value - url = url.replace("{" + variable_name + "}", server['variables'][variable_name]['default_value']) - } - } - return url; - } - - /** - * Constructs a new map or array model from REST data. - * @param data {Object|Array} The REST data. - * @param obj {Object|Array} The target object or array. - */ - static constructFromObject(data, obj, itemType) { - if (Array.isArray(data)) { - for (var i = 0; i < data.length; i++) { - if (data.hasOwnProperty(i)) - obj[i] = ApiClient.convertToType(data[i], itemType); - } - } else { - for (var k in data) { - if (data.hasOwnProperty(k)) - obj[k] = ApiClient.convertToType(data[k], itemType); - } - } - }; -} - -/** - * Enumeration of collection format separator strategies. - * @enum {String} - * @readonly - */ -ApiClient.CollectionFormatEnum = { - /** - * Comma-separated values. Value: csv - * @const - */ - CSV: ',', - - /** - * Space-separated values. Value: ssv - * @const - */ - SSV: ' ', - - /** - * Tab-separated values. Value: tsv - * @const - */ - TSV: '\t', - - /** - * Pipe(|)-separated values. Value: pipes - * @const - */ - PIPES: '|', - - /** - * Native array. Value: multi - * @const - */ - MULTI: 'multi' -}; - -/** -* The default API client implementation. -* @type {module:ApiClient} -*/ -ApiClient.instance = new ApiClient(); -export default ApiClient; diff --git a/javascript/src/api/BucketApi.js b/javascript/src/api/BucketApi.js deleted file mode 100644 index 5abbc9c..0000000 --- a/javascript/src/api/BucketApi.js +++ /dev/null @@ -1,589 +0,0 @@ -/** - * Garage Administration API v0+garage-v0.8.0 - * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - * - * The version of the OpenAPI document: v0.8.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - - -import ApiClient from "../ApiClient"; -import AllowBucketKeyRequest from '../model/AllowBucketKeyRequest'; -import BucketInfo from '../model/BucketInfo'; -import CreateBucketRequest from '../model/CreateBucketRequest'; -import ListBuckets200ResponseInner from '../model/ListBuckets200ResponseInner'; -import UpdateBucketRequest from '../model/UpdateBucketRequest'; - -/** -* Bucket service. -* @module api/BucketApi -* @version v0.8.0 -*/ -export default class BucketApi { - - /** - * Constructs a new BucketApi. - * @alias module:api/BucketApi - * @class - * @param {module:ApiClient} [apiClient] Optional API client implementation to use, - * default to {@link module:ApiClient#instance} if unspecified. - */ - constructor(apiClient) { - this.apiClient = apiClient || ApiClient.instance; - } - - - /** - * Callback function to receive the result of the allowBucketKey operation. - * @callback module:api/BucketApi~allowBucketKeyCallback - * @param {String} error Error message, if any. - * @param {module:model/BucketInfo} data The data returned by the service call. - * @param {String} response The complete HTTP response. - */ - - /** - * Allow key - * ⚠️ **DISCLAIMER**: Garage's developers are aware that this endpoint has an unconventional semantic. Be extra careful when implementing it, its behavior is not obvious. Allows a key to do read/write/owner operations on a bucket. Flags in permissions which have the value true will be activated. Other flags will remain unchanged (ie. they will keep their internal value). For example, if you set read to true, the key will be allowed to read the bucket. If you set it to false, the key will keeps its previous read permission. If you want to disallow read for the key, check the DenyBucketKey operation. - * @param {module:model/AllowBucketKeyRequest} allowBucketKeyRequest Aliases to put on the new bucket - * @param {module:api/BucketApi~allowBucketKeyCallback} callback The callback function, accepting three arguments: error, data, response - * data is of type: {@link module:model/BucketInfo} - */ - allowBucketKey(allowBucketKeyRequest, callback) { - let postBody = allowBucketKeyRequest; - // verify the required parameter 'allowBucketKeyRequest' is set - if (allowBucketKeyRequest === undefined || allowBucketKeyRequest === null) { - throw new Error("Missing the required parameter 'allowBucketKeyRequest' when calling allowBucketKey"); - } - - let pathParams = { - }; - let queryParams = { - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = ['bearerAuth']; - let contentTypes = ['application/json']; - let accepts = ['application/json']; - let returnType = BucketInfo; - return this.apiClient.callApi( - '/bucket/allow', 'POST', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null, callback - ); - } - - /** - * Callback function to receive the result of the createBucket operation. - * @callback module:api/BucketApi~createBucketCallback - * @param {String} error Error message, if any. - * @param {module:model/BucketInfo} data The data returned by the service call. - * @param {String} response The complete HTTP response. - */ - - /** - * Create a bucket - * Creates a new bucket, either with a global alias, a local one, or no alias at all. Technically, you can also specify both `globalAlias` and `localAlias` and that would create two aliases. - * @param {module:model/CreateBucketRequest} createBucketRequest Aliases to put on the new bucket - * @param {module:api/BucketApi~createBucketCallback} callback The callback function, accepting three arguments: error, data, response - * data is of type: {@link module:model/BucketInfo} - */ - createBucket(createBucketRequest, callback) { - let postBody = createBucketRequest; - // verify the required parameter 'createBucketRequest' is set - if (createBucketRequest === undefined || createBucketRequest === null) { - throw new Error("Missing the required parameter 'createBucketRequest' when calling createBucket"); - } - - let pathParams = { - }; - let queryParams = { - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = ['bearerAuth']; - let contentTypes = ['application/json']; - let accepts = ['application/json']; - let returnType = BucketInfo; - return this.apiClient.callApi( - '/bucket', 'POST', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null, callback - ); - } - - /** - * Callback function to receive the result of the deleteBucket operation. - * @callback module:api/BucketApi~deleteBucketCallback - * @param {String} error Error message, if any. - * @param data This operation does not return a value. - * @param {String} response The complete HTTP response. - */ - - /** - * Delete a bucket - * Delete a bucket.Deletes a storage bucket. A bucket cannot be deleted if it is not empty. **Warning:** this will delete all aliases associated with the bucket! - * @param {String} bucketId The exact bucket identifier, a 32 bytes hexadecimal string - * @param {module:api/BucketApi~deleteBucketCallback} callback The callback function, accepting three arguments: error, data, response - */ - deleteBucket(bucketId, callback) { - let postBody = null; - // verify the required parameter 'bucketId' is set - if (bucketId === undefined || bucketId === null) { - throw new Error("Missing the required parameter 'bucketId' when calling deleteBucket"); - } - - let pathParams = { - 'bucket_id': bucketId - }; - let queryParams = { - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = ['bearerAuth']; - let contentTypes = []; - let accepts = []; - let returnType = null; - return this.apiClient.callApi( - '/bucket?id={bucket_id}', 'DELETE', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null, callback - ); - } - - /** - * Callback function to receive the result of the deleteBucketGlobalAlias operation. - * @callback module:api/BucketApi~deleteBucketGlobalAliasCallback - * @param {String} error Error message, if any. - * @param {module:model/BucketInfo} data The data returned by the service call. - * @param {String} response The complete HTTP response. - */ - - /** - * Delete a global alias - * Delete a global alias from the target bucket - * @param {String} id - * @param {String} alias - * @param {module:api/BucketApi~deleteBucketGlobalAliasCallback} callback The callback function, accepting three arguments: error, data, response - * data is of type: {@link module:model/BucketInfo} - */ - deleteBucketGlobalAlias(id, alias, callback) { - let postBody = null; - // verify the required parameter 'id' is set - if (id === undefined || id === null) { - throw new Error("Missing the required parameter 'id' when calling deleteBucketGlobalAlias"); - } - // verify the required parameter 'alias' is set - if (alias === undefined || alias === null) { - throw new Error("Missing the required parameter 'alias' when calling deleteBucketGlobalAlias"); - } - - let pathParams = { - }; - let queryParams = { - 'id': id, - 'alias': alias - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = ['bearerAuth']; - let contentTypes = []; - let accepts = ['application/json']; - let returnType = BucketInfo; - return this.apiClient.callApi( - '/bucket/alias/global', 'DELETE', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null, callback - ); - } - - /** - * Callback function to receive the result of the deleteBucketLocalAlias operation. - * @callback module:api/BucketApi~deleteBucketLocalAliasCallback - * @param {String} error Error message, if any. - * @param {module:model/BucketInfo} data The data returned by the service call. - * @param {String} response The complete HTTP response. - */ - - /** - * Delete a local alias - * Delete a local alias, bound to specified account, from the target bucket - * @param {String} id - * @param {String} accessKeyId - * @param {String} alias - * @param {module:api/BucketApi~deleteBucketLocalAliasCallback} callback The callback function, accepting three arguments: error, data, response - * data is of type: {@link module:model/BucketInfo} - */ - deleteBucketLocalAlias(id, accessKeyId, alias, callback) { - let postBody = null; - // verify the required parameter 'id' is set - if (id === undefined || id === null) { - throw new Error("Missing the required parameter 'id' when calling deleteBucketLocalAlias"); - } - // verify the required parameter 'accessKeyId' is set - if (accessKeyId === undefined || accessKeyId === null) { - throw new Error("Missing the required parameter 'accessKeyId' when calling deleteBucketLocalAlias"); - } - // verify the required parameter 'alias' is set - if (alias === undefined || alias === null) { - throw new Error("Missing the required parameter 'alias' when calling deleteBucketLocalAlias"); - } - - let pathParams = { - }; - let queryParams = { - 'id': id, - 'accessKeyId': accessKeyId, - 'alias': alias - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = ['bearerAuth']; - let contentTypes = []; - let accepts = ['application/json']; - let returnType = BucketInfo; - return this.apiClient.callApi( - '/bucket/alias/local', 'DELETE', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null, callback - ); - } - - /** - * Callback function to receive the result of the denyBucketKey operation. - * @callback module:api/BucketApi~denyBucketKeyCallback - * @param {String} error Error message, if any. - * @param {module:model/BucketInfo} data The data returned by the service call. - * @param {String} response The complete HTTP response. - */ - - /** - * Deny key - * ⚠️ **DISCLAIMER**: Garage's developers are aware that this endpoint has an unconventional semantic. Be extra careful when implementing it, its behavior is not obvious. Denies a key from doing read/write/owner operations on a bucket. Flags in permissions which have the value true will be deactivated. Other flags will remain unchanged. For example, if you set read to true, the key will be denied from reading. If you set read to false, the key will keep its previous permissions. If you want the key to have the reading permission, check the AllowBucketKey operation. - * @param {module:model/AllowBucketKeyRequest} allowBucketKeyRequest Aliases to put on the new bucket - * @param {module:api/BucketApi~denyBucketKeyCallback} callback The callback function, accepting three arguments: error, data, response - * data is of type: {@link module:model/BucketInfo} - */ - denyBucketKey(allowBucketKeyRequest, callback) { - let postBody = allowBucketKeyRequest; - // verify the required parameter 'allowBucketKeyRequest' is set - if (allowBucketKeyRequest === undefined || allowBucketKeyRequest === null) { - throw new Error("Missing the required parameter 'allowBucketKeyRequest' when calling denyBucketKey"); - } - - let pathParams = { - }; - let queryParams = { - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = ['bearerAuth']; - let contentTypes = ['application/json']; - let accepts = ['application/json']; - let returnType = BucketInfo; - return this.apiClient.callApi( - '/bucket/deny', 'POST', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null, callback - ); - } - - /** - * Callback function to receive the result of the findBucketInfo operation. - * @callback module:api/BucketApi~findBucketInfoCallback - * @param {String} error Error message, if any. - * @param {module:model/BucketInfo} data The data returned by the service call. - * @param {String} response The complete HTTP response. - */ - - /** - * Find a bucket - * Find a bucket by its global alias - * @param {String} alias The exact global alias of one of the existing buckets - * @param {module:api/BucketApi~findBucketInfoCallback} callback The callback function, accepting three arguments: error, data, response - * data is of type: {@link module:model/BucketInfo} - */ - findBucketInfo(alias, callback) { - let postBody = null; - // verify the required parameter 'alias' is set - if (alias === undefined || alias === null) { - throw new Error("Missing the required parameter 'alias' when calling findBucketInfo"); - } - - let pathParams = { - 'alias': alias - }; - let queryParams = { - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = ['bearerAuth']; - let contentTypes = []; - let accepts = ['application/json']; - let returnType = BucketInfo; - return this.apiClient.callApi( - '/bucket?globalAlias={alias}', 'GET', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null, callback - ); - } - - /** - * Callback function to receive the result of the getBucketInfo operation. - * @callback module:api/BucketApi~getBucketInfoCallback - * @param {String} error Error message, if any. - * @param {module:model/BucketInfo} data The data returned by the service call. - * @param {String} response The complete HTTP response. - */ - - /** - * Get a bucket - * Given a bucket identifier, get its information. It includes its aliases, its web configuration, keys that have some permissions on it, some statistics (number of objects, size), number of dangling multipart uploads, and its quotas (if any). - * @param {String} bucketId The exact bucket identifier, a 32 bytes hexadecimal string - * @param {module:api/BucketApi~getBucketInfoCallback} callback The callback function, accepting three arguments: error, data, response - * data is of type: {@link module:model/BucketInfo} - */ - getBucketInfo(bucketId, callback) { - let postBody = null; - // verify the required parameter 'bucketId' is set - if (bucketId === undefined || bucketId === null) { - throw new Error("Missing the required parameter 'bucketId' when calling getBucketInfo"); - } - - let pathParams = { - 'bucket_id': bucketId - }; - let queryParams = { - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = ['bearerAuth']; - let contentTypes = []; - let accepts = ['application/json']; - let returnType = BucketInfo; - return this.apiClient.callApi( - '/bucket?id={bucket_id}', 'GET', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null, callback - ); - } - - /** - * Callback function to receive the result of the listBuckets operation. - * @callback module:api/BucketApi~listBucketsCallback - * @param {String} error Error message, if any. - * @param {Array.} data The data returned by the service call. - * @param {String} response The complete HTTP response. - */ - - /** - * List all buckets - * List all the buckets on the cluster with their UUID and their global and local aliases. - * @param {module:api/BucketApi~listBucketsCallback} callback The callback function, accepting three arguments: error, data, response - * data is of type: {@link Array.} - */ - listBuckets(callback) { - let postBody = null; - - let pathParams = { - }; - let queryParams = { - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = ['bearerAuth']; - let contentTypes = []; - let accepts = ['application/json']; - let returnType = [ListBuckets200ResponseInner]; - return this.apiClient.callApi( - '/bucket', 'GET', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null, callback - ); - } - - /** - * Callback function to receive the result of the putBucketGlobalAlias operation. - * @callback module:api/BucketApi~putBucketGlobalAliasCallback - * @param {String} error Error message, if any. - * @param {module:model/BucketInfo} data The data returned by the service call. - * @param {String} response The complete HTTP response. - */ - - /** - * Add a global alias - * Add a global alias to the target bucket - * @param {String} id - * @param {String} alias - * @param {module:api/BucketApi~putBucketGlobalAliasCallback} callback The callback function, accepting three arguments: error, data, response - * data is of type: {@link module:model/BucketInfo} - */ - putBucketGlobalAlias(id, alias, callback) { - let postBody = null; - // verify the required parameter 'id' is set - if (id === undefined || id === null) { - throw new Error("Missing the required parameter 'id' when calling putBucketGlobalAlias"); - } - // verify the required parameter 'alias' is set - if (alias === undefined || alias === null) { - throw new Error("Missing the required parameter 'alias' when calling putBucketGlobalAlias"); - } - - let pathParams = { - }; - let queryParams = { - 'id': id, - 'alias': alias - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = ['bearerAuth']; - let contentTypes = []; - let accepts = ['application/json']; - let returnType = BucketInfo; - return this.apiClient.callApi( - '/bucket/alias/global', 'PUT', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null, callback - ); - } - - /** - * Callback function to receive the result of the putBucketLocalAlias operation. - * @callback module:api/BucketApi~putBucketLocalAliasCallback - * @param {String} error Error message, if any. - * @param {module:model/BucketInfo} data The data returned by the service call. - * @param {String} response The complete HTTP response. - */ - - /** - * Add a local alias - * Add a local alias, bound to specified account, to the target bucket - * @param {String} id - * @param {String} accessKeyId - * @param {String} alias - * @param {module:api/BucketApi~putBucketLocalAliasCallback} callback The callback function, accepting three arguments: error, data, response - * data is of type: {@link module:model/BucketInfo} - */ - putBucketLocalAlias(id, accessKeyId, alias, callback) { - let postBody = null; - // verify the required parameter 'id' is set - if (id === undefined || id === null) { - throw new Error("Missing the required parameter 'id' when calling putBucketLocalAlias"); - } - // verify the required parameter 'accessKeyId' is set - if (accessKeyId === undefined || accessKeyId === null) { - throw new Error("Missing the required parameter 'accessKeyId' when calling putBucketLocalAlias"); - } - // verify the required parameter 'alias' is set - if (alias === undefined || alias === null) { - throw new Error("Missing the required parameter 'alias' when calling putBucketLocalAlias"); - } - - let pathParams = { - }; - let queryParams = { - 'id': id, - 'accessKeyId': accessKeyId, - 'alias': alias - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = ['bearerAuth']; - let contentTypes = []; - let accepts = ['application/json']; - let returnType = BucketInfo; - return this.apiClient.callApi( - '/bucket/alias/local', 'PUT', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null, callback - ); - } - - /** - * Callback function to receive the result of the updateBucket operation. - * @callback module:api/BucketApi~updateBucketCallback - * @param {String} error Error message, if any. - * @param {module:model/BucketInfo} data The data returned by the service call. - * @param {String} response The complete HTTP response. - */ - - /** - * Update a bucket - * All fields (`websiteAccess` and `quotas`) are optionnal. If they are present, the corresponding modifications are applied to the bucket, otherwise nothing is changed. In `websiteAccess`: if `enabled` is `true`, `indexDocument` must be specified. The field `errorDocument` is optional, if no error document is set a generic error message is displayed when errors happen. Conversely, if `enabled` is `false`, neither `indexDocument` nor `errorDocument` must be specified. In `quotas`: new values of `maxSize` and `maxObjects` must both be specified, or set to `null` to remove the quotas. An absent value will be considered the same as a `null`. It is not possible to change only one of the two quotas. - * @param {String} bucketId The exact bucket identifier, a 32 bytes hexadecimal string - * @param {module:model/UpdateBucketRequest} updateBucketRequest Requested changes on the bucket. Both root fields are optionals. - * @param {module:api/BucketApi~updateBucketCallback} callback The callback function, accepting three arguments: error, data, response - * data is of type: {@link module:model/BucketInfo} - */ - updateBucket(bucketId, updateBucketRequest, callback) { - let postBody = updateBucketRequest; - // verify the required parameter 'bucketId' is set - if (bucketId === undefined || bucketId === null) { - throw new Error("Missing the required parameter 'bucketId' when calling updateBucket"); - } - // verify the required parameter 'updateBucketRequest' is set - if (updateBucketRequest === undefined || updateBucketRequest === null) { - throw new Error("Missing the required parameter 'updateBucketRequest' when calling updateBucket"); - } - - let pathParams = { - 'bucket_id': bucketId - }; - let queryParams = { - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = ['bearerAuth']; - let contentTypes = ['application/json']; - let accepts = ['application/json']; - let returnType = BucketInfo; - return this.apiClient.callApi( - '/bucket?id={bucket_id}', 'PUT', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null, callback - ); - } - - -} diff --git a/javascript/src/api/KeyApi.js b/javascript/src/api/KeyApi.js deleted file mode 100644 index 81c2c6a..0000000 --- a/javascript/src/api/KeyApi.js +++ /dev/null @@ -1,339 +0,0 @@ -/** - * Garage Administration API v0+garage-v0.8.0 - * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - * - * The version of the OpenAPI document: v0.8.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - - -import ApiClient from "../ApiClient"; -import AddKeyRequest from '../model/AddKeyRequest'; -import ImportKeyRequest from '../model/ImportKeyRequest'; -import KeyInfo from '../model/KeyInfo'; -import ListKeys200ResponseInner from '../model/ListKeys200ResponseInner'; -import UpdateKeyRequest from '../model/UpdateKeyRequest'; - -/** -* Key service. -* @module api/KeyApi -* @version v0.8.0 -*/ -export default class KeyApi { - - /** - * Constructs a new KeyApi. - * @alias module:api/KeyApi - * @class - * @param {module:ApiClient} [apiClient] Optional API client implementation to use, - * default to {@link module:ApiClient#instance} if unspecified. - */ - constructor(apiClient) { - this.apiClient = apiClient || ApiClient.instance; - } - - - /** - * Callback function to receive the result of the addKey operation. - * @callback module:api/KeyApi~addKeyCallback - * @param {String} error Error message, if any. - * @param {module:model/KeyInfo} data The data returned by the service call. - * @param {String} response The complete HTTP response. - */ - - /** - * Create a new API key - * Creates a new API access key. - * @param {module:model/AddKeyRequest} addKeyRequest \"You can set a friendly name for this key, send an empty string instead\" - * @param {module:api/KeyApi~addKeyCallback} callback The callback function, accepting three arguments: error, data, response - * data is of type: {@link module:model/KeyInfo} - */ - addKey(addKeyRequest, callback) { - let postBody = addKeyRequest; - // verify the required parameter 'addKeyRequest' is set - if (addKeyRequest === undefined || addKeyRequest === null) { - throw new Error("Missing the required parameter 'addKeyRequest' when calling addKey"); - } - - let pathParams = { - }; - let queryParams = { - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = ['bearerAuth']; - let contentTypes = ['application/json']; - let accepts = ['application/json']; - let returnType = KeyInfo; - return this.apiClient.callApi( - '/key', 'POST', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null, callback - ); - } - - /** - * Callback function to receive the result of the deleteKey operation. - * @callback module:api/KeyApi~deleteKeyCallback - * @param {String} error Error message, if any. - * @param data This operation does not return a value. - * @param {String} response The complete HTTP response. - */ - - /** - * Delete a key - * Delete a key from the cluster. Its access will be removed from all the buckets. Buckets are not automatically deleted and can be dangling. You should manually delete them before. - * @param {String} accessKey The exact API access key generated by Garage - * @param {module:api/KeyApi~deleteKeyCallback} callback The callback function, accepting three arguments: error, data, response - */ - deleteKey(accessKey, callback) { - let postBody = null; - // verify the required parameter 'accessKey' is set - if (accessKey === undefined || accessKey === null) { - throw new Error("Missing the required parameter 'accessKey' when calling deleteKey"); - } - - let pathParams = { - 'access_key': accessKey - }; - let queryParams = { - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = ['bearerAuth']; - let contentTypes = []; - let accepts = []; - let returnType = null; - return this.apiClient.callApi( - '/key?id={access_key}', 'DELETE', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null, callback - ); - } - - /** - * Callback function to receive the result of the getKey operation. - * @callback module:api/KeyApi~getKeyCallback - * @param {String} error Error message, if any. - * @param {module:model/KeyInfo} data The data returned by the service call. - * @param {String} response The complete HTTP response. - */ - - /** - * Get key information - * Return information about a specific key and return its information - * @param {String} accessKey The exact API access key generated by Garage - * @param {module:api/KeyApi~getKeyCallback} callback The callback function, accepting three arguments: error, data, response - * data is of type: {@link module:model/KeyInfo} - */ - getKey(accessKey, callback) { - let postBody = null; - // verify the required parameter 'accessKey' is set - if (accessKey === undefined || accessKey === null) { - throw new Error("Missing the required parameter 'accessKey' when calling getKey"); - } - - let pathParams = { - 'access_key': accessKey - }; - let queryParams = { - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = ['bearerAuth']; - let contentTypes = []; - let accepts = ['application/json']; - let returnType = KeyInfo; - return this.apiClient.callApi( - '/key?id={access_key}', 'GET', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null, callback - ); - } - - /** - * Callback function to receive the result of the importKey operation. - * @callback module:api/KeyApi~importKeyCallback - * @param {String} error Error message, if any. - * @param {module:model/KeyInfo} data The data returned by the service call. - * @param {String} response The complete HTTP response. - */ - - /** - * Import an existing key - * Imports an existing API key. This feature must only be used for migrations and backup restore. **Do not use it to generate custom key identifiers or you will break your Garage cluster.** - * @param {module:model/ImportKeyRequest} importKeyRequest Information on the key to import - * @param {module:api/KeyApi~importKeyCallback} callback The callback function, accepting three arguments: error, data, response - * data is of type: {@link module:model/KeyInfo} - */ - importKey(importKeyRequest, callback) { - let postBody = importKeyRequest; - // verify the required parameter 'importKeyRequest' is set - if (importKeyRequest === undefined || importKeyRequest === null) { - throw new Error("Missing the required parameter 'importKeyRequest' when calling importKey"); - } - - let pathParams = { - }; - let queryParams = { - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = ['bearerAuth']; - let contentTypes = ['application/json']; - let accepts = ['application/json']; - let returnType = KeyInfo; - return this.apiClient.callApi( - '/key/import', 'POST', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null, callback - ); - } - - /** - * Callback function to receive the result of the listKeys operation. - * @callback module:api/KeyApi~listKeysCallback - * @param {String} error Error message, if any. - * @param {Array.} data The data returned by the service call. - * @param {String} response The complete HTTP response. - */ - - /** - * List all keys - * Returns all API access keys in the cluster. - * @param {module:api/KeyApi~listKeysCallback} callback The callback function, accepting three arguments: error, data, response - * data is of type: {@link Array.} - */ - listKeys(callback) { - let postBody = null; - - let pathParams = { - }; - let queryParams = { - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = ['bearerAuth']; - let contentTypes = []; - let accepts = ['application/json']; - let returnType = [ListKeys200ResponseInner]; - return this.apiClient.callApi( - '/key', 'GET', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null, callback - ); - } - - /** - * Callback function to receive the result of the searchKey operation. - * @callback module:api/KeyApi~searchKeyCallback - * @param {String} error Error message, if any. - * @param {module:model/KeyInfo} data The data returned by the service call. - * @param {String} response The complete HTTP response. - */ - - /** - * Select key by pattern - * Find the first key matching the given pattern based on its identifier aor friendly name and return its information. - * @param {String} pattern A pattern (beginning or full string) corresponding to a key identifier or friendly name - * @param {module:api/KeyApi~searchKeyCallback} callback The callback function, accepting three arguments: error, data, response - * data is of type: {@link module:model/KeyInfo} - */ - searchKey(pattern, callback) { - let postBody = null; - // verify the required parameter 'pattern' is set - if (pattern === undefined || pattern === null) { - throw new Error("Missing the required parameter 'pattern' when calling searchKey"); - } - - let pathParams = { - 'pattern': pattern - }; - let queryParams = { - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = ['bearerAuth']; - let contentTypes = []; - let accepts = ['application/json']; - let returnType = KeyInfo; - return this.apiClient.callApi( - '/key?search={pattern}', 'GET', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null, callback - ); - } - - /** - * Callback function to receive the result of the updateKey operation. - * @callback module:api/KeyApi~updateKeyCallback - * @param {String} error Error message, if any. - * @param {module:model/KeyInfo} data The data returned by the service call. - * @param {String} response The complete HTTP response. - */ - - /** - * Update a key - * Updates information about the specified API access key. - * @param {String} accessKey The exact API access key generated by Garage - * @param {module:model/UpdateKeyRequest} updateKeyRequest For a given key, provide a first set with the permissions to grant, and a second set with the permissions to remove - * @param {module:api/KeyApi~updateKeyCallback} callback The callback function, accepting three arguments: error, data, response - * data is of type: {@link module:model/KeyInfo} - */ - updateKey(accessKey, updateKeyRequest, callback) { - let postBody = updateKeyRequest; - // verify the required parameter 'accessKey' is set - if (accessKey === undefined || accessKey === null) { - throw new Error("Missing the required parameter 'accessKey' when calling updateKey"); - } - // verify the required parameter 'updateKeyRequest' is set - if (updateKeyRequest === undefined || updateKeyRequest === null) { - throw new Error("Missing the required parameter 'updateKeyRequest' when calling updateKey"); - } - - let pathParams = { - 'access_key': accessKey - }; - let queryParams = { - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = ['bearerAuth']; - let contentTypes = ['application/json']; - let accepts = ['application/json']; - let returnType = KeyInfo; - return this.apiClient.callApi( - '/key?id={access_key}', 'POST', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null, callback - ); - } - - -} diff --git a/javascript/src/api/LayoutApi.js b/javascript/src/api/LayoutApi.js deleted file mode 100644 index 13bced8..0000000 --- a/javascript/src/api/LayoutApi.js +++ /dev/null @@ -1,200 +0,0 @@ -/** - * Garage Administration API v0+garage-v0.8.0 - * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - * - * The version of the OpenAPI document: v0.8.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - - -import ApiClient from "../ApiClient"; -import ClusterLayout from '../model/ClusterLayout'; -import LayoutVersion from '../model/LayoutVersion'; -import NodeClusterInfo from '../model/NodeClusterInfo'; - -/** -* Layout service. -* @module api/LayoutApi -* @version v0.8.0 -*/ -export default class LayoutApi { - - /** - * Constructs a new LayoutApi. - * @alias module:api/LayoutApi - * @class - * @param {module:ApiClient} [apiClient] Optional API client implementation to use, - * default to {@link module:ApiClient#instance} if unspecified. - */ - constructor(apiClient) { - this.apiClient = apiClient || ApiClient.instance; - } - - - /** - * Callback function to receive the result of the addLayout operation. - * @callback module:api/LayoutApi~addLayoutCallback - * @param {String} error Error message, if any. - * @param data This operation does not return a value. - * @param {String} response The complete HTTP response. - */ - - /** - * Send modifications to the cluster layout - * Send modifications to the cluster layout. These modifications will be included in the staged role changes, visible in subsequent calls of `GET /layout`. Once the set of staged changes is satisfactory, the user may call `POST /layout/apply` to apply the changed changes, or `POST /layout/revert` to clear all of the staged changes in the layout. Note that setting the capacity to `null` will configure the node as a gateway. - * @param {Object.} requestBody To add a new node to the layout or to change the configuration of an existing node, simply set the values you want. To remove a node, set it to `null` instead of passing a configuration object. Contrary to the CLI that may update only a subset of the fields capacity, zone and tags, when calling this API all of these values must be specified. - * @param {module:api/LayoutApi~addLayoutCallback} callback The callback function, accepting three arguments: error, data, response - */ - addLayout(requestBody, callback) { - let postBody = requestBody; - // verify the required parameter 'requestBody' is set - if (requestBody === undefined || requestBody === null) { - throw new Error("Missing the required parameter 'requestBody' when calling addLayout"); - } - - let pathParams = { - }; - let queryParams = { - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = ['bearerAuth']; - let contentTypes = ['application/json']; - let accepts = []; - let returnType = null; - return this.apiClient.callApi( - '/layout', 'POST', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null, callback - ); - } - - /** - * Callback function to receive the result of the applyLayout operation. - * @callback module:api/LayoutApi~applyLayoutCallback - * @param {String} error Error message, if any. - * @param data This operation does not return a value. - * @param {String} response The complete HTTP response. - */ - - /** - * Apply staged layout - * Applies to the cluster the layout changes currently registered as staged layout changes. - * @param {module:model/LayoutVersion} layoutVersion Similarly to the CLI, the body must include the version of the new layout that will be created, which MUST be 1 + the value of the currently existing layout in the cluster. - * @param {module:api/LayoutApi~applyLayoutCallback} callback The callback function, accepting three arguments: error, data, response - */ - applyLayout(layoutVersion, callback) { - let postBody = layoutVersion; - // verify the required parameter 'layoutVersion' is set - if (layoutVersion === undefined || layoutVersion === null) { - throw new Error("Missing the required parameter 'layoutVersion' when calling applyLayout"); - } - - let pathParams = { - }; - let queryParams = { - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = ['bearerAuth']; - let contentTypes = ['application/json']; - let accepts = []; - let returnType = null; - return this.apiClient.callApi( - '/layout/apply', 'POST', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null, callback - ); - } - - /** - * Callback function to receive the result of the getLayout operation. - * @callback module:api/LayoutApi~getLayoutCallback - * @param {String} error Error message, if any. - * @param {module:model/ClusterLayout} data The data returned by the service call. - * @param {String} response The complete HTTP response. - */ - - /** - * Details on the current and staged layout - * Returns the cluster's current layout, including: - Currently configured cluster layout - Staged changes to the cluster layout *The info returned by this endpoint is a subset of the info returned by `GET /status`.* - * @param {module:api/LayoutApi~getLayoutCallback} callback The callback function, accepting three arguments: error, data, response - * data is of type: {@link module:model/ClusterLayout} - */ - getLayout(callback) { - let postBody = null; - - let pathParams = { - }; - let queryParams = { - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = ['bearerAuth']; - let contentTypes = []; - let accepts = ['application/json']; - let returnType = ClusterLayout; - return this.apiClient.callApi( - '/layout', 'GET', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null, callback - ); - } - - /** - * Callback function to receive the result of the revertLayout operation. - * @callback module:api/LayoutApi~revertLayoutCallback - * @param {String} error Error message, if any. - * @param data This operation does not return a value. - * @param {String} response The complete HTTP response. - */ - - /** - * Clear staged layout - * Clears all of the staged layout changes. - * @param {module:model/LayoutVersion} layoutVersion Reverting the staged changes is done by incrementing the version number and clearing the contents of the staged change list. Similarly to the CLI, the body must include the incremented version number, which MUST be 1 + the value of the currently existing layout in the cluster. - * @param {module:api/LayoutApi~revertLayoutCallback} callback The callback function, accepting three arguments: error, data, response - */ - revertLayout(layoutVersion, callback) { - let postBody = layoutVersion; - // verify the required parameter 'layoutVersion' is set - if (layoutVersion === undefined || layoutVersion === null) { - throw new Error("Missing the required parameter 'layoutVersion' when calling revertLayout"); - } - - let pathParams = { - }; - let queryParams = { - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = ['bearerAuth']; - let contentTypes = ['application/json']; - let accepts = []; - let returnType = null; - return this.apiClient.callApi( - '/layout/revert', 'POST', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null, callback - ); - } - - -} diff --git a/javascript/src/api/NodesApi.js b/javascript/src/api/NodesApi.js deleted file mode 100644 index 2c53a09..0000000 --- a/javascript/src/api/NodesApi.js +++ /dev/null @@ -1,118 +0,0 @@ -/** - * Garage Administration API v0+garage-v0.8.0 - * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - * - * The version of the OpenAPI document: v0.8.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - - -import ApiClient from "../ApiClient"; -import AddNode200ResponseInner from '../model/AddNode200ResponseInner'; -import GetNodes200Response from '../model/GetNodes200Response'; - -/** -* Nodes service. -* @module api/NodesApi -* @version v0.8.0 -*/ -export default class NodesApi { - - /** - * Constructs a new NodesApi. - * @alias module:api/NodesApi - * @class - * @param {module:ApiClient} [apiClient] Optional API client implementation to use, - * default to {@link module:ApiClient#instance} if unspecified. - */ - constructor(apiClient) { - this.apiClient = apiClient || ApiClient.instance; - } - - - /** - * Callback function to receive the result of the addNode operation. - * @callback module:api/NodesApi~addNodeCallback - * @param {String} error Error message, if any. - * @param {Array.} data The data returned by the service call. - * @param {String} response The complete HTTP response. - */ - - /** - * Connect target node to other Garage nodes - * Instructs this Garage node to connect to other Garage nodes at specified `@`. `node_id` is generated automatically on node start. - * @param {Array.} requestBody - * @param {module:api/NodesApi~addNodeCallback} callback The callback function, accepting three arguments: error, data, response - * data is of type: {@link Array.} - */ - addNode(requestBody, callback) { - let postBody = requestBody; - // verify the required parameter 'requestBody' is set - if (requestBody === undefined || requestBody === null) { - throw new Error("Missing the required parameter 'requestBody' when calling addNode"); - } - - let pathParams = { - }; - let queryParams = { - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = ['bearerAuth']; - let contentTypes = ['application/json']; - let accepts = ['application/json']; - let returnType = [AddNode200ResponseInner]; - return this.apiClient.callApi( - '/connect', 'POST', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null, callback - ); - } - - /** - * Callback function to receive the result of the getNodes operation. - * @callback module:api/NodesApi~getNodesCallback - * @param {String} error Error message, if any. - * @param {module:model/GetNodes200Response} data The data returned by the service call. - * @param {String} response The complete HTTP response. - */ - - /** - * Status of this node and other nodes in the cluster - * Returns the cluster's current status, including: - ID of the node being queried and its version of the Garage daemon - Live nodes - Currently configured cluster layout - Staged changes to the cluster layout - * @param {module:api/NodesApi~getNodesCallback} callback The callback function, accepting three arguments: error, data, response - * data is of type: {@link module:model/GetNodes200Response} - */ - getNodes(callback) { - let postBody = null; - - let pathParams = { - }; - let queryParams = { - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = ['bearerAuth']; - let contentTypes = []; - let accepts = ['application/json']; - let returnType = GetNodes200Response; - return this.apiClient.callApi( - '/status', 'GET', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null, callback - ); - } - - -} diff --git a/javascript/src/index.js b/javascript/src/index.js deleted file mode 100644 index 76bb8d3..0000000 --- a/javascript/src/index.js +++ /dev/null @@ -1,293 +0,0 @@ -/** - * Garage Administration API v0+garage-v0.8.0 - * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - * - * The version of the OpenAPI document: v0.8.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - - -import ApiClient from './ApiClient'; -import AddKeyRequest from './model/AddKeyRequest'; -import AddNode200ResponseInner from './model/AddNode200ResponseInner'; -import AllowBucketKeyRequest from './model/AllowBucketKeyRequest'; -import AllowBucketKeyRequestPermissions from './model/AllowBucketKeyRequestPermissions'; -import BucketInfo from './model/BucketInfo'; -import BucketInfoQuotas from './model/BucketInfoQuotas'; -import BucketInfoWebsiteConfig from './model/BucketInfoWebsiteConfig'; -import BucketKeyInfo from './model/BucketKeyInfo'; -import ClusterLayout from './model/ClusterLayout'; -import CreateBucketRequest from './model/CreateBucketRequest'; -import CreateBucketRequestLocalAlias from './model/CreateBucketRequestLocalAlias'; -import CreateBucketRequestLocalAliasAllow from './model/CreateBucketRequestLocalAliasAllow'; -import GetNodes200Response from './model/GetNodes200Response'; -import ImportKeyRequest from './model/ImportKeyRequest'; -import KeyInfo from './model/KeyInfo'; -import KeyInfoBucketsInner from './model/KeyInfoBucketsInner'; -import KeyInfoBucketsInnerPermissions from './model/KeyInfoBucketsInnerPermissions'; -import KeyInfoPermissions from './model/KeyInfoPermissions'; -import LayoutVersion from './model/LayoutVersion'; -import ListBuckets200ResponseInner from './model/ListBuckets200ResponseInner'; -import ListBuckets200ResponseInnerLocalAliasesInner from './model/ListBuckets200ResponseInnerLocalAliasesInner'; -import ListKeys200ResponseInner from './model/ListKeys200ResponseInner'; -import NodeClusterInfo from './model/NodeClusterInfo'; -import NodeNetworkInfo from './model/NodeNetworkInfo'; -import UpdateBucketRequest from './model/UpdateBucketRequest'; -import UpdateBucketRequestQuotas from './model/UpdateBucketRequestQuotas'; -import UpdateBucketRequestWebsiteAccess from './model/UpdateBucketRequestWebsiteAccess'; -import UpdateKeyRequest from './model/UpdateKeyRequest'; -import UpdateKeyRequestAllow from './model/UpdateKeyRequestAllow'; -import UpdateKeyRequestDeny from './model/UpdateKeyRequestDeny'; -import BucketApi from './api/BucketApi'; -import KeyApi from './api/KeyApi'; -import LayoutApi from './api/LayoutApi'; -import NodesApi from './api/NodesApi'; - - -/** -* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* .
-* The index module provides access to constructors for all the classes which comprise the public API. -*

-* An AMD (recommended!) or CommonJS application will generally do something equivalent to the following: -*

-* var garage = require('index'); // See note below*.
-* var xxxSvc = new garage.XxxApi(); // Allocate the API class we're going to use.
-* var yyyModel = new garage.Yyy(); // Construct a model instance.
-* yyyModel.someProperty = 'someValue';
-* ...
-* var zzz = xxxSvc.doSomething(yyyModel); // Invoke the service.
-* ...
-* 
-* *NOTE: For a top-level AMD script, use require(['index'], function(){...}) -* and put the application logic within the callback function. -*

-*

-* A non-AMD browser application (discouraged) might do something like this: -*

-* var xxxSvc = new garage.XxxApi(); // Allocate the API class we're going to use.
-* var yyy = new garage.Yyy(); // Construct a model instance.
-* yyyModel.someProperty = 'someValue';
-* ...
-* var zzz = xxxSvc.doSomething(yyyModel); // Invoke the service.
-* ...
-* 
-*

-* @module index -* @version v0.8.0 -*/ -export { - /** - * The ApiClient constructor. - * @property {module:ApiClient} - */ - ApiClient, - - /** - * The AddKeyRequest model constructor. - * @property {module:model/AddKeyRequest} - */ - AddKeyRequest, - - /** - * The AddNode200ResponseInner model constructor. - * @property {module:model/AddNode200ResponseInner} - */ - AddNode200ResponseInner, - - /** - * The AllowBucketKeyRequest model constructor. - * @property {module:model/AllowBucketKeyRequest} - */ - AllowBucketKeyRequest, - - /** - * The AllowBucketKeyRequestPermissions model constructor. - * @property {module:model/AllowBucketKeyRequestPermissions} - */ - AllowBucketKeyRequestPermissions, - - /** - * The BucketInfo model constructor. - * @property {module:model/BucketInfo} - */ - BucketInfo, - - /** - * The BucketInfoQuotas model constructor. - * @property {module:model/BucketInfoQuotas} - */ - BucketInfoQuotas, - - /** - * The BucketInfoWebsiteConfig model constructor. - * @property {module:model/BucketInfoWebsiteConfig} - */ - BucketInfoWebsiteConfig, - - /** - * The BucketKeyInfo model constructor. - * @property {module:model/BucketKeyInfo} - */ - BucketKeyInfo, - - /** - * The ClusterLayout model constructor. - * @property {module:model/ClusterLayout} - */ - ClusterLayout, - - /** - * The CreateBucketRequest model constructor. - * @property {module:model/CreateBucketRequest} - */ - CreateBucketRequest, - - /** - * The CreateBucketRequestLocalAlias model constructor. - * @property {module:model/CreateBucketRequestLocalAlias} - */ - CreateBucketRequestLocalAlias, - - /** - * The CreateBucketRequestLocalAliasAllow model constructor. - * @property {module:model/CreateBucketRequestLocalAliasAllow} - */ - CreateBucketRequestLocalAliasAllow, - - /** - * The GetNodes200Response model constructor. - * @property {module:model/GetNodes200Response} - */ - GetNodes200Response, - - /** - * The ImportKeyRequest model constructor. - * @property {module:model/ImportKeyRequest} - */ - ImportKeyRequest, - - /** - * The KeyInfo model constructor. - * @property {module:model/KeyInfo} - */ - KeyInfo, - - /** - * The KeyInfoBucketsInner model constructor. - * @property {module:model/KeyInfoBucketsInner} - */ - KeyInfoBucketsInner, - - /** - * The KeyInfoBucketsInnerPermissions model constructor. - * @property {module:model/KeyInfoBucketsInnerPermissions} - */ - KeyInfoBucketsInnerPermissions, - - /** - * The KeyInfoPermissions model constructor. - * @property {module:model/KeyInfoPermissions} - */ - KeyInfoPermissions, - - /** - * The LayoutVersion model constructor. - * @property {module:model/LayoutVersion} - */ - LayoutVersion, - - /** - * The ListBuckets200ResponseInner model constructor. - * @property {module:model/ListBuckets200ResponseInner} - */ - ListBuckets200ResponseInner, - - /** - * The ListBuckets200ResponseInnerLocalAliasesInner model constructor. - * @property {module:model/ListBuckets200ResponseInnerLocalAliasesInner} - */ - ListBuckets200ResponseInnerLocalAliasesInner, - - /** - * The ListKeys200ResponseInner model constructor. - * @property {module:model/ListKeys200ResponseInner} - */ - ListKeys200ResponseInner, - - /** - * The NodeClusterInfo model constructor. - * @property {module:model/NodeClusterInfo} - */ - NodeClusterInfo, - - /** - * The NodeNetworkInfo model constructor. - * @property {module:model/NodeNetworkInfo} - */ - NodeNetworkInfo, - - /** - * The UpdateBucketRequest model constructor. - * @property {module:model/UpdateBucketRequest} - */ - UpdateBucketRequest, - - /** - * The UpdateBucketRequestQuotas model constructor. - * @property {module:model/UpdateBucketRequestQuotas} - */ - UpdateBucketRequestQuotas, - - /** - * The UpdateBucketRequestWebsiteAccess model constructor. - * @property {module:model/UpdateBucketRequestWebsiteAccess} - */ - UpdateBucketRequestWebsiteAccess, - - /** - * The UpdateKeyRequest model constructor. - * @property {module:model/UpdateKeyRequest} - */ - UpdateKeyRequest, - - /** - * The UpdateKeyRequestAllow model constructor. - * @property {module:model/UpdateKeyRequestAllow} - */ - UpdateKeyRequestAllow, - - /** - * The UpdateKeyRequestDeny model constructor. - * @property {module:model/UpdateKeyRequestDeny} - */ - UpdateKeyRequestDeny, - - /** - * The BucketApi service constructor. - * @property {module:api/BucketApi} - */ - BucketApi, - - /** - * The KeyApi service constructor. - * @property {module:api/KeyApi} - */ - KeyApi, - - /** - * The LayoutApi service constructor. - * @property {module:api/LayoutApi} - */ - LayoutApi, - - /** - * The NodesApi service constructor. - * @property {module:api/NodesApi} - */ - NodesApi -}; diff --git a/javascript/src/model/AddKeyRequest.js b/javascript/src/model/AddKeyRequest.js deleted file mode 100644 index 07edeb3..0000000 --- a/javascript/src/model/AddKeyRequest.js +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Garage Administration API v0+garage-v0.8.0 - * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - * - * The version of the OpenAPI document: v0.8.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The AddKeyRequest model module. - * @module model/AddKeyRequest - * @version v0.8.0 - */ -class AddKeyRequest { - /** - * Constructs a new AddKeyRequest. - * @alias module:model/AddKeyRequest - */ - constructor() { - - AddKeyRequest.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a AddKeyRequest from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/AddKeyRequest} obj Optional instance to populate. - * @return {module:model/AddKeyRequest} The populated AddKeyRequest instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new AddKeyRequest(); - - if (data.hasOwnProperty('name')) { - obj['name'] = ApiClient.convertToType(data['name'], 'String'); - } - } - return obj; - } - - -} - -/** - * @member {String} name - */ -AddKeyRequest.prototype['name'] = undefined; - - - - - - -export default AddKeyRequest; - diff --git a/javascript/src/model/AddNode200ResponseInner.js b/javascript/src/model/AddNode200ResponseInner.js deleted file mode 100644 index 56df484..0000000 --- a/javascript/src/model/AddNode200ResponseInner.js +++ /dev/null @@ -1,79 +0,0 @@ -/** - * Garage Administration API v0+garage-v0.8.0 - * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - * - * The version of the OpenAPI document: v0.8.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The AddNode200ResponseInner model module. - * @module model/AddNode200ResponseInner - * @version v0.8.0 - */ -class AddNode200ResponseInner { - /** - * Constructs a new AddNode200ResponseInner. - * @alias module:model/AddNode200ResponseInner - */ - constructor() { - - AddNode200ResponseInner.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a AddNode200ResponseInner from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/AddNode200ResponseInner} obj Optional instance to populate. - * @return {module:model/AddNode200ResponseInner} The populated AddNode200ResponseInner instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new AddNode200ResponseInner(); - - if (data.hasOwnProperty('success')) { - obj['success'] = ApiClient.convertToType(data['success'], 'Boolean'); - } - if (data.hasOwnProperty('error')) { - obj['error'] = ApiClient.convertToType(data['error'], 'String'); - } - } - return obj; - } - - -} - -/** - * @member {Boolean} success - */ -AddNode200ResponseInner.prototype['success'] = undefined; - -/** - * @member {String} error - */ -AddNode200ResponseInner.prototype['error'] = undefined; - - - - - - -export default AddNode200ResponseInner; - diff --git a/javascript/src/model/AllowBucketKeyRequest.js b/javascript/src/model/AllowBucketKeyRequest.js deleted file mode 100644 index fade968..0000000 --- a/javascript/src/model/AllowBucketKeyRequest.js +++ /dev/null @@ -1,94 +0,0 @@ -/** - * Garage Administration API v0+garage-v0.8.0 - * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - * - * The version of the OpenAPI document: v0.8.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; -import AllowBucketKeyRequestPermissions from './AllowBucketKeyRequestPermissions'; - -/** - * The AllowBucketKeyRequest model module. - * @module model/AllowBucketKeyRequest - * @version v0.8.0 - */ -class AllowBucketKeyRequest { - /** - * Constructs a new AllowBucketKeyRequest. - * @alias module:model/AllowBucketKeyRequest - * @param bucketId {String} - * @param accessKeyId {String} - * @param permissions {module:model/AllowBucketKeyRequestPermissions} - */ - constructor(bucketId, accessKeyId, permissions) { - - AllowBucketKeyRequest.initialize(this, bucketId, accessKeyId, permissions); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj, bucketId, accessKeyId, permissions) { - obj['bucketId'] = bucketId; - obj['accessKeyId'] = accessKeyId; - obj['permissions'] = permissions; - } - - /** - * Constructs a AllowBucketKeyRequest from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/AllowBucketKeyRequest} obj Optional instance to populate. - * @return {module:model/AllowBucketKeyRequest} The populated AllowBucketKeyRequest instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new AllowBucketKeyRequest(); - - if (data.hasOwnProperty('bucketId')) { - obj['bucketId'] = ApiClient.convertToType(data['bucketId'], 'String'); - } - if (data.hasOwnProperty('accessKeyId')) { - obj['accessKeyId'] = ApiClient.convertToType(data['accessKeyId'], 'String'); - } - if (data.hasOwnProperty('permissions')) { - obj['permissions'] = AllowBucketKeyRequestPermissions.constructFromObject(data['permissions']); - } - } - return obj; - } - - -} - -/** - * @member {String} bucketId - */ -AllowBucketKeyRequest.prototype['bucketId'] = undefined; - -/** - * @member {String} accessKeyId - */ -AllowBucketKeyRequest.prototype['accessKeyId'] = undefined; - -/** - * @member {module:model/AllowBucketKeyRequestPermissions} permissions - */ -AllowBucketKeyRequest.prototype['permissions'] = undefined; - - - - - - -export default AllowBucketKeyRequest; - diff --git a/javascript/src/model/AllowBucketKeyRequestPermissions.js b/javascript/src/model/AllowBucketKeyRequestPermissions.js deleted file mode 100644 index e478375..0000000 --- a/javascript/src/model/AllowBucketKeyRequestPermissions.js +++ /dev/null @@ -1,93 +0,0 @@ -/** - * Garage Administration API v0+garage-v0.8.0 - * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - * - * The version of the OpenAPI document: v0.8.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The AllowBucketKeyRequestPermissions model module. - * @module model/AllowBucketKeyRequestPermissions - * @version v0.8.0 - */ -class AllowBucketKeyRequestPermissions { - /** - * Constructs a new AllowBucketKeyRequestPermissions. - * @alias module:model/AllowBucketKeyRequestPermissions - * @param read {Boolean} - * @param write {Boolean} - * @param owner {Boolean} - */ - constructor(read, write, owner) { - - AllowBucketKeyRequestPermissions.initialize(this, read, write, owner); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj, read, write, owner) { - obj['read'] = read; - obj['write'] = write; - obj['owner'] = owner; - } - - /** - * Constructs a AllowBucketKeyRequestPermissions from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/AllowBucketKeyRequestPermissions} obj Optional instance to populate. - * @return {module:model/AllowBucketKeyRequestPermissions} The populated AllowBucketKeyRequestPermissions instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new AllowBucketKeyRequestPermissions(); - - if (data.hasOwnProperty('read')) { - obj['read'] = ApiClient.convertToType(data['read'], 'Boolean'); - } - if (data.hasOwnProperty('write')) { - obj['write'] = ApiClient.convertToType(data['write'], 'Boolean'); - } - if (data.hasOwnProperty('owner')) { - obj['owner'] = ApiClient.convertToType(data['owner'], 'Boolean'); - } - } - return obj; - } - - -} - -/** - * @member {Boolean} read - */ -AllowBucketKeyRequestPermissions.prototype['read'] = undefined; - -/** - * @member {Boolean} write - */ -AllowBucketKeyRequestPermissions.prototype['write'] = undefined; - -/** - * @member {Boolean} owner - */ -AllowBucketKeyRequestPermissions.prototype['owner'] = undefined; - - - - - - -export default AllowBucketKeyRequestPermissions; - diff --git a/javascript/src/model/BucketInfo.js b/javascript/src/model/BucketInfo.js deleted file mode 100644 index fae6a1d..0000000 --- a/javascript/src/model/BucketInfo.js +++ /dev/null @@ -1,138 +0,0 @@ -/** - * Garage Administration API v0+garage-v0.8.0 - * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - * - * The version of the OpenAPI document: v0.8.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; -import BucketInfoQuotas from './BucketInfoQuotas'; -import BucketInfoWebsiteConfig from './BucketInfoWebsiteConfig'; -import BucketKeyInfo from './BucketKeyInfo'; - -/** - * The BucketInfo model module. - * @module model/BucketInfo - * @version v0.8.0 - */ -class BucketInfo { - /** - * Constructs a new BucketInfo. - * @alias module:model/BucketInfo - */ - constructor() { - - BucketInfo.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a BucketInfo from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/BucketInfo} obj Optional instance to populate. - * @return {module:model/BucketInfo} The populated BucketInfo instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new BucketInfo(); - - if (data.hasOwnProperty('id')) { - obj['id'] = ApiClient.convertToType(data['id'], 'String'); - } - if (data.hasOwnProperty('globalAliases')) { - obj['globalAliases'] = ApiClient.convertToType(data['globalAliases'], ['String']); - } - if (data.hasOwnProperty('websiteAccess')) { - obj['websiteAccess'] = ApiClient.convertToType(data['websiteAccess'], 'Boolean'); - } - if (data.hasOwnProperty('websiteConfig')) { - obj['websiteConfig'] = BucketInfoWebsiteConfig.constructFromObject(data['websiteConfig']); - } - if (data.hasOwnProperty('keys')) { - obj['keys'] = ApiClient.convertToType(data['keys'], [BucketKeyInfo]); - } - if (data.hasOwnProperty('objects')) { - obj['objects'] = ApiClient.convertToType(data['objects'], 'Number'); - } - if (data.hasOwnProperty('bytes')) { - obj['bytes'] = ApiClient.convertToType(data['bytes'], 'Number'); - } - if (data.hasOwnProperty('unfinishedUploads')) { - obj['unfinishedUploads'] = ApiClient.convertToType(data['unfinishedUploads'], 'Number'); - } - if (data.hasOwnProperty('quotas')) { - obj['quotas'] = BucketInfoQuotas.constructFromObject(data['quotas']); - } - } - return obj; - } - - -} - -/** - * @member {String} id - */ -BucketInfo.prototype['id'] = undefined; - -/** - * @member {Array.} globalAliases - */ -BucketInfo.prototype['globalAliases'] = undefined; - -/** - * @member {Boolean} websiteAccess - */ -BucketInfo.prototype['websiteAccess'] = undefined; - -/** - * @member {module:model/BucketInfoWebsiteConfig} websiteConfig - */ -BucketInfo.prototype['websiteConfig'] = undefined; - -/** - * @member {Array.} keys - */ -BucketInfo.prototype['keys'] = undefined; - -/** - * @member {Number} objects - */ -BucketInfo.prototype['objects'] = undefined; - -/** - * @member {Number} bytes - */ -BucketInfo.prototype['bytes'] = undefined; - -/** - * @member {Number} unfinishedUploads - */ -BucketInfo.prototype['unfinishedUploads'] = undefined; - -/** - * @member {module:model/BucketInfoQuotas} quotas - */ -BucketInfo.prototype['quotas'] = undefined; - - - - - - -export default BucketInfo; - diff --git a/javascript/src/model/BucketInfoQuotas.js b/javascript/src/model/BucketInfoQuotas.js deleted file mode 100644 index 20ee780..0000000 --- a/javascript/src/model/BucketInfoQuotas.js +++ /dev/null @@ -1,79 +0,0 @@ -/** - * Garage Administration API v0+garage-v0.8.0 - * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - * - * The version of the OpenAPI document: v0.8.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The BucketInfoQuotas model module. - * @module model/BucketInfoQuotas - * @version v0.8.0 - */ -class BucketInfoQuotas { - /** - * Constructs a new BucketInfoQuotas. - * @alias module:model/BucketInfoQuotas - */ - constructor() { - - BucketInfoQuotas.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a BucketInfoQuotas from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/BucketInfoQuotas} obj Optional instance to populate. - * @return {module:model/BucketInfoQuotas} The populated BucketInfoQuotas instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new BucketInfoQuotas(); - - if (data.hasOwnProperty('maxSize')) { - obj['maxSize'] = ApiClient.convertToType(data['maxSize'], 'Number'); - } - if (data.hasOwnProperty('maxObjects')) { - obj['maxObjects'] = ApiClient.convertToType(data['maxObjects'], 'Number'); - } - } - return obj; - } - - -} - -/** - * @member {Number} maxSize - */ -BucketInfoQuotas.prototype['maxSize'] = undefined; - -/** - * @member {Number} maxObjects - */ -BucketInfoQuotas.prototype['maxObjects'] = undefined; - - - - - - -export default BucketInfoQuotas; - diff --git a/javascript/src/model/BucketInfoWebsiteConfig.js b/javascript/src/model/BucketInfoWebsiteConfig.js deleted file mode 100644 index ff65bc1..0000000 --- a/javascript/src/model/BucketInfoWebsiteConfig.js +++ /dev/null @@ -1,79 +0,0 @@ -/** - * Garage Administration API v0+garage-v0.8.0 - * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - * - * The version of the OpenAPI document: v0.8.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The BucketInfoWebsiteConfig model module. - * @module model/BucketInfoWebsiteConfig - * @version v0.8.0 - */ -class BucketInfoWebsiteConfig { - /** - * Constructs a new BucketInfoWebsiteConfig. - * @alias module:model/BucketInfoWebsiteConfig - */ - constructor() { - - BucketInfoWebsiteConfig.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a BucketInfoWebsiteConfig from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/BucketInfoWebsiteConfig} obj Optional instance to populate. - * @return {module:model/BucketInfoWebsiteConfig} The populated BucketInfoWebsiteConfig instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new BucketInfoWebsiteConfig(); - - if (data.hasOwnProperty('indexDocument')) { - obj['indexDocument'] = ApiClient.convertToType(data['indexDocument'], 'String'); - } - if (data.hasOwnProperty('errorDocument')) { - obj['errorDocument'] = ApiClient.convertToType(data['errorDocument'], 'String'); - } - } - return obj; - } - - -} - -/** - * @member {String} indexDocument - */ -BucketInfoWebsiteConfig.prototype['indexDocument'] = undefined; - -/** - * @member {String} errorDocument - */ -BucketInfoWebsiteConfig.prototype['errorDocument'] = undefined; - - - - - - -export default BucketInfoWebsiteConfig; - diff --git a/javascript/src/model/BucketKeyInfo.js b/javascript/src/model/BucketKeyInfo.js deleted file mode 100644 index 1275ee5..0000000 --- a/javascript/src/model/BucketKeyInfo.js +++ /dev/null @@ -1,96 +0,0 @@ -/** - * Garage Administration API v0+garage-v0.8.0 - * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - * - * The version of the OpenAPI document: v0.8.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; -import CreateBucketRequestLocalAliasAllow from './CreateBucketRequestLocalAliasAllow'; - -/** - * The BucketKeyInfo model module. - * @module model/BucketKeyInfo - * @version v0.8.0 - */ -class BucketKeyInfo { - /** - * Constructs a new BucketKeyInfo. - * @alias module:model/BucketKeyInfo - */ - constructor() { - - BucketKeyInfo.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a BucketKeyInfo from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/BucketKeyInfo} obj Optional instance to populate. - * @return {module:model/BucketKeyInfo} The populated BucketKeyInfo instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new BucketKeyInfo(); - - if (data.hasOwnProperty('accessKeyId')) { - obj['accessKeyId'] = ApiClient.convertToType(data['accessKeyId'], 'String'); - } - if (data.hasOwnProperty('name')) { - obj['name'] = ApiClient.convertToType(data['name'], 'String'); - } - if (data.hasOwnProperty('permissions')) { - obj['permissions'] = CreateBucketRequestLocalAliasAllow.constructFromObject(data['permissions']); - } - if (data.hasOwnProperty('bucketLocalAliases')) { - obj['bucketLocalAliases'] = ApiClient.convertToType(data['bucketLocalAliases'], ['String']); - } - } - return obj; - } - - -} - -/** - * @member {String} accessKeyId - */ -BucketKeyInfo.prototype['accessKeyId'] = undefined; - -/** - * @member {String} name - */ -BucketKeyInfo.prototype['name'] = undefined; - -/** - * @member {module:model/CreateBucketRequestLocalAliasAllow} permissions - */ -BucketKeyInfo.prototype['permissions'] = undefined; - -/** - * @member {Array.} bucketLocalAliases - */ -BucketKeyInfo.prototype['bucketLocalAliases'] = undefined; - - - - - - -export default BucketKeyInfo; - diff --git a/javascript/src/model/ClusterLayout.js b/javascript/src/model/ClusterLayout.js deleted file mode 100644 index c4d4961..0000000 --- a/javascript/src/model/ClusterLayout.js +++ /dev/null @@ -1,94 +0,0 @@ -/** - * Garage Administration API v0+garage-v0.8.0 - * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - * - * The version of the OpenAPI document: v0.8.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; -import NodeClusterInfo from './NodeClusterInfo'; - -/** - * The ClusterLayout model module. - * @module model/ClusterLayout - * @version v0.8.0 - */ -class ClusterLayout { - /** - * Constructs a new ClusterLayout. - * @alias module:model/ClusterLayout - * @param version {Number} - * @param roles {Object.} - * @param stagedRoleChanges {Object.} - */ - constructor(version, roles, stagedRoleChanges) { - - ClusterLayout.initialize(this, version, roles, stagedRoleChanges); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj, version, roles, stagedRoleChanges) { - obj['version'] = version; - obj['roles'] = roles; - obj['stagedRoleChanges'] = stagedRoleChanges; - } - - /** - * Constructs a ClusterLayout from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/ClusterLayout} obj Optional instance to populate. - * @return {module:model/ClusterLayout} The populated ClusterLayout instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new ClusterLayout(); - - if (data.hasOwnProperty('version')) { - obj['version'] = ApiClient.convertToType(data['version'], 'Number'); - } - if (data.hasOwnProperty('roles')) { - obj['roles'] = ApiClient.convertToType(data['roles'], {'String': NodeClusterInfo}); - } - if (data.hasOwnProperty('stagedRoleChanges')) { - obj['stagedRoleChanges'] = ApiClient.convertToType(data['stagedRoleChanges'], {'String': NodeClusterInfo}); - } - } - return obj; - } - - -} - -/** - * @member {Number} version - */ -ClusterLayout.prototype['version'] = undefined; - -/** - * @member {Object.} roles - */ -ClusterLayout.prototype['roles'] = undefined; - -/** - * @member {Object.} stagedRoleChanges - */ -ClusterLayout.prototype['stagedRoleChanges'] = undefined; - - - - - - -export default ClusterLayout; - diff --git a/javascript/src/model/CreateBucketRequest.js b/javascript/src/model/CreateBucketRequest.js deleted file mode 100644 index bf45a1a..0000000 --- a/javascript/src/model/CreateBucketRequest.js +++ /dev/null @@ -1,80 +0,0 @@ -/** - * Garage Administration API v0+garage-v0.8.0 - * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - * - * The version of the OpenAPI document: v0.8.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; -import CreateBucketRequestLocalAlias from './CreateBucketRequestLocalAlias'; - -/** - * The CreateBucketRequest model module. - * @module model/CreateBucketRequest - * @version v0.8.0 - */ -class CreateBucketRequest { - /** - * Constructs a new CreateBucketRequest. - * @alias module:model/CreateBucketRequest - */ - constructor() { - - CreateBucketRequest.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a CreateBucketRequest from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/CreateBucketRequest} obj Optional instance to populate. - * @return {module:model/CreateBucketRequest} The populated CreateBucketRequest instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new CreateBucketRequest(); - - if (data.hasOwnProperty('globalAlias')) { - obj['globalAlias'] = ApiClient.convertToType(data['globalAlias'], 'String'); - } - if (data.hasOwnProperty('localAlias')) { - obj['localAlias'] = CreateBucketRequestLocalAlias.constructFromObject(data['localAlias']); - } - } - return obj; - } - - -} - -/** - * @member {String} globalAlias - */ -CreateBucketRequest.prototype['globalAlias'] = undefined; - -/** - * @member {module:model/CreateBucketRequestLocalAlias} localAlias - */ -CreateBucketRequest.prototype['localAlias'] = undefined; - - - - - - -export default CreateBucketRequest; - diff --git a/javascript/src/model/CreateBucketRequestLocalAlias.js b/javascript/src/model/CreateBucketRequestLocalAlias.js deleted file mode 100644 index 00c6e7d..0000000 --- a/javascript/src/model/CreateBucketRequestLocalAlias.js +++ /dev/null @@ -1,88 +0,0 @@ -/** - * Garage Administration API v0+garage-v0.8.0 - * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - * - * The version of the OpenAPI document: v0.8.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; -import CreateBucketRequestLocalAliasAllow from './CreateBucketRequestLocalAliasAllow'; - -/** - * The CreateBucketRequestLocalAlias model module. - * @module model/CreateBucketRequestLocalAlias - * @version v0.8.0 - */ -class CreateBucketRequestLocalAlias { - /** - * Constructs a new CreateBucketRequestLocalAlias. - * @alias module:model/CreateBucketRequestLocalAlias - */ - constructor() { - - CreateBucketRequestLocalAlias.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a CreateBucketRequestLocalAlias from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/CreateBucketRequestLocalAlias} obj Optional instance to populate. - * @return {module:model/CreateBucketRequestLocalAlias} The populated CreateBucketRequestLocalAlias instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new CreateBucketRequestLocalAlias(); - - if (data.hasOwnProperty('accessKeyId')) { - obj['accessKeyId'] = ApiClient.convertToType(data['accessKeyId'], 'String'); - } - if (data.hasOwnProperty('alias')) { - obj['alias'] = ApiClient.convertToType(data['alias'], 'String'); - } - if (data.hasOwnProperty('allow')) { - obj['allow'] = CreateBucketRequestLocalAliasAllow.constructFromObject(data['allow']); - } - } - return obj; - } - - -} - -/** - * @member {String} accessKeyId - */ -CreateBucketRequestLocalAlias.prototype['accessKeyId'] = undefined; - -/** - * @member {String} alias - */ -CreateBucketRequestLocalAlias.prototype['alias'] = undefined; - -/** - * @member {module:model/CreateBucketRequestLocalAliasAllow} allow - */ -CreateBucketRequestLocalAlias.prototype['allow'] = undefined; - - - - - - -export default CreateBucketRequestLocalAlias; - diff --git a/javascript/src/model/CreateBucketRequestLocalAliasAllow.js b/javascript/src/model/CreateBucketRequestLocalAliasAllow.js deleted file mode 100644 index b7888ed..0000000 --- a/javascript/src/model/CreateBucketRequestLocalAliasAllow.js +++ /dev/null @@ -1,87 +0,0 @@ -/** - * Garage Administration API v0+garage-v0.8.0 - * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - * - * The version of the OpenAPI document: v0.8.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The CreateBucketRequestLocalAliasAllow model module. - * @module model/CreateBucketRequestLocalAliasAllow - * @version v0.8.0 - */ -class CreateBucketRequestLocalAliasAllow { - /** - * Constructs a new CreateBucketRequestLocalAliasAllow. - * @alias module:model/CreateBucketRequestLocalAliasAllow - */ - constructor() { - - CreateBucketRequestLocalAliasAllow.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a CreateBucketRequestLocalAliasAllow from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/CreateBucketRequestLocalAliasAllow} obj Optional instance to populate. - * @return {module:model/CreateBucketRequestLocalAliasAllow} The populated CreateBucketRequestLocalAliasAllow instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new CreateBucketRequestLocalAliasAllow(); - - if (data.hasOwnProperty('read')) { - obj['read'] = ApiClient.convertToType(data['read'], 'Boolean'); - } - if (data.hasOwnProperty('write')) { - obj['write'] = ApiClient.convertToType(data['write'], 'Boolean'); - } - if (data.hasOwnProperty('owner')) { - obj['owner'] = ApiClient.convertToType(data['owner'], 'Boolean'); - } - } - return obj; - } - - -} - -/** - * @member {Boolean} read - */ -CreateBucketRequestLocalAliasAllow.prototype['read'] = undefined; - -/** - * @member {Boolean} write - */ -CreateBucketRequestLocalAliasAllow.prototype['write'] = undefined; - -/** - * @member {Boolean} owner - */ -CreateBucketRequestLocalAliasAllow.prototype['owner'] = undefined; - - - - - - -export default CreateBucketRequestLocalAliasAllow; - diff --git a/javascript/src/model/GetNodes200Response.js b/javascript/src/model/GetNodes200Response.js deleted file mode 100644 index a00d797..0000000 --- a/javascript/src/model/GetNodes200Response.js +++ /dev/null @@ -1,105 +0,0 @@ -/** - * Garage Administration API v0+garage-v0.8.0 - * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - * - * The version of the OpenAPI document: v0.8.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; -import ClusterLayout from './ClusterLayout'; -import NodeNetworkInfo from './NodeNetworkInfo'; - -/** - * The GetNodes200Response model module. - * @module model/GetNodes200Response - * @version v0.8.0 - */ -class GetNodes200Response { - /** - * Constructs a new GetNodes200Response. - * @alias module:model/GetNodes200Response - * @param node {String} - * @param garageVersion {String} - * @param knownNodes {Object.} - * @param layout {module:model/ClusterLayout} - */ - constructor(node, garageVersion, knownNodes, layout) { - - GetNodes200Response.initialize(this, node, garageVersion, knownNodes, layout); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj, node, garageVersion, knownNodes, layout) { - obj['node'] = node; - obj['garageVersion'] = garageVersion; - obj['knownNodes'] = knownNodes; - obj['layout'] = layout; - } - - /** - * Constructs a GetNodes200Response from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/GetNodes200Response} obj Optional instance to populate. - * @return {module:model/GetNodes200Response} The populated GetNodes200Response instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new GetNodes200Response(); - - if (data.hasOwnProperty('node')) { - obj['node'] = ApiClient.convertToType(data['node'], 'String'); - } - if (data.hasOwnProperty('garageVersion')) { - obj['garageVersion'] = ApiClient.convertToType(data['garageVersion'], 'String'); - } - if (data.hasOwnProperty('knownNodes')) { - obj['knownNodes'] = ApiClient.convertToType(data['knownNodes'], {'String': NodeNetworkInfo}); - } - if (data.hasOwnProperty('layout')) { - obj['layout'] = ClusterLayout.constructFromObject(data['layout']); - } - } - return obj; - } - - -} - -/** - * @member {String} node - */ -GetNodes200Response.prototype['node'] = undefined; - -/** - * @member {String} garageVersion - */ -GetNodes200Response.prototype['garageVersion'] = undefined; - -/** - * @member {Object.} knownNodes - */ -GetNodes200Response.prototype['knownNodes'] = undefined; - -/** - * @member {module:model/ClusterLayout} layout - */ -GetNodes200Response.prototype['layout'] = undefined; - - - - - - -export default GetNodes200Response; - diff --git a/javascript/src/model/ImportKeyRequest.js b/javascript/src/model/ImportKeyRequest.js deleted file mode 100644 index 128c0e5..0000000 --- a/javascript/src/model/ImportKeyRequest.js +++ /dev/null @@ -1,93 +0,0 @@ -/** - * Garage Administration API v0+garage-v0.8.0 - * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - * - * The version of the OpenAPI document: v0.8.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The ImportKeyRequest model module. - * @module model/ImportKeyRequest - * @version v0.8.0 - */ -class ImportKeyRequest { - /** - * Constructs a new ImportKeyRequest. - * @alias module:model/ImportKeyRequest - * @param name {String} - * @param accessKeyId {String} - * @param secretAccessKey {String} - */ - constructor(name, accessKeyId, secretAccessKey) { - - ImportKeyRequest.initialize(this, name, accessKeyId, secretAccessKey); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj, name, accessKeyId, secretAccessKey) { - obj['name'] = name; - obj['accessKeyId'] = accessKeyId; - obj['secretAccessKey'] = secretAccessKey; - } - - /** - * Constructs a ImportKeyRequest from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/ImportKeyRequest} obj Optional instance to populate. - * @return {module:model/ImportKeyRequest} The populated ImportKeyRequest instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new ImportKeyRequest(); - - if (data.hasOwnProperty('name')) { - obj['name'] = ApiClient.convertToType(data['name'], 'String'); - } - if (data.hasOwnProperty('accessKeyId')) { - obj['accessKeyId'] = ApiClient.convertToType(data['accessKeyId'], 'String'); - } - if (data.hasOwnProperty('secretAccessKey')) { - obj['secretAccessKey'] = ApiClient.convertToType(data['secretAccessKey'], 'String'); - } - } - return obj; - } - - -} - -/** - * @member {String} name - */ -ImportKeyRequest.prototype['name'] = undefined; - -/** - * @member {String} accessKeyId - */ -ImportKeyRequest.prototype['accessKeyId'] = undefined; - -/** - * @member {String} secretAccessKey - */ -ImportKeyRequest.prototype['secretAccessKey'] = undefined; - - - - - - -export default ImportKeyRequest; - diff --git a/javascript/src/model/KeyInfo.js b/javascript/src/model/KeyInfo.js deleted file mode 100644 index de2d7d8..0000000 --- a/javascript/src/model/KeyInfo.js +++ /dev/null @@ -1,105 +0,0 @@ -/** - * Garage Administration API v0+garage-v0.8.0 - * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - * - * The version of the OpenAPI document: v0.8.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; -import KeyInfoBucketsInner from './KeyInfoBucketsInner'; -import KeyInfoPermissions from './KeyInfoPermissions'; - -/** - * The KeyInfo model module. - * @module model/KeyInfo - * @version v0.8.0 - */ -class KeyInfo { - /** - * Constructs a new KeyInfo. - * @alias module:model/KeyInfo - */ - constructor() { - - KeyInfo.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a KeyInfo from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/KeyInfo} obj Optional instance to populate. - * @return {module:model/KeyInfo} The populated KeyInfo instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new KeyInfo(); - - if (data.hasOwnProperty('name')) { - obj['name'] = ApiClient.convertToType(data['name'], 'String'); - } - if (data.hasOwnProperty('accessKeyId')) { - obj['accessKeyId'] = ApiClient.convertToType(data['accessKeyId'], 'String'); - } - if (data.hasOwnProperty('secretAccessKey')) { - obj['secretAccessKey'] = ApiClient.convertToType(data['secretAccessKey'], 'String'); - } - if (data.hasOwnProperty('permissions')) { - obj['permissions'] = KeyInfoPermissions.constructFromObject(data['permissions']); - } - if (data.hasOwnProperty('buckets')) { - obj['buckets'] = ApiClient.convertToType(data['buckets'], [KeyInfoBucketsInner]); - } - } - return obj; - } - - -} - -/** - * @member {String} name - */ -KeyInfo.prototype['name'] = undefined; - -/** - * @member {String} accessKeyId - */ -KeyInfo.prototype['accessKeyId'] = undefined; - -/** - * @member {String} secretAccessKey - */ -KeyInfo.prototype['secretAccessKey'] = undefined; - -/** - * @member {module:model/KeyInfoPermissions} permissions - */ -KeyInfo.prototype['permissions'] = undefined; - -/** - * @member {Array.} buckets - */ -KeyInfo.prototype['buckets'] = undefined; - - - - - - -export default KeyInfo; - diff --git a/javascript/src/model/KeyInfoBucketsInner.js b/javascript/src/model/KeyInfoBucketsInner.js deleted file mode 100644 index 0d8f8af..0000000 --- a/javascript/src/model/KeyInfoBucketsInner.js +++ /dev/null @@ -1,96 +0,0 @@ -/** - * Garage Administration API v0+garage-v0.8.0 - * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - * - * The version of the OpenAPI document: v0.8.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; -import KeyInfoBucketsInnerPermissions from './KeyInfoBucketsInnerPermissions'; - -/** - * The KeyInfoBucketsInner model module. - * @module model/KeyInfoBucketsInner - * @version v0.8.0 - */ -class KeyInfoBucketsInner { - /** - * Constructs a new KeyInfoBucketsInner. - * @alias module:model/KeyInfoBucketsInner - */ - constructor() { - - KeyInfoBucketsInner.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a KeyInfoBucketsInner from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/KeyInfoBucketsInner} obj Optional instance to populate. - * @return {module:model/KeyInfoBucketsInner} The populated KeyInfoBucketsInner instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new KeyInfoBucketsInner(); - - if (data.hasOwnProperty('id')) { - obj['id'] = ApiClient.convertToType(data['id'], 'String'); - } - if (data.hasOwnProperty('globalAliases')) { - obj['globalAliases'] = ApiClient.convertToType(data['globalAliases'], ['String']); - } - if (data.hasOwnProperty('localAliases')) { - obj['localAliases'] = ApiClient.convertToType(data['localAliases'], ['String']); - } - if (data.hasOwnProperty('permissions')) { - obj['permissions'] = KeyInfoBucketsInnerPermissions.constructFromObject(data['permissions']); - } - } - return obj; - } - - -} - -/** - * @member {String} id - */ -KeyInfoBucketsInner.prototype['id'] = undefined; - -/** - * @member {Array.} globalAliases - */ -KeyInfoBucketsInner.prototype['globalAliases'] = undefined; - -/** - * @member {Array.} localAliases - */ -KeyInfoBucketsInner.prototype['localAliases'] = undefined; - -/** - * @member {module:model/KeyInfoBucketsInnerPermissions} permissions - */ -KeyInfoBucketsInner.prototype['permissions'] = undefined; - - - - - - -export default KeyInfoBucketsInner; - diff --git a/javascript/src/model/KeyInfoBucketsInnerPermissions.js b/javascript/src/model/KeyInfoBucketsInnerPermissions.js deleted file mode 100644 index 0894689..0000000 --- a/javascript/src/model/KeyInfoBucketsInnerPermissions.js +++ /dev/null @@ -1,87 +0,0 @@ -/** - * Garage Administration API v0+garage-v0.8.0 - * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - * - * The version of the OpenAPI document: v0.8.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The KeyInfoBucketsInnerPermissions model module. - * @module model/KeyInfoBucketsInnerPermissions - * @version v0.8.0 - */ -class KeyInfoBucketsInnerPermissions { - /** - * Constructs a new KeyInfoBucketsInnerPermissions. - * @alias module:model/KeyInfoBucketsInnerPermissions - */ - constructor() { - - KeyInfoBucketsInnerPermissions.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a KeyInfoBucketsInnerPermissions from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/KeyInfoBucketsInnerPermissions} obj Optional instance to populate. - * @return {module:model/KeyInfoBucketsInnerPermissions} The populated KeyInfoBucketsInnerPermissions instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new KeyInfoBucketsInnerPermissions(); - - if (data.hasOwnProperty('read')) { - obj['read'] = ApiClient.convertToType(data['read'], 'Boolean'); - } - if (data.hasOwnProperty('write')) { - obj['write'] = ApiClient.convertToType(data['write'], 'Boolean'); - } - if (data.hasOwnProperty('owner')) { - obj['owner'] = ApiClient.convertToType(data['owner'], 'Boolean'); - } - } - return obj; - } - - -} - -/** - * @member {Boolean} read - */ -KeyInfoBucketsInnerPermissions.prototype['read'] = undefined; - -/** - * @member {Boolean} write - */ -KeyInfoBucketsInnerPermissions.prototype['write'] = undefined; - -/** - * @member {Boolean} owner - */ -KeyInfoBucketsInnerPermissions.prototype['owner'] = undefined; - - - - - - -export default KeyInfoBucketsInnerPermissions; - diff --git a/javascript/src/model/KeyInfoPermissions.js b/javascript/src/model/KeyInfoPermissions.js deleted file mode 100644 index 5ba0016..0000000 --- a/javascript/src/model/KeyInfoPermissions.js +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Garage Administration API v0+garage-v0.8.0 - * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - * - * The version of the OpenAPI document: v0.8.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The KeyInfoPermissions model module. - * @module model/KeyInfoPermissions - * @version v0.8.0 - */ -class KeyInfoPermissions { - /** - * Constructs a new KeyInfoPermissions. - * @alias module:model/KeyInfoPermissions - */ - constructor() { - - KeyInfoPermissions.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a KeyInfoPermissions from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/KeyInfoPermissions} obj Optional instance to populate. - * @return {module:model/KeyInfoPermissions} The populated KeyInfoPermissions instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new KeyInfoPermissions(); - - if (data.hasOwnProperty('createBucket')) { - obj['createBucket'] = ApiClient.convertToType(data['createBucket'], 'Boolean'); - } - } - return obj; - } - - -} - -/** - * @member {Boolean} createBucket - */ -KeyInfoPermissions.prototype['createBucket'] = undefined; - - - - - - -export default KeyInfoPermissions; - diff --git a/javascript/src/model/LayoutVersion.js b/javascript/src/model/LayoutVersion.js deleted file mode 100644 index 36e4a4c..0000000 --- a/javascript/src/model/LayoutVersion.js +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Garage Administration API v0+garage-v0.8.0 - * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - * - * The version of the OpenAPI document: v0.8.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The LayoutVersion model module. - * @module model/LayoutVersion - * @version v0.8.0 - */ -class LayoutVersion { - /** - * Constructs a new LayoutVersion. - * @alias module:model/LayoutVersion - */ - constructor() { - - LayoutVersion.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a LayoutVersion from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/LayoutVersion} obj Optional instance to populate. - * @return {module:model/LayoutVersion} The populated LayoutVersion instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new LayoutVersion(); - - if (data.hasOwnProperty('version')) { - obj['version'] = ApiClient.convertToType(data['version'], 'Number'); - } - } - return obj; - } - - -} - -/** - * @member {Number} version - */ -LayoutVersion.prototype['version'] = undefined; - - - - - - -export default LayoutVersion; - diff --git a/javascript/src/model/ListBuckets200ResponseInner.js b/javascript/src/model/ListBuckets200ResponseInner.js deleted file mode 100644 index ef9668e..0000000 --- a/javascript/src/model/ListBuckets200ResponseInner.js +++ /dev/null @@ -1,90 +0,0 @@ -/** - * Garage Administration API v0+garage-v0.8.0 - * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - * - * The version of the OpenAPI document: v0.8.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; -import ListBuckets200ResponseInnerLocalAliasesInner from './ListBuckets200ResponseInnerLocalAliasesInner'; - -/** - * The ListBuckets200ResponseInner model module. - * @module model/ListBuckets200ResponseInner - * @version v0.8.0 - */ -class ListBuckets200ResponseInner { - /** - * Constructs a new ListBuckets200ResponseInner. - * @alias module:model/ListBuckets200ResponseInner - * @param id {String} - */ - constructor(id) { - - ListBuckets200ResponseInner.initialize(this, id); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj, id) { - obj['id'] = id; - } - - /** - * Constructs a ListBuckets200ResponseInner from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/ListBuckets200ResponseInner} obj Optional instance to populate. - * @return {module:model/ListBuckets200ResponseInner} The populated ListBuckets200ResponseInner instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new ListBuckets200ResponseInner(); - - if (data.hasOwnProperty('id')) { - obj['id'] = ApiClient.convertToType(data['id'], 'String'); - } - if (data.hasOwnProperty('globalAliases')) { - obj['globalAliases'] = ApiClient.convertToType(data['globalAliases'], ['String']); - } - if (data.hasOwnProperty('localAliases')) { - obj['localAliases'] = ApiClient.convertToType(data['localAliases'], [ListBuckets200ResponseInnerLocalAliasesInner]); - } - } - return obj; - } - - -} - -/** - * @member {String} id - */ -ListBuckets200ResponseInner.prototype['id'] = undefined; - -/** - * @member {Array.} globalAliases - */ -ListBuckets200ResponseInner.prototype['globalAliases'] = undefined; - -/** - * @member {Array.} localAliases - */ -ListBuckets200ResponseInner.prototype['localAliases'] = undefined; - - - - - - -export default ListBuckets200ResponseInner; - diff --git a/javascript/src/model/ListBuckets200ResponseInnerLocalAliasesInner.js b/javascript/src/model/ListBuckets200ResponseInnerLocalAliasesInner.js deleted file mode 100644 index e04921c..0000000 --- a/javascript/src/model/ListBuckets200ResponseInnerLocalAliasesInner.js +++ /dev/null @@ -1,83 +0,0 @@ -/** - * Garage Administration API v0+garage-v0.8.0 - * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - * - * The version of the OpenAPI document: v0.8.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The ListBuckets200ResponseInnerLocalAliasesInner model module. - * @module model/ListBuckets200ResponseInnerLocalAliasesInner - * @version v0.8.0 - */ -class ListBuckets200ResponseInnerLocalAliasesInner { - /** - * Constructs a new ListBuckets200ResponseInnerLocalAliasesInner. - * @alias module:model/ListBuckets200ResponseInnerLocalAliasesInner - * @param alias {String} - * @param accessKeyId {String} - */ - constructor(alias, accessKeyId) { - - ListBuckets200ResponseInnerLocalAliasesInner.initialize(this, alias, accessKeyId); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj, alias, accessKeyId) { - obj['alias'] = alias; - obj['accessKeyId'] = accessKeyId; - } - - /** - * Constructs a ListBuckets200ResponseInnerLocalAliasesInner from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/ListBuckets200ResponseInnerLocalAliasesInner} obj Optional instance to populate. - * @return {module:model/ListBuckets200ResponseInnerLocalAliasesInner} The populated ListBuckets200ResponseInnerLocalAliasesInner instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new ListBuckets200ResponseInnerLocalAliasesInner(); - - if (data.hasOwnProperty('alias')) { - obj['alias'] = ApiClient.convertToType(data['alias'], 'String'); - } - if (data.hasOwnProperty('accessKeyId')) { - obj['accessKeyId'] = ApiClient.convertToType(data['accessKeyId'], 'String'); - } - } - return obj; - } - - -} - -/** - * @member {String} alias - */ -ListBuckets200ResponseInnerLocalAliasesInner.prototype['alias'] = undefined; - -/** - * @member {String} accessKeyId - */ -ListBuckets200ResponseInnerLocalAliasesInner.prototype['accessKeyId'] = undefined; - - - - - - -export default ListBuckets200ResponseInnerLocalAliasesInner; - diff --git a/javascript/src/model/ListKeys200ResponseInner.js b/javascript/src/model/ListKeys200ResponseInner.js deleted file mode 100644 index b1ab612..0000000 --- a/javascript/src/model/ListKeys200ResponseInner.js +++ /dev/null @@ -1,81 +0,0 @@ -/** - * Garage Administration API v0+garage-v0.8.0 - * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - * - * The version of the OpenAPI document: v0.8.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The ListKeys200ResponseInner model module. - * @module model/ListKeys200ResponseInner - * @version v0.8.0 - */ -class ListKeys200ResponseInner { - /** - * Constructs a new ListKeys200ResponseInner. - * @alias module:model/ListKeys200ResponseInner - * @param id {String} - */ - constructor(id) { - - ListKeys200ResponseInner.initialize(this, id); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj, id) { - obj['id'] = id; - } - - /** - * Constructs a ListKeys200ResponseInner from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/ListKeys200ResponseInner} obj Optional instance to populate. - * @return {module:model/ListKeys200ResponseInner} The populated ListKeys200ResponseInner instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new ListKeys200ResponseInner(); - - if (data.hasOwnProperty('id')) { - obj['id'] = ApiClient.convertToType(data['id'], 'String'); - } - if (data.hasOwnProperty('name')) { - obj['name'] = ApiClient.convertToType(data['name'], 'String'); - } - } - return obj; - } - - -} - -/** - * @member {String} id - */ -ListKeys200ResponseInner.prototype['id'] = undefined; - -/** - * @member {String} name - */ -ListKeys200ResponseInner.prototype['name'] = undefined; - - - - - - -export default ListKeys200ResponseInner; - diff --git a/javascript/src/model/NodeClusterInfo.js b/javascript/src/model/NodeClusterInfo.js deleted file mode 100644 index d1d9a26..0000000 --- a/javascript/src/model/NodeClusterInfo.js +++ /dev/null @@ -1,94 +0,0 @@ -/** - * Garage Administration API v0+garage-v0.8.0 - * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - * - * The version of the OpenAPI document: v0.8.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The NodeClusterInfo model module. - * @module model/NodeClusterInfo - * @version v0.8.0 - */ -class NodeClusterInfo { - /** - * Constructs a new NodeClusterInfo. - * @alias module:model/NodeClusterInfo - * @param zone {String} - * @param capacity {Number} - * @param tags {Array.} User defined tags, put whatever makes sense for you, these tags are not interpreted by Garage - */ - constructor(zone, capacity, tags) { - - NodeClusterInfo.initialize(this, zone, capacity, tags); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj, zone, capacity, tags) { - obj['zone'] = zone; - obj['capacity'] = capacity; - obj['tags'] = tags; - } - - /** - * Constructs a NodeClusterInfo from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/NodeClusterInfo} obj Optional instance to populate. - * @return {module:model/NodeClusterInfo} The populated NodeClusterInfo instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new NodeClusterInfo(); - - if (data.hasOwnProperty('zone')) { - obj['zone'] = ApiClient.convertToType(data['zone'], 'String'); - } - if (data.hasOwnProperty('capacity')) { - obj['capacity'] = ApiClient.convertToType(data['capacity'], 'Number'); - } - if (data.hasOwnProperty('tags')) { - obj['tags'] = ApiClient.convertToType(data['tags'], ['String']); - } - } - return obj; - } - - -} - -/** - * @member {String} zone - */ -NodeClusterInfo.prototype['zone'] = undefined; - -/** - * @member {Number} capacity - */ -NodeClusterInfo.prototype['capacity'] = undefined; - -/** - * User defined tags, put whatever makes sense for you, these tags are not interpreted by Garage - * @member {Array.} tags - */ -NodeClusterInfo.prototype['tags'] = undefined; - - - - - - -export default NodeClusterInfo; - diff --git a/javascript/src/model/NodeNetworkInfo.js b/javascript/src/model/NodeNetworkInfo.js deleted file mode 100644 index e3ef062..0000000 --- a/javascript/src/model/NodeNetworkInfo.js +++ /dev/null @@ -1,103 +0,0 @@ -/** - * Garage Administration API v0+garage-v0.8.0 - * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - * - * The version of the OpenAPI document: v0.8.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The NodeNetworkInfo model module. - * @module model/NodeNetworkInfo - * @version v0.8.0 - */ -class NodeNetworkInfo { - /** - * Constructs a new NodeNetworkInfo. - * @alias module:model/NodeNetworkInfo - * @param addr {String} - * @param isUp {Boolean} - * @param lastSeenSecsAgo {Number} - * @param hostname {String} - */ - constructor(addr, isUp, lastSeenSecsAgo, hostname) { - - NodeNetworkInfo.initialize(this, addr, isUp, lastSeenSecsAgo, hostname); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj, addr, isUp, lastSeenSecsAgo, hostname) { - obj['addr'] = addr; - obj['is_up'] = isUp; - obj['last_seen_secs_ago'] = lastSeenSecsAgo; - obj['hostname'] = hostname; - } - - /** - * Constructs a NodeNetworkInfo from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/NodeNetworkInfo} obj Optional instance to populate. - * @return {module:model/NodeNetworkInfo} The populated NodeNetworkInfo instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new NodeNetworkInfo(); - - if (data.hasOwnProperty('addr')) { - obj['addr'] = ApiClient.convertToType(data['addr'], 'String'); - } - if (data.hasOwnProperty('is_up')) { - obj['is_up'] = ApiClient.convertToType(data['is_up'], 'Boolean'); - } - if (data.hasOwnProperty('last_seen_secs_ago')) { - obj['last_seen_secs_ago'] = ApiClient.convertToType(data['last_seen_secs_ago'], 'Number'); - } - if (data.hasOwnProperty('hostname')) { - obj['hostname'] = ApiClient.convertToType(data['hostname'], 'String'); - } - } - return obj; - } - - -} - -/** - * @member {String} addr - */ -NodeNetworkInfo.prototype['addr'] = undefined; - -/** - * @member {Boolean} is_up - */ -NodeNetworkInfo.prototype['is_up'] = undefined; - -/** - * @member {Number} last_seen_secs_ago - */ -NodeNetworkInfo.prototype['last_seen_secs_ago'] = undefined; - -/** - * @member {String} hostname - */ -NodeNetworkInfo.prototype['hostname'] = undefined; - - - - - - -export default NodeNetworkInfo; - diff --git a/javascript/src/model/UpdateBucketRequest.js b/javascript/src/model/UpdateBucketRequest.js deleted file mode 100644 index 4085301..0000000 --- a/javascript/src/model/UpdateBucketRequest.js +++ /dev/null @@ -1,81 +0,0 @@ -/** - * Garage Administration API v0+garage-v0.8.0 - * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - * - * The version of the OpenAPI document: v0.8.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; -import UpdateBucketRequestQuotas from './UpdateBucketRequestQuotas'; -import UpdateBucketRequestWebsiteAccess from './UpdateBucketRequestWebsiteAccess'; - -/** - * The UpdateBucketRequest model module. - * @module model/UpdateBucketRequest - * @version v0.8.0 - */ -class UpdateBucketRequest { - /** - * Constructs a new UpdateBucketRequest. - * @alias module:model/UpdateBucketRequest - */ - constructor() { - - UpdateBucketRequest.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a UpdateBucketRequest from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/UpdateBucketRequest} obj Optional instance to populate. - * @return {module:model/UpdateBucketRequest} The populated UpdateBucketRequest instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new UpdateBucketRequest(); - - if (data.hasOwnProperty('websiteAccess')) { - obj['websiteAccess'] = UpdateBucketRequestWebsiteAccess.constructFromObject(data['websiteAccess']); - } - if (data.hasOwnProperty('quotas')) { - obj['quotas'] = UpdateBucketRequestQuotas.constructFromObject(data['quotas']); - } - } - return obj; - } - - -} - -/** - * @member {module:model/UpdateBucketRequestWebsiteAccess} websiteAccess - */ -UpdateBucketRequest.prototype['websiteAccess'] = undefined; - -/** - * @member {module:model/UpdateBucketRequestQuotas} quotas - */ -UpdateBucketRequest.prototype['quotas'] = undefined; - - - - - - -export default UpdateBucketRequest; - diff --git a/javascript/src/model/UpdateBucketRequestQuotas.js b/javascript/src/model/UpdateBucketRequestQuotas.js deleted file mode 100644 index 7ffc0d9..0000000 --- a/javascript/src/model/UpdateBucketRequestQuotas.js +++ /dev/null @@ -1,79 +0,0 @@ -/** - * Garage Administration API v0+garage-v0.8.0 - * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - * - * The version of the OpenAPI document: v0.8.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The UpdateBucketRequestQuotas model module. - * @module model/UpdateBucketRequestQuotas - * @version v0.8.0 - */ -class UpdateBucketRequestQuotas { - /** - * Constructs a new UpdateBucketRequestQuotas. - * @alias module:model/UpdateBucketRequestQuotas - */ - constructor() { - - UpdateBucketRequestQuotas.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a UpdateBucketRequestQuotas from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/UpdateBucketRequestQuotas} obj Optional instance to populate. - * @return {module:model/UpdateBucketRequestQuotas} The populated UpdateBucketRequestQuotas instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new UpdateBucketRequestQuotas(); - - if (data.hasOwnProperty('maxSize')) { - obj['maxSize'] = ApiClient.convertToType(data['maxSize'], 'Number'); - } - if (data.hasOwnProperty('maxObjects')) { - obj['maxObjects'] = ApiClient.convertToType(data['maxObjects'], 'Number'); - } - } - return obj; - } - - -} - -/** - * @member {Number} maxSize - */ -UpdateBucketRequestQuotas.prototype['maxSize'] = undefined; - -/** - * @member {Number} maxObjects - */ -UpdateBucketRequestQuotas.prototype['maxObjects'] = undefined; - - - - - - -export default UpdateBucketRequestQuotas; - diff --git a/javascript/src/model/UpdateBucketRequestWebsiteAccess.js b/javascript/src/model/UpdateBucketRequestWebsiteAccess.js deleted file mode 100644 index 8b088e0..0000000 --- a/javascript/src/model/UpdateBucketRequestWebsiteAccess.js +++ /dev/null @@ -1,87 +0,0 @@ -/** - * Garage Administration API v0+garage-v0.8.0 - * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - * - * The version of the OpenAPI document: v0.8.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The UpdateBucketRequestWebsiteAccess model module. - * @module model/UpdateBucketRequestWebsiteAccess - * @version v0.8.0 - */ -class UpdateBucketRequestWebsiteAccess { - /** - * Constructs a new UpdateBucketRequestWebsiteAccess. - * @alias module:model/UpdateBucketRequestWebsiteAccess - */ - constructor() { - - UpdateBucketRequestWebsiteAccess.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a UpdateBucketRequestWebsiteAccess from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/UpdateBucketRequestWebsiteAccess} obj Optional instance to populate. - * @return {module:model/UpdateBucketRequestWebsiteAccess} The populated UpdateBucketRequestWebsiteAccess instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new UpdateBucketRequestWebsiteAccess(); - - if (data.hasOwnProperty('enabled')) { - obj['enabled'] = ApiClient.convertToType(data['enabled'], 'Boolean'); - } - if (data.hasOwnProperty('indexDocument')) { - obj['indexDocument'] = ApiClient.convertToType(data['indexDocument'], 'String'); - } - if (data.hasOwnProperty('errorDocument')) { - obj['errorDocument'] = ApiClient.convertToType(data['errorDocument'], 'String'); - } - } - return obj; - } - - -} - -/** - * @member {Boolean} enabled - */ -UpdateBucketRequestWebsiteAccess.prototype['enabled'] = undefined; - -/** - * @member {String} indexDocument - */ -UpdateBucketRequestWebsiteAccess.prototype['indexDocument'] = undefined; - -/** - * @member {String} errorDocument - */ -UpdateBucketRequestWebsiteAccess.prototype['errorDocument'] = undefined; - - - - - - -export default UpdateBucketRequestWebsiteAccess; - diff --git a/javascript/src/model/UpdateKeyRequest.js b/javascript/src/model/UpdateKeyRequest.js deleted file mode 100644 index c641e7f..0000000 --- a/javascript/src/model/UpdateKeyRequest.js +++ /dev/null @@ -1,89 +0,0 @@ -/** - * Garage Administration API v0+garage-v0.8.0 - * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - * - * The version of the OpenAPI document: v0.8.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; -import UpdateKeyRequestAllow from './UpdateKeyRequestAllow'; -import UpdateKeyRequestDeny from './UpdateKeyRequestDeny'; - -/** - * The UpdateKeyRequest model module. - * @module model/UpdateKeyRequest - * @version v0.8.0 - */ -class UpdateKeyRequest { - /** - * Constructs a new UpdateKeyRequest. - * @alias module:model/UpdateKeyRequest - */ - constructor() { - - UpdateKeyRequest.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a UpdateKeyRequest from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/UpdateKeyRequest} obj Optional instance to populate. - * @return {module:model/UpdateKeyRequest} The populated UpdateKeyRequest instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new UpdateKeyRequest(); - - if (data.hasOwnProperty('name')) { - obj['name'] = ApiClient.convertToType(data['name'], 'String'); - } - if (data.hasOwnProperty('allow')) { - obj['allow'] = UpdateKeyRequestAllow.constructFromObject(data['allow']); - } - if (data.hasOwnProperty('deny')) { - obj['deny'] = UpdateKeyRequestDeny.constructFromObject(data['deny']); - } - } - return obj; - } - - -} - -/** - * @member {String} name - */ -UpdateKeyRequest.prototype['name'] = undefined; - -/** - * @member {module:model/UpdateKeyRequestAllow} allow - */ -UpdateKeyRequest.prototype['allow'] = undefined; - -/** - * @member {module:model/UpdateKeyRequestDeny} deny - */ -UpdateKeyRequest.prototype['deny'] = undefined; - - - - - - -export default UpdateKeyRequest; - diff --git a/javascript/src/model/UpdateKeyRequestAllow.js b/javascript/src/model/UpdateKeyRequestAllow.js deleted file mode 100644 index 18a7d70..0000000 --- a/javascript/src/model/UpdateKeyRequestAllow.js +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Garage Administration API v0+garage-v0.8.0 - * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - * - * The version of the OpenAPI document: v0.8.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The UpdateKeyRequestAllow model module. - * @module model/UpdateKeyRequestAllow - * @version v0.8.0 - */ -class UpdateKeyRequestAllow { - /** - * Constructs a new UpdateKeyRequestAllow. - * @alias module:model/UpdateKeyRequestAllow - */ - constructor() { - - UpdateKeyRequestAllow.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a UpdateKeyRequestAllow from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/UpdateKeyRequestAllow} obj Optional instance to populate. - * @return {module:model/UpdateKeyRequestAllow} The populated UpdateKeyRequestAllow instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new UpdateKeyRequestAllow(); - - if (data.hasOwnProperty('createBucket')) { - obj['createBucket'] = ApiClient.convertToType(data['createBucket'], 'Boolean'); - } - } - return obj; - } - - -} - -/** - * @member {Boolean} createBucket - */ -UpdateKeyRequestAllow.prototype['createBucket'] = undefined; - - - - - - -export default UpdateKeyRequestAllow; - diff --git a/javascript/src/model/UpdateKeyRequestDeny.js b/javascript/src/model/UpdateKeyRequestDeny.js deleted file mode 100644 index cb0286d..0000000 --- a/javascript/src/model/UpdateKeyRequestDeny.js +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Garage Administration API v0+garage-v0.8.0 - * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - * - * The version of the OpenAPI document: v0.8.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The UpdateKeyRequestDeny model module. - * @module model/UpdateKeyRequestDeny - * @version v0.8.0 - */ -class UpdateKeyRequestDeny { - /** - * Constructs a new UpdateKeyRequestDeny. - * @alias module:model/UpdateKeyRequestDeny - */ - constructor() { - - UpdateKeyRequestDeny.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a UpdateKeyRequestDeny from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/UpdateKeyRequestDeny} obj Optional instance to populate. - * @return {module:model/UpdateKeyRequestDeny} The populated UpdateKeyRequestDeny instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new UpdateKeyRequestDeny(); - - if (data.hasOwnProperty('createBucket')) { - obj['createBucket'] = ApiClient.convertToType(data['createBucket'], 'Boolean'); - } - } - return obj; - } - - -} - -/** - * @member {Boolean} createBucket - */ -UpdateKeyRequestDeny.prototype['createBucket'] = undefined; - - - - - - -export default UpdateKeyRequestDeny; - diff --git a/javascript/test/api/BucketApi.spec.js b/javascript/test/api/BucketApi.spec.js deleted file mode 100644 index 185f8b7..0000000 --- a/javascript/test/api/BucketApi.spec.js +++ /dev/null @@ -1,173 +0,0 @@ -/** - * Garage Administration API v0+garage-v0.8.0 - * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - * - * The version of the OpenAPI document: v0.8.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.GarageAdministrationApiV0garageV080); - } -}(this, function(expect, GarageAdministrationApiV0garageV080) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new GarageAdministrationApiV0garageV080.BucketApi(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('BucketApi', function() { - describe('allowBucketKey', function() { - it('should call allowBucketKey successfully', function(done) { - //uncomment below and update the code to test allowBucketKey - //instance.allowBucketKey(function(error) { - // if (error) throw error; - //expect().to.be(); - //}); - done(); - }); - }); - describe('createBucket', function() { - it('should call createBucket successfully', function(done) { - //uncomment below and update the code to test createBucket - //instance.createBucket(function(error) { - // if (error) throw error; - //expect().to.be(); - //}); - done(); - }); - }); - describe('deleteBucket', function() { - it('should call deleteBucket successfully', function(done) { - //uncomment below and update the code to test deleteBucket - //instance.deleteBucket(function(error) { - // if (error) throw error; - //expect().to.be(); - //}); - done(); - }); - }); - describe('deleteBucketGlobalAlias', function() { - it('should call deleteBucketGlobalAlias successfully', function(done) { - //uncomment below and update the code to test deleteBucketGlobalAlias - //instance.deleteBucketGlobalAlias(function(error) { - // if (error) throw error; - //expect().to.be(); - //}); - done(); - }); - }); - describe('deleteBucketLocalAlias', function() { - it('should call deleteBucketLocalAlias successfully', function(done) { - //uncomment below and update the code to test deleteBucketLocalAlias - //instance.deleteBucketLocalAlias(function(error) { - // if (error) throw error; - //expect().to.be(); - //}); - done(); - }); - }); - describe('denyBucketKey', function() { - it('should call denyBucketKey successfully', function(done) { - //uncomment below and update the code to test denyBucketKey - //instance.denyBucketKey(function(error) { - // if (error) throw error; - //expect().to.be(); - //}); - done(); - }); - }); - describe('findBucketInfo', function() { - it('should call findBucketInfo successfully', function(done) { - //uncomment below and update the code to test findBucketInfo - //instance.findBucketInfo(function(error) { - // if (error) throw error; - //expect().to.be(); - //}); - done(); - }); - }); - describe('getBucketInfo', function() { - it('should call getBucketInfo successfully', function(done) { - //uncomment below and update the code to test getBucketInfo - //instance.getBucketInfo(function(error) { - // if (error) throw error; - //expect().to.be(); - //}); - done(); - }); - }); - describe('listBuckets', function() { - it('should call listBuckets successfully', function(done) { - //uncomment below and update the code to test listBuckets - //instance.listBuckets(function(error) { - // if (error) throw error; - //expect().to.be(); - //}); - done(); - }); - }); - describe('putBucketGlobalAlias', function() { - it('should call putBucketGlobalAlias successfully', function(done) { - //uncomment below and update the code to test putBucketGlobalAlias - //instance.putBucketGlobalAlias(function(error) { - // if (error) throw error; - //expect().to.be(); - //}); - done(); - }); - }); - describe('putBucketLocalAlias', function() { - it('should call putBucketLocalAlias successfully', function(done) { - //uncomment below and update the code to test putBucketLocalAlias - //instance.putBucketLocalAlias(function(error) { - // if (error) throw error; - //expect().to.be(); - //}); - done(); - }); - }); - describe('updateBucket', function() { - it('should call updateBucket successfully', function(done) { - //uncomment below and update the code to test updateBucket - //instance.updateBucket(function(error) { - // if (error) throw error; - //expect().to.be(); - //}); - done(); - }); - }); - }); - -})); diff --git a/javascript/test/api/KeyApi.spec.js b/javascript/test/api/KeyApi.spec.js deleted file mode 100644 index 7dbc239..0000000 --- a/javascript/test/api/KeyApi.spec.js +++ /dev/null @@ -1,123 +0,0 @@ -/** - * Garage Administration API v0+garage-v0.8.0 - * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - * - * The version of the OpenAPI document: v0.8.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.GarageAdministrationApiV0garageV080); - } -}(this, function(expect, GarageAdministrationApiV0garageV080) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new GarageAdministrationApiV0garageV080.KeyApi(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('KeyApi', function() { - describe('addKey', function() { - it('should call addKey successfully', function(done) { - //uncomment below and update the code to test addKey - //instance.addKey(function(error) { - // if (error) throw error; - //expect().to.be(); - //}); - done(); - }); - }); - describe('deleteKey', function() { - it('should call deleteKey successfully', function(done) { - //uncomment below and update the code to test deleteKey - //instance.deleteKey(function(error) { - // if (error) throw error; - //expect().to.be(); - //}); - done(); - }); - }); - describe('getKey', function() { - it('should call getKey successfully', function(done) { - //uncomment below and update the code to test getKey - //instance.getKey(function(error) { - // if (error) throw error; - //expect().to.be(); - //}); - done(); - }); - }); - describe('importKey', function() { - it('should call importKey successfully', function(done) { - //uncomment below and update the code to test importKey - //instance.importKey(function(error) { - // if (error) throw error; - //expect().to.be(); - //}); - done(); - }); - }); - describe('listKeys', function() { - it('should call listKeys successfully', function(done) { - //uncomment below and update the code to test listKeys - //instance.listKeys(function(error) { - // if (error) throw error; - //expect().to.be(); - //}); - done(); - }); - }); - describe('searchKey', function() { - it('should call searchKey successfully', function(done) { - //uncomment below and update the code to test searchKey - //instance.searchKey(function(error) { - // if (error) throw error; - //expect().to.be(); - //}); - done(); - }); - }); - describe('updateKey', function() { - it('should call updateKey successfully', function(done) { - //uncomment below and update the code to test updateKey - //instance.updateKey(function(error) { - // if (error) throw error; - //expect().to.be(); - //}); - done(); - }); - }); - }); - -})); diff --git a/javascript/test/api/LayoutApi.spec.js b/javascript/test/api/LayoutApi.spec.js deleted file mode 100644 index 7971cbd..0000000 --- a/javascript/test/api/LayoutApi.spec.js +++ /dev/null @@ -1,93 +0,0 @@ -/** - * Garage Administration API v0+garage-v0.8.0 - * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - * - * The version of the OpenAPI document: v0.8.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.GarageAdministrationApiV0garageV080); - } -}(this, function(expect, GarageAdministrationApiV0garageV080) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new GarageAdministrationApiV0garageV080.LayoutApi(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('LayoutApi', function() { - describe('addLayout', function() { - it('should call addLayout successfully', function(done) { - //uncomment below and update the code to test addLayout - //instance.addLayout(function(error) { - // if (error) throw error; - //expect().to.be(); - //}); - done(); - }); - }); - describe('applyLayout', function() { - it('should call applyLayout successfully', function(done) { - //uncomment below and update the code to test applyLayout - //instance.applyLayout(function(error) { - // if (error) throw error; - //expect().to.be(); - //}); - done(); - }); - }); - describe('getLayout', function() { - it('should call getLayout successfully', function(done) { - //uncomment below and update the code to test getLayout - //instance.getLayout(function(error) { - // if (error) throw error; - //expect().to.be(); - //}); - done(); - }); - }); - describe('revertLayout', function() { - it('should call revertLayout successfully', function(done) { - //uncomment below and update the code to test revertLayout - //instance.revertLayout(function(error) { - // if (error) throw error; - //expect().to.be(); - //}); - done(); - }); - }); - }); - -})); diff --git a/javascript/test/api/NodesApi.spec.js b/javascript/test/api/NodesApi.spec.js deleted file mode 100644 index d4e548b..0000000 --- a/javascript/test/api/NodesApi.spec.js +++ /dev/null @@ -1,73 +0,0 @@ -/** - * Garage Administration API v0+garage-v0.8.0 - * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - * - * The version of the OpenAPI document: v0.8.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.GarageAdministrationApiV0garageV080); - } -}(this, function(expect, GarageAdministrationApiV0garageV080) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new GarageAdministrationApiV0garageV080.NodesApi(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('NodesApi', function() { - describe('addNode', function() { - it('should call addNode successfully', function(done) { - //uncomment below and update the code to test addNode - //instance.addNode(function(error) { - // if (error) throw error; - //expect().to.be(); - //}); - done(); - }); - }); - describe('getNodes', function() { - it('should call getNodes successfully', function(done) { - //uncomment below and update the code to test getNodes - //instance.getNodes(function(error) { - // if (error) throw error; - //expect().to.be(); - //}); - done(); - }); - }); - }); - -})); diff --git a/javascript/test/model/AddKeyRequest.spec.js b/javascript/test/model/AddKeyRequest.spec.js deleted file mode 100644 index e57362e..0000000 --- a/javascript/test/model/AddKeyRequest.spec.js +++ /dev/null @@ -1,65 +0,0 @@ -/** - * Garage Administration API v0+garage-v0.8.0 - * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - * - * The version of the OpenAPI document: v0.8.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.GarageAdministrationApiV0garageV080); - } -}(this, function(expect, GarageAdministrationApiV0garageV080) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new GarageAdministrationApiV0garageV080.AddKeyRequest(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('AddKeyRequest', function() { - it('should create an instance of AddKeyRequest', function() { - // uncomment below and update the code to test AddKeyRequest - //var instance = new GarageAdministrationApiV0garageV080.AddKeyRequest(); - //expect(instance).to.be.a(GarageAdministrationApiV0garageV080.AddKeyRequest); - }); - - it('should have the property name (base name: "name")', function() { - // uncomment below and update the code to test the property name - //var instance = new GarageAdministrationApiV0garageV080.AddKeyRequest(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/javascript/test/model/AddNode200ResponseInner.spec.js b/javascript/test/model/AddNode200ResponseInner.spec.js deleted file mode 100644 index 55dd7b3..0000000 --- a/javascript/test/model/AddNode200ResponseInner.spec.js +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Garage Administration API v0+garage-v0.8.0 - * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - * - * The version of the OpenAPI document: v0.8.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.GarageAdministrationApiV0garageV080); - } -}(this, function(expect, GarageAdministrationApiV0garageV080) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new GarageAdministrationApiV0garageV080.AddNode200ResponseInner(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('AddNode200ResponseInner', function() { - it('should create an instance of AddNode200ResponseInner', function() { - // uncomment below and update the code to test AddNode200ResponseInner - //var instance = new GarageAdministrationApiV0garageV080.AddNode200ResponseInner(); - //expect(instance).to.be.a(GarageAdministrationApiV0garageV080.AddNode200ResponseInner); - }); - - it('should have the property success (base name: "success")', function() { - // uncomment below and update the code to test the property success - //var instance = new GarageAdministrationApiV0garageV080.AddNode200ResponseInner(); - //expect(instance).to.be(); - }); - - it('should have the property error (base name: "error")', function() { - // uncomment below and update the code to test the property error - //var instance = new GarageAdministrationApiV0garageV080.AddNode200ResponseInner(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/javascript/test/model/AllowBucketKeyRequest.spec.js b/javascript/test/model/AllowBucketKeyRequest.spec.js deleted file mode 100644 index 6821481..0000000 --- a/javascript/test/model/AllowBucketKeyRequest.spec.js +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Garage Administration API v0+garage-v0.8.0 - * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - * - * The version of the OpenAPI document: v0.8.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.GarageAdministrationApiV0garageV080); - } -}(this, function(expect, GarageAdministrationApiV0garageV080) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new GarageAdministrationApiV0garageV080.AllowBucketKeyRequest(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('AllowBucketKeyRequest', function() { - it('should create an instance of AllowBucketKeyRequest', function() { - // uncomment below and update the code to test AllowBucketKeyRequest - //var instance = new GarageAdministrationApiV0garageV080.AllowBucketKeyRequest(); - //expect(instance).to.be.a(GarageAdministrationApiV0garageV080.AllowBucketKeyRequest); - }); - - it('should have the property bucketId (base name: "bucketId")', function() { - // uncomment below and update the code to test the property bucketId - //var instance = new GarageAdministrationApiV0garageV080.AllowBucketKeyRequest(); - //expect(instance).to.be(); - }); - - it('should have the property accessKeyId (base name: "accessKeyId")', function() { - // uncomment below and update the code to test the property accessKeyId - //var instance = new GarageAdministrationApiV0garageV080.AllowBucketKeyRequest(); - //expect(instance).to.be(); - }); - - it('should have the property permissions (base name: "permissions")', function() { - // uncomment below and update the code to test the property permissions - //var instance = new GarageAdministrationApiV0garageV080.AllowBucketKeyRequest(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/javascript/test/model/AllowBucketKeyRequestPermissions.spec.js b/javascript/test/model/AllowBucketKeyRequestPermissions.spec.js deleted file mode 100644 index b809da6..0000000 --- a/javascript/test/model/AllowBucketKeyRequestPermissions.spec.js +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Garage Administration API v0+garage-v0.8.0 - * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - * - * The version of the OpenAPI document: v0.8.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.GarageAdministrationApiV0garageV080); - } -}(this, function(expect, GarageAdministrationApiV0garageV080) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new GarageAdministrationApiV0garageV080.AllowBucketKeyRequestPermissions(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('AllowBucketKeyRequestPermissions', function() { - it('should create an instance of AllowBucketKeyRequestPermissions', function() { - // uncomment below and update the code to test AllowBucketKeyRequestPermissions - //var instance = new GarageAdministrationApiV0garageV080.AllowBucketKeyRequestPermissions(); - //expect(instance).to.be.a(GarageAdministrationApiV0garageV080.AllowBucketKeyRequestPermissions); - }); - - it('should have the property read (base name: "read")', function() { - // uncomment below and update the code to test the property read - //var instance = new GarageAdministrationApiV0garageV080.AllowBucketKeyRequestPermissions(); - //expect(instance).to.be(); - }); - - it('should have the property write (base name: "write")', function() { - // uncomment below and update the code to test the property write - //var instance = new GarageAdministrationApiV0garageV080.AllowBucketKeyRequestPermissions(); - //expect(instance).to.be(); - }); - - it('should have the property owner (base name: "owner")', function() { - // uncomment below and update the code to test the property owner - //var instance = new GarageAdministrationApiV0garageV080.AllowBucketKeyRequestPermissions(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/javascript/test/model/BucketInfo.spec.js b/javascript/test/model/BucketInfo.spec.js deleted file mode 100644 index 6c62b35..0000000 --- a/javascript/test/model/BucketInfo.spec.js +++ /dev/null @@ -1,113 +0,0 @@ -/** - * Garage Administration API v0+garage-v0.8.0 - * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - * - * The version of the OpenAPI document: v0.8.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.GarageAdministrationApiV0garageV080); - } -}(this, function(expect, GarageAdministrationApiV0garageV080) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new GarageAdministrationApiV0garageV080.BucketInfo(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('BucketInfo', function() { - it('should create an instance of BucketInfo', function() { - // uncomment below and update the code to test BucketInfo - //var instance = new GarageAdministrationApiV0garageV080.BucketInfo(); - //expect(instance).to.be.a(GarageAdministrationApiV0garageV080.BucketInfo); - }); - - it('should have the property id (base name: "id")', function() { - // uncomment below and update the code to test the property id - //var instance = new GarageAdministrationApiV0garageV080.BucketInfo(); - //expect(instance).to.be(); - }); - - it('should have the property globalAliases (base name: "globalAliases")', function() { - // uncomment below and update the code to test the property globalAliases - //var instance = new GarageAdministrationApiV0garageV080.BucketInfo(); - //expect(instance).to.be(); - }); - - it('should have the property websiteAccess (base name: "websiteAccess")', function() { - // uncomment below and update the code to test the property websiteAccess - //var instance = new GarageAdministrationApiV0garageV080.BucketInfo(); - //expect(instance).to.be(); - }); - - it('should have the property websiteConfig (base name: "websiteConfig")', function() { - // uncomment below and update the code to test the property websiteConfig - //var instance = new GarageAdministrationApiV0garageV080.BucketInfo(); - //expect(instance).to.be(); - }); - - it('should have the property keys (base name: "keys")', function() { - // uncomment below and update the code to test the property keys - //var instance = new GarageAdministrationApiV0garageV080.BucketInfo(); - //expect(instance).to.be(); - }); - - it('should have the property objects (base name: "objects")', function() { - // uncomment below and update the code to test the property objects - //var instance = new GarageAdministrationApiV0garageV080.BucketInfo(); - //expect(instance).to.be(); - }); - - it('should have the property bytes (base name: "bytes")', function() { - // uncomment below and update the code to test the property bytes - //var instance = new GarageAdministrationApiV0garageV080.BucketInfo(); - //expect(instance).to.be(); - }); - - it('should have the property unfinishedUploads (base name: "unfinishedUploads")', function() { - // uncomment below and update the code to test the property unfinishedUploads - //var instance = new GarageAdministrationApiV0garageV080.BucketInfo(); - //expect(instance).to.be(); - }); - - it('should have the property quotas (base name: "quotas")', function() { - // uncomment below and update the code to test the property quotas - //var instance = new GarageAdministrationApiV0garageV080.BucketInfo(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/javascript/test/model/BucketInfoQuotas.spec.js b/javascript/test/model/BucketInfoQuotas.spec.js deleted file mode 100644 index 3dd6d8f..0000000 --- a/javascript/test/model/BucketInfoQuotas.spec.js +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Garage Administration API v0+garage-v0.8.0 - * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - * - * The version of the OpenAPI document: v0.8.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.GarageAdministrationApiV0garageV080); - } -}(this, function(expect, GarageAdministrationApiV0garageV080) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new GarageAdministrationApiV0garageV080.BucketInfoQuotas(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('BucketInfoQuotas', function() { - it('should create an instance of BucketInfoQuotas', function() { - // uncomment below and update the code to test BucketInfoQuotas - //var instance = new GarageAdministrationApiV0garageV080.BucketInfoQuotas(); - //expect(instance).to.be.a(GarageAdministrationApiV0garageV080.BucketInfoQuotas); - }); - - it('should have the property maxSize (base name: "maxSize")', function() { - // uncomment below and update the code to test the property maxSize - //var instance = new GarageAdministrationApiV0garageV080.BucketInfoQuotas(); - //expect(instance).to.be(); - }); - - it('should have the property maxObjects (base name: "maxObjects")', function() { - // uncomment below and update the code to test the property maxObjects - //var instance = new GarageAdministrationApiV0garageV080.BucketInfoQuotas(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/javascript/test/model/BucketInfoWebsiteConfig.spec.js b/javascript/test/model/BucketInfoWebsiteConfig.spec.js deleted file mode 100644 index 54bcfe9..0000000 --- a/javascript/test/model/BucketInfoWebsiteConfig.spec.js +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Garage Administration API v0+garage-v0.8.0 - * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - * - * The version of the OpenAPI document: v0.8.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.GarageAdministrationApiV0garageV080); - } -}(this, function(expect, GarageAdministrationApiV0garageV080) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new GarageAdministrationApiV0garageV080.BucketInfoWebsiteConfig(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('BucketInfoWebsiteConfig', function() { - it('should create an instance of BucketInfoWebsiteConfig', function() { - // uncomment below and update the code to test BucketInfoWebsiteConfig - //var instance = new GarageAdministrationApiV0garageV080.BucketInfoWebsiteConfig(); - //expect(instance).to.be.a(GarageAdministrationApiV0garageV080.BucketInfoWebsiteConfig); - }); - - it('should have the property indexDocument (base name: "indexDocument")', function() { - // uncomment below and update the code to test the property indexDocument - //var instance = new GarageAdministrationApiV0garageV080.BucketInfoWebsiteConfig(); - //expect(instance).to.be(); - }); - - it('should have the property errorDocument (base name: "errorDocument")', function() { - // uncomment below and update the code to test the property errorDocument - //var instance = new GarageAdministrationApiV0garageV080.BucketInfoWebsiteConfig(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/javascript/test/model/BucketKeyInfo.spec.js b/javascript/test/model/BucketKeyInfo.spec.js deleted file mode 100644 index e74dd70..0000000 --- a/javascript/test/model/BucketKeyInfo.spec.js +++ /dev/null @@ -1,83 +0,0 @@ -/** - * Garage Administration API v0+garage-v0.8.0 - * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - * - * The version of the OpenAPI document: v0.8.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.GarageAdministrationApiV0garageV080); - } -}(this, function(expect, GarageAdministrationApiV0garageV080) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new GarageAdministrationApiV0garageV080.BucketKeyInfo(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('BucketKeyInfo', function() { - it('should create an instance of BucketKeyInfo', function() { - // uncomment below and update the code to test BucketKeyInfo - //var instance = new GarageAdministrationApiV0garageV080.BucketKeyInfo(); - //expect(instance).to.be.a(GarageAdministrationApiV0garageV080.BucketKeyInfo); - }); - - it('should have the property accessKeyId (base name: "accessKeyId")', function() { - // uncomment below and update the code to test the property accessKeyId - //var instance = new GarageAdministrationApiV0garageV080.BucketKeyInfo(); - //expect(instance).to.be(); - }); - - it('should have the property name (base name: "name")', function() { - // uncomment below and update the code to test the property name - //var instance = new GarageAdministrationApiV0garageV080.BucketKeyInfo(); - //expect(instance).to.be(); - }); - - it('should have the property permissions (base name: "permissions")', function() { - // uncomment below and update the code to test the property permissions - //var instance = new GarageAdministrationApiV0garageV080.BucketKeyInfo(); - //expect(instance).to.be(); - }); - - it('should have the property bucketLocalAliases (base name: "bucketLocalAliases")', function() { - // uncomment below and update the code to test the property bucketLocalAliases - //var instance = new GarageAdministrationApiV0garageV080.BucketKeyInfo(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/javascript/test/model/ClusterLayout.spec.js b/javascript/test/model/ClusterLayout.spec.js deleted file mode 100644 index 5f45493..0000000 --- a/javascript/test/model/ClusterLayout.spec.js +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Garage Administration API v0+garage-v0.8.0 - * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - * - * The version of the OpenAPI document: v0.8.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.GarageAdministrationApiV0garageV080); - } -}(this, function(expect, GarageAdministrationApiV0garageV080) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new GarageAdministrationApiV0garageV080.ClusterLayout(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('ClusterLayout', function() { - it('should create an instance of ClusterLayout', function() { - // uncomment below and update the code to test ClusterLayout - //var instance = new GarageAdministrationApiV0garageV080.ClusterLayout(); - //expect(instance).to.be.a(GarageAdministrationApiV0garageV080.ClusterLayout); - }); - - it('should have the property version (base name: "version")', function() { - // uncomment below and update the code to test the property version - //var instance = new GarageAdministrationApiV0garageV080.ClusterLayout(); - //expect(instance).to.be(); - }); - - it('should have the property roles (base name: "roles")', function() { - // uncomment below and update the code to test the property roles - //var instance = new GarageAdministrationApiV0garageV080.ClusterLayout(); - //expect(instance).to.be(); - }); - - it('should have the property stagedRoleChanges (base name: "stagedRoleChanges")', function() { - // uncomment below and update the code to test the property stagedRoleChanges - //var instance = new GarageAdministrationApiV0garageV080.ClusterLayout(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/javascript/test/model/CreateBucketRequest.spec.js b/javascript/test/model/CreateBucketRequest.spec.js deleted file mode 100644 index e54bb18..0000000 --- a/javascript/test/model/CreateBucketRequest.spec.js +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Garage Administration API v0+garage-v0.8.0 - * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - * - * The version of the OpenAPI document: v0.8.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.GarageAdministrationApiV0garageV080); - } -}(this, function(expect, GarageAdministrationApiV0garageV080) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new GarageAdministrationApiV0garageV080.CreateBucketRequest(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('CreateBucketRequest', function() { - it('should create an instance of CreateBucketRequest', function() { - // uncomment below and update the code to test CreateBucketRequest - //var instance = new GarageAdministrationApiV0garageV080.CreateBucketRequest(); - //expect(instance).to.be.a(GarageAdministrationApiV0garageV080.CreateBucketRequest); - }); - - it('should have the property globalAlias (base name: "globalAlias")', function() { - // uncomment below and update the code to test the property globalAlias - //var instance = new GarageAdministrationApiV0garageV080.CreateBucketRequest(); - //expect(instance).to.be(); - }); - - it('should have the property localAlias (base name: "localAlias")', function() { - // uncomment below and update the code to test the property localAlias - //var instance = new GarageAdministrationApiV0garageV080.CreateBucketRequest(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/javascript/test/model/CreateBucketRequestLocalAlias.spec.js b/javascript/test/model/CreateBucketRequestLocalAlias.spec.js deleted file mode 100644 index df7d0db..0000000 --- a/javascript/test/model/CreateBucketRequestLocalAlias.spec.js +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Garage Administration API v0+garage-v0.8.0 - * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - * - * The version of the OpenAPI document: v0.8.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.GarageAdministrationApiV0garageV080); - } -}(this, function(expect, GarageAdministrationApiV0garageV080) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new GarageAdministrationApiV0garageV080.CreateBucketRequestLocalAlias(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('CreateBucketRequestLocalAlias', function() { - it('should create an instance of CreateBucketRequestLocalAlias', function() { - // uncomment below and update the code to test CreateBucketRequestLocalAlias - //var instance = new GarageAdministrationApiV0garageV080.CreateBucketRequestLocalAlias(); - //expect(instance).to.be.a(GarageAdministrationApiV0garageV080.CreateBucketRequestLocalAlias); - }); - - it('should have the property accessKeyId (base name: "accessKeyId")', function() { - // uncomment below and update the code to test the property accessKeyId - //var instance = new GarageAdministrationApiV0garageV080.CreateBucketRequestLocalAlias(); - //expect(instance).to.be(); - }); - - it('should have the property alias (base name: "alias")', function() { - // uncomment below and update the code to test the property alias - //var instance = new GarageAdministrationApiV0garageV080.CreateBucketRequestLocalAlias(); - //expect(instance).to.be(); - }); - - it('should have the property allow (base name: "allow")', function() { - // uncomment below and update the code to test the property allow - //var instance = new GarageAdministrationApiV0garageV080.CreateBucketRequestLocalAlias(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/javascript/test/model/CreateBucketRequestLocalAliasAllow.spec.js b/javascript/test/model/CreateBucketRequestLocalAliasAllow.spec.js deleted file mode 100644 index f9269c7..0000000 --- a/javascript/test/model/CreateBucketRequestLocalAliasAllow.spec.js +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Garage Administration API v0+garage-v0.8.0 - * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - * - * The version of the OpenAPI document: v0.8.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.GarageAdministrationApiV0garageV080); - } -}(this, function(expect, GarageAdministrationApiV0garageV080) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new GarageAdministrationApiV0garageV080.CreateBucketRequestLocalAliasAllow(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('CreateBucketRequestLocalAliasAllow', function() { - it('should create an instance of CreateBucketRequestLocalAliasAllow', function() { - // uncomment below and update the code to test CreateBucketRequestLocalAliasAllow - //var instance = new GarageAdministrationApiV0garageV080.CreateBucketRequestLocalAliasAllow(); - //expect(instance).to.be.a(GarageAdministrationApiV0garageV080.CreateBucketRequestLocalAliasAllow); - }); - - it('should have the property read (base name: "read")', function() { - // uncomment below and update the code to test the property read - //var instance = new GarageAdministrationApiV0garageV080.CreateBucketRequestLocalAliasAllow(); - //expect(instance).to.be(); - }); - - it('should have the property write (base name: "write")', function() { - // uncomment below and update the code to test the property write - //var instance = new GarageAdministrationApiV0garageV080.CreateBucketRequestLocalAliasAllow(); - //expect(instance).to.be(); - }); - - it('should have the property owner (base name: "owner")', function() { - // uncomment below and update the code to test the property owner - //var instance = new GarageAdministrationApiV0garageV080.CreateBucketRequestLocalAliasAllow(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/javascript/test/model/GetNodes200Response.spec.js b/javascript/test/model/GetNodes200Response.spec.js deleted file mode 100644 index 38012d6..0000000 --- a/javascript/test/model/GetNodes200Response.spec.js +++ /dev/null @@ -1,83 +0,0 @@ -/** - * Garage Administration API v0+garage-v0.8.0 - * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - * - * The version of the OpenAPI document: v0.8.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.GarageAdministrationApiV0garageV080); - } -}(this, function(expect, GarageAdministrationApiV0garageV080) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new GarageAdministrationApiV0garageV080.GetNodes200Response(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('GetNodes200Response', function() { - it('should create an instance of GetNodes200Response', function() { - // uncomment below and update the code to test GetNodes200Response - //var instance = new GarageAdministrationApiV0garageV080.GetNodes200Response(); - //expect(instance).to.be.a(GarageAdministrationApiV0garageV080.GetNodes200Response); - }); - - it('should have the property node (base name: "node")', function() { - // uncomment below and update the code to test the property node - //var instance = new GarageAdministrationApiV0garageV080.GetNodes200Response(); - //expect(instance).to.be(); - }); - - it('should have the property garageVersion (base name: "garageVersion")', function() { - // uncomment below and update the code to test the property garageVersion - //var instance = new GarageAdministrationApiV0garageV080.GetNodes200Response(); - //expect(instance).to.be(); - }); - - it('should have the property knownNodes (base name: "knownNodes")', function() { - // uncomment below and update the code to test the property knownNodes - //var instance = new GarageAdministrationApiV0garageV080.GetNodes200Response(); - //expect(instance).to.be(); - }); - - it('should have the property layout (base name: "layout")', function() { - // uncomment below and update the code to test the property layout - //var instance = new GarageAdministrationApiV0garageV080.GetNodes200Response(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/javascript/test/model/ImportKeyRequest.spec.js b/javascript/test/model/ImportKeyRequest.spec.js deleted file mode 100644 index e3ad68b..0000000 --- a/javascript/test/model/ImportKeyRequest.spec.js +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Garage Administration API v0+garage-v0.8.0 - * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - * - * The version of the OpenAPI document: v0.8.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.GarageAdministrationApiV0garageV080); - } -}(this, function(expect, GarageAdministrationApiV0garageV080) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new GarageAdministrationApiV0garageV080.ImportKeyRequest(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('ImportKeyRequest', function() { - it('should create an instance of ImportKeyRequest', function() { - // uncomment below and update the code to test ImportKeyRequest - //var instance = new GarageAdministrationApiV0garageV080.ImportKeyRequest(); - //expect(instance).to.be.a(GarageAdministrationApiV0garageV080.ImportKeyRequest); - }); - - it('should have the property name (base name: "name")', function() { - // uncomment below and update the code to test the property name - //var instance = new GarageAdministrationApiV0garageV080.ImportKeyRequest(); - //expect(instance).to.be(); - }); - - it('should have the property accessKeyId (base name: "accessKeyId")', function() { - // uncomment below and update the code to test the property accessKeyId - //var instance = new GarageAdministrationApiV0garageV080.ImportKeyRequest(); - //expect(instance).to.be(); - }); - - it('should have the property secretAccessKey (base name: "secretAccessKey")', function() { - // uncomment below and update the code to test the property secretAccessKey - //var instance = new GarageAdministrationApiV0garageV080.ImportKeyRequest(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/javascript/test/model/KeyInfo.spec.js b/javascript/test/model/KeyInfo.spec.js deleted file mode 100644 index 59a81c9..0000000 --- a/javascript/test/model/KeyInfo.spec.js +++ /dev/null @@ -1,89 +0,0 @@ -/** - * Garage Administration API v0+garage-v0.8.0 - * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - * - * The version of the OpenAPI document: v0.8.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.GarageAdministrationApiV0garageV080); - } -}(this, function(expect, GarageAdministrationApiV0garageV080) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new GarageAdministrationApiV0garageV080.KeyInfo(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('KeyInfo', function() { - it('should create an instance of KeyInfo', function() { - // uncomment below and update the code to test KeyInfo - //var instance = new GarageAdministrationApiV0garageV080.KeyInfo(); - //expect(instance).to.be.a(GarageAdministrationApiV0garageV080.KeyInfo); - }); - - it('should have the property name (base name: "name")', function() { - // uncomment below and update the code to test the property name - //var instance = new GarageAdministrationApiV0garageV080.KeyInfo(); - //expect(instance).to.be(); - }); - - it('should have the property accessKeyId (base name: "accessKeyId")', function() { - // uncomment below and update the code to test the property accessKeyId - //var instance = new GarageAdministrationApiV0garageV080.KeyInfo(); - //expect(instance).to.be(); - }); - - it('should have the property secretAccessKey (base name: "secretAccessKey")', function() { - // uncomment below and update the code to test the property secretAccessKey - //var instance = new GarageAdministrationApiV0garageV080.KeyInfo(); - //expect(instance).to.be(); - }); - - it('should have the property permissions (base name: "permissions")', function() { - // uncomment below and update the code to test the property permissions - //var instance = new GarageAdministrationApiV0garageV080.KeyInfo(); - //expect(instance).to.be(); - }); - - it('should have the property buckets (base name: "buckets")', function() { - // uncomment below and update the code to test the property buckets - //var instance = new GarageAdministrationApiV0garageV080.KeyInfo(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/javascript/test/model/KeyInfoBucketsInner.spec.js b/javascript/test/model/KeyInfoBucketsInner.spec.js deleted file mode 100644 index b7e6cc2..0000000 --- a/javascript/test/model/KeyInfoBucketsInner.spec.js +++ /dev/null @@ -1,83 +0,0 @@ -/** - * Garage Administration API v0+garage-v0.8.0 - * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - * - * The version of the OpenAPI document: v0.8.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.GarageAdministrationApiV0garageV080); - } -}(this, function(expect, GarageAdministrationApiV0garageV080) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new GarageAdministrationApiV0garageV080.KeyInfoBucketsInner(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('KeyInfoBucketsInner', function() { - it('should create an instance of KeyInfoBucketsInner', function() { - // uncomment below and update the code to test KeyInfoBucketsInner - //var instance = new GarageAdministrationApiV0garageV080.KeyInfoBucketsInner(); - //expect(instance).to.be.a(GarageAdministrationApiV0garageV080.KeyInfoBucketsInner); - }); - - it('should have the property id (base name: "id")', function() { - // uncomment below and update the code to test the property id - //var instance = new GarageAdministrationApiV0garageV080.KeyInfoBucketsInner(); - //expect(instance).to.be(); - }); - - it('should have the property globalAliases (base name: "globalAliases")', function() { - // uncomment below and update the code to test the property globalAliases - //var instance = new GarageAdministrationApiV0garageV080.KeyInfoBucketsInner(); - //expect(instance).to.be(); - }); - - it('should have the property localAliases (base name: "localAliases")', function() { - // uncomment below and update the code to test the property localAliases - //var instance = new GarageAdministrationApiV0garageV080.KeyInfoBucketsInner(); - //expect(instance).to.be(); - }); - - it('should have the property permissions (base name: "permissions")', function() { - // uncomment below and update the code to test the property permissions - //var instance = new GarageAdministrationApiV0garageV080.KeyInfoBucketsInner(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/javascript/test/model/KeyInfoBucketsInnerPermissions.spec.js b/javascript/test/model/KeyInfoBucketsInnerPermissions.spec.js deleted file mode 100644 index 4843547..0000000 --- a/javascript/test/model/KeyInfoBucketsInnerPermissions.spec.js +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Garage Administration API v0+garage-v0.8.0 - * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - * - * The version of the OpenAPI document: v0.8.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.GarageAdministrationApiV0garageV080); - } -}(this, function(expect, GarageAdministrationApiV0garageV080) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new GarageAdministrationApiV0garageV080.KeyInfoBucketsInnerPermissions(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('KeyInfoBucketsInnerPermissions', function() { - it('should create an instance of KeyInfoBucketsInnerPermissions', function() { - // uncomment below and update the code to test KeyInfoBucketsInnerPermissions - //var instance = new GarageAdministrationApiV0garageV080.KeyInfoBucketsInnerPermissions(); - //expect(instance).to.be.a(GarageAdministrationApiV0garageV080.KeyInfoBucketsInnerPermissions); - }); - - it('should have the property read (base name: "read")', function() { - // uncomment below and update the code to test the property read - //var instance = new GarageAdministrationApiV0garageV080.KeyInfoBucketsInnerPermissions(); - //expect(instance).to.be(); - }); - - it('should have the property write (base name: "write")', function() { - // uncomment below and update the code to test the property write - //var instance = new GarageAdministrationApiV0garageV080.KeyInfoBucketsInnerPermissions(); - //expect(instance).to.be(); - }); - - it('should have the property owner (base name: "owner")', function() { - // uncomment below and update the code to test the property owner - //var instance = new GarageAdministrationApiV0garageV080.KeyInfoBucketsInnerPermissions(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/javascript/test/model/KeyInfoPermissions.spec.js b/javascript/test/model/KeyInfoPermissions.spec.js deleted file mode 100644 index b2476cf..0000000 --- a/javascript/test/model/KeyInfoPermissions.spec.js +++ /dev/null @@ -1,65 +0,0 @@ -/** - * Garage Administration API v0+garage-v0.8.0 - * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - * - * The version of the OpenAPI document: v0.8.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.GarageAdministrationApiV0garageV080); - } -}(this, function(expect, GarageAdministrationApiV0garageV080) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new GarageAdministrationApiV0garageV080.KeyInfoPermissions(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('KeyInfoPermissions', function() { - it('should create an instance of KeyInfoPermissions', function() { - // uncomment below and update the code to test KeyInfoPermissions - //var instance = new GarageAdministrationApiV0garageV080.KeyInfoPermissions(); - //expect(instance).to.be.a(GarageAdministrationApiV0garageV080.KeyInfoPermissions); - }); - - it('should have the property createBucket (base name: "createBucket")', function() { - // uncomment below and update the code to test the property createBucket - //var instance = new GarageAdministrationApiV0garageV080.KeyInfoPermissions(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/javascript/test/model/LayoutVersion.spec.js b/javascript/test/model/LayoutVersion.spec.js deleted file mode 100644 index bf177f8..0000000 --- a/javascript/test/model/LayoutVersion.spec.js +++ /dev/null @@ -1,65 +0,0 @@ -/** - * Garage Administration API v0+garage-v0.8.0 - * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - * - * The version of the OpenAPI document: v0.8.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.GarageAdministrationApiV0garageV080); - } -}(this, function(expect, GarageAdministrationApiV0garageV080) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new GarageAdministrationApiV0garageV080.LayoutVersion(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('LayoutVersion', function() { - it('should create an instance of LayoutVersion', function() { - // uncomment below and update the code to test LayoutVersion - //var instance = new GarageAdministrationApiV0garageV080.LayoutVersion(); - //expect(instance).to.be.a(GarageAdministrationApiV0garageV080.LayoutVersion); - }); - - it('should have the property version (base name: "version")', function() { - // uncomment below and update the code to test the property version - //var instance = new GarageAdministrationApiV0garageV080.LayoutVersion(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/javascript/test/model/ListBuckets200ResponseInner.spec.js b/javascript/test/model/ListBuckets200ResponseInner.spec.js deleted file mode 100644 index b9f219c..0000000 --- a/javascript/test/model/ListBuckets200ResponseInner.spec.js +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Garage Administration API v0+garage-v0.8.0 - * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - * - * The version of the OpenAPI document: v0.8.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.GarageAdministrationApiV0garageV080); - } -}(this, function(expect, GarageAdministrationApiV0garageV080) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new GarageAdministrationApiV0garageV080.ListBuckets200ResponseInner(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('ListBuckets200ResponseInner', function() { - it('should create an instance of ListBuckets200ResponseInner', function() { - // uncomment below and update the code to test ListBuckets200ResponseInner - //var instance = new GarageAdministrationApiV0garageV080.ListBuckets200ResponseInner(); - //expect(instance).to.be.a(GarageAdministrationApiV0garageV080.ListBuckets200ResponseInner); - }); - - it('should have the property id (base name: "id")', function() { - // uncomment below and update the code to test the property id - //var instance = new GarageAdministrationApiV0garageV080.ListBuckets200ResponseInner(); - //expect(instance).to.be(); - }); - - it('should have the property globalAliases (base name: "globalAliases")', function() { - // uncomment below and update the code to test the property globalAliases - //var instance = new GarageAdministrationApiV0garageV080.ListBuckets200ResponseInner(); - //expect(instance).to.be(); - }); - - it('should have the property localAliases (base name: "localAliases")', function() { - // uncomment below and update the code to test the property localAliases - //var instance = new GarageAdministrationApiV0garageV080.ListBuckets200ResponseInner(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/javascript/test/model/ListBuckets200ResponseInnerLocalAliasesInner.spec.js b/javascript/test/model/ListBuckets200ResponseInnerLocalAliasesInner.spec.js deleted file mode 100644 index a5bf4d6..0000000 --- a/javascript/test/model/ListBuckets200ResponseInnerLocalAliasesInner.spec.js +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Garage Administration API v0+garage-v0.8.0 - * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - * - * The version of the OpenAPI document: v0.8.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.GarageAdministrationApiV0garageV080); - } -}(this, function(expect, GarageAdministrationApiV0garageV080) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new GarageAdministrationApiV0garageV080.ListBuckets200ResponseInnerLocalAliasesInner(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('ListBuckets200ResponseInnerLocalAliasesInner', function() { - it('should create an instance of ListBuckets200ResponseInnerLocalAliasesInner', function() { - // uncomment below and update the code to test ListBuckets200ResponseInnerLocalAliasesInner - //var instance = new GarageAdministrationApiV0garageV080.ListBuckets200ResponseInnerLocalAliasesInner(); - //expect(instance).to.be.a(GarageAdministrationApiV0garageV080.ListBuckets200ResponseInnerLocalAliasesInner); - }); - - it('should have the property alias (base name: "alias")', function() { - // uncomment below and update the code to test the property alias - //var instance = new GarageAdministrationApiV0garageV080.ListBuckets200ResponseInnerLocalAliasesInner(); - //expect(instance).to.be(); - }); - - it('should have the property accessKeyId (base name: "accessKeyId")', function() { - // uncomment below and update the code to test the property accessKeyId - //var instance = new GarageAdministrationApiV0garageV080.ListBuckets200ResponseInnerLocalAliasesInner(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/javascript/test/model/ListKeys200ResponseInner.spec.js b/javascript/test/model/ListKeys200ResponseInner.spec.js deleted file mode 100644 index 310fe18..0000000 --- a/javascript/test/model/ListKeys200ResponseInner.spec.js +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Garage Administration API v0+garage-v0.8.0 - * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - * - * The version of the OpenAPI document: v0.8.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.GarageAdministrationApiV0garageV080); - } -}(this, function(expect, GarageAdministrationApiV0garageV080) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new GarageAdministrationApiV0garageV080.ListKeys200ResponseInner(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('ListKeys200ResponseInner', function() { - it('should create an instance of ListKeys200ResponseInner', function() { - // uncomment below and update the code to test ListKeys200ResponseInner - //var instance = new GarageAdministrationApiV0garageV080.ListKeys200ResponseInner(); - //expect(instance).to.be.a(GarageAdministrationApiV0garageV080.ListKeys200ResponseInner); - }); - - it('should have the property id (base name: "id")', function() { - // uncomment below and update the code to test the property id - //var instance = new GarageAdministrationApiV0garageV080.ListKeys200ResponseInner(); - //expect(instance).to.be(); - }); - - it('should have the property name (base name: "name")', function() { - // uncomment below and update the code to test the property name - //var instance = new GarageAdministrationApiV0garageV080.ListKeys200ResponseInner(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/javascript/test/model/NodeClusterInfo.spec.js b/javascript/test/model/NodeClusterInfo.spec.js deleted file mode 100644 index ad1c7ae..0000000 --- a/javascript/test/model/NodeClusterInfo.spec.js +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Garage Administration API v0+garage-v0.8.0 - * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - * - * The version of the OpenAPI document: v0.8.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.GarageAdministrationApiV0garageV080); - } -}(this, function(expect, GarageAdministrationApiV0garageV080) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new GarageAdministrationApiV0garageV080.NodeClusterInfo(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('NodeClusterInfo', function() { - it('should create an instance of NodeClusterInfo', function() { - // uncomment below and update the code to test NodeClusterInfo - //var instance = new GarageAdministrationApiV0garageV080.NodeClusterInfo(); - //expect(instance).to.be.a(GarageAdministrationApiV0garageV080.NodeClusterInfo); - }); - - it('should have the property zone (base name: "zone")', function() { - // uncomment below and update the code to test the property zone - //var instance = new GarageAdministrationApiV0garageV080.NodeClusterInfo(); - //expect(instance).to.be(); - }); - - it('should have the property capacity (base name: "capacity")', function() { - // uncomment below and update the code to test the property capacity - //var instance = new GarageAdministrationApiV0garageV080.NodeClusterInfo(); - //expect(instance).to.be(); - }); - - it('should have the property tags (base name: "tags")', function() { - // uncomment below and update the code to test the property tags - //var instance = new GarageAdministrationApiV0garageV080.NodeClusterInfo(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/javascript/test/model/NodeNetworkInfo.spec.js b/javascript/test/model/NodeNetworkInfo.spec.js deleted file mode 100644 index d3d095c..0000000 --- a/javascript/test/model/NodeNetworkInfo.spec.js +++ /dev/null @@ -1,83 +0,0 @@ -/** - * Garage Administration API v0+garage-v0.8.0 - * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - * - * The version of the OpenAPI document: v0.8.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.GarageAdministrationApiV0garageV080); - } -}(this, function(expect, GarageAdministrationApiV0garageV080) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new GarageAdministrationApiV0garageV080.NodeNetworkInfo(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('NodeNetworkInfo', function() { - it('should create an instance of NodeNetworkInfo', function() { - // uncomment below and update the code to test NodeNetworkInfo - //var instance = new GarageAdministrationApiV0garageV080.NodeNetworkInfo(); - //expect(instance).to.be.a(GarageAdministrationApiV0garageV080.NodeNetworkInfo); - }); - - it('should have the property addr (base name: "addr")', function() { - // uncomment below and update the code to test the property addr - //var instance = new GarageAdministrationApiV0garageV080.NodeNetworkInfo(); - //expect(instance).to.be(); - }); - - it('should have the property isUp (base name: "is_up")', function() { - // uncomment below and update the code to test the property isUp - //var instance = new GarageAdministrationApiV0garageV080.NodeNetworkInfo(); - //expect(instance).to.be(); - }); - - it('should have the property lastSeenSecsAgo (base name: "last_seen_secs_ago")', function() { - // uncomment below and update the code to test the property lastSeenSecsAgo - //var instance = new GarageAdministrationApiV0garageV080.NodeNetworkInfo(); - //expect(instance).to.be(); - }); - - it('should have the property hostname (base name: "hostname")', function() { - // uncomment below and update the code to test the property hostname - //var instance = new GarageAdministrationApiV0garageV080.NodeNetworkInfo(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/javascript/test/model/UpdateBucketRequest.spec.js b/javascript/test/model/UpdateBucketRequest.spec.js deleted file mode 100644 index 8c1d035..0000000 --- a/javascript/test/model/UpdateBucketRequest.spec.js +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Garage Administration API v0+garage-v0.8.0 - * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - * - * The version of the OpenAPI document: v0.8.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.GarageAdministrationApiV0garageV080); - } -}(this, function(expect, GarageAdministrationApiV0garageV080) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new GarageAdministrationApiV0garageV080.UpdateBucketRequest(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('UpdateBucketRequest', function() { - it('should create an instance of UpdateBucketRequest', function() { - // uncomment below and update the code to test UpdateBucketRequest - //var instance = new GarageAdministrationApiV0garageV080.UpdateBucketRequest(); - //expect(instance).to.be.a(GarageAdministrationApiV0garageV080.UpdateBucketRequest); - }); - - it('should have the property websiteAccess (base name: "websiteAccess")', function() { - // uncomment below and update the code to test the property websiteAccess - //var instance = new GarageAdministrationApiV0garageV080.UpdateBucketRequest(); - //expect(instance).to.be(); - }); - - it('should have the property quotas (base name: "quotas")', function() { - // uncomment below and update the code to test the property quotas - //var instance = new GarageAdministrationApiV0garageV080.UpdateBucketRequest(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/javascript/test/model/UpdateBucketRequestQuotas.spec.js b/javascript/test/model/UpdateBucketRequestQuotas.spec.js deleted file mode 100644 index 711ef1f..0000000 --- a/javascript/test/model/UpdateBucketRequestQuotas.spec.js +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Garage Administration API v0+garage-v0.8.0 - * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - * - * The version of the OpenAPI document: v0.8.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.GarageAdministrationApiV0garageV080); - } -}(this, function(expect, GarageAdministrationApiV0garageV080) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new GarageAdministrationApiV0garageV080.UpdateBucketRequestQuotas(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('UpdateBucketRequestQuotas', function() { - it('should create an instance of UpdateBucketRequestQuotas', function() { - // uncomment below and update the code to test UpdateBucketRequestQuotas - //var instance = new GarageAdministrationApiV0garageV080.UpdateBucketRequestQuotas(); - //expect(instance).to.be.a(GarageAdministrationApiV0garageV080.UpdateBucketRequestQuotas); - }); - - it('should have the property maxSize (base name: "maxSize")', function() { - // uncomment below and update the code to test the property maxSize - //var instance = new GarageAdministrationApiV0garageV080.UpdateBucketRequestQuotas(); - //expect(instance).to.be(); - }); - - it('should have the property maxObjects (base name: "maxObjects")', function() { - // uncomment below and update the code to test the property maxObjects - //var instance = new GarageAdministrationApiV0garageV080.UpdateBucketRequestQuotas(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/javascript/test/model/UpdateBucketRequestWebsiteAccess.spec.js b/javascript/test/model/UpdateBucketRequestWebsiteAccess.spec.js deleted file mode 100644 index 6efba60..0000000 --- a/javascript/test/model/UpdateBucketRequestWebsiteAccess.spec.js +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Garage Administration API v0+garage-v0.8.0 - * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - * - * The version of the OpenAPI document: v0.8.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.GarageAdministrationApiV0garageV080); - } -}(this, function(expect, GarageAdministrationApiV0garageV080) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new GarageAdministrationApiV0garageV080.UpdateBucketRequestWebsiteAccess(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('UpdateBucketRequestWebsiteAccess', function() { - it('should create an instance of UpdateBucketRequestWebsiteAccess', function() { - // uncomment below and update the code to test UpdateBucketRequestWebsiteAccess - //var instance = new GarageAdministrationApiV0garageV080.UpdateBucketRequestWebsiteAccess(); - //expect(instance).to.be.a(GarageAdministrationApiV0garageV080.UpdateBucketRequestWebsiteAccess); - }); - - it('should have the property enabled (base name: "enabled")', function() { - // uncomment below and update the code to test the property enabled - //var instance = new GarageAdministrationApiV0garageV080.UpdateBucketRequestWebsiteAccess(); - //expect(instance).to.be(); - }); - - it('should have the property indexDocument (base name: "indexDocument")', function() { - // uncomment below and update the code to test the property indexDocument - //var instance = new GarageAdministrationApiV0garageV080.UpdateBucketRequestWebsiteAccess(); - //expect(instance).to.be(); - }); - - it('should have the property errorDocument (base name: "errorDocument")', function() { - // uncomment below and update the code to test the property errorDocument - //var instance = new GarageAdministrationApiV0garageV080.UpdateBucketRequestWebsiteAccess(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/javascript/test/model/UpdateKeyRequest.spec.js b/javascript/test/model/UpdateKeyRequest.spec.js deleted file mode 100644 index a9ee6f2..0000000 --- a/javascript/test/model/UpdateKeyRequest.spec.js +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Garage Administration API v0+garage-v0.8.0 - * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - * - * The version of the OpenAPI document: v0.8.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.GarageAdministrationApiV0garageV080); - } -}(this, function(expect, GarageAdministrationApiV0garageV080) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new GarageAdministrationApiV0garageV080.UpdateKeyRequest(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('UpdateKeyRequest', function() { - it('should create an instance of UpdateKeyRequest', function() { - // uncomment below and update the code to test UpdateKeyRequest - //var instance = new GarageAdministrationApiV0garageV080.UpdateKeyRequest(); - //expect(instance).to.be.a(GarageAdministrationApiV0garageV080.UpdateKeyRequest); - }); - - it('should have the property name (base name: "name")', function() { - // uncomment below and update the code to test the property name - //var instance = new GarageAdministrationApiV0garageV080.UpdateKeyRequest(); - //expect(instance).to.be(); - }); - - it('should have the property allow (base name: "allow")', function() { - // uncomment below and update the code to test the property allow - //var instance = new GarageAdministrationApiV0garageV080.UpdateKeyRequest(); - //expect(instance).to.be(); - }); - - it('should have the property deny (base name: "deny")', function() { - // uncomment below and update the code to test the property deny - //var instance = new GarageAdministrationApiV0garageV080.UpdateKeyRequest(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/javascript/test/model/UpdateKeyRequestAllow.spec.js b/javascript/test/model/UpdateKeyRequestAllow.spec.js deleted file mode 100644 index 0ec156a..0000000 --- a/javascript/test/model/UpdateKeyRequestAllow.spec.js +++ /dev/null @@ -1,65 +0,0 @@ -/** - * Garage Administration API v0+garage-v0.8.0 - * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - * - * The version of the OpenAPI document: v0.8.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.GarageAdministrationApiV0garageV080); - } -}(this, function(expect, GarageAdministrationApiV0garageV080) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new GarageAdministrationApiV0garageV080.UpdateKeyRequestAllow(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('UpdateKeyRequestAllow', function() { - it('should create an instance of UpdateKeyRequestAllow', function() { - // uncomment below and update the code to test UpdateKeyRequestAllow - //var instance = new GarageAdministrationApiV0garageV080.UpdateKeyRequestAllow(); - //expect(instance).to.be.a(GarageAdministrationApiV0garageV080.UpdateKeyRequestAllow); - }); - - it('should have the property createBucket (base name: "createBucket")', function() { - // uncomment below and update the code to test the property createBucket - //var instance = new GarageAdministrationApiV0garageV080.UpdateKeyRequestAllow(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/javascript/test/model/UpdateKeyRequestDeny.spec.js b/javascript/test/model/UpdateKeyRequestDeny.spec.js deleted file mode 100644 index baf3192..0000000 --- a/javascript/test/model/UpdateKeyRequestDeny.spec.js +++ /dev/null @@ -1,65 +0,0 @@ -/** - * Garage Administration API v0+garage-v0.8.0 - * Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - * - * The version of the OpenAPI document: v0.8.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.GarageAdministrationApiV0garageV080); - } -}(this, function(expect, GarageAdministrationApiV0garageV080) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new GarageAdministrationApiV0garageV080.UpdateKeyRequestDeny(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('UpdateKeyRequestDeny', function() { - it('should create an instance of UpdateKeyRequestDeny', function() { - // uncomment below and update the code to test UpdateKeyRequestDeny - //var instance = new GarageAdministrationApiV0garageV080.UpdateKeyRequestDeny(); - //expect(instance).to.be.a(GarageAdministrationApiV0garageV080.UpdateKeyRequestDeny); - }); - - it('should have the property createBucket (base name: "createBucket")', function() { - // uncomment below and update the code to test the property createBucket - //var instance = new GarageAdministrationApiV0garageV080.UpdateKeyRequestDeny(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/python/.gitignore b/python/.gitignore deleted file mode 100644 index 43995bd..0000000 --- a/python/.gitignore +++ /dev/null @@ -1,66 +0,0 @@ -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] -*$py.class - -# C extensions -*.so - -# Distribution / packaging -.Python -env/ -build/ -develop-eggs/ -dist/ -downloads/ -eggs/ -.eggs/ -lib/ -lib64/ -parts/ -sdist/ -var/ -*.egg-info/ -.installed.cfg -*.egg - -# PyInstaller -# Usually these files are written by a python script from a template -# before PyInstaller builds the exe, so as to inject date/other infos into it. -*.manifest -*.spec - -# Installer logs -pip-log.txt -pip-delete-this-directory.txt - -# Unit test / coverage reports -htmlcov/ -.tox/ -.coverage -.coverage.* -.cache -nosetests.xml -coverage.xml -*,cover -.hypothesis/ -venv/ -.venv/ -.python-version -.pytest_cache - -# Translations -*.mo -*.pot - -# Django stuff: -*.log - -# Sphinx documentation -docs/_build/ - -# PyBuilder -target/ - -#Ipython Notebook -.ipynb_checkpoints diff --git a/python/.gitlab-ci.yml b/python/.gitlab-ci.yml deleted file mode 100644 index 99c5a5e..0000000 --- a/python/.gitlab-ci.yml +++ /dev/null @@ -1,24 +0,0 @@ -# ref: https://docs.gitlab.com/ee/ci/README.html - -stages: - - test - -.tests: - stage: test - script: - - pip install -r requirements.txt - - pip install -r test-requirements.txt - - pytest --cov=garage_admin_sdk - -test-3.6: - extends: .tests - image: python:3.6-alpine -test-3.7: - extends: .tests - image: python:3.7-alpine -test-3.8: - extends: .tests - image: python:3.8-alpine -test-3.9: - extends: .tests - image: python:3.9-alpine diff --git a/python/.openapi-generator-ignore b/python/.openapi-generator-ignore deleted file mode 100644 index 7484ee5..0000000 --- a/python/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/python/.openapi-generator/FILES b/python/.openapi-generator/FILES deleted file mode 100644 index 9e3aee7..0000000 --- a/python/.openapi-generator/FILES +++ /dev/null @@ -1,89 +0,0 @@ -.gitignore -.gitlab-ci.yml -.travis.yml -README.md -docs/AddKeyRequest.md -docs/AddNode200ResponseInner.md -docs/AllowBucketKeyRequest.md -docs/AllowBucketKeyRequestPermissions.md -docs/BucketApi.md -docs/BucketInfo.md -docs/BucketInfoQuotas.md -docs/BucketInfoWebsiteConfig.md -docs/BucketKeyInfo.md -docs/ClusterLayout.md -docs/CreateBucketRequest.md -docs/CreateBucketRequestLocalAlias.md -docs/CreateBucketRequestLocalAliasAllow.md -docs/GetNodes200Response.md -docs/ImportKeyRequest.md -docs/KeyApi.md -docs/KeyInfo.md -docs/KeyInfoBucketsInner.md -docs/KeyInfoBucketsInnerPermissions.md -docs/KeyInfoPermissions.md -docs/LayoutApi.md -docs/LayoutVersion.md -docs/ListBuckets200ResponseInner.md -docs/ListBuckets200ResponseInnerLocalAliasesInner.md -docs/ListKeys200ResponseInner.md -docs/NodeClusterInfo.md -docs/NodeNetworkInfo.md -docs/NodesApi.md -docs/UpdateBucketRequest.md -docs/UpdateBucketRequestQuotas.md -docs/UpdateBucketRequestWebsiteAccess.md -docs/UpdateKeyRequest.md -docs/UpdateKeyRequestAllow.md -docs/UpdateKeyRequestDeny.md -garage_admin_sdk/__init__.py -garage_admin_sdk/api/__init__.py -garage_admin_sdk/api/bucket_api.py -garage_admin_sdk/api/key_api.py -garage_admin_sdk/api/layout_api.py -garage_admin_sdk/api/nodes_api.py -garage_admin_sdk/api_client.py -garage_admin_sdk/apis/__init__.py -garage_admin_sdk/configuration.py -garage_admin_sdk/exceptions.py -garage_admin_sdk/model/__init__.py -garage_admin_sdk/model/add_key_request.py -garage_admin_sdk/model/add_node200_response_inner.py -garage_admin_sdk/model/allow_bucket_key_request.py -garage_admin_sdk/model/allow_bucket_key_request_permissions.py -garage_admin_sdk/model/bucket_info.py -garage_admin_sdk/model/bucket_info_quotas.py -garage_admin_sdk/model/bucket_info_website_config.py -garage_admin_sdk/model/bucket_key_info.py -garage_admin_sdk/model/cluster_layout.py -garage_admin_sdk/model/create_bucket_request.py -garage_admin_sdk/model/create_bucket_request_local_alias.py -garage_admin_sdk/model/create_bucket_request_local_alias_allow.py -garage_admin_sdk/model/get_nodes200_response.py -garage_admin_sdk/model/import_key_request.py -garage_admin_sdk/model/key_info.py -garage_admin_sdk/model/key_info_buckets_inner.py -garage_admin_sdk/model/key_info_buckets_inner_permissions.py -garage_admin_sdk/model/key_info_permissions.py -garage_admin_sdk/model/layout_version.py -garage_admin_sdk/model/list_buckets200_response_inner.py -garage_admin_sdk/model/list_buckets200_response_inner_local_aliases_inner.py -garage_admin_sdk/model/list_keys200_response_inner.py -garage_admin_sdk/model/node_cluster_info.py -garage_admin_sdk/model/node_network_info.py -garage_admin_sdk/model/update_bucket_request.py -garage_admin_sdk/model/update_bucket_request_quotas.py -garage_admin_sdk/model/update_bucket_request_website_access.py -garage_admin_sdk/model/update_key_request.py -garage_admin_sdk/model/update_key_request_allow.py -garage_admin_sdk/model/update_key_request_deny.py -garage_admin_sdk/model_utils.py -garage_admin_sdk/models/__init__.py -garage_admin_sdk/rest.py -git_push.sh -requirements.txt -setup.cfg -setup.py -test-requirements.txt -test/__init__.py -tox.ini diff --git a/python/.openapi-generator/VERSION b/python/.openapi-generator/VERSION deleted file mode 100644 index 358e78e..0000000 --- a/python/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.1.0 \ No newline at end of file diff --git a/python/.travis.yml b/python/.travis.yml deleted file mode 100644 index 28b34a6..0000000 --- a/python/.travis.yml +++ /dev/null @@ -1,13 +0,0 @@ -# ref: https://docs.travis-ci.com/user/languages/python -language: python -python: - - "3.6" - - "3.7" - - "3.8" - - "3.9" -# command to install dependencies -install: - - "pip install -r requirements.txt" - - "pip install -r test-requirements.txt" -# command to run tests -script: pytest --cov=garage_admin_sdk diff --git a/python/README.md b/python/README.md deleted file mode 100644 index 5179cfb..0000000 --- a/python/README.md +++ /dev/null @@ -1,198 +0,0 @@ -# garage-admin-sdk -Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. - -*Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* - - -This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - -- API version: v0.8.0 -- Package version: 0.8.0 -- Build package: org.openapitools.codegen.languages.PythonClientCodegen - -## Requirements. - -Python >=3.6 - -## Installation & Usage -### pip install - -If the python package is hosted on a repository, you can install directly using: - -```sh -pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git -``` -(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`) - -Then import the package: -```python -import garage_admin_sdk -``` - -### Setuptools - -Install via [Setuptools](http://pypi.python.org/pypi/setuptools). - -```sh -python setup.py install --user -``` -(or `sudo python setup.py install` to install the package for all users) - -Then import the package: -```python -import garage_admin_sdk -``` - -## Getting Started - -Please follow the [installation procedure](#installation--usage) and then run the following: - -```python - -import time -import garage_admin_sdk -from pprint import pprint -from garage_admin_sdk.api import bucket_api -from garage_admin_sdk.model.allow_bucket_key_request import AllowBucketKeyRequest -from garage_admin_sdk.model.bucket_info import BucketInfo -from garage_admin_sdk.model.create_bucket_request import CreateBucketRequest -from garage_admin_sdk.model.list_buckets200_response_inner import ListBuckets200ResponseInner -from garage_admin_sdk.model.update_bucket_request import UpdateBucketRequest -# Defining the host is optional and defaults to http://localhost:3903/v0 -# See configuration.py for a list of all supported configuration parameters. -configuration = garage_admin_sdk.Configuration( - host = "http://localhost:3903/v0" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: bearerAuth -configuration = garage_admin_sdk.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) - - -# Enter a context with an instance of the API client -with garage_admin_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = bucket_api.BucketApi(api_client) - allow_bucket_key_request = AllowBucketKeyRequest( - bucket_id="e6a14cd6a27f48684579ec6b381c078ab11697e6bc8513b72b2f5307e25fff9b", - access_key_id="GK31c2f218a2e44f485b94239e", - permissions=AllowBucketKeyRequestPermissions( - read=True, - write=True, - owner=True, - ), - ) # AllowBucketKeyRequest | Aliases to put on the new bucket - - try: - # Allow key - api_response = api_instance.allow_bucket_key(allow_bucket_key_request) - pprint(api_response) - except garage_admin_sdk.ApiException as e: - print("Exception when calling BucketApi->allow_bucket_key: %s\n" % e) -``` - -## Documentation for API Endpoints - -All URIs are relative to *http://localhost:3903/v0* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*BucketApi* | [**allow_bucket_key**](docs/BucketApi.md#allow_bucket_key) | **POST** /bucket/allow | Allow key -*BucketApi* | [**create_bucket**](docs/BucketApi.md#create_bucket) | **POST** /bucket | Create a bucket -*BucketApi* | [**delete_bucket**](docs/BucketApi.md#delete_bucket) | **DELETE** /bucket?id={bucket_id} | Delete a bucket -*BucketApi* | [**delete_bucket_global_alias**](docs/BucketApi.md#delete_bucket_global_alias) | **DELETE** /bucket/alias/global | Delete a global alias -*BucketApi* | [**delete_bucket_local_alias**](docs/BucketApi.md#delete_bucket_local_alias) | **DELETE** /bucket/alias/local | Delete a local alias -*BucketApi* | [**deny_bucket_key**](docs/BucketApi.md#deny_bucket_key) | **POST** /bucket/deny | Deny key -*BucketApi* | [**find_bucket_info**](docs/BucketApi.md#find_bucket_info) | **GET** /bucket?globalAlias={alias} | Find a bucket -*BucketApi* | [**get_bucket_info**](docs/BucketApi.md#get_bucket_info) | **GET** /bucket?id={bucket_id} | Get a bucket -*BucketApi* | [**list_buckets**](docs/BucketApi.md#list_buckets) | **GET** /bucket | List all buckets -*BucketApi* | [**put_bucket_global_alias**](docs/BucketApi.md#put_bucket_global_alias) | **PUT** /bucket/alias/global | Add a global alias -*BucketApi* | [**put_bucket_local_alias**](docs/BucketApi.md#put_bucket_local_alias) | **PUT** /bucket/alias/local | Add a local alias -*BucketApi* | [**update_bucket**](docs/BucketApi.md#update_bucket) | **PUT** /bucket?id={bucket_id} | Update a bucket -*KeyApi* | [**add_key**](docs/KeyApi.md#add_key) | **POST** /key | Create a new API key -*KeyApi* | [**delete_key**](docs/KeyApi.md#delete_key) | **DELETE** /key?id={access_key} | Delete a key -*KeyApi* | [**get_key**](docs/KeyApi.md#get_key) | **GET** /key?id={access_key} | Get key information -*KeyApi* | [**import_key**](docs/KeyApi.md#import_key) | **POST** /key/import | Import an existing key -*KeyApi* | [**list_keys**](docs/KeyApi.md#list_keys) | **GET** /key | List all keys -*KeyApi* | [**search_key**](docs/KeyApi.md#search_key) | **GET** /key?search={pattern} | Select key by pattern -*KeyApi* | [**update_key**](docs/KeyApi.md#update_key) | **POST** /key?id={access_key} | Update a key -*LayoutApi* | [**add_layout**](docs/LayoutApi.md#add_layout) | **POST** /layout | Send modifications to the cluster layout -*LayoutApi* | [**apply_layout**](docs/LayoutApi.md#apply_layout) | **POST** /layout/apply | Apply staged layout -*LayoutApi* | [**get_layout**](docs/LayoutApi.md#get_layout) | **GET** /layout | Details on the current and staged layout -*LayoutApi* | [**revert_layout**](docs/LayoutApi.md#revert_layout) | **POST** /layout/revert | Clear staged layout -*NodesApi* | [**add_node**](docs/NodesApi.md#add_node) | **POST** /connect | Connect target node to other Garage nodes -*NodesApi* | [**get_nodes**](docs/NodesApi.md#get_nodes) | **GET** /status | Status of this node and other nodes in the cluster - - -## Documentation For Models - - - [AddKeyRequest](docs/AddKeyRequest.md) - - [AddNode200ResponseInner](docs/AddNode200ResponseInner.md) - - [AllowBucketKeyRequest](docs/AllowBucketKeyRequest.md) - - [AllowBucketKeyRequestPermissions](docs/AllowBucketKeyRequestPermissions.md) - - [BucketInfo](docs/BucketInfo.md) - - [BucketInfoQuotas](docs/BucketInfoQuotas.md) - - [BucketInfoWebsiteConfig](docs/BucketInfoWebsiteConfig.md) - - [BucketKeyInfo](docs/BucketKeyInfo.md) - - [ClusterLayout](docs/ClusterLayout.md) - - [CreateBucketRequest](docs/CreateBucketRequest.md) - - [CreateBucketRequestLocalAlias](docs/CreateBucketRequestLocalAlias.md) - - [CreateBucketRequestLocalAliasAllow](docs/CreateBucketRequestLocalAliasAllow.md) - - [GetNodes200Response](docs/GetNodes200Response.md) - - [ImportKeyRequest](docs/ImportKeyRequest.md) - - [KeyInfo](docs/KeyInfo.md) - - [KeyInfoBucketsInner](docs/KeyInfoBucketsInner.md) - - [KeyInfoBucketsInnerPermissions](docs/KeyInfoBucketsInnerPermissions.md) - - [KeyInfoPermissions](docs/KeyInfoPermissions.md) - - [LayoutVersion](docs/LayoutVersion.md) - - [ListBuckets200ResponseInner](docs/ListBuckets200ResponseInner.md) - - [ListBuckets200ResponseInnerLocalAliasesInner](docs/ListBuckets200ResponseInnerLocalAliasesInner.md) - - [ListKeys200ResponseInner](docs/ListKeys200ResponseInner.md) - - [NodeClusterInfo](docs/NodeClusterInfo.md) - - [NodeNetworkInfo](docs/NodeNetworkInfo.md) - - [UpdateBucketRequest](docs/UpdateBucketRequest.md) - - [UpdateBucketRequestQuotas](docs/UpdateBucketRequestQuotas.md) - - [UpdateBucketRequestWebsiteAccess](docs/UpdateBucketRequestWebsiteAccess.md) - - [UpdateKeyRequest](docs/UpdateKeyRequest.md) - - [UpdateKeyRequestAllow](docs/UpdateKeyRequestAllow.md) - - [UpdateKeyRequestDeny](docs/UpdateKeyRequestDeny.md) - - -## Documentation For Authorization - - -## bearerAuth - -- **Type**: Bearer authentication - - -## Author - - - - -## Notes for Large OpenAPI documents -If the OpenAPI document is large, imports in garage_admin_sdk.apis and garage_admin_sdk.models may fail with a -RecursionError indicating the maximum recursion limit has been exceeded. In that case, there are a couple of solutions: - -Solution 1: -Use specific imports for apis and models like: -- `from garage_admin_sdk.api.default_api import DefaultApi` -- `from garage_admin_sdk.model.pet import Pet` - -Solution 2: -Before importing the package, adjust the maximum recursion limit as shown below: -``` -import sys -sys.setrecursionlimit(1500) -import garage_admin_sdk -from garage_admin_sdk.apis import * -from garage_admin_sdk.models import * -``` - diff --git a/python/docs/AddKeyRequest.md b/python/docs/AddKeyRequest.md deleted file mode 100644 index b69f01e..0000000 --- a/python/docs/AddKeyRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# AddKeyRequest - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/AddNode200ResponseInner.md b/python/docs/AddNode200ResponseInner.md deleted file mode 100644 index f6d02eb..0000000 --- a/python/docs/AddNode200ResponseInner.md +++ /dev/null @@ -1,13 +0,0 @@ -# AddNode200ResponseInner - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**success** | **bool** | | [optional] -**error** | **str, none_type** | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/AllowBucketKeyRequest.md b/python/docs/AllowBucketKeyRequest.md deleted file mode 100644 index 41ca64f..0000000 --- a/python/docs/AllowBucketKeyRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# AllowBucketKeyRequest - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bucket_id** | **str** | | -**access_key_id** | **str** | | -**permissions** | [**AllowBucketKeyRequestPermissions**](AllowBucketKeyRequestPermissions.md) | | -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/AllowBucketKeyRequestPermissions.md b/python/docs/AllowBucketKeyRequestPermissions.md deleted file mode 100644 index 369730f..0000000 --- a/python/docs/AllowBucketKeyRequestPermissions.md +++ /dev/null @@ -1,14 +0,0 @@ -# AllowBucketKeyRequestPermissions - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**read** | **bool** | | -**write** | **bool** | | -**owner** | **bool** | | -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/BucketApi.md b/python/docs/BucketApi.md deleted file mode 100644 index 11203aa..0000000 --- a/python/docs/BucketApi.md +++ /dev/null @@ -1,1024 +0,0 @@ -# garage_admin_sdk.BucketApi - -All URIs are relative to *http://localhost:3903/v0* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**allow_bucket_key**](BucketApi.md#allow_bucket_key) | **POST** /bucket/allow | Allow key -[**create_bucket**](BucketApi.md#create_bucket) | **POST** /bucket | Create a bucket -[**delete_bucket**](BucketApi.md#delete_bucket) | **DELETE** /bucket?id={bucket_id} | Delete a bucket -[**delete_bucket_global_alias**](BucketApi.md#delete_bucket_global_alias) | **DELETE** /bucket/alias/global | Delete a global alias -[**delete_bucket_local_alias**](BucketApi.md#delete_bucket_local_alias) | **DELETE** /bucket/alias/local | Delete a local alias -[**deny_bucket_key**](BucketApi.md#deny_bucket_key) | **POST** /bucket/deny | Deny key -[**find_bucket_info**](BucketApi.md#find_bucket_info) | **GET** /bucket?globalAlias={alias} | Find a bucket -[**get_bucket_info**](BucketApi.md#get_bucket_info) | **GET** /bucket?id={bucket_id} | Get a bucket -[**list_buckets**](BucketApi.md#list_buckets) | **GET** /bucket | List all buckets -[**put_bucket_global_alias**](BucketApi.md#put_bucket_global_alias) | **PUT** /bucket/alias/global | Add a global alias -[**put_bucket_local_alias**](BucketApi.md#put_bucket_local_alias) | **PUT** /bucket/alias/local | Add a local alias -[**update_bucket**](BucketApi.md#update_bucket) | **PUT** /bucket?id={bucket_id} | Update a bucket - - -# **allow_bucket_key** -> BucketInfo allow_bucket_key(allow_bucket_key_request) - -Allow key - -⚠️ **DISCLAIMER**: Garage's developers are aware that this endpoint has an unconventional semantic. Be extra careful when implementing it, its behavior is not obvious. Allows a key to do read/write/owner operations on a bucket. Flags in permissions which have the value true will be activated. Other flags will remain unchanged (ie. they will keep their internal value). For example, if you set read to true, the key will be allowed to read the bucket. If you set it to false, the key will keeps its previous read permission. If you want to disallow read for the key, check the DenyBucketKey operation. - -### Example - -* Bearer Authentication (bearerAuth): - -```python -import time -import garage_admin_sdk -from garage_admin_sdk.api import bucket_api -from garage_admin_sdk.model.bucket_info import BucketInfo -from garage_admin_sdk.model.allow_bucket_key_request import AllowBucketKeyRequest -from pprint import pprint -# Defining the host is optional and defaults to http://localhost:3903/v0 -# See configuration.py for a list of all supported configuration parameters. -configuration = garage_admin_sdk.Configuration( - host = "http://localhost:3903/v0" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: bearerAuth -configuration = garage_admin_sdk.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) - -# Enter a context with an instance of the API client -with garage_admin_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = bucket_api.BucketApi(api_client) - allow_bucket_key_request = AllowBucketKeyRequest( - bucket_id="e6a14cd6a27f48684579ec6b381c078ab11697e6bc8513b72b2f5307e25fff9b", - access_key_id="GK31c2f218a2e44f485b94239e", - permissions=AllowBucketKeyRequestPermissions( - read=True, - write=True, - owner=True, - ), - ) # AllowBucketKeyRequest | Aliases to put on the new bucket - - # example passing only required values which don't have defaults set - try: - # Allow key - api_response = api_instance.allow_bucket_key(allow_bucket_key_request) - pprint(api_response) - except garage_admin_sdk.ApiException as e: - print("Exception when calling BucketApi->allow_bucket_key: %s\n" % e) -``` - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **allow_bucket_key_request** | [**AllowBucketKeyRequest**](AllowBucketKeyRequest.md)| Aliases to put on the new bucket | - -### Return type - -[**BucketInfo**](BucketInfo.md) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**500** | The server can not handle your request. Check your connectivity with the rest of the cluster. | - | -**400** | Bad request, check your request body | - | -**404** | Bucket not found | - | -**200** | Returns exhaustive information about the bucket | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **create_bucket** -> BucketInfo create_bucket(create_bucket_request) - -Create a bucket - -Creates a new bucket, either with a global alias, a local one, or no alias at all. Technically, you can also specify both `globalAlias` and `localAlias` and that would create two aliases. - -### Example - -* Bearer Authentication (bearerAuth): - -```python -import time -import garage_admin_sdk -from garage_admin_sdk.api import bucket_api -from garage_admin_sdk.model.bucket_info import BucketInfo -from garage_admin_sdk.model.create_bucket_request import CreateBucketRequest -from pprint import pprint -# Defining the host is optional and defaults to http://localhost:3903/v0 -# See configuration.py for a list of all supported configuration parameters. -configuration = garage_admin_sdk.Configuration( - host = "http://localhost:3903/v0" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: bearerAuth -configuration = garage_admin_sdk.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) - -# Enter a context with an instance of the API client -with garage_admin_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = bucket_api.BucketApi(api_client) - create_bucket_request = CreateBucketRequest( - global_alias="my_documents", - local_alias=CreateBucketRequestLocalAlias( - access_key_id="access_key_id_example", - alias="alias_example", - allow=CreateBucketRequestLocalAliasAllow( - read=True, - write=True, - owner=True, - ), - ), - ) # CreateBucketRequest | Aliases to put on the new bucket - - # example passing only required values which don't have defaults set - try: - # Create a bucket - api_response = api_instance.create_bucket(create_bucket_request) - pprint(api_response) - except garage_admin_sdk.ApiException as e: - print("Exception when calling BucketApi->create_bucket: %s\n" % e) -``` - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **create_bucket_request** | [**CreateBucketRequest**](CreateBucketRequest.md)| Aliases to put on the new bucket | - -### Return type - -[**BucketInfo**](BucketInfo.md) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**500** | The server can not handle your request. Check your connectivity with the rest of the cluster. | - | -**400** | The payload is not formatted correctly | - | -**200** | Returns exhaustive information about the bucket | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **delete_bucket** -> delete_bucket(bucket_id) - -Delete a bucket - -Delete a bucket.Deletes a storage bucket. A bucket cannot be deleted if it is not empty. **Warning:** this will delete all aliases associated with the bucket! - -### Example - -* Bearer Authentication (bearerAuth): - -```python -import time -import garage_admin_sdk -from garage_admin_sdk.api import bucket_api -from pprint import pprint -# Defining the host is optional and defaults to http://localhost:3903/v0 -# See configuration.py for a list of all supported configuration parameters. -configuration = garage_admin_sdk.Configuration( - host = "http://localhost:3903/v0" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: bearerAuth -configuration = garage_admin_sdk.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) - -# Enter a context with an instance of the API client -with garage_admin_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = bucket_api.BucketApi(api_client) - bucket_id = "b4018dc61b27ccb5c64ec1b24f53454bbbd180697c758c4d47a22a8921864a87" # str | The exact bucket identifier, a 32 bytes hexadecimal string - - # example passing only required values which don't have defaults set - try: - # Delete a bucket - api_instance.delete_bucket(bucket_id) - except garage_admin_sdk.ApiException as e: - print("Exception when calling BucketApi->delete_bucket: %s\n" % e) -``` - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **bucket_id** | **str**| The exact bucket identifier, a 32 bytes hexadecimal string | - -### Return type - -void (empty response body) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**500** | The server can not handle your request. Check your connectivity with the rest of the cluster. | - | -**400** | Bucket is not empty | - | -**404** | Bucket not found | - | -**204** | Bucket has been deleted | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **delete_bucket_global_alias** -> BucketInfo delete_bucket_global_alias(id, alias) - -Delete a global alias - -Delete a global alias from the target bucket - -### Example - -* Bearer Authentication (bearerAuth): - -```python -import time -import garage_admin_sdk -from garage_admin_sdk.api import bucket_api -from garage_admin_sdk.model.bucket_info import BucketInfo -from pprint import pprint -# Defining the host is optional and defaults to http://localhost:3903/v0 -# See configuration.py for a list of all supported configuration parameters. -configuration = garage_admin_sdk.Configuration( - host = "http://localhost:3903/v0" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: bearerAuth -configuration = garage_admin_sdk.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) - -# Enter a context with an instance of the API client -with garage_admin_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = bucket_api.BucketApi(api_client) - id = "e6a14cd6a27f48684579ec6b381c078ab11697e6bc8513b72b2f5307e25fff9b" # str | - alias = "my_documents" # str | - - # example passing only required values which don't have defaults set - try: - # Delete a global alias - api_response = api_instance.delete_bucket_global_alias(id, alias) - pprint(api_response) - except garage_admin_sdk.ApiException as e: - print("Exception when calling BucketApi->delete_bucket_global_alias: %s\n" % e) -``` - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **str**| | - **alias** | **str**| | - -### Return type - -[**BucketInfo**](BucketInfo.md) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**500** | The server can not handle your request. Check your connectivity with the rest of the cluster. | - | -**400** | Bad request, check your request body | - | -**404** | Bucket not found | - | -**200** | Returns exhaustive information about the bucket | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **delete_bucket_local_alias** -> BucketInfo delete_bucket_local_alias(id, access_key_id, alias) - -Delete a local alias - -Delete a local alias, bound to specified account, from the target bucket - -### Example - -* Bearer Authentication (bearerAuth): - -```python -import time -import garage_admin_sdk -from garage_admin_sdk.api import bucket_api -from garage_admin_sdk.model.bucket_info import BucketInfo -from pprint import pprint -# Defining the host is optional and defaults to http://localhost:3903/v0 -# See configuration.py for a list of all supported configuration parameters. -configuration = garage_admin_sdk.Configuration( - host = "http://localhost:3903/v0" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: bearerAuth -configuration = garage_admin_sdk.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) - -# Enter a context with an instance of the API client -with garage_admin_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = bucket_api.BucketApi(api_client) - id = "e6a14cd6a27f48684579ec6b381c078ab11697e6bc8513b72b2f5307e25fff9b" # str | - access_key_id = "GK31c2f218a2e44f485b94239e" # str | - alias = "my_documents" # str | - - # example passing only required values which don't have defaults set - try: - # Delete a local alias - api_response = api_instance.delete_bucket_local_alias(id, access_key_id, alias) - pprint(api_response) - except garage_admin_sdk.ApiException as e: - print("Exception when calling BucketApi->delete_bucket_local_alias: %s\n" % e) -``` - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **str**| | - **access_key_id** | **str**| | - **alias** | **str**| | - -### Return type - -[**BucketInfo**](BucketInfo.md) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**500** | The server can not handle your request. Check your connectivity with the rest of the cluster. | - | -**400** | Bad request, check your request body | - | -**404** | Bucket not found | - | -**200** | Returns exhaustive information about the bucket | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **deny_bucket_key** -> BucketInfo deny_bucket_key(allow_bucket_key_request) - -Deny key - -⚠️ **DISCLAIMER**: Garage's developers are aware that this endpoint has an unconventional semantic. Be extra careful when implementing it, its behavior is not obvious. Denies a key from doing read/write/owner operations on a bucket. Flags in permissions which have the value true will be deactivated. Other flags will remain unchanged. For example, if you set read to true, the key will be denied from reading. If you set read to false, the key will keep its previous permissions. If you want the key to have the reading permission, check the AllowBucketKey operation. - -### Example - -* Bearer Authentication (bearerAuth): - -```python -import time -import garage_admin_sdk -from garage_admin_sdk.api import bucket_api -from garage_admin_sdk.model.bucket_info import BucketInfo -from garage_admin_sdk.model.allow_bucket_key_request import AllowBucketKeyRequest -from pprint import pprint -# Defining the host is optional and defaults to http://localhost:3903/v0 -# See configuration.py for a list of all supported configuration parameters. -configuration = garage_admin_sdk.Configuration( - host = "http://localhost:3903/v0" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: bearerAuth -configuration = garage_admin_sdk.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) - -# Enter a context with an instance of the API client -with garage_admin_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = bucket_api.BucketApi(api_client) - allow_bucket_key_request = AllowBucketKeyRequest( - bucket_id="e6a14cd6a27f48684579ec6b381c078ab11697e6bc8513b72b2f5307e25fff9b", - access_key_id="GK31c2f218a2e44f485b94239e", - permissions=AllowBucketKeyRequestPermissions( - read=True, - write=True, - owner=True, - ), - ) # AllowBucketKeyRequest | Aliases to put on the new bucket - - # example passing only required values which don't have defaults set - try: - # Deny key - api_response = api_instance.deny_bucket_key(allow_bucket_key_request) - pprint(api_response) - except garage_admin_sdk.ApiException as e: - print("Exception when calling BucketApi->deny_bucket_key: %s\n" % e) -``` - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **allow_bucket_key_request** | [**AllowBucketKeyRequest**](AllowBucketKeyRequest.md)| Aliases to put on the new bucket | - -### Return type - -[**BucketInfo**](BucketInfo.md) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**500** | The server can not handle your request. Check your connectivity with the rest of the cluster. | - | -**400** | Bad request, check your request body | - | -**404** | Bucket not found | - | -**200** | Returns exhaustive information about the bucket | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **find_bucket_info** -> BucketInfo find_bucket_info(alias) - -Find a bucket - -Find a bucket by its global alias - -### Example - -* Bearer Authentication (bearerAuth): - -```python -import time -import garage_admin_sdk -from garage_admin_sdk.api import bucket_api -from garage_admin_sdk.model.bucket_info import BucketInfo -from pprint import pprint -# Defining the host is optional and defaults to http://localhost:3903/v0 -# See configuration.py for a list of all supported configuration parameters. -configuration = garage_admin_sdk.Configuration( - host = "http://localhost:3903/v0" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: bearerAuth -configuration = garage_admin_sdk.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) - -# Enter a context with an instance of the API client -with garage_admin_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = bucket_api.BucketApi(api_client) - alias = "my_documents" # str | The exact global alias of one of the existing buckets - - # example passing only required values which don't have defaults set - try: - # Find a bucket - api_response = api_instance.find_bucket_info(alias) - pprint(api_response) - except garage_admin_sdk.ApiException as e: - print("Exception when calling BucketApi->find_bucket_info: %s\n" % e) -``` - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **alias** | **str**| The exact global alias of one of the existing buckets | - -### Return type - -[**BucketInfo**](BucketInfo.md) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**500** | The server can not handle your request. Check your connectivity with the rest of the cluster. | - | -**404** | Bucket not found | - | -**200** | Returns exhaustive information about the bucket | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_bucket_info** -> BucketInfo get_bucket_info(bucket_id) - -Get a bucket - -Given a bucket identifier, get its information. It includes its aliases, its web configuration, keys that have some permissions on it, some statistics (number of objects, size), number of dangling multipart uploads, and its quotas (if any). - -### Example - -* Bearer Authentication (bearerAuth): - -```python -import time -import garage_admin_sdk -from garage_admin_sdk.api import bucket_api -from garage_admin_sdk.model.bucket_info import BucketInfo -from pprint import pprint -# Defining the host is optional and defaults to http://localhost:3903/v0 -# See configuration.py for a list of all supported configuration parameters. -configuration = garage_admin_sdk.Configuration( - host = "http://localhost:3903/v0" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: bearerAuth -configuration = garage_admin_sdk.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) - -# Enter a context with an instance of the API client -with garage_admin_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = bucket_api.BucketApi(api_client) - bucket_id = "b4018dc61b27ccb5c64ec1b24f53454bbbd180697c758c4d47a22a8921864a87" # str | The exact bucket identifier, a 32 bytes hexadecimal string - - # example passing only required values which don't have defaults set - try: - # Get a bucket - api_response = api_instance.get_bucket_info(bucket_id) - pprint(api_response) - except garage_admin_sdk.ApiException as e: - print("Exception when calling BucketApi->get_bucket_info: %s\n" % e) -``` - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **bucket_id** | **str**| The exact bucket identifier, a 32 bytes hexadecimal string | - -### Return type - -[**BucketInfo**](BucketInfo.md) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**500** | The server can not handle your request. Check your connectivity with the rest of the cluster. | - | -**404** | Bucket not found | - | -**200** | Returns exhaustive information about the bucket | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_buckets** -> [ListBuckets200ResponseInner] list_buckets() - -List all buckets - -List all the buckets on the cluster with their UUID and their global and local aliases. - -### Example - -* Bearer Authentication (bearerAuth): - -```python -import time -import garage_admin_sdk -from garage_admin_sdk.api import bucket_api -from garage_admin_sdk.model.list_buckets200_response_inner import ListBuckets200ResponseInner -from pprint import pprint -# Defining the host is optional and defaults to http://localhost:3903/v0 -# See configuration.py for a list of all supported configuration parameters. -configuration = garage_admin_sdk.Configuration( - host = "http://localhost:3903/v0" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: bearerAuth -configuration = garage_admin_sdk.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) - -# Enter a context with an instance of the API client -with garage_admin_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = bucket_api.BucketApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - # List all buckets - api_response = api_instance.list_buckets() - pprint(api_response) - except garage_admin_sdk.ApiException as e: - print("Exception when calling BucketApi->list_buckets: %s\n" % e) -``` - - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**[ListBuckets200ResponseInner]**](ListBuckets200ResponseInner.md) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**500** | The server can not handle your request. Check your connectivity with the rest of the cluster. | - | -**200** | Returns the UUID of the bucket and all its aliases | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **put_bucket_global_alias** -> BucketInfo put_bucket_global_alias(id, alias) - -Add a global alias - -Add a global alias to the target bucket - -### Example - -* Bearer Authentication (bearerAuth): - -```python -import time -import garage_admin_sdk -from garage_admin_sdk.api import bucket_api -from garage_admin_sdk.model.bucket_info import BucketInfo -from pprint import pprint -# Defining the host is optional and defaults to http://localhost:3903/v0 -# See configuration.py for a list of all supported configuration parameters. -configuration = garage_admin_sdk.Configuration( - host = "http://localhost:3903/v0" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: bearerAuth -configuration = garage_admin_sdk.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) - -# Enter a context with an instance of the API client -with garage_admin_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = bucket_api.BucketApi(api_client) - id = "e6a14cd6a27f48684579ec6b381c078ab11697e6bc8513b72b2f5307e25fff9b" # str | - alias = "my_documents" # str | - - # example passing only required values which don't have defaults set - try: - # Add a global alias - api_response = api_instance.put_bucket_global_alias(id, alias) - pprint(api_response) - except garage_admin_sdk.ApiException as e: - print("Exception when calling BucketApi->put_bucket_global_alias: %s\n" % e) -``` - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **str**| | - **alias** | **str**| | - -### Return type - -[**BucketInfo**](BucketInfo.md) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**500** | The server can not handle your request. Check your connectivity with the rest of the cluster. | - | -**400** | Bad request, check your request body | - | -**404** | Bucket not found | - | -**200** | Returns exhaustive information about the bucket | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **put_bucket_local_alias** -> BucketInfo put_bucket_local_alias(id, access_key_id, alias) - -Add a local alias - -Add a local alias, bound to specified account, to the target bucket - -### Example - -* Bearer Authentication (bearerAuth): - -```python -import time -import garage_admin_sdk -from garage_admin_sdk.api import bucket_api -from garage_admin_sdk.model.bucket_info import BucketInfo -from pprint import pprint -# Defining the host is optional and defaults to http://localhost:3903/v0 -# See configuration.py for a list of all supported configuration parameters. -configuration = garage_admin_sdk.Configuration( - host = "http://localhost:3903/v0" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: bearerAuth -configuration = garage_admin_sdk.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) - -# Enter a context with an instance of the API client -with garage_admin_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = bucket_api.BucketApi(api_client) - id = "e6a14cd6a27f48684579ec6b381c078ab11697e6bc8513b72b2f5307e25fff9b" # str | - access_key_id = "GK31c2f218a2e44f485b94239e" # str | - alias = "my_documents" # str | - - # example passing only required values which don't have defaults set - try: - # Add a local alias - api_response = api_instance.put_bucket_local_alias(id, access_key_id, alias) - pprint(api_response) - except garage_admin_sdk.ApiException as e: - print("Exception when calling BucketApi->put_bucket_local_alias: %s\n" % e) -``` - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **str**| | - **access_key_id** | **str**| | - **alias** | **str**| | - -### Return type - -[**BucketInfo**](BucketInfo.md) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**500** | The server can not handle your request. Check your connectivity with the rest of the cluster. | - | -**400** | Bad request, check your request body | - | -**404** | Bucket not found | - | -**200** | Returns exhaustive information about the bucket | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **update_bucket** -> BucketInfo update_bucket(bucket_id, update_bucket_request) - -Update a bucket - -All fields (`websiteAccess` and `quotas`) are optionnal. If they are present, the corresponding modifications are applied to the bucket, otherwise nothing is changed. In `websiteAccess`: if `enabled` is `true`, `indexDocument` must be specified. The field `errorDocument` is optional, if no error document is set a generic error message is displayed when errors happen. Conversely, if `enabled` is `false`, neither `indexDocument` nor `errorDocument` must be specified. In `quotas`: new values of `maxSize` and `maxObjects` must both be specified, or set to `null` to remove the quotas. An absent value will be considered the same as a `null`. It is not possible to change only one of the two quotas. - -### Example - -* Bearer Authentication (bearerAuth): - -```python -import time -import garage_admin_sdk -from garage_admin_sdk.api import bucket_api -from garage_admin_sdk.model.bucket_info import BucketInfo -from garage_admin_sdk.model.update_bucket_request import UpdateBucketRequest -from pprint import pprint -# Defining the host is optional and defaults to http://localhost:3903/v0 -# See configuration.py for a list of all supported configuration parameters. -configuration = garage_admin_sdk.Configuration( - host = "http://localhost:3903/v0" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: bearerAuth -configuration = garage_admin_sdk.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) - -# Enter a context with an instance of the API client -with garage_admin_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = bucket_api.BucketApi(api_client) - bucket_id = "b4018dc61b27ccb5c64ec1b24f53454bbbd180697c758c4d47a22a8921864a87" # str | The exact bucket identifier, a 32 bytes hexadecimal string - update_bucket_request = UpdateBucketRequest( - website_access=UpdateBucketRequestWebsiteAccess( - enabled=True, - index_document="index.html", - error_document="error/400.html", - ), - quotas=UpdateBucketRequestQuotas( - max_size=19029801, - max_objects=1, - ), - ) # UpdateBucketRequest | Requested changes on the bucket. Both root fields are optionals. - - # example passing only required values which don't have defaults set - try: - # Update a bucket - api_response = api_instance.update_bucket(bucket_id, update_bucket_request) - pprint(api_response) - except garage_admin_sdk.ApiException as e: - print("Exception when calling BucketApi->update_bucket: %s\n" % e) -``` - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **bucket_id** | **str**| The exact bucket identifier, a 32 bytes hexadecimal string | - **update_bucket_request** | [**UpdateBucketRequest**](UpdateBucketRequest.md)| Requested changes on the bucket. Both root fields are optionals. | - -### Return type - -[**BucketInfo**](BucketInfo.md) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**500** | The server can not handle your request. Check your connectivity with the rest of the cluster. | - | -**400** | Bad request, check your body. | - | -**404** | Bucket not found | - | -**200** | Returns exhaustive information about the bucket | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/python/docs/BucketInfo.md b/python/docs/BucketInfo.md deleted file mode 100644 index 2aa507d..0000000 --- a/python/docs/BucketInfo.md +++ /dev/null @@ -1,20 +0,0 @@ -# BucketInfo - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | | [optional] -**global_aliases** | **[str]** | | [optional] -**website_access** | **bool** | | [optional] -**website_config** | [**BucketInfoWebsiteConfig**](BucketInfoWebsiteConfig.md) | | [optional] -**keys** | [**[BucketKeyInfo]**](BucketKeyInfo.md) | | [optional] -**objects** | **int** | | [optional] -**bytes** | **int** | | [optional] -**unfinished_uploads** | **int** | | [optional] -**quotas** | [**BucketInfoQuotas**](BucketInfoQuotas.md) | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/BucketInfoQuotas.md b/python/docs/BucketInfoQuotas.md deleted file mode 100644 index 763dcd9..0000000 --- a/python/docs/BucketInfoQuotas.md +++ /dev/null @@ -1,13 +0,0 @@ -# BucketInfoQuotas - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**max_size** | **int, none_type** | | [optional] -**max_objects** | **int, none_type** | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/BucketInfoWebsiteConfig.md b/python/docs/BucketInfoWebsiteConfig.md deleted file mode 100644 index dde2ab4..0000000 --- a/python/docs/BucketInfoWebsiteConfig.md +++ /dev/null @@ -1,13 +0,0 @@ -# BucketInfoWebsiteConfig - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**index_document** | **str** | | [optional] -**error_document** | **str** | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/BucketKeyInfo.md b/python/docs/BucketKeyInfo.md deleted file mode 100644 index 9b72531..0000000 --- a/python/docs/BucketKeyInfo.md +++ /dev/null @@ -1,15 +0,0 @@ -# BucketKeyInfo - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**access_key_id** | **str** | | [optional] -**name** | **str** | | [optional] -**permissions** | [**CreateBucketRequestLocalAliasAllow**](CreateBucketRequestLocalAliasAllow.md) | | [optional] -**bucket_local_aliases** | **[str]** | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/ClusterLayout.md b/python/docs/ClusterLayout.md deleted file mode 100644 index b8491d2..0000000 --- a/python/docs/ClusterLayout.md +++ /dev/null @@ -1,14 +0,0 @@ -# ClusterLayout - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**version** | **int** | | -**roles** | [**{str: (NodeClusterInfo,)}**](NodeClusterInfo.md) | | -**staged_role_changes** | [**{str: (NodeClusterInfo,)}**](NodeClusterInfo.md) | | -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/ConnectPost200ResponseInner.md b/python/docs/ConnectPost200ResponseInner.md deleted file mode 100644 index 1dd412a..0000000 --- a/python/docs/ConnectPost200ResponseInner.md +++ /dev/null @@ -1,13 +0,0 @@ -# ConnectPost200ResponseInner - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**success** | **bool** | | [optional] -**error** | **str** | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/CreateBucketRequest.md b/python/docs/CreateBucketRequest.md deleted file mode 100644 index 836b776..0000000 --- a/python/docs/CreateBucketRequest.md +++ /dev/null @@ -1,13 +0,0 @@ -# CreateBucketRequest - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**global_alias** | **str** | | [optional] -**local_alias** | [**CreateBucketRequestLocalAlias**](CreateBucketRequestLocalAlias.md) | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/CreateBucketRequestLocalAlias.md b/python/docs/CreateBucketRequestLocalAlias.md deleted file mode 100644 index f90d403..0000000 --- a/python/docs/CreateBucketRequestLocalAlias.md +++ /dev/null @@ -1,14 +0,0 @@ -# CreateBucketRequestLocalAlias - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**access_key_id** | **str** | | [optional] -**alias** | **str** | | [optional] -**allow** | [**CreateBucketRequestLocalAliasAllow**](CreateBucketRequestLocalAliasAllow.md) | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/CreateBucketRequestLocalAliasAllow.md b/python/docs/CreateBucketRequestLocalAliasAllow.md deleted file mode 100644 index cb0a405..0000000 --- a/python/docs/CreateBucketRequestLocalAliasAllow.md +++ /dev/null @@ -1,14 +0,0 @@ -# CreateBucketRequestLocalAliasAllow - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**read** | **bool** | | [optional] -**write** | **bool** | | [optional] -**owner** | **bool** | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/GetNodes200Response.md b/python/docs/GetNodes200Response.md deleted file mode 100644 index 85586f5..0000000 --- a/python/docs/GetNodes200Response.md +++ /dev/null @@ -1,15 +0,0 @@ -# GetNodes200Response - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**node** | **str** | | -**garage_version** | **str** | | -**known_nodes** | [**{str: (NodeNetworkInfo,)}**](NodeNetworkInfo.md) | | -**layout** | [**ClusterLayout**](ClusterLayout.md) | | -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/ImportKeyRequest.md b/python/docs/ImportKeyRequest.md deleted file mode 100644 index 9e1035a..0000000 --- a/python/docs/ImportKeyRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# ImportKeyRequest - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | | -**access_key_id** | **str** | | -**secret_access_key** | **str** | | -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/KeyApi.md b/python/docs/KeyApi.md deleted file mode 100644 index 91893a7..0000000 --- a/python/docs/KeyApi.md +++ /dev/null @@ -1,577 +0,0 @@ -# garage_admin_sdk.KeyApi - -All URIs are relative to *http://localhost:3903/v0* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**add_key**](KeyApi.md#add_key) | **POST** /key | Create a new API key -[**delete_key**](KeyApi.md#delete_key) | **DELETE** /key?id={access_key} | Delete a key -[**get_key**](KeyApi.md#get_key) | **GET** /key?id={access_key} | Get key information -[**import_key**](KeyApi.md#import_key) | **POST** /key/import | Import an existing key -[**list_keys**](KeyApi.md#list_keys) | **GET** /key | List all keys -[**search_key**](KeyApi.md#search_key) | **GET** /key?search={pattern} | Select key by pattern -[**update_key**](KeyApi.md#update_key) | **POST** /key?id={access_key} | Update a key - - -# **add_key** -> KeyInfo add_key(add_key_request) - -Create a new API key - -Creates a new API access key. - -### Example - -* Bearer Authentication (bearerAuth): - -```python -import time -import garage_admin_sdk -from garage_admin_sdk.api import key_api -from garage_admin_sdk.model.key_info import KeyInfo -from garage_admin_sdk.model.add_key_request import AddKeyRequest -from pprint import pprint -# Defining the host is optional and defaults to http://localhost:3903/v0 -# See configuration.py for a list of all supported configuration parameters. -configuration = garage_admin_sdk.Configuration( - host = "http://localhost:3903/v0" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: bearerAuth -configuration = garage_admin_sdk.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) - -# Enter a context with an instance of the API client -with garage_admin_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = key_api.KeyApi(api_client) - add_key_request = AddKeyRequest( - name="test-key", - ) # AddKeyRequest | \"You can set a friendly name for this key, send an empty string instead\" - - # example passing only required values which don't have defaults set - try: - # Create a new API key - api_response = api_instance.add_key(add_key_request) - pprint(api_response) - except garage_admin_sdk.ApiException as e: - print("Exception when calling KeyApi->add_key: %s\n" % e) -``` - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **add_key_request** | [**AddKeyRequest**](AddKeyRequest.md)| \"You can set a friendly name for this key, send an empty string instead\" | - -### Return type - -[**KeyInfo**](KeyInfo.md) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**500** | The server can not handle your request. Check your connectivity with the rest of the cluster. | - | -**400** | Invalid syntax or requested change | - | -**200** | The key has been added | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **delete_key** -> delete_key(access_key) - -Delete a key - -Delete a key from the cluster. Its access will be removed from all the buckets. Buckets are not automatically deleted and can be dangling. You should manually delete them before. - -### Example - -* Bearer Authentication (bearerAuth): - -```python -import time -import garage_admin_sdk -from garage_admin_sdk.api import key_api -from pprint import pprint -# Defining the host is optional and defaults to http://localhost:3903/v0 -# See configuration.py for a list of all supported configuration parameters. -configuration = garage_admin_sdk.Configuration( - host = "http://localhost:3903/v0" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: bearerAuth -configuration = garage_admin_sdk.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) - -# Enter a context with an instance of the API client -with garage_admin_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = key_api.KeyApi(api_client) - access_key = "GK31c2f218a2e44f485b94239e" # str | The exact API access key generated by Garage - - # example passing only required values which don't have defaults set - try: - # Delete a key - api_instance.delete_key(access_key) - except garage_admin_sdk.ApiException as e: - print("Exception when calling KeyApi->delete_key: %s\n" % e) -``` - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **access_key** | **str**| The exact API access key generated by Garage | - -### Return type - -void (empty response body) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**500** | The server can not handle your request. Check your connectivity with the rest of the cluster. | - | -**200** | The key has been deleted | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_key** -> KeyInfo get_key(access_key) - -Get key information - -Return information about a specific key and return its information - -### Example - -* Bearer Authentication (bearerAuth): - -```python -import time -import garage_admin_sdk -from garage_admin_sdk.api import key_api -from garage_admin_sdk.model.key_info import KeyInfo -from pprint import pprint -# Defining the host is optional and defaults to http://localhost:3903/v0 -# See configuration.py for a list of all supported configuration parameters. -configuration = garage_admin_sdk.Configuration( - host = "http://localhost:3903/v0" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: bearerAuth -configuration = garage_admin_sdk.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) - -# Enter a context with an instance of the API client -with garage_admin_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = key_api.KeyApi(api_client) - access_key = "GK31c2f218a2e44f485b94239e" # str | The exact API access key generated by Garage - - # example passing only required values which don't have defaults set - try: - # Get key information - api_response = api_instance.get_key(access_key) - pprint(api_response) - except garage_admin_sdk.ApiException as e: - print("Exception when calling KeyApi->get_key: %s\n" % e) -``` - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **access_key** | **str**| The exact API access key generated by Garage | - -### Return type - -[**KeyInfo**](KeyInfo.md) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**500** | The server can not handle your request. Check your connectivity with the rest of the cluster. | - | -**200** | Returns information about the key | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **import_key** -> KeyInfo import_key(import_key_request) - -Import an existing key - -Imports an existing API key. This feature must only be used for migrations and backup restore. **Do not use it to generate custom key identifiers or you will break your Garage cluster.** - -### Example - -* Bearer Authentication (bearerAuth): - -```python -import time -import garage_admin_sdk -from garage_admin_sdk.api import key_api -from garage_admin_sdk.model.import_key_request import ImportKeyRequest -from garage_admin_sdk.model.key_info import KeyInfo -from pprint import pprint -# Defining the host is optional and defaults to http://localhost:3903/v0 -# See configuration.py for a list of all supported configuration parameters. -configuration = garage_admin_sdk.Configuration( - host = "http://localhost:3903/v0" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: bearerAuth -configuration = garage_admin_sdk.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) - -# Enter a context with an instance of the API client -with garage_admin_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = key_api.KeyApi(api_client) - import_key_request = ImportKeyRequest( - name="test-key", - access_key_id="GK31c2f218a2e44f485b94239e", - secret_access_key="b892c0665f0ada8a4755dae98baa3b133590e11dae3bcc1f9d769d67f16c3835", - ) # ImportKeyRequest | Information on the key to import - - # example passing only required values which don't have defaults set - try: - # Import an existing key - api_response = api_instance.import_key(import_key_request) - pprint(api_response) - except garage_admin_sdk.ApiException as e: - print("Exception when calling KeyApi->import_key: %s\n" % e) -``` - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **import_key_request** | [**ImportKeyRequest**](ImportKeyRequest.md)| Information on the key to import | - -### Return type - -[**KeyInfo**](KeyInfo.md) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**500** | The server can not handle your request. Check your connectivity with the rest of the cluster. | - | -**400** | Invalid syntax or requested change | - | -**200** | The key has been imported into the system | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_keys** -> [ListKeys200ResponseInner] list_keys() - -List all keys - -Returns all API access keys in the cluster. - -### Example - -* Bearer Authentication (bearerAuth): - -```python -import time -import garage_admin_sdk -from garage_admin_sdk.api import key_api -from garage_admin_sdk.model.list_keys200_response_inner import ListKeys200ResponseInner -from pprint import pprint -# Defining the host is optional and defaults to http://localhost:3903/v0 -# See configuration.py for a list of all supported configuration parameters. -configuration = garage_admin_sdk.Configuration( - host = "http://localhost:3903/v0" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: bearerAuth -configuration = garage_admin_sdk.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) - -# Enter a context with an instance of the API client -with garage_admin_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = key_api.KeyApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - # List all keys - api_response = api_instance.list_keys() - pprint(api_response) - except garage_admin_sdk.ApiException as e: - print("Exception when calling KeyApi->list_keys: %s\n" % e) -``` - - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**[ListKeys200ResponseInner]**](ListKeys200ResponseInner.md) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**500** | The server can not handle your request. Check your connectivity with the rest of the cluster. | - | -**200** | Returns the key identifier (aka `AWS_ACCESS_KEY_ID`) and its associated, human friendly, name if any (otherwise return an empty string) | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **search_key** -> KeyInfo search_key(pattern) - -Select key by pattern - -Find the first key matching the given pattern based on its identifier aor friendly name and return its information. - -### Example - -* Bearer Authentication (bearerAuth): - -```python -import time -import garage_admin_sdk -from garage_admin_sdk.api import key_api -from garage_admin_sdk.model.key_info import KeyInfo -from pprint import pprint -# Defining the host is optional and defaults to http://localhost:3903/v0 -# See configuration.py for a list of all supported configuration parameters. -configuration = garage_admin_sdk.Configuration( - host = "http://localhost:3903/v0" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: bearerAuth -configuration = garage_admin_sdk.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) - -# Enter a context with an instance of the API client -with garage_admin_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = key_api.KeyApi(api_client) - pattern = "test-k" # str | A pattern (beginning or full string) corresponding to a key identifier or friendly name - - # example passing only required values which don't have defaults set - try: - # Select key by pattern - api_response = api_instance.search_key(pattern) - pprint(api_response) - except garage_admin_sdk.ApiException as e: - print("Exception when calling KeyApi->search_key: %s\n" % e) -``` - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pattern** | **str**| A pattern (beginning or full string) corresponding to a key identifier or friendly name | - -### Return type - -[**KeyInfo**](KeyInfo.md) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**500** | The server can not handle your request. Check your connectivity with the rest of the cluster. | - | -**200** | Returns information about the key | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **update_key** -> KeyInfo update_key(access_key, update_key_request) - -Update a key - -Updates information about the specified API access key. - -### Example - -* Bearer Authentication (bearerAuth): - -```python -import time -import garage_admin_sdk -from garage_admin_sdk.api import key_api -from garage_admin_sdk.model.update_key_request import UpdateKeyRequest -from garage_admin_sdk.model.key_info import KeyInfo -from pprint import pprint -# Defining the host is optional and defaults to http://localhost:3903/v0 -# See configuration.py for a list of all supported configuration parameters. -configuration = garage_admin_sdk.Configuration( - host = "http://localhost:3903/v0" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: bearerAuth -configuration = garage_admin_sdk.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) - -# Enter a context with an instance of the API client -with garage_admin_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = key_api.KeyApi(api_client) - access_key = "GK31c2f218a2e44f485b94239e" # str | The exact API access key generated by Garage - update_key_request = UpdateKeyRequest( - name="test-key", - allow=UpdateKeyRequestAllow( - create_bucket=True, - ), - deny=UpdateKeyRequestDeny( - create_bucket=True, - ), - ) # UpdateKeyRequest | For a given key, provide a first set with the permissions to grant, and a second set with the permissions to remove - - # example passing only required values which don't have defaults set - try: - # Update a key - api_response = api_instance.update_key(access_key, update_key_request) - pprint(api_response) - except garage_admin_sdk.ApiException as e: - print("Exception when calling KeyApi->update_key: %s\n" % e) -``` - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **access_key** | **str**| The exact API access key generated by Garage | - **update_key_request** | [**UpdateKeyRequest**](UpdateKeyRequest.md)| For a given key, provide a first set with the permissions to grant, and a second set with the permissions to remove | - -### Return type - -[**KeyInfo**](KeyInfo.md) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**500** | The server can not handle your request. Check your connectivity with the rest of the cluster. | - | -**400** | Invalid syntax or requested change | - | -**200** | Returns information about the key | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/python/docs/KeyGetRequest.md b/python/docs/KeyGetRequest.md deleted file mode 100644 index 0358ca1..0000000 --- a/python/docs/KeyGetRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# KeyGetRequest - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/KeyIdAccessKeyDeleteRequest.md b/python/docs/KeyIdAccessKeyDeleteRequest.md deleted file mode 100644 index 7c08a54..0000000 --- a/python/docs/KeyIdAccessKeyDeleteRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# KeyIdAccessKeyDeleteRequest - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | | [optional] -**allow** | [**KeyIdAccessKeyDeleteRequestAllow**](KeyIdAccessKeyDeleteRequestAllow.md) | | [optional] -**deny** | [**KeyIdAccessKeyDeleteRequestDeny**](KeyIdAccessKeyDeleteRequestDeny.md) | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/KeyIdAccessKeyDeleteRequestAllow.md b/python/docs/KeyIdAccessKeyDeleteRequestAllow.md deleted file mode 100644 index 55bd6e4..0000000 --- a/python/docs/KeyIdAccessKeyDeleteRequestAllow.md +++ /dev/null @@ -1,12 +0,0 @@ -# KeyIdAccessKeyDeleteRequestAllow - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**create_bucket** | **bool** | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/KeyIdAccessKeyDeleteRequestDeny.md b/python/docs/KeyIdAccessKeyDeleteRequestDeny.md deleted file mode 100644 index e174671..0000000 --- a/python/docs/KeyIdAccessKeyDeleteRequestDeny.md +++ /dev/null @@ -1,12 +0,0 @@ -# KeyIdAccessKeyDeleteRequestDeny - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**create_bucket** | **bool** | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/KeyImportPostRequest.md b/python/docs/KeyImportPostRequest.md deleted file mode 100644 index 8bb5172..0000000 --- a/python/docs/KeyImportPostRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# KeyImportPostRequest - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | | [optional] -**access_key_id** | **str** | | [optional] -**secret_access_key** | **str** | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/KeyInfo.md b/python/docs/KeyInfo.md deleted file mode 100644 index e9abd50..0000000 --- a/python/docs/KeyInfo.md +++ /dev/null @@ -1,16 +0,0 @@ -# KeyInfo - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | | [optional] -**access_key_id** | **str** | | [optional] -**secret_access_key** | **str** | | [optional] -**permissions** | [**KeyInfoPermissions**](KeyInfoPermissions.md) | | [optional] -**buckets** | [**[KeyInfoBucketsInner]**](KeyInfoBucketsInner.md) | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/KeyInfoBucketsInner.md b/python/docs/KeyInfoBucketsInner.md deleted file mode 100644 index 3f49968..0000000 --- a/python/docs/KeyInfoBucketsInner.md +++ /dev/null @@ -1,15 +0,0 @@ -# KeyInfoBucketsInner - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | | [optional] -**global_aliases** | **[str]** | | [optional] -**local_aliases** | **[str]** | | [optional] -**permissions** | [**KeyInfoBucketsInnerPermissions**](KeyInfoBucketsInnerPermissions.md) | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/KeyInfoBucketsInnerPermissions.md b/python/docs/KeyInfoBucketsInnerPermissions.md deleted file mode 100644 index 617cdfe..0000000 --- a/python/docs/KeyInfoBucketsInnerPermissions.md +++ /dev/null @@ -1,14 +0,0 @@ -# KeyInfoBucketsInnerPermissions - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**read** | **bool** | | [optional] -**write** | **bool** | | [optional] -**owner** | **bool** | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/KeyInfoPermissions.md b/python/docs/KeyInfoPermissions.md deleted file mode 100644 index d47805c..0000000 --- a/python/docs/KeyInfoPermissions.md +++ /dev/null @@ -1,12 +0,0 @@ -# KeyInfoPermissions - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**create_bucket** | **bool** | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/LayoutApi.md b/python/docs/LayoutApi.md deleted file mode 100644 index d26a333..0000000 --- a/python/docs/LayoutApi.md +++ /dev/null @@ -1,330 +0,0 @@ -# garage_admin_sdk.LayoutApi - -All URIs are relative to *http://localhost:3903/v0* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**add_layout**](LayoutApi.md#add_layout) | **POST** /layout | Send modifications to the cluster layout -[**apply_layout**](LayoutApi.md#apply_layout) | **POST** /layout/apply | Apply staged layout -[**get_layout**](LayoutApi.md#get_layout) | **GET** /layout | Details on the current and staged layout -[**revert_layout**](LayoutApi.md#revert_layout) | **POST** /layout/revert | Clear staged layout - - -# **add_layout** -> add_layout(request_body) - -Send modifications to the cluster layout - -Send modifications to the cluster layout. These modifications will be included in the staged role changes, visible in subsequent calls of `GET /layout`. Once the set of staged changes is satisfactory, the user may call `POST /layout/apply` to apply the changed changes, or `POST /layout/revert` to clear all of the staged changes in the layout. Note that setting the capacity to `null` will configure the node as a gateway. - -### Example - -* Bearer Authentication (bearerAuth): - -```python -import time -import garage_admin_sdk -from garage_admin_sdk.api import layout_api -from garage_admin_sdk.model.node_cluster_info import NodeClusterInfo -from pprint import pprint -# Defining the host is optional and defaults to http://localhost:3903/v0 -# See configuration.py for a list of all supported configuration parameters. -configuration = garage_admin_sdk.Configuration( - host = "http://localhost:3903/v0" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: bearerAuth -configuration = garage_admin_sdk.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) - -# Enter a context with an instance of the API client -with garage_admin_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = layout_api.LayoutApi(api_client) - request_body = { - "key": NodeClusterInfo( - zone="dc1", - capacity=4, - tags=["gateway","fast"], - ), - } # {str: (NodeClusterInfo,)} | To add a new node to the layout or to change the configuration of an existing node, simply set the values you want. To remove a node, set it to `null` instead of passing a configuration object. Contrary to the CLI that may update only a subset of the fields capacity, zone and tags, when calling this API all of these values must be specified. - - # example passing only required values which don't have defaults set - try: - # Send modifications to the cluster layout - api_instance.add_layout(request_body) - except garage_admin_sdk.ApiException as e: - print("Exception when calling LayoutApi->add_layout: %s\n" % e) -``` - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **request_body** | [**{str: (NodeClusterInfo,)}**](NodeClusterInfo.md)| To add a new node to the layout or to change the configuration of an existing node, simply set the values you want. To remove a node, set it to `null` instead of passing a configuration object. Contrary to the CLI that may update only a subset of the fields capacity, zone and tags, when calling this API all of these values must be specified. | - -### Return type - -void (empty response body) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**500** | The server can not handle your request. Check your connectivity with the rest of the cluster. | - | -**400** | Invalid syntax or requested change | - | -**200** | The layout modification has been correctly staged | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **apply_layout** -> apply_layout(layout_version) - -Apply staged layout - -Applies to the cluster the layout changes currently registered as staged layout changes. - -### Example - -* Bearer Authentication (bearerAuth): - -```python -import time -import garage_admin_sdk -from garage_admin_sdk.api import layout_api -from garage_admin_sdk.model.layout_version import LayoutVersion -from pprint import pprint -# Defining the host is optional and defaults to http://localhost:3903/v0 -# See configuration.py for a list of all supported configuration parameters. -configuration = garage_admin_sdk.Configuration( - host = "http://localhost:3903/v0" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: bearerAuth -configuration = garage_admin_sdk.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) - -# Enter a context with an instance of the API client -with garage_admin_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = layout_api.LayoutApi(api_client) - layout_version = LayoutVersion( - version=13, - ) # LayoutVersion | Similarly to the CLI, the body must include the version of the new layout that will be created, which MUST be 1 + the value of the currently existing layout in the cluster. - - # example passing only required values which don't have defaults set - try: - # Apply staged layout - api_instance.apply_layout(layout_version) - except garage_admin_sdk.ApiException as e: - print("Exception when calling LayoutApi->apply_layout: %s\n" % e) -``` - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **layout_version** | [**LayoutVersion**](LayoutVersion.md)| Similarly to the CLI, the body must include the version of the new layout that will be created, which MUST be 1 + the value of the currently existing layout in the cluster. | - -### Return type - -void (empty response body) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**500** | The server can not handle your request. Check your connectivity with the rest of the cluster. | - | -**400** | Invalid syntax or requested change | - | -**200** | The staged layout has been applied as the new layout of the cluster, a rebalance has been triggered. | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_layout** -> ClusterLayout get_layout() - -Details on the current and staged layout - -Returns the cluster's current layout, including: - Currently configured cluster layout - Staged changes to the cluster layout *The info returned by this endpoint is a subset of the info returned by `GET /status`.* - -### Example - -* Bearer Authentication (bearerAuth): - -```python -import time -import garage_admin_sdk -from garage_admin_sdk.api import layout_api -from garage_admin_sdk.model.cluster_layout import ClusterLayout -from pprint import pprint -# Defining the host is optional and defaults to http://localhost:3903/v0 -# See configuration.py for a list of all supported configuration parameters. -configuration = garage_admin_sdk.Configuration( - host = "http://localhost:3903/v0" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: bearerAuth -configuration = garage_admin_sdk.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) - -# Enter a context with an instance of the API client -with garage_admin_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = layout_api.LayoutApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - # Details on the current and staged layout - api_response = api_instance.get_layout() - pprint(api_response) - except garage_admin_sdk.ApiException as e: - print("Exception when calling LayoutApi->get_layout: %s\n" % e) -``` - - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**ClusterLayout**](ClusterLayout.md) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**500** | The server can not answer your request because it is in a bad state | - | -**200** | Returns the cluster's current cluster layout: - Currently configured cluster layout - Staged changes to the cluster layout | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **revert_layout** -> revert_layout(layout_version) - -Clear staged layout - -Clears all of the staged layout changes. - -### Example - -* Bearer Authentication (bearerAuth): - -```python -import time -import garage_admin_sdk -from garage_admin_sdk.api import layout_api -from garage_admin_sdk.model.layout_version import LayoutVersion -from pprint import pprint -# Defining the host is optional and defaults to http://localhost:3903/v0 -# See configuration.py for a list of all supported configuration parameters. -configuration = garage_admin_sdk.Configuration( - host = "http://localhost:3903/v0" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: bearerAuth -configuration = garage_admin_sdk.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) - -# Enter a context with an instance of the API client -with garage_admin_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = layout_api.LayoutApi(api_client) - layout_version = LayoutVersion( - version=13, - ) # LayoutVersion | Reverting the staged changes is done by incrementing the version number and clearing the contents of the staged change list. Similarly to the CLI, the body must include the incremented version number, which MUST be 1 + the value of the currently existing layout in the cluster. - - # example passing only required values which don't have defaults set - try: - # Clear staged layout - api_instance.revert_layout(layout_version) - except garage_admin_sdk.ApiException as e: - print("Exception when calling LayoutApi->revert_layout: %s\n" % e) -``` - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **layout_version** | [**LayoutVersion**](LayoutVersion.md)| Reverting the staged changes is done by incrementing the version number and clearing the contents of the staged change list. Similarly to the CLI, the body must include the incremented version number, which MUST be 1 + the value of the currently existing layout in the cluster. | - -### Return type - -void (empty response body) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**500** | The server can not handle your request. Check your connectivity with the rest of the cluster. | - | -**400** | Invalid syntax or requested change | - | -**200** | The staged layout has been cleared, you can start again sending modification from a fresh copy with `POST /layout`. | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/python/docs/LayoutVersion.md b/python/docs/LayoutVersion.md deleted file mode 100644 index 4a89df6..0000000 --- a/python/docs/LayoutVersion.md +++ /dev/null @@ -1,12 +0,0 @@ -# LayoutVersion - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**version** | **int** | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/ListBuckets200ResponseInner.md b/python/docs/ListBuckets200ResponseInner.md deleted file mode 100644 index 3dfe23f..0000000 --- a/python/docs/ListBuckets200ResponseInner.md +++ /dev/null @@ -1,14 +0,0 @@ -# ListBuckets200ResponseInner - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | | -**global_aliases** | **[str]** | | [optional] -**local_aliases** | [**[ListBuckets200ResponseInnerLocalAliasesInner]**](ListBuckets200ResponseInnerLocalAliasesInner.md) | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/ListBuckets200ResponseInnerLocalAliasesInner.md b/python/docs/ListBuckets200ResponseInnerLocalAliasesInner.md deleted file mode 100644 index 6cc16fa..0000000 --- a/python/docs/ListBuckets200ResponseInnerLocalAliasesInner.md +++ /dev/null @@ -1,13 +0,0 @@ -# ListBuckets200ResponseInnerLocalAliasesInner - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**alias** | **str** | | -**access_key_id** | **str** | | -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/ListKeys200ResponseInner.md b/python/docs/ListKeys200ResponseInner.md deleted file mode 100644 index 216d4b6..0000000 --- a/python/docs/ListKeys200ResponseInner.md +++ /dev/null @@ -1,13 +0,0 @@ -# ListKeys200ResponseInner - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | | -**name** | **str** | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/MembershipApi.md b/python/docs/MembershipApi.md deleted file mode 100644 index 7480f1b..0000000 --- a/python/docs/MembershipApi.md +++ /dev/null @@ -1,89 +0,0 @@ -# garage_admin_sdk.MembershipApi - -All URIs are relative to *http://localhost:3903/v0* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**add_node**](MembershipApi.md#add_node) | **POST** /connect | Connect target node to other Garage nodes - - -# **add_node** -> [AddNode200ResponseInner] add_node() - -Connect target node to other Garage nodes - -Instructs this Garage node to connect to other Garage nodes at specified `@`. `node_id` is generated automatically on node start. - -### Example - -* Bearer Authentication (bearerAuth): - -```python -import time -import garage_admin_sdk -from garage_admin_sdk.api import membership_api -from garage_admin_sdk.model.add_node200_response_inner import AddNode200ResponseInner -from pprint import pprint -# Defining the host is optional and defaults to http://localhost:3903/v0 -# See configuration.py for a list of all supported configuration parameters. -configuration = garage_admin_sdk.Configuration( - host = "http://localhost:3903/v0" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: bearerAuth -configuration = garage_admin_sdk.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) - -# Enter a context with an instance of the API client -with garage_admin_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = membership_api.MembershipApi(api_client) - request_body = ["ec79480e0ce52ae26fd00c9da684e4fa56658d9c64cdcecb094e936de0bfe71f@10.0.0.11:3901","4a6ae5a1d0d33bf895f5bb4f0a418b7dc94c47c0dd2eb108d1158f3c8f60b0ff@10.0.0.12:3901"] # [str] | (optional) - - # example passing only required values which don't have defaults set - # and optional values - try: - # Connect target node to other Garage nodes - api_response = api_instance.add_node(request_body=request_body) - pprint(api_response) - except garage_admin_sdk.ApiException as e: - print("Exception when calling MembershipApi->add_node: %s\n" % e) -``` - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **request_body** | **[str]**| | [optional] - -### Return type - -[**[AddNode200ResponseInner]**](AddNode200ResponseInner.md) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**500** | The server can not answer your request because it is in a bad state | - | -**400** | Your request is malformed, check your JSON | - | -**200** | The request has been handled correctly but it does not mean that all connection requests succeeded; some might have fail, you need to check the body! | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/python/docs/NodeClusterInfo.md b/python/docs/NodeClusterInfo.md deleted file mode 100644 index fc19417..0000000 --- a/python/docs/NodeClusterInfo.md +++ /dev/null @@ -1,14 +0,0 @@ -# NodeClusterInfo - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**zone** | **str** | | -**capacity** | **int, none_type** | | -**tags** | **[str]** | User defined tags, put whatever makes sense for you, these tags are not interpreted by Garage | -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/NodeNetworkInfo.md b/python/docs/NodeNetworkInfo.md deleted file mode 100644 index 8f03e93..0000000 --- a/python/docs/NodeNetworkInfo.md +++ /dev/null @@ -1,15 +0,0 @@ -# NodeNetworkInfo - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**addr** | **str** | | -**is_up** | **bool** | | -**last_seen_secs_ago** | **int, none_type** | | -**hostname** | **str** | | -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/NodesApi.md b/python/docs/NodesApi.md deleted file mode 100644 index d1103d6..0000000 --- a/python/docs/NodesApi.md +++ /dev/null @@ -1,163 +0,0 @@ -# garage_admin_sdk.NodesApi - -All URIs are relative to *http://localhost:3903/v0* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**add_node**](NodesApi.md#add_node) | **POST** /connect | Connect target node to other Garage nodes -[**get_nodes**](NodesApi.md#get_nodes) | **GET** /status | Status of this node and other nodes in the cluster - - -# **add_node** -> [AddNode200ResponseInner] add_node(request_body) - -Connect target node to other Garage nodes - -Instructs this Garage node to connect to other Garage nodes at specified `@`. `node_id` is generated automatically on node start. - -### Example - -* Bearer Authentication (bearerAuth): - -```python -import time -import garage_admin_sdk -from garage_admin_sdk.api import nodes_api -from garage_admin_sdk.model.add_node200_response_inner import AddNode200ResponseInner -from pprint import pprint -# Defining the host is optional and defaults to http://localhost:3903/v0 -# See configuration.py for a list of all supported configuration parameters. -configuration = garage_admin_sdk.Configuration( - host = "http://localhost:3903/v0" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: bearerAuth -configuration = garage_admin_sdk.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) - -# Enter a context with an instance of the API client -with garage_admin_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = nodes_api.NodesApi(api_client) - request_body = ["ec79480e0ce52ae26fd00c9da684e4fa56658d9c64cdcecb094e936de0bfe71f@10.0.0.11:3901","4a6ae5a1d0d33bf895f5bb4f0a418b7dc94c47c0dd2eb108d1158f3c8f60b0ff@10.0.0.12:3901"] # [str] | - - # example passing only required values which don't have defaults set - try: - # Connect target node to other Garage nodes - api_response = api_instance.add_node(request_body) - pprint(api_response) - except garage_admin_sdk.ApiException as e: - print("Exception when calling NodesApi->add_node: %s\n" % e) -``` - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **request_body** | **[str]**| | - -### Return type - -[**[AddNode200ResponseInner]**](AddNode200ResponseInner.md) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**500** | The server can not answer your request because it is in a bad state | - | -**400** | Your request is malformed, check your JSON | - | -**200** | The request has been handled correctly but it does not mean that all connection requests succeeded; some might have fail, you need to check the body! | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_nodes** -> GetNodes200Response get_nodes() - -Status of this node and other nodes in the cluster - -Returns the cluster's current status, including: - ID of the node being queried and its version of the Garage daemon - Live nodes - Currently configured cluster layout - Staged changes to the cluster layout - -### Example - -* Bearer Authentication (bearerAuth): - -```python -import time -import garage_admin_sdk -from garage_admin_sdk.api import nodes_api -from garage_admin_sdk.model.get_nodes200_response import GetNodes200Response -from pprint import pprint -# Defining the host is optional and defaults to http://localhost:3903/v0 -# See configuration.py for a list of all supported configuration parameters. -configuration = garage_admin_sdk.Configuration( - host = "http://localhost:3903/v0" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: bearerAuth -configuration = garage_admin_sdk.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) - -# Enter a context with an instance of the API client -with garage_admin_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = nodes_api.NodesApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - # Status of this node and other nodes in the cluster - api_response = api_instance.get_nodes() - pprint(api_response) - except garage_admin_sdk.ApiException as e: - print("Exception when calling NodesApi->get_nodes: %s\n" % e) -``` - - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**GetNodes200Response**](GetNodes200Response.md) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**500** | The server can not answer your request because it is in a bad state | - | -**200** | Information about the queried node, its environment and the current layout | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/python/docs/StatusGet200Response.md b/python/docs/StatusGet200Response.md deleted file mode 100644 index 94b112d..0000000 --- a/python/docs/StatusGet200Response.md +++ /dev/null @@ -1,15 +0,0 @@ -# StatusGet200Response - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**node** | **str** | | [optional] -**garage_version** | **str** | | [optional] -**known_nodes** | [**{str: (NodeNetworkInfo,)}**](NodeNetworkInfo.md) | | [optional] -**layout** | [**ClusterLayout**](ClusterLayout.md) | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/UpdateBucketRequest.md b/python/docs/UpdateBucketRequest.md deleted file mode 100644 index 1dcc12e..0000000 --- a/python/docs/UpdateBucketRequest.md +++ /dev/null @@ -1,13 +0,0 @@ -# UpdateBucketRequest - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**website_access** | [**UpdateBucketRequestWebsiteAccess**](UpdateBucketRequestWebsiteAccess.md) | | [optional] -**quotas** | [**UpdateBucketRequestQuotas**](UpdateBucketRequestQuotas.md) | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/UpdateBucketRequestQuotas.md b/python/docs/UpdateBucketRequestQuotas.md deleted file mode 100644 index 9b28b10..0000000 --- a/python/docs/UpdateBucketRequestQuotas.md +++ /dev/null @@ -1,13 +0,0 @@ -# UpdateBucketRequestQuotas - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**max_size** | **int, none_type** | | [optional] -**max_objects** | **int, none_type** | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/UpdateBucketRequestWebsiteAccess.md b/python/docs/UpdateBucketRequestWebsiteAccess.md deleted file mode 100644 index 58ef8a6..0000000 --- a/python/docs/UpdateBucketRequestWebsiteAccess.md +++ /dev/null @@ -1,14 +0,0 @@ -# UpdateBucketRequestWebsiteAccess - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**enabled** | **bool** | | [optional] -**index_document** | **str** | | [optional] -**error_document** | **str** | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/UpdateKeyRequest.md b/python/docs/UpdateKeyRequest.md deleted file mode 100644 index c03e50c..0000000 --- a/python/docs/UpdateKeyRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# UpdateKeyRequest - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | | [optional] -**allow** | [**UpdateKeyRequestAllow**](UpdateKeyRequestAllow.md) | | [optional] -**deny** | [**UpdateKeyRequestDeny**](UpdateKeyRequestDeny.md) | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/UpdateKeyRequestAllow.md b/python/docs/UpdateKeyRequestAllow.md deleted file mode 100644 index df55f72..0000000 --- a/python/docs/UpdateKeyRequestAllow.md +++ /dev/null @@ -1,12 +0,0 @@ -# UpdateKeyRequestAllow - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**create_bucket** | **bool** | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/UpdateKeyRequestDeny.md b/python/docs/UpdateKeyRequestDeny.md deleted file mode 100644 index be757e4..0000000 --- a/python/docs/UpdateKeyRequestDeny.md +++ /dev/null @@ -1,12 +0,0 @@ -# UpdateKeyRequestDeny - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**create_bucket** | **bool** | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/garage_admin_sdk/__init__.py b/python/garage_admin_sdk/__init__.py deleted file mode 100644 index a9bcda1..0000000 --- a/python/garage_admin_sdk/__init__.py +++ /dev/null @@ -1,27 +0,0 @@ -# flake8: noqa - -""" - Garage Administration API v0+garage-v0.8.0 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.8.0 - Generated by: https://openapi-generator.tech -""" - - -__version__ = "0.8.0" - -# import ApiClient -from garage_admin_sdk.api_client import ApiClient - -# import Configuration -from garage_admin_sdk.configuration import Configuration - -# import exceptions -from garage_admin_sdk.exceptions import OpenApiException -from garage_admin_sdk.exceptions import ApiAttributeError -from garage_admin_sdk.exceptions import ApiTypeError -from garage_admin_sdk.exceptions import ApiValueError -from garage_admin_sdk.exceptions import ApiKeyError -from garage_admin_sdk.exceptions import ApiException diff --git a/python/garage_admin_sdk/api/__init__.py b/python/garage_admin_sdk/api/__init__.py deleted file mode 100644 index a87721f..0000000 --- a/python/garage_admin_sdk/api/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -# do not import all apis into this module because that uses a lot of memory and stack frames -# if you need the ability to import all apis from one package, import them with -# from garage_admin_sdk.apis import BucketApi diff --git a/python/garage_admin_sdk/api/bucket_api.py b/python/garage_admin_sdk/api/bucket_api.py deleted file mode 100644 index d26030f..0000000 --- a/python/garage_admin_sdk/api/bucket_api.py +++ /dev/null @@ -1,1710 +0,0 @@ -""" - Garage Administration API v0+garage-v0.8.0 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.8.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from garage_admin_sdk.api_client import ApiClient, Endpoint as _Endpoint -from garage_admin_sdk.model_utils import ( # noqa: F401 - check_allowed_values, - check_validations, - date, - datetime, - file_type, - none_type, - validate_and_convert_types -) -from garage_admin_sdk.model.allow_bucket_key_request import AllowBucketKeyRequest -from garage_admin_sdk.model.bucket_info import BucketInfo -from garage_admin_sdk.model.create_bucket_request import CreateBucketRequest -from garage_admin_sdk.model.list_buckets200_response_inner import ListBuckets200ResponseInner -from garage_admin_sdk.model.update_bucket_request import UpdateBucketRequest - - -class BucketApi(object): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - self.allow_bucket_key_endpoint = _Endpoint( - settings={ - 'response_type': (BucketInfo,), - 'auth': [ - 'bearerAuth' - ], - 'endpoint_path': '/bucket/allow', - 'operation_id': 'allow_bucket_key', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'allow_bucket_key_request', - ], - 'required': [ - 'allow_bucket_key_request', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'allow_bucket_key_request': - (AllowBucketKeyRequest,), - }, - 'attribute_map': { - }, - 'location_map': { - 'allow_bucket_key_request': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.create_bucket_endpoint = _Endpoint( - settings={ - 'response_type': (BucketInfo,), - 'auth': [ - 'bearerAuth' - ], - 'endpoint_path': '/bucket', - 'operation_id': 'create_bucket', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'create_bucket_request', - ], - 'required': [ - 'create_bucket_request', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'create_bucket_request': - (CreateBucketRequest,), - }, - 'attribute_map': { - }, - 'location_map': { - 'create_bucket_request': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.delete_bucket_endpoint = _Endpoint( - settings={ - 'response_type': None, - 'auth': [ - 'bearerAuth' - ], - 'endpoint_path': '/bucket?id={bucket_id}', - 'operation_id': 'delete_bucket', - 'http_method': 'DELETE', - 'servers': None, - }, - params_map={ - 'all': [ - 'bucket_id', - ], - 'required': [ - 'bucket_id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'bucket_id': - (str,), - }, - 'attribute_map': { - 'bucket_id': 'bucket_id', - }, - 'location_map': { - 'bucket_id': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [], - 'content_type': [], - }, - api_client=api_client - ) - self.delete_bucket_global_alias_endpoint = _Endpoint( - settings={ - 'response_type': (BucketInfo,), - 'auth': [ - 'bearerAuth' - ], - 'endpoint_path': '/bucket/alias/global', - 'operation_id': 'delete_bucket_global_alias', - 'http_method': 'DELETE', - 'servers': None, - }, - params_map={ - 'all': [ - 'id', - 'alias', - ], - 'required': [ - 'id', - 'alias', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'id': - (str,), - 'alias': - (str,), - }, - 'attribute_map': { - 'id': 'id', - 'alias': 'alias', - }, - 'location_map': { - 'id': 'query', - 'alias': 'query', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.delete_bucket_local_alias_endpoint = _Endpoint( - settings={ - 'response_type': (BucketInfo,), - 'auth': [ - 'bearerAuth' - ], - 'endpoint_path': '/bucket/alias/local', - 'operation_id': 'delete_bucket_local_alias', - 'http_method': 'DELETE', - 'servers': None, - }, - params_map={ - 'all': [ - 'id', - 'access_key_id', - 'alias', - ], - 'required': [ - 'id', - 'access_key_id', - 'alias', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'id': - (str,), - 'access_key_id': - (str,), - 'alias': - (str,), - }, - 'attribute_map': { - 'id': 'id', - 'access_key_id': 'accessKeyId', - 'alias': 'alias', - }, - 'location_map': { - 'id': 'query', - 'access_key_id': 'query', - 'alias': 'query', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.deny_bucket_key_endpoint = _Endpoint( - settings={ - 'response_type': (BucketInfo,), - 'auth': [ - 'bearerAuth' - ], - 'endpoint_path': '/bucket/deny', - 'operation_id': 'deny_bucket_key', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'allow_bucket_key_request', - ], - 'required': [ - 'allow_bucket_key_request', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'allow_bucket_key_request': - (AllowBucketKeyRequest,), - }, - 'attribute_map': { - }, - 'location_map': { - 'allow_bucket_key_request': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.find_bucket_info_endpoint = _Endpoint( - settings={ - 'response_type': (BucketInfo,), - 'auth': [ - 'bearerAuth' - ], - 'endpoint_path': '/bucket?globalAlias={alias}', - 'operation_id': 'find_bucket_info', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'alias', - ], - 'required': [ - 'alias', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'alias': - (str,), - }, - 'attribute_map': { - 'alias': 'alias', - }, - 'location_map': { - 'alias': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.get_bucket_info_endpoint = _Endpoint( - settings={ - 'response_type': (BucketInfo,), - 'auth': [ - 'bearerAuth' - ], - 'endpoint_path': '/bucket?id={bucket_id}', - 'operation_id': 'get_bucket_info', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'bucket_id', - ], - 'required': [ - 'bucket_id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'bucket_id': - (str,), - }, - 'attribute_map': { - 'bucket_id': 'bucket_id', - }, - 'location_map': { - 'bucket_id': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.list_buckets_endpoint = _Endpoint( - settings={ - 'response_type': ([ListBuckets200ResponseInner],), - 'auth': [ - 'bearerAuth' - ], - 'endpoint_path': '/bucket', - 'operation_id': 'list_buckets', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - ], - 'required': [], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - }, - 'attribute_map': { - }, - 'location_map': { - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.put_bucket_global_alias_endpoint = _Endpoint( - settings={ - 'response_type': (BucketInfo,), - 'auth': [ - 'bearerAuth' - ], - 'endpoint_path': '/bucket/alias/global', - 'operation_id': 'put_bucket_global_alias', - 'http_method': 'PUT', - 'servers': None, - }, - params_map={ - 'all': [ - 'id', - 'alias', - ], - 'required': [ - 'id', - 'alias', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'id': - (str,), - 'alias': - (str,), - }, - 'attribute_map': { - 'id': 'id', - 'alias': 'alias', - }, - 'location_map': { - 'id': 'query', - 'alias': 'query', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.put_bucket_local_alias_endpoint = _Endpoint( - settings={ - 'response_type': (BucketInfo,), - 'auth': [ - 'bearerAuth' - ], - 'endpoint_path': '/bucket/alias/local', - 'operation_id': 'put_bucket_local_alias', - 'http_method': 'PUT', - 'servers': None, - }, - params_map={ - 'all': [ - 'id', - 'access_key_id', - 'alias', - ], - 'required': [ - 'id', - 'access_key_id', - 'alias', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'id': - (str,), - 'access_key_id': - (str,), - 'alias': - (str,), - }, - 'attribute_map': { - 'id': 'id', - 'access_key_id': 'accessKeyId', - 'alias': 'alias', - }, - 'location_map': { - 'id': 'query', - 'access_key_id': 'query', - 'alias': 'query', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.update_bucket_endpoint = _Endpoint( - settings={ - 'response_type': (BucketInfo,), - 'auth': [ - 'bearerAuth' - ], - 'endpoint_path': '/bucket?id={bucket_id}', - 'operation_id': 'update_bucket', - 'http_method': 'PUT', - 'servers': None, - }, - params_map={ - 'all': [ - 'bucket_id', - 'update_bucket_request', - ], - 'required': [ - 'bucket_id', - 'update_bucket_request', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'bucket_id': - (str,), - 'update_bucket_request': - (UpdateBucketRequest,), - }, - 'attribute_map': { - 'bucket_id': 'bucket_id', - }, - 'location_map': { - 'bucket_id': 'path', - 'update_bucket_request': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - - def allow_bucket_key( - self, - allow_bucket_key_request, - **kwargs - ): - """Allow key # noqa: E501 - - ⚠️ **DISCLAIMER**: Garage's developers are aware that this endpoint has an unconventional semantic. Be extra careful when implementing it, its behavior is not obvious. Allows a key to do read/write/owner operations on a bucket. Flags in permissions which have the value true will be activated. Other flags will remain unchanged (ie. they will keep their internal value). For example, if you set read to true, the key will be allowed to read the bucket. If you set it to false, the key will keeps its previous read permission. If you want to disallow read for the key, check the DenyBucketKey operation. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.allow_bucket_key(allow_bucket_key_request, async_req=True) - >>> result = thread.get() - - Args: - allow_bucket_key_request (AllowBucketKeyRequest): Aliases to put on the new bucket - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - BucketInfo - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['allow_bucket_key_request'] = \ - allow_bucket_key_request - return self.allow_bucket_key_endpoint.call_with_http_info(**kwargs) - - def create_bucket( - self, - create_bucket_request, - **kwargs - ): - """Create a bucket # noqa: E501 - - Creates a new bucket, either with a global alias, a local one, or no alias at all. Technically, you can also specify both `globalAlias` and `localAlias` and that would create two aliases. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.create_bucket(create_bucket_request, async_req=True) - >>> result = thread.get() - - Args: - create_bucket_request (CreateBucketRequest): Aliases to put on the new bucket - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - BucketInfo - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['create_bucket_request'] = \ - create_bucket_request - return self.create_bucket_endpoint.call_with_http_info(**kwargs) - - def delete_bucket( - self, - bucket_id, - **kwargs - ): - """Delete a bucket # noqa: E501 - - Delete a bucket.Deletes a storage bucket. A bucket cannot be deleted if it is not empty. **Warning:** this will delete all aliases associated with the bucket! # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.delete_bucket(bucket_id, async_req=True) - >>> result = thread.get() - - Args: - bucket_id (str): The exact bucket identifier, a 32 bytes hexadecimal string - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - None - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['bucket_id'] = \ - bucket_id - return self.delete_bucket_endpoint.call_with_http_info(**kwargs) - - def delete_bucket_global_alias( - self, - id, - alias, - **kwargs - ): - """Delete a global alias # noqa: E501 - - Delete a global alias from the target bucket # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.delete_bucket_global_alias(id, alias, async_req=True) - >>> result = thread.get() - - Args: - id (str): - alias (str): - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - BucketInfo - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['id'] = \ - id - kwargs['alias'] = \ - alias - return self.delete_bucket_global_alias_endpoint.call_with_http_info(**kwargs) - - def delete_bucket_local_alias( - self, - id, - access_key_id, - alias, - **kwargs - ): - """Delete a local alias # noqa: E501 - - Delete a local alias, bound to specified account, from the target bucket # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.delete_bucket_local_alias(id, access_key_id, alias, async_req=True) - >>> result = thread.get() - - Args: - id (str): - access_key_id (str): - alias (str): - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - BucketInfo - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['id'] = \ - id - kwargs['access_key_id'] = \ - access_key_id - kwargs['alias'] = \ - alias - return self.delete_bucket_local_alias_endpoint.call_with_http_info(**kwargs) - - def deny_bucket_key( - self, - allow_bucket_key_request, - **kwargs - ): - """Deny key # noqa: E501 - - ⚠️ **DISCLAIMER**: Garage's developers are aware that this endpoint has an unconventional semantic. Be extra careful when implementing it, its behavior is not obvious. Denies a key from doing read/write/owner operations on a bucket. Flags in permissions which have the value true will be deactivated. Other flags will remain unchanged. For example, if you set read to true, the key will be denied from reading. If you set read to false, the key will keep its previous permissions. If you want the key to have the reading permission, check the AllowBucketKey operation. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.deny_bucket_key(allow_bucket_key_request, async_req=True) - >>> result = thread.get() - - Args: - allow_bucket_key_request (AllowBucketKeyRequest): Aliases to put on the new bucket - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - BucketInfo - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['allow_bucket_key_request'] = \ - allow_bucket_key_request - return self.deny_bucket_key_endpoint.call_with_http_info(**kwargs) - - def find_bucket_info( - self, - alias, - **kwargs - ): - """Find a bucket # noqa: E501 - - Find a bucket by its global alias # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.find_bucket_info(alias, async_req=True) - >>> result = thread.get() - - Args: - alias (str): The exact global alias of one of the existing buckets - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - BucketInfo - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['alias'] = \ - alias - return self.find_bucket_info_endpoint.call_with_http_info(**kwargs) - - def get_bucket_info( - self, - bucket_id, - **kwargs - ): - """Get a bucket # noqa: E501 - - Given a bucket identifier, get its information. It includes its aliases, its web configuration, keys that have some permissions on it, some statistics (number of objects, size), number of dangling multipart uploads, and its quotas (if any). # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_bucket_info(bucket_id, async_req=True) - >>> result = thread.get() - - Args: - bucket_id (str): The exact bucket identifier, a 32 bytes hexadecimal string - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - BucketInfo - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['bucket_id'] = \ - bucket_id - return self.get_bucket_info_endpoint.call_with_http_info(**kwargs) - - def list_buckets( - self, - **kwargs - ): - """List all buckets # noqa: E501 - - List all the buckets on the cluster with their UUID and their global and local aliases. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.list_buckets(async_req=True) - >>> result = thread.get() - - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - [ListBuckets200ResponseInner] - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - return self.list_buckets_endpoint.call_with_http_info(**kwargs) - - def put_bucket_global_alias( - self, - id, - alias, - **kwargs - ): - """Add a global alias # noqa: E501 - - Add a global alias to the target bucket # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.put_bucket_global_alias(id, alias, async_req=True) - >>> result = thread.get() - - Args: - id (str): - alias (str): - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - BucketInfo - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['id'] = \ - id - kwargs['alias'] = \ - alias - return self.put_bucket_global_alias_endpoint.call_with_http_info(**kwargs) - - def put_bucket_local_alias( - self, - id, - access_key_id, - alias, - **kwargs - ): - """Add a local alias # noqa: E501 - - Add a local alias, bound to specified account, to the target bucket # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.put_bucket_local_alias(id, access_key_id, alias, async_req=True) - >>> result = thread.get() - - Args: - id (str): - access_key_id (str): - alias (str): - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - BucketInfo - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['id'] = \ - id - kwargs['access_key_id'] = \ - access_key_id - kwargs['alias'] = \ - alias - return self.put_bucket_local_alias_endpoint.call_with_http_info(**kwargs) - - def update_bucket( - self, - bucket_id, - update_bucket_request, - **kwargs - ): - """Update a bucket # noqa: E501 - - All fields (`websiteAccess` and `quotas`) are optionnal. If they are present, the corresponding modifications are applied to the bucket, otherwise nothing is changed. In `websiteAccess`: if `enabled` is `true`, `indexDocument` must be specified. The field `errorDocument` is optional, if no error document is set a generic error message is displayed when errors happen. Conversely, if `enabled` is `false`, neither `indexDocument` nor `errorDocument` must be specified. In `quotas`: new values of `maxSize` and `maxObjects` must both be specified, or set to `null` to remove the quotas. An absent value will be considered the same as a `null`. It is not possible to change only one of the two quotas. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.update_bucket(bucket_id, update_bucket_request, async_req=True) - >>> result = thread.get() - - Args: - bucket_id (str): The exact bucket identifier, a 32 bytes hexadecimal string - update_bucket_request (UpdateBucketRequest): Requested changes on the bucket. Both root fields are optionals. - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - BucketInfo - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['bucket_id'] = \ - bucket_id - kwargs['update_bucket_request'] = \ - update_bucket_request - return self.update_bucket_endpoint.call_with_http_info(**kwargs) - diff --git a/python/garage_admin_sdk/api/key_api.py b/python/garage_admin_sdk/api/key_api.py deleted file mode 100644 index 3a651bb..0000000 --- a/python/garage_admin_sdk/api/key_api.py +++ /dev/null @@ -1,979 +0,0 @@ -""" - Garage Administration API v0+garage-v0.8.0 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.8.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from garage_admin_sdk.api_client import ApiClient, Endpoint as _Endpoint -from garage_admin_sdk.model_utils import ( # noqa: F401 - check_allowed_values, - check_validations, - date, - datetime, - file_type, - none_type, - validate_and_convert_types -) -from garage_admin_sdk.model.add_key_request import AddKeyRequest -from garage_admin_sdk.model.import_key_request import ImportKeyRequest -from garage_admin_sdk.model.key_info import KeyInfo -from garage_admin_sdk.model.list_keys200_response_inner import ListKeys200ResponseInner -from garage_admin_sdk.model.update_key_request import UpdateKeyRequest - - -class KeyApi(object): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - self.add_key_endpoint = _Endpoint( - settings={ - 'response_type': (KeyInfo,), - 'auth': [ - 'bearerAuth' - ], - 'endpoint_path': '/key', - 'operation_id': 'add_key', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'add_key_request', - ], - 'required': [ - 'add_key_request', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'add_key_request': - (AddKeyRequest,), - }, - 'attribute_map': { - }, - 'location_map': { - 'add_key_request': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.delete_key_endpoint = _Endpoint( - settings={ - 'response_type': None, - 'auth': [ - 'bearerAuth' - ], - 'endpoint_path': '/key?id={access_key}', - 'operation_id': 'delete_key', - 'http_method': 'DELETE', - 'servers': None, - }, - params_map={ - 'all': [ - 'access_key', - ], - 'required': [ - 'access_key', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'access_key': - (str,), - }, - 'attribute_map': { - 'access_key': 'access_key', - }, - 'location_map': { - 'access_key': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [], - 'content_type': [], - }, - api_client=api_client - ) - self.get_key_endpoint = _Endpoint( - settings={ - 'response_type': (KeyInfo,), - 'auth': [ - 'bearerAuth' - ], - 'endpoint_path': '/key?id={access_key}', - 'operation_id': 'get_key', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'access_key', - ], - 'required': [ - 'access_key', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'access_key': - (str,), - }, - 'attribute_map': { - 'access_key': 'access_key', - }, - 'location_map': { - 'access_key': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.import_key_endpoint = _Endpoint( - settings={ - 'response_type': (KeyInfo,), - 'auth': [ - 'bearerAuth' - ], - 'endpoint_path': '/key/import', - 'operation_id': 'import_key', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'import_key_request', - ], - 'required': [ - 'import_key_request', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'import_key_request': - (ImportKeyRequest,), - }, - 'attribute_map': { - }, - 'location_map': { - 'import_key_request': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.list_keys_endpoint = _Endpoint( - settings={ - 'response_type': ([ListKeys200ResponseInner],), - 'auth': [ - 'bearerAuth' - ], - 'endpoint_path': '/key', - 'operation_id': 'list_keys', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - ], - 'required': [], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - }, - 'attribute_map': { - }, - 'location_map': { - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.search_key_endpoint = _Endpoint( - settings={ - 'response_type': (KeyInfo,), - 'auth': [ - 'bearerAuth' - ], - 'endpoint_path': '/key?search={pattern}', - 'operation_id': 'search_key', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'pattern', - ], - 'required': [ - 'pattern', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'pattern': - (str,), - }, - 'attribute_map': { - 'pattern': 'pattern', - }, - 'location_map': { - 'pattern': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.update_key_endpoint = _Endpoint( - settings={ - 'response_type': (KeyInfo,), - 'auth': [ - 'bearerAuth' - ], - 'endpoint_path': '/key?id={access_key}', - 'operation_id': 'update_key', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'access_key', - 'update_key_request', - ], - 'required': [ - 'access_key', - 'update_key_request', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'access_key': - (str,), - 'update_key_request': - (UpdateKeyRequest,), - }, - 'attribute_map': { - 'access_key': 'access_key', - }, - 'location_map': { - 'access_key': 'path', - 'update_key_request': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - - def add_key( - self, - add_key_request, - **kwargs - ): - """Create a new API key # noqa: E501 - - Creates a new API access key. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.add_key(add_key_request, async_req=True) - >>> result = thread.get() - - Args: - add_key_request (AddKeyRequest): \"You can set a friendly name for this key, send an empty string instead\" - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - KeyInfo - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['add_key_request'] = \ - add_key_request - return self.add_key_endpoint.call_with_http_info(**kwargs) - - def delete_key( - self, - access_key, - **kwargs - ): - """Delete a key # noqa: E501 - - Delete a key from the cluster. Its access will be removed from all the buckets. Buckets are not automatically deleted and can be dangling. You should manually delete them before. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.delete_key(access_key, async_req=True) - >>> result = thread.get() - - Args: - access_key (str): The exact API access key generated by Garage - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - None - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['access_key'] = \ - access_key - return self.delete_key_endpoint.call_with_http_info(**kwargs) - - def get_key( - self, - access_key, - **kwargs - ): - """Get key information # noqa: E501 - - Return information about a specific key and return its information # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_key(access_key, async_req=True) - >>> result = thread.get() - - Args: - access_key (str): The exact API access key generated by Garage - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - KeyInfo - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['access_key'] = \ - access_key - return self.get_key_endpoint.call_with_http_info(**kwargs) - - def import_key( - self, - import_key_request, - **kwargs - ): - """Import an existing key # noqa: E501 - - Imports an existing API key. This feature must only be used for migrations and backup restore. **Do not use it to generate custom key identifiers or you will break your Garage cluster.** # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.import_key(import_key_request, async_req=True) - >>> result = thread.get() - - Args: - import_key_request (ImportKeyRequest): Information on the key to import - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - KeyInfo - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['import_key_request'] = \ - import_key_request - return self.import_key_endpoint.call_with_http_info(**kwargs) - - def list_keys( - self, - **kwargs - ): - """List all keys # noqa: E501 - - Returns all API access keys in the cluster. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.list_keys(async_req=True) - >>> result = thread.get() - - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - [ListKeys200ResponseInner] - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - return self.list_keys_endpoint.call_with_http_info(**kwargs) - - def search_key( - self, - pattern, - **kwargs - ): - """Select key by pattern # noqa: E501 - - Find the first key matching the given pattern based on its identifier aor friendly name and return its information. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.search_key(pattern, async_req=True) - >>> result = thread.get() - - Args: - pattern (str): A pattern (beginning or full string) corresponding to a key identifier or friendly name - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - KeyInfo - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['pattern'] = \ - pattern - return self.search_key_endpoint.call_with_http_info(**kwargs) - - def update_key( - self, - access_key, - update_key_request, - **kwargs - ): - """Update a key # noqa: E501 - - Updates information about the specified API access key. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.update_key(access_key, update_key_request, async_req=True) - >>> result = thread.get() - - Args: - access_key (str): The exact API access key generated by Garage - update_key_request (UpdateKeyRequest): For a given key, provide a first set with the permissions to grant, and a second set with the permissions to remove - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - KeyInfo - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['access_key'] = \ - access_key - kwargs['update_key_request'] = \ - update_key_request - return self.update_key_endpoint.call_with_http_info(**kwargs) - diff --git a/python/garage_admin_sdk/api/layout_api.py b/python/garage_admin_sdk/api/layout_api.py deleted file mode 100644 index 39785d7..0000000 --- a/python/garage_admin_sdk/api/layout_api.py +++ /dev/null @@ -1,561 +0,0 @@ -""" - Garage Administration API v0+garage-v0.8.0 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.8.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from garage_admin_sdk.api_client import ApiClient, Endpoint as _Endpoint -from garage_admin_sdk.model_utils import ( # noqa: F401 - check_allowed_values, - check_validations, - date, - datetime, - file_type, - none_type, - validate_and_convert_types -) -from garage_admin_sdk.model.cluster_layout import ClusterLayout -from garage_admin_sdk.model.layout_version import LayoutVersion -from garage_admin_sdk.model.node_cluster_info import NodeClusterInfo - - -class LayoutApi(object): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - self.add_layout_endpoint = _Endpoint( - settings={ - 'response_type': None, - 'auth': [ - 'bearerAuth' - ], - 'endpoint_path': '/layout', - 'operation_id': 'add_layout', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'request_body', - ], - 'required': [ - 'request_body', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'request_body': - ({str: (NodeClusterInfo,)},), - }, - 'attribute_map': { - }, - 'location_map': { - 'request_body': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.apply_layout_endpoint = _Endpoint( - settings={ - 'response_type': None, - 'auth': [ - 'bearerAuth' - ], - 'endpoint_path': '/layout/apply', - 'operation_id': 'apply_layout', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'layout_version', - ], - 'required': [ - 'layout_version', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'layout_version': - (LayoutVersion,), - }, - 'attribute_map': { - }, - 'location_map': { - 'layout_version': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.get_layout_endpoint = _Endpoint( - settings={ - 'response_type': (ClusterLayout,), - 'auth': [ - 'bearerAuth' - ], - 'endpoint_path': '/layout', - 'operation_id': 'get_layout', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - ], - 'required': [], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - }, - 'attribute_map': { - }, - 'location_map': { - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.revert_layout_endpoint = _Endpoint( - settings={ - 'response_type': None, - 'auth': [ - 'bearerAuth' - ], - 'endpoint_path': '/layout/revert', - 'operation_id': 'revert_layout', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'layout_version', - ], - 'required': [ - 'layout_version', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'layout_version': - (LayoutVersion,), - }, - 'attribute_map': { - }, - 'location_map': { - 'layout_version': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - - def add_layout( - self, - request_body, - **kwargs - ): - """Send modifications to the cluster layout # noqa: E501 - - Send modifications to the cluster layout. These modifications will be included in the staged role changes, visible in subsequent calls of `GET /layout`. Once the set of staged changes is satisfactory, the user may call `POST /layout/apply` to apply the changed changes, or `POST /layout/revert` to clear all of the staged changes in the layout. Note that setting the capacity to `null` will configure the node as a gateway. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.add_layout(request_body, async_req=True) - >>> result = thread.get() - - Args: - request_body ({str: (NodeClusterInfo,)}): To add a new node to the layout or to change the configuration of an existing node, simply set the values you want. To remove a node, set it to `null` instead of passing a configuration object. Contrary to the CLI that may update only a subset of the fields capacity, zone and tags, when calling this API all of these values must be specified. - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - None - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['request_body'] = \ - request_body - return self.add_layout_endpoint.call_with_http_info(**kwargs) - - def apply_layout( - self, - layout_version, - **kwargs - ): - """Apply staged layout # noqa: E501 - - Applies to the cluster the layout changes currently registered as staged layout changes. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.apply_layout(layout_version, async_req=True) - >>> result = thread.get() - - Args: - layout_version (LayoutVersion): Similarly to the CLI, the body must include the version of the new layout that will be created, which MUST be 1 + the value of the currently existing layout in the cluster. - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - None - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['layout_version'] = \ - layout_version - return self.apply_layout_endpoint.call_with_http_info(**kwargs) - - def get_layout( - self, - **kwargs - ): - """Details on the current and staged layout # noqa: E501 - - Returns the cluster's current layout, including: - Currently configured cluster layout - Staged changes to the cluster layout *The info returned by this endpoint is a subset of the info returned by `GET /status`.* # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_layout(async_req=True) - >>> result = thread.get() - - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - ClusterLayout - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - return self.get_layout_endpoint.call_with_http_info(**kwargs) - - def revert_layout( - self, - layout_version, - **kwargs - ): - """Clear staged layout # noqa: E501 - - Clears all of the staged layout changes. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.revert_layout(layout_version, async_req=True) - >>> result = thread.get() - - Args: - layout_version (LayoutVersion): Reverting the staged changes is done by incrementing the version number and clearing the contents of the staged change list. Similarly to the CLI, the body must include the incremented version number, which MUST be 1 + the value of the currently existing layout in the cluster. - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - None - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['layout_version'] = \ - layout_version - return self.revert_layout_endpoint.call_with_http_info(**kwargs) - diff --git a/python/garage_admin_sdk/api/membership_api.py b/python/garage_admin_sdk/api/membership_api.py deleted file mode 100644 index 761c6d8..0000000 --- a/python/garage_admin_sdk/api/membership_api.py +++ /dev/null @@ -1,167 +0,0 @@ -""" - Garage Administration API v0+garage-v0.7.3 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.7.3 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from garage_admin_sdk.api_client import ApiClient, Endpoint as _Endpoint -from garage_admin_sdk.model_utils import ( # noqa: F401 - check_allowed_values, - check_validations, - date, - datetime, - file_type, - none_type, - validate_and_convert_types -) -from garage_admin_sdk.model.add_node200_response_inner import AddNode200ResponseInner - - -class MembershipApi(object): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - self.add_node_endpoint = _Endpoint( - settings={ - 'response_type': ([AddNode200ResponseInner],), - 'auth': [ - 'bearerAuth' - ], - 'endpoint_path': '/connect', - 'operation_id': 'add_node', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'request_body', - ], - 'required': [], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'request_body': - ([str],), - }, - 'attribute_map': { - }, - 'location_map': { - 'request_body': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - - def add_node( - self, - **kwargs - ): - """Connect target node to other Garage nodes # noqa: E501 - - Instructs this Garage node to connect to other Garage nodes at specified `@`. `node_id` is generated automatically on node start. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.add_node(async_req=True) - >>> result = thread.get() - - - Keyword Args: - request_body ([str]): [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - [AddNode200ResponseInner] - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - return self.add_node_endpoint.call_with_http_info(**kwargs) - diff --git a/python/garage_admin_sdk/api/nodes_api.py b/python/garage_admin_sdk/api/nodes_api.py deleted file mode 100644 index acd2dbb..0000000 --- a/python/garage_admin_sdk/api/nodes_api.py +++ /dev/null @@ -1,296 +0,0 @@ -""" - Garage Administration API v0+garage-v0.8.0 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.8.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from garage_admin_sdk.api_client import ApiClient, Endpoint as _Endpoint -from garage_admin_sdk.model_utils import ( # noqa: F401 - check_allowed_values, - check_validations, - date, - datetime, - file_type, - none_type, - validate_and_convert_types -) -from garage_admin_sdk.model.add_node200_response_inner import AddNode200ResponseInner -from garage_admin_sdk.model.get_nodes200_response import GetNodes200Response - - -class NodesApi(object): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - self.add_node_endpoint = _Endpoint( - settings={ - 'response_type': ([AddNode200ResponseInner],), - 'auth': [ - 'bearerAuth' - ], - 'endpoint_path': '/connect', - 'operation_id': 'add_node', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'request_body', - ], - 'required': [ - 'request_body', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'request_body': - ([str],), - }, - 'attribute_map': { - }, - 'location_map': { - 'request_body': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.get_nodes_endpoint = _Endpoint( - settings={ - 'response_type': (GetNodes200Response,), - 'auth': [ - 'bearerAuth' - ], - 'endpoint_path': '/status', - 'operation_id': 'get_nodes', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - ], - 'required': [], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - }, - 'attribute_map': { - }, - 'location_map': { - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - - def add_node( - self, - request_body, - **kwargs - ): - """Connect target node to other Garage nodes # noqa: E501 - - Instructs this Garage node to connect to other Garage nodes at specified `@`. `node_id` is generated automatically on node start. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.add_node(request_body, async_req=True) - >>> result = thread.get() - - Args: - request_body ([str]): - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - [AddNode200ResponseInner] - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['request_body'] = \ - request_body - return self.add_node_endpoint.call_with_http_info(**kwargs) - - def get_nodes( - self, - **kwargs - ): - """Status of this node and other nodes in the cluster # noqa: E501 - - Returns the cluster's current status, including: - ID of the node being queried and its version of the Garage daemon - Live nodes - Currently configured cluster layout - Staged changes to the cluster layout # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_nodes(async_req=True) - >>> result = thread.get() - - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - GetNodes200Response - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - return self.get_nodes_endpoint.call_with_http_info(**kwargs) - diff --git a/python/garage_admin_sdk/api_client.py b/python/garage_admin_sdk/api_client.py deleted file mode 100644 index b0c6ca8..0000000 --- a/python/garage_admin_sdk/api_client.py +++ /dev/null @@ -1,896 +0,0 @@ -""" - Garage Administration API v0+garage-v0.8.0 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.8.0 - Generated by: https://openapi-generator.tech -""" - - -import json -import atexit -import mimetypes -from multiprocessing.pool import ThreadPool -import io -import os -import re -import typing -from urllib.parse import quote -from urllib3.fields import RequestField - - -from garage_admin_sdk import rest -from garage_admin_sdk.configuration import Configuration -from garage_admin_sdk.exceptions import ApiTypeError, ApiValueError, ApiException -from garage_admin_sdk.model_utils import ( - ModelNormal, - ModelSimple, - ModelComposed, - check_allowed_values, - check_validations, - date, - datetime, - deserialize_file, - file_type, - model_to_dict, - none_type, - validate_and_convert_types -) - - -class ApiClient(object): - """Generic API client for OpenAPI client library builds. - - OpenAPI generic API client. This client handles the client- - server communication, and is invariant across implementations. Specifics of - the methods and models for each application are generated from the OpenAPI - templates. - - NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - Do not edit the class manually. - - :param configuration: .Configuration object for this client - :param header_name: a header to pass when making calls to the API. - :param header_value: a header value to pass when making calls to - the API. - :param cookie: a cookie to include in the header when making calls - to the API - :param pool_threads: The number of threads to use for async requests - to the API. More threads means more concurrent API requests. - """ - - _pool = None - - def __init__(self, configuration=None, header_name=None, header_value=None, - cookie=None, pool_threads=1): - if configuration is None: - configuration = Configuration.get_default_copy() - self.configuration = configuration - self.pool_threads = pool_threads - - self.rest_client = rest.RESTClientObject(configuration) - self.default_headers = {} - if header_name is not None: - self.default_headers[header_name] = header_value - self.cookie = cookie - # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/0.8.0/python' - - def __enter__(self): - return self - - def __exit__(self, exc_type, exc_value, traceback): - self.close() - - def close(self): - if self._pool: - self._pool.close() - self._pool.join() - self._pool = None - if hasattr(atexit, 'unregister'): - atexit.unregister(self.close) - - @property - def pool(self): - """Create thread pool on first request - avoids instantiating unused threadpool for blocking clients. - """ - if self._pool is None: - atexit.register(self.close) - self._pool = ThreadPool(self.pool_threads) - return self._pool - - @property - def user_agent(self): - """User agent for this API client""" - return self.default_headers['User-Agent'] - - @user_agent.setter - def user_agent(self, value): - self.default_headers['User-Agent'] = value - - def set_default_header(self, header_name, header_value): - self.default_headers[header_name] = header_value - - def __call_api( - self, - resource_path: str, - method: str, - path_params: typing.Optional[typing.Dict[str, typing.Any]] = None, - query_params: typing.Optional[typing.List[typing.Tuple[str, typing.Any]]] = None, - header_params: typing.Optional[typing.Dict[str, typing.Any]] = None, - body: typing.Optional[typing.Any] = None, - post_params: typing.Optional[typing.List[typing.Tuple[str, typing.Any]]] = None, - files: typing.Optional[typing.Dict[str, typing.List[io.IOBase]]] = None, - response_type: typing.Optional[typing.Tuple[typing.Any]] = None, - auth_settings: typing.Optional[typing.List[str]] = None, - _return_http_data_only: typing.Optional[bool] = None, - collection_formats: typing.Optional[typing.Dict[str, str]] = None, - _preload_content: bool = True, - _request_timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - _host: typing.Optional[str] = None, - _check_type: typing.Optional[bool] = None, - _content_type: typing.Optional[str] = None, - _request_auths: typing.Optional[typing.List[typing.Dict[str, typing.Any]]] = None - ): - - config = self.configuration - - # header parameters - header_params = header_params or {} - header_params.update(self.default_headers) - if self.cookie: - header_params['Cookie'] = self.cookie - if header_params: - header_params = self.sanitize_for_serialization(header_params) - header_params = dict(self.parameters_to_tuples(header_params, - collection_formats)) - - # path parameters - if path_params: - path_params = self.sanitize_for_serialization(path_params) - path_params = self.parameters_to_tuples(path_params, - collection_formats) - for k, v in path_params: - # specified safe chars, encode everything - resource_path = resource_path.replace( - '{%s}' % k, - quote(str(v), safe=config.safe_chars_for_path_param) - ) - - # query parameters - if query_params: - query_params = self.sanitize_for_serialization(query_params) - query_params = self.parameters_to_tuples(query_params, - collection_formats) - - # post parameters - if post_params or files: - post_params = post_params if post_params else [] - post_params = self.sanitize_for_serialization(post_params) - post_params = self.parameters_to_tuples(post_params, - collection_formats) - post_params.extend(self.files_parameters(files)) - if header_params['Content-Type'].startswith("multipart"): - post_params = self.parameters_to_multipart(post_params, - (dict)) - - # body - if body: - body = self.sanitize_for_serialization(body) - - # auth setting - self.update_params_for_auth(header_params, query_params, - auth_settings, resource_path, method, body, - request_auths=_request_auths) - - # request url - if _host is None: - url = self.configuration.host + resource_path - else: - # use server/host defined in path or operation instead - url = _host + resource_path - - try: - # perform request and return response - response_data = self.request( - method, url, query_params=query_params, headers=header_params, - post_params=post_params, body=body, - _preload_content=_preload_content, - _request_timeout=_request_timeout) - except ApiException as e: - e.body = e.body.decode('utf-8') - raise e - - self.last_response = response_data - - return_data = response_data - - if not _preload_content: - return (return_data) - return return_data - - # deserialize response data - if response_type: - if response_type != (file_type,): - encoding = "utf-8" - content_type = response_data.getheader('content-type') - if content_type is not None: - match = re.search(r"charset=([a-zA-Z\-\d]+)[\s\;]?", content_type) - if match: - encoding = match.group(1) - response_data.data = response_data.data.decode(encoding) - - return_data = self.deserialize( - response_data, - response_type, - _check_type - ) - else: - return_data = None - - if _return_http_data_only: - return (return_data) - else: - return (return_data, response_data.status, - response_data.getheaders()) - - def parameters_to_multipart(self, params, collection_types): - """Get parameters as list of tuples, formatting as json if value is collection_types - - :param params: Parameters as list of two-tuples - :param dict collection_types: Parameter collection types - :return: Parameters as list of tuple or urllib3.fields.RequestField - """ - new_params = [] - if collection_types is None: - collection_types = (dict) - for k, v in params.items() if isinstance(params, dict) else params: # noqa: E501 - if isinstance( - v, collection_types): # v is instance of collection_type, formatting as application/json - v = json.dumps(v, ensure_ascii=False).encode("utf-8") - field = RequestField(k, v) - field.make_multipart(content_type="application/json; charset=utf-8") - new_params.append(field) - else: - new_params.append((k, v)) - return new_params - - @classmethod - def sanitize_for_serialization(cls, obj): - """Prepares data for transmission before it is sent with the rest client - If obj is None, return None. - If obj is str, int, long, float, bool, return directly. - If obj is datetime.datetime, datetime.date - convert to string in iso8601 format. - If obj is list, sanitize each element in the list. - If obj is dict, return the dict. - If obj is OpenAPI model, return the properties dict. - If obj is io.IOBase, return the bytes - :param obj: The data to serialize. - :return: The serialized form of data. - """ - if isinstance(obj, (ModelNormal, ModelComposed)): - return { - key: cls.sanitize_for_serialization(val) for key, - val in model_to_dict( - obj, - serialize=True).items()} - elif isinstance(obj, io.IOBase): - return cls.get_file_data_and_close_file(obj) - elif isinstance(obj, (str, int, float, none_type, bool)): - return obj - elif isinstance(obj, (datetime, date)): - return obj.isoformat() - elif isinstance(obj, ModelSimple): - return cls.sanitize_for_serialization(obj.value) - elif isinstance(obj, (list, tuple)): - return [cls.sanitize_for_serialization(item) for item in obj] - if isinstance(obj, dict): - return {key: cls.sanitize_for_serialization(val) for key, val in obj.items()} - raise ApiValueError( - 'Unable to prepare type {} for serialization'.format( - obj.__class__.__name__)) - - def deserialize(self, response, response_type, _check_type): - """Deserializes response into an object. - - :param response: RESTResponse object to be deserialized. - :param response_type: For the response, a tuple containing: - valid classes - a list containing valid classes (for list schemas) - a dict containing a tuple of valid classes as the value - Example values: - (str,) - (Pet,) - (float, none_type) - ([int, none_type],) - ({str: (bool, str, int, float, date, datetime, str, none_type)},) - :param _check_type: boolean, whether to check the types of the data - received from the server - :type _check_type: bool - - :return: deserialized object. - """ - # handle file downloading - # save response body into a tmp file and return the instance - if response_type == (file_type,): - content_disposition = response.getheader("Content-Disposition") - return deserialize_file(response.data, self.configuration, - content_disposition=content_disposition) - - # fetch data from response object - try: - received_data = json.loads(response.data) - except ValueError: - received_data = response.data - - # store our data under the key of 'received_data' so users have some - # context if they are deserializing a string and the data type is wrong - deserialized_data = validate_and_convert_types( - received_data, - response_type, - ['received_data'], - True, - _check_type, - configuration=self.configuration - ) - return deserialized_data - - def call_api( - self, - resource_path: str, - method: str, - path_params: typing.Optional[typing.Dict[str, typing.Any]] = None, - query_params: typing.Optional[typing.List[typing.Tuple[str, typing.Any]]] = None, - header_params: typing.Optional[typing.Dict[str, typing.Any]] = None, - body: typing.Optional[typing.Any] = None, - post_params: typing.Optional[typing.List[typing.Tuple[str, typing.Any]]] = None, - files: typing.Optional[typing.Dict[str, typing.List[io.IOBase]]] = None, - response_type: typing.Optional[typing.Tuple[typing.Any]] = None, - auth_settings: typing.Optional[typing.List[str]] = None, - async_req: typing.Optional[bool] = None, - _return_http_data_only: typing.Optional[bool] = None, - collection_formats: typing.Optional[typing.Dict[str, str]] = None, - _preload_content: bool = True, - _request_timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - _host: typing.Optional[str] = None, - _check_type: typing.Optional[bool] = None, - _request_auths: typing.Optional[typing.List[typing.Dict[str, typing.Any]]] = None - ): - """Makes the HTTP request (synchronous) and returns deserialized data. - - To make an async_req request, set the async_req parameter. - - :param resource_path: Path to method endpoint. - :param method: Method to call. - :param path_params: Path parameters in the url. - :param query_params: Query parameters in the url. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param auth_settings list: Auth Settings names for the request. - :param response_type: For the response, a tuple containing: - valid classes - a list containing valid classes (for list schemas) - a dict containing a tuple of valid classes as the value - Example values: - (str,) - (Pet,) - (float, none_type) - ([int, none_type],) - ({str: (bool, str, int, float, date, datetime, str, none_type)},) - :param files: key -> field name, value -> a list of open file - objects for `multipart/form-data`. - :type files: dict - :param async_req bool: execute request asynchronously - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param collection_formats: dict of collection formats for path, query, - header, and post parameters. - :type collection_formats: dict, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _check_type: boolean describing if the data back from the server - should have its type checked. - :type _check_type: bool, optional - :param _request_auths: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auths: list, optional - :return: - If async_req parameter is True, - the request will be called asynchronously. - The method will return the request thread. - If parameter async_req is False or missing, - then the method will return the response directly. - """ - if not async_req: - return self.__call_api(resource_path, method, - path_params, query_params, header_params, - body, post_params, files, - response_type, auth_settings, - _return_http_data_only, collection_formats, - _preload_content, _request_timeout, _host, - _check_type, _request_auths=_request_auths) - - return self.pool.apply_async(self.__call_api, (resource_path, - method, path_params, - query_params, - header_params, body, - post_params, files, - response_type, - auth_settings, - _return_http_data_only, - collection_formats, - _preload_content, - _request_timeout, - _host, _check_type, None, _request_auths)) - - def request(self, method, url, query_params=None, headers=None, - post_params=None, body=None, _preload_content=True, - _request_timeout=None): - """Makes the HTTP request using RESTClient.""" - if method == "GET": - return self.rest_client.GET(url, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - headers=headers) - elif method == "HEAD": - return self.rest_client.HEAD(url, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - headers=headers) - elif method == "OPTIONS": - return self.rest_client.OPTIONS(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "POST": - return self.rest_client.POST(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "PUT": - return self.rest_client.PUT(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "PATCH": - return self.rest_client.PATCH(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "DELETE": - return self.rest_client.DELETE(url, - query_params=query_params, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - else: - raise ApiValueError( - "http method must be `GET`, `HEAD`, `OPTIONS`," - " `POST`, `PATCH`, `PUT` or `DELETE`." - ) - - def parameters_to_tuples(self, params, collection_formats): - """Get parameters as list of tuples, formatting collections. - - :param params: Parameters as dict or list of two-tuples - :param dict collection_formats: Parameter collection formats - :return: Parameters as list of tuples, collections formatted - """ - new_params = [] - if collection_formats is None: - collection_formats = {} - for k, v in params.items() if isinstance(params, dict) else params: # noqa: E501 - if k in collection_formats: - collection_format = collection_formats[k] - if collection_format == 'multi': - new_params.extend((k, value) for value in v) - else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' - else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(str(value) for value in v))) - else: - new_params.append((k, v)) - return new_params - - @staticmethod - def get_file_data_and_close_file(file_instance: io.IOBase) -> bytes: - file_data = file_instance.read() - file_instance.close() - return file_data - - def files_parameters(self, - files: typing.Optional[typing.Dict[str, - typing.List[io.IOBase]]] = None): - """Builds form parameters. - - :param files: None or a dict with key=param_name and - value is a list of open file objects - :return: List of tuples of form parameters with file data - """ - if files is None: - return [] - - params = [] - for param_name, file_instances in files.items(): - if file_instances is None: - # if the file field is nullable, skip None values - continue - for file_instance in file_instances: - if file_instance is None: - # if the file field is nullable, skip None values - continue - if file_instance.closed is True: - raise ApiValueError( - "Cannot read a closed file. The passed in file_type " - "for %s must be open." % param_name - ) - filename = os.path.basename(file_instance.name) - filedata = self.get_file_data_and_close_file(file_instance) - mimetype = (mimetypes.guess_type(filename)[0] or - 'application/octet-stream') - params.append( - tuple([param_name, tuple([filename, filedata, mimetype])])) - - return params - - def select_header_accept(self, accepts): - """Returns `Accept` based on an array of accepts provided. - - :param accepts: List of headers. - :return: Accept (e.g. application/json). - """ - if not accepts: - return - - accepts = [x.lower() for x in accepts] - - if 'application/json' in accepts: - return 'application/json' - else: - return ', '.join(accepts) - - def select_header_content_type(self, content_types, method=None, body=None): - """Returns `Content-Type` based on an array of content_types provided. - - :param content_types: List of content-types. - :param method: http method (e.g. POST, PATCH). - :param body: http body to send. - :return: Content-Type (e.g. application/json). - """ - if not content_types: - return None - - content_types = [x.lower() for x in content_types] - - if (method == 'PATCH' and - 'application/json-patch+json' in content_types and - isinstance(body, list)): - return 'application/json-patch+json' - - if 'application/json' in content_types or '*/*' in content_types: - return 'application/json' - else: - return content_types[0] - - def update_params_for_auth(self, headers, queries, auth_settings, - resource_path, method, body, request_auths=None): - """Updates header and query params based on authentication setting. - - :param headers: Header parameters dict to be updated. - :param queries: Query parameters tuple list to be updated. - :param auth_settings: Authentication setting identifiers list. - :param resource_path: A string representation of the HTTP request resource path. - :param method: A string representation of the HTTP request method. - :param body: A object representing the body of the HTTP request. - The object type is the return value of _encoder.default(). - :param request_auths: if set, the provided settings will - override the token in the configuration. - """ - if not auth_settings: - return - - if request_auths: - for auth_setting in request_auths: - self._apply_auth_params( - headers, queries, resource_path, method, body, auth_setting) - return - - for auth in auth_settings: - auth_setting = self.configuration.auth_settings().get(auth) - if auth_setting: - self._apply_auth_params( - headers, queries, resource_path, method, body, auth_setting) - - def _apply_auth_params(self, headers, queries, resource_path, method, body, auth_setting): - if auth_setting['in'] == 'cookie': - headers['Cookie'] = auth_setting['key'] + "=" + auth_setting['value'] - elif auth_setting['in'] == 'header': - if auth_setting['type'] != 'http-signature': - headers[auth_setting['key']] = auth_setting['value'] - elif auth_setting['in'] == 'query': - queries.append((auth_setting['key'], auth_setting['value'])) - else: - raise ApiValueError( - 'Authentication token must be in `query` or `header`' - ) - - -class Endpoint(object): - def __init__(self, settings=None, params_map=None, root_map=None, - headers_map=None, api_client=None, callable=None): - """Creates an endpoint - - Args: - settings (dict): see below key value pairs - 'response_type' (tuple/None): response type - 'auth' (list): a list of auth type keys - 'endpoint_path' (str): the endpoint path - 'operation_id' (str): endpoint string identifier - 'http_method' (str): POST/PUT/PATCH/GET etc - 'servers' (list): list of str servers that this endpoint is at - params_map (dict): see below key value pairs - 'all' (list): list of str endpoint parameter names - 'required' (list): list of required parameter names - 'nullable' (list): list of nullable parameter names - 'enum' (list): list of parameters with enum values - 'validation' (list): list of parameters with validations - root_map - 'validations' (dict): the dict mapping endpoint parameter tuple - paths to their validation dictionaries - 'allowed_values' (dict): the dict mapping endpoint parameter - tuple paths to their allowed_values (enum) dictionaries - 'openapi_types' (dict): param_name to openapi type - 'attribute_map' (dict): param_name to camelCase name - 'location_map' (dict): param_name to 'body', 'file', 'form', - 'header', 'path', 'query' - collection_format_map (dict): param_name to `csv` etc. - headers_map (dict): see below key value pairs - 'accept' (list): list of Accept header strings - 'content_type' (list): list of Content-Type header strings - api_client (ApiClient) api client instance - callable (function): the function which is invoked when the - Endpoint is called - """ - self.settings = settings - self.params_map = params_map - self.params_map['all'].extend([ - 'async_req', - '_host_index', - '_preload_content', - '_request_timeout', - '_return_http_data_only', - '_check_input_type', - '_check_return_type', - '_content_type', - '_spec_property_naming', - '_request_auths' - ]) - self.params_map['nullable'].extend(['_request_timeout']) - self.validations = root_map['validations'] - self.allowed_values = root_map['allowed_values'] - self.openapi_types = root_map['openapi_types'] - extra_types = { - 'async_req': (bool,), - '_host_index': (none_type, int), - '_preload_content': (bool,), - '_request_timeout': (none_type, float, (float,), [float], int, (int,), [int]), - '_return_http_data_only': (bool,), - '_check_input_type': (bool,), - '_check_return_type': (bool,), - '_spec_property_naming': (bool,), - '_content_type': (none_type, str), - '_request_auths': (none_type, list) - } - self.openapi_types.update(extra_types) - self.attribute_map = root_map['attribute_map'] - self.location_map = root_map['location_map'] - self.collection_format_map = root_map['collection_format_map'] - self.headers_map = headers_map - self.api_client = api_client - self.callable = callable - - def __validate_inputs(self, kwargs): - for param in self.params_map['enum']: - if param in kwargs: - check_allowed_values( - self.allowed_values, - (param,), - kwargs[param] - ) - - for param in self.params_map['validation']: - if param in kwargs: - check_validations( - self.validations, - (param,), - kwargs[param], - configuration=self.api_client.configuration - ) - - if kwargs['_check_input_type'] is False: - return - - for key, value in kwargs.items(): - fixed_val = validate_and_convert_types( - value, - self.openapi_types[key], - [key], - kwargs['_spec_property_naming'], - kwargs['_check_input_type'], - configuration=self.api_client.configuration - ) - kwargs[key] = fixed_val - - def __gather_params(self, kwargs): - params = { - 'body': None, - 'collection_format': {}, - 'file': {}, - 'form': [], - 'header': {}, - 'path': {}, - 'query': [] - } - - for param_name, param_value in kwargs.items(): - param_location = self.location_map.get(param_name) - if param_location is None: - continue - if param_location: - if param_location == 'body': - params['body'] = param_value - continue - base_name = self.attribute_map[param_name] - if (param_location == 'form' and - self.openapi_types[param_name] == (file_type,)): - params['file'][base_name] = [param_value] - elif (param_location == 'form' and - self.openapi_types[param_name] == ([file_type],)): - # param_value is already a list - params['file'][base_name] = param_value - elif param_location in {'form', 'query'}: - param_value_full = (base_name, param_value) - params[param_location].append(param_value_full) - if param_location not in {'form', 'query'}: - params[param_location][base_name] = param_value - collection_format = self.collection_format_map.get(param_name) - if collection_format: - params['collection_format'][base_name] = collection_format - - return params - - def __call__(self, *args, **kwargs): - """ This method is invoked when endpoints are called - Example: - - api_instance = BucketApi() - api_instance.allow_bucket_key # this is an instance of the class Endpoint - api_instance.allow_bucket_key() # this invokes api_instance.allow_bucket_key.__call__() - which then invokes the callable functions stored in that endpoint at - api_instance.allow_bucket_key.callable or self.callable in this class - - """ - return self.callable(self, *args, **kwargs) - - def call_with_http_info(self, **kwargs): - - try: - index = self.api_client.configuration.server_operation_index.get( - self.settings['operation_id'], self.api_client.configuration.server_index - ) if kwargs['_host_index'] is None else kwargs['_host_index'] - server_variables = self.api_client.configuration.server_operation_variables.get( - self.settings['operation_id'], self.api_client.configuration.server_variables - ) - _host = self.api_client.configuration.get_host_from_settings( - index, variables=server_variables, servers=self.settings['servers'] - ) - except IndexError: - if self.settings['servers']: - raise ApiValueError( - "Invalid host index. Must be 0 <= index < %s" % - len(self.settings['servers']) - ) - _host = None - - for key, value in kwargs.items(): - if key not in self.params_map['all']: - raise ApiTypeError( - "Got an unexpected parameter '%s'" - " to method `%s`" % - (key, self.settings['operation_id']) - ) - # only throw this nullable ApiValueError if _check_input_type - # is False, if _check_input_type==True we catch this case - # in self.__validate_inputs - if (key not in self.params_map['nullable'] and value is None - and kwargs['_check_input_type'] is False): - raise ApiValueError( - "Value may not be None for non-nullable parameter `%s`" - " when calling `%s`" % - (key, self.settings['operation_id']) - ) - - for key in self.params_map['required']: - if key not in kwargs.keys(): - raise ApiValueError( - "Missing the required parameter `%s` when calling " - "`%s`" % (key, self.settings['operation_id']) - ) - - self.__validate_inputs(kwargs) - - params = self.__gather_params(kwargs) - - accept_headers_list = self.headers_map['accept'] - if accept_headers_list: - params['header']['Accept'] = self.api_client.select_header_accept( - accept_headers_list) - - if kwargs.get('_content_type'): - params['header']['Content-Type'] = kwargs['_content_type'] - else: - content_type_headers_list = self.headers_map['content_type'] - if content_type_headers_list: - if params['body'] != "": - content_types_list = self.api_client.select_header_content_type( - content_type_headers_list, self.settings['http_method'], - params['body']) - if content_types_list: - params['header']['Content-Type'] = content_types_list - - return self.api_client.call_api( - self.settings['endpoint_path'], self.settings['http_method'], - params['path'], - params['query'], - params['header'], - body=params['body'], - post_params=params['form'], - files=params['file'], - response_type=self.settings['response_type'], - auth_settings=self.settings['auth'], - async_req=kwargs['async_req'], - _check_type=kwargs['_check_return_type'], - _return_http_data_only=kwargs['_return_http_data_only'], - _preload_content=kwargs['_preload_content'], - _request_timeout=kwargs['_request_timeout'], - _host=_host, - _request_auths=kwargs['_request_auths'], - collection_formats=params['collection_format']) diff --git a/python/garage_admin_sdk/apis/__init__.py b/python/garage_admin_sdk/apis/__init__.py deleted file mode 100644 index e9327b7..0000000 --- a/python/garage_admin_sdk/apis/__init__.py +++ /dev/null @@ -1,20 +0,0 @@ - -# flake8: noqa - -# Import all APIs into this package. -# If you have many APIs here with many many models used in each API this may -# raise a `RecursionError`. -# In order to avoid this, import only the API that you directly need like: -# -# from garage_admin_sdk.api.bucket_api import BucketApi -# -# or import this package, but before doing it, use: -# -# import sys -# sys.setrecursionlimit(n) - -# Import APIs into API package: -from garage_admin_sdk.api.bucket_api import BucketApi -from garage_admin_sdk.api.key_api import KeyApi -from garage_admin_sdk.api.layout_api import LayoutApi -from garage_admin_sdk.api.nodes_api import NodesApi diff --git a/python/garage_admin_sdk/configuration.py b/python/garage_admin_sdk/configuration.py deleted file mode 100644 index 89375ba..0000000 --- a/python/garage_admin_sdk/configuration.py +++ /dev/null @@ -1,454 +0,0 @@ -""" - Garage Administration API v0+garage-v0.8.0 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.8.0 - Generated by: https://openapi-generator.tech -""" - - -import copy -import logging -import multiprocessing -import sys -import urllib3 - -from http import client as http_client -from garage_admin_sdk.exceptions import ApiValueError - - -JSON_SCHEMA_VALIDATION_KEYWORDS = { - 'multipleOf', 'maximum', 'exclusiveMaximum', - 'minimum', 'exclusiveMinimum', 'maxLength', - 'minLength', 'pattern', 'maxItems', 'minItems' -} - -class Configuration(object): - """NOTE: This class is auto generated by OpenAPI Generator - - Ref: https://openapi-generator.tech - Do not edit the class manually. - - :param host: Base url - :param api_key: Dict to store API key(s). - Each entry in the dict specifies an API key. - The dict key is the name of the security scheme in the OAS specification. - The dict value is the API key secret. - :param api_key_prefix: Dict to store API prefix (e.g. Bearer) - The dict key is the name of the security scheme in the OAS specification. - The dict value is an API key prefix when generating the auth data. - :param username: Username for HTTP basic authentication - :param password: Password for HTTP basic authentication - :param discard_unknown_keys: Boolean value indicating whether to discard - unknown properties. A server may send a response that includes additional - properties that are not known by the client in the following scenarios: - 1. The OpenAPI document is incomplete, i.e. it does not match the server - implementation. - 2. The client was generated using an older version of the OpenAPI document - and the server has been upgraded since then. - If a schema in the OpenAPI document defines the additionalProperties attribute, - then all undeclared properties received by the server are injected into the - additional properties map. In that case, there are undeclared properties, and - nothing to discard. - :param disabled_client_side_validations (string): Comma-separated list of - JSON schema validation keywords to disable JSON schema structural validation - rules. The following keywords may be specified: multipleOf, maximum, - exclusiveMaximum, minimum, exclusiveMinimum, maxLength, minLength, pattern, - maxItems, minItems. - By default, the validation is performed for data generated locally by the client - and data received from the server, independent of any validation performed by - the server side. If the input data does not satisfy the JSON schema validation - rules specified in the OpenAPI document, an exception is raised. - If disabled_client_side_validations is set, structural validation is - disabled. This can be useful to troubleshoot data validation problem, such as - when the OpenAPI document validation rules do not match the actual API data - received by the server. - :param server_index: Index to servers configuration. - :param server_variables: Mapping with string values to replace variables in - templated server configuration. The validation of enums is performed for - variables with defined enum values before. - :param server_operation_index: Mapping from operation ID to an index to server - configuration. - :param server_operation_variables: Mapping from operation ID to a mapping with - string values to replace variables in templated server configuration. - The validation of enums is performed for variables with defined enum values before. - :param ssl_ca_cert: str - the path to a file of concatenated CA certificates - in PEM format - - :Example: - """ - - _default = None - - def __init__(self, host=None, - api_key=None, api_key_prefix=None, - access_token=None, - username=None, password=None, - discard_unknown_keys=False, - disabled_client_side_validations="", - server_index=None, server_variables=None, - server_operation_index=None, server_operation_variables=None, - ssl_ca_cert=None, - ): - """Constructor - """ - self._base_path = "http://localhost:3903/v0" if host is None else host - """Default Base url - """ - self.server_index = 0 if server_index is None and host is None else server_index - self.server_operation_index = server_operation_index or {} - """Default server index - """ - self.server_variables = server_variables or {} - self.server_operation_variables = server_operation_variables or {} - """Default server variables - """ - self.temp_folder_path = None - """Temp file folder for downloading files - """ - # Authentication Settings - self.access_token = access_token - self.api_key = {} - if api_key: - self.api_key = api_key - """dict to store API key(s) - """ - self.api_key_prefix = {} - if api_key_prefix: - self.api_key_prefix = api_key_prefix - """dict to store API prefix (e.g. Bearer) - """ - self.refresh_api_key_hook = None - """function hook to refresh API key if expired - """ - self.username = username - """Username for HTTP basic authentication - """ - self.password = password - """Password for HTTP basic authentication - """ - self.discard_unknown_keys = discard_unknown_keys - self.disabled_client_side_validations = disabled_client_side_validations - self.logger = {} - """Logging Settings - """ - self.logger["package_logger"] = logging.getLogger("garage_admin_sdk") - self.logger["urllib3_logger"] = logging.getLogger("urllib3") - self.logger_format = '%(asctime)s %(levelname)s %(message)s' - """Log format - """ - self.logger_stream_handler = None - """Log stream handler - """ - self.logger_file_handler = None - """Log file handler - """ - self.logger_file = None - """Debug file location - """ - self.debug = False - """Debug switch - """ - - self.verify_ssl = True - """SSL/TLS verification - Set this to false to skip verifying SSL certificate when calling API - from https server. - """ - self.ssl_ca_cert = ssl_ca_cert - """Set this to customize the certificate file to verify the peer. - """ - self.cert_file = None - """client certificate file - """ - self.key_file = None - """client key file - """ - self.assert_hostname = None - """Set this to True/False to enable/disable SSL hostname verification. - """ - - self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 - """urllib3 connection pool's maximum number of connections saved - per pool. urllib3 uses 1 connection as default value, but this is - not the best value when you are making a lot of possibly parallel - requests to the same host, which is often the case here. - cpu_count * 5 is used as default value to increase performance. - """ - - self.proxy = None - """Proxy URL - """ - self.no_proxy = None - """bypass proxy for host in the no_proxy list. - """ - self.proxy_headers = None - """Proxy headers - """ - self.safe_chars_for_path_param = '' - """Safe chars for path_param - """ - self.retries = None - """Adding retries to override urllib3 default value 3 - """ - # Enable client side validation - self.client_side_validation = True - - # Options to pass down to the underlying urllib3 socket - self.socket_options = None - - def __deepcopy__(self, memo): - cls = self.__class__ - result = cls.__new__(cls) - memo[id(self)] = result - for k, v in self.__dict__.items(): - if k not in ('logger', 'logger_file_handler'): - setattr(result, k, copy.deepcopy(v, memo)) - # shallow copy of loggers - result.logger = copy.copy(self.logger) - # use setters to configure loggers - result.logger_file = self.logger_file - result.debug = self.debug - return result - - def __setattr__(self, name, value): - object.__setattr__(self, name, value) - if name == 'disabled_client_side_validations': - s = set(filter(None, value.split(','))) - for v in s: - if v not in JSON_SCHEMA_VALIDATION_KEYWORDS: - raise ApiValueError( - "Invalid keyword: '{0}''".format(v)) - self._disabled_client_side_validations = s - - @classmethod - def set_default(cls, default): - """Set default instance of configuration. - - It stores default configuration, which can be - returned by get_default_copy method. - - :param default: object of Configuration - """ - cls._default = copy.deepcopy(default) - - @classmethod - def get_default_copy(cls): - """Return new instance of configuration. - - This method returns newly created, based on default constructor, - object of Configuration class or returns a copy of default - configuration passed by the set_default method. - - :return: The configuration object. - """ - if cls._default is not None: - return copy.deepcopy(cls._default) - return Configuration() - - @property - def logger_file(self): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - return self.__logger_file - - @logger_file.setter - def logger_file(self, value): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - self.__logger_file = value - if self.__logger_file: - # If set logging file, - # then add file handler and remove stream handler. - self.logger_file_handler = logging.FileHandler(self.__logger_file) - self.logger_file_handler.setFormatter(self.logger_formatter) - for _, logger in self.logger.items(): - logger.addHandler(self.logger_file_handler) - - @property - def debug(self): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - return self.__debug - - @debug.setter - def debug(self, value): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - self.__debug = value - if self.__debug: - # if debug status is True, turn on debug logging - for _, logger in self.logger.items(): - logger.setLevel(logging.DEBUG) - # turn on http_client debug - http_client.HTTPConnection.debuglevel = 1 - else: - # if debug status is False, turn off debug logging, - # setting log level to default `logging.WARNING` - for _, logger in self.logger.items(): - logger.setLevel(logging.WARNING) - # turn off http_client debug - http_client.HTTPConnection.debuglevel = 0 - - @property - def logger_format(self): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - return self.__logger_format - - @logger_format.setter - def logger_format(self, value): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - self.__logger_format = value - self.logger_formatter = logging.Formatter(self.__logger_format) - - def get_api_key_with_prefix(self, identifier, alias=None): - """Gets API key (with prefix if set). - - :param identifier: The identifier of apiKey. - :param alias: The alternative identifier of apiKey. - :return: The token for api key authentication. - """ - if self.refresh_api_key_hook is not None: - self.refresh_api_key_hook(self) - key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) - if key: - prefix = self.api_key_prefix.get(identifier) - if prefix: - return "%s %s" % (prefix, key) - else: - return key - - def get_basic_auth_token(self): - """Gets HTTP basic authentication header (string). - - :return: The token for basic HTTP authentication. - """ - username = "" - if self.username is not None: - username = self.username - password = "" - if self.password is not None: - password = self.password - return urllib3.util.make_headers( - basic_auth=username + ':' + password - ).get('authorization') - - def auth_settings(self): - """Gets Auth Settings dict for api client. - - :return: The Auth Settings information dict. - """ - auth = {} - if self.access_token is not None: - auth['bearerAuth'] = { - 'type': 'bearer', - 'in': 'header', - 'key': 'Authorization', - 'value': 'Bearer ' + self.access_token - } - return auth - - def to_debug_report(self): - """Gets the essential information for debugging. - - :return: The report for debugging. - """ - return "Python SDK Debug Report:\n"\ - "OS: {env}\n"\ - "Python Version: {pyversion}\n"\ - "Version of the API: v0.8.0\n"\ - "SDK Package Version: 0.8.0".\ - format(env=sys.platform, pyversion=sys.version) - - def get_host_settings(self): - """Gets an array of host settings - - :return: An array of host settings - """ - return [ - { - 'url': "http://localhost:3903/v0", - 'description': "A local server", - } - ] - - def get_host_from_settings(self, index, variables=None, servers=None): - """Gets host URL based on the index and variables - :param index: array index of the host settings - :param variables: hash of variable and the corresponding value - :param servers: an array of host settings or None - :return: URL based on host settings - """ - if index is None: - return self._base_path - - variables = {} if variables is None else variables - servers = self.get_host_settings() if servers is None else servers - - try: - server = servers[index] - except IndexError: - raise ValueError( - "Invalid index {0} when selecting the host settings. " - "Must be less than {1}".format(index, len(servers))) - - url = server['url'] - - # go through variables and replace placeholders - for variable_name, variable in server.get('variables', {}).items(): - used_value = variables.get( - variable_name, variable['default_value']) - - if 'enum_values' in variable \ - and used_value not in variable['enum_values']: - raise ValueError( - "The variable `{0}` in the host URL has invalid value " - "{1}. Must be {2}.".format( - variable_name, variables[variable_name], - variable['enum_values'])) - - url = url.replace("{" + variable_name + "}", used_value) - - return url - - @property - def host(self): - """Return generated host.""" - return self.get_host_from_settings(self.server_index, variables=self.server_variables) - - @host.setter - def host(self, value): - """Fix base path.""" - self._base_path = value - self.server_index = None diff --git a/python/garage_admin_sdk/exceptions.py b/python/garage_admin_sdk/exceptions.py deleted file mode 100644 index ac96627..0000000 --- a/python/garage_admin_sdk/exceptions.py +++ /dev/null @@ -1,158 +0,0 @@ -""" - Garage Administration API v0+garage-v0.8.0 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.8.0 - Generated by: https://openapi-generator.tech -""" - - -class OpenApiException(Exception): - """The base exception class for all OpenAPIExceptions""" - - -class ApiTypeError(OpenApiException, TypeError): - def __init__(self, msg, path_to_item=None, valid_classes=None, - key_type=None): - """ Raises an exception for TypeErrors - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list): a list of keys an indices to get to the - current_item - None if unset - valid_classes (tuple): the primitive classes that current item - should be an instance of - None if unset - key_type (bool): False if our value is a value in a dict - True if it is a key in a dict - False if our item is an item in a list - None if unset - """ - self.path_to_item = path_to_item - self.valid_classes = valid_classes - self.key_type = key_type - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiTypeError, self).__init__(full_msg) - - -class ApiValueError(OpenApiException, ValueError): - def __init__(self, msg, path_to_item=None): - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list) the path to the exception in the - received_data dict. None if unset - """ - - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiValueError, self).__init__(full_msg) - - -class ApiAttributeError(OpenApiException, AttributeError): - def __init__(self, msg, path_to_item=None): - """ - Raised when an attribute reference or assignment fails. - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiAttributeError, self).__init__(full_msg) - - -class ApiKeyError(OpenApiException, KeyError): - def __init__(self, msg, path_to_item=None): - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiKeyError, self).__init__(full_msg) - - -class ApiException(OpenApiException): - - def __init__(self, status=None, reason=None, http_resp=None): - if http_resp: - self.status = http_resp.status - self.reason = http_resp.reason - self.body = http_resp.data - self.headers = http_resp.getheaders() - else: - self.status = status - self.reason = reason - self.body = None - self.headers = None - - def __str__(self): - """Custom error messages for exception""" - error_message = "Status Code: {0}\n"\ - "Reason: {1}\n".format(self.status, self.reason) - if self.headers: - error_message += "HTTP response headers: {0}\n".format( - self.headers) - - if self.body: - error_message += "HTTP response body: {0}\n".format(self.body) - - return error_message - - -class NotFoundException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None): - super(NotFoundException, self).__init__(status, reason, http_resp) - - -class UnauthorizedException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None): - super(UnauthorizedException, self).__init__(status, reason, http_resp) - - -class ForbiddenException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None): - super(ForbiddenException, self).__init__(status, reason, http_resp) - - -class ServiceException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None): - super(ServiceException, self).__init__(status, reason, http_resp) - - -def render_path(path_to_item): - """Returns a string representation of a path""" - result = "" - for pth in path_to_item: - if isinstance(pth, int): - result += "[{0}]".format(pth) - else: - result += "['{0}']".format(pth) - return result diff --git a/python/garage_admin_sdk/model/__init__.py b/python/garage_admin_sdk/model/__init__.py deleted file mode 100644 index fa934d9..0000000 --- a/python/garage_admin_sdk/model/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# we can not import model classes here because that would create a circular -# reference which would not work in python2 -# do not import all models into this module because that uses a lot of memory and stack frames -# if you need the ability to import all models from one package, import them with -# from garage_admin_sdk.models import ModelA, ModelB diff --git a/python/garage_admin_sdk/model/add_key_request.py b/python/garage_admin_sdk/model/add_key_request.py deleted file mode 100644 index bf5eaf0..0000000 --- a/python/garage_admin_sdk/model/add_key_request.py +++ /dev/null @@ -1,263 +0,0 @@ -""" - Garage Administration API v0+garage-v0.8.0 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.8.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from garage_admin_sdk.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from garage_admin_sdk.exceptions import ApiAttributeError - - - -class AddKeyRequest(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'name': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'name': 'name', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """AddKeyRequest - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - name (str): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """AddKeyRequest - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - name (str): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/python/garage_admin_sdk/model/add_node200_response_inner.py b/python/garage_admin_sdk/model/add_node200_response_inner.py deleted file mode 100644 index f219373..0000000 --- a/python/garage_admin_sdk/model/add_node200_response_inner.py +++ /dev/null @@ -1,267 +0,0 @@ -""" - Garage Administration API v0+garage-v0.8.0 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.8.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from garage_admin_sdk.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from garage_admin_sdk.exceptions import ApiAttributeError - - - -class AddNode200ResponseInner(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'success': (bool,), # noqa: E501 - 'error': (str, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'success': 'success', # noqa: E501 - 'error': 'error', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """AddNode200ResponseInner - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - success (bool): [optional] # noqa: E501 - error (str, none_type): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """AddNode200ResponseInner - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - success (bool): [optional] # noqa: E501 - error (str, none_type): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/python/garage_admin_sdk/model/allow_bucket_key_request.py b/python/garage_admin_sdk/model/allow_bucket_key_request.py deleted file mode 100644 index 1088939..0000000 --- a/python/garage_admin_sdk/model/allow_bucket_key_request.py +++ /dev/null @@ -1,287 +0,0 @@ -""" - Garage Administration API v0+garage-v0.8.0 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.8.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from garage_admin_sdk.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from garage_admin_sdk.exceptions import ApiAttributeError - - -def lazy_import(): - from garage_admin_sdk.model.allow_bucket_key_request_permissions import AllowBucketKeyRequestPermissions - globals()['AllowBucketKeyRequestPermissions'] = AllowBucketKeyRequestPermissions - - -class AllowBucketKeyRequest(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'bucket_id': (str,), # noqa: E501 - 'access_key_id': (str,), # noqa: E501 - 'permissions': (AllowBucketKeyRequestPermissions,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'bucket_id': 'bucketId', # noqa: E501 - 'access_key_id': 'accessKeyId', # noqa: E501 - 'permissions': 'permissions', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, bucket_id, access_key_id, permissions, *args, **kwargs): # noqa: E501 - """AllowBucketKeyRequest - a model defined in OpenAPI - - Args: - bucket_id (str): - access_key_id (str): - permissions (AllowBucketKeyRequestPermissions): - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.bucket_id = bucket_id - self.access_key_id = access_key_id - self.permissions = permissions - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, bucket_id, access_key_id, permissions, *args, **kwargs): # noqa: E501 - """AllowBucketKeyRequest - a model defined in OpenAPI - - Args: - bucket_id (str): - access_key_id (str): - permissions (AllowBucketKeyRequestPermissions): - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.bucket_id = bucket_id - self.access_key_id = access_key_id - self.permissions = permissions - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/python/garage_admin_sdk/model/allow_bucket_key_request_permissions.py b/python/garage_admin_sdk/model/allow_bucket_key_request_permissions.py deleted file mode 100644 index cee3b02..0000000 --- a/python/garage_admin_sdk/model/allow_bucket_key_request_permissions.py +++ /dev/null @@ -1,281 +0,0 @@ -""" - Garage Administration API v0+garage-v0.8.0 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.8.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from garage_admin_sdk.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from garage_admin_sdk.exceptions import ApiAttributeError - - - -class AllowBucketKeyRequestPermissions(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'read': (bool,), # noqa: E501 - 'write': (bool,), # noqa: E501 - 'owner': (bool,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'read': 'read', # noqa: E501 - 'write': 'write', # noqa: E501 - 'owner': 'owner', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, read, write, owner, *args, **kwargs): # noqa: E501 - """AllowBucketKeyRequestPermissions - a model defined in OpenAPI - - Args: - read (bool): - write (bool): - owner (bool): - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.read = read - self.write = write - self.owner = owner - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, read, write, owner, *args, **kwargs): # noqa: E501 - """AllowBucketKeyRequestPermissions - a model defined in OpenAPI - - Args: - read (bool): - write (bool): - owner (bool): - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.read = read - self.write = write - self.owner = owner - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/python/garage_admin_sdk/model/bucket_info.py b/python/garage_admin_sdk/model/bucket_info.py deleted file mode 100644 index 174aa9c..0000000 --- a/python/garage_admin_sdk/model/bucket_info.py +++ /dev/null @@ -1,305 +0,0 @@ -""" - Garage Administration API v0+garage-v0.8.0 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.8.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from garage_admin_sdk.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from garage_admin_sdk.exceptions import ApiAttributeError - - -def lazy_import(): - from garage_admin_sdk.model.bucket_info_quotas import BucketInfoQuotas - from garage_admin_sdk.model.bucket_info_website_config import BucketInfoWebsiteConfig - from garage_admin_sdk.model.bucket_key_info import BucketKeyInfo - globals()['BucketInfoQuotas'] = BucketInfoQuotas - globals()['BucketInfoWebsiteConfig'] = BucketInfoWebsiteConfig - globals()['BucketKeyInfo'] = BucketKeyInfo - - -class BucketInfo(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'id': (str,), # noqa: E501 - 'global_aliases': ([str],), # noqa: E501 - 'website_access': (bool,), # noqa: E501 - 'website_config': (BucketInfoWebsiteConfig,), # noqa: E501 - 'keys': ([BucketKeyInfo],), # noqa: E501 - 'objects': (int,), # noqa: E501 - 'bytes': (int,), # noqa: E501 - 'unfinished_uploads': (int,), # noqa: E501 - 'quotas': (BucketInfoQuotas,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'id': 'id', # noqa: E501 - 'global_aliases': 'globalAliases', # noqa: E501 - 'website_access': 'websiteAccess', # noqa: E501 - 'website_config': 'websiteConfig', # noqa: E501 - 'keys': 'keys', # noqa: E501 - 'objects': 'objects', # noqa: E501 - 'bytes': 'bytes', # noqa: E501 - 'unfinished_uploads': 'unfinishedUploads', # noqa: E501 - 'quotas': 'quotas', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """BucketInfo - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): [optional] # noqa: E501 - global_aliases ([str]): [optional] # noqa: E501 - website_access (bool): [optional] # noqa: E501 - website_config (BucketInfoWebsiteConfig): [optional] # noqa: E501 - keys ([BucketKeyInfo]): [optional] # noqa: E501 - objects (int): [optional] # noqa: E501 - bytes (int): [optional] # noqa: E501 - unfinished_uploads (int): [optional] # noqa: E501 - quotas (BucketInfoQuotas): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """BucketInfo - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): [optional] # noqa: E501 - global_aliases ([str]): [optional] # noqa: E501 - website_access (bool): [optional] # noqa: E501 - website_config (BucketInfoWebsiteConfig): [optional] # noqa: E501 - keys ([BucketKeyInfo]): [optional] # noqa: E501 - objects (int): [optional] # noqa: E501 - bytes (int): [optional] # noqa: E501 - unfinished_uploads (int): [optional] # noqa: E501 - quotas (BucketInfoQuotas): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/python/garage_admin_sdk/model/bucket_info_quotas.py b/python/garage_admin_sdk/model/bucket_info_quotas.py deleted file mode 100644 index 18976d4..0000000 --- a/python/garage_admin_sdk/model/bucket_info_quotas.py +++ /dev/null @@ -1,267 +0,0 @@ -""" - Garage Administration API v0+garage-v0.8.0 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.8.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from garage_admin_sdk.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from garage_admin_sdk.exceptions import ApiAttributeError - - - -class BucketInfoQuotas(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'max_size': (int, none_type,), # noqa: E501 - 'max_objects': (int, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'max_size': 'maxSize', # noqa: E501 - 'max_objects': 'maxObjects', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """BucketInfoQuotas - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - max_size (int, none_type): [optional] # noqa: E501 - max_objects (int, none_type): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """BucketInfoQuotas - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - max_size (int, none_type): [optional] # noqa: E501 - max_objects (int, none_type): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/python/garage_admin_sdk/model/bucket_info_website_config.py b/python/garage_admin_sdk/model/bucket_info_website_config.py deleted file mode 100644 index 775b067..0000000 --- a/python/garage_admin_sdk/model/bucket_info_website_config.py +++ /dev/null @@ -1,267 +0,0 @@ -""" - Garage Administration API v0+garage-v0.8.0 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.8.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from garage_admin_sdk.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from garage_admin_sdk.exceptions import ApiAttributeError - - - -class BucketInfoWebsiteConfig(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = True - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'index_document': (str,), # noqa: E501 - 'error_document': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'index_document': 'indexDocument', # noqa: E501 - 'error_document': 'errorDocument', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """BucketInfoWebsiteConfig - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - index_document (str): [optional] # noqa: E501 - error_document (str): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """BucketInfoWebsiteConfig - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - index_document (str): [optional] # noqa: E501 - error_document (str): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/python/garage_admin_sdk/model/bucket_key_info.py b/python/garage_admin_sdk/model/bucket_key_info.py deleted file mode 100644 index 9c1db3d..0000000 --- a/python/garage_admin_sdk/model/bucket_key_info.py +++ /dev/null @@ -1,281 +0,0 @@ -""" - Garage Administration API v0+garage-v0.8.0 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.8.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from garage_admin_sdk.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from garage_admin_sdk.exceptions import ApiAttributeError - - -def lazy_import(): - from garage_admin_sdk.model.create_bucket_request_local_alias_allow import CreateBucketRequestLocalAliasAllow - globals()['CreateBucketRequestLocalAliasAllow'] = CreateBucketRequestLocalAliasAllow - - -class BucketKeyInfo(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'access_key_id': (str,), # noqa: E501 - 'name': (str,), # noqa: E501 - 'permissions': (CreateBucketRequestLocalAliasAllow,), # noqa: E501 - 'bucket_local_aliases': ([str],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'access_key_id': 'accessKeyId', # noqa: E501 - 'name': 'name', # noqa: E501 - 'permissions': 'permissions', # noqa: E501 - 'bucket_local_aliases': 'bucketLocalAliases', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """BucketKeyInfo - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - access_key_id (str): [optional] # noqa: E501 - name (str): [optional] # noqa: E501 - permissions (CreateBucketRequestLocalAliasAllow): [optional] # noqa: E501 - bucket_local_aliases ([str]): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """BucketKeyInfo - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - access_key_id (str): [optional] # noqa: E501 - name (str): [optional] # noqa: E501 - permissions (CreateBucketRequestLocalAliasAllow): [optional] # noqa: E501 - bucket_local_aliases ([str]): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/python/garage_admin_sdk/model/cluster_layout.py b/python/garage_admin_sdk/model/cluster_layout.py deleted file mode 100644 index ce71b45..0000000 --- a/python/garage_admin_sdk/model/cluster_layout.py +++ /dev/null @@ -1,287 +0,0 @@ -""" - Garage Administration API v0+garage-v0.8.0 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.8.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from garage_admin_sdk.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from garage_admin_sdk.exceptions import ApiAttributeError - - -def lazy_import(): - from garage_admin_sdk.model.node_cluster_info import NodeClusterInfo - globals()['NodeClusterInfo'] = NodeClusterInfo - - -class ClusterLayout(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'version': (int,), # noqa: E501 - 'roles': ({str: (NodeClusterInfo,)},), # noqa: E501 - 'staged_role_changes': ({str: (NodeClusterInfo,)},), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'version': 'version', # noqa: E501 - 'roles': 'roles', # noqa: E501 - 'staged_role_changes': 'stagedRoleChanges', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, version, roles, staged_role_changes, *args, **kwargs): # noqa: E501 - """ClusterLayout - a model defined in OpenAPI - - Args: - version (int): - roles ({str: (NodeClusterInfo,)}): - staged_role_changes ({str: (NodeClusterInfo,)}): - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.version = version - self.roles = roles - self.staged_role_changes = staged_role_changes - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, version, roles, staged_role_changes, *args, **kwargs): # noqa: E501 - """ClusterLayout - a model defined in OpenAPI - - Args: - version (int): - roles ({str: (NodeClusterInfo,)}): - staged_role_changes ({str: (NodeClusterInfo,)}): - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.version = version - self.roles = roles - self.staged_role_changes = staged_role_changes - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/python/garage_admin_sdk/model/connect_post200_response_inner.py b/python/garage_admin_sdk/model/connect_post200_response_inner.py deleted file mode 100644 index 891ece3..0000000 --- a/python/garage_admin_sdk/model/connect_post200_response_inner.py +++ /dev/null @@ -1,267 +0,0 @@ -""" - Garage Administration API v0+garage-v0.7.3 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.7.3 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from garage_admin_sdk.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from garage_admin_sdk.exceptions import ApiAttributeError - - - -class ConnectPost200ResponseInner(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'success': (bool,), # noqa: E501 - 'error': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'success': 'success', # noqa: E501 - 'error': 'error', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """ConnectPost200ResponseInner - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - success (bool): [optional] # noqa: E501 - error (str): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """ConnectPost200ResponseInner - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - success (bool): [optional] # noqa: E501 - error (str): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/python/garage_admin_sdk/model/create_bucket_request.py b/python/garage_admin_sdk/model/create_bucket_request.py deleted file mode 100644 index 4b64638..0000000 --- a/python/garage_admin_sdk/model/create_bucket_request.py +++ /dev/null @@ -1,273 +0,0 @@ -""" - Garage Administration API v0+garage-v0.8.0 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.8.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from garage_admin_sdk.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from garage_admin_sdk.exceptions import ApiAttributeError - - -def lazy_import(): - from garage_admin_sdk.model.create_bucket_request_local_alias import CreateBucketRequestLocalAlias - globals()['CreateBucketRequestLocalAlias'] = CreateBucketRequestLocalAlias - - -class CreateBucketRequest(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'global_alias': (str,), # noqa: E501 - 'local_alias': (CreateBucketRequestLocalAlias,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'global_alias': 'globalAlias', # noqa: E501 - 'local_alias': 'localAlias', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """CreateBucketRequest - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - global_alias (str): [optional] # noqa: E501 - local_alias (CreateBucketRequestLocalAlias): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """CreateBucketRequest - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - global_alias (str): [optional] # noqa: E501 - local_alias (CreateBucketRequestLocalAlias): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/python/garage_admin_sdk/model/create_bucket_request_local_alias.py b/python/garage_admin_sdk/model/create_bucket_request_local_alias.py deleted file mode 100644 index 27e4895..0000000 --- a/python/garage_admin_sdk/model/create_bucket_request_local_alias.py +++ /dev/null @@ -1,277 +0,0 @@ -""" - Garage Administration API v0+garage-v0.8.0 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.8.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from garage_admin_sdk.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from garage_admin_sdk.exceptions import ApiAttributeError - - -def lazy_import(): - from garage_admin_sdk.model.create_bucket_request_local_alias_allow import CreateBucketRequestLocalAliasAllow - globals()['CreateBucketRequestLocalAliasAllow'] = CreateBucketRequestLocalAliasAllow - - -class CreateBucketRequestLocalAlias(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'access_key_id': (str,), # noqa: E501 - 'alias': (str,), # noqa: E501 - 'allow': (CreateBucketRequestLocalAliasAllow,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'access_key_id': 'accessKeyId', # noqa: E501 - 'alias': 'alias', # noqa: E501 - 'allow': 'allow', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """CreateBucketRequestLocalAlias - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - access_key_id (str): [optional] # noqa: E501 - alias (str): [optional] # noqa: E501 - allow (CreateBucketRequestLocalAliasAllow): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """CreateBucketRequestLocalAlias - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - access_key_id (str): [optional] # noqa: E501 - alias (str): [optional] # noqa: E501 - allow (CreateBucketRequestLocalAliasAllow): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/python/garage_admin_sdk/model/create_bucket_request_local_alias_allow.py b/python/garage_admin_sdk/model/create_bucket_request_local_alias_allow.py deleted file mode 100644 index ccc8b9b..0000000 --- a/python/garage_admin_sdk/model/create_bucket_request_local_alias_allow.py +++ /dev/null @@ -1,271 +0,0 @@ -""" - Garage Administration API v0+garage-v0.8.0 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.8.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from garage_admin_sdk.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from garage_admin_sdk.exceptions import ApiAttributeError - - - -class CreateBucketRequestLocalAliasAllow(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'read': (bool,), # noqa: E501 - 'write': (bool,), # noqa: E501 - 'owner': (bool,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'read': 'read', # noqa: E501 - 'write': 'write', # noqa: E501 - 'owner': 'owner', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """CreateBucketRequestLocalAliasAllow - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - read (bool): [optional] # noqa: E501 - write (bool): [optional] # noqa: E501 - owner (bool): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """CreateBucketRequestLocalAliasAllow - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - read (bool): [optional] # noqa: E501 - write (bool): [optional] # noqa: E501 - owner (bool): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/python/garage_admin_sdk/model/get_nodes200_response.py b/python/garage_admin_sdk/model/get_nodes200_response.py deleted file mode 100644 index a0c1500..0000000 --- a/python/garage_admin_sdk/model/get_nodes200_response.py +++ /dev/null @@ -1,295 +0,0 @@ -""" - Garage Administration API v0+garage-v0.8.0 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.8.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from garage_admin_sdk.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from garage_admin_sdk.exceptions import ApiAttributeError - - -def lazy_import(): - from garage_admin_sdk.model.cluster_layout import ClusterLayout - from garage_admin_sdk.model.node_network_info import NodeNetworkInfo - globals()['ClusterLayout'] = ClusterLayout - globals()['NodeNetworkInfo'] = NodeNetworkInfo - - -class GetNodes200Response(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'node': (str,), # noqa: E501 - 'garage_version': (str,), # noqa: E501 - 'known_nodes': ({str: (NodeNetworkInfo,)},), # noqa: E501 - 'layout': (ClusterLayout,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'node': 'node', # noqa: E501 - 'garage_version': 'garageVersion', # noqa: E501 - 'known_nodes': 'knownNodes', # noqa: E501 - 'layout': 'layout', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, node, garage_version, known_nodes, layout, *args, **kwargs): # noqa: E501 - """GetNodes200Response - a model defined in OpenAPI - - Args: - node (str): - garage_version (str): - known_nodes ({str: (NodeNetworkInfo,)}): - layout (ClusterLayout): - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.node = node - self.garage_version = garage_version - self.known_nodes = known_nodes - self.layout = layout - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, node, garage_version, known_nodes, layout, *args, **kwargs): # noqa: E501 - """GetNodes200Response - a model defined in OpenAPI - - Args: - node (str): - garage_version (str): - known_nodes ({str: (NodeNetworkInfo,)}): - layout (ClusterLayout): - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.node = node - self.garage_version = garage_version - self.known_nodes = known_nodes - self.layout = layout - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/python/garage_admin_sdk/model/import_key_request.py b/python/garage_admin_sdk/model/import_key_request.py deleted file mode 100644 index 9417f4e..0000000 --- a/python/garage_admin_sdk/model/import_key_request.py +++ /dev/null @@ -1,281 +0,0 @@ -""" - Garage Administration API v0+garage-v0.8.0 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.8.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from garage_admin_sdk.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from garage_admin_sdk.exceptions import ApiAttributeError - - - -class ImportKeyRequest(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'name': (str,), # noqa: E501 - 'access_key_id': (str,), # noqa: E501 - 'secret_access_key': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'name': 'name', # noqa: E501 - 'access_key_id': 'accessKeyId', # noqa: E501 - 'secret_access_key': 'secretAccessKey', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, name, access_key_id, secret_access_key, *args, **kwargs): # noqa: E501 - """ImportKeyRequest - a model defined in OpenAPI - - Args: - name (str): - access_key_id (str): - secret_access_key (str): - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.name = name - self.access_key_id = access_key_id - self.secret_access_key = secret_access_key - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, name, access_key_id, secret_access_key, *args, **kwargs): # noqa: E501 - """ImportKeyRequest - a model defined in OpenAPI - - Args: - name (str): - access_key_id (str): - secret_access_key (str): - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.name = name - self.access_key_id = access_key_id - self.secret_access_key = secret_access_key - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/python/garage_admin_sdk/model/key_get_request.py b/python/garage_admin_sdk/model/key_get_request.py deleted file mode 100644 index 7ce2d7a..0000000 --- a/python/garage_admin_sdk/model/key_get_request.py +++ /dev/null @@ -1,263 +0,0 @@ -""" - Garage Administration API v0+garage-v0.7.3 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.7.3 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from garage_admin_sdk.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from garage_admin_sdk.exceptions import ApiAttributeError - - - -class KeyGetRequest(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'name': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'name': 'name', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """KeyGetRequest - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - name (str): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """KeyGetRequest - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - name (str): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/python/garage_admin_sdk/model/key_id_access_key_delete_request.py b/python/garage_admin_sdk/model/key_id_access_key_delete_request.py deleted file mode 100644 index 591d526..0000000 --- a/python/garage_admin_sdk/model/key_id_access_key_delete_request.py +++ /dev/null @@ -1,279 +0,0 @@ -""" - Garage Administration API v0+garage-v0.7.3 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.7.3 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from garage_admin_sdk.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from garage_admin_sdk.exceptions import ApiAttributeError - - -def lazy_import(): - from garage_admin_sdk.model.key_id_access_key_delete_request_allow import KeyIdAccessKeyDeleteRequestAllow - from garage_admin_sdk.model.key_id_access_key_delete_request_deny import KeyIdAccessKeyDeleteRequestDeny - globals()['KeyIdAccessKeyDeleteRequestAllow'] = KeyIdAccessKeyDeleteRequestAllow - globals()['KeyIdAccessKeyDeleteRequestDeny'] = KeyIdAccessKeyDeleteRequestDeny - - -class KeyIdAccessKeyDeleteRequest(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'name': (str,), # noqa: E501 - 'allow': (KeyIdAccessKeyDeleteRequestAllow,), # noqa: E501 - 'deny': (KeyIdAccessKeyDeleteRequestDeny,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'name': 'name', # noqa: E501 - 'allow': 'allow', # noqa: E501 - 'deny': 'deny', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """KeyIdAccessKeyDeleteRequest - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - name (str): [optional] # noqa: E501 - allow (KeyIdAccessKeyDeleteRequestAllow): [optional] # noqa: E501 - deny (KeyIdAccessKeyDeleteRequestDeny): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """KeyIdAccessKeyDeleteRequest - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - name (str): [optional] # noqa: E501 - allow (KeyIdAccessKeyDeleteRequestAllow): [optional] # noqa: E501 - deny (KeyIdAccessKeyDeleteRequestDeny): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/python/garage_admin_sdk/model/key_id_access_key_delete_request_allow.py b/python/garage_admin_sdk/model/key_id_access_key_delete_request_allow.py deleted file mode 100644 index 001be9c..0000000 --- a/python/garage_admin_sdk/model/key_id_access_key_delete_request_allow.py +++ /dev/null @@ -1,263 +0,0 @@ -""" - Garage Administration API v0+garage-v0.7.3 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.7.3 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from garage_admin_sdk.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from garage_admin_sdk.exceptions import ApiAttributeError - - - -class KeyIdAccessKeyDeleteRequestAllow(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'create_bucket': (bool,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'create_bucket': 'createBucket', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """KeyIdAccessKeyDeleteRequestAllow - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - create_bucket (bool): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """KeyIdAccessKeyDeleteRequestAllow - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - create_bucket (bool): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/python/garage_admin_sdk/model/key_id_access_key_delete_request_deny.py b/python/garage_admin_sdk/model/key_id_access_key_delete_request_deny.py deleted file mode 100644 index 6d3d02d..0000000 --- a/python/garage_admin_sdk/model/key_id_access_key_delete_request_deny.py +++ /dev/null @@ -1,263 +0,0 @@ -""" - Garage Administration API v0+garage-v0.7.3 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.7.3 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from garage_admin_sdk.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from garage_admin_sdk.exceptions import ApiAttributeError - - - -class KeyIdAccessKeyDeleteRequestDeny(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'create_bucket': (bool,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'create_bucket': 'createBucket', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """KeyIdAccessKeyDeleteRequestDeny - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - create_bucket (bool): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """KeyIdAccessKeyDeleteRequestDeny - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - create_bucket (bool): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/python/garage_admin_sdk/model/key_import_post_request.py b/python/garage_admin_sdk/model/key_import_post_request.py deleted file mode 100644 index 5383969..0000000 --- a/python/garage_admin_sdk/model/key_import_post_request.py +++ /dev/null @@ -1,271 +0,0 @@ -""" - Garage Administration API v0+garage-v0.7.3 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.7.3 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from garage_admin_sdk.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from garage_admin_sdk.exceptions import ApiAttributeError - - - -class KeyImportPostRequest(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'name': (str,), # noqa: E501 - 'access_key_id': (str,), # noqa: E501 - 'secret_access_key': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'name': 'name', # noqa: E501 - 'access_key_id': 'accessKeyId', # noqa: E501 - 'secret_access_key': 'secretAccessKey', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """KeyImportPostRequest - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - name (str): [optional] # noqa: E501 - access_key_id (str): [optional] # noqa: E501 - secret_access_key (str): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """KeyImportPostRequest - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - name (str): [optional] # noqa: E501 - access_key_id (str): [optional] # noqa: E501 - secret_access_key (str): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/python/garage_admin_sdk/model/key_info.py b/python/garage_admin_sdk/model/key_info.py deleted file mode 100644 index 3ee863b..0000000 --- a/python/garage_admin_sdk/model/key_info.py +++ /dev/null @@ -1,287 +0,0 @@ -""" - Garage Administration API v0+garage-v0.8.0 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.8.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from garage_admin_sdk.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from garage_admin_sdk.exceptions import ApiAttributeError - - -def lazy_import(): - from garage_admin_sdk.model.key_info_buckets_inner import KeyInfoBucketsInner - from garage_admin_sdk.model.key_info_permissions import KeyInfoPermissions - globals()['KeyInfoBucketsInner'] = KeyInfoBucketsInner - globals()['KeyInfoPermissions'] = KeyInfoPermissions - - -class KeyInfo(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'name': (str,), # noqa: E501 - 'access_key_id': (str,), # noqa: E501 - 'secret_access_key': (str,), # noqa: E501 - 'permissions': (KeyInfoPermissions,), # noqa: E501 - 'buckets': ([KeyInfoBucketsInner],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'name': 'name', # noqa: E501 - 'access_key_id': 'accessKeyId', # noqa: E501 - 'secret_access_key': 'secretAccessKey', # noqa: E501 - 'permissions': 'permissions', # noqa: E501 - 'buckets': 'buckets', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """KeyInfo - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - name (str): [optional] # noqa: E501 - access_key_id (str): [optional] # noqa: E501 - secret_access_key (str): [optional] # noqa: E501 - permissions (KeyInfoPermissions): [optional] # noqa: E501 - buckets ([KeyInfoBucketsInner]): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """KeyInfo - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - name (str): [optional] # noqa: E501 - access_key_id (str): [optional] # noqa: E501 - secret_access_key (str): [optional] # noqa: E501 - permissions (KeyInfoPermissions): [optional] # noqa: E501 - buckets ([KeyInfoBucketsInner]): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/python/garage_admin_sdk/model/key_info_buckets_inner.py b/python/garage_admin_sdk/model/key_info_buckets_inner.py deleted file mode 100644 index e3a8e18..0000000 --- a/python/garage_admin_sdk/model/key_info_buckets_inner.py +++ /dev/null @@ -1,281 +0,0 @@ -""" - Garage Administration API v0+garage-v0.8.0 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.8.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from garage_admin_sdk.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from garage_admin_sdk.exceptions import ApiAttributeError - - -def lazy_import(): - from garage_admin_sdk.model.key_info_buckets_inner_permissions import KeyInfoBucketsInnerPermissions - globals()['KeyInfoBucketsInnerPermissions'] = KeyInfoBucketsInnerPermissions - - -class KeyInfoBucketsInner(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'id': (str,), # noqa: E501 - 'global_aliases': ([str],), # noqa: E501 - 'local_aliases': ([str],), # noqa: E501 - 'permissions': (KeyInfoBucketsInnerPermissions,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'id': 'id', # noqa: E501 - 'global_aliases': 'globalAliases', # noqa: E501 - 'local_aliases': 'localAliases', # noqa: E501 - 'permissions': 'permissions', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """KeyInfoBucketsInner - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): [optional] # noqa: E501 - global_aliases ([str]): [optional] # noqa: E501 - local_aliases ([str]): [optional] # noqa: E501 - permissions (KeyInfoBucketsInnerPermissions): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """KeyInfoBucketsInner - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): [optional] # noqa: E501 - global_aliases ([str]): [optional] # noqa: E501 - local_aliases ([str]): [optional] # noqa: E501 - permissions (KeyInfoBucketsInnerPermissions): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/python/garage_admin_sdk/model/key_info_buckets_inner_permissions.py b/python/garage_admin_sdk/model/key_info_buckets_inner_permissions.py deleted file mode 100644 index 177e8ae..0000000 --- a/python/garage_admin_sdk/model/key_info_buckets_inner_permissions.py +++ /dev/null @@ -1,271 +0,0 @@ -""" - Garage Administration API v0+garage-v0.8.0 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.8.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from garage_admin_sdk.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from garage_admin_sdk.exceptions import ApiAttributeError - - - -class KeyInfoBucketsInnerPermissions(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'read': (bool,), # noqa: E501 - 'write': (bool,), # noqa: E501 - 'owner': (bool,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'read': 'read', # noqa: E501 - 'write': 'write', # noqa: E501 - 'owner': 'owner', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """KeyInfoBucketsInnerPermissions - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - read (bool): [optional] # noqa: E501 - write (bool): [optional] # noqa: E501 - owner (bool): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """KeyInfoBucketsInnerPermissions - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - read (bool): [optional] # noqa: E501 - write (bool): [optional] # noqa: E501 - owner (bool): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/python/garage_admin_sdk/model/key_info_permissions.py b/python/garage_admin_sdk/model/key_info_permissions.py deleted file mode 100644 index 035ee39..0000000 --- a/python/garage_admin_sdk/model/key_info_permissions.py +++ /dev/null @@ -1,263 +0,0 @@ -""" - Garage Administration API v0+garage-v0.8.0 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.8.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from garage_admin_sdk.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from garage_admin_sdk.exceptions import ApiAttributeError - - - -class KeyInfoPermissions(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'create_bucket': (bool,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'create_bucket': 'createBucket', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """KeyInfoPermissions - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - create_bucket (bool): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """KeyInfoPermissions - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - create_bucket (bool): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/python/garage_admin_sdk/model/layout_version.py b/python/garage_admin_sdk/model/layout_version.py deleted file mode 100644 index a3369b2..0000000 --- a/python/garage_admin_sdk/model/layout_version.py +++ /dev/null @@ -1,263 +0,0 @@ -""" - Garage Administration API v0+garage-v0.8.0 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.8.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from garage_admin_sdk.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from garage_admin_sdk.exceptions import ApiAttributeError - - - -class LayoutVersion(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'version': (int,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'version': 'version', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """LayoutVersion - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - version (int): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """LayoutVersion - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - version (int): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/python/garage_admin_sdk/model/list_buckets200_response_inner.py b/python/garage_admin_sdk/model/list_buckets200_response_inner.py deleted file mode 100644 index d478a66..0000000 --- a/python/garage_admin_sdk/model/list_buckets200_response_inner.py +++ /dev/null @@ -1,283 +0,0 @@ -""" - Garage Administration API v0+garage-v0.8.0 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.8.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from garage_admin_sdk.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from garage_admin_sdk.exceptions import ApiAttributeError - - -def lazy_import(): - from garage_admin_sdk.model.list_buckets200_response_inner_local_aliases_inner import ListBuckets200ResponseInnerLocalAliasesInner - globals()['ListBuckets200ResponseInnerLocalAliasesInner'] = ListBuckets200ResponseInnerLocalAliasesInner - - -class ListBuckets200ResponseInner(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'id': (str,), # noqa: E501 - 'global_aliases': ([str],), # noqa: E501 - 'local_aliases': ([ListBuckets200ResponseInnerLocalAliasesInner],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'id': 'id', # noqa: E501 - 'global_aliases': 'globalAliases', # noqa: E501 - 'local_aliases': 'localAliases', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, id, *args, **kwargs): # noqa: E501 - """ListBuckets200ResponseInner - a model defined in OpenAPI - - Args: - id (str): - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - global_aliases ([str]): [optional] # noqa: E501 - local_aliases ([ListBuckets200ResponseInnerLocalAliasesInner]): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.id = id - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, id, *args, **kwargs): # noqa: E501 - """ListBuckets200ResponseInner - a model defined in OpenAPI - - Args: - id (str): - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - global_aliases ([str]): [optional] # noqa: E501 - local_aliases ([ListBuckets200ResponseInnerLocalAliasesInner]): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.id = id - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/python/garage_admin_sdk/model/list_buckets200_response_inner_local_aliases_inner.py b/python/garage_admin_sdk/model/list_buckets200_response_inner_local_aliases_inner.py deleted file mode 100644 index 083c503..0000000 --- a/python/garage_admin_sdk/model/list_buckets200_response_inner_local_aliases_inner.py +++ /dev/null @@ -1,275 +0,0 @@ -""" - Garage Administration API v0+garage-v0.8.0 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.8.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from garage_admin_sdk.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from garage_admin_sdk.exceptions import ApiAttributeError - - - -class ListBuckets200ResponseInnerLocalAliasesInner(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'alias': (str,), # noqa: E501 - 'access_key_id': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'alias': 'alias', # noqa: E501 - 'access_key_id': 'accessKeyId', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, alias, access_key_id, *args, **kwargs): # noqa: E501 - """ListBuckets200ResponseInnerLocalAliasesInner - a model defined in OpenAPI - - Args: - alias (str): - access_key_id (str): - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.alias = alias - self.access_key_id = access_key_id - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, alias, access_key_id, *args, **kwargs): # noqa: E501 - """ListBuckets200ResponseInnerLocalAliasesInner - a model defined in OpenAPI - - Args: - alias (str): - access_key_id (str): - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.alias = alias - self.access_key_id = access_key_id - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/python/garage_admin_sdk/model/list_keys200_response_inner.py b/python/garage_admin_sdk/model/list_keys200_response_inner.py deleted file mode 100644 index 9a6f276..0000000 --- a/python/garage_admin_sdk/model/list_keys200_response_inner.py +++ /dev/null @@ -1,273 +0,0 @@ -""" - Garage Administration API v0+garage-v0.8.0 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.8.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from garage_admin_sdk.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from garage_admin_sdk.exceptions import ApiAttributeError - - - -class ListKeys200ResponseInner(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'id': (str,), # noqa: E501 - 'name': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'id': 'id', # noqa: E501 - 'name': 'name', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, id, *args, **kwargs): # noqa: E501 - """ListKeys200ResponseInner - a model defined in OpenAPI - - Args: - id (str): - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - name (str): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.id = id - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, id, *args, **kwargs): # noqa: E501 - """ListKeys200ResponseInner - a model defined in OpenAPI - - Args: - id (str): - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - name (str): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.id = id - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/python/garage_admin_sdk/model/node_cluster_info.py b/python/garage_admin_sdk/model/node_cluster_info.py deleted file mode 100644 index 868bf9a..0000000 --- a/python/garage_admin_sdk/model/node_cluster_info.py +++ /dev/null @@ -1,281 +0,0 @@ -""" - Garage Administration API v0+garage-v0.8.0 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.8.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from garage_admin_sdk.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from garage_admin_sdk.exceptions import ApiAttributeError - - - -class NodeClusterInfo(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'zone': (str,), # noqa: E501 - 'capacity': (int, none_type,), # noqa: E501 - 'tags': ([str],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'zone': 'zone', # noqa: E501 - 'capacity': 'capacity', # noqa: E501 - 'tags': 'tags', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, zone, capacity, tags, *args, **kwargs): # noqa: E501 - """NodeClusterInfo - a model defined in OpenAPI - - Args: - zone (str): - capacity (int, none_type): - tags ([str]): User defined tags, put whatever makes sense for you, these tags are not interpreted by Garage - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.zone = zone - self.capacity = capacity - self.tags = tags - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, zone, capacity, tags, *args, **kwargs): # noqa: E501 - """NodeClusterInfo - a model defined in OpenAPI - - Args: - zone (str): - capacity (int, none_type): - tags ([str]): User defined tags, put whatever makes sense for you, these tags are not interpreted by Garage - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.zone = zone - self.capacity = capacity - self.tags = tags - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/python/garage_admin_sdk/model/node_network_info.py b/python/garage_admin_sdk/model/node_network_info.py deleted file mode 100644 index aeda1fc..0000000 --- a/python/garage_admin_sdk/model/node_network_info.py +++ /dev/null @@ -1,287 +0,0 @@ -""" - Garage Administration API v0+garage-v0.8.0 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.8.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from garage_admin_sdk.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from garage_admin_sdk.exceptions import ApiAttributeError - - - -class NodeNetworkInfo(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'addr': (str,), # noqa: E501 - 'is_up': (bool,), # noqa: E501 - 'last_seen_secs_ago': (int, none_type,), # noqa: E501 - 'hostname': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'addr': 'addr', # noqa: E501 - 'is_up': 'is_up', # noqa: E501 - 'last_seen_secs_ago': 'last_seen_secs_ago', # noqa: E501 - 'hostname': 'hostname', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, addr, is_up, last_seen_secs_ago, hostname, *args, **kwargs): # noqa: E501 - """NodeNetworkInfo - a model defined in OpenAPI - - Args: - addr (str): - is_up (bool): - last_seen_secs_ago (int, none_type): - hostname (str): - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.addr = addr - self.is_up = is_up - self.last_seen_secs_ago = last_seen_secs_ago - self.hostname = hostname - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, addr, is_up, last_seen_secs_ago, hostname, *args, **kwargs): # noqa: E501 - """NodeNetworkInfo - a model defined in OpenAPI - - Args: - addr (str): - is_up (bool): - last_seen_secs_ago (int, none_type): - hostname (str): - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.addr = addr - self.is_up = is_up - self.last_seen_secs_ago = last_seen_secs_ago - self.hostname = hostname - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/python/garage_admin_sdk/model/status_get200_response.py b/python/garage_admin_sdk/model/status_get200_response.py deleted file mode 100644 index 428fbd4..0000000 --- a/python/garage_admin_sdk/model/status_get200_response.py +++ /dev/null @@ -1,283 +0,0 @@ -""" - Garage Administration API v0+garage-v0.7.3 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.7.3 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from garage_admin_sdk.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from garage_admin_sdk.exceptions import ApiAttributeError - - -def lazy_import(): - from garage_admin_sdk.model.cluster_layout import ClusterLayout - from garage_admin_sdk.model.node_network_info import NodeNetworkInfo - globals()['ClusterLayout'] = ClusterLayout - globals()['NodeNetworkInfo'] = NodeNetworkInfo - - -class StatusGet200Response(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'node': (str,), # noqa: E501 - 'garage_version': (str,), # noqa: E501 - 'known_nodes': ({str: (NodeNetworkInfo,)},), # noqa: E501 - 'layout': (ClusterLayout,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'node': 'node', # noqa: E501 - 'garage_version': 'garage_version', # noqa: E501 - 'known_nodes': 'knownNodes', # noqa: E501 - 'layout': 'layout', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """StatusGet200Response - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - node (str): [optional] # noqa: E501 - garage_version (str): [optional] # noqa: E501 - known_nodes ({str: (NodeNetworkInfo,)}): [optional] # noqa: E501 - layout (ClusterLayout): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """StatusGet200Response - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - node (str): [optional] # noqa: E501 - garage_version (str): [optional] # noqa: E501 - known_nodes ({str: (NodeNetworkInfo,)}): [optional] # noqa: E501 - layout (ClusterLayout): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/python/garage_admin_sdk/model/update_bucket_request.py b/python/garage_admin_sdk/model/update_bucket_request.py deleted file mode 100644 index 63f3915..0000000 --- a/python/garage_admin_sdk/model/update_bucket_request.py +++ /dev/null @@ -1,275 +0,0 @@ -""" - Garage Administration API v0+garage-v0.8.0 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.8.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from garage_admin_sdk.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from garage_admin_sdk.exceptions import ApiAttributeError - - -def lazy_import(): - from garage_admin_sdk.model.update_bucket_request_quotas import UpdateBucketRequestQuotas - from garage_admin_sdk.model.update_bucket_request_website_access import UpdateBucketRequestWebsiteAccess - globals()['UpdateBucketRequestQuotas'] = UpdateBucketRequestQuotas - globals()['UpdateBucketRequestWebsiteAccess'] = UpdateBucketRequestWebsiteAccess - - -class UpdateBucketRequest(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'website_access': (UpdateBucketRequestWebsiteAccess,), # noqa: E501 - 'quotas': (UpdateBucketRequestQuotas,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'website_access': 'websiteAccess', # noqa: E501 - 'quotas': 'quotas', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """UpdateBucketRequest - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - website_access (UpdateBucketRequestWebsiteAccess): [optional] # noqa: E501 - quotas (UpdateBucketRequestQuotas): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """UpdateBucketRequest - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - website_access (UpdateBucketRequestWebsiteAccess): [optional] # noqa: E501 - quotas (UpdateBucketRequestQuotas): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/python/garage_admin_sdk/model/update_bucket_request_quotas.py b/python/garage_admin_sdk/model/update_bucket_request_quotas.py deleted file mode 100644 index 437f92b..0000000 --- a/python/garage_admin_sdk/model/update_bucket_request_quotas.py +++ /dev/null @@ -1,267 +0,0 @@ -""" - Garage Administration API v0+garage-v0.8.0 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.8.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from garage_admin_sdk.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from garage_admin_sdk.exceptions import ApiAttributeError - - - -class UpdateBucketRequestQuotas(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'max_size': (int, none_type,), # noqa: E501 - 'max_objects': (int, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'max_size': 'maxSize', # noqa: E501 - 'max_objects': 'maxObjects', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """UpdateBucketRequestQuotas - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - max_size (int, none_type): [optional] # noqa: E501 - max_objects (int, none_type): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """UpdateBucketRequestQuotas - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - max_size (int, none_type): [optional] # noqa: E501 - max_objects (int, none_type): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/python/garage_admin_sdk/model/update_bucket_request_website_access.py b/python/garage_admin_sdk/model/update_bucket_request_website_access.py deleted file mode 100644 index cc15778..0000000 --- a/python/garage_admin_sdk/model/update_bucket_request_website_access.py +++ /dev/null @@ -1,271 +0,0 @@ -""" - Garage Administration API v0+garage-v0.8.0 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.8.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from garage_admin_sdk.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from garage_admin_sdk.exceptions import ApiAttributeError - - - -class UpdateBucketRequestWebsiteAccess(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'enabled': (bool,), # noqa: E501 - 'index_document': (str,), # noqa: E501 - 'error_document': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'enabled': 'enabled', # noqa: E501 - 'index_document': 'indexDocument', # noqa: E501 - 'error_document': 'errorDocument', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """UpdateBucketRequestWebsiteAccess - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - enabled (bool): [optional] # noqa: E501 - index_document (str): [optional] # noqa: E501 - error_document (str): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """UpdateBucketRequestWebsiteAccess - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - enabled (bool): [optional] # noqa: E501 - index_document (str): [optional] # noqa: E501 - error_document (str): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/python/garage_admin_sdk/model/update_key_request.py b/python/garage_admin_sdk/model/update_key_request.py deleted file mode 100644 index e119f65..0000000 --- a/python/garage_admin_sdk/model/update_key_request.py +++ /dev/null @@ -1,279 +0,0 @@ -""" - Garage Administration API v0+garage-v0.8.0 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.8.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from garage_admin_sdk.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from garage_admin_sdk.exceptions import ApiAttributeError - - -def lazy_import(): - from garage_admin_sdk.model.update_key_request_allow import UpdateKeyRequestAllow - from garage_admin_sdk.model.update_key_request_deny import UpdateKeyRequestDeny - globals()['UpdateKeyRequestAllow'] = UpdateKeyRequestAllow - globals()['UpdateKeyRequestDeny'] = UpdateKeyRequestDeny - - -class UpdateKeyRequest(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'name': (str,), # noqa: E501 - 'allow': (UpdateKeyRequestAllow,), # noqa: E501 - 'deny': (UpdateKeyRequestDeny,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'name': 'name', # noqa: E501 - 'allow': 'allow', # noqa: E501 - 'deny': 'deny', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """UpdateKeyRequest - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - name (str): [optional] # noqa: E501 - allow (UpdateKeyRequestAllow): [optional] # noqa: E501 - deny (UpdateKeyRequestDeny): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """UpdateKeyRequest - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - name (str): [optional] # noqa: E501 - allow (UpdateKeyRequestAllow): [optional] # noqa: E501 - deny (UpdateKeyRequestDeny): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/python/garage_admin_sdk/model/update_key_request_allow.py b/python/garage_admin_sdk/model/update_key_request_allow.py deleted file mode 100644 index 9ddb4af..0000000 --- a/python/garage_admin_sdk/model/update_key_request_allow.py +++ /dev/null @@ -1,263 +0,0 @@ -""" - Garage Administration API v0+garage-v0.8.0 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.8.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from garage_admin_sdk.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from garage_admin_sdk.exceptions import ApiAttributeError - - - -class UpdateKeyRequestAllow(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'create_bucket': (bool,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'create_bucket': 'createBucket', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """UpdateKeyRequestAllow - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - create_bucket (bool): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """UpdateKeyRequestAllow - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - create_bucket (bool): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/python/garage_admin_sdk/model/update_key_request_deny.py b/python/garage_admin_sdk/model/update_key_request_deny.py deleted file mode 100644 index d8ef3dd..0000000 --- a/python/garage_admin_sdk/model/update_key_request_deny.py +++ /dev/null @@ -1,263 +0,0 @@ -""" - Garage Administration API v0+garage-v0.8.0 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.8.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from garage_admin_sdk.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from garage_admin_sdk.exceptions import ApiAttributeError - - - -class UpdateKeyRequestDeny(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'create_bucket': (bool,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'create_bucket': 'createBucket', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """UpdateKeyRequestDeny - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - create_bucket (bool): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """UpdateKeyRequestDeny - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - create_bucket (bool): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/python/garage_admin_sdk/model_utils.py b/python/garage_admin_sdk/model_utils.py deleted file mode 100644 index fc7c0fc..0000000 --- a/python/garage_admin_sdk/model_utils.py +++ /dev/null @@ -1,2058 +0,0 @@ -""" - Garage Administration API v0+garage-v0.8.0 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.8.0 - Generated by: https://openapi-generator.tech -""" - - -from datetime import date, datetime # noqa: F401 -from copy import deepcopy -import inspect -import io -import os -import pprint -import re -import tempfile -import uuid - -from dateutil.parser import parse - -from garage_admin_sdk.exceptions import ( - ApiKeyError, - ApiAttributeError, - ApiTypeError, - ApiValueError, -) - -none_type = type(None) -file_type = io.IOBase - - -def convert_js_args_to_python_args(fn): - from functools import wraps - @wraps(fn) - def wrapped_init(_self, *args, **kwargs): - """ - An attribute named `self` received from the api will conflicts with the reserved `self` - parameter of a class method. During generation, `self` attributes are mapped - to `_self` in models. Here, we name `_self` instead of `self` to avoid conflicts. - """ - spec_property_naming = kwargs.get('_spec_property_naming', False) - if spec_property_naming: - kwargs = change_keys_js_to_python( - kwargs, _self if isinstance( - _self, type) else _self.__class__) - return fn(_self, *args, **kwargs) - return wrapped_init - - -class cached_property(object): - # this caches the result of the function call for fn with no inputs - # use this as a decorator on function methods that you want converted - # into cached properties - result_key = '_results' - - def __init__(self, fn): - self._fn = fn - - def __get__(self, instance, cls=None): - if self.result_key in vars(self): - return vars(self)[self.result_key] - else: - result = self._fn() - setattr(self, self.result_key, result) - return result - - -PRIMITIVE_TYPES = (list, float, int, bool, datetime, date, str, file_type) - - -def allows_single_value_input(cls): - """ - This function returns True if the input composed schema model or any - descendant model allows a value only input - This is true for cases where oneOf contains items like: - oneOf: - - float - - NumberWithValidation - - StringEnum - - ArrayModel - - null - TODO: lru_cache this - """ - if ( - issubclass(cls, ModelSimple) or - cls in PRIMITIVE_TYPES - ): - return True - elif issubclass(cls, ModelComposed): - if not cls._composed_schemas['oneOf']: - return False - return any(allows_single_value_input(c) for c in cls._composed_schemas['oneOf']) - return False - - -def composed_model_input_classes(cls): - """ - This function returns a list of the possible models that can be accepted as - inputs. - TODO: lru_cache this - """ - if issubclass(cls, ModelSimple) or cls in PRIMITIVE_TYPES: - return [cls] - elif issubclass(cls, ModelNormal): - if cls.discriminator is None: - return [cls] - else: - return get_discriminated_classes(cls) - elif issubclass(cls, ModelComposed): - if not cls._composed_schemas['oneOf']: - return [] - if cls.discriminator is None: - input_classes = [] - for c in cls._composed_schemas['oneOf']: - input_classes.extend(composed_model_input_classes(c)) - return input_classes - else: - return get_discriminated_classes(cls) - return [] - - -class OpenApiModel(object): - """The base class for all OpenAPIModels""" - - def set_attribute(self, name, value): - # this is only used to set properties on self - - path_to_item = [] - if self._path_to_item: - path_to_item.extend(self._path_to_item) - path_to_item.append(name) - - if name in self.openapi_types: - required_types_mixed = self.openapi_types[name] - elif self.additional_properties_type is None: - raise ApiAttributeError( - "{0} has no attribute '{1}'".format( - type(self).__name__, name), - path_to_item - ) - elif self.additional_properties_type is not None: - required_types_mixed = self.additional_properties_type - - if get_simple_class(name) != str: - error_msg = type_error_message( - var_name=name, - var_value=name, - valid_classes=(str,), - key_type=True - ) - raise ApiTypeError( - error_msg, - path_to_item=path_to_item, - valid_classes=(str,), - key_type=True - ) - - if self._check_type: - value = validate_and_convert_types( - value, required_types_mixed, path_to_item, self._spec_property_naming, - self._check_type, configuration=self._configuration) - if (name,) in self.allowed_values: - check_allowed_values( - self.allowed_values, - (name,), - value - ) - if (name,) in self.validations: - check_validations( - self.validations, - (name,), - value, - self._configuration - ) - self.__dict__['_data_store'][name] = value - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other - - def __setattr__(self, attr, value): - """set the value of an attribute using dot notation: `instance.attr = val`""" - self[attr] = value - - def __getattr__(self, attr): - """get the value of an attribute using dot notation: `instance.attr`""" - return self.__getitem__(attr) - - def __copy__(self): - cls = self.__class__ - if self.get("_spec_property_naming", False): - return cls._new_from_openapi_data(**self.__dict__) - else: - return cls.__new__(cls, **self.__dict__) - - def __deepcopy__(self, memo): - cls = self.__class__ - - if self.get("_spec_property_naming", False): - new_inst = cls._new_from_openapi_data() - else: - new_inst = cls.__new__(cls, **self.__dict__) - - for k, v in self.__dict__.items(): - setattr(new_inst, k, deepcopy(v, memo)) - return new_inst - - - def __new__(cls, *args, **kwargs): - # this function uses the discriminator to - # pick a new schema/class to instantiate because a discriminator - # propertyName value was passed in - - if len(args) == 1: - arg = args[0] - if arg is None and is_type_nullable(cls): - # The input data is the 'null' value and the type is nullable. - return None - - if issubclass(cls, ModelComposed) and allows_single_value_input(cls): - model_kwargs = {} - oneof_instance = get_oneof_instance(cls, model_kwargs, kwargs, model_arg=arg) - return oneof_instance - - visited_composed_classes = kwargs.get('_visited_composed_classes', ()) - if ( - cls.discriminator is None or - cls in visited_composed_classes - ): - # Use case 1: this openapi schema (cls) does not have a discriminator - # Use case 2: we have already visited this class before and are sure that we - # want to instantiate it this time. We have visited this class deserializing - # a payload with a discriminator. During that process we traveled through - # this class but did not make an instance of it. Now we are making an - # instance of a composed class which contains cls in it, so this time make an instance of cls. - # - # Here's an example of use case 2: If Animal has a discriminator - # petType and we pass in "Dog", and the class Dog - # allOf includes Animal, we move through Animal - # once using the discriminator, and pick Dog. - # Then in the composed schema dog Dog, we will make an instance of the - # Animal class (because Dal has allOf: Animal) but this time we won't travel - # through Animal's discriminator because we passed in - # _visited_composed_classes = (Animal,) - - return super(OpenApiModel, cls).__new__(cls) - - # Get the name and value of the discriminator property. - # The discriminator name is obtained from the discriminator meta-data - # and the discriminator value is obtained from the input data. - discr_propertyname_py = list(cls.discriminator.keys())[0] - discr_propertyname_js = cls.attribute_map[discr_propertyname_py] - if discr_propertyname_js in kwargs: - discr_value = kwargs[discr_propertyname_js] - elif discr_propertyname_py in kwargs: - discr_value = kwargs[discr_propertyname_py] - else: - # The input data does not contain the discriminator property. - path_to_item = kwargs.get('_path_to_item', ()) - raise ApiValueError( - "Cannot deserialize input data due to missing discriminator. " - "The discriminator property '%s' is missing at path: %s" % - (discr_propertyname_js, path_to_item) - ) - - # Implementation note: the last argument to get_discriminator_class - # is a list of visited classes. get_discriminator_class may recursively - # call itself and update the list of visited classes, and the initial - # value must be an empty list. Hence not using 'visited_composed_classes' - new_cls = get_discriminator_class( - cls, discr_propertyname_py, discr_value, []) - if new_cls is None: - path_to_item = kwargs.get('_path_to_item', ()) - disc_prop_value = kwargs.get( - discr_propertyname_js, kwargs.get(discr_propertyname_py)) - raise ApiValueError( - "Cannot deserialize input data due to invalid discriminator " - "value. The OpenAPI document has no mapping for discriminator " - "property '%s'='%s' at path: %s" % - (discr_propertyname_js, disc_prop_value, path_to_item) - ) - - if new_cls in visited_composed_classes: - # if we are making an instance of a composed schema Descendent - # which allOf includes Ancestor, then Ancestor contains - # a discriminator that includes Descendent. - # So if we make an instance of Descendent, we have to make an - # instance of Ancestor to hold the allOf properties. - # This code detects that use case and makes the instance of Ancestor - # For example: - # When making an instance of Dog, _visited_composed_classes = (Dog,) - # then we make an instance of Animal to include in dog._composed_instances - # so when we are here, cls is Animal - # cls.discriminator != None - # cls not in _visited_composed_classes - # new_cls = Dog - # but we know we know that we already have Dog - # because it is in visited_composed_classes - # so make Animal here - return super(OpenApiModel, cls).__new__(cls) - - # Build a list containing all oneOf and anyOf descendants. - oneof_anyof_classes = None - if cls._composed_schemas is not None: - oneof_anyof_classes = ( - cls._composed_schemas.get('oneOf', ()) + - cls._composed_schemas.get('anyOf', ())) - oneof_anyof_child = new_cls in oneof_anyof_classes - kwargs['_visited_composed_classes'] = visited_composed_classes + (cls,) - - if cls._composed_schemas.get('allOf') and oneof_anyof_child: - # Validate that we can make self because when we make the - # new_cls it will not include the allOf validations in self - self_inst = super(OpenApiModel, cls).__new__(cls) - self_inst.__init__(*args, **kwargs) - - if kwargs.get("_spec_property_naming", False): - # when true, implies new is from deserialization - new_inst = new_cls._new_from_openapi_data(*args, **kwargs) - else: - new_inst = new_cls.__new__(new_cls, *args, **kwargs) - new_inst.__init__(*args, **kwargs) - - return new_inst - - @classmethod - @convert_js_args_to_python_args - def _new_from_openapi_data(cls, *args, **kwargs): - # this function uses the discriminator to - # pick a new schema/class to instantiate because a discriminator - # propertyName value was passed in - - if len(args) == 1: - arg = args[0] - if arg is None and is_type_nullable(cls): - # The input data is the 'null' value and the type is nullable. - return None - - if issubclass(cls, ModelComposed) and allows_single_value_input(cls): - model_kwargs = {} - oneof_instance = get_oneof_instance(cls, model_kwargs, kwargs, model_arg=arg) - return oneof_instance - - visited_composed_classes = kwargs.get('_visited_composed_classes', ()) - if ( - cls.discriminator is None or - cls in visited_composed_classes - ): - # Use case 1: this openapi schema (cls) does not have a discriminator - # Use case 2: we have already visited this class before and are sure that we - # want to instantiate it this time. We have visited this class deserializing - # a payload with a discriminator. During that process we traveled through - # this class but did not make an instance of it. Now we are making an - # instance of a composed class which contains cls in it, so this time make an instance of cls. - # - # Here's an example of use case 2: If Animal has a discriminator - # petType and we pass in "Dog", and the class Dog - # allOf includes Animal, we move through Animal - # once using the discriminator, and pick Dog. - # Then in the composed schema dog Dog, we will make an instance of the - # Animal class (because Dal has allOf: Animal) but this time we won't travel - # through Animal's discriminator because we passed in - # _visited_composed_classes = (Animal,) - - return cls._from_openapi_data(*args, **kwargs) - - # Get the name and value of the discriminator property. - # The discriminator name is obtained from the discriminator meta-data - # and the discriminator value is obtained from the input data. - discr_propertyname_py = list(cls.discriminator.keys())[0] - discr_propertyname_js = cls.attribute_map[discr_propertyname_py] - if discr_propertyname_js in kwargs: - discr_value = kwargs[discr_propertyname_js] - elif discr_propertyname_py in kwargs: - discr_value = kwargs[discr_propertyname_py] - else: - # The input data does not contain the discriminator property. - path_to_item = kwargs.get('_path_to_item', ()) - raise ApiValueError( - "Cannot deserialize input data due to missing discriminator. " - "The discriminator property '%s' is missing at path: %s" % - (discr_propertyname_js, path_to_item) - ) - - # Implementation note: the last argument to get_discriminator_class - # is a list of visited classes. get_discriminator_class may recursively - # call itself and update the list of visited classes, and the initial - # value must be an empty list. Hence not using 'visited_composed_classes' - new_cls = get_discriminator_class( - cls, discr_propertyname_py, discr_value, []) - if new_cls is None: - path_to_item = kwargs.get('_path_to_item', ()) - disc_prop_value = kwargs.get( - discr_propertyname_js, kwargs.get(discr_propertyname_py)) - raise ApiValueError( - "Cannot deserialize input data due to invalid discriminator " - "value. The OpenAPI document has no mapping for discriminator " - "property '%s'='%s' at path: %s" % - (discr_propertyname_js, disc_prop_value, path_to_item) - ) - - if new_cls in visited_composed_classes: - # if we are making an instance of a composed schema Descendent - # which allOf includes Ancestor, then Ancestor contains - # a discriminator that includes Descendent. - # So if we make an instance of Descendent, we have to make an - # instance of Ancestor to hold the allOf properties. - # This code detects that use case and makes the instance of Ancestor - # For example: - # When making an instance of Dog, _visited_composed_classes = (Dog,) - # then we make an instance of Animal to include in dog._composed_instances - # so when we are here, cls is Animal - # cls.discriminator != None - # cls not in _visited_composed_classes - # new_cls = Dog - # but we know we know that we already have Dog - # because it is in visited_composed_classes - # so make Animal here - return cls._from_openapi_data(*args, **kwargs) - - # Build a list containing all oneOf and anyOf descendants. - oneof_anyof_classes = None - if cls._composed_schemas is not None: - oneof_anyof_classes = ( - cls._composed_schemas.get('oneOf', ()) + - cls._composed_schemas.get('anyOf', ())) - oneof_anyof_child = new_cls in oneof_anyof_classes - kwargs['_visited_composed_classes'] = visited_composed_classes + (cls,) - - if cls._composed_schemas.get('allOf') and oneof_anyof_child: - # Validate that we can make self because when we make the - # new_cls it will not include the allOf validations in self - self_inst = cls._from_openapi_data(*args, **kwargs) - - new_inst = new_cls._new_from_openapi_data(*args, **kwargs) - return new_inst - - -class ModelSimple(OpenApiModel): - """the parent class of models whose type != object in their - swagger/openapi""" - - def __setitem__(self, name, value): - """set the value of an attribute using square-bracket notation: `instance[attr] = val`""" - if name in self.required_properties: - self.__dict__[name] = value - return - - self.set_attribute(name, value) - - def get(self, name, default=None): - """returns the value of an attribute or some default value if the attribute was not set""" - if name in self.required_properties: - return self.__dict__[name] - - return self.__dict__['_data_store'].get(name, default) - - def __getitem__(self, name): - """get the value of an attribute using square-bracket notation: `instance[attr]`""" - if name in self: - return self.get(name) - - raise ApiAttributeError( - "{0} has no attribute '{1}'".format( - type(self).__name__, name), - [e for e in [self._path_to_item, name] if e] - ) - - def __contains__(self, name): - """used by `in` operator to check if an attribute value was set in an instance: `'attr' in instance`""" - if name in self.required_properties: - return name in self.__dict__ - - return name in self.__dict__['_data_store'] - - def to_str(self): - """Returns the string representation of the model""" - return str(self.value) - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, self.__class__): - return False - - this_val = self._data_store['value'] - that_val = other._data_store['value'] - types = set() - types.add(this_val.__class__) - types.add(that_val.__class__) - vals_equal = this_val == that_val - return vals_equal - - -class ModelNormal(OpenApiModel): - """the parent class of models whose type == object in their - swagger/openapi""" - - def __setitem__(self, name, value): - """set the value of an attribute using square-bracket notation: `instance[attr] = val`""" - if name in self.required_properties: - self.__dict__[name] = value - return - - self.set_attribute(name, value) - - def get(self, name, default=None): - """returns the value of an attribute or some default value if the attribute was not set""" - if name in self.required_properties: - return self.__dict__[name] - - return self.__dict__['_data_store'].get(name, default) - - def __getitem__(self, name): - """get the value of an attribute using square-bracket notation: `instance[attr]`""" - if name in self: - return self.get(name) - - raise ApiAttributeError( - "{0} has no attribute '{1}'".format( - type(self).__name__, name), - [e for e in [self._path_to_item, name] if e] - ) - - def __contains__(self, name): - """used by `in` operator to check if an attribute value was set in an instance: `'attr' in instance`""" - if name in self.required_properties: - return name in self.__dict__ - - return name in self.__dict__['_data_store'] - - def to_dict(self): - """Returns the model properties as a dict""" - return model_to_dict(self, serialize=False) - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, self.__class__): - return False - - if not set(self._data_store.keys()) == set(other._data_store.keys()): - return False - for _var_name, this_val in self._data_store.items(): - that_val = other._data_store[_var_name] - types = set() - types.add(this_val.__class__) - types.add(that_val.__class__) - vals_equal = this_val == that_val - if not vals_equal: - return False - return True - - -class ModelComposed(OpenApiModel): - """the parent class of models whose type == object in their - swagger/openapi and have oneOf/allOf/anyOf - - When one sets a property we use var_name_to_model_instances to store the value in - the correct class instances + run any type checking + validation code. - When one gets a property we use var_name_to_model_instances to get the value - from the correct class instances. - This allows multiple composed schemas to contain the same property with additive - constraints on the value. - - _composed_schemas (dict) stores the anyOf/allOf/oneOf classes - key (str): allOf/oneOf/anyOf - value (list): the classes in the XOf definition. - Note: none_type can be included when the openapi document version >= 3.1.0 - _composed_instances (list): stores a list of instances of the composed schemas - defined in _composed_schemas. When properties are accessed in the self instance, - they are returned from the self._data_store or the data stores in the instances - in self._composed_schemas - _var_name_to_model_instances (dict): maps between a variable name on self and - the composed instances (self included) which contain that data - key (str): property name - value (list): list of class instances, self or instances in _composed_instances - which contain the value that the key is referring to. - """ - - def __setitem__(self, name, value): - """set the value of an attribute using square-bracket notation: `instance[attr] = val`""" - if name in self.required_properties: - self.__dict__[name] = value - return - - """ - Use cases: - 1. additional_properties_type is None (additionalProperties == False in spec) - Check for property presence in self.openapi_types - if not present then throw an error - if present set in self, set attribute - always set on composed schemas - 2. additional_properties_type exists - set attribute on self - always set on composed schemas - """ - if self.additional_properties_type is None: - """ - For an attribute to exist on a composed schema it must: - - fulfill schema_requirements in the self composed schema not considering oneOf/anyOf/allOf schemas AND - - fulfill schema_requirements in each oneOf/anyOf/allOf schemas - - schema_requirements: - For an attribute to exist on a schema it must: - - be present in properties at the schema OR - - have additionalProperties unset (defaults additionalProperties = any type) OR - - have additionalProperties set - """ - if name not in self.openapi_types: - raise ApiAttributeError( - "{0} has no attribute '{1}'".format( - type(self).__name__, name), - [e for e in [self._path_to_item, name] if e] - ) - # attribute must be set on self and composed instances - self.set_attribute(name, value) - for model_instance in self._composed_instances: - setattr(model_instance, name, value) - if name not in self._var_name_to_model_instances: - # we assigned an additional property - self.__dict__['_var_name_to_model_instances'][name] = self._composed_instances + [self] - return None - - __unset_attribute_value__ = object() - - def get(self, name, default=None): - """returns the value of an attribute or some default value if the attribute was not set""" - if name in self.required_properties: - return self.__dict__[name] - - # get the attribute from the correct instance - model_instances = self._var_name_to_model_instances.get(name) - values = [] - # A composed model stores self and child (oneof/anyOf/allOf) models under - # self._var_name_to_model_instances. - # Any property must exist in self and all model instances - # The value stored in all model instances must be the same - if model_instances: - for model_instance in model_instances: - if name in model_instance._data_store: - v = model_instance._data_store[name] - if v not in values: - values.append(v) - len_values = len(values) - if len_values == 0: - return default - elif len_values == 1: - return values[0] - elif len_values > 1: - raise ApiValueError( - "Values stored for property {0} in {1} differ when looking " - "at self and self's composed instances. All values must be " - "the same".format(name, type(self).__name__), - [e for e in [self._path_to_item, name] if e] - ) - - def __getitem__(self, name): - """get the value of an attribute using square-bracket notation: `instance[attr]`""" - value = self.get(name, self.__unset_attribute_value__) - if value is self.__unset_attribute_value__: - raise ApiAttributeError( - "{0} has no attribute '{1}'".format( - type(self).__name__, name), - [e for e in [self._path_to_item, name] if e] - ) - return value - - def __contains__(self, name): - """used by `in` operator to check if an attribute value was set in an instance: `'attr' in instance`""" - - if name in self.required_properties: - return name in self.__dict__ - - model_instances = self._var_name_to_model_instances.get( - name, self._additional_properties_model_instances) - - if model_instances: - for model_instance in model_instances: - if name in model_instance._data_store: - return True - - return False - - def to_dict(self): - """Returns the model properties as a dict""" - return model_to_dict(self, serialize=False) - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, self.__class__): - return False - - if not set(self._data_store.keys()) == set(other._data_store.keys()): - return False - for _var_name, this_val in self._data_store.items(): - that_val = other._data_store[_var_name] - types = set() - types.add(this_val.__class__) - types.add(that_val.__class__) - vals_equal = this_val == that_val - if not vals_equal: - return False - return True - - -COERCION_INDEX_BY_TYPE = { - ModelComposed: 0, - ModelNormal: 1, - ModelSimple: 2, - none_type: 3, # The type of 'None'. - list: 4, - dict: 5, - float: 6, - int: 7, - bool: 8, - datetime: 9, - date: 10, - str: 11, - file_type: 12, # 'file_type' is an alias for the built-in 'file' or 'io.IOBase' type. -} - -# these are used to limit what type conversions we try to do -# when we have a valid type already and we want to try converting -# to another type -UPCONVERSION_TYPE_PAIRS = ( - (str, datetime), - (str, date), - # A float may be serialized as an integer, e.g. '3' is a valid serialized float. - (int, float), - (list, ModelComposed), - (dict, ModelComposed), - (str, ModelComposed), - (int, ModelComposed), - (float, ModelComposed), - (list, ModelComposed), - (list, ModelNormal), - (dict, ModelNormal), - (str, ModelSimple), - (int, ModelSimple), - (float, ModelSimple), - (list, ModelSimple), -) - -COERCIBLE_TYPE_PAIRS = { - False: ( # client instantiation of a model with client data - # (dict, ModelComposed), - # (list, ModelComposed), - # (dict, ModelNormal), - # (list, ModelNormal), - # (str, ModelSimple), - # (int, ModelSimple), - # (float, ModelSimple), - # (list, ModelSimple), - # (str, int), - # (str, float), - # (str, datetime), - # (str, date), - # (int, str), - # (float, str), - ), - True: ( # server -> client data - (dict, ModelComposed), - (list, ModelComposed), - (dict, ModelNormal), - (list, ModelNormal), - (str, ModelSimple), - (int, ModelSimple), - (float, ModelSimple), - (list, ModelSimple), - # (str, int), - # (str, float), - (str, datetime), - (str, date), - # (int, str), - # (float, str), - (str, file_type) - ), -} - - -def get_simple_class(input_value): - """Returns an input_value's simple class that we will use for type checking - Python2: - float and int will return int, where int is the python3 int backport - str and unicode will return str, where str is the python3 str backport - Note: float and int ARE both instances of int backport - Note: str_py2 and unicode_py2 are NOT both instances of str backport - - Args: - input_value (class/class_instance): the item for which we will return - the simple class - """ - if isinstance(input_value, type): - # input_value is a class - return input_value - elif isinstance(input_value, tuple): - return tuple - elif isinstance(input_value, list): - return list - elif isinstance(input_value, dict): - return dict - elif isinstance(input_value, none_type): - return none_type - elif isinstance(input_value, file_type): - return file_type - elif isinstance(input_value, bool): - # this must be higher than the int check because - # isinstance(True, int) == True - return bool - elif isinstance(input_value, int): - return int - elif isinstance(input_value, datetime): - # this must be higher than the date check because - # isinstance(datetime_instance, date) == True - return datetime - elif isinstance(input_value, date): - return date - elif isinstance(input_value, str): - return str - return type(input_value) - - -def check_allowed_values(allowed_values, input_variable_path, input_values): - """Raises an exception if the input_values are not allowed - - Args: - allowed_values (dict): the allowed_values dict - input_variable_path (tuple): the path to the input variable - input_values (list/str/int/float/date/datetime): the values that we - are checking to see if they are in allowed_values - """ - these_allowed_values = list(allowed_values[input_variable_path].values()) - if (isinstance(input_values, list) - and not set(input_values).issubset( - set(these_allowed_values))): - invalid_values = ", ".join( - map(str, set(input_values) - set(these_allowed_values))), - raise ApiValueError( - "Invalid values for `%s` [%s], must be a subset of [%s]" % - ( - input_variable_path[0], - invalid_values, - ", ".join(map(str, these_allowed_values)) - ) - ) - elif (isinstance(input_values, dict) - and not set( - input_values.keys()).issubset(set(these_allowed_values))): - invalid_values = ", ".join( - map(str, set(input_values.keys()) - set(these_allowed_values))) - raise ApiValueError( - "Invalid keys in `%s` [%s], must be a subset of [%s]" % - ( - input_variable_path[0], - invalid_values, - ", ".join(map(str, these_allowed_values)) - ) - ) - elif (not isinstance(input_values, (list, dict)) - and input_values not in these_allowed_values): - raise ApiValueError( - "Invalid value for `%s` (%s), must be one of %s" % - ( - input_variable_path[0], - input_values, - these_allowed_values - ) - ) - - -def is_json_validation_enabled(schema_keyword, configuration=None): - """Returns true if JSON schema validation is enabled for the specified - validation keyword. This can be used to skip JSON schema structural validation - as requested in the configuration. - - Args: - schema_keyword (string): the name of a JSON schema validation keyword. - configuration (Configuration): the configuration class. - """ - - return (configuration is None or - not hasattr(configuration, '_disabled_client_side_validations') or - schema_keyword not in configuration._disabled_client_side_validations) - - -def check_validations( - validations, input_variable_path, input_values, - configuration=None): - """Raises an exception if the input_values are invalid - - Args: - validations (dict): the validation dictionary. - input_variable_path (tuple): the path to the input variable. - input_values (list/str/int/float/date/datetime): the values that we - are checking. - configuration (Configuration): the configuration class. - """ - - if input_values is None: - return - - current_validations = validations[input_variable_path] - if (is_json_validation_enabled('multipleOf', configuration) and - 'multiple_of' in current_validations and - isinstance(input_values, (int, float)) and - not (float(input_values) / current_validations['multiple_of']).is_integer()): - # Note 'multipleOf' will be as good as the floating point arithmetic. - raise ApiValueError( - "Invalid value for `%s`, value must be a multiple of " - "`%s`" % ( - input_variable_path[0], - current_validations['multiple_of'] - ) - ) - - if (is_json_validation_enabled('maxLength', configuration) and - 'max_length' in current_validations and - len(input_values) > current_validations['max_length']): - raise ApiValueError( - "Invalid value for `%s`, length must be less than or equal to " - "`%s`" % ( - input_variable_path[0], - current_validations['max_length'] - ) - ) - - if (is_json_validation_enabled('minLength', configuration) and - 'min_length' in current_validations and - len(input_values) < current_validations['min_length']): - raise ApiValueError( - "Invalid value for `%s`, length must be greater than or equal to " - "`%s`" % ( - input_variable_path[0], - current_validations['min_length'] - ) - ) - - if (is_json_validation_enabled('maxItems', configuration) and - 'max_items' in current_validations and - len(input_values) > current_validations['max_items']): - raise ApiValueError( - "Invalid value for `%s`, number of items must be less than or " - "equal to `%s`" % ( - input_variable_path[0], - current_validations['max_items'] - ) - ) - - if (is_json_validation_enabled('minItems', configuration) and - 'min_items' in current_validations and - len(input_values) < current_validations['min_items']): - raise ValueError( - "Invalid value for `%s`, number of items must be greater than or " - "equal to `%s`" % ( - input_variable_path[0], - current_validations['min_items'] - ) - ) - - items = ('exclusive_maximum', 'inclusive_maximum', 'exclusive_minimum', - 'inclusive_minimum') - if (any(item in current_validations for item in items)): - if isinstance(input_values, list): - max_val = max(input_values) - min_val = min(input_values) - elif isinstance(input_values, dict): - max_val = max(input_values.values()) - min_val = min(input_values.values()) - else: - max_val = input_values - min_val = input_values - - if (is_json_validation_enabled('exclusiveMaximum', configuration) and - 'exclusive_maximum' in current_validations and - max_val >= current_validations['exclusive_maximum']): - raise ApiValueError( - "Invalid value for `%s`, must be a value less than `%s`" % ( - input_variable_path[0], - current_validations['exclusive_maximum'] - ) - ) - - if (is_json_validation_enabled('maximum', configuration) and - 'inclusive_maximum' in current_validations and - max_val > current_validations['inclusive_maximum']): - raise ApiValueError( - "Invalid value for `%s`, must be a value less than or equal to " - "`%s`" % ( - input_variable_path[0], - current_validations['inclusive_maximum'] - ) - ) - - if (is_json_validation_enabled('exclusiveMinimum', configuration) and - 'exclusive_minimum' in current_validations and - min_val <= current_validations['exclusive_minimum']): - raise ApiValueError( - "Invalid value for `%s`, must be a value greater than `%s`" % - ( - input_variable_path[0], - current_validations['exclusive_maximum'] - ) - ) - - if (is_json_validation_enabled('minimum', configuration) and - 'inclusive_minimum' in current_validations and - min_val < current_validations['inclusive_minimum']): - raise ApiValueError( - "Invalid value for `%s`, must be a value greater than or equal " - "to `%s`" % ( - input_variable_path[0], - current_validations['inclusive_minimum'] - ) - ) - flags = current_validations.get('regex', {}).get('flags', 0) - if (is_json_validation_enabled('pattern', configuration) and - 'regex' in current_validations and - not re.search(current_validations['regex']['pattern'], - input_values, flags=flags)): - err_msg = r"Invalid value for `%s`, must match regular expression `%s`" % ( - input_variable_path[0], - current_validations['regex']['pattern'] - ) - if flags != 0: - # Don't print the regex flags if the flags are not - # specified in the OAS document. - err_msg = r"%s with flags=`%s`" % (err_msg, flags) - raise ApiValueError(err_msg) - - -def order_response_types(required_types): - """Returns the required types sorted in coercion order - - Args: - required_types (list/tuple): collection of classes or instance of - list or dict with class information inside it. - - Returns: - (list): coercion order sorted collection of classes or instance - of list or dict with class information inside it. - """ - - def index_getter(class_or_instance): - if isinstance(class_or_instance, list): - return COERCION_INDEX_BY_TYPE[list] - elif isinstance(class_or_instance, dict): - return COERCION_INDEX_BY_TYPE[dict] - elif (inspect.isclass(class_or_instance) - and issubclass(class_or_instance, ModelComposed)): - return COERCION_INDEX_BY_TYPE[ModelComposed] - elif (inspect.isclass(class_or_instance) - and issubclass(class_or_instance, ModelNormal)): - return COERCION_INDEX_BY_TYPE[ModelNormal] - elif (inspect.isclass(class_or_instance) - and issubclass(class_or_instance, ModelSimple)): - return COERCION_INDEX_BY_TYPE[ModelSimple] - elif class_or_instance in COERCION_INDEX_BY_TYPE: - return COERCION_INDEX_BY_TYPE[class_or_instance] - raise ApiValueError("Unsupported type: %s" % class_or_instance) - - sorted_types = sorted( - required_types, - key=lambda class_or_instance: index_getter(class_or_instance) - ) - return sorted_types - - -def remove_uncoercible(required_types_classes, current_item, spec_property_naming, - must_convert=True): - """Only keeps the type conversions that are possible - - Args: - required_types_classes (tuple): tuple of classes that are required - these should be ordered by COERCION_INDEX_BY_TYPE - spec_property_naming (bool): True if the variable names in the input - data are serialized names as specified in the OpenAPI document. - False if the variables names in the input data are python - variable names in PEP-8 snake case. - current_item (any): the current item (input data) to be converted - - Keyword Args: - must_convert (bool): if True the item to convert is of the wrong - type and we want a big list of coercibles - if False, we want a limited list of coercibles - - Returns: - (list): the remaining coercible required types, classes only - """ - current_type_simple = get_simple_class(current_item) - - results_classes = [] - for required_type_class in required_types_classes: - # convert our models to OpenApiModel - required_type_class_simplified = required_type_class - if isinstance(required_type_class_simplified, type): - if issubclass(required_type_class_simplified, ModelComposed): - required_type_class_simplified = ModelComposed - elif issubclass(required_type_class_simplified, ModelNormal): - required_type_class_simplified = ModelNormal - elif issubclass(required_type_class_simplified, ModelSimple): - required_type_class_simplified = ModelSimple - - if required_type_class_simplified == current_type_simple: - # don't consider converting to one's own class - continue - - class_pair = (current_type_simple, required_type_class_simplified) - if must_convert and class_pair in COERCIBLE_TYPE_PAIRS[spec_property_naming]: - results_classes.append(required_type_class) - elif class_pair in UPCONVERSION_TYPE_PAIRS: - results_classes.append(required_type_class) - return results_classes - - -def get_discriminated_classes(cls): - """ - Returns all the classes that a discriminator converts to - TODO: lru_cache this - """ - possible_classes = [] - key = list(cls.discriminator.keys())[0] - if is_type_nullable(cls): - possible_classes.append(cls) - for discr_cls in cls.discriminator[key].values(): - if hasattr(discr_cls, 'discriminator') and discr_cls.discriminator is not None: - possible_classes.extend(get_discriminated_classes(discr_cls)) - else: - possible_classes.append(discr_cls) - return possible_classes - - -def get_possible_classes(cls, from_server_context): - # TODO: lru_cache this - possible_classes = [cls] - if from_server_context: - return possible_classes - if hasattr(cls, 'discriminator') and cls.discriminator is not None: - possible_classes = [] - possible_classes.extend(get_discriminated_classes(cls)) - elif issubclass(cls, ModelComposed): - possible_classes.extend(composed_model_input_classes(cls)) - return possible_classes - - -def get_required_type_classes(required_types_mixed, spec_property_naming): - """Converts the tuple required_types into a tuple and a dict described - below - - Args: - required_types_mixed (tuple/list): will contain either classes or - instance of list or dict - spec_property_naming (bool): if True these values came from the - server, and we use the data types in our endpoints. - If False, we are client side and we need to include - oneOf and discriminator classes inside the data types in our endpoints - - Returns: - (valid_classes, dict_valid_class_to_child_types_mixed): - valid_classes (tuple): the valid classes that the current item - should be - dict_valid_class_to_child_types_mixed (dict): - valid_class (class): this is the key - child_types_mixed (list/dict/tuple): describes the valid child - types - """ - valid_classes = [] - child_req_types_by_current_type = {} - for required_type in required_types_mixed: - if isinstance(required_type, list): - valid_classes.append(list) - child_req_types_by_current_type[list] = required_type - elif isinstance(required_type, tuple): - valid_classes.append(tuple) - child_req_types_by_current_type[tuple] = required_type - elif isinstance(required_type, dict): - valid_classes.append(dict) - child_req_types_by_current_type[dict] = required_type[str] - else: - valid_classes.extend(get_possible_classes(required_type, spec_property_naming)) - return tuple(valid_classes), child_req_types_by_current_type - - -def change_keys_js_to_python(input_dict, model_class): - """ - Converts from javascript_key keys in the input_dict to python_keys in - the output dict using the mapping in model_class. - If the input_dict contains a key which does not declared in the model_class, - the key is added to the output dict as is. The assumption is the model_class - may have undeclared properties (additionalProperties attribute in the OAS - document). - """ - - if getattr(model_class, 'attribute_map', None) is None: - return input_dict - output_dict = {} - reversed_attr_map = {value: key for key, value in - model_class.attribute_map.items()} - for javascript_key, value in input_dict.items(): - python_key = reversed_attr_map.get(javascript_key) - if python_key is None: - # if the key is unknown, it is in error or it is an - # additionalProperties variable - python_key = javascript_key - output_dict[python_key] = value - return output_dict - - -def get_type_error(var_value, path_to_item, valid_classes, key_type=False): - error_msg = type_error_message( - var_name=path_to_item[-1], - var_value=var_value, - valid_classes=valid_classes, - key_type=key_type - ) - return ApiTypeError( - error_msg, - path_to_item=path_to_item, - valid_classes=valid_classes, - key_type=key_type - ) - - -def deserialize_primitive(data, klass, path_to_item): - """Deserializes string to primitive type. - - :param data: str/int/float - :param klass: str/class the class to convert to - - :return: int, float, str, bool, date, datetime - """ - additional_message = "" - try: - if klass in {datetime, date}: - additional_message = ( - "If you need your parameter to have a fallback " - "string value, please set its type as `type: {}` in your " - "spec. That allows the value to be any type. " - ) - if klass == datetime: - if len(data) < 8: - raise ValueError("This is not a datetime") - # The string should be in iso8601 datetime format. - parsed_datetime = parse(data) - date_only = ( - parsed_datetime.hour == 0 and - parsed_datetime.minute == 0 and - parsed_datetime.second == 0 and - parsed_datetime.tzinfo is None and - 8 <= len(data) <= 10 - ) - if date_only: - raise ValueError("This is a date, not a datetime") - return parsed_datetime - elif klass == date: - if len(data) < 8: - raise ValueError("This is not a date") - return parse(data).date() - else: - converted_value = klass(data) - if isinstance(data, str) and klass == float: - if str(converted_value) != data: - # '7' -> 7.0 -> '7.0' != '7' - raise ValueError('This is not a float') - return converted_value - except (OverflowError, ValueError) as ex: - # parse can raise OverflowError - raise ApiValueError( - "{0}Failed to parse {1} as {2}".format( - additional_message, repr(data), klass.__name__ - ), - path_to_item=path_to_item - ) from ex - - -def get_discriminator_class(model_class, - discr_name, - discr_value, cls_visited): - """Returns the child class specified by the discriminator. - - Args: - model_class (OpenApiModel): the model class. - discr_name (string): the name of the discriminator property. - discr_value (any): the discriminator value. - cls_visited (list): list of model classes that have been visited. - Used to determine the discriminator class without - visiting circular references indefinitely. - - Returns: - used_model_class (class/None): the chosen child class that will be used - to deserialize the data, for example dog.Dog. - If a class is not found, None is returned. - """ - - if model_class in cls_visited: - # The class has already been visited and no suitable class was found. - return None - cls_visited.append(model_class) - used_model_class = None - if discr_name in model_class.discriminator: - class_name_to_discr_class = model_class.discriminator[discr_name] - used_model_class = class_name_to_discr_class.get(discr_value) - if used_model_class is None: - # We didn't find a discriminated class in class_name_to_discr_class. - # So look in the ancestor or descendant discriminators - # The discriminator mapping may exist in a descendant (anyOf, oneOf) - # or ancestor (allOf). - # Ancestor example: in the GrandparentAnimal -> ParentPet -> ChildCat - # hierarchy, the discriminator mappings may be defined at any level - # in the hierarchy. - # Descendant example: mammal -> whale/zebra/Pig -> BasquePig/DanishPig - # if we try to make BasquePig from mammal, we need to travel through - # the oneOf descendant discriminators to find BasquePig - descendant_classes = model_class._composed_schemas.get('oneOf', ()) + \ - model_class._composed_schemas.get('anyOf', ()) - ancestor_classes = model_class._composed_schemas.get('allOf', ()) - possible_classes = descendant_classes + ancestor_classes - for cls in possible_classes: - # Check if the schema has inherited discriminators. - if hasattr(cls, 'discriminator') and cls.discriminator is not None: - used_model_class = get_discriminator_class( - cls, discr_name, discr_value, cls_visited) - if used_model_class is not None: - return used_model_class - return used_model_class - - -def deserialize_model(model_data, model_class, path_to_item, check_type, - configuration, spec_property_naming): - """Deserializes model_data to model instance. - - Args: - model_data (int/str/float/bool/none_type/list/dict): data to instantiate the model - model_class (OpenApiModel): the model class - path_to_item (list): path to the model in the received data - check_type (bool): whether to check the data tupe for the values in - the model - configuration (Configuration): the instance to use to convert files - spec_property_naming (bool): True if the variable names in the input - data are serialized names as specified in the OpenAPI document. - False if the variables names in the input data are python - variable names in PEP-8 snake case. - - Returns: - model instance - - Raise: - ApiTypeError - ApiValueError - ApiKeyError - """ - - kw_args = dict(_check_type=check_type, - _path_to_item=path_to_item, - _configuration=configuration, - _spec_property_naming=spec_property_naming) - - if issubclass(model_class, ModelSimple): - return model_class._new_from_openapi_data(model_data, **kw_args) - elif isinstance(model_data, list): - return model_class._new_from_openapi_data(*model_data, **kw_args) - if isinstance(model_data, dict): - kw_args.update(model_data) - return model_class._new_from_openapi_data(**kw_args) - elif isinstance(model_data, PRIMITIVE_TYPES): - return model_class._new_from_openapi_data(model_data, **kw_args) - - -def deserialize_file(response_data, configuration, content_disposition=None): - """Deserializes body to file - - Saves response body into a file in a temporary folder, - using the filename from the `Content-Disposition` header if provided. - - Args: - param response_data (str): the file data to write - configuration (Configuration): the instance to use to convert files - - Keyword Args: - content_disposition (str): the value of the Content-Disposition - header - - Returns: - (file_type): the deserialized file which is open - The user is responsible for closing and reading the file - """ - fd, path = tempfile.mkstemp(dir=configuration.temp_folder_path) - os.close(fd) - os.remove(path) - - if content_disposition: - filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', - content_disposition, - flags=re.I) - if filename is not None: - filename = filename.group(1) - else: - filename = "default_" + str(uuid.uuid4()) - - path = os.path.join(os.path.dirname(path), filename) - - with open(path, "wb") as f: - if isinstance(response_data, str): - # change str to bytes so we can write it - response_data = response_data.encode('utf-8') - f.write(response_data) - - f = open(path, "rb") - return f - - -def attempt_convert_item(input_value, valid_classes, path_to_item, - configuration, spec_property_naming, key_type=False, - must_convert=False, check_type=True): - """ - Args: - input_value (any): the data to convert - valid_classes (any): the classes that are valid - path_to_item (list): the path to the item to convert - configuration (Configuration): the instance to use to convert files - spec_property_naming (bool): True if the variable names in the input - data are serialized names as specified in the OpenAPI document. - False if the variables names in the input data are python - variable names in PEP-8 snake case. - key_type (bool): if True we need to convert a key type (not supported) - must_convert (bool): if True we must convert - check_type (bool): if True we check the type or the returned data in - ModelComposed/ModelNormal/ModelSimple instances - - Returns: - instance (any) the fixed item - - Raises: - ApiTypeError - ApiValueError - ApiKeyError - """ - valid_classes_ordered = order_response_types(valid_classes) - valid_classes_coercible = remove_uncoercible( - valid_classes_ordered, input_value, spec_property_naming) - if not valid_classes_coercible or key_type: - # we do not handle keytype errors, json will take care - # of this for us - if configuration is None or not configuration.discard_unknown_keys: - raise get_type_error(input_value, path_to_item, valid_classes, - key_type=key_type) - for valid_class in valid_classes_coercible: - try: - if issubclass(valid_class, OpenApiModel): - return deserialize_model(input_value, valid_class, - path_to_item, check_type, - configuration, spec_property_naming) - elif valid_class == file_type: - return deserialize_file(input_value, configuration) - return deserialize_primitive(input_value, valid_class, - path_to_item) - except (ApiTypeError, ApiValueError, ApiKeyError) as conversion_exc: - if must_convert: - raise conversion_exc - # if we have conversion errors when must_convert == False - # we ignore the exception and move on to the next class - continue - # we were unable to convert, must_convert == False - return input_value - - -def is_type_nullable(input_type): - """ - Returns true if None is an allowed value for the specified input_type. - - A type is nullable if at least one of the following conditions is true: - 1. The OAS 'nullable' attribute has been specified, - 1. The type is the 'null' type, - 1. The type is a anyOf/oneOf composed schema, and a child schema is - the 'null' type. - Args: - input_type (type): the class of the input_value that we are - checking - Returns: - bool - """ - if input_type is none_type: - return True - if issubclass(input_type, OpenApiModel) and input_type._nullable: - return True - if issubclass(input_type, ModelComposed): - # If oneOf/anyOf, check if the 'null' type is one of the allowed types. - for t in input_type._composed_schemas.get('oneOf', ()): - if is_type_nullable(t): - return True - for t in input_type._composed_schemas.get('anyOf', ()): - if is_type_nullable(t): - return True - return False - - -def is_valid_type(input_class_simple, valid_classes): - """ - Args: - input_class_simple (class): the class of the input_value that we are - checking - valid_classes (tuple): the valid classes that the current item - should be - Returns: - bool - """ - if issubclass(input_class_simple, OpenApiModel) and \ - valid_classes == (bool, date, datetime, dict, float, int, list, str, none_type,): - return True - valid_type = input_class_simple in valid_classes - if not valid_type and ( - issubclass(input_class_simple, OpenApiModel) or - input_class_simple is none_type): - for valid_class in valid_classes: - if input_class_simple is none_type and is_type_nullable(valid_class): - # Schema is oneOf/anyOf and the 'null' type is one of the allowed types. - return True - if not (issubclass(valid_class, OpenApiModel) and valid_class.discriminator): - continue - discr_propertyname_py = list(valid_class.discriminator.keys())[0] - discriminator_classes = ( - valid_class.discriminator[discr_propertyname_py].values() - ) - valid_type = is_valid_type(input_class_simple, discriminator_classes) - if valid_type: - return True - return valid_type - - -def validate_and_convert_types(input_value, required_types_mixed, path_to_item, - spec_property_naming, _check_type, configuration=None): - """Raises a TypeError is there is a problem, otherwise returns value - - Args: - input_value (any): the data to validate/convert - required_types_mixed (list/dict/tuple): A list of - valid classes, or a list tuples of valid classes, or a dict where - the value is a tuple of value classes - path_to_item: (list) the path to the data being validated - this stores a list of keys or indices to get to the data being - validated - spec_property_naming (bool): True if the variable names in the input - data are serialized names as specified in the OpenAPI document. - False if the variables names in the input data are python - variable names in PEP-8 snake case. - _check_type: (boolean) if true, type will be checked and conversion - will be attempted. - configuration: (Configuration): the configuration class to use - when converting file_type items. - If passed, conversion will be attempted when possible - If not passed, no conversions will be attempted and - exceptions will be raised - - Returns: - the correctly typed value - - Raises: - ApiTypeError - """ - results = get_required_type_classes(required_types_mixed, spec_property_naming) - valid_classes, child_req_types_by_current_type = results - - input_class_simple = get_simple_class(input_value) - valid_type = is_valid_type(input_class_simple, valid_classes) - if not valid_type: - if (configuration - or (input_class_simple == dict - and dict not in valid_classes)): - # if input_value is not valid_type try to convert it - converted_instance = attempt_convert_item( - input_value, - valid_classes, - path_to_item, - configuration, - spec_property_naming, - key_type=False, - must_convert=True, - check_type=_check_type - ) - return converted_instance - else: - raise get_type_error(input_value, path_to_item, valid_classes, - key_type=False) - - # input_value's type is in valid_classes - if len(valid_classes) > 1 and configuration: - # there are valid classes which are not the current class - valid_classes_coercible = remove_uncoercible( - valid_classes, input_value, spec_property_naming, must_convert=False) - if valid_classes_coercible: - converted_instance = attempt_convert_item( - input_value, - valid_classes_coercible, - path_to_item, - configuration, - spec_property_naming, - key_type=False, - must_convert=False, - check_type=_check_type - ) - return converted_instance - - if child_req_types_by_current_type == {}: - # all types are of the required types and there are no more inner - # variables left to look at - return input_value - inner_required_types = child_req_types_by_current_type.get( - type(input_value) - ) - if inner_required_types is None: - # for this type, there are not more inner variables left to look at - return input_value - if isinstance(input_value, list): - if input_value == []: - # allow an empty list - return input_value - for index, inner_value in enumerate(input_value): - inner_path = list(path_to_item) - inner_path.append(index) - input_value[index] = validate_and_convert_types( - inner_value, - inner_required_types, - inner_path, - spec_property_naming, - _check_type, - configuration=configuration - ) - elif isinstance(input_value, dict): - if input_value == {}: - # allow an empty dict - return input_value - for inner_key, inner_val in input_value.items(): - inner_path = list(path_to_item) - inner_path.append(inner_key) - if get_simple_class(inner_key) != str: - raise get_type_error(inner_key, inner_path, valid_classes, - key_type=True) - input_value[inner_key] = validate_and_convert_types( - inner_val, - inner_required_types, - inner_path, - spec_property_naming, - _check_type, - configuration=configuration - ) - return input_value - - -def model_to_dict(model_instance, serialize=True): - """Returns the model properties as a dict - - Args: - model_instance (one of your model instances): the model instance that - will be converted to a dict. - - Keyword Args: - serialize (bool): if True, the keys in the dict will be values from - attribute_map - """ - result = {} - - def extract_item(item): return ( - item[0], model_to_dict( - item[1], serialize=serialize)) if hasattr( - item[1], '_data_store') else item - - model_instances = [model_instance] - if model_instance._composed_schemas: - model_instances.extend(model_instance._composed_instances) - seen_json_attribute_names = set() - used_fallback_python_attribute_names = set() - py_to_json_map = {} - for model_instance in model_instances: - for attr, value in model_instance._data_store.items(): - if serialize: - # we use get here because additional property key names do not - # exist in attribute_map - try: - attr = model_instance.attribute_map[attr] - py_to_json_map.update(model_instance.attribute_map) - seen_json_attribute_names.add(attr) - except KeyError: - used_fallback_python_attribute_names.add(attr) - if isinstance(value, list): - if not value: - # empty list or None - result[attr] = value - else: - res = [] - for v in value: - if isinstance(v, PRIMITIVE_TYPES) or v is None: - res.append(v) - elif isinstance(v, ModelSimple): - res.append(v.value) - elif isinstance(v, dict): - res.append(dict(map( - extract_item, - v.items() - ))) - else: - res.append(model_to_dict(v, serialize=serialize)) - result[attr] = res - elif isinstance(value, dict): - result[attr] = dict(map( - extract_item, - value.items() - )) - elif isinstance(value, ModelSimple): - result[attr] = value.value - elif hasattr(value, '_data_store'): - result[attr] = model_to_dict(value, serialize=serialize) - else: - result[attr] = value - if serialize: - for python_key in used_fallback_python_attribute_names: - json_key = py_to_json_map.get(python_key) - if json_key is None: - continue - if python_key == json_key: - continue - json_key_assigned_no_need_for_python_key = json_key in seen_json_attribute_names - if json_key_assigned_no_need_for_python_key: - del result[python_key] - - return result - - -def type_error_message(var_value=None, var_name=None, valid_classes=None, - key_type=None): - """ - Keyword Args: - var_value (any): the variable which has the type_error - var_name (str): the name of the variable which has the typ error - valid_classes (tuple): the accepted classes for current_item's - value - key_type (bool): False if our value is a value in a dict - True if it is a key in a dict - False if our item is an item in a list - """ - key_or_value = 'value' - if key_type: - key_or_value = 'key' - valid_classes_phrase = get_valid_classes_phrase(valid_classes) - msg = ( - "Invalid type for variable '{0}'. Required {1} type {2} and " - "passed type was {3}".format( - var_name, - key_or_value, - valid_classes_phrase, - type(var_value).__name__, - ) - ) - return msg - - -def get_valid_classes_phrase(input_classes): - """Returns a string phrase describing what types are allowed - """ - all_classes = list(input_classes) - all_classes = sorted(all_classes, key=lambda cls: cls.__name__) - all_class_names = [cls.__name__ for cls in all_classes] - if len(all_class_names) == 1: - return 'is {0}'.format(all_class_names[0]) - return "is one of [{0}]".format(", ".join(all_class_names)) - - -def get_allof_instances(self, model_args, constant_args): - """ - Args: - self: the class we are handling - model_args (dict): var_name to var_value - used to make instances - constant_args (dict): - metadata arguments: - _check_type - _path_to_item - _spec_property_naming - _configuration - _visited_composed_classes - - Returns - composed_instances (list) - """ - composed_instances = [] - for allof_class in self._composed_schemas['allOf']: - - try: - if constant_args.get('_spec_property_naming'): - allof_instance = allof_class._from_openapi_data(**model_args, **constant_args) - else: - allof_instance = allof_class(**model_args, **constant_args) - composed_instances.append(allof_instance) - except Exception as ex: - raise ApiValueError( - "Invalid inputs given to generate an instance of '%s'. The " - "input data was invalid for the allOf schema '%s' in the composed " - "schema '%s'. Error=%s" % ( - allof_class.__name__, - allof_class.__name__, - self.__class__.__name__, - str(ex) - ) - ) from ex - return composed_instances - - -def get_oneof_instance(cls, model_kwargs, constant_kwargs, model_arg=None): - """ - Find the oneOf schema that matches the input data (e.g. payload). - If exactly one schema matches the input data, an instance of that schema - is returned. - If zero or more than one schema match the input data, an exception is raised. - In OAS 3.x, the payload MUST, by validation, match exactly one of the - schemas described by oneOf. - - Args: - cls: the class we are handling - model_kwargs (dict): var_name to var_value - The input data, e.g. the payload that must match a oneOf schema - in the OpenAPI document. - constant_kwargs (dict): var_name to var_value - args that every model requires, including configuration, server - and path to item. - - Kwargs: - model_arg: (int, float, bool, str, date, datetime, ModelSimple, None): - the value to assign to a primitive class or ModelSimple class - Notes: - - this is only passed in when oneOf includes types which are not object - - None is used to suppress handling of model_arg, nullable models are handled in __new__ - - Returns - oneof_instance (instance) - """ - if len(cls._composed_schemas['oneOf']) == 0: - return None - - oneof_instances = [] - # Iterate over each oneOf schema and determine if the input data - # matches the oneOf schemas. - for oneof_class in cls._composed_schemas['oneOf']: - # The composed oneOf schema allows the 'null' type and the input data - # is the null value. This is a OAS >= 3.1 feature. - if oneof_class is none_type: - # skip none_types because we are deserializing dict data. - # none_type deserialization is handled in the __new__ method - continue - - single_value_input = allows_single_value_input(oneof_class) - - try: - if not single_value_input: - if constant_kwargs.get('_spec_property_naming'): - oneof_instance = oneof_class._from_openapi_data( - **model_kwargs, **constant_kwargs) - else: - oneof_instance = oneof_class(**model_kwargs, **constant_kwargs) - else: - if issubclass(oneof_class, ModelSimple): - if constant_kwargs.get('_spec_property_naming'): - oneof_instance = oneof_class._from_openapi_data( - model_arg, **constant_kwargs) - else: - oneof_instance = oneof_class(model_arg, **constant_kwargs) - elif oneof_class in PRIMITIVE_TYPES: - oneof_instance = validate_and_convert_types( - model_arg, - (oneof_class,), - constant_kwargs['_path_to_item'], - constant_kwargs['_spec_property_naming'], - constant_kwargs['_check_type'], - configuration=constant_kwargs['_configuration'] - ) - oneof_instances.append(oneof_instance) - except Exception: - pass - if len(oneof_instances) == 0: - raise ApiValueError( - "Invalid inputs given to generate an instance of %s. None " - "of the oneOf schemas matched the input data." % - cls.__name__ - ) - elif len(oneof_instances) > 1: - raise ApiValueError( - "Invalid inputs given to generate an instance of %s. Multiple " - "oneOf schemas matched the inputs, but a max of one is allowed." % - cls.__name__ - ) - return oneof_instances[0] - - -def get_anyof_instances(self, model_args, constant_args): - """ - Args: - self: the class we are handling - model_args (dict): var_name to var_value - The input data, e.g. the payload that must match at least one - anyOf child schema in the OpenAPI document. - constant_args (dict): var_name to var_value - args that every model requires, including configuration, server - and path to item. - - Returns - anyof_instances (list) - """ - anyof_instances = [] - if len(self._composed_schemas['anyOf']) == 0: - return anyof_instances - - for anyof_class in self._composed_schemas['anyOf']: - # The composed oneOf schema allows the 'null' type and the input data - # is the null value. This is a OAS >= 3.1 feature. - if anyof_class is none_type: - # skip none_types because we are deserializing dict data. - # none_type deserialization is handled in the __new__ method - continue - - try: - if constant_args.get('_spec_property_naming'): - anyof_instance = anyof_class._from_openapi_data(**model_args, **constant_args) - else: - anyof_instance = anyof_class(**model_args, **constant_args) - anyof_instances.append(anyof_instance) - except Exception: - pass - if len(anyof_instances) == 0: - raise ApiValueError( - "Invalid inputs given to generate an instance of %s. None of the " - "anyOf schemas matched the inputs." % - self.__class__.__name__ - ) - return anyof_instances - - -def get_discarded_args(self, composed_instances, model_args): - """ - Gathers the args that were discarded by configuration.discard_unknown_keys - """ - model_arg_keys = model_args.keys() - discarded_args = set() - # arguments passed to self were already converted to python names - # before __init__ was called - for instance in composed_instances: - if instance.__class__ in self._composed_schemas['allOf']: - try: - keys = instance.to_dict().keys() - discarded_keys = model_args - keys - discarded_args.update(discarded_keys) - except Exception: - # allOf integer schema will throw exception - pass - else: - try: - all_keys = set(model_to_dict(instance, serialize=False).keys()) - js_keys = model_to_dict(instance, serialize=True).keys() - all_keys.update(js_keys) - discarded_keys = model_arg_keys - all_keys - discarded_args.update(discarded_keys) - except Exception: - # allOf integer schema will throw exception - pass - return discarded_args - - -def validate_get_composed_info(constant_args, model_args, self): - """ - For composed schemas, generate schema instances for - all schemas in the oneOf/anyOf/allOf definition. If additional - properties are allowed, also assign those properties on - all matched schemas that contain additionalProperties. - Openapi schemas are python classes. - - Exceptions are raised if: - - 0 or > 1 oneOf schema matches the model_args input data - - no anyOf schema matches the model_args input data - - any of the allOf schemas do not match the model_args input data - - Args: - constant_args (dict): these are the args that every model requires - model_args (dict): these are the required and optional spec args that - were passed in to make this model - self (class): the class that we are instantiating - This class contains self._composed_schemas - - Returns: - composed_info (list): length three - composed_instances (list): the composed instances which are not - self - var_name_to_model_instances (dict): a dict going from var_name - to the model_instance which holds that var_name - the model_instance may be self or an instance of one of the - classes in self.composed_instances() - additional_properties_model_instances (list): a list of the - model instances which have the property - additional_properties_type. This list can include self - """ - # create composed_instances - composed_instances = [] - allof_instances = get_allof_instances(self, model_args, constant_args) - composed_instances.extend(allof_instances) - oneof_instance = get_oneof_instance(self.__class__, model_args, constant_args) - if oneof_instance is not None: - composed_instances.append(oneof_instance) - anyof_instances = get_anyof_instances(self, model_args, constant_args) - composed_instances.extend(anyof_instances) - """ - set additional_properties_model_instances - additional properties must be evaluated at the schema level - so self's additional properties are most important - If self is a composed schema with: - - no properties defined in self - - additionalProperties: False - Then for object payloads every property is an additional property - and they are not allowed, so only empty dict is allowed - - Properties must be set on all matching schemas - so when a property is assigned toa composed instance, it must be set on all - composed instances regardless of additionalProperties presence - keeping it to prevent breaking changes in v5.0.1 - TODO remove cls._additional_properties_model_instances in 6.0.0 - """ - additional_properties_model_instances = [] - if self.additional_properties_type is not None: - additional_properties_model_instances = [self] - - """ - no need to set properties on self in here, they will be set in __init__ - By here all composed schema oneOf/anyOf/allOf instances have their properties set using - model_args - """ - discarded_args = get_discarded_args(self, composed_instances, model_args) - - # map variable names to composed_instances - var_name_to_model_instances = {} - for prop_name in model_args: - if prop_name not in discarded_args: - var_name_to_model_instances[prop_name] = [self] + list( - filter( - lambda x: prop_name in x.openapi_types, composed_instances)) - - return [ - composed_instances, - var_name_to_model_instances, - additional_properties_model_instances, - discarded_args - ] diff --git a/python/garage_admin_sdk/models/__init__.py b/python/garage_admin_sdk/models/__init__.py deleted file mode 100644 index a516b66..0000000 --- a/python/garage_admin_sdk/models/__init__.py +++ /dev/null @@ -1,41 +0,0 @@ -# flake8: noqa - -# import all models into this package -# if you have many models here with many references from one model to another this may -# raise a RecursionError -# to avoid this, import only the models that you directly need like: -# from from garage_admin_sdk.model.pet import Pet -# or import this package, but before doing it, use: -# import sys -# sys.setrecursionlimit(n) - -from garage_admin_sdk.model.add_key_request import AddKeyRequest -from garage_admin_sdk.model.add_node200_response_inner import AddNode200ResponseInner -from garage_admin_sdk.model.allow_bucket_key_request import AllowBucketKeyRequest -from garage_admin_sdk.model.allow_bucket_key_request_permissions import AllowBucketKeyRequestPermissions -from garage_admin_sdk.model.bucket_info import BucketInfo -from garage_admin_sdk.model.bucket_info_quotas import BucketInfoQuotas -from garage_admin_sdk.model.bucket_info_website_config import BucketInfoWebsiteConfig -from garage_admin_sdk.model.bucket_key_info import BucketKeyInfo -from garage_admin_sdk.model.cluster_layout import ClusterLayout -from garage_admin_sdk.model.create_bucket_request import CreateBucketRequest -from garage_admin_sdk.model.create_bucket_request_local_alias import CreateBucketRequestLocalAlias -from garage_admin_sdk.model.create_bucket_request_local_alias_allow import CreateBucketRequestLocalAliasAllow -from garage_admin_sdk.model.get_nodes200_response import GetNodes200Response -from garage_admin_sdk.model.import_key_request import ImportKeyRequest -from garage_admin_sdk.model.key_info import KeyInfo -from garage_admin_sdk.model.key_info_buckets_inner import KeyInfoBucketsInner -from garage_admin_sdk.model.key_info_buckets_inner_permissions import KeyInfoBucketsInnerPermissions -from garage_admin_sdk.model.key_info_permissions import KeyInfoPermissions -from garage_admin_sdk.model.layout_version import LayoutVersion -from garage_admin_sdk.model.list_buckets200_response_inner import ListBuckets200ResponseInner -from garage_admin_sdk.model.list_buckets200_response_inner_local_aliases_inner import ListBuckets200ResponseInnerLocalAliasesInner -from garage_admin_sdk.model.list_keys200_response_inner import ListKeys200ResponseInner -from garage_admin_sdk.model.node_cluster_info import NodeClusterInfo -from garage_admin_sdk.model.node_network_info import NodeNetworkInfo -from garage_admin_sdk.model.update_bucket_request import UpdateBucketRequest -from garage_admin_sdk.model.update_bucket_request_quotas import UpdateBucketRequestQuotas -from garage_admin_sdk.model.update_bucket_request_website_access import UpdateBucketRequestWebsiteAccess -from garage_admin_sdk.model.update_key_request import UpdateKeyRequest -from garage_admin_sdk.model.update_key_request_allow import UpdateKeyRequestAllow -from garage_admin_sdk.model.update_key_request_deny import UpdateKeyRequestDeny diff --git a/python/garage_admin_sdk/rest.py b/python/garage_admin_sdk/rest.py deleted file mode 100644 index 2f0ab6c..0000000 --- a/python/garage_admin_sdk/rest.py +++ /dev/null @@ -1,352 +0,0 @@ -""" - Garage Administration API v0+garage-v0.8.0 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.8.0 - Generated by: https://openapi-generator.tech -""" - - -import io -import json -import logging -import re -import ssl -from urllib.parse import urlencode -from urllib.parse import urlparse -from urllib.request import proxy_bypass_environment -import urllib3 -import ipaddress - -from garage_admin_sdk.exceptions import ApiException, UnauthorizedException, ForbiddenException, NotFoundException, ServiceException, ApiValueError - - -logger = logging.getLogger(__name__) - - -class RESTResponse(io.IOBase): - - def __init__(self, resp): - self.urllib3_response = resp - self.status = resp.status - self.reason = resp.reason - self.data = resp.data - - def getheaders(self): - """Returns a dictionary of the response headers.""" - return self.urllib3_response.getheaders() - - def getheader(self, name, default=None): - """Returns a given response header.""" - return self.urllib3_response.getheader(name, default) - - -class RESTClientObject(object): - - def __init__(self, configuration, pools_size=4, maxsize=None): - # urllib3.PoolManager will pass all kw parameters to connectionpool - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 - # maxsize is the number of requests to host that are allowed in parallel # noqa: E501 - # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 - - # cert_reqs - if configuration.verify_ssl: - cert_reqs = ssl.CERT_REQUIRED - else: - cert_reqs = ssl.CERT_NONE - - addition_pool_args = {} - if configuration.assert_hostname is not None: - addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 - - if configuration.retries is not None: - addition_pool_args['retries'] = configuration.retries - - if configuration.socket_options is not None: - addition_pool_args['socket_options'] = configuration.socket_options - - if maxsize is None: - if configuration.connection_pool_maxsize is not None: - maxsize = configuration.connection_pool_maxsize - else: - maxsize = 4 - - # https pool manager - if configuration.proxy and not should_bypass_proxies( - configuration.host, no_proxy=configuration.no_proxy or ''): - self.pool_manager = urllib3.ProxyManager( - num_pools=pools_size, - maxsize=maxsize, - cert_reqs=cert_reqs, - ca_certs=configuration.ssl_ca_cert, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - proxy_url=configuration.proxy, - proxy_headers=configuration.proxy_headers, - **addition_pool_args - ) - else: - self.pool_manager = urllib3.PoolManager( - num_pools=pools_size, - maxsize=maxsize, - cert_reqs=cert_reqs, - ca_certs=configuration.ssl_ca_cert, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - **addition_pool_args - ) - - def request(self, method, url, query_params=None, headers=None, - body=None, post_params=None, _preload_content=True, - _request_timeout=None): - """Perform requests. - - :param method: http request method - :param url: http request url - :param query_params: query parameters in the url - :param headers: http request headers - :param body: request json body, for `application/json` - :param post_params: request post parameters, - `application/x-www-form-urlencoded` - and `multipart/form-data` - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - """ - method = method.upper() - assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', - 'PATCH', 'OPTIONS'] - - if post_params and body: - raise ApiValueError( - "body parameter cannot be used with post_params parameter." - ) - - post_params = post_params or {} - headers = headers or {} - - timeout = None - if _request_timeout: - if isinstance(_request_timeout, (int, float)): # noqa: E501,F821 - timeout = urllib3.Timeout(total=_request_timeout) - elif (isinstance(_request_timeout, tuple) and - len(_request_timeout) == 2): - timeout = urllib3.Timeout( - connect=_request_timeout[0], read=_request_timeout[1]) - - try: - # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` - if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: - # Only set a default Content-Type for POST, PUT, PATCH and OPTIONS requests - if (method != 'DELETE') and ('Content-Type' not in headers): - headers['Content-Type'] = 'application/json' - if query_params: - url += '?' + urlencode(query_params) - if ('Content-Type' not in headers) or (re.search('json', - headers['Content-Type'], re.IGNORECASE)): - request_body = None - if body is not None: - request_body = json.dumps(body) - r = self.pool_manager.request( - method, url, - body=request_body, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 - r = self.pool_manager.request( - method, url, - fields=post_params, - encode_multipart=False, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - elif headers['Content-Type'] == 'multipart/form-data': - # must del headers['Content-Type'], or the correct - # Content-Type which generated by urllib3 will be - # overwritten. - del headers['Content-Type'] - r = self.pool_manager.request( - method, url, - fields=post_params, - encode_multipart=True, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - # Pass a `string` parameter directly in the body to support - # other content types than Json when `body` argument is - # provided in serialized form - elif isinstance(body, str) or isinstance(body, bytes): - request_body = body - r = self.pool_manager.request( - method, url, - body=request_body, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - else: - # Cannot generate the request from given parameters - msg = """Cannot prepare a request message for provided - arguments. Please check that your arguments match - declared content type.""" - raise ApiException(status=0, reason=msg) - # For `GET`, `HEAD` - else: - r = self.pool_manager.request(method, url, - fields=query_params, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - except urllib3.exceptions.SSLError as e: - msg = "{0}\n{1}".format(type(e).__name__, str(e)) - raise ApiException(status=0, reason=msg) - - if _preload_content: - r = RESTResponse(r) - - # log response body - logger.debug("response body: %s", r.data) - - if not 200 <= r.status <= 299: - if r.status == 401: - raise UnauthorizedException(http_resp=r) - - if r.status == 403: - raise ForbiddenException(http_resp=r) - - if r.status == 404: - raise NotFoundException(http_resp=r) - - if 500 <= r.status <= 599: - raise ServiceException(http_resp=r) - - raise ApiException(http_resp=r) - - return r - - def GET(self, url, headers=None, query_params=None, _preload_content=True, - _request_timeout=None): - return self.request("GET", url, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - query_params=query_params) - - def HEAD(self, url, headers=None, query_params=None, _preload_content=True, - _request_timeout=None): - return self.request("HEAD", url, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - query_params=query_params) - - def OPTIONS(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("OPTIONS", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def DELETE(self, url, headers=None, query_params=None, body=None, - _preload_content=True, _request_timeout=None): - return self.request("DELETE", url, - headers=headers, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def POST(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("POST", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def PUT(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("PUT", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def PATCH(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("PATCH", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - -# end of class RESTClientObject - - -def is_ipv4(target): - """ Test if IPv4 address or not - """ - try: - chk = ipaddress.IPv4Address(target) - return True - except ipaddress.AddressValueError: - return False - - -def in_ipv4net(target, net): - """ Test if target belongs to given IPv4 network - """ - try: - nw = ipaddress.IPv4Network(net) - ip = ipaddress.IPv4Address(target) - if ip in nw: - return True - return False - except ipaddress.AddressValueError: - return False - except ipaddress.NetmaskValueError: - return False - - -def should_bypass_proxies(url, no_proxy=None): - """ Yet another requests.should_bypass_proxies - Test if proxies should not be used for a particular url. - """ - - parsed = urlparse(url) - - # special cases - if parsed.hostname in [None, '']: - return True - - # special cases - if no_proxy in [None, '']: - return False - if no_proxy == '*': - return True - - no_proxy = no_proxy.lower().replace(' ', ''); - entries = ( - host for host in no_proxy.split(',') if host - ) - - if is_ipv4(parsed.hostname): - for item in entries: - if in_ipv4net(parsed.hostname, item): - return True - return proxy_bypass_environment(parsed.hostname, {'no': no_proxy}) diff --git a/python/git_push.sh b/python/git_push.sh deleted file mode 100644 index f53a75d..0000000 --- a/python/git_push.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 -git_host=$4 - -if [ "$git_host" = "" ]; then - git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" -fi - -if [ "$git_user_id" = "" ]; then - git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' diff --git a/python/requirements.txt b/python/requirements.txt deleted file mode 100644 index 96947f6..0000000 --- a/python/requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -python_dateutil >= 2.5.3 -setuptools >= 21.0.0 -urllib3 >= 1.25.3 diff --git a/python/setup.cfg b/python/setup.cfg deleted file mode 100644 index 11433ee..0000000 --- a/python/setup.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -max-line-length=99 diff --git a/python/setup.py b/python/setup.py deleted file mode 100644 index 7390cd2..0000000 --- a/python/setup.py +++ /dev/null @@ -1,42 +0,0 @@ -""" - Garage Administration API v0+garage-v0.8.0 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.8.0 - Generated by: https://openapi-generator.tech -""" - - -from setuptools import setup, find_packages # noqa: H301 - -NAME = "garage-admin-sdk" -VERSION = "0.8.0" -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = [ - "urllib3 >= 1.25.3", - "python-dateutil", -] - -setup( - name=NAME, - version=VERSION, - description="Garage Administration API v0+garage-v0.8.0", - author="OpenAPI Generator community", - author_email="team@openapitools.org", - url="", - keywords=["OpenAPI", "OpenAPI-Generator", "Garage Administration API v0+garage-v0.8.0"], - python_requires=">=3.6", - install_requires=REQUIRES, - packages=find_packages(exclude=["test", "tests"]), - include_package_data=True, - long_description="""\ - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - """ -) diff --git a/python/test-requirements.txt b/python/test-requirements.txt deleted file mode 100644 index bb4f22b..0000000 --- a/python/test-requirements.txt +++ /dev/null @@ -1 +0,0 @@ -pytest-cov>=2.8.1 diff --git a/python/test/__init__.py b/python/test/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/python/test/test_add_key_request.py b/python/test/test_add_key_request.py deleted file mode 100644 index b35c02a..0000000 --- a/python/test/test_add_key_request.py +++ /dev/null @@ -1,35 +0,0 @@ -""" - Garage Administration API v0+garage-v0.7.3 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.7.3 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import garage_admin_sdk -from garage_admin_sdk.model.add_key_request import AddKeyRequest - - -class TestAddKeyRequest(unittest.TestCase): - """AddKeyRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testAddKeyRequest(self): - """Test AddKeyRequest""" - # FIXME: construct object with mandatory attributes with example values - # model = AddKeyRequest() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_add_node200_response_inner.py b/python/test/test_add_node200_response_inner.py deleted file mode 100644 index d53cfe0..0000000 --- a/python/test/test_add_node200_response_inner.py +++ /dev/null @@ -1,35 +0,0 @@ -""" - Garage Administration API v0+garage-v0.7.3 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.7.3 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import garage_admin_sdk -from garage_admin_sdk.model.add_node200_response_inner import AddNode200ResponseInner - - -class TestAddNode200ResponseInner(unittest.TestCase): - """AddNode200ResponseInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testAddNode200ResponseInner(self): - """Test AddNode200ResponseInner""" - # FIXME: construct object with mandatory attributes with example values - # model = AddNode200ResponseInner() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_allow_bucket_key_request.py b/python/test/test_allow_bucket_key_request.py deleted file mode 100644 index e3e286e..0000000 --- a/python/test/test_allow_bucket_key_request.py +++ /dev/null @@ -1,37 +0,0 @@ -""" - Garage Administration API v0+garage-v0.8.0 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.8.0 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import garage_admin_sdk -from garage_admin_sdk.model.allow_bucket_key_request_permissions import AllowBucketKeyRequestPermissions -globals()['AllowBucketKeyRequestPermissions'] = AllowBucketKeyRequestPermissions -from garage_admin_sdk.model.allow_bucket_key_request import AllowBucketKeyRequest - - -class TestAllowBucketKeyRequest(unittest.TestCase): - """AllowBucketKeyRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testAllowBucketKeyRequest(self): - """Test AllowBucketKeyRequest""" - # FIXME: construct object with mandatory attributes with example values - # model = AllowBucketKeyRequest() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_allow_bucket_key_request_permissions.py b/python/test/test_allow_bucket_key_request_permissions.py deleted file mode 100644 index e3b962a..0000000 --- a/python/test/test_allow_bucket_key_request_permissions.py +++ /dev/null @@ -1,35 +0,0 @@ -""" - Garage Administration API v0+garage-v0.8.0 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.8.0 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import garage_admin_sdk -from garage_admin_sdk.model.allow_bucket_key_request_permissions import AllowBucketKeyRequestPermissions - - -class TestAllowBucketKeyRequestPermissions(unittest.TestCase): - """AllowBucketKeyRequestPermissions unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testAllowBucketKeyRequestPermissions(self): - """Test AllowBucketKeyRequestPermissions""" - # FIXME: construct object with mandatory attributes with example values - # model = AllowBucketKeyRequestPermissions() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_bucket_api.py b/python/test/test_bucket_api.py deleted file mode 100644 index 7a68624..0000000 --- a/python/test/test_bucket_api.py +++ /dev/null @@ -1,112 +0,0 @@ -""" - Garage Administration API v0+garage-v0.8.0 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.8.0 - Generated by: https://openapi-generator.tech -""" - - -import unittest - -import garage_admin_sdk -from garage_admin_sdk.api.bucket_api import BucketApi # noqa: E501 - - -class TestBucketApi(unittest.TestCase): - """BucketApi unit test stubs""" - - def setUp(self): - self.api = BucketApi() # noqa: E501 - - def tearDown(self): - pass - - def test_allow_bucket_key(self): - """Test case for allow_bucket_key - - Allow key # noqa: E501 - """ - pass - - def test_create_bucket(self): - """Test case for create_bucket - - Create a bucket # noqa: E501 - """ - pass - - def test_delete_bucket(self): - """Test case for delete_bucket - - Delete a bucket # noqa: E501 - """ - pass - - def test_delete_bucket_global_alias(self): - """Test case for delete_bucket_global_alias - - Delete a global alias # noqa: E501 - """ - pass - - def test_delete_bucket_local_alias(self): - """Test case for delete_bucket_local_alias - - Delete a local alias # noqa: E501 - """ - pass - - def test_deny_bucket_key(self): - """Test case for deny_bucket_key - - Deny key # noqa: E501 - """ - pass - - def test_find_bucket_info(self): - """Test case for find_bucket_info - - Find a bucket # noqa: E501 - """ - pass - - def test_get_bucket_info(self): - """Test case for get_bucket_info - - Get a bucket # noqa: E501 - """ - pass - - def test_list_buckets(self): - """Test case for list_buckets - - List all buckets # noqa: E501 - """ - pass - - def test_put_bucket_global_alias(self): - """Test case for put_bucket_global_alias - - Add a global alias # noqa: E501 - """ - pass - - def test_put_bucket_local_alias(self): - """Test case for put_bucket_local_alias - - Add a local alias # noqa: E501 - """ - pass - - def test_update_bucket(self): - """Test case for update_bucket - - Update a bucket # noqa: E501 - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_bucket_info.py b/python/test/test_bucket_info.py deleted file mode 100644 index 43e147c..0000000 --- a/python/test/test_bucket_info.py +++ /dev/null @@ -1,41 +0,0 @@ -""" - Garage Administration API v0+garage-v0.8.0 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.8.0 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import garage_admin_sdk -from garage_admin_sdk.model.bucket_info_quotas import BucketInfoQuotas -from garage_admin_sdk.model.bucket_info_website_config import BucketInfoWebsiteConfig -from garage_admin_sdk.model.bucket_key_info import BucketKeyInfo -globals()['BucketInfoQuotas'] = BucketInfoQuotas -globals()['BucketInfoWebsiteConfig'] = BucketInfoWebsiteConfig -globals()['BucketKeyInfo'] = BucketKeyInfo -from garage_admin_sdk.model.bucket_info import BucketInfo - - -class TestBucketInfo(unittest.TestCase): - """BucketInfo unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testBucketInfo(self): - """Test BucketInfo""" - # FIXME: construct object with mandatory attributes with example values - # model = BucketInfo() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_bucket_info_quotas.py b/python/test/test_bucket_info_quotas.py deleted file mode 100644 index 98abbb1..0000000 --- a/python/test/test_bucket_info_quotas.py +++ /dev/null @@ -1,35 +0,0 @@ -""" - Garage Administration API v0+garage-v0.8.0 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.8.0 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import garage_admin_sdk -from garage_admin_sdk.model.bucket_info_quotas import BucketInfoQuotas - - -class TestBucketInfoQuotas(unittest.TestCase): - """BucketInfoQuotas unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testBucketInfoQuotas(self): - """Test BucketInfoQuotas""" - # FIXME: construct object with mandatory attributes with example values - # model = BucketInfoQuotas() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_bucket_info_website_config.py b/python/test/test_bucket_info_website_config.py deleted file mode 100644 index e2a11a6..0000000 --- a/python/test/test_bucket_info_website_config.py +++ /dev/null @@ -1,35 +0,0 @@ -""" - Garage Administration API v0+garage-v0.8.0 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.8.0 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import garage_admin_sdk -from garage_admin_sdk.model.bucket_info_website_config import BucketInfoWebsiteConfig - - -class TestBucketInfoWebsiteConfig(unittest.TestCase): - """BucketInfoWebsiteConfig unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testBucketInfoWebsiteConfig(self): - """Test BucketInfoWebsiteConfig""" - # FIXME: construct object with mandatory attributes with example values - # model = BucketInfoWebsiteConfig() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_bucket_key_info.py b/python/test/test_bucket_key_info.py deleted file mode 100644 index a55c019..0000000 --- a/python/test/test_bucket_key_info.py +++ /dev/null @@ -1,37 +0,0 @@ -""" - Garage Administration API v0+garage-v0.8.0 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.8.0 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import garage_admin_sdk -from garage_admin_sdk.model.create_bucket_request_local_alias_allow import CreateBucketRequestLocalAliasAllow -globals()['CreateBucketRequestLocalAliasAllow'] = CreateBucketRequestLocalAliasAllow -from garage_admin_sdk.model.bucket_key_info import BucketKeyInfo - - -class TestBucketKeyInfo(unittest.TestCase): - """BucketKeyInfo unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testBucketKeyInfo(self): - """Test BucketKeyInfo""" - # FIXME: construct object with mandatory attributes with example values - # model = BucketKeyInfo() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_cluster_layout.py b/python/test/test_cluster_layout.py deleted file mode 100644 index 36dc0f1..0000000 --- a/python/test/test_cluster_layout.py +++ /dev/null @@ -1,37 +0,0 @@ -""" - Garage Administration API v0+garage-v0.7.3 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.7.3 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import garage_admin_sdk -from garage_admin_sdk.model.node_cluster_info import NodeClusterInfo -globals()['NodeClusterInfo'] = NodeClusterInfo -from garage_admin_sdk.model.cluster_layout import ClusterLayout - - -class TestClusterLayout(unittest.TestCase): - """ClusterLayout unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testClusterLayout(self): - """Test ClusterLayout""" - # FIXME: construct object with mandatory attributes with example values - # model = ClusterLayout() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_connect_post200_response_inner.py b/python/test/test_connect_post200_response_inner.py deleted file mode 100644 index 20d1b22..0000000 --- a/python/test/test_connect_post200_response_inner.py +++ /dev/null @@ -1,35 +0,0 @@ -""" - Garage Administration API v0+garage-v0.7.3 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.7.3 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import garage_admin_sdk -from garage_admin_sdk.model.connect_post200_response_inner import ConnectPost200ResponseInner - - -class TestConnectPost200ResponseInner(unittest.TestCase): - """ConnectPost200ResponseInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testConnectPost200ResponseInner(self): - """Test ConnectPost200ResponseInner""" - # FIXME: construct object with mandatory attributes with example values - # model = ConnectPost200ResponseInner() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_create_bucket_request.py b/python/test/test_create_bucket_request.py deleted file mode 100644 index 1f8c127..0000000 --- a/python/test/test_create_bucket_request.py +++ /dev/null @@ -1,37 +0,0 @@ -""" - Garage Administration API v0+garage-v0.8.0 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.8.0 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import garage_admin_sdk -from garage_admin_sdk.model.create_bucket_request_local_alias import CreateBucketRequestLocalAlias -globals()['CreateBucketRequestLocalAlias'] = CreateBucketRequestLocalAlias -from garage_admin_sdk.model.create_bucket_request import CreateBucketRequest - - -class TestCreateBucketRequest(unittest.TestCase): - """CreateBucketRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testCreateBucketRequest(self): - """Test CreateBucketRequest""" - # FIXME: construct object with mandatory attributes with example values - # model = CreateBucketRequest() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_create_bucket_request_local_alias.py b/python/test/test_create_bucket_request_local_alias.py deleted file mode 100644 index c71a059..0000000 --- a/python/test/test_create_bucket_request_local_alias.py +++ /dev/null @@ -1,37 +0,0 @@ -""" - Garage Administration API v0+garage-v0.8.0 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.8.0 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import garage_admin_sdk -from garage_admin_sdk.model.create_bucket_request_local_alias_allow import CreateBucketRequestLocalAliasAllow -globals()['CreateBucketRequestLocalAliasAllow'] = CreateBucketRequestLocalAliasAllow -from garage_admin_sdk.model.create_bucket_request_local_alias import CreateBucketRequestLocalAlias - - -class TestCreateBucketRequestLocalAlias(unittest.TestCase): - """CreateBucketRequestLocalAlias unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testCreateBucketRequestLocalAlias(self): - """Test CreateBucketRequestLocalAlias""" - # FIXME: construct object with mandatory attributes with example values - # model = CreateBucketRequestLocalAlias() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_create_bucket_request_local_alias_allow.py b/python/test/test_create_bucket_request_local_alias_allow.py deleted file mode 100644 index f262e24..0000000 --- a/python/test/test_create_bucket_request_local_alias_allow.py +++ /dev/null @@ -1,35 +0,0 @@ -""" - Garage Administration API v0+garage-v0.8.0 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.8.0 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import garage_admin_sdk -from garage_admin_sdk.model.create_bucket_request_local_alias_allow import CreateBucketRequestLocalAliasAllow - - -class TestCreateBucketRequestLocalAliasAllow(unittest.TestCase): - """CreateBucketRequestLocalAliasAllow unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testCreateBucketRequestLocalAliasAllow(self): - """Test CreateBucketRequestLocalAliasAllow""" - # FIXME: construct object with mandatory attributes with example values - # model = CreateBucketRequestLocalAliasAllow() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_get_nodes200_response.py b/python/test/test_get_nodes200_response.py deleted file mode 100644 index fed05a8..0000000 --- a/python/test/test_get_nodes200_response.py +++ /dev/null @@ -1,39 +0,0 @@ -""" - Garage Administration API v0+garage-v0.7.3 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.7.3 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import garage_admin_sdk -from garage_admin_sdk.model.cluster_layout import ClusterLayout -from garage_admin_sdk.model.node_network_info import NodeNetworkInfo -globals()['ClusterLayout'] = ClusterLayout -globals()['NodeNetworkInfo'] = NodeNetworkInfo -from garage_admin_sdk.model.get_nodes200_response import GetNodes200Response - - -class TestGetNodes200Response(unittest.TestCase): - """GetNodes200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testGetNodes200Response(self): - """Test GetNodes200Response""" - # FIXME: construct object with mandatory attributes with example values - # model = GetNodes200Response() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_import_key_request.py b/python/test/test_import_key_request.py deleted file mode 100644 index ea7968a..0000000 --- a/python/test/test_import_key_request.py +++ /dev/null @@ -1,35 +0,0 @@ -""" - Garage Administration API v0+garage-v0.7.3 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.7.3 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import garage_admin_sdk -from garage_admin_sdk.model.import_key_request import ImportKeyRequest - - -class TestImportKeyRequest(unittest.TestCase): - """ImportKeyRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testImportKeyRequest(self): - """Test ImportKeyRequest""" - # FIXME: construct object with mandatory attributes with example values - # model = ImportKeyRequest() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_key_api.py b/python/test/test_key_api.py deleted file mode 100644 index c7e3aaf..0000000 --- a/python/test/test_key_api.py +++ /dev/null @@ -1,77 +0,0 @@ -""" - Garage Administration API v0+garage-v0.7.3 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.7.3 - Generated by: https://openapi-generator.tech -""" - - -import unittest - -import garage_admin_sdk -from garage_admin_sdk.api.key_api import KeyApi # noqa: E501 - - -class TestKeyApi(unittest.TestCase): - """KeyApi unit test stubs""" - - def setUp(self): - self.api = KeyApi() # noqa: E501 - - def tearDown(self): - pass - - def test_key_import_post(self): - """Test case for key_import_post - - Import an existing key # noqa: E501 - """ - pass - - def test_key_post(self): - """Test case for key_post - - Create a new API key # noqa: E501 - """ - pass - - def test_keyidaccess_key_delete(self): - """Test case for keyidaccess_key_delete - - Delete a key # noqa: E501 - """ - pass - - def test_keyidaccess_key_get(self): - """Test case for keyidaccess_key_get - - Get key information # noqa: E501 - """ - pass - - def test_keyidaccess_key_post(self): - """Test case for keyidaccess_key_post - - Update a key # noqa: E501 - """ - pass - - def test_keysearchpattern_get(self): - """Test case for keysearchpattern_get - - Select key by pattern # noqa: E501 - """ - pass - - def test_list_keys(self): - """Test case for list_keys - - List all keys # noqa: E501 - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_key_get_request.py b/python/test/test_key_get_request.py deleted file mode 100644 index 7601762..0000000 --- a/python/test/test_key_get_request.py +++ /dev/null @@ -1,35 +0,0 @@ -""" - Garage Administration API v0+garage-v0.7.3 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.7.3 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import garage_admin_sdk -from garage_admin_sdk.model.key_get_request import KeyGetRequest - - -class TestKeyGetRequest(unittest.TestCase): - """KeyGetRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testKeyGetRequest(self): - """Test KeyGetRequest""" - # FIXME: construct object with mandatory attributes with example values - # model = KeyGetRequest() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_key_id_access_key_delete_request.py b/python/test/test_key_id_access_key_delete_request.py deleted file mode 100644 index 73724a4..0000000 --- a/python/test/test_key_id_access_key_delete_request.py +++ /dev/null @@ -1,39 +0,0 @@ -""" - Garage Administration API v0+garage-v0.7.3 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.7.3 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import garage_admin_sdk -from garage_admin_sdk.model.key_id_access_key_delete_request_allow import KeyIdAccessKeyDeleteRequestAllow -from garage_admin_sdk.model.key_id_access_key_delete_request_deny import KeyIdAccessKeyDeleteRequestDeny -globals()['KeyIdAccessKeyDeleteRequestAllow'] = KeyIdAccessKeyDeleteRequestAllow -globals()['KeyIdAccessKeyDeleteRequestDeny'] = KeyIdAccessKeyDeleteRequestDeny -from garage_admin_sdk.model.key_id_access_key_delete_request import KeyIdAccessKeyDeleteRequest - - -class TestKeyIdAccessKeyDeleteRequest(unittest.TestCase): - """KeyIdAccessKeyDeleteRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testKeyIdAccessKeyDeleteRequest(self): - """Test KeyIdAccessKeyDeleteRequest""" - # FIXME: construct object with mandatory attributes with example values - # model = KeyIdAccessKeyDeleteRequest() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_key_id_access_key_delete_request_allow.py b/python/test/test_key_id_access_key_delete_request_allow.py deleted file mode 100644 index 261d258..0000000 --- a/python/test/test_key_id_access_key_delete_request_allow.py +++ /dev/null @@ -1,35 +0,0 @@ -""" - Garage Administration API v0+garage-v0.7.3 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.7.3 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import garage_admin_sdk -from garage_admin_sdk.model.key_id_access_key_delete_request_allow import KeyIdAccessKeyDeleteRequestAllow - - -class TestKeyIdAccessKeyDeleteRequestAllow(unittest.TestCase): - """KeyIdAccessKeyDeleteRequestAllow unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testKeyIdAccessKeyDeleteRequestAllow(self): - """Test KeyIdAccessKeyDeleteRequestAllow""" - # FIXME: construct object with mandatory attributes with example values - # model = KeyIdAccessKeyDeleteRequestAllow() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_key_id_access_key_delete_request_deny.py b/python/test/test_key_id_access_key_delete_request_deny.py deleted file mode 100644 index 0af472b..0000000 --- a/python/test/test_key_id_access_key_delete_request_deny.py +++ /dev/null @@ -1,35 +0,0 @@ -""" - Garage Administration API v0+garage-v0.7.3 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.7.3 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import garage_admin_sdk -from garage_admin_sdk.model.key_id_access_key_delete_request_deny import KeyIdAccessKeyDeleteRequestDeny - - -class TestKeyIdAccessKeyDeleteRequestDeny(unittest.TestCase): - """KeyIdAccessKeyDeleteRequestDeny unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testKeyIdAccessKeyDeleteRequestDeny(self): - """Test KeyIdAccessKeyDeleteRequestDeny""" - # FIXME: construct object with mandatory attributes with example values - # model = KeyIdAccessKeyDeleteRequestDeny() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_key_import_post_request.py b/python/test/test_key_import_post_request.py deleted file mode 100644 index 8d9494f..0000000 --- a/python/test/test_key_import_post_request.py +++ /dev/null @@ -1,35 +0,0 @@ -""" - Garage Administration API v0+garage-v0.7.3 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.7.3 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import garage_admin_sdk -from garage_admin_sdk.model.key_import_post_request import KeyImportPostRequest - - -class TestKeyImportPostRequest(unittest.TestCase): - """KeyImportPostRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testKeyImportPostRequest(self): - """Test KeyImportPostRequest""" - # FIXME: construct object with mandatory attributes with example values - # model = KeyImportPostRequest() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_key_info.py b/python/test/test_key_info.py deleted file mode 100644 index be15dd4..0000000 --- a/python/test/test_key_info.py +++ /dev/null @@ -1,39 +0,0 @@ -""" - Garage Administration API v0+garage-v0.7.3 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.7.3 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import garage_admin_sdk -from garage_admin_sdk.model.key_info_buckets_inner import KeyInfoBucketsInner -from garage_admin_sdk.model.key_info_permissions import KeyInfoPermissions -globals()['KeyInfoBucketsInner'] = KeyInfoBucketsInner -globals()['KeyInfoPermissions'] = KeyInfoPermissions -from garage_admin_sdk.model.key_info import KeyInfo - - -class TestKeyInfo(unittest.TestCase): - """KeyInfo unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testKeyInfo(self): - """Test KeyInfo""" - # FIXME: construct object with mandatory attributes with example values - # model = KeyInfo() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_key_info_buckets_inner.py b/python/test/test_key_info_buckets_inner.py deleted file mode 100644 index 2ad9f1f..0000000 --- a/python/test/test_key_info_buckets_inner.py +++ /dev/null @@ -1,37 +0,0 @@ -""" - Garage Administration API v0+garage-v0.7.3 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.7.3 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import garage_admin_sdk -from garage_admin_sdk.model.key_info_buckets_inner_permissions import KeyInfoBucketsInnerPermissions -globals()['KeyInfoBucketsInnerPermissions'] = KeyInfoBucketsInnerPermissions -from garage_admin_sdk.model.key_info_buckets_inner import KeyInfoBucketsInner - - -class TestKeyInfoBucketsInner(unittest.TestCase): - """KeyInfoBucketsInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testKeyInfoBucketsInner(self): - """Test KeyInfoBucketsInner""" - # FIXME: construct object with mandatory attributes with example values - # model = KeyInfoBucketsInner() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_key_info_buckets_inner_permissions.py b/python/test/test_key_info_buckets_inner_permissions.py deleted file mode 100644 index 12a4757..0000000 --- a/python/test/test_key_info_buckets_inner_permissions.py +++ /dev/null @@ -1,35 +0,0 @@ -""" - Garage Administration API v0+garage-v0.7.3 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.7.3 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import garage_admin_sdk -from garage_admin_sdk.model.key_info_buckets_inner_permissions import KeyInfoBucketsInnerPermissions - - -class TestKeyInfoBucketsInnerPermissions(unittest.TestCase): - """KeyInfoBucketsInnerPermissions unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testKeyInfoBucketsInnerPermissions(self): - """Test KeyInfoBucketsInnerPermissions""" - # FIXME: construct object with mandatory attributes with example values - # model = KeyInfoBucketsInnerPermissions() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_key_info_permissions.py b/python/test/test_key_info_permissions.py deleted file mode 100644 index c29ae3f..0000000 --- a/python/test/test_key_info_permissions.py +++ /dev/null @@ -1,35 +0,0 @@ -""" - Garage Administration API v0+garage-v0.7.3 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.7.3 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import garage_admin_sdk -from garage_admin_sdk.model.key_info_permissions import KeyInfoPermissions - - -class TestKeyInfoPermissions(unittest.TestCase): - """KeyInfoPermissions unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testKeyInfoPermissions(self): - """Test KeyInfoPermissions""" - # FIXME: construct object with mandatory attributes with example values - # model = KeyInfoPermissions() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_layout_api.py b/python/test/test_layout_api.py deleted file mode 100644 index 7b3fe0a..0000000 --- a/python/test/test_layout_api.py +++ /dev/null @@ -1,56 +0,0 @@ -""" - Garage Administration API v0+garage-v0.7.3 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.7.3 - Generated by: https://openapi-generator.tech -""" - - -import unittest - -import garage_admin_sdk -from garage_admin_sdk.api.layout_api import LayoutApi # noqa: E501 - - -class TestLayoutApi(unittest.TestCase): - """LayoutApi unit test stubs""" - - def setUp(self): - self.api = LayoutApi() # noqa: E501 - - def tearDown(self): - pass - - def test_layout_apply_post(self): - """Test case for layout_apply_post - - Apply staged layout # noqa: E501 - """ - pass - - def test_layout_get(self): - """Test case for layout_get - - Details on the current and staged layout # noqa: E501 - """ - pass - - def test_layout_post(self): - """Test case for layout_post - - Send modifications to the cluster layout # noqa: E501 - """ - pass - - def test_layout_revert_post(self): - """Test case for layout_revert_post - - Clear staged layout # noqa: E501 - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_layout_version.py b/python/test/test_layout_version.py deleted file mode 100644 index a69d089..0000000 --- a/python/test/test_layout_version.py +++ /dev/null @@ -1,35 +0,0 @@ -""" - Garage Administration API v0+garage-v0.7.3 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.7.3 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import garage_admin_sdk -from garage_admin_sdk.model.layout_version import LayoutVersion - - -class TestLayoutVersion(unittest.TestCase): - """LayoutVersion unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testLayoutVersion(self): - """Test LayoutVersion""" - # FIXME: construct object with mandatory attributes with example values - # model = LayoutVersion() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_list_buckets200_response_inner.py b/python/test/test_list_buckets200_response_inner.py deleted file mode 100644 index f0ff297..0000000 --- a/python/test/test_list_buckets200_response_inner.py +++ /dev/null @@ -1,37 +0,0 @@ -""" - Garage Administration API v0+garage-v0.8.0 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.8.0 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import garage_admin_sdk -from garage_admin_sdk.model.list_buckets200_response_inner_local_aliases_inner import ListBuckets200ResponseInnerLocalAliasesInner -globals()['ListBuckets200ResponseInnerLocalAliasesInner'] = ListBuckets200ResponseInnerLocalAliasesInner -from garage_admin_sdk.model.list_buckets200_response_inner import ListBuckets200ResponseInner - - -class TestListBuckets200ResponseInner(unittest.TestCase): - """ListBuckets200ResponseInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testListBuckets200ResponseInner(self): - """Test ListBuckets200ResponseInner""" - # FIXME: construct object with mandatory attributes with example values - # model = ListBuckets200ResponseInner() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_list_buckets200_response_inner_local_aliases_inner.py b/python/test/test_list_buckets200_response_inner_local_aliases_inner.py deleted file mode 100644 index 112a52e..0000000 --- a/python/test/test_list_buckets200_response_inner_local_aliases_inner.py +++ /dev/null @@ -1,35 +0,0 @@ -""" - Garage Administration API v0+garage-v0.8.0 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.8.0 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import garage_admin_sdk -from garage_admin_sdk.model.list_buckets200_response_inner_local_aliases_inner import ListBuckets200ResponseInnerLocalAliasesInner - - -class TestListBuckets200ResponseInnerLocalAliasesInner(unittest.TestCase): - """ListBuckets200ResponseInnerLocalAliasesInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testListBuckets200ResponseInnerLocalAliasesInner(self): - """Test ListBuckets200ResponseInnerLocalAliasesInner""" - # FIXME: construct object with mandatory attributes with example values - # model = ListBuckets200ResponseInnerLocalAliasesInner() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_list_keys200_response_inner.py b/python/test/test_list_keys200_response_inner.py deleted file mode 100644 index 21ecead..0000000 --- a/python/test/test_list_keys200_response_inner.py +++ /dev/null @@ -1,35 +0,0 @@ -""" - Garage Administration API v0+garage-v0.7.3 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.7.3 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import garage_admin_sdk -from garage_admin_sdk.model.list_keys200_response_inner import ListKeys200ResponseInner - - -class TestListKeys200ResponseInner(unittest.TestCase): - """ListKeys200ResponseInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testListKeys200ResponseInner(self): - """Test ListKeys200ResponseInner""" - # FIXME: construct object with mandatory attributes with example values - # model = ListKeys200ResponseInner() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_membership_api.py b/python/test/test_membership_api.py deleted file mode 100644 index 7c191bf..0000000 --- a/python/test/test_membership_api.py +++ /dev/null @@ -1,42 +0,0 @@ -""" - Garage Administration API v0+garage-v0.7.3 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.7.3 - Generated by: https://openapi-generator.tech -""" - - -import unittest - -import garage_admin_sdk -from garage_admin_sdk.api.membership_api import MembershipApi # noqa: E501 - - -class TestMembershipApi(unittest.TestCase): - """MembershipApi unit test stubs""" - - def setUp(self): - self.api = MembershipApi() # noqa: E501 - - def tearDown(self): - pass - - def test_connect_post(self): - """Test case for connect_post - - Connect target node to other Garage nodes # noqa: E501 - """ - pass - - def test_status_get(self): - """Test case for status_get - - Status of this node and other nodes in the cluster # noqa: E501 - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_node_cluster_info.py b/python/test/test_node_cluster_info.py deleted file mode 100644 index df6b51e..0000000 --- a/python/test/test_node_cluster_info.py +++ /dev/null @@ -1,35 +0,0 @@ -""" - Garage Administration API v0+garage-v0.7.3 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.7.3 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import garage_admin_sdk -from garage_admin_sdk.model.node_cluster_info import NodeClusterInfo - - -class TestNodeClusterInfo(unittest.TestCase): - """NodeClusterInfo unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testNodeClusterInfo(self): - """Test NodeClusterInfo""" - # FIXME: construct object with mandatory attributes with example values - # model = NodeClusterInfo() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_node_network_info.py b/python/test/test_node_network_info.py deleted file mode 100644 index 6287a6f..0000000 --- a/python/test/test_node_network_info.py +++ /dev/null @@ -1,35 +0,0 @@ -""" - Garage Administration API v0+garage-v0.7.3 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.7.3 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import garage_admin_sdk -from garage_admin_sdk.model.node_network_info import NodeNetworkInfo - - -class TestNodeNetworkInfo(unittest.TestCase): - """NodeNetworkInfo unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testNodeNetworkInfo(self): - """Test NodeNetworkInfo""" - # FIXME: construct object with mandatory attributes with example values - # model = NodeNetworkInfo() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_nodes_api.py b/python/test/test_nodes_api.py deleted file mode 100644 index 3e00480..0000000 --- a/python/test/test_nodes_api.py +++ /dev/null @@ -1,35 +0,0 @@ -""" - Garage Administration API v0+garage-v0.7.3 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.7.3 - Generated by: https://openapi-generator.tech -""" - - -import unittest - -import garage_admin_sdk -from garage_admin_sdk.api.nodes_api import NodesApi # noqa: E501 - - -class TestNodesApi(unittest.TestCase): - """NodesApi unit test stubs""" - - def setUp(self): - self.api = NodesApi() # noqa: E501 - - def tearDown(self): - pass - - def test_get_nodes(self): - """Test case for get_nodes - - Status of this node and other nodes in the cluster # noqa: E501 - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_status_get200_response.py b/python/test/test_status_get200_response.py deleted file mode 100644 index 5766179..0000000 --- a/python/test/test_status_get200_response.py +++ /dev/null @@ -1,39 +0,0 @@ -""" - Garage Administration API v0+garage-v0.7.3 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.7.3 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import garage_admin_sdk -from garage_admin_sdk.model.cluster_layout import ClusterLayout -from garage_admin_sdk.model.node_network_info import NodeNetworkInfo -globals()['ClusterLayout'] = ClusterLayout -globals()['NodeNetworkInfo'] = NodeNetworkInfo -from garage_admin_sdk.model.status_get200_response import StatusGet200Response - - -class TestStatusGet200Response(unittest.TestCase): - """StatusGet200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testStatusGet200Response(self): - """Test StatusGet200Response""" - # FIXME: construct object with mandatory attributes with example values - # model = StatusGet200Response() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_update_bucket_request.py b/python/test/test_update_bucket_request.py deleted file mode 100644 index fae52ec..0000000 --- a/python/test/test_update_bucket_request.py +++ /dev/null @@ -1,39 +0,0 @@ -""" - Garage Administration API v0+garage-v0.8.0 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.8.0 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import garage_admin_sdk -from garage_admin_sdk.model.update_bucket_request_quotas import UpdateBucketRequestQuotas -from garage_admin_sdk.model.update_bucket_request_website_access import UpdateBucketRequestWebsiteAccess -globals()['UpdateBucketRequestQuotas'] = UpdateBucketRequestQuotas -globals()['UpdateBucketRequestWebsiteAccess'] = UpdateBucketRequestWebsiteAccess -from garage_admin_sdk.model.update_bucket_request import UpdateBucketRequest - - -class TestUpdateBucketRequest(unittest.TestCase): - """UpdateBucketRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testUpdateBucketRequest(self): - """Test UpdateBucketRequest""" - # FIXME: construct object with mandatory attributes with example values - # model = UpdateBucketRequest() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_update_bucket_request_quotas.py b/python/test/test_update_bucket_request_quotas.py deleted file mode 100644 index 7114bec..0000000 --- a/python/test/test_update_bucket_request_quotas.py +++ /dev/null @@ -1,35 +0,0 @@ -""" - Garage Administration API v0+garage-v0.8.0 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.8.0 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import garage_admin_sdk -from garage_admin_sdk.model.update_bucket_request_quotas import UpdateBucketRequestQuotas - - -class TestUpdateBucketRequestQuotas(unittest.TestCase): - """UpdateBucketRequestQuotas unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testUpdateBucketRequestQuotas(self): - """Test UpdateBucketRequestQuotas""" - # FIXME: construct object with mandatory attributes with example values - # model = UpdateBucketRequestQuotas() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_update_bucket_request_website_access.py b/python/test/test_update_bucket_request_website_access.py deleted file mode 100644 index 4b01874..0000000 --- a/python/test/test_update_bucket_request_website_access.py +++ /dev/null @@ -1,35 +0,0 @@ -""" - Garage Administration API v0+garage-v0.8.0 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.8.0 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import garage_admin_sdk -from garage_admin_sdk.model.update_bucket_request_website_access import UpdateBucketRequestWebsiteAccess - - -class TestUpdateBucketRequestWebsiteAccess(unittest.TestCase): - """UpdateBucketRequestWebsiteAccess unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testUpdateBucketRequestWebsiteAccess(self): - """Test UpdateBucketRequestWebsiteAccess""" - # FIXME: construct object with mandatory attributes with example values - # model = UpdateBucketRequestWebsiteAccess() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_update_key_request.py b/python/test/test_update_key_request.py deleted file mode 100644 index 43dffae..0000000 --- a/python/test/test_update_key_request.py +++ /dev/null @@ -1,39 +0,0 @@ -""" - Garage Administration API v0+garage-v0.7.3 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.7.3 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import garage_admin_sdk -from garage_admin_sdk.model.update_key_request_allow import UpdateKeyRequestAllow -from garage_admin_sdk.model.update_key_request_deny import UpdateKeyRequestDeny -globals()['UpdateKeyRequestAllow'] = UpdateKeyRequestAllow -globals()['UpdateKeyRequestDeny'] = UpdateKeyRequestDeny -from garage_admin_sdk.model.update_key_request import UpdateKeyRequest - - -class TestUpdateKeyRequest(unittest.TestCase): - """UpdateKeyRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testUpdateKeyRequest(self): - """Test UpdateKeyRequest""" - # FIXME: construct object with mandatory attributes with example values - # model = UpdateKeyRequest() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_update_key_request_allow.py b/python/test/test_update_key_request_allow.py deleted file mode 100644 index ba0bbb2..0000000 --- a/python/test/test_update_key_request_allow.py +++ /dev/null @@ -1,35 +0,0 @@ -""" - Garage Administration API v0+garage-v0.7.3 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.7.3 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import garage_admin_sdk -from garage_admin_sdk.model.update_key_request_allow import UpdateKeyRequestAllow - - -class TestUpdateKeyRequestAllow(unittest.TestCase): - """UpdateKeyRequestAllow unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testUpdateKeyRequestAllow(self): - """Test UpdateKeyRequestAllow""" - # FIXME: construct object with mandatory attributes with example values - # model = UpdateKeyRequestAllow() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_update_key_request_deny.py b/python/test/test_update_key_request_deny.py deleted file mode 100644 index 72b61f6..0000000 --- a/python/test/test_update_key_request_deny.py +++ /dev/null @@ -1,35 +0,0 @@ -""" - Garage Administration API v0+garage-v0.7.3 - - Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - - The version of the OpenAPI document: v0.7.3 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import garage_admin_sdk -from garage_admin_sdk.model.update_key_request_deny import UpdateKeyRequestDeny - - -class TestUpdateKeyRequestDeny(unittest.TestCase): - """UpdateKeyRequestDeny unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testUpdateKeyRequestDeny(self): - """Test UpdateKeyRequestDeny""" - # FIXME: construct object with mandatory attributes with example values - # model = UpdateKeyRequestDeny() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/python/tox.ini b/python/tox.ini deleted file mode 100644 index 01994f1..0000000 --- a/python/tox.ini +++ /dev/null @@ -1,9 +0,0 @@ -[tox] -envlist = py3 - -[testenv] -deps=-r{toxinidir}/requirements.txt - -r{toxinidir}/test-requirements.txt - -commands= - pytest --cov=garage_admin_sdk