Skip to content

Commit

Permalink
generated with codegen at box/box-codegen@c6d3cfa and spec at box/box…
Browse files Browse the repository at this point in the history
  • Loading branch information
box-sdk-build committed Dec 18, 2023
1 parent 49087be commit 4a68d64
Show file tree
Hide file tree
Showing 37 changed files with 350 additions and 350 deletions.
44 changes: 22 additions & 22 deletions box_sdk_gen/managers/authorization.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@
from box_sdk_gen.json_data import SerializedData


class GetAuthorizeResponseType(str, Enum):
class AuthorizeUserResponseType(str, Enum):
CODE = 'code'


class CreateOauth2TokenGrantType(str, Enum):
class RequestAccessTokenGrantType(str, Enum):
AUTHORIZATION_CODE = 'authorization_code'
REFRESH_TOKEN = 'refresh_token'
CLIENT_CREDENTIALS = 'client_credentials'
Expand All @@ -57,24 +57,24 @@ class CreateOauth2TokenGrantType(str, Enum):
)


class CreateOauth2TokenSubjectTokenType(str, Enum):
class RequestAccessTokenSubjectTokenType(str, Enum):
URN_IETF_PARAMS_OAUTH_TOKEN_TYPE_ACCESS_TOKEN = (
'urn:ietf:params:oauth:token-type:access_token'
)


class CreateOauth2TokenActorTokenType(str, Enum):
class RequestAccessTokenActorTokenType(str, Enum):
URN_IETF_PARAMS_OAUTH_TOKEN_TYPE_ID_TOKEN = (
'urn:ietf:params:oauth:token-type:id_token'
)


class CreateOauth2TokenBoxSubjectType(str, Enum):
class RequestAccessTokenBoxSubjectType(str, Enum):
ENTERPRISE = 'enterprise'
USER = 'user'


class CreateOauth2TokenRefreshGrantType(str, Enum):
class RefreshAccessTokenGrantType(str, Enum):
REFRESH_TOKEN = 'refresh_token'


