diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 751418d..56254d6 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -139,6 +139,8 @@ docs/UpdateExtraDataInAMessageResponse.md docs/UpdatePushPreferencesForAChannelRequest.md docs/UpdatePushPreferencesForAChannelResponse.md docs/UpdatePushPreferencesRequest.md +docs/UpdatePushPreferencesRequestDndSchedulesInner.md +docs/UpdatePushPreferencesRequestDndSchedulesInnerTimeWindowsInner.md docs/UpdatePushPreferencesResponse.md docs/UpdateSpecificUserMetadataRequest.md docs/UpdateUserMetadataRequest.md @@ -302,6 +304,8 @@ sendbird_platform_sdk/model/update_extra_data_in_a_message_response.py sendbird_platform_sdk/model/update_push_preferences_for_a_channel_request.py sendbird_platform_sdk/model/update_push_preferences_for_a_channel_response.py sendbird_platform_sdk/model/update_push_preferences_request.py +sendbird_platform_sdk/model/update_push_preferences_request_dnd_schedules_inner.py +sendbird_platform_sdk/model/update_push_preferences_request_dnd_schedules_inner_time_windows_inner.py sendbird_platform_sdk/model/update_push_preferences_response.py sendbird_platform_sdk/model/update_specific_user_metadata_request.py sendbird_platform_sdk/model/update_user_metadata_request.py diff --git a/docs/UpdatePushPreferencesRequest.md b/docs/UpdatePushPreferencesRequest.md index 6aba9d4..15db06e 100644 --- a/docs/UpdatePushPreferencesRequest.md +++ b/docs/UpdatePushPreferencesRequest.md @@ -18,6 +18,7 @@ Name | Type | Description | Notes **start_hour** | **int** | | [optional] **start_min** | **int** | | [optional] **timezone** | **str** | | [optional] +**dnd_schedules** | [**[UpdatePushPreferencesRequestDndSchedulesInner]**](UpdatePushPreferencesRequestDndSchedulesInner.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/docs/UpdatePushPreferencesRequestDndSchedulesInner.md b/docs/UpdatePushPreferencesRequestDndSchedulesInner.md new file mode 100644 index 0000000..956a74f --- /dev/null +++ b/docs/UpdatePushPreferencesRequestDndSchedulesInner.md @@ -0,0 +1,13 @@ +# UpdatePushPreferencesRequestDndSchedulesInner + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**day_of_week** | **str** | | [optional] +**time_windows** | [**[UpdatePushPreferencesRequestDndSchedulesInnerTimeWindowsInner]**](UpdatePushPreferencesRequestDndSchedulesInnerTimeWindowsInner.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/docs/UpdatePushPreferencesRequestDndSchedulesInnerTimeWindowsInner.md b/docs/UpdatePushPreferencesRequestDndSchedulesInnerTimeWindowsInner.md new file mode 100644 index 0000000..d8887ff --- /dev/null +++ b/docs/UpdatePushPreferencesRequestDndSchedulesInnerTimeWindowsInner.md @@ -0,0 +1,15 @@ +# UpdatePushPreferencesRequestDndSchedulesInnerTimeWindowsInner + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**start_hour** | **int** | | [optional] +**start_min** | **int** | | [optional] +**end_hour** | **int** | | [optional] +**end_min** | **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/docs/UpdatePushPreferencesResponse.md b/docs/UpdatePushPreferencesResponse.md index 641d41d..e923bad 100644 --- a/docs/UpdatePushPreferencesResponse.md +++ b/docs/UpdatePushPreferencesResponse.md @@ -18,6 +18,7 @@ Name | Type | Description | Notes **start_hour** | **int** | | [optional] **start_min** | **int** | | [optional] **timezone** | **str** | | [optional] +**dnd_schedules** | [**[UpdatePushPreferencesRequestDndSchedulesInner]**](UpdatePushPreferencesRequestDndSchedulesInner.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/docs/UserApi.md b/docs/UserApi.md index 35cad13..7b482a6 100644 --- a/docs/UserApi.md +++ b/docs/UserApi.md @@ -1887,6 +1887,19 @@ with sendbird_platform_sdk.ApiClient() as api_client: start_hour=1, start_min=1, timezone="timezone_example", + dnd_schedules=[ + UpdatePushPreferencesRequestDndSchedulesInner( + day_of_week="monday", + time_windows=[ + UpdatePushPreferencesRequestDndSchedulesInnerTimeWindowsInner( + start_hour=1, + start_min=1, + end_hour=1, + end_min=1, + ), + ], + ), + ], ) # UpdatePushPreferencesRequest | (optional) # example passing only required values which don't have defaults set diff --git a/docs/ViewPushPreferencesResponse.md b/docs/ViewPushPreferencesResponse.md index 9713953..e05de6d 100644 --- a/docs/ViewPushPreferencesResponse.md +++ b/docs/ViewPushPreferencesResponse.md @@ -18,6 +18,7 @@ Name | Type | Description | Notes **start_hour** | **int** | | [optional] **start_min** | **int** | | [optional] **timezone** | **str** | | [optional] +**dnd_schedules** | [**[UpdatePushPreferencesRequestDndSchedulesInner]**](UpdatePushPreferencesRequestDndSchedulesInner.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/sendbird_platform_sdk/__init__.py b/sendbird_platform_sdk/__init__.py index 78f593c..d54b52a 100644 --- a/sendbird_platform_sdk/__init__.py +++ b/sendbird_platform_sdk/__init__.py @@ -11,7 +11,7 @@ """ -__version__ = "2.1.2" +__version__ = "2.1.5" # import ApiClient from sendbird_platform_sdk.api_client import ApiClient diff --git a/sendbird_platform_sdk/api_client.py b/sendbird_platform_sdk/api_client.py index be29573..2e0cccd 100644 --- a/sendbird_platform_sdk/api_client.py +++ b/sendbird_platform_sdk/api_client.py @@ -77,7 +77,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None, self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/2.1.2/python' + self.user_agent = 'OpenAPI-Generator/2.1.5/python' def __enter__(self): return self diff --git a/sendbird_platform_sdk/configuration.py b/sendbird_platform_sdk/configuration.py index dbb6292..de9a51b 100644 --- a/sendbird_platform_sdk/configuration.py +++ b/sendbird_platform_sdk/configuration.py @@ -381,7 +381,7 @@ def to_debug_report(self): "OS: {env}\n"\ "Python Version: {pyversion}\n"\ "Version of the API: 1.0.0\n"\ - "SDK Package Version: 2.1.2".\ + "SDK Package Version: 2.1.5".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self): diff --git a/sendbird_platform_sdk/model/update_push_preferences_request.py b/sendbird_platform_sdk/model/update_push_preferences_request.py index d8738ec..165bd6a 100644 --- a/sendbird_platform_sdk/model/update_push_preferences_request.py +++ b/sendbird_platform_sdk/model/update_push_preferences_request.py @@ -32,7 +32,9 @@ def lazy_import(): from sendbird_platform_sdk.model.sendbird_push_trigger_option import SendbirdPushTriggerOption + from sendbird_platform_sdk.model.update_push_preferences_request_dnd_schedules_inner import UpdatePushPreferencesRequestDndSchedulesInner globals()['SendbirdPushTriggerOption'] = SendbirdPushTriggerOption + globals()['UpdatePushPreferencesRequestDndSchedulesInner'] = UpdatePushPreferencesRequestDndSchedulesInner class UpdatePushPreferencesRequest(ModelNormal): @@ -102,6 +104,7 @@ def openapi_types(): 'start_hour': (int,), # noqa: E501 'start_min': (int,), # noqa: E501 'timezone': (str,), # noqa: E501 + 'dnd_schedules': ([UpdatePushPreferencesRequestDndSchedulesInner],), # noqa: E501 } @cached_property @@ -124,6 +127,7 @@ def discriminator(): 'start_hour': 'start_hour', # noqa: E501 'start_min': 'start_min', # noqa: E501 'timezone': 'timezone', # noqa: E501 + 'dnd_schedules': 'dnd_schedules', # noqa: E501 } read_only_vars = { @@ -181,6 +185,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 start_hour (int): [optional] # noqa: E501 start_min (int): [optional] # noqa: E501 timezone (str): [optional] # noqa: E501 + dnd_schedules ([UpdatePushPreferencesRequestDndSchedulesInner]): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -280,6 +285,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 start_hour (int): [optional] # noqa: E501 start_min (int): [optional] # noqa: E501 timezone (str): [optional] # noqa: E501 + dnd_schedules ([UpdatePushPreferencesRequestDndSchedulesInner]): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/sendbird_platform_sdk/model/update_push_preferences_request_dnd_schedules_inner.py b/sendbird_platform_sdk/model/update_push_preferences_request_dnd_schedules_inner.py new file mode 100644 index 0000000..6243f93 --- /dev/null +++ b/sendbird_platform_sdk/model/update_push_preferences_request_dnd_schedules_inner.py @@ -0,0 +1,283 @@ +""" + Sendbird Platform SDK + + Sendbird Platform API SDK [https://sendbird.com/docs/chat/v3/platform-api/getting-started/prepare-to-use-api](https://sendbird.com/docs/chat/v3/platform-api/getting-started/prepare-to-use-api) Contact Support: Name: Sendbird Email: [support@sendbird.com](https://mailto:support@sendbird.com) # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Contact: support@sendbird.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from sendbird_platform_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 sendbird_platform_sdk.exceptions import ApiAttributeError + + +def lazy_import(): + from sendbird_platform_sdk.model.update_push_preferences_request_dnd_schedules_inner_time_windows_inner import UpdatePushPreferencesRequestDndSchedulesInnerTimeWindowsInner + globals()['UpdatePushPreferencesRequestDndSchedulesInnerTimeWindowsInner'] = UpdatePushPreferencesRequestDndSchedulesInnerTimeWindowsInner + + +class UpdatePushPreferencesRequestDndSchedulesInner(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 = { + ('day_of_week',): { + 'MONDAY': "monday", + 'TUESDAY': "tuesday", + 'WEDNESDAY': "wednesday", + 'THURSDAY': "thursday", + 'FRIDAY': "friday", + 'SATURDAY': "saturday", + 'SUNDAY': "sunday", + }, + } + + 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 { + 'day_of_week': (str,), # noqa: E501 + 'time_windows': ([UpdatePushPreferencesRequestDndSchedulesInnerTimeWindowsInner],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'day_of_week': 'day_of_week', # noqa: E501 + 'time_windows': 'time_windows', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """UpdatePushPreferencesRequestDndSchedulesInner - 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,) + day_of_week (str): [optional] # noqa: E501 + time_windows ([UpdatePushPreferencesRequestDndSchedulesInnerTimeWindowsInner]): [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 + """UpdatePushPreferencesRequestDndSchedulesInner - 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,) + day_of_week (str): [optional] # noqa: E501 + time_windows ([UpdatePushPreferencesRequestDndSchedulesInnerTimeWindowsInner]): [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/sendbird_platform_sdk/model/update_push_preferences_request_dnd_schedules_inner_time_windows_inner.py b/sendbird_platform_sdk/model/update_push_preferences_request_dnd_schedules_inner_time_windows_inner.py new file mode 100644 index 0000000..8d0dbbf --- /dev/null +++ b/sendbird_platform_sdk/model/update_push_preferences_request_dnd_schedules_inner_time_windows_inner.py @@ -0,0 +1,276 @@ +""" + Sendbird Platform SDK + + Sendbird Platform API SDK [https://sendbird.com/docs/chat/v3/platform-api/getting-started/prepare-to-use-api](https://sendbird.com/docs/chat/v3/platform-api/getting-started/prepare-to-use-api) Contact Support: Name: Sendbird Email: [support@sendbird.com](https://mailto:support@sendbird.com) # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Contact: support@sendbird.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from sendbird_platform_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 sendbird_platform_sdk.exceptions import ApiAttributeError + + + +class UpdatePushPreferencesRequestDndSchedulesInnerTimeWindowsInner(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 { + 'start_hour': (int,), # noqa: E501 + 'start_min': (int,), # noqa: E501 + 'end_hour': (int,), # noqa: E501 + 'end_min': (int,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'start_hour': 'start_hour', # noqa: E501 + 'start_min': 'start_min', # noqa: E501 + 'end_hour': 'end_hour', # noqa: E501 + 'end_min': 'end_min', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """UpdatePushPreferencesRequestDndSchedulesInnerTimeWindowsInner - 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,) + start_hour (int): [optional] # noqa: E501 + start_min (int): [optional] # noqa: E501 + end_hour (int): [optional] # noqa: E501 + end_min (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 + """UpdatePushPreferencesRequestDndSchedulesInnerTimeWindowsInner - 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,) + start_hour (int): [optional] # noqa: E501 + start_min (int): [optional] # noqa: E501 + end_hour (int): [optional] # noqa: E501 + end_min (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/sendbird_platform_sdk/model/update_push_preferences_response.py b/sendbird_platform_sdk/model/update_push_preferences_response.py index 3dd5f69..cb918ee 100644 --- a/sendbird_platform_sdk/model/update_push_preferences_response.py +++ b/sendbird_platform_sdk/model/update_push_preferences_response.py @@ -32,7 +32,9 @@ def lazy_import(): from sendbird_platform_sdk.model.sendbird_push_trigger_option import SendbirdPushTriggerOption + from sendbird_platform_sdk.model.update_push_preferences_request_dnd_schedules_inner import UpdatePushPreferencesRequestDndSchedulesInner globals()['SendbirdPushTriggerOption'] = SendbirdPushTriggerOption + globals()['UpdatePushPreferencesRequestDndSchedulesInner'] = UpdatePushPreferencesRequestDndSchedulesInner class UpdatePushPreferencesResponse(ModelNormal): @@ -102,6 +104,7 @@ def openapi_types(): 'start_hour': (int,), # noqa: E501 'start_min': (int,), # noqa: E501 'timezone': (str,), # noqa: E501 + 'dnd_schedules': ([UpdatePushPreferencesRequestDndSchedulesInner],), # noqa: E501 } @cached_property @@ -124,6 +127,7 @@ def discriminator(): 'start_hour': 'start_hour', # noqa: E501 'start_min': 'start_min', # noqa: E501 'timezone': 'timezone', # noqa: E501 + 'dnd_schedules': 'dnd_schedules', # noqa: E501 } read_only_vars = { @@ -181,6 +185,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 start_hour (int): [optional] # noqa: E501 start_min (int): [optional] # noqa: E501 timezone (str): [optional] # noqa: E501 + dnd_schedules ([UpdatePushPreferencesRequestDndSchedulesInner]): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -280,6 +285,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 start_hour (int): [optional] # noqa: E501 start_min (int): [optional] # noqa: E501 timezone (str): [optional] # noqa: E501 + dnd_schedules ([UpdatePushPreferencesRequestDndSchedulesInner]): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/sendbird_platform_sdk/model/view_push_preferences_response.py b/sendbird_platform_sdk/model/view_push_preferences_response.py index 98defd5..f953e22 100644 --- a/sendbird_platform_sdk/model/view_push_preferences_response.py +++ b/sendbird_platform_sdk/model/view_push_preferences_response.py @@ -32,7 +32,9 @@ def lazy_import(): from sendbird_platform_sdk.model.sendbird_push_trigger_option import SendbirdPushTriggerOption + from sendbird_platform_sdk.model.update_push_preferences_request_dnd_schedules_inner import UpdatePushPreferencesRequestDndSchedulesInner globals()['SendbirdPushTriggerOption'] = SendbirdPushTriggerOption + globals()['UpdatePushPreferencesRequestDndSchedulesInner'] = UpdatePushPreferencesRequestDndSchedulesInner class ViewPushPreferencesResponse(ModelNormal): @@ -102,6 +104,7 @@ def openapi_types(): 'start_hour': (int,), # noqa: E501 'start_min': (int,), # noqa: E501 'timezone': (str,), # noqa: E501 + 'dnd_schedules': ([UpdatePushPreferencesRequestDndSchedulesInner],), # noqa: E501 } @cached_property @@ -124,6 +127,7 @@ def discriminator(): 'start_hour': 'start_hour', # noqa: E501 'start_min': 'start_min', # noqa: E501 'timezone': 'timezone', # noqa: E501 + 'dnd_schedules': 'dnd_schedules', # noqa: E501 } read_only_vars = { @@ -181,6 +185,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 start_hour (int): [optional] # noqa: E501 start_min (int): [optional] # noqa: E501 timezone (str): [optional] # noqa: E501 + dnd_schedules ([UpdatePushPreferencesRequestDndSchedulesInner]): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -280,6 +285,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 start_hour (int): [optional] # noqa: E501 start_min (int): [optional] # noqa: E501 timezone (str): [optional] # noqa: E501 + dnd_schedules ([UpdatePushPreferencesRequestDndSchedulesInner]): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/sendbird_platform_sdk/models/__init__.py b/sendbird_platform_sdk/models/__init__.py index 9720605..cdb7354 100644 --- a/sendbird_platform_sdk/models/__init__.py +++ b/sendbird_platform_sdk/models/__init__.py @@ -140,6 +140,8 @@ from sendbird_platform_sdk.model.update_push_preferences_for_a_channel_request import UpdatePushPreferencesForAChannelRequest from sendbird_platform_sdk.model.update_push_preferences_for_a_channel_response import UpdatePushPreferencesForAChannelResponse from sendbird_platform_sdk.model.update_push_preferences_request import UpdatePushPreferencesRequest +from sendbird_platform_sdk.model.update_push_preferences_request_dnd_schedules_inner import UpdatePushPreferencesRequestDndSchedulesInner +from sendbird_platform_sdk.model.update_push_preferences_request_dnd_schedules_inner_time_windows_inner import UpdatePushPreferencesRequestDndSchedulesInnerTimeWindowsInner from sendbird_platform_sdk.model.update_push_preferences_response import UpdatePushPreferencesResponse from sendbird_platform_sdk.model.update_specific_user_metadata_request import UpdateSpecificUserMetadataRequest from sendbird_platform_sdk.model.update_user_metadata_request import UpdateUserMetadataRequest diff --git a/setup.py b/setup.py index b6df10e..c773600 100644 --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ from setuptools import setup, find_packages # noqa: H301 NAME = "sendbird_platform_sdk" -VERSION = "2.1.2" +VERSION = "2.1.5" # To install the library, run the following # # python setup.py install