Skip to content

Commit

Permalink
codegen output 8e9394c88ed14011a6a3ba1f32637a8d (#40)
Browse files Browse the repository at this point in the history
* generated with codegen at box/box-codegen@01f57d4 and spec at box/box-openapi@644ca90

* generated with codegen at box/box-codegen@dfa481b7 and spec at box/box-openapi@f0ab5d7

* generated with codegen at box/box-codegen@dfa481b7 and spec at box/box-openapi@d4c873b

* generated with codegen at box/box-codegen@ffe51a21 and spec at box/box-openapi@d4c873b
  • Loading branch information
box-sdk-build committed Nov 3, 2023
1 parent 9bc8ceb commit 2bdbd8a
Show file tree
Hide file tree
Showing 93 changed files with 684 additions and 676 deletions.
11 changes: 8 additions & 3 deletions box_sdk_gen/auth.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
from abc import abstractmethod
from typing import Optional

from .network import NetworkSession
from .schemas import AccessToken
from abc import abstractmethod

from box_sdk_gen.schemas import AccessToken

from box_sdk_gen.network import NetworkSession


class Authentication:
def __init__(self):
pass

@abstractmethod
def retrieve_token(
self, network_session: Optional[NetworkSession] = None
Expand Down
2 changes: 1 addition & 1 deletion box_sdk_gen/managers/avatars.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def create_user_avatar(
"""
if extra_headers is None:
extra_headers = {}
request_body = {
request_body: Dict = {
'pic': pic,
'pic_file_name': pic_file_name,
'pic_content_type': pic_content_type,
Expand Down
6 changes: 3 additions & 3 deletions box_sdk_gen/managers/chunked_uploads.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def create_file_upload_session(
"""
if extra_headers is None:
extra_headers = {}
request_body = {
request_body: Dict = {
'folder_id': folder_id,
'file_size': file_size,
'file_name': file_name,
Expand Down Expand Up @@ -152,7 +152,7 @@ def create_file_upload_session_for_existing_file(
"""
if extra_headers is None:
extra_headers = {}
request_body = {'file_size': file_size, 'file_name': file_name}
request_body: Dict = {'file_size': file_size, 'file_name': file_name}
headers_map: Dict[str, str] = prepare_params({**extra_headers})
response: FetchResponse = fetch(
''.join(
Expand Down Expand Up @@ -402,7 +402,7 @@ def create_file_upload_session_commit(
"""
if extra_headers is None:
extra_headers = {}
request_body = {'parts': parts}
request_body: Dict = {'parts': parts}
headers_map: Dict[str, str] = prepare_params(
{
'digest': to_string(digest),
Expand Down
14 changes: 7 additions & 7 deletions box_sdk_gen/managers/classifications.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class UpdateMetadataTemplateEnterpriseSecurityClassificationSchemaAddRequestBody
def __init__(
self,
classification_definition: Optional[str] = None,
color_id: Optional[int] = None,
color_id: Optional[float] = None,
**kwargs
):
"""
Expand All @@ -69,7 +69,7 @@ def __init__(
* `5`: Dark blue
* `6`: Light green
* `7`: Gray
:type color_id: Optional[int], optional
:type color_id: Optional[float], optional
"""
super().__init__(**kwargs)
self.classification_definition = classification_definition
Expand Down Expand Up @@ -150,7 +150,7 @@ class UpdateMetadataTemplateEnterpriseSecurityClassificationSchemaUpdateRequestB
def __init__(
self,
classification_definition: Optional[str] = None,
color_id: Optional[int] = None,
color_id: Optional[float] = None,
**kwargs
):
"""
Expand All @@ -169,7 +169,7 @@ def __init__(
* `5`: Dark blue
* `6`: Light green
* `7`: Gray
:type color_id: Optional[int], optional
:type color_id: Optional[float], optional
"""
super().__init__(**kwargs)
self.classification_definition = classification_definition
Expand Down Expand Up @@ -308,7 +308,7 @@ class CreateMetadataTemplateSchemaClassificationFieldsArgOptionsFieldStaticConfi
def __init__(
self,
classification_definition: Optional[str] = None,
color_id: Optional[int] = None,
color_id: Optional[float] = None,
**kwargs
):
"""
Expand All @@ -327,7 +327,7 @@ def __init__(
* `5`: Dark blue
* `6`: Light green
* `7`: Gray
:type color_id: Optional[int], optional
:type color_id: Optional[float], optional
"""
super().__init__(**kwargs)
self.classification_definition = classification_definition
Expand Down Expand Up @@ -700,7 +700,7 @@ def create_metadata_template_schema_classification(
"""
if extra_headers is None:
extra_headers = {}
request_body = {
request_body: Dict = {
'scope': scope,
'templateKey': template_key,
'displayName': display_name,
Expand Down
2 changes: 1 addition & 1 deletion box_sdk_gen/managers/collaboration_allowlist_entries.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def create_collaboration_whitelist_entry(
"""
if extra_headers is None:
extra_headers = {}
request_body = {'domain': domain, 'direction': direction}
request_body: Dict = {'domain': domain, 'direction': direction}
headers_map: Dict[str, str] = prepare_params({**extra_headers})
response: FetchResponse = fetch(
''.join(['https://api.box.com/2.0/collaboration_whitelist_entries']),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def create_collaboration_whitelist_exempt_target(
"""
if extra_headers is None:
extra_headers = {}
request_body = {'user': user}
request_body: Dict = {'user': user}
headers_map: Dict[str, str] = prepare_params({**extra_headers})
response: FetchResponse = fetch(
''.join(['https://api.box.com/2.0/collaboration_whitelist_exempt_targets']),
Expand Down
4 changes: 2 additions & 2 deletions box_sdk_gen/managers/comments.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ def update_comment_by_id(
"""
if extra_headers is None:
extra_headers = {}
request_body = {'message': message}
request_body: Dict = {'message': message}
query_params_map: Dict[str, str] = prepare_params({'fields': to_string(fields)})
headers_map: Dict[str, str] = prepare_params({**extra_headers})
response: FetchResponse = fetch(
Expand Down Expand Up @@ -286,7 +286,7 @@ def create_comment(
"""
if extra_headers is None:
extra_headers = {}
request_body = {
request_body: Dict = {
'message': message,
'tagged_message': tagged_message,
'item': item,
Expand Down
2 changes: 1 addition & 1 deletion box_sdk_gen/managers/email_aliases.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def create_user_email_alias(
"""
if extra_headers is None:
extra_headers = {}
request_body = {'email': email}
request_body: Dict = {'email': email}
headers_map: Dict[str, str] = prepare_params({**extra_headers})
response: FetchResponse = fetch(
''.join(
Expand Down
2 changes: 1 addition & 1 deletion box_sdk_gen/managers/file_classifications.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ def create_file_metadata_enterprise_security_classification(
"""
if extra_headers is None:
extra_headers = {}
request_body = {
request_body: Dict = {
'Box__Security__Classification__Key': box_security_classification_key
}
headers_map: Dict[str, str] = prepare_params({**extra_headers})
Expand Down
4 changes: 2 additions & 2 deletions box_sdk_gen/managers/file_requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def update_file_request_by_id(
"""
if extra_headers is None:
extra_headers = {}
request_body = {
request_body: Dict = {
'title': title,
'description': description,
'status': status,
Expand Down Expand Up @@ -311,7 +311,7 @@ def create_file_request_copy(
"""
if extra_headers is None:
extra_headers = {}
request_body = {
request_body: Dict = {
'folder': folder,
'title': title,
'description': description,
Expand Down
4 changes: 2 additions & 2 deletions box_sdk_gen/managers/file_versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ def update_file_version_by_id(
"""
if extra_headers is None:
extra_headers = {}
request_body = {'trashed_at': trashed_at}
request_body: Dict = {'trashed_at': trashed_at}
headers_map: Dict[str, str] = prepare_params({**extra_headers})
response: FetchResponse = fetch(
''.join(
Expand Down Expand Up @@ -361,7 +361,7 @@ def promote_file_version(
"""
if extra_headers is None:
extra_headers = {}
request_body = {'id': id, 'type': type}
request_body: Dict = {'id': id, 'type': type}
query_params_map: Dict[str, str] = prepare_params({'fields': to_string(fields)})
headers_map: Dict[str, str] = prepare_params({**extra_headers})
response: FetchResponse = fetch(
Expand Down
2 changes: 1 addition & 1 deletion box_sdk_gen/managers/file_watermarks.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def update_file_watermark(
"""
if extra_headers is None:
extra_headers = {}
request_body = {'watermark': watermark}
request_body: Dict = {'watermark': watermark}
headers_map: Dict[str, str] = prepare_params({**extra_headers})
response: FetchResponse = fetch(
''.join(
Expand Down
4 changes: 2 additions & 2 deletions box_sdk_gen/managers/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ def update_file_by_id(
"""
if extra_headers is None:
extra_headers = {}
request_body = {
request_body: Dict = {
'name': name,
'description': description,
'parent': parent,
Expand Down Expand Up @@ -496,7 +496,7 @@ def copy_file(
"""
if extra_headers is None:
extra_headers = {}
request_body = {'name': name, 'version': version, 'parent': parent}
request_body: Dict = {'name': name, 'version': version, 'parent': parent}
query_params_map: Dict[str, str] = prepare_params({'fields': to_string(fields)})
headers_map: Dict[str, str] = prepare_params({**extra_headers})
response: FetchResponse = fetch(
Expand Down
2 changes: 1 addition & 1 deletion box_sdk_gen/managers/folder_classifications.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def create_folder_metadata_enterprise_security_classification(
"""
if extra_headers is None:
extra_headers = {}
request_body = {
request_body: Dict = {
'Box__Security__Classification__Key': box_security_classification_key
}
headers_map: Dict[str, str] = prepare_params({**extra_headers})
Expand Down
2 changes: 1 addition & 1 deletion box_sdk_gen/managers/folder_locks.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ def create_folder_lock(
"""
if extra_headers is None:
extra_headers = {}
request_body = {'locked_operations': locked_operations, 'folder': folder}
request_body: Dict = {'locked_operations': locked_operations, 'folder': folder}
headers_map: Dict[str, str] = prepare_params({**extra_headers})
response: FetchResponse = fetch(
''.join(['https://api.box.com/2.0/folder_locks']),
Expand Down
2 changes: 1 addition & 1 deletion box_sdk_gen/managers/folder_watermarks.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def update_folder_watermark(
"""
if extra_headers is None:
extra_headers = {}
request_body = {'watermark': watermark}
request_body: Dict = {'watermark': watermark}
headers_map: Dict[str, str] = prepare_params({**extra_headers})
response: FetchResponse = fetch(
''.join(
Expand Down
6 changes: 3 additions & 3 deletions box_sdk_gen/managers/folders.py
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ def update_folder_by_id(
"""
if extra_headers is None:
extra_headers = {}
request_body = {
request_body: Dict = {
'name': name,
'description': description,
'sync_state': sync_state,
Expand Down Expand Up @@ -746,7 +746,7 @@ def create_folder(
"""
if extra_headers is None:
extra_headers = {}
request_body = {
request_body: Dict = {
'name': name,
'parent': parent,
'folder_upload_email': folder_upload_email,
Expand Down Expand Up @@ -815,7 +815,7 @@ def copy_folder(
"""
if extra_headers is None:
extra_headers = {}
request_body = {'name': name, 'parent': parent}
request_body: Dict = {'name': name, 'parent': parent}
query_params_map: Dict[str, str] = prepare_params({'fields': to_string(fields)})
headers_map: Dict[str, str] = prepare_params({**extra_headers})
response: FetchResponse = fetch(
Expand Down
4 changes: 2 additions & 2 deletions box_sdk_gen/managers/groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ def create_group(
"""
if extra_headers is None:
extra_headers = {}
request_body = {
request_body: Dict = {
'name': name,
'provenance': provenance,
'external_sync_identifier': external_sync_identifier,
Expand Down Expand Up @@ -345,7 +345,7 @@ def update_group_by_id(
"""
if extra_headers is None:
extra_headers = {}
request_body = {
request_body: Dict = {
'name': name,
'provenance': provenance,
'external_sync_identifier': external_sync_identifier,
Expand Down
4 changes: 2 additions & 2 deletions box_sdk_gen/managers/integration_mappings.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def create_integration_mapping_slack(
"""
if extra_headers is None:
extra_headers = {}
request_body = {
request_body: Dict = {
'partner_item': partner_item,
'box_item': box_item,
'options': options,
Expand Down Expand Up @@ -194,7 +194,7 @@ def update_integration_mapping_slack_by_id(
"""
if extra_headers is None:
extra_headers = {}
request_body = {'box_item': box_item, 'options': options}
request_body: Dict = {'box_item': box_item, 'options': options}
headers_map: Dict[str, str] = prepare_params({**extra_headers})
response: FetchResponse = fetch(
''.join(
Expand Down
2 changes: 1 addition & 1 deletion box_sdk_gen/managers/invites.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def create_invite(
"""
if extra_headers is None:
extra_headers = {}
request_body = {'enterprise': enterprise, 'actionable_by': actionable_by}
request_body: Dict = {'enterprise': enterprise, 'actionable_by': actionable_by}
query_params_map: Dict[str, str] = prepare_params({'fields': to_string(fields)})
headers_map: Dict[str, str] = prepare_params({**extra_headers})
response: FetchResponse = fetch(
Expand Down
4 changes: 2 additions & 2 deletions box_sdk_gen/managers/legal_hold_policies.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def create_legal_hold_policy(
"""
if extra_headers is None:
extra_headers = {}
request_body = {
request_body: Dict = {
'policy_name': policy_name,
'description': description,
'filter_started_at': filter_started_at,
Expand Down Expand Up @@ -225,7 +225,7 @@ def update_legal_hold_policy_by_id(
"""
if extra_headers is None:
extra_headers = {}
request_body = {
request_body: Dict = {
'policy_name': policy_name,
'description': description,
'release_notes': release_notes,
Expand Down
2 changes: 1 addition & 1 deletion box_sdk_gen/managers/legal_hold_policy_assignments.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def create_legal_hold_policy_assignment(
"""
if extra_headers is None:
extra_headers = {}
request_body = {'policy_id': policy_id, 'assign_to': assign_to}
request_body: Dict = {'policy_id': policy_id, 'assign_to': assign_to}
headers_map: Dict[str, str] = prepare_params({**extra_headers})
response: FetchResponse = fetch(
''.join(['https://api.box.com/2.0/legal_hold_policy_assignments']),
Expand Down
4 changes: 2 additions & 2 deletions box_sdk_gen/managers/memberships.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ def create_group_membership(
"""
if extra_headers is None:
extra_headers = {}
request_body = {
request_body: Dict = {
'user': user,
'group': group,
'role': role,
Expand Down Expand Up @@ -335,7 +335,7 @@ def update_group_membership_by_id(
"""
if extra_headers is None:
extra_headers = {}
request_body = {
request_body: Dict = {
'role': role,
'configurable_permissions': configurable_permissions,
}
Expand Down
4 changes: 2 additions & 2 deletions box_sdk_gen/managers/metadata_cascade_policies.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def create_metadata_cascade_policy(
"""
if extra_headers is None:
extra_headers = {}
request_body = {
request_body: Dict = {
'folder_id': folder_id,
'scope': scope,
'templateKey': template_key,
Expand Down Expand Up @@ -277,7 +277,7 @@ def create_metadata_cascade_policy_apply(
"""
if extra_headers is None:
extra_headers = {}
request_body = {'conflict_resolution': conflict_resolution}
request_body: Dict = {'conflict_resolution': conflict_resolution}
headers_map: Dict[str, str] = prepare_params({**extra_headers})
response: FetchResponse = fetch(
''.join(
Expand Down
Loading

0 comments on commit 2bdbd8a

Please sign in to comment.