From f40178819dc230b52eb92132109905db7560142f Mon Sep 17 00:00:00 2001 From: OneSignal Date: Fri, 13 May 2022 12:09:19 +0000 Subject: [PATCH] Update .NET API --- .openapi-generator-ignore | 23 -- .openapi-generator/FILES | 102 ------ .openapi-generator/VERSION | 1 - README.md | 49 ++- docs/DefaultApi.md | 18 +- docs/DeliveryData.md | 10 +- docs/InlineResponse2003.md | 11 - docs/InlineResponse2005.md | 3 +- ...eResponse2004.md => InlineResponse2007.md} | 2 +- ...ateTimeOrLong.md => InlineResponse2008.md} | 3 +- docs/Notification.md | 22 +- docs/NotificationAllOf.md | 22 +- docs/NotificationSlice.md | 2 +- docs/NotificationWithMeta.md | 20 +- src/OneSignalSDK.Server/Api/DefaultApi.cs | 122 +++---- src/OneSignalSDK.Server/Client/ApiClient.cs | 15 +- .../Client/ApiException.cs | 2 +- src/OneSignalSDK.Server/Client/ApiResponse.cs | 2 +- src/OneSignalSDK.Server/Client/ClientUtils.cs | 2 +- .../Client/Configuration.cs | 10 +- .../Client/ExceptionFactory.cs | 2 +- .../Client/GlobalConfiguration.cs | 2 +- src/OneSignalSDK.Server/Client/HttpMethod.cs | 2 +- .../Client/IApiAccessor.cs | 2 +- .../Client/IAsynchronousClient.cs | 2 +- .../Client/IReadableConfiguration.cs | 2 +- .../Client/ISynchronousClient.cs | 2 +- src/OneSignalSDK.Server/Client/Multimap.cs | 2 +- .../Client/OpenAPIDateConverter.cs | 2 +- .../Client/RequestOptions.cs | 2 +- .../Client/RetryConfiguration.cs | 2 +- .../Model/AbstractOpenAPISchema.cs | 2 +- src/OneSignalSDK.Server/Model/App.cs | 2 +- src/OneSignalSDK.Server/Model/Button.cs | 2 +- .../Model/DateTimeOrLong.cs | 302 ------------------ src/OneSignalSDK.Server/Model/DeliveryData.cs | 64 ++-- .../Model/ExportPlayersRequestBody.cs | 2 +- src/OneSignalSDK.Server/Model/Filter.cs | 2 +- .../Model/FilterExpressions.cs | 2 +- .../Model/FilterNotificationTarget.cs | 2 +- .../Model/GetNotificationRequestBody.cs | 2 +- .../Model/InlineResponse200.cs | 2 +- .../Model/InlineResponse2001.cs | 2 +- .../Model/InlineResponse2002.cs | 2 +- .../Model/InlineResponse2005.cs | 40 ++- ...eResponse2004.cs => InlineResponse2007.cs} | 22 +- ...eResponse2003.cs => InlineResponse2008.cs} | 58 ++-- .../Model/InlineResponse201.cs | 2 +- .../Model/InlineResponse400.cs | 2 +- .../Model/InlineResponse4001.cs | 2 +- .../Model/InlineResponse4002.cs | 2 +- .../Model/InlineResponse4003.cs | 2 +- .../Model/InvalidIdentifierError.cs | 2 +- src/OneSignalSDK.Server/Model/Notification.cs | 114 ++++--- .../Model/Notification200Errors.cs | 11 +- .../Model/NotificationAllOf.cs | 114 ++++--- ...otificationAllOfAndroidBackgroundLayout.cs | 2 +- .../Model/NotificationSlice.cs | 6 +- .../Model/NotificationTarget.cs | 2 +- .../Model/NotificationWithMeta.cs | 107 +++++-- .../Model/NotificationWithMetaAllOf.cs | 2 +- src/OneSignalSDK.Server/Model/Operator.cs | 2 +- src/OneSignalSDK.Server/Model/OutcomeData.cs | 2 +- src/OneSignalSDK.Server/Model/OutcomesData.cs | 2 +- .../Model/PlatformDeliveryData.cs | 2 +- src/OneSignalSDK.Server/Model/Player.cs | 2 +- .../Model/PlayerNotificationTarget.cs | 2 +- src/OneSignalSDK.Server/Model/PlayerSlice.cs | 2 +- src/OneSignalSDK.Server/Model/Purchase.cs | 2 +- src/OneSignalSDK.Server/Model/Segment.cs | 2 +- .../Model/SegmentNotificationTarget.cs | 2 +- src/OneSignalSDK.Server/Model/StringMap.cs | 2 +- .../Model/UpdatePlayerTagsRequestBody.cs | 2 +- .../OneSignalSDK.Server.csproj | 2 +- 74 files changed, 553 insertions(+), 814 deletions(-) delete mode 100644 .openapi-generator-ignore delete mode 100644 .openapi-generator/FILES delete mode 100644 .openapi-generator/VERSION delete mode 100644 docs/InlineResponse2003.md rename docs/{InlineResponse2004.md => InlineResponse2007.md} (87%) rename docs/{DateTimeOrLong.md => InlineResponse2008.md} (74%) delete mode 100644 src/OneSignalSDK.Server/Model/DateTimeOrLong.cs rename src/OneSignalSDK.Server/Model/{InlineResponse2004.cs => InlineResponse2007.cs} (85%) rename src/OneSignalSDK.Server/Model/{InlineResponse2003.cs => InlineResponse2008.cs} (63%) diff --git a/.openapi-generator-ignore b/.openapi-generator-ignore deleted file mode 100644 index 7484ee5..0000000 --- a/.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/.openapi-generator/FILES b/.openapi-generator/FILES deleted file mode 100644 index b17aea3..0000000 --- a/.openapi-generator/FILES +++ /dev/null @@ -1,102 +0,0 @@ -.gitignore -OneSignal.SDK.sln -README.md -appveyor.yml -docs/App.md -docs/Button.md -docs/DefaultApi.md -docs/DeliveryData.md -docs/ExportPlayersRequestBody.md -docs/Filter.md -docs/FilterExpressions.md -docs/FilterNotificationTarget.md -docs/GetNotificationRequestBody.md -docs/InlineResponse200.md -docs/InlineResponse2001.md -docs/InlineResponse2002.md -docs/InlineResponse2003.md -docs/InlineResponse2004.md -docs/InlineResponse2005.md -docs/InlineResponse201.md -docs/InlineResponse400.md -docs/InlineResponse4001.md -docs/InlineResponse4002.md -docs/InlineResponse4003.md -docs/InvalidIdentifierError.md -docs/Notification.md -docs/Notification200Errors.md -docs/NotificationAllOf.md -docs/NotificationAllOfAndroidBackgroundLayout.md -docs/NotificationSlice.md -docs/NotificationTarget.md -docs/Operator.md -docs/OutcomeData.md -docs/OutcomesData.md -docs/PlatformDeliveryData.md -docs/Player.md -docs/PlayerNotificationTarget.md -docs/PlayerSlice.md -docs/Purchase.md -docs/Segment.md -docs/SegmentNotificationTarget.md -docs/StringMap.md -docs/UpdatePlayerTagsRequestBody.md -git_push.sh -src/OneSignal.SDK.Test/OneSignal.SDK.Test.csproj -src/OneSignal.SDK/Api/DefaultApi.cs -src/OneSignal.SDK/Client/ApiClient.cs -src/OneSignal.SDK/Client/ApiException.cs -src/OneSignal.SDK/Client/ApiResponse.cs -src/OneSignal.SDK/Client/ClientUtils.cs -src/OneSignal.SDK/Client/Configuration.cs -src/OneSignal.SDK/Client/ExceptionFactory.cs -src/OneSignal.SDK/Client/GlobalConfiguration.cs -src/OneSignal.SDK/Client/HttpMethod.cs -src/OneSignal.SDK/Client/IApiAccessor.cs -src/OneSignal.SDK/Client/IAsynchronousClient.cs -src/OneSignal.SDK/Client/IReadableConfiguration.cs -src/OneSignal.SDK/Client/ISynchronousClient.cs -src/OneSignal.SDK/Client/Multimap.cs -src/OneSignal.SDK/Client/OpenAPIDateConverter.cs -src/OneSignal.SDK/Client/RequestOptions.cs -src/OneSignal.SDK/Client/RetryConfiguration.cs -src/OneSignal.SDK/Model/AbstractOpenAPISchema.cs -src/OneSignal.SDK/Model/App.cs -src/OneSignal.SDK/Model/Button.cs -src/OneSignal.SDK/Model/DeliveryData.cs -src/OneSignal.SDK/Model/ExportPlayersRequestBody.cs -src/OneSignal.SDK/Model/Filter.cs -src/OneSignal.SDK/Model/FilterExpressions.cs -src/OneSignal.SDK/Model/FilterNotificationTarget.cs -src/OneSignal.SDK/Model/GetNotificationRequestBody.cs -src/OneSignal.SDK/Model/InlineResponse200.cs -src/OneSignal.SDK/Model/InlineResponse2001.cs -src/OneSignal.SDK/Model/InlineResponse2002.cs -src/OneSignal.SDK/Model/InlineResponse2003.cs -src/OneSignal.SDK/Model/InlineResponse2004.cs -src/OneSignal.SDK/Model/InlineResponse2005.cs -src/OneSignal.SDK/Model/InlineResponse201.cs -src/OneSignal.SDK/Model/InlineResponse400.cs -src/OneSignal.SDK/Model/InlineResponse4001.cs -src/OneSignal.SDK/Model/InlineResponse4002.cs -src/OneSignal.SDK/Model/InlineResponse4003.cs -src/OneSignal.SDK/Model/InvalidIdentifierError.cs -src/OneSignal.SDK/Model/Notification.cs -src/OneSignal.SDK/Model/Notification200Errors.cs -src/OneSignal.SDK/Model/NotificationAllOf.cs -src/OneSignal.SDK/Model/NotificationAllOfAndroidBackgroundLayout.cs -src/OneSignal.SDK/Model/NotificationSlice.cs -src/OneSignal.SDK/Model/NotificationTarget.cs -src/OneSignal.SDK/Model/Operator.cs -src/OneSignal.SDK/Model/OutcomeData.cs -src/OneSignal.SDK/Model/OutcomesData.cs -src/OneSignal.SDK/Model/PlatformDeliveryData.cs -src/OneSignal.SDK/Model/Player.cs -src/OneSignal.SDK/Model/PlayerNotificationTarget.cs -src/OneSignal.SDK/Model/PlayerSlice.cs -src/OneSignal.SDK/Model/Purchase.cs -src/OneSignal.SDK/Model/Segment.cs -src/OneSignal.SDK/Model/SegmentNotificationTarget.cs -src/OneSignal.SDK/Model/StringMap.cs -src/OneSignal.SDK/Model/UpdatePlayerTagsRequestBody.cs -src/OneSignal.SDK/OneSignal.SDK.csproj diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION deleted file mode 100644 index ec76f37..0000000 --- a/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.0.0-beta \ No newline at end of file diff --git a/README.md b/README.md index 5a39c80..8610453 100644 --- a/README.md +++ b/README.md @@ -2,10 +2,8 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com -This C# SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - -- API version: 1.0.2 -- SDK version: 1.0.2 +- API version: 1.0.1 +- SDK version: 1.0.1 - Build package: org.openapitools.codegen.languages.CSharpNetCoreClientCodegen For more information, please visit [https://onesignal.com](https://onesignal.com) @@ -71,20 +69,43 @@ namespace Example { public static void Main() { + // Configure configuration with user_key Bearer token for authorization to access endpoints + // that require the OneSignal User Auth Key. + var userConfig = new Configuration(); + userConfig.BasePath = "https://onesignal.com/api/v1"; + userConfig.AccessToken = "USER_AUTH_KEY"; + + var userInstance = new DefaultApi(userConfig); + + try + { + // Create a new app + var app = new App(name: "Sample App"); + var result = userInstance.CreateApp(app); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling DefaultApi.CreateApp: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } - Configuration config = new Configuration(); - config.BasePath = "https://onesignal.com/api/v1"; - // Configure Bearer token for authorization: app_key - config.AccessToken = "YOUR_BEARER_TOKEN"; - var apiInstance = new DefaultApi(config); + // Configure configuration with app_key Bearer token for authorization to access endpoints + // that require the OneSignal App REST API Key. + var appConfig = new Configuration(); + appConfig.BasePath = "https://onesignal.com/api/v1"; + appConfig.AccessToken = "REST_API_KEY"; + + var appInstance = new DefaultApi(appConfig); + var appId = "appId_example"; // string | var notificationId = "notificationId_example"; // string | - try { // Stop a scheduled or currently outgoing notification - InlineResponse2001 result = apiInstance.CancelNotification(appId, notificationId); + var result = appInstance.CancelNotification(appId, notificationId); Debug.WriteLine(result); } catch (ApiException e) @@ -93,7 +114,6 @@ namespace Example Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } - } } } @@ -132,7 +152,6 @@ Class | Method | HTTP request | Description - [Model.App](docs/App.md) - [Model.Button](docs/Button.md) - - [Model.DateTimeOrLong](docs/DateTimeOrLong.md) - [Model.DeliveryData](docs/DeliveryData.md) - [Model.ExportPlayersRequestBody](docs/ExportPlayersRequestBody.md) - [Model.Filter](docs/Filter.md) @@ -142,9 +161,9 @@ Class | Method | HTTP request | Description - [Model.InlineResponse200](docs/InlineResponse200.md) - [Model.InlineResponse2001](docs/InlineResponse2001.md) - [Model.InlineResponse2002](docs/InlineResponse2002.md) - - [Model.InlineResponse2003](docs/InlineResponse2003.md) - - [Model.InlineResponse2004](docs/InlineResponse2004.md) - [Model.InlineResponse2005](docs/InlineResponse2005.md) + - [Model.InlineResponse2007](docs/InlineResponse2007.md) + - [Model.InlineResponse2008](docs/InlineResponse2008.md) - [Model.InlineResponse201](docs/InlineResponse201.md) - [Model.InlineResponse400](docs/InlineResponse400.md) - [Model.InlineResponse4001](docs/InlineResponse4001.md) diff --git a/docs/DefaultApi.md b/docs/DefaultApi.md index 0c513fb..59e55c8 100644 --- a/docs/DefaultApi.md +++ b/docs/DefaultApi.md @@ -252,7 +252,7 @@ Name | Type | Description | Notes # **CreatePlayer** -> InlineResponse2003 CreatePlayer (Player player) +> InlineResponse2005 CreatePlayer (Player player) Add a device @@ -283,7 +283,7 @@ namespace Example try { // Add a device - InlineResponse2003 result = apiInstance.CreatePlayer(player); + InlineResponse2005 result = apiInstance.CreatePlayer(player); Debug.WriteLine(result); } catch (ApiException e) @@ -305,7 +305,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse2003**](InlineResponse2003.md) +[**InlineResponse2005**](InlineResponse2005.md) ### Authorization @@ -404,7 +404,7 @@ Name | Type | Description | Notes # **DeletePlayer** -> InlineResponse2004 DeletePlayer (string appId, string playerId) +> InlineResponse2007 DeletePlayer (string appId, string playerId) Delete a user record @@ -436,7 +436,7 @@ namespace Example try { // Delete a user record - InlineResponse2004 result = apiInstance.DeletePlayer(appId, playerId); + InlineResponse2007 result = apiInstance.DeletePlayer(appId, playerId); Debug.WriteLine(result); } catch (ApiException e) @@ -459,7 +459,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse2004**](InlineResponse2004.md) +[**InlineResponse2007**](InlineResponse2007.md) ### Authorization @@ -560,7 +560,7 @@ Name | Type | Description | Notes # **ExportPlayers** -> InlineResponse2005 ExportPlayers (string appId, ExportPlayersRequestBody exportPlayersRequestBody = null) +> InlineResponse2008 ExportPlayers (string appId, ExportPlayersRequestBody exportPlayersRequestBody = null) CSV export @@ -592,7 +592,7 @@ namespace Example try { // CSV export - InlineResponse2005 result = apiInstance.ExportPlayers(appId, exportPlayersRequestBody); + InlineResponse2008 result = apiInstance.ExportPlayers(appId, exportPlayersRequestBody); Debug.WriteLine(result); } catch (ApiException e) @@ -615,7 +615,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse2005**](InlineResponse2005.md) +[**InlineResponse2008**](InlineResponse2008.md) ### Authorization diff --git a/docs/DeliveryData.md b/docs/DeliveryData.md index bebfd2a..dc8641d 100644 --- a/docs/DeliveryData.md +++ b/docs/DeliveryData.md @@ -4,11 +4,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Successful** | **int** | | [optional] -**Failed** | **int** | | [optional] -**Errored** | **int** | | [optional] -**Converted** | **int** | | [optional] -**Received** | **int** | | [optional] +**Successful** | **int?** | | [optional] +**Failed** | **int?** | | [optional] +**Errored** | **int?** | | [optional] +**Converted** | **int?** | | [optional] +**Received** | **int?** | | [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/InlineResponse2003.md b/docs/InlineResponse2003.md deleted file mode 100644 index bd1de06..0000000 --- a/docs/InlineResponse2003.md +++ /dev/null @@ -1,11 +0,0 @@ -# OneSignalSDK.Server.Model.InlineResponse2003 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Success** | **bool** | | [optional] -**Id** | **string** | | [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/InlineResponse2005.md b/docs/InlineResponse2005.md index 5ec3c5e..640bae5 100644 --- a/docs/InlineResponse2005.md +++ b/docs/InlineResponse2005.md @@ -4,7 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**CsvFileUrl** | **string** | | [optional] +**Success** | **bool** | | [optional] +**Id** | **string** | | [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/InlineResponse2004.md b/docs/InlineResponse2007.md similarity index 87% rename from docs/InlineResponse2004.md rename to docs/InlineResponse2007.md index ff512cb..998ba73 100644 --- a/docs/InlineResponse2004.md +++ b/docs/InlineResponse2007.md @@ -1,4 +1,4 @@ -# OneSignalSDK.Server.Model.InlineResponse2004 +# OneSignalSDK.Server.Model.InlineResponse2007 ## Properties diff --git a/docs/DateTimeOrLong.md b/docs/InlineResponse2008.md similarity index 74% rename from docs/DateTimeOrLong.md rename to docs/InlineResponse2008.md index 1a16639..4926d0a 100644 --- a/docs/DateTimeOrLong.md +++ b/docs/InlineResponse2008.md @@ -1,9 +1,10 @@ -# OneSignalSDK.Server.Model.DateTimeOrLong +# OneSignalSDK.Server.Model.InlineResponse2008 ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**CsvFileUrl** | **string** | | [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/Notification.md b/docs/Notification.md index 05cd2d4..a009911 100644 --- a/docs/Notification.md +++ b/docs/Notification.md @@ -31,16 +31,16 @@ Name | Type | Description | Notes **Id** | **string** | | [optional] **Value** | **int** | | [optional] [readonly] **Aggregation** | **string** | | [optional] [readonly] -**IsIos** | **bool** | Indicates whether to send to all devices registered under your app's Apple iOS platform. | [optional] [default to true] -**IsAndroid** | **bool** | Indicates whether to send to all devices registered under your app's Google Android platform. | [optional] -**IsHuawei** | **bool** | Indicates whether to send to all devices registered under your app's Huawei Android platform. | [optional] -**IsAnyWeb** | **bool** | Indicates whether to send to all subscribed web browser users, including Chrome, Firefox, and Safari. You may use this instead as a combined flag instead of separately enabling isChromeWeb, isFirefox, and isSafari, though the three options are equivalent to this one. | [optional] -**IsChromeWeb** | **bool** | Indicates whether to send to all Google Chrome, Chrome on Android, and Mozilla Firefox users registered under your Chrome & Firefox web push platform. | [optional] -**IsFirefox** | **bool** | Indicates whether to send to all Mozilla Firefox desktop users registered under your Firefox web push platform. | [optional] -**IsSafari** | **bool** | Does not support iOS Safari. Indicates whether to send to all Apple's Safari desktop users registered under your Safari web push platform. Read more iOS Safari | [optional] -**IsWPWNS** | **bool** | Indicates whether to send to all devices registered under your app's Windows platform. | [optional] -**IsAdm** | **bool** | Indicates whether to send to all devices registered under your app's Amazon Fire platform. | [optional] -**IsChrome** | **bool** | This flag is not used for web push Please see isChromeWeb for sending to web push users. This flag only applies to Google Chrome Apps & Extensions. Indicates whether to send to all devices registered under your app's Google Chrome Apps & Extension platform. | [optional] +**IsIos** | **bool?** | Indicates whether to send to all devices registered under your app's Apple iOS platform. | [optional] [default to true] +**IsAndroid** | **bool?** | Indicates whether to send to all devices registered under your app's Google Android platform. | [optional] +**IsHuawei** | **bool?** | Indicates whether to send to all devices registered under your app's Huawei Android platform. | [optional] +**IsAnyWeb** | **bool?** | Indicates whether to send to all subscribed web browser users, including Chrome, Firefox, and Safari. You may use this instead as a combined flag instead of separately enabling isChromeWeb, isFirefox, and isSafari, though the three options are equivalent to this one. | [optional] +**IsChromeWeb** | **bool?** | Indicates whether to send to all Google Chrome, Chrome on Android, and Mozilla Firefox users registered under your Chrome & Firefox web push platform. | [optional] +**IsFirefox** | **bool?** | Indicates whether to send to all Mozilla Firefox desktop users registered under your Firefox web push platform. | [optional] +**IsSafari** | **bool?** | Does not support iOS Safari. Indicates whether to send to all Apple's Safari desktop users registered under your Safari web push platform. Read more iOS Safari | [optional] +**IsWPWNS** | **bool?** | Indicates whether to send to all devices registered under your app's Windows platform. | [optional] +**IsAdm** | **bool?** | Indicates whether to send to all devices registered under your app's Amazon Fire platform. | [optional] +**IsChrome** | **bool?** | This flag is not used for web push Please see isChromeWeb for sending to web push users. This flag only applies to Google Chrome Apps & Extensions. Indicates whether to send to all devices registered under your app's Google Chrome Apps & Extension platform. | [optional] **ChannelForExternalUserIds** | **string** | Indicates if the message type when targeting with include_external_user_ids for cases where an email, sms, and/or push subscribers have the same external user id. Example: Use the string \"push\" to indicate you are sending a push notification or the string \"email\"for sending emails or \"sms\"for sending SMS. | [optional] **AppId** | **string** | Required: Your OneSignal Application ID, which can be found in Keys & IDs. It is a UUID and looks similar to 8250eaf6-1a58-489e-b136-7c74a864b434. | **ExternalId** | **string** | Correlation and idempotency key. A request received with this parameter will first look for another notification with the same external_id. If one exists, a notification will not be sent, and result of the previous operation will instead be returned. Therefore, if you plan on using this feature, it's important to use a good source of randomness to generate the UUID passed here. This key is only idempotent for 30 days. After 30 days, the notification could be removed from our system and a notification with the same external_id will be sent again. See Idempotent Notification Requests for more details writeOnly: true | [optional] @@ -96,7 +96,7 @@ Name | Type | Description | Notes **CollapseId** | **string** | Channel: Push Notifications Platform: iOS 10+, Android Only one notification with the same id will be shown on the device. Use the same id to update an existing notification instead of showing a new one. Limit of 64 characters. | [optional] **WebPushTopic** | **string** | Channel: Push Notifications Platform: All Browsers Display multiple notifications at once with different topics. | [optional] **ApnsAlert** | **Object** | Channel: Push Notifications Platform: iOS 10+ iOS can localize push notification messages on the client using special parameters such as loc-key. When using the Create Notification endpoint, you must include these parameters inside of a field called apns_alert. Please see Apple's guide on localizing push notifications to learn more. | [optional] -**SendAfter** | [**DateTimeOrLong**](DateTimeOrLong.md) | | [optional] +**SendAfter** | **DateTime** | Channel: All Schedule notification for future delivery. API defaults to UTC -1100 Examples: All examples are the exact same date & time. \"Thu Sep 24 2015 14:00:00 GMT-0700 (PDT)\" \"September 24th 2015, 2:00:00 pm UTC-07:00\" \"2015-09-24 14:00:00 GMT-0700\" \"Sept 24 2015 14:00:00 GMT-0700\" \"Thu Sep 24 2015 14:00:00 GMT-0700 (Pacific Daylight Time)\" Note: SMS currently only supports send_after parameter. | [optional] **DelayedOption** | **string** | Channel: All Possible values are: timezone (Deliver at a specific time-of-day in each users own timezone) last-active Same as Intelligent Delivery . (Deliver at the same time of day as each user last used your app). If send_after is used, this takes effect after the send_after time has elapsed. | [optional] **DeliveryTimeOfDay** | **string** | Channel: All Use with delayed_option=timezone. Examples: \"9:00AM\" \"21:45\" \"9:45:30\" | [optional] **Ttl** | **int?** | Channel: Push Notifications Platform: iOS, Android, Chrome, Firefox, Safari, ChromeWeb Time To Live - In seconds. The notification will be expired if the device does not come back online within this time. The default is 259,200 seconds (3 days). Max value to set is 2419200 seconds (28 days). | [optional] diff --git a/docs/NotificationAllOf.md b/docs/NotificationAllOf.md index 6308121..0be6e86 100644 --- a/docs/NotificationAllOf.md +++ b/docs/NotificationAllOf.md @@ -7,16 +7,16 @@ Name | Type | Description | Notes **Id** | **string** | | [optional] **Value** | **int** | | [optional] [readonly] **Aggregation** | **string** | | [optional] [readonly] -**IsIos** | **bool** | Indicates whether to send to all devices registered under your app's Apple iOS platform. | [optional] [default to true] -**IsAndroid** | **bool** | Indicates whether to send to all devices registered under your app's Google Android platform. | [optional] -**IsHuawei** | **bool** | Indicates whether to send to all devices registered under your app's Huawei Android platform. | [optional] -**IsAnyWeb** | **bool** | Indicates whether to send to all subscribed web browser users, including Chrome, Firefox, and Safari. You may use this instead as a combined flag instead of separately enabling isChromeWeb, isFirefox, and isSafari, though the three options are equivalent to this one. | [optional] -**IsChromeWeb** | **bool** | Indicates whether to send to all Google Chrome, Chrome on Android, and Mozilla Firefox users registered under your Chrome & Firefox web push platform. | [optional] -**IsFirefox** | **bool** | Indicates whether to send to all Mozilla Firefox desktop users registered under your Firefox web push platform. | [optional] -**IsSafari** | **bool** | Does not support iOS Safari. Indicates whether to send to all Apple's Safari desktop users registered under your Safari web push platform. Read more iOS Safari | [optional] -**IsWPWNS** | **bool** | Indicates whether to send to all devices registered under your app's Windows platform. | [optional] -**IsAdm** | **bool** | Indicates whether to send to all devices registered under your app's Amazon Fire platform. | [optional] -**IsChrome** | **bool** | This flag is not used for web push Please see isChromeWeb for sending to web push users. This flag only applies to Google Chrome Apps & Extensions. Indicates whether to send to all devices registered under your app's Google Chrome Apps & Extension platform. | [optional] +**IsIos** | **bool?** | Indicates whether to send to all devices registered under your app's Apple iOS platform. | [optional] [default to true] +**IsAndroid** | **bool?** | Indicates whether to send to all devices registered under your app's Google Android platform. | [optional] +**IsHuawei** | **bool?** | Indicates whether to send to all devices registered under your app's Huawei Android platform. | [optional] +**IsAnyWeb** | **bool?** | Indicates whether to send to all subscribed web browser users, including Chrome, Firefox, and Safari. You may use this instead as a combined flag instead of separately enabling isChromeWeb, isFirefox, and isSafari, though the three options are equivalent to this one. | [optional] +**IsChromeWeb** | **bool?** | Indicates whether to send to all Google Chrome, Chrome on Android, and Mozilla Firefox users registered under your Chrome & Firefox web push platform. | [optional] +**IsFirefox** | **bool?** | Indicates whether to send to all Mozilla Firefox desktop users registered under your Firefox web push platform. | [optional] +**IsSafari** | **bool?** | Does not support iOS Safari. Indicates whether to send to all Apple's Safari desktop users registered under your Safari web push platform. Read more iOS Safari | [optional] +**IsWPWNS** | **bool?** | Indicates whether to send to all devices registered under your app's Windows platform. | [optional] +**IsAdm** | **bool?** | Indicates whether to send to all devices registered under your app's Amazon Fire platform. | [optional] +**IsChrome** | **bool?** | This flag is not used for web push Please see isChromeWeb for sending to web push users. This flag only applies to Google Chrome Apps & Extensions. Indicates whether to send to all devices registered under your app's Google Chrome Apps & Extension platform. | [optional] **ChannelForExternalUserIds** | **string** | Indicates if the message type when targeting with include_external_user_ids for cases where an email, sms, and/or push subscribers have the same external user id. Example: Use the string \"push\" to indicate you are sending a push notification or the string \"email\"for sending emails or \"sms\"for sending SMS. | [optional] **AppId** | **string** | Required: Your OneSignal Application ID, which can be found in Keys & IDs. It is a UUID and looks similar to 8250eaf6-1a58-489e-b136-7c74a864b434. | [optional] **ExternalId** | **string** | Correlation and idempotency key. A request received with this parameter will first look for another notification with the same external_id. If one exists, a notification will not be sent, and result of the previous operation will instead be returned. Therefore, if you plan on using this feature, it's important to use a good source of randomness to generate the UUID passed here. This key is only idempotent for 30 days. After 30 days, the notification could be removed from our system and a notification with the same external_id will be sent again. See Idempotent Notification Requests for more details writeOnly: true | [optional] @@ -72,7 +72,7 @@ Name | Type | Description | Notes **CollapseId** | **string** | Channel: Push Notifications Platform: iOS 10+, Android Only one notification with the same id will be shown on the device. Use the same id to update an existing notification instead of showing a new one. Limit of 64 characters. | [optional] **WebPushTopic** | **string** | Channel: Push Notifications Platform: All Browsers Display multiple notifications at once with different topics. | [optional] **ApnsAlert** | **Object** | Channel: Push Notifications Platform: iOS 10+ iOS can localize push notification messages on the client using special parameters such as loc-key. When using the Create Notification endpoint, you must include these parameters inside of a field called apns_alert. Please see Apple's guide on localizing push notifications to learn more. | [optional] -**SendAfter** | [**DateTimeOrLong**](DateTimeOrLong.md) | | [optional] +**SendAfter** | **DateTime** | Channel: All Schedule notification for future delivery. API defaults to UTC -1100 Examples: All examples are the exact same date & time. \"Thu Sep 24 2015 14:00:00 GMT-0700 (PDT)\" \"September 24th 2015, 2:00:00 pm UTC-07:00\" \"2015-09-24 14:00:00 GMT-0700\" \"Sept 24 2015 14:00:00 GMT-0700\" \"Thu Sep 24 2015 14:00:00 GMT-0700 (Pacific Daylight Time)\" Note: SMS currently only supports send_after parameter. | [optional] **DelayedOption** | **string** | Channel: All Possible values are: timezone (Deliver at a specific time-of-day in each users own timezone) last-active Same as Intelligent Delivery . (Deliver at the same time of day as each user last used your app). If send_after is used, this takes effect after the send_after time has elapsed. | [optional] **DeliveryTimeOfDay** | **string** | Channel: All Use with delayed_option=timezone. Examples: \"9:00AM\" \"21:45\" \"9:45:30\" | [optional] **Ttl** | **int?** | Channel: Push Notifications Platform: iOS, Android, Chrome, Firefox, Safari, ChromeWeb Time To Live - In seconds. The notification will be expired if the device does not come back online within this time. The default is 259,200 seconds (3 days). Max value to set is 2419200 seconds (28 days). | [optional] diff --git a/docs/NotificationSlice.md b/docs/NotificationSlice.md index 4c73ea5..1f5da7d 100644 --- a/docs/NotificationSlice.md +++ b/docs/NotificationSlice.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **TotalCount** | **int** | | [optional] **Offset** | **int** | | [optional] **Limit** | **int** | | [optional] -**Notifications** | [**List<Notification>**](Notification.md) | | [optional] +**Notifications** | [**List<NotificationWithMeta>**](NotificationWithMeta.md) | | [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/NotificationWithMeta.md b/docs/NotificationWithMeta.md index 97c8b50..7e91b08 100644 --- a/docs/NotificationWithMeta.md +++ b/docs/NotificationWithMeta.md @@ -31,16 +31,16 @@ Name | Type | Description | Notes **Id** | **string** | | [optional] **Value** | **int** | | [optional] [readonly] **Aggregation** | **string** | | [optional] [readonly] -**IsIos** | **bool** | Indicates whether to send to all devices registered under your app's Apple iOS platform. | [optional] [default to true] -**IsAndroid** | **bool** | Indicates whether to send to all devices registered under your app's Google Android platform. | [optional] -**IsHuawei** | **bool** | Indicates whether to send to all devices registered under your app's Huawei Android platform. | [optional] -**IsAnyWeb** | **bool** | Indicates whether to send to all subscribed web browser users, including Chrome, Firefox, and Safari. You may use this instead as a combined flag instead of separately enabling isChromeWeb, isFirefox, and isSafari, though the three options are equivalent to this one. | [optional] -**IsChromeWeb** | **bool** | Indicates whether to send to all Google Chrome, Chrome on Android, and Mozilla Firefox users registered under your Chrome & Firefox web push platform. | [optional] -**IsFirefox** | **bool** | Indicates whether to send to all Mozilla Firefox desktop users registered under your Firefox web push platform. | [optional] -**IsSafari** | **bool** | Does not support iOS Safari. Indicates whether to send to all Apple's Safari desktop users registered under your Safari web push platform. Read more iOS Safari | [optional] -**IsWPWNS** | **bool** | Indicates whether to send to all devices registered under your app's Windows platform. | [optional] -**IsAdm** | **bool** | Indicates whether to send to all devices registered under your app's Amazon Fire platform. | [optional] -**IsChrome** | **bool** | This flag is not used for web push Please see isChromeWeb for sending to web push users. This flag only applies to Google Chrome Apps & Extensions. Indicates whether to send to all devices registered under your app's Google Chrome Apps & Extension platform. | [optional] +**IsIos** | **bool?** | Indicates whether to send to all devices registered under your app's Apple iOS platform. | [optional] [default to true] +**IsAndroid** | **bool?** | Indicates whether to send to all devices registered under your app's Google Android platform. | [optional] +**IsHuawei** | **bool?** | Indicates whether to send to all devices registered under your app's Huawei Android platform. | [optional] +**IsAnyWeb** | **bool?** | Indicates whether to send to all subscribed web browser users, including Chrome, Firefox, and Safari. You may use this instead as a combined flag instead of separately enabling isChromeWeb, isFirefox, and isSafari, though the three options are equivalent to this one. | [optional] +**IsChromeWeb** | **bool?** | Indicates whether to send to all Google Chrome, Chrome on Android, and Mozilla Firefox users registered under your Chrome & Firefox web push platform. | [optional] +**IsFirefox** | **bool?** | Indicates whether to send to all Mozilla Firefox desktop users registered under your Firefox web push platform. | [optional] +**IsSafari** | **bool?** | Does not support iOS Safari. Indicates whether to send to all Apple's Safari desktop users registered under your Safari web push platform. Read more iOS Safari | [optional] +**IsWPWNS** | **bool?** | Indicates whether to send to all devices registered under your app's Windows platform. | [optional] +**IsAdm** | **bool?** | Indicates whether to send to all devices registered under your app's Amazon Fire platform. | [optional] +**IsChrome** | **bool?** | This flag is not used for web push Please see isChromeWeb for sending to web push users. This flag only applies to Google Chrome Apps & Extensions. Indicates whether to send to all devices registered under your app's Google Chrome Apps & Extension platform. | [optional] **ChannelForExternalUserIds** | **string** | Indicates if the message type when targeting with include_external_user_ids for cases where an email, sms, and/or push subscribers have the same external user id. Example: Use the string \"push\" to indicate you are sending a push notification or the string \"email\"for sending emails or \"sms\"for sending SMS. | [optional] **AppId** | **string** | Required: Your OneSignal Application ID, which can be found in Keys & IDs. It is a UUID and looks similar to 8250eaf6-1a58-489e-b136-7c74a864b434. | **ExternalId** | **string** | Correlation and idempotency key. A request received with this parameter will first look for another notification with the same external_id. If one exists, a notification will not be sent, and result of the previous operation will instead be returned. Therefore, if you plan on using this feature, it's important to use a good source of randomness to generate the UUID passed here. This key is only idempotent for 30 days. After 30 days, the notification could be removed from our system and a notification with the same external_id will be sent again. See Idempotent Notification Requests for more details writeOnly: true | [optional] diff --git a/src/OneSignalSDK.Server/Api/DefaultApi.cs b/src/OneSignalSDK.Server/Api/DefaultApi.cs index 832ccf1..d13706d 100644 --- a/src/OneSignalSDK.Server/Api/DefaultApi.cs +++ b/src/OneSignalSDK.Server/Api/DefaultApi.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.0.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -107,8 +107,8 @@ public interface IDefaultApiSync : IApiAccessor /// Thrown when fails to make API call /// /// Index associated with the operation. - /// InlineResponse2003 - InlineResponse2003 CreatePlayer(Player player, int operationIndex = 0); + /// InlineResponse2005 + InlineResponse2005 CreatePlayer(Player player, int operationIndex = 0); /// /// Add a device @@ -119,8 +119,8 @@ public interface IDefaultApiSync : IApiAccessor /// Thrown when fails to make API call /// /// Index associated with the operation. - /// ApiResponse of InlineResponse2003 - ApiResponse CreatePlayerWithHttpInfo(Player player, int operationIndex = 0); + /// ApiResponse of InlineResponse2005 + ApiResponse CreatePlayerWithHttpInfo(Player player, int operationIndex = 0); /// /// Create Segments /// @@ -156,8 +156,8 @@ public interface IDefaultApiSync : IApiAccessor /// The OneSignal App ID for your app. Available in Keys & IDs. /// The OneSignal player_id /// Index associated with the operation. - /// InlineResponse2004 - InlineResponse2004 DeletePlayer(string appId, string playerId, int operationIndex = 0); + /// InlineResponse2007 + InlineResponse2007 DeletePlayer(string appId, string playerId, int operationIndex = 0); /// /// Delete a user record @@ -169,8 +169,8 @@ public interface IDefaultApiSync : IApiAccessor /// The OneSignal App ID for your app. Available in Keys & IDs. /// The OneSignal player_id /// Index associated with the operation. - /// ApiResponse of InlineResponse2004 - ApiResponse DeletePlayerWithHttpInfo(string appId, string playerId, int operationIndex = 0); + /// ApiResponse of InlineResponse2007 + ApiResponse DeletePlayerWithHttpInfo(string appId, string playerId, int operationIndex = 0); /// /// Delete Segments /// @@ -206,8 +206,8 @@ public interface IDefaultApiSync : IApiAccessor /// The app ID that you want to export devices from /// (optional) /// Index associated with the operation. - /// InlineResponse2005 - InlineResponse2005 ExportPlayers(string appId, ExportPlayersRequestBody exportPlayersRequestBody = default(ExportPlayersRequestBody), int operationIndex = 0); + /// InlineResponse2008 + InlineResponse2008 ExportPlayers(string appId, ExportPlayersRequestBody exportPlayersRequestBody = default(ExportPlayersRequestBody), int operationIndex = 0); /// /// CSV export @@ -219,8 +219,8 @@ public interface IDefaultApiSync : IApiAccessor /// The app ID that you want to export devices from /// (optional) /// Index associated with the operation. - /// ApiResponse of InlineResponse2005 - ApiResponse ExportPlayersWithHttpInfo(string appId, ExportPlayersRequestBody exportPlayersRequestBody = default(ExportPlayersRequestBody), int operationIndex = 0); + /// ApiResponse of InlineResponse2008 + ApiResponse ExportPlayersWithHttpInfo(string appId, ExportPlayersRequestBody exportPlayersRequestBody = default(ExportPlayersRequestBody), int operationIndex = 0); /// /// View an app /// @@ -604,8 +604,8 @@ public interface IDefaultApiAsync : IApiAccessor /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of InlineResponse2003 - System.Threading.Tasks.Task CreatePlayerAsync(Player player, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// Task of InlineResponse2005 + System.Threading.Tasks.Task CreatePlayerAsync(Player player, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Add a device @@ -617,8 +617,8 @@ public interface IDefaultApiAsync : IApiAccessor /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of ApiResponse (InlineResponse2003) - System.Threading.Tasks.Task> CreatePlayerWithHttpInfoAsync(Player player, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// Task of ApiResponse (InlineResponse2005) + System.Threading.Tasks.Task> CreatePlayerWithHttpInfoAsync(Player player, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Create Segments /// @@ -657,8 +657,8 @@ public interface IDefaultApiAsync : IApiAccessor /// The OneSignal player_id /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of InlineResponse2004 - System.Threading.Tasks.Task DeletePlayerAsync(string appId, string playerId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// Task of InlineResponse2007 + System.Threading.Tasks.Task DeletePlayerAsync(string appId, string playerId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Delete a user record @@ -671,8 +671,8 @@ public interface IDefaultApiAsync : IApiAccessor /// The OneSignal player_id /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of ApiResponse (InlineResponse2004) - System.Threading.Tasks.Task> DeletePlayerWithHttpInfoAsync(string appId, string playerId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// Task of ApiResponse (InlineResponse2007) + System.Threading.Tasks.Task> DeletePlayerWithHttpInfoAsync(string appId, string playerId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Delete Segments /// @@ -711,8 +711,8 @@ public interface IDefaultApiAsync : IApiAccessor /// (optional) /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of InlineResponse2005 - System.Threading.Tasks.Task ExportPlayersAsync(string appId, ExportPlayersRequestBody exportPlayersRequestBody = default(ExportPlayersRequestBody), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// Task of InlineResponse2008 + System.Threading.Tasks.Task ExportPlayersAsync(string appId, ExportPlayersRequestBody exportPlayersRequestBody = default(ExportPlayersRequestBody), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// CSV export @@ -725,8 +725,8 @@ public interface IDefaultApiAsync : IApiAccessor /// (optional) /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of ApiResponse (InlineResponse2005) - System.Threading.Tasks.Task> ExportPlayersWithHttpInfoAsync(string appId, ExportPlayersRequestBody exportPlayersRequestBody = default(ExportPlayersRequestBody), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// Task of ApiResponse (InlineResponse2008) + System.Threading.Tasks.Task> ExportPlayersWithHttpInfoAsync(string appId, ExportPlayersRequestBody exportPlayersRequestBody = default(ExportPlayersRequestBody), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// View an app /// @@ -1652,10 +1652,10 @@ public OneSignalSDK.Server.Client.ApiResponse CreateNotificat /// Thrown when fails to make API call /// /// Index associated with the operation. - /// InlineResponse2003 - public InlineResponse2003 CreatePlayer(Player player, int operationIndex = 0) + /// InlineResponse2005 + public InlineResponse2005 CreatePlayer(Player player, int operationIndex = 0) { - OneSignalSDK.Server.Client.ApiResponse localVarResponse = CreatePlayerWithHttpInfo(player); + OneSignalSDK.Server.Client.ApiResponse localVarResponse = CreatePlayerWithHttpInfo(player); return localVarResponse.Data; } @@ -1665,8 +1665,8 @@ public InlineResponse2003 CreatePlayer(Player player, int operationIndex = 0) /// Thrown when fails to make API call /// /// Index associated with the operation. - /// ApiResponse of InlineResponse2003 - public OneSignalSDK.Server.Client.ApiResponse CreatePlayerWithHttpInfo(Player player, int operationIndex = 0) + /// ApiResponse of InlineResponse2005 + public OneSignalSDK.Server.Client.ApiResponse CreatePlayerWithHttpInfo(Player player, int operationIndex = 0) { // verify the required parameter 'player' is set if (player == null) @@ -1710,7 +1710,7 @@ public OneSignalSDK.Server.Client.ApiResponse CreatePlayerWi } // make the HTTP request - var localVarResponse = this.Client.Post("/players", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Post("/players", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("CreatePlayer", localVarResponse); @@ -1730,10 +1730,10 @@ public OneSignalSDK.Server.Client.ApiResponse CreatePlayerWi /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of InlineResponse2003 - public async System.Threading.Tasks.Task CreatePlayerAsync(Player player, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of InlineResponse2005 + public async System.Threading.Tasks.Task CreatePlayerAsync(Player player, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - OneSignalSDK.Server.Client.ApiResponse localVarResponse = await CreatePlayerWithHttpInfoAsync(player, operationIndex, cancellationToken).ConfigureAwait(false); + OneSignalSDK.Server.Client.ApiResponse localVarResponse = await CreatePlayerWithHttpInfoAsync(player, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1744,8 +1744,8 @@ public OneSignalSDK.Server.Client.ApiResponse CreatePlayerWi /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of ApiResponse (InlineResponse2003) - public async System.Threading.Tasks.Task> CreatePlayerWithHttpInfoAsync(Player player, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of ApiResponse (InlineResponse2005) + public async System.Threading.Tasks.Task> CreatePlayerWithHttpInfoAsync(Player player, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'player' is set if (player == null) @@ -1790,7 +1790,7 @@ public OneSignalSDK.Server.Client.ApiResponse CreatePlayerWi } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/players", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + var localVarResponse = await this.AsynchronousClient.PostAsync("/players", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { @@ -1975,10 +1975,10 @@ public OneSignalSDK.Server.Client.ApiResponse CreatePlayerWi /// The OneSignal App ID for your app. Available in Keys & IDs. /// The OneSignal player_id /// Index associated with the operation. - /// InlineResponse2004 - public InlineResponse2004 DeletePlayer(string appId, string playerId, int operationIndex = 0) + /// InlineResponse2007 + public InlineResponse2007 DeletePlayer(string appId, string playerId, int operationIndex = 0) { - OneSignalSDK.Server.Client.ApiResponse localVarResponse = DeletePlayerWithHttpInfo(appId, playerId); + OneSignalSDK.Server.Client.ApiResponse localVarResponse = DeletePlayerWithHttpInfo(appId, playerId); return localVarResponse.Data; } @@ -1989,8 +1989,8 @@ public InlineResponse2004 DeletePlayer(string appId, string playerId, int operat /// The OneSignal App ID for your app. Available in Keys & IDs. /// The OneSignal player_id /// Index associated with the operation. - /// ApiResponse of InlineResponse2004 - public OneSignalSDK.Server.Client.ApiResponse DeletePlayerWithHttpInfo(string appId, string playerId, int operationIndex = 0) + /// ApiResponse of InlineResponse2007 + public OneSignalSDK.Server.Client.ApiResponse DeletePlayerWithHttpInfo(string appId, string playerId, int operationIndex = 0) { // verify the required parameter 'appId' is set if (appId == null) @@ -2040,7 +2040,7 @@ public OneSignalSDK.Server.Client.ApiResponse DeletePlayerWi } // make the HTTP request - var localVarResponse = this.Client.Delete("/players/{player_id}", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Delete("/players/{player_id}", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("DeletePlayer", localVarResponse); @@ -2061,10 +2061,10 @@ public OneSignalSDK.Server.Client.ApiResponse DeletePlayerWi /// The OneSignal player_id /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of InlineResponse2004 - public async System.Threading.Tasks.Task DeletePlayerAsync(string appId, string playerId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of InlineResponse2007 + public async System.Threading.Tasks.Task DeletePlayerAsync(string appId, string playerId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - OneSignalSDK.Server.Client.ApiResponse localVarResponse = await DeletePlayerWithHttpInfoAsync(appId, playerId, operationIndex, cancellationToken).ConfigureAwait(false); + OneSignalSDK.Server.Client.ApiResponse localVarResponse = await DeletePlayerWithHttpInfoAsync(appId, playerId, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -2076,8 +2076,8 @@ public OneSignalSDK.Server.Client.ApiResponse DeletePlayerWi /// The OneSignal player_id /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of ApiResponse (InlineResponse2004) - public async System.Threading.Tasks.Task> DeletePlayerWithHttpInfoAsync(string appId, string playerId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of ApiResponse (InlineResponse2007) + public async System.Threading.Tasks.Task> DeletePlayerWithHttpInfoAsync(string appId, string playerId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'appId' is set if (appId == null) @@ -2128,7 +2128,7 @@ public OneSignalSDK.Server.Client.ApiResponse DeletePlayerWi } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.DeleteAsync("/players/{player_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/players/{player_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { @@ -2323,10 +2323,10 @@ public OneSignalSDK.Server.Client.ApiResponse DeleteSegments /// The app ID that you want to export devices from /// (optional) /// Index associated with the operation. - /// InlineResponse2005 - public InlineResponse2005 ExportPlayers(string appId, ExportPlayersRequestBody exportPlayersRequestBody = default(ExportPlayersRequestBody), int operationIndex = 0) + /// InlineResponse2008 + public InlineResponse2008 ExportPlayers(string appId, ExportPlayersRequestBody exportPlayersRequestBody = default(ExportPlayersRequestBody), int operationIndex = 0) { - OneSignalSDK.Server.Client.ApiResponse localVarResponse = ExportPlayersWithHttpInfo(appId, exportPlayersRequestBody); + OneSignalSDK.Server.Client.ApiResponse localVarResponse = ExportPlayersWithHttpInfo(appId, exportPlayersRequestBody); return localVarResponse.Data; } @@ -2337,8 +2337,8 @@ public OneSignalSDK.Server.Client.ApiResponse DeleteSegments /// The app ID that you want to export devices from /// (optional) /// Index associated with the operation. - /// ApiResponse of InlineResponse2005 - public OneSignalSDK.Server.Client.ApiResponse ExportPlayersWithHttpInfo(string appId, ExportPlayersRequestBody exportPlayersRequestBody = default(ExportPlayersRequestBody), int operationIndex = 0) + /// ApiResponse of InlineResponse2008 + public OneSignalSDK.Server.Client.ApiResponse ExportPlayersWithHttpInfo(string appId, ExportPlayersRequestBody exportPlayersRequestBody = default(ExportPlayersRequestBody), int operationIndex = 0) { // verify the required parameter 'appId' is set if (appId == null) @@ -2383,7 +2383,7 @@ public OneSignalSDK.Server.Client.ApiResponse DeleteSegments } // make the HTTP request - var localVarResponse = this.Client.Post("/players/csv_export?app_id={app_id}", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Post("/players/csv_export?app_id={app_id}", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("ExportPlayers", localVarResponse); @@ -2404,10 +2404,10 @@ public OneSignalSDK.Server.Client.ApiResponse DeleteSegments /// (optional) /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of InlineResponse2005 - public async System.Threading.Tasks.Task ExportPlayersAsync(string appId, ExportPlayersRequestBody exportPlayersRequestBody = default(ExportPlayersRequestBody), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of InlineResponse2008 + public async System.Threading.Tasks.Task ExportPlayersAsync(string appId, ExportPlayersRequestBody exportPlayersRequestBody = default(ExportPlayersRequestBody), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - OneSignalSDK.Server.Client.ApiResponse localVarResponse = await ExportPlayersWithHttpInfoAsync(appId, exportPlayersRequestBody, operationIndex, cancellationToken).ConfigureAwait(false); + OneSignalSDK.Server.Client.ApiResponse localVarResponse = await ExportPlayersWithHttpInfoAsync(appId, exportPlayersRequestBody, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -2419,8 +2419,8 @@ public OneSignalSDK.Server.Client.ApiResponse DeleteSegments /// (optional) /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of ApiResponse (InlineResponse2005) - public async System.Threading.Tasks.Task> ExportPlayersWithHttpInfoAsync(string appId, ExportPlayersRequestBody exportPlayersRequestBody = default(ExportPlayersRequestBody), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of ApiResponse (InlineResponse2008) + public async System.Threading.Tasks.Task> ExportPlayersWithHttpInfoAsync(string appId, ExportPlayersRequestBody exportPlayersRequestBody = default(ExportPlayersRequestBody), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'appId' is set if (appId == null) @@ -2466,7 +2466,7 @@ public OneSignalSDK.Server.Client.ApiResponse DeleteSegments } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/players/csv_export?app_id={app_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + var localVarResponse = await this.AsynchronousClient.PostAsync("/players/csv_export?app_id={app_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { diff --git a/src/OneSignalSDK.Server/Client/ApiClient.cs b/src/OneSignalSDK.Server/Client/ApiClient.cs index d18a38f..4a406da 100644 --- a/src/OneSignalSDK.Server/Client/ApiClient.cs +++ b/src/OneSignalSDK.Server/Client/ApiClient.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.0.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -302,8 +302,11 @@ private RestRequest NewRequest( } } + // Always add the One Signal telemetry to the request. + request.AddHeader("OS-Usage-Data", "kind=sdk, name=onesignal-dotnet, version=1.0.1"); + if (configuration.DefaultHeaders != null) - { + { foreach (var headerParam in configuration.DefaultHeaders) { request.AddHeader(headerParam.Key, headerParam.Value); @@ -512,6 +515,10 @@ private ApiResponse Exec(RestRequest req, RequestOptions options, IReadabl { response.Data = (T)(object)new MemoryStream(response.RawBytes); } + else if (typeof(T).Name == "Byte[]") // for byte response + { + response.Data = (T)(object)response.RawBytes; + } InterceptResponse(req, response); @@ -625,6 +632,10 @@ private ApiResponse Exec(RestRequest req, RequestOptions options, IReadabl { response.Data = (T)(object)new MemoryStream(response.RawBytes); } + else if (typeof(T).Name == "Byte[]") // for byte response + { + response.Data = (T)(object)response.RawBytes; + } InterceptResponse(req, response); diff --git a/src/OneSignalSDK.Server/Client/ApiException.cs b/src/OneSignalSDK.Server/Client/ApiException.cs index 97cca27..fd00a74 100644 --- a/src/OneSignalSDK.Server/Client/ApiException.cs +++ b/src/OneSignalSDK.Server/Client/ApiException.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.0.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalSDK.Server/Client/ApiResponse.cs b/src/OneSignalSDK.Server/Client/ApiResponse.cs index 49d616b..9b8c2b8 100644 --- a/src/OneSignalSDK.Server/Client/ApiResponse.cs +++ b/src/OneSignalSDK.Server/Client/ApiResponse.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.0.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalSDK.Server/Client/ClientUtils.cs b/src/OneSignalSDK.Server/Client/ClientUtils.cs index 758f4d4..85ad8cf 100644 --- a/src/OneSignalSDK.Server/Client/ClientUtils.cs +++ b/src/OneSignalSDK.Server/Client/ClientUtils.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.0.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalSDK.Server/Client/Configuration.cs b/src/OneSignalSDK.Server/Client/Configuration.cs index bac0710..164a37b 100644 --- a/src/OneSignalSDK.Server/Client/Configuration.cs +++ b/src/OneSignalSDK.Server/Client/Configuration.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.0.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -32,7 +32,7 @@ public class Configuration : IReadableConfiguration /// Version of the package. /// /// Version of the package. - public const string Version = "1.0.2"; + public const string Version = "1.0.1"; /// /// Identifier for ISO 8601 DateTime Format @@ -109,7 +109,7 @@ public class Configuration : IReadableConfiguration public Configuration() { Proxy = null; - UserAgent = "OpenAPI-Generator/1.0.2/csharp"; + UserAgent = "OpenAPI-Generator/1.0.1/csharp"; BasePath = "https://onesignal.com/api/v1"; DefaultHeaders = new ConcurrentDictionary(); ApiKey = new ConcurrentDictionary(); @@ -516,8 +516,8 @@ public static string ToDebugReport() string report = "C# SDK (OneSignalSDK.Server) Debug Report:\n"; report += " OS: " + System.Environment.OSVersion + "\n"; report += " .NET Framework Version: " + System.Environment.Version + "\n"; - report += " Version of the API: 1.0.2\n"; - report += " SDK Package Version: 1.0.2\n"; + report += " Version of the API: 1.0.1\n"; + report += " SDK Package Version: 1.0.1\n"; return report; } diff --git a/src/OneSignalSDK.Server/Client/ExceptionFactory.cs b/src/OneSignalSDK.Server/Client/ExceptionFactory.cs index 7066733..ef2647e 100644 --- a/src/OneSignalSDK.Server/Client/ExceptionFactory.cs +++ b/src/OneSignalSDK.Server/Client/ExceptionFactory.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.0.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalSDK.Server/Client/GlobalConfiguration.cs b/src/OneSignalSDK.Server/Client/GlobalConfiguration.cs index ba654e6..bcb569a 100644 --- a/src/OneSignalSDK.Server/Client/GlobalConfiguration.cs +++ b/src/OneSignalSDK.Server/Client/GlobalConfiguration.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.0.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalSDK.Server/Client/HttpMethod.cs b/src/OneSignalSDK.Server/Client/HttpMethod.cs index b8e03df..2111dbc 100644 --- a/src/OneSignalSDK.Server/Client/HttpMethod.cs +++ b/src/OneSignalSDK.Server/Client/HttpMethod.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.0.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalSDK.Server/Client/IApiAccessor.cs b/src/OneSignalSDK.Server/Client/IApiAccessor.cs index d944436..494cb43 100644 --- a/src/OneSignalSDK.Server/Client/IApiAccessor.cs +++ b/src/OneSignalSDK.Server/Client/IApiAccessor.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.0.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalSDK.Server/Client/IAsynchronousClient.cs b/src/OneSignalSDK.Server/Client/IAsynchronousClient.cs index 0b71665..8a980a3 100644 --- a/src/OneSignalSDK.Server/Client/IAsynchronousClient.cs +++ b/src/OneSignalSDK.Server/Client/IAsynchronousClient.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.0.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalSDK.Server/Client/IReadableConfiguration.cs b/src/OneSignalSDK.Server/Client/IReadableConfiguration.cs index 9aae533..6299dc0 100644 --- a/src/OneSignalSDK.Server/Client/IReadableConfiguration.cs +++ b/src/OneSignalSDK.Server/Client/IReadableConfiguration.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.0.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalSDK.Server/Client/ISynchronousClient.cs b/src/OneSignalSDK.Server/Client/ISynchronousClient.cs index 7568833..969a999 100644 --- a/src/OneSignalSDK.Server/Client/ISynchronousClient.cs +++ b/src/OneSignalSDK.Server/Client/ISynchronousClient.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.0.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalSDK.Server/Client/Multimap.cs b/src/OneSignalSDK.Server/Client/Multimap.cs index 543cda4..dc8e676 100644 --- a/src/OneSignalSDK.Server/Client/Multimap.cs +++ b/src/OneSignalSDK.Server/Client/Multimap.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.0.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalSDK.Server/Client/OpenAPIDateConverter.cs b/src/OneSignalSDK.Server/Client/OpenAPIDateConverter.cs index 993fc7f..3a7958a 100644 --- a/src/OneSignalSDK.Server/Client/OpenAPIDateConverter.cs +++ b/src/OneSignalSDK.Server/Client/OpenAPIDateConverter.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.0.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalSDK.Server/Client/RequestOptions.cs b/src/OneSignalSDK.Server/Client/RequestOptions.cs index bae2914..2a7a8ab 100644 --- a/src/OneSignalSDK.Server/Client/RequestOptions.cs +++ b/src/OneSignalSDK.Server/Client/RequestOptions.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.0.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalSDK.Server/Client/RetryConfiguration.cs b/src/OneSignalSDK.Server/Client/RetryConfiguration.cs index 65a155f..1063c51 100644 --- a/src/OneSignalSDK.Server/Client/RetryConfiguration.cs +++ b/src/OneSignalSDK.Server/Client/RetryConfiguration.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.0.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalSDK.Server/Model/AbstractOpenAPISchema.cs b/src/OneSignalSDK.Server/Model/AbstractOpenAPISchema.cs index 53d9aac..3893402 100644 --- a/src/OneSignalSDK.Server/Model/AbstractOpenAPISchema.cs +++ b/src/OneSignalSDK.Server/Model/AbstractOpenAPISchema.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.0.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalSDK.Server/Model/App.cs b/src/OneSignalSDK.Server/Model/App.cs index e754222..6a03344 100644 --- a/src/OneSignalSDK.Server/Model/App.cs +++ b/src/OneSignalSDK.Server/Model/App.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.0.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalSDK.Server/Model/Button.cs b/src/OneSignalSDK.Server/Model/Button.cs index 8308ad0..c59f61e 100644 --- a/src/OneSignalSDK.Server/Model/Button.cs +++ b/src/OneSignalSDK.Server/Model/Button.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.0.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalSDK.Server/Model/DateTimeOrLong.cs b/src/OneSignalSDK.Server/Model/DateTimeOrLong.cs deleted file mode 100644 index ec497cf..0000000 --- a/src/OneSignalSDK.Server/Model/DateTimeOrLong.cs +++ /dev/null @@ -1,302 +0,0 @@ -/* - * OneSignal - * - * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com - * - * The version of the OpenAPI document: 1.0.2 - * Contact: devrel@onesignal.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = OneSignalSDK.Server.Client.OpenAPIDateConverter; -using System.Reflection; - -namespace OneSignalSDK.Server.Model -{ - /// - /// DateTimeOrLong - /// - [JsonConverter(typeof(DateTimeOrLongJsonConverter))] - [DataContract(Name = "DateTimeOrLong")] - public partial class DateTimeOrLong : AbstractOpenAPISchema, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of DateTime. - public DateTimeOrLong(DateTime actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance; - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of long. - public DateTimeOrLong(long actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance; - } - - - private Object _actualInstance; - - /// - /// Gets or Sets ActualInstance - /// - public override Object ActualInstance - { - get - { - return _actualInstance; - } - set - { - if (value.GetType() == typeof(DateTime)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(long)) - { - this._actualInstance = value; - } - else - { - throw new ArgumentException("Invalid instance found. Must be the following types: DateTime, long"); - } - } - } - - /// - /// Get the actual instance of `DateTime`. If the actual instance is not `DateTime`, - /// the InvalidClassException will be thrown - /// - /// An instance of DateTime - public DateTime GetDateTime() - { - return (DateTime)this.ActualInstance; - } - - /// - /// Get the actual instance of `long`. If the actual instance is not `long`, - /// the InvalidClassException will be thrown - /// - /// An instance of long - public long GetLong() - { - return (long)this.ActualInstance; - } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class DateTimeOrLong {\n"); - sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return JsonConvert.SerializeObject(this.ActualInstance, DateTimeOrLong.SerializerSettings); - } - - /// - /// Converts the JSON string into an instance of DateTimeOrLong - /// - /// JSON string - /// An instance of DateTimeOrLong - public static DateTimeOrLong FromJson(string jsonString) - { - DateTimeOrLong newDateTimeOrLong = null; - - if (string.IsNullOrEmpty(jsonString)) - { - return newDateTimeOrLong; - } - int match = 0; - List matchedTypes = new List(); - - try - { - // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize - if (typeof(DateTime).GetProperty("AdditionalProperties") == null) - { - newDateTimeOrLong = new DateTimeOrLong(JsonConvert.DeserializeObject(jsonString, DateTimeOrLong.SerializerSettings)); - } - else - { - newDateTimeOrLong = new DateTimeOrLong(JsonConvert.DeserializeObject(jsonString, DateTimeOrLong.AdditionalPropertiesSerializerSettings)); - } - matchedTypes.Add("DateTime"); - match++; - } - catch (Exception exception) - { - // deserialization failed, try the next one - System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into DateTime: {1}", jsonString, exception.ToString())); - } - - try - { - // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize - if (typeof(long).GetProperty("AdditionalProperties") == null) - { - newDateTimeOrLong = new DateTimeOrLong(JsonConvert.DeserializeObject(jsonString, DateTimeOrLong.SerializerSettings)); - } - else - { - newDateTimeOrLong = new DateTimeOrLong(JsonConvert.DeserializeObject(jsonString, DateTimeOrLong.AdditionalPropertiesSerializerSettings)); - } - matchedTypes.Add("long"); - match++; - } - catch (Exception exception) - { - // deserialization failed, try the next one - System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into long: {1}", jsonString, exception.ToString())); - } - - if (match == 0) - { - throw new InvalidDataException("The JSON string `" + jsonString + "` cannot be deserialized into any schema defined."); - } - else if (match > 1) - { - throw new InvalidDataException("The JSON string `" + jsonString + "` incorrectly matches more than one schema (should be exactly one match): " + matchedTypes); - } - - // deserialization is considered successful at this point if no exception has been thrown. - return newDateTimeOrLong; - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DateTimeOrLong); - } - - /// - /// Returns true if DateTimeOrLong instances are equal - /// - /// Instance of DateTimeOrLong to be compared - /// Boolean - public bool Equals(DateTimeOrLong input) - { - if (input == null) - return false; - - return this.ActualInstance.Equals(input.ActualInstance); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ActualInstance != null) - hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - - /// - /// Custom JSON converter for DateTimeOrLong - /// - public class DateTimeOrLongJsonConverter : JsonConverter - { - /// - /// To write the JSON string - /// - /// JSON writer - /// Object to be converted into a JSON string - /// JSON Serializer - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteRawValue((string)(typeof(DateTimeOrLong).GetMethod("ToJson").Invoke(value, null))); - } - - /// - /// To convert a JSON string into an object - /// - /// JSON reader - /// Object type - /// Existing value - /// JSON Serializer - /// The object converted from the JSON string - public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) - { - if(reader.TokenType == JsonToken.StartArray) - { - return DateTimeOrLong.FromJson(JArray.Load(reader).ToString(Formatting.None)); - } - else if(reader.TokenType == JsonToken.StartObject) - { - return DateTimeOrLong.FromJson(JObject.Load(reader).ToString(Formatting.None)); - } - else if(reader.TokenType != JsonToken.Null) - { - return DateTimeOrLong.FromJson(reader.Value.ToString()); - } - return null; - } - - /// - /// Check if the object can be converted - /// - /// Object type - /// True if the object can be converted - public override bool CanConvert(Type objectType) - { - return false; - } - } - -} diff --git a/src/OneSignalSDK.Server/Model/DeliveryData.cs b/src/OneSignalSDK.Server/Model/DeliveryData.cs index a912968..94141de 100644 --- a/src/OneSignalSDK.Server/Model/DeliveryData.cs +++ b/src/OneSignalSDK.Server/Model/DeliveryData.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.0.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -40,7 +40,7 @@ public partial class DeliveryData : IEquatable, IValidatableObject /// errored. /// converted. /// received. - public DeliveryData(int successful = default(int), int failed = default(int), int errored = default(int), int converted = default(int), int received = default(int)) + public DeliveryData(int? successful = default(int?), int? failed = default(int?), int? errored = default(int?), int? converted = default(int?), int? received = default(int?)) { this.Successful = successful; this.Failed = failed; @@ -52,32 +52,32 @@ public partial class DeliveryData : IEquatable, IValidatableObject /// /// Gets or Sets Successful /// - [DataMember(Name = "successful", EmitDefaultValue = false)] - public int Successful { get; set; } + [DataMember(Name = "successful", EmitDefaultValue = true)] + public int? Successful { get; set; } /// /// Gets or Sets Failed /// - [DataMember(Name = "failed", EmitDefaultValue = false)] - public int Failed { get; set; } + [DataMember(Name = "failed", EmitDefaultValue = true)] + public int? Failed { get; set; } /// /// Gets or Sets Errored /// - [DataMember(Name = "errored", EmitDefaultValue = false)] - public int Errored { get; set; } + [DataMember(Name = "errored", EmitDefaultValue = true)] + public int? Errored { get; set; } /// /// Gets or Sets Converted /// - [DataMember(Name = "converted", EmitDefaultValue = false)] - public int Converted { get; set; } + [DataMember(Name = "converted", EmitDefaultValue = true)] + public int? Converted { get; set; } /// /// Gets or Sets Received /// - [DataMember(Name = "received", EmitDefaultValue = false)] - public int Received { get; set; } + [DataMember(Name = "received", EmitDefaultValue = true)] + public int? Received { get; set; } /// /// Returns the string presentation of the object @@ -129,23 +129,28 @@ public bool Equals(DeliveryData input) return ( this.Successful == input.Successful || - this.Successful.Equals(input.Successful) + (this.Successful != null && + this.Successful.Equals(input.Successful)) ) && ( this.Failed == input.Failed || - this.Failed.Equals(input.Failed) + (this.Failed != null && + this.Failed.Equals(input.Failed)) ) && ( this.Errored == input.Errored || - this.Errored.Equals(input.Errored) + (this.Errored != null && + this.Errored.Equals(input.Errored)) ) && ( this.Converted == input.Converted || - this.Converted.Equals(input.Converted) + (this.Converted != null && + this.Converted.Equals(input.Converted)) ) && ( this.Received == input.Received || - this.Received.Equals(input.Received) + (this.Received != null && + this.Received.Equals(input.Received)) ); } @@ -158,11 +163,26 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Successful.GetHashCode(); - hashCode = (hashCode * 59) + this.Failed.GetHashCode(); - hashCode = (hashCode * 59) + this.Errored.GetHashCode(); - hashCode = (hashCode * 59) + this.Converted.GetHashCode(); - hashCode = (hashCode * 59) + this.Received.GetHashCode(); + if (this.Successful != null) + { + hashCode = (hashCode * 59) + this.Successful.GetHashCode(); + } + if (this.Failed != null) + { + hashCode = (hashCode * 59) + this.Failed.GetHashCode(); + } + if (this.Errored != null) + { + hashCode = (hashCode * 59) + this.Errored.GetHashCode(); + } + if (this.Converted != null) + { + hashCode = (hashCode * 59) + this.Converted.GetHashCode(); + } + if (this.Received != null) + { + hashCode = (hashCode * 59) + this.Received.GetHashCode(); + } return hashCode; } } diff --git a/src/OneSignalSDK.Server/Model/ExportPlayersRequestBody.cs b/src/OneSignalSDK.Server/Model/ExportPlayersRequestBody.cs index fb2bf7d..841061b 100644 --- a/src/OneSignalSDK.Server/Model/ExportPlayersRequestBody.cs +++ b/src/OneSignalSDK.Server/Model/ExportPlayersRequestBody.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.0.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalSDK.Server/Model/Filter.cs b/src/OneSignalSDK.Server/Model/Filter.cs index cfd64c9..79cd08d 100644 --- a/src/OneSignalSDK.Server/Model/Filter.cs +++ b/src/OneSignalSDK.Server/Model/Filter.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.0.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalSDK.Server/Model/FilterExpressions.cs b/src/OneSignalSDK.Server/Model/FilterExpressions.cs index ab78917..642f50a 100644 --- a/src/OneSignalSDK.Server/Model/FilterExpressions.cs +++ b/src/OneSignalSDK.Server/Model/FilterExpressions.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.0.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalSDK.Server/Model/FilterNotificationTarget.cs b/src/OneSignalSDK.Server/Model/FilterNotificationTarget.cs index bbdaf38..c3c829e 100644 --- a/src/OneSignalSDK.Server/Model/FilterNotificationTarget.cs +++ b/src/OneSignalSDK.Server/Model/FilterNotificationTarget.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.0.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalSDK.Server/Model/GetNotificationRequestBody.cs b/src/OneSignalSDK.Server/Model/GetNotificationRequestBody.cs index 222e3eb..b89cf11 100644 --- a/src/OneSignalSDK.Server/Model/GetNotificationRequestBody.cs +++ b/src/OneSignalSDK.Server/Model/GetNotificationRequestBody.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.0.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalSDK.Server/Model/InlineResponse200.cs b/src/OneSignalSDK.Server/Model/InlineResponse200.cs index 14811ae..74e68e5 100644 --- a/src/OneSignalSDK.Server/Model/InlineResponse200.cs +++ b/src/OneSignalSDK.Server/Model/InlineResponse200.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.0.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalSDK.Server/Model/InlineResponse2001.cs b/src/OneSignalSDK.Server/Model/InlineResponse2001.cs index 41fac42..119efc6 100644 --- a/src/OneSignalSDK.Server/Model/InlineResponse2001.cs +++ b/src/OneSignalSDK.Server/Model/InlineResponse2001.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.0.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalSDK.Server/Model/InlineResponse2002.cs b/src/OneSignalSDK.Server/Model/InlineResponse2002.cs index 47f75d9..b18caf4 100644 --- a/src/OneSignalSDK.Server/Model/InlineResponse2002.cs +++ b/src/OneSignalSDK.Server/Model/InlineResponse2002.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.0.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalSDK.Server/Model/InlineResponse2005.cs b/src/OneSignalSDK.Server/Model/InlineResponse2005.cs index a8fc23a..e16a249 100644 --- a/src/OneSignalSDK.Server/Model/InlineResponse2005.cs +++ b/src/OneSignalSDK.Server/Model/InlineResponse2005.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.0.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -35,17 +35,25 @@ public partial class InlineResponse2005 : IEquatable, IValid /// /// Initializes a new instance of the class. /// - /// csvFileUrl. - public InlineResponse2005(string csvFileUrl = default(string)) + /// success. + /// id. + public InlineResponse2005(bool success = default(bool), string id = default(string)) { - this.CsvFileUrl = csvFileUrl; + this.Success = success; + this.Id = id; } /// - /// Gets or Sets CsvFileUrl + /// Gets or Sets Success /// - [DataMember(Name = "csv_file_url", EmitDefaultValue = false)] - public string CsvFileUrl { get; set; } + [DataMember(Name = "success", EmitDefaultValue = true)] + public bool Success { get; set; } + + /// + /// Gets or Sets Id + /// + [DataMember(Name = "id", EmitDefaultValue = false)] + public string Id { get; set; } /// /// Returns the string presentation of the object @@ -55,7 +63,8 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class InlineResponse2005 {\n"); - sb.Append(" CsvFileUrl: ").Append(CsvFileUrl).Append("\n"); + sb.Append(" Success: ").Append(Success).Append("\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -92,9 +101,13 @@ public bool Equals(InlineResponse2005 input) } return ( - this.CsvFileUrl == input.CsvFileUrl || - (this.CsvFileUrl != null && - this.CsvFileUrl.Equals(input.CsvFileUrl)) + this.Success == input.Success || + this.Success.Equals(input.Success) + ) && + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) ); } @@ -107,9 +120,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.CsvFileUrl != null) + hashCode = (hashCode * 59) + this.Success.GetHashCode(); + if (this.Id != null) { - hashCode = (hashCode * 59) + this.CsvFileUrl.GetHashCode(); + hashCode = (hashCode * 59) + this.Id.GetHashCode(); } return hashCode; } diff --git a/src/OneSignalSDK.Server/Model/InlineResponse2004.cs b/src/OneSignalSDK.Server/Model/InlineResponse2007.cs similarity index 85% rename from src/OneSignalSDK.Server/Model/InlineResponse2004.cs rename to src/OneSignalSDK.Server/Model/InlineResponse2007.cs index 88f39ab..bdd6716 100644 --- a/src/OneSignalSDK.Server/Model/InlineResponse2004.cs +++ b/src/OneSignalSDK.Server/Model/InlineResponse2007.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.0.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -27,16 +27,16 @@ namespace OneSignalSDK.Server.Model { /// - /// InlineResponse2004 + /// InlineResponse2007 /// - [DataContract(Name = "inline_response_200_4")] - public partial class InlineResponse2004 : IEquatable, IValidatableObject + [DataContract(Name = "inline_response_200_7")] + public partial class InlineResponse2007 : IEquatable, IValidatableObject { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// success. - public InlineResponse2004(string success = default(string)) + public InlineResponse2007(string success = default(string)) { this.Success = success; } @@ -54,7 +54,7 @@ public partial class InlineResponse2004 : IEquatable, IValid public override string ToString() { StringBuilder sb = new StringBuilder(); - sb.Append("class InlineResponse2004 {\n"); + sb.Append("class InlineResponse2007 {\n"); sb.Append(" Success: ").Append(Success).Append("\n"); sb.Append("}\n"); return sb.ToString(); @@ -76,15 +76,15 @@ public virtual string ToJson() /// Boolean public override bool Equals(object input) { - return this.Equals(input as InlineResponse2004); + return this.Equals(input as InlineResponse2007); } /// - /// Returns true if InlineResponse2004 instances are equal + /// Returns true if InlineResponse2007 instances are equal /// - /// Instance of InlineResponse2004 to be compared + /// Instance of InlineResponse2007 to be compared /// Boolean - public bool Equals(InlineResponse2004 input) + public bool Equals(InlineResponse2007 input) { if (input == null) { diff --git a/src/OneSignalSDK.Server/Model/InlineResponse2003.cs b/src/OneSignalSDK.Server/Model/InlineResponse2008.cs similarity index 63% rename from src/OneSignalSDK.Server/Model/InlineResponse2003.cs rename to src/OneSignalSDK.Server/Model/InlineResponse2008.cs index c205787..6443a10 100644 --- a/src/OneSignalSDK.Server/Model/InlineResponse2003.cs +++ b/src/OneSignalSDK.Server/Model/InlineResponse2008.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.0.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -27,33 +27,25 @@ namespace OneSignalSDK.Server.Model { /// - /// InlineResponse2003 + /// InlineResponse2008 /// - [DataContract(Name = "inline_response_200_3")] - public partial class InlineResponse2003 : IEquatable, IValidatableObject + [DataContract(Name = "inline_response_200_8")] + public partial class InlineResponse2008 : IEquatable, IValidatableObject { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - /// success. - /// id. - public InlineResponse2003(bool success = default(bool), string id = default(string)) + /// csvFileUrl. + public InlineResponse2008(string csvFileUrl = default(string)) { - this.Success = success; - this.Id = id; + this.CsvFileUrl = csvFileUrl; } /// - /// Gets or Sets Success + /// Gets or Sets CsvFileUrl /// - [DataMember(Name = "success", EmitDefaultValue = true)] - public bool Success { get; set; } - - /// - /// Gets or Sets Id - /// - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } + [DataMember(Name = "csv_file_url", EmitDefaultValue = false)] + public string CsvFileUrl { get; set; } /// /// Returns the string presentation of the object @@ -62,9 +54,8 @@ public partial class InlineResponse2003 : IEquatable, IValid public override string ToString() { StringBuilder sb = new StringBuilder(); - sb.Append("class InlineResponse2003 {\n"); - sb.Append(" Success: ").Append(Success).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append("class InlineResponse2008 {\n"); + sb.Append(" CsvFileUrl: ").Append(CsvFileUrl).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -85,15 +76,15 @@ public virtual string ToJson() /// Boolean public override bool Equals(object input) { - return this.Equals(input as InlineResponse2003); + return this.Equals(input as InlineResponse2008); } /// - /// Returns true if InlineResponse2003 instances are equal + /// Returns true if InlineResponse2008 instances are equal /// - /// Instance of InlineResponse2003 to be compared + /// Instance of InlineResponse2008 to be compared /// Boolean - public bool Equals(InlineResponse2003 input) + public bool Equals(InlineResponse2008 input) { if (input == null) { @@ -101,13 +92,9 @@ public bool Equals(InlineResponse2003 input) } return ( - this.Success == input.Success || - this.Success.Equals(input.Success) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) + this.CsvFileUrl == input.CsvFileUrl || + (this.CsvFileUrl != null && + this.CsvFileUrl.Equals(input.CsvFileUrl)) ); } @@ -120,10 +107,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Success.GetHashCode(); - if (this.Id != null) + if (this.CsvFileUrl != null) { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); + hashCode = (hashCode * 59) + this.CsvFileUrl.GetHashCode(); } return hashCode; } diff --git a/src/OneSignalSDK.Server/Model/InlineResponse201.cs b/src/OneSignalSDK.Server/Model/InlineResponse201.cs index 9cc8b06..44855bc 100644 --- a/src/OneSignalSDK.Server/Model/InlineResponse201.cs +++ b/src/OneSignalSDK.Server/Model/InlineResponse201.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.0.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalSDK.Server/Model/InlineResponse400.cs b/src/OneSignalSDK.Server/Model/InlineResponse400.cs index f1c9087..271b10d 100644 --- a/src/OneSignalSDK.Server/Model/InlineResponse400.cs +++ b/src/OneSignalSDK.Server/Model/InlineResponse400.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.0.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalSDK.Server/Model/InlineResponse4001.cs b/src/OneSignalSDK.Server/Model/InlineResponse4001.cs index 174946c..34b5773 100644 --- a/src/OneSignalSDK.Server/Model/InlineResponse4001.cs +++ b/src/OneSignalSDK.Server/Model/InlineResponse4001.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.0.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalSDK.Server/Model/InlineResponse4002.cs b/src/OneSignalSDK.Server/Model/InlineResponse4002.cs index f939584..6a002af 100644 --- a/src/OneSignalSDK.Server/Model/InlineResponse4002.cs +++ b/src/OneSignalSDK.Server/Model/InlineResponse4002.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.0.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalSDK.Server/Model/InlineResponse4003.cs b/src/OneSignalSDK.Server/Model/InlineResponse4003.cs index 0e4c817..7814923 100644 --- a/src/OneSignalSDK.Server/Model/InlineResponse4003.cs +++ b/src/OneSignalSDK.Server/Model/InlineResponse4003.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.0.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalSDK.Server/Model/InvalidIdentifierError.cs b/src/OneSignalSDK.Server/Model/InvalidIdentifierError.cs index 7e59892..cf18a46 100644 --- a/src/OneSignalSDK.Server/Model/InvalidIdentifierError.cs +++ b/src/OneSignalSDK.Server/Model/InvalidIdentifierError.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.0.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalSDK.Server/Model/Notification.cs b/src/OneSignalSDK.Server/Model/Notification.cs index 92331c3..95693d9 100644 --- a/src/OneSignalSDK.Server/Model/Notification.cs +++ b/src/OneSignalSDK.Server/Model/Notification.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.0.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -165,7 +165,7 @@ protected Notification() { } /// Channel: Push Notifications Platform: iOS 10+, Android Only one notification with the same id will be shown on the device. Use the same id to update an existing notification instead of showing a new one. Limit of 64 characters. . /// Channel: Push Notifications Platform: All Browsers Display multiple notifications at once with different topics. . /// Channel: Push Notifications Platform: iOS 10+ iOS can localize push notification messages on the client using special parameters such as loc-key. When using the Create Notification endpoint, you must include these parameters inside of a field called apns_alert. Please see Apple's guide on localizing push notifications to learn more. . - /// sendAfter. + /// Channel: All Schedule notification for future delivery. API defaults to UTC -1100 Examples: All examples are the exact same date & time. \"Thu Sep 24 2015 14:00:00 GMT-0700 (PDT)\" \"September 24th 2015, 2:00:00 pm UTC-07:00\" \"2015-09-24 14:00:00 GMT-0700\" \"Sept 24 2015 14:00:00 GMT-0700\" \"Thu Sep 24 2015 14:00:00 GMT-0700 (Pacific Daylight Time)\" Note: SMS currently only supports send_after parameter. . /// Channel: All Possible values are: timezone (Deliver at a specific time-of-day in each users own timezone) last-active Same as Intelligent Delivery . (Deliver at the same time of day as each user last used your app). If send_after is used, this takes effect after the send_after time has elapsed. . /// Channel: All Use with delayed_option=timezone. Examples: \"9:00AM\" \"21:45\" \"9:45:30\" . /// Channel: Push Notifications Platform: iOS, Android, Chrome, Firefox, Safari, ChromeWeb Time To Live - In seconds. The notification will be expired if the device does not come back online within this time. The default is 259,200 seconds (3 days). Max value to set is 2419200 seconds (28 days). . @@ -185,7 +185,7 @@ protected Notification() { } /// Channel: Email The email address the email is from. If not specified, will default to \"from email\" set in the OneSignal Dashboard Email Settings. . /// Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format. . /// Channel: SMS URLs for the media files to be attached to the SMS content. Limit: 10 media urls with a total max. size of 5MBs. . - public Notification(List includedSegments = default(List), List excludedSegments = default(List), string lastSession = default(string), string firstSession = default(string), string sessionCount = default(string), string sessionTime = default(string), string amountSpent = default(string), string boughtSku = default(string), string tag = default(string), string language = default(string), string appVersion = default(string), string location = default(string), string email = default(string), string country = default(string), List includePlayerIds = default(List), List includeExternalUserIds = default(List), List includeEmailTokens = default(List), List includePhoneNumbers = default(List), List includeIosTokens = default(List), List includeWpWnsUris = default(List), List includeAmazonRegIds = default(List), List includeChromeRegIds = default(List), List includeChromeWebRegIds = default(List), List includeAndroidRegIds = default(List), string id = default(string), bool isIos = true, bool isAndroid = default(bool), bool isHuawei = default(bool), bool isAnyWeb = default(bool), bool isChromeWeb = default(bool), bool isFirefox = default(bool), bool isSafari = default(bool), bool isWPWNS = default(bool), bool isAdm = default(bool), bool isChrome = default(bool), string channelForExternalUserIds = default(string), string appId = default(string), string externalId = default(string), StringMap contents = default(StringMap), StringMap headings = default(StringMap), StringMap subtitle = default(StringMap), Object data = default(Object), string huaweiMsgType = default(string), string url = default(string), string webUrl = default(string), string appUrl = default(string), Object iosAttachments = default(Object), string templateId = default(string), bool? contentAvailable = default(bool?), bool mutableContent = default(bool), string targetContentIdentifier = default(string), string bigPicture = default(string), string huaweiBigPicture = default(string), string admBigPicture = default(string), string chromeBigPicture = default(string), string chromeWebImage = default(string), List /// Indicates whether to send to all devices registered under your app's Apple iOS platform. [DataMember(Name = "isIos", EmitDefaultValue = true)] - public bool IsIos { get; set; } + public bool? IsIos { get; set; } /// /// Indicates whether to send to all devices registered under your app's Google Android platform. /// /// Indicates whether to send to all devices registered under your app's Google Android platform. [DataMember(Name = "isAndroid", EmitDefaultValue = true)] - public bool IsAndroid { get; set; } + public bool? IsAndroid { get; set; } /// /// Indicates whether to send to all devices registered under your app's Huawei Android platform. /// /// Indicates whether to send to all devices registered under your app's Huawei Android platform. [DataMember(Name = "isHuawei", EmitDefaultValue = true)] - public bool IsHuawei { get; set; } + public bool? IsHuawei { get; set; } /// /// Indicates whether to send to all subscribed web browser users, including Chrome, Firefox, and Safari. You may use this instead as a combined flag instead of separately enabling isChromeWeb, isFirefox, and isSafari, though the three options are equivalent to this one. /// /// Indicates whether to send to all subscribed web browser users, including Chrome, Firefox, and Safari. You may use this instead as a combined flag instead of separately enabling isChromeWeb, isFirefox, and isSafari, though the three options are equivalent to this one. [DataMember(Name = "isAnyWeb", EmitDefaultValue = true)] - public bool IsAnyWeb { get; set; } + public bool? IsAnyWeb { get; set; } /// /// Indicates whether to send to all Google Chrome, Chrome on Android, and Mozilla Firefox users registered under your Chrome & Firefox web push platform. /// /// Indicates whether to send to all Google Chrome, Chrome on Android, and Mozilla Firefox users registered under your Chrome & Firefox web push platform. [DataMember(Name = "isChromeWeb", EmitDefaultValue = true)] - public bool IsChromeWeb { get; set; } + public bool? IsChromeWeb { get; set; } /// /// Indicates whether to send to all Mozilla Firefox desktop users registered under your Firefox web push platform. /// /// Indicates whether to send to all Mozilla Firefox desktop users registered under your Firefox web push platform. [DataMember(Name = "isFirefox", EmitDefaultValue = true)] - public bool IsFirefox { get; set; } + public bool? IsFirefox { get; set; } /// /// Does not support iOS Safari. Indicates whether to send to all Apple's Safari desktop users registered under your Safari web push platform. Read more iOS Safari /// /// Does not support iOS Safari. Indicates whether to send to all Apple's Safari desktop users registered under your Safari web push platform. Read more iOS Safari [DataMember(Name = "isSafari", EmitDefaultValue = true)] - public bool IsSafari { get; set; } + public bool? IsSafari { get; set; } /// /// Indicates whether to send to all devices registered under your app's Windows platform. /// /// Indicates whether to send to all devices registered under your app's Windows platform. [DataMember(Name = "isWP_WNS", EmitDefaultValue = true)] - public bool IsWPWNS { get; set; } + public bool? IsWPWNS { get; set; } /// /// Indicates whether to send to all devices registered under your app's Amazon Fire platform. /// /// Indicates whether to send to all devices registered under your app's Amazon Fire platform. [DataMember(Name = "isAdm", EmitDefaultValue = true)] - public bool IsAdm { get; set; } + public bool? IsAdm { get; set; } /// /// This flag is not used for web push Please see isChromeWeb for sending to web push users. This flag only applies to Google Chrome Apps & Extensions. Indicates whether to send to all devices registered under your app's Google Chrome Apps & Extension platform. /// /// This flag is not used for web push Please see isChromeWeb for sending to web push users. This flag only applies to Google Chrome Apps & Extensions. Indicates whether to send to all devices registered under your app's Google Chrome Apps & Extension platform. [DataMember(Name = "isChrome", EmitDefaultValue = true)] - public bool IsChrome { get; set; } + public bool? IsChrome { get; set; } /// /// Indicates if the message type when targeting with include_external_user_ids for cases where an email, sms, and/or push subscribers have the same external user id. Example: Use the string \"push\" to indicate you are sending a push notification or the string \"email\"for sending emails or \"sms\"for sending SMS. @@ -944,10 +945,11 @@ public bool ShouldSerializeValue() public Object ApnsAlert { get; set; } /// - /// Gets or Sets SendAfter + /// Channel: All Schedule notification for future delivery. API defaults to UTC -1100 Examples: All examples are the exact same date & time. \"Thu Sep 24 2015 14:00:00 GMT-0700 (PDT)\" \"September 24th 2015, 2:00:00 pm UTC-07:00\" \"2015-09-24 14:00:00 GMT-0700\" \"Sept 24 2015 14:00:00 GMT-0700\" \"Thu Sep 24 2015 14:00:00 GMT-0700 (Pacific Daylight Time)\" Note: SMS currently only supports send_after parameter. /// + /// Channel: All Schedule notification for future delivery. API defaults to UTC -1100 Examples: All examples are the exact same date & time. \"Thu Sep 24 2015 14:00:00 GMT-0700 (PDT)\" \"September 24th 2015, 2:00:00 pm UTC-07:00\" \"2015-09-24 14:00:00 GMT-0700\" \"Sept 24 2015 14:00:00 GMT-0700\" \"Thu Sep 24 2015 14:00:00 GMT-0700 (Pacific Daylight Time)\" Note: SMS currently only supports send_after parameter. [DataMember(Name = "send_after", EmitDefaultValue = false)] - public DateTimeOrLong SendAfter { get; set; } + public DateTime SendAfter { get; set; } /// /// Channel: All Possible values are: timezone (Deliver at a specific time-of-day in each users own timezone) last-active Same as Intelligent Delivery . (Deliver at the same time of day as each user last used your app). If send_after is used, this takes effect after the send_after time has elapsed. @@ -1384,43 +1386,53 @@ public bool Equals(Notification input) ) && ( this.IsIos == input.IsIos || - this.IsIos.Equals(input.IsIos) + (this.IsIos != null && + this.IsIos.Equals(input.IsIos)) ) && ( this.IsAndroid == input.IsAndroid || - this.IsAndroid.Equals(input.IsAndroid) + (this.IsAndroid != null && + this.IsAndroid.Equals(input.IsAndroid)) ) && ( this.IsHuawei == input.IsHuawei || - this.IsHuawei.Equals(input.IsHuawei) + (this.IsHuawei != null && + this.IsHuawei.Equals(input.IsHuawei)) ) && ( this.IsAnyWeb == input.IsAnyWeb || - this.IsAnyWeb.Equals(input.IsAnyWeb) + (this.IsAnyWeb != null && + this.IsAnyWeb.Equals(input.IsAnyWeb)) ) && ( this.IsChromeWeb == input.IsChromeWeb || - this.IsChromeWeb.Equals(input.IsChromeWeb) + (this.IsChromeWeb != null && + this.IsChromeWeb.Equals(input.IsChromeWeb)) ) && ( this.IsFirefox == input.IsFirefox || - this.IsFirefox.Equals(input.IsFirefox) + (this.IsFirefox != null && + this.IsFirefox.Equals(input.IsFirefox)) ) && ( this.IsSafari == input.IsSafari || - this.IsSafari.Equals(input.IsSafari) + (this.IsSafari != null && + this.IsSafari.Equals(input.IsSafari)) ) && ( this.IsWPWNS == input.IsWPWNS || - this.IsWPWNS.Equals(input.IsWPWNS) + (this.IsWPWNS != null && + this.IsWPWNS.Equals(input.IsWPWNS)) ) && ( this.IsAdm == input.IsAdm || - this.IsAdm.Equals(input.IsAdm) + (this.IsAdm != null && + this.IsAdm.Equals(input.IsAdm)) ) && ( this.IsChrome == input.IsChrome || - this.IsChrome.Equals(input.IsChrome) + (this.IsChrome != null && + this.IsChrome.Equals(input.IsChrome)) ) && ( this.ChannelForExternalUserIds == input.ChannelForExternalUserIds || @@ -1911,16 +1923,46 @@ public override int GetHashCode() } hashCode = (hashCode * 59) + this.Value.GetHashCode(); hashCode = (hashCode * 59) + this.Aggregation.GetHashCode(); - hashCode = (hashCode * 59) + this.IsIos.GetHashCode(); - hashCode = (hashCode * 59) + this.IsAndroid.GetHashCode(); - hashCode = (hashCode * 59) + this.IsHuawei.GetHashCode(); - hashCode = (hashCode * 59) + this.IsAnyWeb.GetHashCode(); - hashCode = (hashCode * 59) + this.IsChromeWeb.GetHashCode(); - hashCode = (hashCode * 59) + this.IsFirefox.GetHashCode(); - hashCode = (hashCode * 59) + this.IsSafari.GetHashCode(); - hashCode = (hashCode * 59) + this.IsWPWNS.GetHashCode(); - hashCode = (hashCode * 59) + this.IsAdm.GetHashCode(); - hashCode = (hashCode * 59) + this.IsChrome.GetHashCode(); + if (this.IsIos != null) + { + hashCode = (hashCode * 59) + this.IsIos.GetHashCode(); + } + if (this.IsAndroid != null) + { + hashCode = (hashCode * 59) + this.IsAndroid.GetHashCode(); + } + if (this.IsHuawei != null) + { + hashCode = (hashCode * 59) + this.IsHuawei.GetHashCode(); + } + if (this.IsAnyWeb != null) + { + hashCode = (hashCode * 59) + this.IsAnyWeb.GetHashCode(); + } + if (this.IsChromeWeb != null) + { + hashCode = (hashCode * 59) + this.IsChromeWeb.GetHashCode(); + } + if (this.IsFirefox != null) + { + hashCode = (hashCode * 59) + this.IsFirefox.GetHashCode(); + } + if (this.IsSafari != null) + { + hashCode = (hashCode * 59) + this.IsSafari.GetHashCode(); + } + if (this.IsWPWNS != null) + { + hashCode = (hashCode * 59) + this.IsWPWNS.GetHashCode(); + } + if (this.IsAdm != null) + { + hashCode = (hashCode * 59) + this.IsAdm.GetHashCode(); + } + if (this.IsChrome != null) + { + hashCode = (hashCode * 59) + this.IsChrome.GetHashCode(); + } if (this.ChannelForExternalUserIds != null) { hashCode = (hashCode * 59) + this.ChannelForExternalUserIds.GetHashCode(); diff --git a/src/OneSignalSDK.Server/Model/Notification200Errors.cs b/src/OneSignalSDK.Server/Model/Notification200Errors.cs index 79a9fb3..385349c 100644 --- a/src/OneSignalSDK.Server/Model/Notification200Errors.cs +++ b/src/OneSignalSDK.Server/Model/Notification200Errors.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.0.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -273,18 +273,19 @@ public override void WriteJson(JsonWriter writer, object value, JsonSerializer s /// The object converted from the JSON string public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) { - if(reader.TokenType == JsonToken.StartArray) + if(reader.TokenType == JsonToken.StartObject) { - return Notification200Errors.FromJson(JArray.Load(reader).ToString(Formatting.None)); + return Notification200Errors.FromJson(JObject.Load(reader).ToString(Formatting.None)); } - else if(reader.TokenType == JsonToken.StartObject) + else if(reader.TokenType == JsonToken.StartArray) { - return Notification200Errors.FromJson(JObject.Load(reader).ToString(Formatting.None)); + return Notification200Errors.FromJson(JArray.Load(reader).ToString(Formatting.None)); } else if(reader.TokenType != JsonToken.Null) { return Notification200Errors.FromJson(reader.Value.ToString()); } + return null; } diff --git a/src/OneSignalSDK.Server/Model/NotificationAllOf.cs b/src/OneSignalSDK.Server/Model/NotificationAllOf.cs index 64637cd..44fca68 100644 --- a/src/OneSignalSDK.Server/Model/NotificationAllOf.cs +++ b/src/OneSignalSDK.Server/Model/NotificationAllOf.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.0.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -136,7 +136,7 @@ public bool ShouldSerializeAggregation() /// Channel: Push Notifications Platform: iOS 10+, Android Only one notification with the same id will be shown on the device. Use the same id to update an existing notification instead of showing a new one. Limit of 64 characters. . /// Channel: Push Notifications Platform: All Browsers Display multiple notifications at once with different topics. . /// Channel: Push Notifications Platform: iOS 10+ iOS can localize push notification messages on the client using special parameters such as loc-key. When using the Create Notification endpoint, you must include these parameters inside of a field called apns_alert. Please see Apple's guide on localizing push notifications to learn more. . - /// sendAfter. + /// Channel: All Schedule notification for future delivery. API defaults to UTC -1100 Examples: All examples are the exact same date & time. \"Thu Sep 24 2015 14:00:00 GMT-0700 (PDT)\" \"September 24th 2015, 2:00:00 pm UTC-07:00\" \"2015-09-24 14:00:00 GMT-0700\" \"Sept 24 2015 14:00:00 GMT-0700\" \"Thu Sep 24 2015 14:00:00 GMT-0700 (Pacific Daylight Time)\" Note: SMS currently only supports send_after parameter. . /// Channel: All Possible values are: timezone (Deliver at a specific time-of-day in each users own timezone) last-active Same as Intelligent Delivery . (Deliver at the same time of day as each user last used your app). If send_after is used, this takes effect after the send_after time has elapsed. . /// Channel: All Use with delayed_option=timezone. Examples: \"9:00AM\" \"21:45\" \"9:45:30\" . /// Channel: Push Notifications Platform: iOS, Android, Chrome, Firefox, Safari, ChromeWeb Time To Live - In seconds. The notification will be expired if the device does not come back online within this time. The default is 259,200 seconds (3 days). Max value to set is 2419200 seconds (28 days). . @@ -156,10 +156,11 @@ public bool ShouldSerializeAggregation() /// Channel: Email The email address the email is from. If not specified, will default to \"from email\" set in the OneSignal Dashboard Email Settings. . /// Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format. . /// Channel: SMS URLs for the media files to be attached to the SMS content. Limit: 10 media urls with a total max. size of 5MBs. . - public NotificationAllOf(string id = default(string), bool isIos = true, bool isAndroid = default(bool), bool isHuawei = default(bool), bool isAnyWeb = default(bool), bool isChromeWeb = default(bool), bool isFirefox = default(bool), bool isSafari = default(bool), bool isWPWNS = default(bool), bool isAdm = default(bool), bool isChrome = default(bool), string channelForExternalUserIds = default(string), string appId = default(string), string externalId = default(string), StringMap contents = default(StringMap), StringMap headings = default(StringMap), StringMap subtitle = default(StringMap), Object data = default(Object), string huaweiMsgType = default(string), string url = default(string), string webUrl = default(string), string appUrl = default(string), Object iosAttachments = default(Object), string templateId = default(string), bool? contentAvailable = default(bool?), bool mutableContent = default(bool), string targetContentIdentifier = default(string), string bigPicture = default(string), string huaweiBigPicture = default(string), string admBigPicture = default(string), string chromeBigPicture = default(string), string chromeWebImage = default(string), List /// Indicates whether to send to all devices registered under your app's Apple iOS platform. [DataMember(Name = "isIos", EmitDefaultValue = true)] - public bool IsIos { get; set; } + public bool? IsIos { get; set; } /// /// Indicates whether to send to all devices registered under your app's Google Android platform. /// /// Indicates whether to send to all devices registered under your app's Google Android platform. [DataMember(Name = "isAndroid", EmitDefaultValue = true)] - public bool IsAndroid { get; set; } + public bool? IsAndroid { get; set; } /// /// Indicates whether to send to all devices registered under your app's Huawei Android platform. /// /// Indicates whether to send to all devices registered under your app's Huawei Android platform. [DataMember(Name = "isHuawei", EmitDefaultValue = true)] - public bool IsHuawei { get; set; } + public bool? IsHuawei { get; set; } /// /// Indicates whether to send to all subscribed web browser users, including Chrome, Firefox, and Safari. You may use this instead as a combined flag instead of separately enabling isChromeWeb, isFirefox, and isSafari, though the three options are equivalent to this one. /// /// Indicates whether to send to all subscribed web browser users, including Chrome, Firefox, and Safari. You may use this instead as a combined flag instead of separately enabling isChromeWeb, isFirefox, and isSafari, though the three options are equivalent to this one. [DataMember(Name = "isAnyWeb", EmitDefaultValue = true)] - public bool IsAnyWeb { get; set; } + public bool? IsAnyWeb { get; set; } /// /// Indicates whether to send to all Google Chrome, Chrome on Android, and Mozilla Firefox users registered under your Chrome & Firefox web push platform. /// /// Indicates whether to send to all Google Chrome, Chrome on Android, and Mozilla Firefox users registered under your Chrome & Firefox web push platform. [DataMember(Name = "isChromeWeb", EmitDefaultValue = true)] - public bool IsChromeWeb { get; set; } + public bool? IsChromeWeb { get; set; } /// /// Indicates whether to send to all Mozilla Firefox desktop users registered under your Firefox web push platform. /// /// Indicates whether to send to all Mozilla Firefox desktop users registered under your Firefox web push platform. [DataMember(Name = "isFirefox", EmitDefaultValue = true)] - public bool IsFirefox { get; set; } + public bool? IsFirefox { get; set; } /// /// Does not support iOS Safari. Indicates whether to send to all Apple's Safari desktop users registered under your Safari web push platform. Read more iOS Safari /// /// Does not support iOS Safari. Indicates whether to send to all Apple's Safari desktop users registered under your Safari web push platform. Read more iOS Safari [DataMember(Name = "isSafari", EmitDefaultValue = true)] - public bool IsSafari { get; set; } + public bool? IsSafari { get; set; } /// /// Indicates whether to send to all devices registered under your app's Windows platform. /// /// Indicates whether to send to all devices registered under your app's Windows platform. [DataMember(Name = "isWP_WNS", EmitDefaultValue = true)] - public bool IsWPWNS { get; set; } + public bool? IsWPWNS { get; set; } /// /// Indicates whether to send to all devices registered under your app's Amazon Fire platform. /// /// Indicates whether to send to all devices registered under your app's Amazon Fire platform. [DataMember(Name = "isAdm", EmitDefaultValue = true)] - public bool IsAdm { get; set; } + public bool? IsAdm { get; set; } /// /// This flag is not used for web push Please see isChromeWeb for sending to web push users. This flag only applies to Google Chrome Apps & Extensions. Indicates whether to send to all devices registered under your app's Google Chrome Apps & Extension platform. /// /// This flag is not used for web push Please see isChromeWeb for sending to web push users. This flag only applies to Google Chrome Apps & Extensions. Indicates whether to send to all devices registered under your app's Google Chrome Apps & Extension platform. [DataMember(Name = "isChrome", EmitDefaultValue = true)] - public bool IsChrome { get; set; } + public bool? IsChrome { get; set; } /// /// Indicates if the message type when targeting with include_external_user_ids for cases where an email, sms, and/or push subscribers have the same external user id. Example: Use the string \"push\" to indicate you are sending a push notification or the string \"email\"for sending emails or \"sms\"for sending SMS. @@ -718,10 +719,11 @@ public bool ShouldSerializeValue() public Object ApnsAlert { get; set; } /// - /// Gets or Sets SendAfter + /// Channel: All Schedule notification for future delivery. API defaults to UTC -1100 Examples: All examples are the exact same date & time. \"Thu Sep 24 2015 14:00:00 GMT-0700 (PDT)\" \"September 24th 2015, 2:00:00 pm UTC-07:00\" \"2015-09-24 14:00:00 GMT-0700\" \"Sept 24 2015 14:00:00 GMT-0700\" \"Thu Sep 24 2015 14:00:00 GMT-0700 (Pacific Daylight Time)\" Note: SMS currently only supports send_after parameter. /// + /// Channel: All Schedule notification for future delivery. API defaults to UTC -1100 Examples: All examples are the exact same date & time. \"Thu Sep 24 2015 14:00:00 GMT-0700 (PDT)\" \"September 24th 2015, 2:00:00 pm UTC-07:00\" \"2015-09-24 14:00:00 GMT-0700\" \"Sept 24 2015 14:00:00 GMT-0700\" \"Thu Sep 24 2015 14:00:00 GMT-0700 (Pacific Daylight Time)\" Note: SMS currently only supports send_after parameter. [DataMember(Name = "send_after", EmitDefaultValue = false)] - public DateTimeOrLong SendAfter { get; set; } + public DateTime SendAfter { get; set; } /// /// Channel: All Possible values are: timezone (Deliver at a specific time-of-day in each users own timezone) last-active Same as Intelligent Delivery . (Deliver at the same time of day as each user last used your app). If send_after is used, this takes effect after the send_after time has elapsed. @@ -1002,43 +1004,53 @@ public bool Equals(NotificationAllOf input) ) && ( this.IsIos == input.IsIos || - this.IsIos.Equals(input.IsIos) + (this.IsIos != null && + this.IsIos.Equals(input.IsIos)) ) && ( this.IsAndroid == input.IsAndroid || - this.IsAndroid.Equals(input.IsAndroid) + (this.IsAndroid != null && + this.IsAndroid.Equals(input.IsAndroid)) ) && ( this.IsHuawei == input.IsHuawei || - this.IsHuawei.Equals(input.IsHuawei) + (this.IsHuawei != null && + this.IsHuawei.Equals(input.IsHuawei)) ) && ( this.IsAnyWeb == input.IsAnyWeb || - this.IsAnyWeb.Equals(input.IsAnyWeb) + (this.IsAnyWeb != null && + this.IsAnyWeb.Equals(input.IsAnyWeb)) ) && ( this.IsChromeWeb == input.IsChromeWeb || - this.IsChromeWeb.Equals(input.IsChromeWeb) + (this.IsChromeWeb != null && + this.IsChromeWeb.Equals(input.IsChromeWeb)) ) && ( this.IsFirefox == input.IsFirefox || - this.IsFirefox.Equals(input.IsFirefox) + (this.IsFirefox != null && + this.IsFirefox.Equals(input.IsFirefox)) ) && ( this.IsSafari == input.IsSafari || - this.IsSafari.Equals(input.IsSafari) + (this.IsSafari != null && + this.IsSafari.Equals(input.IsSafari)) ) && ( this.IsWPWNS == input.IsWPWNS || - this.IsWPWNS.Equals(input.IsWPWNS) + (this.IsWPWNS != null && + this.IsWPWNS.Equals(input.IsWPWNS)) ) && ( this.IsAdm == input.IsAdm || - this.IsAdm.Equals(input.IsAdm) + (this.IsAdm != null && + this.IsAdm.Equals(input.IsAdm)) ) && ( this.IsChrome == input.IsChrome || - this.IsChrome.Equals(input.IsChrome) + (this.IsChrome != null && + this.IsChrome.Equals(input.IsChrome)) ) && ( this.ChannelForExternalUserIds == input.ChannelForExternalUserIds || @@ -1433,16 +1445,46 @@ public override int GetHashCode() } hashCode = (hashCode * 59) + this.Value.GetHashCode(); hashCode = (hashCode * 59) + this.Aggregation.GetHashCode(); - hashCode = (hashCode * 59) + this.IsIos.GetHashCode(); - hashCode = (hashCode * 59) + this.IsAndroid.GetHashCode(); - hashCode = (hashCode * 59) + this.IsHuawei.GetHashCode(); - hashCode = (hashCode * 59) + this.IsAnyWeb.GetHashCode(); - hashCode = (hashCode * 59) + this.IsChromeWeb.GetHashCode(); - hashCode = (hashCode * 59) + this.IsFirefox.GetHashCode(); - hashCode = (hashCode * 59) + this.IsSafari.GetHashCode(); - hashCode = (hashCode * 59) + this.IsWPWNS.GetHashCode(); - hashCode = (hashCode * 59) + this.IsAdm.GetHashCode(); - hashCode = (hashCode * 59) + this.IsChrome.GetHashCode(); + if (this.IsIos != null) + { + hashCode = (hashCode * 59) + this.IsIos.GetHashCode(); + } + if (this.IsAndroid != null) + { + hashCode = (hashCode * 59) + this.IsAndroid.GetHashCode(); + } + if (this.IsHuawei != null) + { + hashCode = (hashCode * 59) + this.IsHuawei.GetHashCode(); + } + if (this.IsAnyWeb != null) + { + hashCode = (hashCode * 59) + this.IsAnyWeb.GetHashCode(); + } + if (this.IsChromeWeb != null) + { + hashCode = (hashCode * 59) + this.IsChromeWeb.GetHashCode(); + } + if (this.IsFirefox != null) + { + hashCode = (hashCode * 59) + this.IsFirefox.GetHashCode(); + } + if (this.IsSafari != null) + { + hashCode = (hashCode * 59) + this.IsSafari.GetHashCode(); + } + if (this.IsWPWNS != null) + { + hashCode = (hashCode * 59) + this.IsWPWNS.GetHashCode(); + } + if (this.IsAdm != null) + { + hashCode = (hashCode * 59) + this.IsAdm.GetHashCode(); + } + if (this.IsChrome != null) + { + hashCode = (hashCode * 59) + this.IsChrome.GetHashCode(); + } if (this.ChannelForExternalUserIds != null) { hashCode = (hashCode * 59) + this.ChannelForExternalUserIds.GetHashCode(); diff --git a/src/OneSignalSDK.Server/Model/NotificationAllOfAndroidBackgroundLayout.cs b/src/OneSignalSDK.Server/Model/NotificationAllOfAndroidBackgroundLayout.cs index 07b787c..110007c 100644 --- a/src/OneSignalSDK.Server/Model/NotificationAllOfAndroidBackgroundLayout.cs +++ b/src/OneSignalSDK.Server/Model/NotificationAllOfAndroidBackgroundLayout.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.0.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalSDK.Server/Model/NotificationSlice.cs b/src/OneSignalSDK.Server/Model/NotificationSlice.cs index 7813a0a..f7205d7 100644 --- a/src/OneSignalSDK.Server/Model/NotificationSlice.cs +++ b/src/OneSignalSDK.Server/Model/NotificationSlice.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.0.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -39,7 +39,7 @@ public partial class NotificationSlice : IEquatable, IValidat /// offset. /// limit. /// notifications. - public NotificationSlice(int totalCount = default(int), int offset = default(int), int limit = default(int), List notifications = default(List)) + public NotificationSlice(int totalCount = default(int), int offset = default(int), int limit = default(int), List notifications = default(List)) { this.TotalCount = totalCount; this.Offset = offset; @@ -69,7 +69,7 @@ public partial class NotificationSlice : IEquatable, IValidat /// Gets or Sets Notifications /// [DataMember(Name = "notifications", EmitDefaultValue = false)] - public List Notifications { get; set; } + public List Notifications { get; set; } /// /// Returns the string presentation of the object diff --git a/src/OneSignalSDK.Server/Model/NotificationTarget.cs b/src/OneSignalSDK.Server/Model/NotificationTarget.cs index 2826d5a..5db5d15 100644 --- a/src/OneSignalSDK.Server/Model/NotificationTarget.cs +++ b/src/OneSignalSDK.Server/Model/NotificationTarget.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.0.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalSDK.Server/Model/NotificationWithMeta.cs b/src/OneSignalSDK.Server/Model/NotificationWithMeta.cs index cb474d6..a0b1199 100644 --- a/src/OneSignalSDK.Server/Model/NotificationWithMeta.cs +++ b/src/OneSignalSDK.Server/Model/NotificationWithMeta.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.0.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -195,7 +195,7 @@ protected NotificationWithMeta() { } /// Unix timestamp indicating when the notification was created.. /// Unix timestamp indicating when notification delivery completed. The delivery duration from start to finish can be calculated with completed_at - send_after.. /// platformDeliveryStats. - public NotificationWithMeta(List includedSegments = default(List), List excludedSegments = default(List), string lastSession = default(string), string firstSession = default(string), string sessionCount = default(string), string sessionTime = default(string), string amountSpent = default(string), string boughtSku = default(string), string tag = default(string), string language = default(string), string appVersion = default(string), string location = default(string), string email = default(string), string country = default(string), List includePlayerIds = default(List), List includeExternalUserIds = default(List), List includeEmailTokens = default(List), List includePhoneNumbers = default(List), List includeIosTokens = default(List), List includeWpWnsUris = default(List), List includeAmazonRegIds = default(List), List includeChromeRegIds = default(List), List includeChromeWebRegIds = default(List), List includeAndroidRegIds = default(List), string id = default(string), bool isIos = true, bool isAndroid = default(bool), bool isHuawei = default(bool), bool isAnyWeb = default(bool), bool isChromeWeb = default(bool), bool isFirefox = default(bool), bool isSafari = default(bool), bool isWPWNS = default(bool), bool isAdm = default(bool), bool isChrome = default(bool), string channelForExternalUserIds = default(string), string appId = default(string), string externalId = default(string), StringMap contents = default(StringMap), StringMap headings = default(StringMap), StringMap subtitle = default(StringMap), Object data = default(Object), string huaweiMsgType = default(string), string url = default(string), string webUrl = default(string), string appUrl = default(string), Object iosAttachments = default(Object), string templateId = default(string), bool? contentAvailable = default(bool?), bool mutableContent = default(bool), string targetContentIdentifier = default(string), string bigPicture = default(string), string huaweiBigPicture = default(string), string admBigPicture = default(string), string chromeBigPicture = default(string), string chromeWebImage = default(string), List /// Indicates whether to send to all devices registered under your app's Apple iOS platform. [DataMember(Name = "isIos", EmitDefaultValue = true)] - public bool IsIos { get; set; } + public bool? IsIos { get; set; } /// /// Indicates whether to send to all devices registered under your app's Google Android platform. /// /// Indicates whether to send to all devices registered under your app's Google Android platform. [DataMember(Name = "isAndroid", EmitDefaultValue = true)] - public bool IsAndroid { get; set; } + public bool? IsAndroid { get; set; } /// /// Indicates whether to send to all devices registered under your app's Huawei Android platform. /// /// Indicates whether to send to all devices registered under your app's Huawei Android platform. [DataMember(Name = "isHuawei", EmitDefaultValue = true)] - public bool IsHuawei { get; set; } + public bool? IsHuawei { get; set; } /// /// Indicates whether to send to all subscribed web browser users, including Chrome, Firefox, and Safari. You may use this instead as a combined flag instead of separately enabling isChromeWeb, isFirefox, and isSafari, though the three options are equivalent to this one. /// /// Indicates whether to send to all subscribed web browser users, including Chrome, Firefox, and Safari. You may use this instead as a combined flag instead of separately enabling isChromeWeb, isFirefox, and isSafari, though the three options are equivalent to this one. [DataMember(Name = "isAnyWeb", EmitDefaultValue = true)] - public bool IsAnyWeb { get; set; } + public bool? IsAnyWeb { get; set; } /// /// Indicates whether to send to all Google Chrome, Chrome on Android, and Mozilla Firefox users registered under your Chrome & Firefox web push platform. /// /// Indicates whether to send to all Google Chrome, Chrome on Android, and Mozilla Firefox users registered under your Chrome & Firefox web push platform. [DataMember(Name = "isChromeWeb", EmitDefaultValue = true)] - public bool IsChromeWeb { get; set; } + public bool? IsChromeWeb { get; set; } /// /// Indicates whether to send to all Mozilla Firefox desktop users registered under your Firefox web push platform. /// /// Indicates whether to send to all Mozilla Firefox desktop users registered under your Firefox web push platform. [DataMember(Name = "isFirefox", EmitDefaultValue = true)] - public bool IsFirefox { get; set; } + public bool? IsFirefox { get; set; } /// /// Does not support iOS Safari. Indicates whether to send to all Apple's Safari desktop users registered under your Safari web push platform. Read more iOS Safari /// /// Does not support iOS Safari. Indicates whether to send to all Apple's Safari desktop users registered under your Safari web push platform. Read more iOS Safari [DataMember(Name = "isSafari", EmitDefaultValue = true)] - public bool IsSafari { get; set; } + public bool? IsSafari { get; set; } /// /// Indicates whether to send to all devices registered under your app's Windows platform. /// /// Indicates whether to send to all devices registered under your app's Windows platform. [DataMember(Name = "isWP_WNS", EmitDefaultValue = true)] - public bool IsWPWNS { get; set; } + public bool? IsWPWNS { get; set; } /// /// Indicates whether to send to all devices registered under your app's Amazon Fire platform. /// /// Indicates whether to send to all devices registered under your app's Amazon Fire platform. [DataMember(Name = "isAdm", EmitDefaultValue = true)] - public bool IsAdm { get; set; } + public bool? IsAdm { get; set; } /// /// This flag is not used for web push Please see isChromeWeb for sending to web push users. This flag only applies to Google Chrome Apps & Extensions. Indicates whether to send to all devices registered under your app's Google Chrome Apps & Extension platform. /// /// This flag is not used for web push Please see isChromeWeb for sending to web push users. This flag only applies to Google Chrome Apps & Extensions. Indicates whether to send to all devices registered under your app's Google Chrome Apps & Extension platform. [DataMember(Name = "isChrome", EmitDefaultValue = true)] - public bool IsChrome { get; set; } + public bool? IsChrome { get; set; } /// /// Indicates if the message type when targeting with include_external_user_ids for cases where an email, sms, and/or push subscribers have the same external user id. Example: Use the string \"push\" to indicate you are sending a push notification or the string \"email\"for sending emails or \"sms\"for sending SMS. @@ -1483,43 +1484,53 @@ public bool Equals(NotificationWithMeta input) ) && ( this.IsIos == input.IsIos || - this.IsIos.Equals(input.IsIos) + (this.IsIos != null && + this.IsIos.Equals(input.IsIos)) ) && ( this.IsAndroid == input.IsAndroid || - this.IsAndroid.Equals(input.IsAndroid) + (this.IsAndroid != null && + this.IsAndroid.Equals(input.IsAndroid)) ) && ( this.IsHuawei == input.IsHuawei || - this.IsHuawei.Equals(input.IsHuawei) + (this.IsHuawei != null && + this.IsHuawei.Equals(input.IsHuawei)) ) && ( this.IsAnyWeb == input.IsAnyWeb || - this.IsAnyWeb.Equals(input.IsAnyWeb) + (this.IsAnyWeb != null && + this.IsAnyWeb.Equals(input.IsAnyWeb)) ) && ( this.IsChromeWeb == input.IsChromeWeb || - this.IsChromeWeb.Equals(input.IsChromeWeb) + (this.IsChromeWeb != null && + this.IsChromeWeb.Equals(input.IsChromeWeb)) ) && ( this.IsFirefox == input.IsFirefox || - this.IsFirefox.Equals(input.IsFirefox) + (this.IsFirefox != null && + this.IsFirefox.Equals(input.IsFirefox)) ) && ( this.IsSafari == input.IsSafari || - this.IsSafari.Equals(input.IsSafari) + (this.IsSafari != null && + this.IsSafari.Equals(input.IsSafari)) ) && ( this.IsWPWNS == input.IsWPWNS || - this.IsWPWNS.Equals(input.IsWPWNS) + (this.IsWPWNS != null && + this.IsWPWNS.Equals(input.IsWPWNS)) ) && ( this.IsAdm == input.IsAdm || - this.IsAdm.Equals(input.IsAdm) + (this.IsAdm != null && + this.IsAdm.Equals(input.IsAdm)) ) && ( this.IsChrome == input.IsChrome || - this.IsChrome.Equals(input.IsChrome) + (this.IsChrome != null && + this.IsChrome.Equals(input.IsChrome)) ) && ( this.ChannelForExternalUserIds == input.ChannelForExternalUserIds || @@ -2054,16 +2065,46 @@ public override int GetHashCode() } hashCode = (hashCode * 59) + this.Value.GetHashCode(); hashCode = (hashCode * 59) + this.Aggregation.GetHashCode(); - hashCode = (hashCode * 59) + this.IsIos.GetHashCode(); - hashCode = (hashCode * 59) + this.IsAndroid.GetHashCode(); - hashCode = (hashCode * 59) + this.IsHuawei.GetHashCode(); - hashCode = (hashCode * 59) + this.IsAnyWeb.GetHashCode(); - hashCode = (hashCode * 59) + this.IsChromeWeb.GetHashCode(); - hashCode = (hashCode * 59) + this.IsFirefox.GetHashCode(); - hashCode = (hashCode * 59) + this.IsSafari.GetHashCode(); - hashCode = (hashCode * 59) + this.IsWPWNS.GetHashCode(); - hashCode = (hashCode * 59) + this.IsAdm.GetHashCode(); - hashCode = (hashCode * 59) + this.IsChrome.GetHashCode(); + if (this.IsIos != null) + { + hashCode = (hashCode * 59) + this.IsIos.GetHashCode(); + } + if (this.IsAndroid != null) + { + hashCode = (hashCode * 59) + this.IsAndroid.GetHashCode(); + } + if (this.IsHuawei != null) + { + hashCode = (hashCode * 59) + this.IsHuawei.GetHashCode(); + } + if (this.IsAnyWeb != null) + { + hashCode = (hashCode * 59) + this.IsAnyWeb.GetHashCode(); + } + if (this.IsChromeWeb != null) + { + hashCode = (hashCode * 59) + this.IsChromeWeb.GetHashCode(); + } + if (this.IsFirefox != null) + { + hashCode = (hashCode * 59) + this.IsFirefox.GetHashCode(); + } + if (this.IsSafari != null) + { + hashCode = (hashCode * 59) + this.IsSafari.GetHashCode(); + } + if (this.IsWPWNS != null) + { + hashCode = (hashCode * 59) + this.IsWPWNS.GetHashCode(); + } + if (this.IsAdm != null) + { + hashCode = (hashCode * 59) + this.IsAdm.GetHashCode(); + } + if (this.IsChrome != null) + { + hashCode = (hashCode * 59) + this.IsChrome.GetHashCode(); + } if (this.ChannelForExternalUserIds != null) { hashCode = (hashCode * 59) + this.ChannelForExternalUserIds.GetHashCode(); diff --git a/src/OneSignalSDK.Server/Model/NotificationWithMetaAllOf.cs b/src/OneSignalSDK.Server/Model/NotificationWithMetaAllOf.cs index 3a80876..1974b3f 100644 --- a/src/OneSignalSDK.Server/Model/NotificationWithMetaAllOf.cs +++ b/src/OneSignalSDK.Server/Model/NotificationWithMetaAllOf.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.0.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalSDK.Server/Model/Operator.cs b/src/OneSignalSDK.Server/Model/Operator.cs index 6349992..6a7dca5 100644 --- a/src/OneSignalSDK.Server/Model/Operator.cs +++ b/src/OneSignalSDK.Server/Model/Operator.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.0.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalSDK.Server/Model/OutcomeData.cs b/src/OneSignalSDK.Server/Model/OutcomeData.cs index 08bb0b1..7e9fd5f 100644 --- a/src/OneSignalSDK.Server/Model/OutcomeData.cs +++ b/src/OneSignalSDK.Server/Model/OutcomeData.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.0.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalSDK.Server/Model/OutcomesData.cs b/src/OneSignalSDK.Server/Model/OutcomesData.cs index 8a53d00..fdca146 100644 --- a/src/OneSignalSDK.Server/Model/OutcomesData.cs +++ b/src/OneSignalSDK.Server/Model/OutcomesData.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.0.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalSDK.Server/Model/PlatformDeliveryData.cs b/src/OneSignalSDK.Server/Model/PlatformDeliveryData.cs index 27c7b8d..ba4b284 100644 --- a/src/OneSignalSDK.Server/Model/PlatformDeliveryData.cs +++ b/src/OneSignalSDK.Server/Model/PlatformDeliveryData.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.0.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalSDK.Server/Model/Player.cs b/src/OneSignalSDK.Server/Model/Player.cs index 83be17a..ac8b726 100644 --- a/src/OneSignalSDK.Server/Model/Player.cs +++ b/src/OneSignalSDK.Server/Model/Player.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.0.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalSDK.Server/Model/PlayerNotificationTarget.cs b/src/OneSignalSDK.Server/Model/PlayerNotificationTarget.cs index 8bca917..b314e57 100644 --- a/src/OneSignalSDK.Server/Model/PlayerNotificationTarget.cs +++ b/src/OneSignalSDK.Server/Model/PlayerNotificationTarget.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.0.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalSDK.Server/Model/PlayerSlice.cs b/src/OneSignalSDK.Server/Model/PlayerSlice.cs index 1d5a910..f82c5fd 100644 --- a/src/OneSignalSDK.Server/Model/PlayerSlice.cs +++ b/src/OneSignalSDK.Server/Model/PlayerSlice.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.0.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalSDK.Server/Model/Purchase.cs b/src/OneSignalSDK.Server/Model/Purchase.cs index 92df669..b47d786 100644 --- a/src/OneSignalSDK.Server/Model/Purchase.cs +++ b/src/OneSignalSDK.Server/Model/Purchase.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.0.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalSDK.Server/Model/Segment.cs b/src/OneSignalSDK.Server/Model/Segment.cs index e0ebab1..cb3b4ab 100644 --- a/src/OneSignalSDK.Server/Model/Segment.cs +++ b/src/OneSignalSDK.Server/Model/Segment.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.0.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalSDK.Server/Model/SegmentNotificationTarget.cs b/src/OneSignalSDK.Server/Model/SegmentNotificationTarget.cs index 3854780..6051bf1 100644 --- a/src/OneSignalSDK.Server/Model/SegmentNotificationTarget.cs +++ b/src/OneSignalSDK.Server/Model/SegmentNotificationTarget.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.0.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalSDK.Server/Model/StringMap.cs b/src/OneSignalSDK.Server/Model/StringMap.cs index 652c02a..1d42a09 100644 --- a/src/OneSignalSDK.Server/Model/StringMap.cs +++ b/src/OneSignalSDK.Server/Model/StringMap.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.0.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalSDK.Server/Model/UpdatePlayerTagsRequestBody.cs b/src/OneSignalSDK.Server/Model/UpdatePlayerTagsRequestBody.cs index 0ee8c4c..49b08a8 100644 --- a/src/OneSignalSDK.Server/Model/UpdatePlayerTagsRequestBody.cs +++ b/src/OneSignalSDK.Server/Model/UpdatePlayerTagsRequestBody.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.0.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalSDK.Server/OneSignalSDK.Server.csproj b/src/OneSignalSDK.Server/OneSignalSDK.Server.csproj index 3f21dc2..d0bda0f 100644 --- a/src/OneSignalSDK.Server/OneSignalSDK.Server.csproj +++ b/src/OneSignalSDK.Server/OneSignalSDK.Server.csproj @@ -12,7 +12,7 @@ OneSignal is a free push notification service for mobile apps. Integrate OneSignal with your backend events, data, and more. Copyrite 2022 OneSignal OneSignalSDK.Server - 1.0.2 + 1.0.1 bin\$(Configuration)\$(TargetFramework)\OneSignalSDK.Server.xml https://github.com/OneSignal/onesignal-dotnet-client.git git