Expand All @@ -89,9 +89,9 @@ def __init__(
self.auth = auth
self.network_session = network_session

def get_authorize(
def authorize_user(
self,
response_type: GetAuthorizeResponseType,
response_type: AuthorizeUserResponseType,
client_id: str,
redirect_uri: Optional[str] = None,
state: Optional[str] = None,
Expand All @@ -116,7 +116,7 @@ def get_authorize(
format.
:param response_type: The type of response we'd like to receive.
:type response_type: GetAuthorizeResponseType
:type response_type: AuthorizeUserResponseType
:param client_id: The Client ID of the application that is requesting to authenticate
the user. To get the Client ID for your application, log in to your
Box developer console and click the **Edit Application** link for
Expand Down Expand Up @@ -169,21 +169,21 @@ def get_authorize(
)
return None

def create_oauth_2_token(
def request_access_token(
self,
grant_type: CreateOauth2TokenGrantType,
grant_type: RequestAccessTokenGrantType,
client_id: Optional[str] = None,
client_secret: Optional[str] = None,
code: Optional[str] = None,
refresh_token: Optional[str] = None,
assertion: Optional[str] = None,
subject_token: Optional[str] = None,
subject_token_type: Optional[CreateOauth2TokenSubjectTokenType] = None,
subject_token_type: Optional[RequestAccessTokenSubjectTokenType] = None,
actor_token: Optional[str] = None,
actor_token_type: Optional[CreateOauth2TokenActorTokenType] = None,
actor_token_type: Optional[RequestAccessTokenActorTokenType] = None,
scope: Optional[str] = None,
resource: Optional[str] = None,
box_subject_type: Optional[CreateOauth2TokenBoxSubjectType] = None,
box_subject_type: Optional[RequestAccessTokenBoxSubjectType] = None,
box_subject_id: Optional[str] = None,
box_shared_link: Optional[str] = None,
extra_headers: Optional[Dict[str, Optional[str]]] = None,
Expand Down Expand Up @@ -220,7 +220,7 @@ def create_oauth_2_token(
:param grant_type: The type of request being made, either using a client-side obtained
authorization code, a refresh token, a JWT assertion, client credentials
grant or another access token for the purpose of downscoping a token.
:type grant_type: CreateOauth2TokenGrantType
:type grant_type: RequestAccessTokenGrantType
:param client_id: The Client ID of the application requesting an access token.
Used in combination with `authorization_code`, `client_credentials`, or
`urn:ietf:params:oauth:grant-type:jwt-bearer` as the `grant_type`.
Expand Down Expand Up @@ -250,7 +250,7 @@ def create_oauth_2_token(
:param subject_token_type: The type of `subject_token` passed in.
Used in combination with `urn:ietf:params:oauth:grant-type:token-exchange`
as the `grant_type`.
:type subject_token_type: Optional[CreateOauth2TokenSubjectTokenType], optional
:type subject_token_type: Optional[RequestAccessTokenSubjectTokenType], optional
:param actor_token: The token used to create an annotator token.
This is a JWT assertion.
Used in combination with `urn:ietf:params:oauth:grant-type:token-exchange`
Expand All @@ -259,7 +259,7 @@ def create_oauth_2_token(
:param actor_token_type: The type of `actor_token` passed in.
Used in combination with `urn:ietf:params:oauth:grant-type:token-exchange`
as the `grant_type`.
:type actor_token_type: Optional[CreateOauth2TokenActorTokenType], optional
:type actor_token_type: Optional[RequestAccessTokenActorTokenType], optional
:param scope: The space-delimited list of scopes that you want apply to the
new access token.
The `subject_token` will need to have all of these scopes or
Expand All @@ -268,7 +268,7 @@ def create_oauth_2_token(
:param resource: Full URL for the file that the token should be generated for.
:type resource: Optional[str], optional
:param box_subject_type: Used in combination with `client_credentials` as the `grant_type`.
:type box_subject_type: Optional[CreateOauth2TokenBoxSubjectType], optional
:type box_subject_type: Optional[RequestAccessTokenBoxSubjectType], optional
:param box_subject_id: Used in combination with `client_credentials` as the `grant_type`.
Value is determined by `box_subject_type`. If `user` use user ID and if
`enterprise` use enterprise ID.
Expand Down Expand Up @@ -313,9 +313,9 @@ def create_oauth_2_token(
)
return deserialize(response.data, AccessToken)

def create_oauth_2_token_refresh(
def refresh_access_token(
self,
grant_type: CreateOauth2TokenRefreshGrantType,
grant_type: RefreshAccessTokenGrantType,
client_id: str,
client_secret: str,
refresh_token: str,
Expand All @@ -324,7 +324,7 @@ def create_oauth_2_token_refresh(
"""
Refresh an Access Token using its client ID, secret, and refresh token.
:param grant_type: The type of request being made, in this case a refresh request.
:type grant_type: CreateOauth2TokenRefreshGrantType
:type grant_type: RefreshAccessTokenGrantType
:param client_id: The client ID of the application requesting to refresh the token.
:type client_id: str
:param client_secret: The client secret of the application requesting to refresh the token.
Expand Down Expand Up @@ -357,7 +357,7 @@ def create_oauth_2_token_refresh(
)
return deserialize(response.data, AccessToken)

def create_oauth_2_revoke(
def revoke_access_token(
self,
client_id: Optional[str] = None,
client_secret: Optional[str] = None,
Expand Down
20 changes: 10 additions & 10 deletions box_sdk_gen/managers/integration_mappings.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@
from box_sdk_gen.json_data import SerializedData


class GetIntegrationMappingSlackPartnerItemType(str, Enum):
class GetSlackIntegrationMappingPartnerItemType(str, Enum):
CHANNEL = 'channel'


class GetIntegrationMappingSlackBoxItemType(str, Enum):
class GetSlackIntegrationMappingBoxItemType(str, Enum):
FOLDER = 'folder'


Expand All @@ -64,14 +64,14 @@ def __init__(
self.auth = auth
self.network_session = network_session

def get_integration_mapping_slack(
def get_slack_integration_mapping(
self,
marker: Optional[str] = None,
limit: Optional[int] = None,
partner_item_type: Optional[GetIntegrationMappingSlackPartnerItemType] = None,
partner_item_type: Optional[GetSlackIntegrationMappingPartnerItemType] = None,
partner_item_id: Optional[str] = None,
box_item_id: Optional[str] = None,
box_item_type: Optional[GetIntegrationMappingSlackBoxItemType] = None,
box_item_type: Optional[GetSlackIntegrationMappingBoxItemType] = None,
is_manually_created: Optional[bool] = None,
extra_headers: Optional[Dict[str, Optional[str]]] = None,
) -> IntegrationMappings:
Expand All @@ -90,13 +90,13 @@ def get_integration_mapping_slack(
:param limit: The maximum number of items to return per page.
:type limit: Optional[int], optional
:param partner_item_type: Mapped item type, for which the mapping should be returned
:type partner_item_type: Optional[GetIntegrationMappingSlackPartnerItemType], optional
:type partner_item_type: Optional[GetSlackIntegrationMappingPartnerItemType], optional
:param partner_item_id: ID of the mapped item, for which the mapping should be returned
:type partner_item_id: Optional[str], optional
:param box_item_id: Box item ID, for which the mappings should be returned
:type box_item_id: Optional[str], optional
:param box_item_type: Box item type, for which the mappings should be returned
:type box_item_type: Optional[GetIntegrationMappingSlackBoxItemType], optional
:type box_item_type: Optional[GetSlackIntegrationMappingBoxItemType], optional
:param is_manually_created: Whether the mapping has been manually created
:type is_manually_created: Optional[bool], optional
:param extra_headers: Extra headers that will be included in the HTTP request.
Expand Down Expand Up @@ -129,7 +129,7 @@ def get_integration_mapping_slack(
)
return deserialize(response.data, IntegrationMappings)

def create_integration_mapping_slack(
def create_slack_integration_mapping(
self,
partner_item: IntegrationMappingPartnerItemSlack,
box_item: IntegrationMappingBoxItemSlack,
Expand Down Expand Up @@ -174,7 +174,7 @@ def create_integration_mapping_slack(
)
return deserialize(response.data, IntegrationMapping)

def update_integration_mapping_slack_by_id(
def update_slack_integration_mapping_by_id(
self,
integration_mapping_id: str,
box_item: Optional[IntegrationMappingBoxItemSlack] = None,
Expand Down Expand Up @@ -220,7 +220,7 @@ def update_integration_mapping_slack_by_id(
)
return deserialize(response.data, IntegrationMapping)

def delete_integration_mapping_slack_by_id(
def delete_slack_integration_mapping_by_id(
self,
integration_mapping_id: str,
extra_headers: Optional[Dict[str, Optional[str]]] = None,
Expand Down
8 changes: 4 additions & 4 deletions box_sdk_gen/managers/metadata_cascade_policies.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class CreateMetadataCascadePolicyScope(str, Enum):
ENTERPRISE = 'enterprise'


class CreateMetadataCascadePolicyApplyConflictResolution(str, Enum):
class ApplyMetadataCascadePolicyConflictResolution(str, Enum):
NONE = 'none'
OVERWRITE = 'overwrite'

Expand Down Expand Up @@ -251,10 +251,10 @@ def delete_metadata_cascade_policy_by_id(
)
return None

def create_metadata_cascade_policy_apply(
def apply_metadata_cascade_policy(
self,
metadata_cascade_policy_id: str,
conflict_resolution: CreateMetadataCascadePolicyApplyConflictResolution,
conflict_resolution: ApplyMetadataCascadePolicyConflictResolution,
extra_headers: Optional[Dict[str, Optional[str]]] = None,
) -> None:
"""
Expand All @@ -277,7 +277,7 @@ def create_metadata_cascade_policy_apply(
* `none` will preserve the existing value on the file
* `overwrite` will force-apply the templates values over
any existing values.
:type conflict_resolution: CreateMetadataCascadePolicyApplyConflictResolution
:type conflict_resolution: ApplyMetadataCascadePolicyConflictResolution
:param extra_headers: Extra headers that will be included in the HTTP request.
:type extra_headers: Optional[Dict[str, Optional[str]]], optional
"""
Expand Down
4 changes: 2 additions & 2 deletions box_sdk_gen/managers/retention_policy_assignments.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ def delete_retention_policy_assignment_by_id(
)
return None

def get_retention_policy_assignment_file_under_retention(
def get_files_under_retention_policy_assignment(
self,
retention_policy_assignment_id: str,
marker: Optional[str] = None,
Expand Down Expand Up @@ -343,7 +343,7 @@ def get_retention_policy_assignment_file_under_retention(
)
return deserialize(response.data, FilesUnderRetention)

def get_retention_policy_assignment_file_version_under_retention(
def get_file_versions_under_retention_policy_assignment(
self,
retention_policy_assignment_id: str,
marker: Optional[str] = None,
Expand Down
Loading

0 comments on commit 4a68d64

Please sign in to comment.