diff --git a/README.md b/README.md index 84335b2..c22bf7f 100644 --- a/README.md +++ b/README.md @@ -5,8 +5,8 @@ A powerful way to send personalized messages at scale and build effective custom ## Overview This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI spec](https://openapis.org) from a remote server, you can easily generate an API client. -- API version: 1.4.0 -- Package version: 2.2.0 +- API version: 5.0.1 +- Package version: 5.0.0-beta1 - Build package: org.openapitools.codegen.languages.CppRestSdkClientCodegen For more information, please visit [https://onesignal.com](https://onesignal.com) @@ -93,14 +93,14 @@ using utility::string_t; using utility::conversions::to_string_t; const std::string APP_ID = ""; -const std::string REST_KEY_TOKEN = ""; // App REST API key required for most endpoints -const std::string ORG_KEY_TOKEN = ""; // Organization key is only required for creating new apps and other top-level endpoints +const std::string APP_KEY_TOKEN = ""; +const std::string USER_KEY_TOKEN = ""; static DefaultApi * createApi() { // Settings up the client const auto configuration = ApiClient::getDefaultConfiguration(); - configuration->setAppKeyToken(REST_KEY_TOKEN); - configuration->setUserKeyToken(ORG_KEY_TOKEN); + configuration->setAppKeyToken(APP_KEY_TOKEN); + configuration->setUserKeyToken(USER_KEY_TOKEN); const auto apiClient = std::make_shared(configuration); diff --git a/include/CppRestOneSignalAPIClient/ApiClient.h b/include/CppRestOneSignalAPIClient/ApiClient.h index 2406a42..f0f8b93 100644 --- a/include/CppRestOneSignalAPIClient/ApiClient.h +++ b/include/CppRestOneSignalAPIClient/ApiClient.h @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. diff --git a/include/CppRestOneSignalAPIClient/ApiConfiguration.h b/include/CppRestOneSignalAPIClient/ApiConfiguration.h index 01503cc..a373a04 100644 --- a/include/CppRestOneSignalAPIClient/ApiConfiguration.h +++ b/include/CppRestOneSignalAPIClient/ApiConfiguration.h @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. @@ -55,8 +55,8 @@ class ApiConfiguration utility::string_t getBearerToken( const utility::string_t& prefix ) const; void setBearerToken( const utility::string_t& prefix, const utility::string_t& bearerToken ); - void setAppKeyToken( const utility::string_t& bearerToken ); - void setUserKeyToken( const utility::string_t& bearerToken ); + void setRestApiKeyToken( const utility::string_t& bearerToken ); + void setUserAuthKeyToken( const utility::string_t& bearerToken ); protected: diff --git a/include/CppRestOneSignalAPIClient/ApiException.h b/include/CppRestOneSignalAPIClient/ApiException.h index 2c7faeb..043e812 100644 --- a/include/CppRestOneSignalAPIClient/ApiException.h +++ b/include/CppRestOneSignalAPIClient/ApiException.h @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. diff --git a/include/CppRestOneSignalAPIClient/HttpContent.h b/include/CppRestOneSignalAPIClient/HttpContent.h index 4667d99..76802da 100644 --- a/include/CppRestOneSignalAPIClient/HttpContent.h +++ b/include/CppRestOneSignalAPIClient/HttpContent.h @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. diff --git a/include/CppRestOneSignalAPIClient/IHttpBody.h b/include/CppRestOneSignalAPIClient/IHttpBody.h index 15728c8..9b960ec 100644 --- a/include/CppRestOneSignalAPIClient/IHttpBody.h +++ b/include/CppRestOneSignalAPIClient/IHttpBody.h @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. diff --git a/include/CppRestOneSignalAPIClient/JsonBody.h b/include/CppRestOneSignalAPIClient/JsonBody.h index e360766..899fe95 100644 --- a/include/CppRestOneSignalAPIClient/JsonBody.h +++ b/include/CppRestOneSignalAPIClient/JsonBody.h @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. diff --git a/include/CppRestOneSignalAPIClient/ModelBase.h b/include/CppRestOneSignalAPIClient/ModelBase.h index 61ffdb0..baedb7a 100644 --- a/include/CppRestOneSignalAPIClient/ModelBase.h +++ b/include/CppRestOneSignalAPIClient/ModelBase.h @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. diff --git a/include/CppRestOneSignalAPIClient/MultipartFormData.h b/include/CppRestOneSignalAPIClient/MultipartFormData.h index 1f94f1a..4ab1b28 100644 --- a/include/CppRestOneSignalAPIClient/MultipartFormData.h +++ b/include/CppRestOneSignalAPIClient/MultipartFormData.h @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. diff --git a/include/CppRestOneSignalAPIClient/Object.h b/include/CppRestOneSignalAPIClient/Object.h index 5cd00b4..bc71744 100644 --- a/include/CppRestOneSignalAPIClient/Object.h +++ b/include/CppRestOneSignalAPIClient/Object.h @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. diff --git a/include/CppRestOneSignalAPIClient/api/DefaultApi.h b/include/CppRestOneSignalAPIClient/api/DefaultApi.h index f92b99f..2747d86 100644 --- a/include/CppRestOneSignalAPIClient/api/DefaultApi.h +++ b/include/CppRestOneSignalAPIClient/api/DefaultApi.h @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. @@ -24,47 +24,32 @@ #include "CppRestOneSignalAPIClient/ApiClient.h" #include "CppRestOneSignalAPIClient/model/App.h" -#include "CppRestOneSignalAPIClient/model/BeginLiveActivityRequest.h" -#include "CppRestOneSignalAPIClient/model/CancelNotificationSuccessResponse.h" #include "CppRestOneSignalAPIClient/model/CreateNotificationSuccessResponse.h" -#include "CppRestOneSignalAPIClient/model/CreatePlayerSuccessResponse.h" #include "CppRestOneSignalAPIClient/model/CreateSegmentConflictResponse.h" #include "CppRestOneSignalAPIClient/model/CreateSegmentSuccessResponse.h" -#include "CppRestOneSignalAPIClient/model/CreateSubscriptionRequestBody.h" #include "CppRestOneSignalAPIClient/model/CreateUserConflictResponse.h" -#include "CppRestOneSignalAPIClient/model/DeletePlayerNotFoundResponse.h" -#include "CppRestOneSignalAPIClient/model/DeletePlayerSuccessResponse.h" -#include "CppRestOneSignalAPIClient/model/DeleteSegmentNotFoundResponse.h" -#include "CppRestOneSignalAPIClient/model/DeleteSegmentSuccessResponse.h" #include "CppRestOneSignalAPIClient/model/ExportEventsSuccessResponse.h" -#include "CppRestOneSignalAPIClient/model/ExportPlayersSuccessResponse.h" -#include "CppRestOneSignalAPIClient/model/Export_players_request_body.h" +#include "CppRestOneSignalAPIClient/model/ExportSubscriptionsSuccessResponse.h" +#include "CppRestOneSignalAPIClient/model/Export_subscriptions_request_body.h" #include "CppRestOneSignalAPIClient/model/GenericError.h" -#include "CppRestOneSignalAPIClient/model/Get_notification_request_body.h" -#include "CppRestOneSignalAPIClient/model/Inline_response_200.h" -#include "CppRestOneSignalAPIClient/model/Inline_response_200_3.h" -#include "CppRestOneSignalAPIClient/model/Inline_response_201.h" -#include "CppRestOneSignalAPIClient/model/Inline_response_202.h" +#include "CppRestOneSignalAPIClient/model/GenericSuccessBoolResponse.h" +#include "CppRestOneSignalAPIClient/model/GetSegmentsSuccessResponse.h" +#include "CppRestOneSignalAPIClient/model/Get_notification_history_request_body.h" #include "CppRestOneSignalAPIClient/model/Notification.h" #include "CppRestOneSignalAPIClient/model/NotificationHistorySuccessResponse.h" #include "CppRestOneSignalAPIClient/model/NotificationSlice.h" #include "CppRestOneSignalAPIClient/model/NotificationWithMeta.h" #include "CppRestOneSignalAPIClient/model/OutcomesData.h" -#include "CppRestOneSignalAPIClient/model/Player.h" -#include "CppRestOneSignalAPIClient/model/PlayerSlice.h" -#include "CppRestOneSignalAPIClient/model/RateLimiterError.h" +#include "CppRestOneSignalAPIClient/model/PropertiesBody.h" +#include "CppRestOneSignalAPIClient/model/RateLimitError.h" #include "CppRestOneSignalAPIClient/model/Segment.h" +#include "CppRestOneSignalAPIClient/model/SubscriptionBody.h" #include "CppRestOneSignalAPIClient/model/TransferSubscriptionRequestBody.h" #include "CppRestOneSignalAPIClient/model/UpdateLiveActivityRequest.h" #include "CppRestOneSignalAPIClient/model/UpdateLiveActivitySuccessResponse.h" -#include "CppRestOneSignalAPIClient/model/UpdatePlayerSuccessResponse.h" -#include "CppRestOneSignalAPIClient/model/UpdatePlayerTagsSuccessResponse.h" -#include "CppRestOneSignalAPIClient/model/UpdateSubscriptionRequestBody.h" #include "CppRestOneSignalAPIClient/model/UpdateUserRequest.h" -#include "CppRestOneSignalAPIClient/model/Update_player_tags_request_body.h" #include "CppRestOneSignalAPIClient/model/User.h" -#include "CppRestOneSignalAPIClient/model/UserIdentityRequestBody.h" -#include "CppRestOneSignalAPIClient/model/UserIdentityResponse.h" +#include "CppRestOneSignalAPIClient/model/UserIdentityBody.h" #include #include @@ -81,14 +66,20 @@ class IDefaultApi IDefaultApi() = default; virtual ~IDefaultApi() = default; - virtual pplx::task beginLiveActivity( + virtual pplx::task> cancelNotification( utility::string_t appId, - utility::string_t activityId, - std::shared_ptr beginLiveActivityRequest + utility::string_t notificationId ) const = 0; - virtual pplx::task> cancelNotification( + virtual pplx::task> createAlias( utility::string_t appId, - utility::string_t notificationId + utility::string_t aliasLabel, + utility::string_t aliasId, + std::shared_ptr userIdentityBody + ) const = 0; + virtual pplx::task> createAliasBySubscription( + utility::string_t appId, + utility::string_t subscriptionId, + std::shared_ptr userIdentityBody ) const = 0; virtual pplx::task> createApp( std::shared_ptr app @@ -96,34 +87,27 @@ class IDefaultApi virtual pplx::task> createNotification( std::shared_ptr notification ) const = 0; - virtual pplx::task> createPlayer( - std::shared_ptr player - ) const = 0; - virtual pplx::task> createSegments( + virtual pplx::task> createSegment( utility::string_t appId, boost::optional> segment ) const = 0; - virtual pplx::task> createSubscription( + virtual pplx::task> createSubscription( utility::string_t appId, utility::string_t aliasLabel, utility::string_t aliasId, - std::shared_ptr createSubscriptionRequestBody + std::shared_ptr subscriptionBody ) const = 0; virtual pplx::task> createUser( utility::string_t appId, std::shared_ptr user ) const = 0; - virtual pplx::task> deleteAlias( + virtual pplx::task> deleteAlias( utility::string_t appId, utility::string_t aliasLabel, utility::string_t aliasId, utility::string_t aliasLabelToDelete ) const = 0; - virtual pplx::task> deletePlayer( - utility::string_t appId, - utility::string_t playerId - ) const = 0; - virtual pplx::task> deleteSegments( + virtual pplx::task> deleteSegment( utility::string_t appId, utility::string_t segmentId ) const = 0; @@ -136,49 +120,35 @@ class IDefaultApi utility::string_t aliasLabel, utility::string_t aliasId ) const = 0; - virtual pplx::task endLiveActivity( - utility::string_t appId, - utility::string_t activityId, - utility::string_t subscriptionId - ) const = 0; virtual pplx::task> exportEvents( utility::string_t notificationId, utility::string_t appId ) const = 0; - virtual pplx::task> exportPlayers( + virtual pplx::task> exportSubscriptions( utility::string_t appId, - boost::optional> exportPlayersRequestBody + boost::optional> exportSubscriptionsRequestBody ) const = 0; - virtual pplx::task> fetchAliases( - utility::string_t appId, - utility::string_t subscriptionId - ) const = 0; - virtual pplx::task> fetchUser( + virtual pplx::task> getAliases( utility::string_t appId, utility::string_t aliasLabel, utility::string_t aliasId ) const = 0; - virtual pplx::task> fetchUserIdentity( + virtual pplx::task> getAliasesBySubscription( utility::string_t appId, - utility::string_t aliasLabel, - utility::string_t aliasId + utility::string_t subscriptionId ) const = 0; virtual pplx::task> getApp( utility::string_t appId ) const = 0; virtual pplx::task>> getApps( ) const = 0; - virtual pplx::task> getEligibleIams( - utility::string_t appId, - utility::string_t subscriptionId - ) const = 0; virtual pplx::task> getNotification( utility::string_t appId, utility::string_t notificationId ) const = 0; virtual pplx::task> getNotificationHistory( utility::string_t notificationId, - std::shared_ptr getNotificationRequestBody + std::shared_ptr getNotificationHistoryRequestBody ) const = 0; virtual pplx::task> getNotifications( utility::string_t appId, @@ -194,31 +164,25 @@ class IDefaultApi boost::optional outcomePlatforms, boost::optional outcomeAttribution ) const = 0; - virtual pplx::task> getPlayer( - utility::string_t appId, - utility::string_t playerId, - boost::optional emailAuthHash - ) const = 0; - virtual pplx::task> getPlayers( + virtual pplx::task> getSegments( utility::string_t appId, - boost::optional limit, - boost::optional offset + boost::optional offset, + boost::optional limit ) const = 0; - virtual pplx::task> identifyUserByAlias( + virtual pplx::task> getUser( utility::string_t appId, utility::string_t aliasLabel, - utility::string_t aliasId, - std::shared_ptr userIdentityRequestBody + utility::string_t aliasId ) const = 0; - virtual pplx::task> identifyUserBySubscriptionId( + virtual pplx::task> transferSubscription( utility::string_t appId, utility::string_t subscriptionId, - std::shared_ptr userIdentityRequestBody + std::shared_ptr transferSubscriptionRequestBody ) const = 0; - virtual pplx::task> transferSubscription( + virtual pplx::task> unsubscribeEmailWithToken( utility::string_t appId, - utility::string_t subscriptionId, - std::shared_ptr transferSubscriptionRequestBody + utility::string_t notificationId, + utility::string_t token ) const = 0; virtual pplx::task> updateApp( utility::string_t appId, @@ -229,21 +193,12 @@ class IDefaultApi utility::string_t activityId, std::shared_ptr updateLiveActivityRequest ) const = 0; - virtual pplx::task> updatePlayer( - utility::string_t playerId, - std::shared_ptr player - ) const = 0; - virtual pplx::task> updatePlayerTags( - utility::string_t appId, - utility::string_t externalUserId, - boost::optional> updatePlayerTagsRequestBody - ) const = 0; virtual pplx::task updateSubscription( utility::string_t appId, utility::string_t subscriptionId, - std::shared_ptr updateSubscriptionRequestBody + std::shared_ptr subscriptionBody ) const = 0; - virtual pplx::task> updateUser( + virtual pplx::task> updateUser( utility::string_t appId, utility::string_t aliasLabel, utility::string_t aliasId, @@ -261,30 +216,46 @@ class DefaultApi : public IDefaultApi ~DefaultApi() override; /// - /// Start Live Activity + /// Stop a scheduled or currently outgoing notification + /// + /// + /// Used to stop a scheduled or currently outgoing notification + /// + /// + /// + pplx::task> cancelNotification( + utility::string_t appId, + utility::string_t notificationId + ) const override; + /// + /// /// /// - /// Starts a Live Activity + /// Upserts one or more Aliases to an existing User identified by (:alias_label, :alias_id). /// - /// The OneSignal App ID for your app. Available in Keys & IDs. - /// Live Activity record ID - /// - pplx::task beginLiveActivity( + /// + /// + /// + /// + pplx::task> createAlias( utility::string_t appId, - utility::string_t activityId, - std::shared_ptr beginLiveActivityRequest + utility::string_t aliasLabel, + utility::string_t aliasId, + std::shared_ptr userIdentityBody ) const override; /// - /// Stop a scheduled or currently outgoing notification + /// /// /// - /// Used to stop a scheduled or currently outgoing notification + /// Upserts one or more Aliases for the User identified by :subscription_id. /// /// - /// - pplx::task> cancelNotification( + /// + /// + pplx::task> createAliasBySubscription( utility::string_t appId, - utility::string_t notificationId + utility::string_t subscriptionId, + std::shared_ptr userIdentityBody ) const override; /// /// Create an app @@ -307,24 +278,14 @@ class DefaultApi : public IDefaultApi std::shared_ptr notification ) const override; /// - /// Add a device + /// Create Segment /// /// - /// Register a new device to one of your OneSignal apps 🚧 Don't use this This API endpoint is designed to be used from our open source Mobile and Web Push SDKs. It is not designed for developers to use it directly, unless instructed to do so by OneSignal support. If you use this method instead of our SDKs, many OneSignal features such as conversion tracking, timezone tracking, language detection, and rich-push won't work out of the box. It will also make it harder to identify possible setup issues. This method is used to register a new device with OneSignal. If a device is already registered with the specified identifier, then this will update the existing device record instead of creating a new one. The returned player is a player / user ID. Use the returned ID to send push notifications to this specific user later, or to include this player when sending to a set of users. 🚧 iOS Must set test_type to 1 when building your iOS app as development. Omit this field in your production app builds. - /// - /// - pplx::task> createPlayer( - std::shared_ptr player - ) const override; - /// - /// Create Segments - /// - /// - /// Create segments visible and usable in the dashboard and API - Required: OneSignal Paid Plan The Create Segment method is used when you want your server to programmatically create a segment instead of using the OneSignal Dashboard UI. Just like creating Segments from the dashboard you can pass in filters with multiple \"AND\" or \"OR\" operator's. 🚧 Does Not Update Segments This endpoint will only create segments, it does not edit or update currently created Segments. You will need to use the Delete Segments endpoint and re-create it with this endpoint to edit. + /// Create a segment visible and usable in the dashboard and API - Required: OneSignal Paid Plan The Create Segment method is used when you want your server to programmatically create a segment instead of using the OneSignal Dashboard UI. Just like creating Segments from the dashboard you can pass in filters with multiple \"AND\" or \"OR\" operator's. 🚧 Does Not Update Segments This endpoint will only create segments, it does not edit or update currently created Segments. You will need to use the Delete Segment endpoint and re-create it with this endpoint to edit. /// /// The OneSignal App ID for your app. Available in Keys & IDs. /// (optional) - pplx::task> createSegments( + pplx::task> createSegment( utility::string_t appId, boost::optional> segment ) const override; @@ -337,12 +298,12 @@ class DefaultApi : public IDefaultApi /// /// /// - /// - pplx::task> createSubscription( + /// + pplx::task> createSubscription( utility::string_t appId, utility::string_t aliasLabel, utility::string_t aliasId, - std::shared_ptr createSubscriptionRequestBody + std::shared_ptr subscriptionBody ) const override; /// /// @@ -366,33 +327,21 @@ class DefaultApi : public IDefaultApi /// /// /// - pplx::task> deleteAlias( + pplx::task> deleteAlias( utility::string_t appId, utility::string_t aliasLabel, utility::string_t aliasId, utility::string_t aliasLabelToDelete ) const override; /// - /// Delete a user record - /// - /// - /// Delete player - Required: Used to delete a single, specific Player ID record from a specific OneSignal app. - /// - /// The OneSignal App ID for your app. Available in Keys & IDs. - /// The OneSignal player_id - pplx::task> deletePlayer( - utility::string_t appId, - utility::string_t playerId - ) const override; - /// - /// Delete Segments + /// Delete Segment /// /// - /// Delete segments (not user devices) - Required: OneSignal Paid Plan You can delete a segment under your app by calling this API. You must provide an API key in the Authorization header that has admin access on the app. The segment_id can be found in the URL of the segment when viewing it in the dashboard. + /// Delete a segment (not user devices) - Required: OneSignal Paid Plan You can delete a segment under your app by calling this API. You must provide an API key in the Authorization header that has admin access on the app. The segment_id can be found in the URL of the segment when viewing it in the dashboard. /// /// The OneSignal App ID for your app. Available in Keys & IDs. /// The segment_id can be found in the URL of the segment when viewing it in the dashboard. - pplx::task> deleteSegments( + pplx::task> deleteSegment( utility::string_t appId, utility::string_t segmentId ) const override; @@ -423,20 +372,6 @@ class DefaultApi : public IDefaultApi utility::string_t aliasId ) const override; /// - /// Stop Live Activity - /// - /// - /// Stops a Live Activity - /// - /// The OneSignal App ID for your app. Available in Keys & IDs. - /// Live Activity record ID - /// Subscription ID - pplx::task endLiveActivity( - utility::string_t appId, - utility::string_t activityId, - utility::string_t subscriptionId - ) const override; - /// /// Export CSV of Events /// /// @@ -449,39 +384,27 @@ class DefaultApi : public IDefaultApi utility::string_t appId ) const override; /// - /// Export CSV of Players + /// Export CSV of Subscriptions /// /// /// Generate a compressed CSV export of all of your current user data This method can be used to generate a compressed CSV export of all of your current user data. It is a much faster alternative than retrieving this data using the /players API endpoint. The file will be compressed using GZip. The file may take several minutes to generate depending on the number of users in your app. The URL generated will be available for 3 days and includes random v4 uuid as part of the resource name to be unguessable. 🚧 403 Error Responses You can test if it is complete by making a GET request to the csv_file_url value. This file may take time to generate depending on how many device records are being pulled. If the file is not ready, a 403 error will be returned. Otherwise the file itself will be returned. 🚧 Requires Authentication Key Requires your OneSignal App's REST API Key, available in Keys & IDs. 🚧 Concurrent Exports Only one concurrent export is allowed per OneSignal account. Please ensure you have successfully downloaded the .csv.gz file before exporting another app. CSV File Format: - Default Columns: | Field | Details | | --- | --- | | id | OneSignal Player Id | | identifier | Push Token | | session_count | Number of times they visited the app or site | language | Device language code | | timezone | Number of seconds away from UTC. Example: -28800 | | game_version | Version of your mobile app gathered from Android Studio versionCode in your App/build.gradle and iOS uses kCFBundleVersionKey in Xcode. | | device_os | Device Operating System Version. Example: 80 = Chrome 80, 9 = Android 9 | | device_type | Device Operating System Type | | device_model | Device Hardware String Code. Example: Mobile Web Subscribers will have `Linux armv` | | ad_id | Based on the Google Advertising Id for Android, identifierForVendor for iOS. OptedOut means user turned off Advertising tracking on the device. | | tags | Current OneSignal Data Tags on the device. | | last_active | Date and time the user last opened the mobile app or visited the site. | | playtime | Total amount of time in seconds the user had the mobile app open. | | amount_spent | Mobile only - amount spent in USD on In-App Purchases. | | created_at | Date and time the device record was created in OneSignal. Mobile - first time they opened the app with OneSignal SDK. Web - first time the user subscribed to the site. | | invalid_identifier | t = unsubscribed, f = subscibed | | badge_count | Current number of badges on the device | - Extra Columns: | Field | Details | | --- | --- | | external_user_id | Your User Id set on the device | | notification_types | Notification types | | location | Location points (Latitude and Longitude) set on the device. | | country | Country code | | rooted | Android device rooted or not | | ip | IP Address of the device if being tracked. See Handling Personal Data. | | web_auth | Web Only authorization key. | | web_p256 | Web Only p256 key. | /// /// The app ID that you want to export devices from - /// (optional) - pplx::task> exportPlayers( + /// (optional) + pplx::task> exportSubscriptions( utility::string_t appId, - boost::optional> exportPlayersRequestBody + boost::optional> exportSubscriptionsRequestBody ) const override; /// /// /// /// - /// Lists all Aliases for the User identified by :subscription_id. - /// - /// - /// - pplx::task> fetchAliases( - utility::string_t appId, - utility::string_t subscriptionId - ) const override; - /// - /// - /// - /// - /// Returns the User’s properties, Aliases, and Subscriptions. + /// Lists all Aliases for the User identified by (:alias_label, :alias_id). /// /// /// /// - pplx::task> fetchUser( + pplx::task> getAliases( utility::string_t appId, utility::string_t aliasLabel, utility::string_t aliasId @@ -490,15 +413,13 @@ class DefaultApi : public IDefaultApi /// /// /// - /// Lists all Aliases for the User identified by (:alias_label, :alias_id). + /// Lists all Aliases for the User identified by :subscription_id. /// /// - /// - /// - pplx::task> fetchUserIdentity( + /// + pplx::task> getAliasesBySubscription( utility::string_t appId, - utility::string_t aliasLabel, - utility::string_t aliasId + utility::string_t subscriptionId ) const override; /// /// View an app @@ -519,18 +440,6 @@ class DefaultApi : public IDefaultApi pplx::task>> getApps( ) const override; /// - /// - /// - /// - /// Manifest of In-App Messages the Subscription is eligible to display by the SDK. - /// - /// - /// - pplx::task> getEligibleIams( - utility::string_t appId, - utility::string_t subscriptionId - ) const override; - /// /// View notification /// /// @@ -549,10 +458,10 @@ class DefaultApi : public IDefaultApi /// -> View the devices sent a message - OneSignal Paid Plan Required This method will return all devices that were sent the given notification_id of an Email or Push Notification if used within 7 days of the date sent. After 7 days of the sending date, the message history data will be unavailable. After a successful response is received, the destination url may be polled until the file becomes available. Most exports are done in ~1-3 minutes, so setting a poll interval of 10 seconds should be adequate. For use cases that are not meant to be consumed by a script, an email will be sent to the supplied email address. 🚧 Requirements A OneSignal Paid Plan. Turn on Send History via OneSignal API in Settings -> Analytics. Cannot get data before this was turned on. Must be called within 7 days after sending the message. Messages targeting under 1000 recipients will not have \"sent\" events recorded, but will show \"clicked\" events. Requires your OneSignal App's REST API Key, available in Keys & IDs. /// /// The \"id\" of the message found in the Notification object - /// + /// pplx::task> getNotificationHistory( utility::string_t notificationId, - std::shared_ptr getNotificationRequestBody + std::shared_ptr getNotificationHistoryRequestBody ) const override; /// /// View notifications @@ -591,76 +500,60 @@ class DefaultApi : public IDefaultApi boost::optional outcomeAttribution ) const override; /// - /// View device - /// - /// - /// View the details of an existing device in one of your OneSignal apps - /// - /// Your app_id for this device - /// Player's OneSignal ID - /// Email - Only required if you have enabled Identity Verification and device_type is email (11). (optional, default to utility::conversions::to_string_t("")) - pplx::task> getPlayer( - utility::string_t appId, - utility::string_t playerId, - boost::optional emailAuthHash - ) const override; - /// - /// View devices + /// Get Segments /// /// - /// View the details of multiple devices in one of your OneSignal apps Unavailable for Apps Over 80,000 Users For performance reasons, this method is not available for larger apps. Larger apps should use the CSV export API endpoint, which is much more performant. + /// Returns an array of segments from an app. /// - /// The app ID that you want to view players from - /// How many devices to return. Max is 300. Default is 300 (optional, default to 0) - /// Result offset. Default is 0. Results are sorted by id; (optional, default to 0) - pplx::task> getPlayers( + /// The OneSignal App ID for your app. Available in Keys & IDs. + /// Segments are listed in ascending order of created_at date. offset will omit that number of segments from the beginning of the list. Eg offset 5, will remove the 5 earliest created Segments. (optional, default to 0) + /// The amount of Segments in the response. Maximum 300. (optional, default to 0) + pplx::task> getSegments( utility::string_t appId, - boost::optional limit, - boost::optional offset + boost::optional offset, + boost::optional limit ) const override; /// /// /// /// - /// Upserts one or more Aliases to an existing User identified by (:alias_label, :alias_id). + /// Returns the User’s properties, Aliases, and Subscriptions. /// /// /// /// - /// - pplx::task> identifyUserByAlias( + pplx::task> getUser( utility::string_t appId, utility::string_t aliasLabel, - utility::string_t aliasId, - std::shared_ptr userIdentityRequestBody + utility::string_t aliasId ) const override; /// /// /// /// - /// Upserts one or more Aliases for the User identified by :subscription_id. + /// Transfers this Subscription to the User identified by the identity in the payload. /// /// /// - /// - pplx::task> identifyUserBySubscriptionId( + /// + pplx::task> transferSubscription( utility::string_t appId, utility::string_t subscriptionId, - std::shared_ptr userIdentityRequestBody + std::shared_ptr transferSubscriptionRequestBody ) const override; /// - /// + /// Unsubscribe with token /// /// - /// Transfers this Subscription to the User identified by the identity in the payload. + /// Unsubscribe an email with a token when using your own custom email unsubscribe landing page /// - /// - /// - /// - pplx::task> transferSubscription( + /// The OneSignal App ID for your app. Available in Keys & IDs. + /// The id of the message found in the creation notification POST response, View Notifications GET response, or URL within the Message Report. + /// The unsubscribe token that is generated via liquid syntax in {{subscription.unsubscribe_token}} when personalizing an email. + pplx::task> unsubscribeEmailWithToken( utility::string_t appId, - utility::string_t subscriptionId, - std::shared_ptr transferSubscriptionRequestBody + utility::string_t notificationId, + utility::string_t token ) const override; /// /// Update an app @@ -689,32 +582,6 @@ class DefaultApi : public IDefaultApi std::shared_ptr updateLiveActivityRequest ) const override; /// - /// Edit device - /// - /// - /// Update an existing device in one of your OneSignal apps - /// - /// Player's OneSignal ID - /// - pplx::task> updatePlayer( - utility::string_t playerId, - std::shared_ptr player - ) const override; - /// - /// Edit tags with external user id - /// - /// - /// Update an existing device's tags in one of your OneSignal apps using the External User ID. Warning - Android SDK Data Synchronization Tags added through the Android SDK tagging methods may not update if using the API to change or update the same tag. For example, if you use SDK method sendTag(\"key\", \"value1\") then update the tag value to \"value2\" with this API endpoint. You will not be able to set the value back to \"value1\" through the SDK, you will need to change it to something different through the SDK to be reset. Recommendations if using this Endpoint on Android Mobile Apps: 1 - Do not use the same tag keys for SDK and API updates 2 - If you want to use the same key for both SDK and API updates, call the SDK getTags method first to update the device's tags. This is only applicable on the Android Mobile App SDKs. 📘 Deleting Tags To delete a tag, include its key and set its value to blank. Omitting a key/value will not delete it. For example, if I wanted to delete two existing tags rank and category while simultaneously adding a new tag class, the tags JSON would look like the following: \"tags\": { \"rank\": \"\", \"category\": \"\", \"class\": \"my_new_value\" } - /// - /// The OneSignal App ID the user record is found under. - /// The External User ID mapped to teh device record in OneSignal. Must be actively set on the device to be updated. - /// (optional) - pplx::task> updatePlayerTags( - utility::string_t appId, - utility::string_t externalUserId, - boost::optional> updatePlayerTagsRequestBody - ) const override; - /// /// /// /// @@ -722,11 +589,11 @@ class DefaultApi : public IDefaultApi /// /// /// - /// + /// pplx::task updateSubscription( utility::string_t appId, utility::string_t subscriptionId, - std::shared_ptr updateSubscriptionRequestBody + std::shared_ptr subscriptionBody ) const override; /// /// @@ -738,7 +605,7 @@ class DefaultApi : public IDefaultApi /// /// /// - pplx::task> updateUser( + pplx::task> updateUser( utility::string_t appId, utility::string_t aliasLabel, utility::string_t aliasId, diff --git a/include/CppRestOneSignalAPIClient/model/App.h b/include/CppRestOneSignalAPIClient/model/App.h index 83317dd..5d6f04d 100644 --- a/include/CppRestOneSignalAPIClient/model/App.h +++ b/include/CppRestOneSignalAPIClient/model/App.h @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. diff --git a/include/CppRestOneSignalAPIClient/model/BasicNotification.h b/include/CppRestOneSignalAPIClient/model/BasicNotification.h index 1786d03..613f12e 100644 --- a/include/CppRestOneSignalAPIClient/model/BasicNotification.h +++ b/include/CppRestOneSignalAPIClient/model/BasicNotification.h @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. @@ -25,12 +25,13 @@ #include "CppRestOneSignalAPIClient/model/Button.h" #include "CppRestOneSignalAPIClient/Object.h" #include "CppRestOneSignalAPIClient/model/BasicNotification_allOf.h" +#include "CppRestOneSignalAPIClient/model/FilterExpression.h" +#include "CppRestOneSignalAPIClient/model/LanguageStringMap.h" #include "CppRestOneSignalAPIClient/model/NotificationTarget.h" -#include "CppRestOneSignalAPIClient/model/StringMap.h" +#include "CppRestOneSignalAPIClient/model/WebButton.h" #include #include "CppRestOneSignalAPIClient/model/BasicNotification_allOf_android_background_layout.h" -#include "CppRestOneSignalAPIClient/model/PlayerNotificationTarget_include_aliases.h" -#include "CppRestOneSignalAPIClient/model/Filter.h" +#include #include namespace com { @@ -38,11 +39,11 @@ namespace onesignal { namespace client { namespace model { -class PlayerNotificationTarget_include_aliases; -class StringMap; +class LanguageStringMap; class Button; +class WebButton; class BasicNotification_allOf_android_background_layout; -class Filter; +class FilterExpression; /// /// @@ -87,22 +88,13 @@ class BasicNotification void setExcludedSegments(const std::vector& value); /// - /// Specific playerids to send your notification to. _Does not require API Auth Key. Do not combine with other targeting parameters. Not compatible with any other targeting parameters. Example: [\"1dd608f2-c6a1-11e3-851d-000c2940e62c\"] Limit of 2,000 entries per REST API call + /// Specific subscription ids to send your notification to. _Does not require API Auth Key._ Not compatible with any other targeting parameters. Example: [\"1dd608f2-c6a1-11e3-851d-000c2940e62c\"] Limit of 2,000 entries per REST API call /// - std::vector& getIncludePlayerIds(); - bool includePlayerIdsIsSet() const; - void unsetInclude_player_ids(); + std::vector& getIncludeSubscriptionIds(); + bool includeSubscriptionIdsIsSet() const; + void unsetInclude_subscription_ids(); - void setIncludePlayerIds(const std::vector& value); - - /// - /// Target specific devices by custom user IDs assigned via API. Not compatible with any other targeting parameters Example: [\"custom-id-assigned-by-api\"] REQUIRED: REST API Key Authentication Limit of 2,000 entries per REST API call. Note: If targeting push, email, or sms subscribers with same ids, use with channel_for_external_user_ids to indicate you are sending a push or email or sms. - /// - std::vector& getIncludeExternalUserIds(); - bool includeExternalUserIdsIsSet() const; - void unsetInclude_external_user_ids(); - - void setIncludeExternalUserIds(const std::vector& value); + void setIncludeSubscriptionIds(const std::vector& value); /// /// Recommended for Sending Emails - Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts Limit of 2,000 entries per REST API call @@ -123,7 +115,7 @@ class BasicNotification void setIncludePhoneNumbers(const std::vector& value); /// - /// Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using iOS device tokens. Warning: Only works with Production tokens. All non-alphanumeric characters must be removed from each token. If a token does not correspond to an existing user, a new user will be created. Example: ce777617da7f548fe7a9ab6febb56cf39fba6d38203... Limit of 2,000 entries per REST API call + /// Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using iOS device tokens. Warning: Only works with Production tokens. All non-alphanumeric characters must be removed from each token. If a token does not correspond to an existing user, a new user will be created. Example: ce777617da7f548fe7a9ab6febb56cf39fba6d38203... Limit of 2,000 entries per REST API call /// std::vector& getIncludeIosTokens(); bool includeIosTokensIsSet() const; @@ -132,7 +124,7 @@ class BasicNotification void setIncludeIosTokens(const std::vector& value); /// - /// Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Windows URIs. If a token does not correspond to an existing user, a new user will be created. Example: http://s.notify.live.net/u/1/bn1/HmQAAACPaLDr-... Limit of 2,000 entries per REST API call + /// Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Windows URIs. If a token does not correspond to an existing user, a new user will be created. Example: http://s.notify.live.net/u/1/bn1/HmQAAACPaLDr-... Limit of 2,000 entries per REST API call /// std::vector& getIncludeWpWnsUris(); bool includeWpWnsUrisIsSet() const; @@ -141,7 +133,7 @@ class BasicNotification void setIncludeWpWnsUris(const std::vector& value); /// - /// Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Amazon ADM registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: amzn1.adm-registration.v1.XpvSSUk0Rc3hTVVV... Limit of 2,000 entries per REST API call + /// Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Amazon ADM registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: amzn1.adm-registration.v1.XpvSSUk0Rc3hTVVV... Limit of 2,000 entries per REST API call /// std::vector& getIncludeAmazonRegIds(); bool includeAmazonRegIdsIsSet() const; @@ -150,7 +142,7 @@ class BasicNotification void setIncludeAmazonRegIds(const std::vector& value); /// - /// Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Chrome App registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call + /// Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Chrome App registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call /// std::vector& getIncludeChromeRegIds(); bool includeChromeRegIdsIsSet() const; @@ -159,7 +151,7 @@ class BasicNotification void setIncludeChromeRegIds(const std::vector& value); /// - /// Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Chrome Web Push registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call + /// Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Chrome Web Push registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call /// std::vector& getIncludeChromeWebRegIds(); bool includeChromeWebRegIdsIsSet() const; @@ -168,7 +160,7 @@ class BasicNotification void setIncludeChromeWebRegIds(const std::vector& value); /// - /// Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Android device registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call + /// Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Android device registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call /// std::vector& getIncludeAndroidRegIds(); bool includeAndroidRegIdsIsSet() const; @@ -177,13 +169,13 @@ class BasicNotification void setIncludeAndroidRegIds(const std::vector& value); /// - /// + /// Target specific users by aliases assigned via API. An alias can be an external_id, onesignal_id, or a custom alias. Accepts an object where keys are alias labels and values are arrays of alias IDs to include Example usage: { \"external_id\": [\"exId1\", \"extId2\"], \"internal_label\": [\"id1\", \"id2\"] } Not compatible with any other targeting parameters. REQUIRED: REST API Key Authentication Limit of 2,000 entries per REST API call Note: If targeting push, email, or sms subscribers with same ids, use with target_channel to indicate you are sending a push or email or sms. /// - std::shared_ptr getIncludeAliases() const; + std::map& getIncludeAliases(); bool includeAliasesIsSet() const; void unsetInclude_aliases(); - void setIncludeAliases(const std::shared_ptr& value); + void setIncludeAliases(const std::map& value); /// /// @@ -320,15 +312,6 @@ class BasicNotification void setIsChrome(bool value); - /// - /// 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. - /// - utility::string_t getChannelForExternalUserIds() const; - bool channelForExternalUserIdsIsSet() const; - void unsetChannel_for_external_user_ids(); - - void setChannelForExternalUserIds(const utility::string_t& value); - /// /// 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. /// @@ -359,29 +342,29 @@ class BasicNotification /// /// /// - std::shared_ptr getContents() const; + std::shared_ptr getContents() const; bool contentsIsSet() const; void unsetContents(); - void setContents(const std::shared_ptr& value); + void setContents(const std::shared_ptr& value); /// /// /// - std::shared_ptr getHeadings() const; + std::shared_ptr getHeadings() const; bool headingsIsSet() const; void unsetHeadings(); - void setHeadings(const std::shared_ptr& value); + void setHeadings(const std::shared_ptr& value); /// /// /// - std::shared_ptr getSubtitle() const; + std::shared_ptr getSubtitle() const; bool subtitleIsSet() const; void unsetSubtitle(); - void setSubtitle(const std::shared_ptr& value); + void setSubtitle(const std::shared_ptr& value); /// /// Channel: Push Notifications Platform: Huawei A custom map of data that is passed back to your app. Same as using Additional Data within the dashboard. Can use up to 2048 bytes of data. Example: {\"abc\": 123, \"foo\": \"bar\", \"event_performed\": true, \"amount\": 12.1} @@ -530,11 +513,11 @@ class BasicNotification /// /// Channel: Push Notifications Platform: Chrome 48+ Add action buttons to the notification. The id field is required. Example: [{\"id\": \"like-button\", \"text\": \"Like\", \"icon\": \"http://i.imgur.com/N8SN8ZS.png\", \"url\": \"https://yoursite.com\"}, {\"id\": \"read-more-button\", \"text\": \"Read more\", \"icon\": \"http://i.imgur.com/MIxJp1L.png\", \"url\": \"https://yoursite.com\"}] /// - std::vector>& getWebButtons(); + std::vector>& getWebButtons(); bool webButtonsIsSet() const; void unsetWeb_buttons(); - void setWebButtons(const std::vector>& value); + void setWebButtons(const std::vector>& value); /// /// Channel: Push Notifications Platform: iOS Category APS payload, use with registerUserNotificationSettings:categories in your Objective-C / Swift code. Example: calendar category which contains actions like accept and decline iOS 10+ This will trigger your UNNotificationContentExtension whose ID matches this category. @@ -941,6 +924,24 @@ class BasicNotification void setSummaryArgCount(int32_t value); + /// + /// Channel: Push Notifications Platform: iOS 15+ A score to be set per notification to indicate how it should be displayed when grouped. Use a float between 0-1. + /// + double getIosRelevanceScore() const; + bool iosRelevanceScoreIsSet() const; + void unsetIos_relevance_score(); + + void setIosRelevanceScore(double value); + + /// + /// Channel: Push Notifications Platform: iOS 15+ Focus Modes and Interruption Levels indicate the priority and delivery timing of a notification, to \"interrupt\" the user. Can choose from options: ['active', 'passive', 'time_sensitive', 'critical']. Default is active. + /// + utility::string_t getIosInterruptionLevel() const; + bool iosInterruptionLevelIsSet() const; + void unsetIos_interruption_level(); + + void setIosInterruptionLevel(const utility::string_t& value); + /// /// Channel: Email Required. The subject of the email. /// @@ -1016,11 +1017,11 @@ class BasicNotification /// /// /// - std::vector>& getFilters(); + std::vector>& getFilters(); bool filtersIsSet() const; void unsetFilters(); - void setFilters(const std::vector>& value); + void setFilters(const std::vector>& value); /// /// Channel: All JSON object that can be used as a source of message personalization data for fields that support tag variable substitution. Push, SMS: Can accept up to 2048 bytes of valid JSON. Email: Can accept up to 10000 bytes of valid JSON. Example: {\"order_id\": 123, \"currency\": \"USD\", \"amount\": 25} @@ -1037,10 +1038,8 @@ class BasicNotification bool m_Included_segmentsIsSet; std::vector m_Excluded_segments; bool m_Excluded_segmentsIsSet; - std::vector m_Include_player_ids; - bool m_Include_player_idsIsSet; - std::vector m_Include_external_user_ids; - bool m_Include_external_user_idsIsSet; + std::vector m_Include_subscription_ids; + bool m_Include_subscription_idsIsSet; std::vector m_Include_email_tokens; bool m_Include_email_tokensIsSet; std::vector m_Include_phone_numbers; @@ -1057,7 +1056,7 @@ class BasicNotification bool m_Include_chrome_web_reg_idsIsSet; std::vector m_Include_android_reg_ids; bool m_Include_android_reg_idsIsSet; - std::shared_ptr m_Include_aliases; + std::map m_Include_aliases; bool m_Include_aliasesIsSet; utility::string_t m_Target_channel; bool m_Target_channelIsSet; @@ -1089,19 +1088,17 @@ class BasicNotification bool m_IsAdmIsSet; bool m_IsChrome; bool m_IsChromeIsSet; - utility::string_t m_Channel_for_external_user_ids; - bool m_Channel_for_external_user_idsIsSet; utility::string_t m_App_id; bool m_App_idIsSet; utility::string_t m_External_id; bool m_External_idIsSet; utility::string_t m_Idempotency_key; bool m_Idempotency_keyIsSet; - std::shared_ptr m_Contents; + std::shared_ptr m_Contents; bool m_ContentsIsSet; - std::shared_ptr m_Headings; + std::shared_ptr m_Headings; bool m_HeadingsIsSet; - std::shared_ptr m_Subtitle; + std::shared_ptr m_Subtitle; bool m_SubtitleIsSet; std::shared_ptr m_Data; bool m_DataIsSet; @@ -1135,7 +1132,7 @@ class BasicNotification bool m_Chrome_web_imageIsSet; std::vector> m_Buttons; bool m_ButtonsIsSet; - std::vector> m_Web_buttons; + std::vector> m_Web_buttons; bool m_Web_buttonsIsSet; utility::string_t m_Ios_category; bool m_Ios_categoryIsSet; @@ -1227,6 +1224,10 @@ class BasicNotification bool m_Summary_argIsSet; int32_t m_Summary_arg_count; bool m_Summary_arg_countIsSet; + double m_Ios_relevance_score; + bool m_Ios_relevance_scoreIsSet; + utility::string_t m_Ios_interruption_level; + bool m_Ios_interruption_levelIsSet; utility::string_t m_Email_subject; bool m_Email_subjectIsSet; utility::string_t m_Email_body; @@ -1243,7 +1244,7 @@ class BasicNotification bool m_Sms_fromIsSet; std::vector m_Sms_media_urls; bool m_Sms_media_urlsIsSet; - std::vector> m_Filters; + std::vector> m_Filters; bool m_FiltersIsSet; std::shared_ptr m_Custom_data; bool m_Custom_dataIsSet; diff --git a/include/CppRestOneSignalAPIClient/model/BasicNotification_allOf.h b/include/CppRestOneSignalAPIClient/model/BasicNotification_allOf.h index e38493a..b59699b 100644 --- a/include/CppRestOneSignalAPIClient/model/BasicNotification_allOf.h +++ b/include/CppRestOneSignalAPIClient/model/BasicNotification_allOf.h @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. @@ -24,10 +24,11 @@ #include "CppRestOneSignalAPIClient/model/Button.h" #include "CppRestOneSignalAPIClient/Object.h" -#include "CppRestOneSignalAPIClient/model/StringMap.h" +#include "CppRestOneSignalAPIClient/model/FilterExpression.h" +#include "CppRestOneSignalAPIClient/model/LanguageStringMap.h" +#include "CppRestOneSignalAPIClient/model/WebButton.h" #include #include "CppRestOneSignalAPIClient/model/BasicNotification_allOf_android_background_layout.h" -#include "CppRestOneSignalAPIClient/model/Filter.h" #include namespace com { @@ -35,10 +36,11 @@ namespace onesignal { namespace client { namespace model { -class StringMap; +class LanguageStringMap; class Button; +class WebButton; class BasicNotification_allOf_android_background_layout; -class Filter; +class FilterExpression; /// /// @@ -190,15 +192,6 @@ class BasicNotification_allOf void setIsChrome(bool value); - /// - /// 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. - /// - utility::string_t getChannelForExternalUserIds() const; - bool channelForExternalUserIdsIsSet() const; - void unsetChannel_for_external_user_ids(); - - void setChannelForExternalUserIds(const utility::string_t& value); - /// /// 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. /// @@ -229,29 +222,29 @@ class BasicNotification_allOf /// /// /// - std::shared_ptr getContents() const; + std::shared_ptr getContents() const; bool contentsIsSet() const; void unsetContents(); - void setContents(const std::shared_ptr& value); + void setContents(const std::shared_ptr& value); /// /// /// - std::shared_ptr getHeadings() const; + std::shared_ptr getHeadings() const; bool headingsIsSet() const; void unsetHeadings(); - void setHeadings(const std::shared_ptr& value); + void setHeadings(const std::shared_ptr& value); /// /// /// - std::shared_ptr getSubtitle() const; + std::shared_ptr getSubtitle() const; bool subtitleIsSet() const; void unsetSubtitle(); - void setSubtitle(const std::shared_ptr& value); + void setSubtitle(const std::shared_ptr& value); /// /// Channel: Push Notifications Platform: Huawei A custom map of data that is passed back to your app. Same as using Additional Data within the dashboard. Can use up to 2048 bytes of data. Example: {\"abc\": 123, \"foo\": \"bar\", \"event_performed\": true, \"amount\": 12.1} @@ -400,11 +393,11 @@ class BasicNotification_allOf /// /// Channel: Push Notifications Platform: Chrome 48+ Add action buttons to the notification. The id field is required. Example: [{\"id\": \"like-button\", \"text\": \"Like\", \"icon\": \"http://i.imgur.com/N8SN8ZS.png\", \"url\": \"https://yoursite.com\"}, {\"id\": \"read-more-button\", \"text\": \"Read more\", \"icon\": \"http://i.imgur.com/MIxJp1L.png\", \"url\": \"https://yoursite.com\"}] /// - std::vector>& getWebButtons(); + std::vector>& getWebButtons(); bool webButtonsIsSet() const; void unsetWeb_buttons(); - void setWebButtons(const std::vector>& value); + void setWebButtons(const std::vector>& value); /// /// Channel: Push Notifications Platform: iOS Category APS payload, use with registerUserNotificationSettings:categories in your Objective-C / Swift code. Example: calendar category which contains actions like accept and decline iOS 10+ This will trigger your UNNotificationContentExtension whose ID matches this category. @@ -811,6 +804,24 @@ class BasicNotification_allOf void setSummaryArgCount(int32_t value); + /// + /// Channel: Push Notifications Platform: iOS 15+ A score to be set per notification to indicate how it should be displayed when grouped. Use a float between 0-1. + /// + double getIosRelevanceScore() const; + bool iosRelevanceScoreIsSet() const; + void unsetIos_relevance_score(); + + void setIosRelevanceScore(double value); + + /// + /// Channel: Push Notifications Platform: iOS 15+ Focus Modes and Interruption Levels indicate the priority and delivery timing of a notification, to \"interrupt\" the user. Can choose from options: ['active', 'passive', 'time_sensitive', 'critical']. Default is active. + /// + utility::string_t getIosInterruptionLevel() const; + bool iosInterruptionLevelIsSet() const; + void unsetIos_interruption_level(); + + void setIosInterruptionLevel(const utility::string_t& value); + /// /// Channel: Email Required. The subject of the email. /// @@ -886,11 +897,11 @@ class BasicNotification_allOf /// /// /// - std::vector>& getFilters(); + std::vector>& getFilters(); bool filtersIsSet() const; void unsetFilters(); - void setFilters(const std::vector>& value); + void setFilters(const std::vector>& value); /// /// Channel: All JSON object that can be used as a source of message personalization data for fields that support tag variable substitution. Push, SMS: Can accept up to 2048 bytes of valid JSON. Email: Can accept up to 10000 bytes of valid JSON. Example: {\"order_id\": 123, \"currency\": \"USD\", \"amount\": 25} @@ -931,19 +942,17 @@ class BasicNotification_allOf bool m_IsAdmIsSet; bool m_IsChrome; bool m_IsChromeIsSet; - utility::string_t m_Channel_for_external_user_ids; - bool m_Channel_for_external_user_idsIsSet; utility::string_t m_App_id; bool m_App_idIsSet; utility::string_t m_External_id; bool m_External_idIsSet; utility::string_t m_Idempotency_key; bool m_Idempotency_keyIsSet; - std::shared_ptr m_Contents; + std::shared_ptr m_Contents; bool m_ContentsIsSet; - std::shared_ptr m_Headings; + std::shared_ptr m_Headings; bool m_HeadingsIsSet; - std::shared_ptr m_Subtitle; + std::shared_ptr m_Subtitle; bool m_SubtitleIsSet; std::shared_ptr m_Data; bool m_DataIsSet; @@ -977,7 +986,7 @@ class BasicNotification_allOf bool m_Chrome_web_imageIsSet; std::vector> m_Buttons; bool m_ButtonsIsSet; - std::vector> m_Web_buttons; + std::vector> m_Web_buttons; bool m_Web_buttonsIsSet; utility::string_t m_Ios_category; bool m_Ios_categoryIsSet; @@ -1069,6 +1078,10 @@ class BasicNotification_allOf bool m_Summary_argIsSet; int32_t m_Summary_arg_count; bool m_Summary_arg_countIsSet; + double m_Ios_relevance_score; + bool m_Ios_relevance_scoreIsSet; + utility::string_t m_Ios_interruption_level; + bool m_Ios_interruption_levelIsSet; utility::string_t m_Email_subject; bool m_Email_subjectIsSet; utility::string_t m_Email_body; @@ -1085,7 +1098,7 @@ class BasicNotification_allOf bool m_Sms_fromIsSet; std::vector m_Sms_media_urls; bool m_Sms_media_urlsIsSet; - std::vector> m_Filters; + std::vector> m_Filters; bool m_FiltersIsSet; std::shared_ptr m_Custom_data; bool m_Custom_dataIsSet; diff --git a/include/CppRestOneSignalAPIClient/model/BasicNotification_allOf_android_background_layout.h b/include/CppRestOneSignalAPIClient/model/BasicNotification_allOf_android_background_layout.h index 4ee9206..1ec00ef 100644 --- a/include/CppRestOneSignalAPIClient/model/BasicNotification_allOf_android_background_layout.h +++ b/include/CppRestOneSignalAPIClient/model/BasicNotification_allOf_android_background_layout.h @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. diff --git a/include/CppRestOneSignalAPIClient/model/BeginLiveActivityRequest.h b/include/CppRestOneSignalAPIClient/model/BeginLiveActivityRequest.h deleted file mode 100644 index cab11da..0000000 --- a/include/CppRestOneSignalAPIClient/model/BeginLiveActivityRequest.h +++ /dev/null @@ -1,89 +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.4.0 - * Contact: devrel@onesignal.com - * - * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * BeginLiveActivityRequest.h - * - * - */ - -#ifndef COM_ONESIGNAL_CLIENT_MODEL_BeginLiveActivityRequest_H_ -#define COM_ONESIGNAL_CLIENT_MODEL_BeginLiveActivityRequest_H_ - - -#include "CppRestOneSignalAPIClient/ModelBase.h" - -#include - -namespace com { -namespace onesignal { -namespace client { -namespace model { - - -/// -/// -/// -class BeginLiveActivityRequest - : public ModelBase -{ -public: - BeginLiveActivityRequest(); - virtual ~BeginLiveActivityRequest(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - ///////////////////////////////////////////// - /// BeginLiveActivityRequest members - - /// - /// - /// - utility::string_t getPushToken() const; - bool pushTokenIsSet() const; - void unsetPush_token(); - - void setPushToken(const utility::string_t& value); - - /// - /// - /// - utility::string_t getSubscriptionId() const; - bool subscriptionIdIsSet() const; - void unsetSubscription_id(); - - void setSubscriptionId(const utility::string_t& value); - - -protected: - utility::string_t m_Push_token; - bool m_Push_tokenIsSet; - utility::string_t m_Subscription_id; - bool m_Subscription_idIsSet; -}; - - -} -} -} -} - -#endif /* COM_ONESIGNAL_CLIENT_MODEL_BeginLiveActivityRequest_H_ */ diff --git a/include/CppRestOneSignalAPIClient/model/Button.h b/include/CppRestOneSignalAPIClient/model/Button.h index 978889a..1713729 100644 --- a/include/CppRestOneSignalAPIClient/model/Button.h +++ b/include/CppRestOneSignalAPIClient/model/Button.h @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. diff --git a/include/CppRestOneSignalAPIClient/model/CancelNotificationSuccessResponse.h b/include/CppRestOneSignalAPIClient/model/CancelNotificationSuccessResponse.h deleted file mode 100644 index d36c5a4..0000000 --- a/include/CppRestOneSignalAPIClient/model/CancelNotificationSuccessResponse.h +++ /dev/null @@ -1,77 +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.4.0 - * Contact: devrel@onesignal.com - * - * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * CancelNotificationSuccessResponse.h - * - * - */ - -#ifndef COM_ONESIGNAL_CLIENT_MODEL_CancelNotificationSuccessResponse_H_ -#define COM_ONESIGNAL_CLIENT_MODEL_CancelNotificationSuccessResponse_H_ - - -#include "CppRestOneSignalAPIClient/ModelBase.h" - - -namespace com { -namespace onesignal { -namespace client { -namespace model { - - -/// -/// -/// -class CancelNotificationSuccessResponse - : public ModelBase -{ -public: - CancelNotificationSuccessResponse(); - virtual ~CancelNotificationSuccessResponse(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - ///////////////////////////////////////////// - /// CancelNotificationSuccessResponse members - - /// - /// - /// - bool isSuccess() const; - bool successIsSet() const; - void unsetSuccess(); - - void setSuccess(bool value); - - -protected: - bool m_Success; - bool m_SuccessIsSet; -}; - - -} -} -} -} - -#endif /* COM_ONESIGNAL_CLIENT_MODEL_CancelNotificationSuccessResponse_H_ */ diff --git a/include/CppRestOneSignalAPIClient/model/CreateNotificationSuccessResponse.h b/include/CppRestOneSignalAPIClient/model/CreateNotificationSuccessResponse.h index 59f5eb9..426b6da 100644 --- a/include/CppRestOneSignalAPIClient/model/CreateNotificationSuccessResponse.h +++ b/include/CppRestOneSignalAPIClient/model/CreateNotificationSuccessResponse.h @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. @@ -22,7 +22,6 @@ #include "CppRestOneSignalAPIClient/ModelBase.h" -#include "CppRestOneSignalAPIClient/model/Notification200Errors.h" #include namespace com { @@ -30,7 +29,6 @@ namespace onesignal { namespace client { namespace model { -class Notification200Errors; /// /// @@ -65,15 +63,6 @@ class CreateNotificationSuccessResponse void setId(const utility::string_t& value); - /// - /// Estimated number of subscribers targetted by notification. - /// - int32_t getRecipients() const; - bool recipientsIsSet() const; - void unsetRecipients(); - - void setRecipients(int32_t value); - /// /// /// @@ -84,23 +73,21 @@ class CreateNotificationSuccessResponse void setExternalId(const utility::string_t& value); /// - /// + /// Errors include the identifiers that are invalid, or that there are no subscribers. /// - std::shared_ptr getErrors() const; + std::shared_ptr getErrors() const; bool errorsIsSet() const; void unsetErrors(); - void setErrors(const std::shared_ptr& value); + void setErrors(const std::shared_ptr& value); protected: utility::string_t m_Id; bool m_IdIsSet; - int32_t m_Recipients; - bool m_RecipientsIsSet; utility::string_t m_External_id; bool m_External_idIsSet; - std::shared_ptr m_Errors; + std::shared_ptr m_Errors; bool m_ErrorsIsSet; }; diff --git a/include/CppRestOneSignalAPIClient/model/CreateSegmentConflictResponse.h b/include/CppRestOneSignalAPIClient/model/CreateSegmentConflictResponse.h index 613813a..3be0366 100644 --- a/include/CppRestOneSignalAPIClient/model/CreateSegmentConflictResponse.h +++ b/include/CppRestOneSignalAPIClient/model/CreateSegmentConflictResponse.h @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. diff --git a/include/CppRestOneSignalAPIClient/model/CreateSegmentSuccessResponse.h b/include/CppRestOneSignalAPIClient/model/CreateSegmentSuccessResponse.h index 682d9bf..2560ec4 100644 --- a/include/CppRestOneSignalAPIClient/model/CreateSegmentSuccessResponse.h +++ b/include/CppRestOneSignalAPIClient/model/CreateSegmentSuccessResponse.h @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. diff --git a/include/CppRestOneSignalAPIClient/model/CreateSubscriptionRequestBody.h b/include/CppRestOneSignalAPIClient/model/CreateSubscriptionRequestBody.h deleted file mode 100644 index bddbff8..0000000 --- a/include/CppRestOneSignalAPIClient/model/CreateSubscriptionRequestBody.h +++ /dev/null @@ -1,90 +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.4.0 - * Contact: devrel@onesignal.com - * - * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * CreateSubscriptionRequestBody.h - * - * - */ - -#ifndef COM_ONESIGNAL_CLIENT_MODEL_CreateSubscriptionRequestBody_H_ -#define COM_ONESIGNAL_CLIENT_MODEL_CreateSubscriptionRequestBody_H_ - - -#include "CppRestOneSignalAPIClient/ModelBase.h" - -#include "CppRestOneSignalAPIClient/model/SubscriptionObject.h" - -namespace com { -namespace onesignal { -namespace client { -namespace model { - -class SubscriptionObject; - -/// -/// -/// -class CreateSubscriptionRequestBody - : public ModelBase -{ -public: - CreateSubscriptionRequestBody(); - virtual ~CreateSubscriptionRequestBody(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - ///////////////////////////////////////////// - /// CreateSubscriptionRequestBody members - - /// - /// - /// - std::shared_ptr getSubscription() const; - bool subscriptionIsSet() const; - void unsetSubscription(); - - void setSubscription(const std::shared_ptr& value); - - /// - /// - /// - bool isRetainPreviousOwner() const; - bool retainPreviousOwnerIsSet() const; - void unsetRetain_previous_owner(); - - void setRetainPreviousOwner(bool value); - - -protected: - std::shared_ptr m_Subscription; - bool m_SubscriptionIsSet; - bool m_Retain_previous_owner; - bool m_Retain_previous_ownerIsSet; -}; - - -} -} -} -} - -#endif /* COM_ONESIGNAL_CLIENT_MODEL_CreateSubscriptionRequestBody_H_ */ diff --git a/include/CppRestOneSignalAPIClient/model/CreateUserConflictResponse.h b/include/CppRestOneSignalAPIClient/model/CreateUserConflictResponse.h index 8831ff2..4663b77 100644 --- a/include/CppRestOneSignalAPIClient/model/CreateUserConflictResponse.h +++ b/include/CppRestOneSignalAPIClient/model/CreateUserConflictResponse.h @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. diff --git a/include/CppRestOneSignalAPIClient/model/CreateUserConflictResponse_errorsItems_meta.h b/include/CppRestOneSignalAPIClient/model/CreateUserConflictResponse_errorsItems_meta.h index 6bc76ff..a70b625 100644 --- a/include/CppRestOneSignalAPIClient/model/CreateUserConflictResponse_errorsItems_meta.h +++ b/include/CppRestOneSignalAPIClient/model/CreateUserConflictResponse_errorsItems_meta.h @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. diff --git a/include/CppRestOneSignalAPIClient/model/CreateUserConflictResponse_errors_inner.h b/include/CppRestOneSignalAPIClient/model/CreateUserConflictResponse_errors_inner.h index 02d91f0..713efbc 100644 --- a/include/CppRestOneSignalAPIClient/model/CreateUserConflictResponse_errors_inner.h +++ b/include/CppRestOneSignalAPIClient/model/CreateUserConflictResponse_errors_inner.h @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. diff --git a/include/CppRestOneSignalAPIClient/model/DeletePlayerNotFoundResponse.h b/include/CppRestOneSignalAPIClient/model/DeletePlayerNotFoundResponse.h deleted file mode 100644 index 277287a..0000000 --- a/include/CppRestOneSignalAPIClient/model/DeletePlayerNotFoundResponse.h +++ /dev/null @@ -1,77 +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.4.0 - * Contact: devrel@onesignal.com - * - * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * DeletePlayerNotFoundResponse.h - * - * - */ - -#ifndef COM_ONESIGNAL_CLIENT_MODEL_DeletePlayerNotFoundResponse_H_ -#define COM_ONESIGNAL_CLIENT_MODEL_DeletePlayerNotFoundResponse_H_ - - -#include "CppRestOneSignalAPIClient/ModelBase.h" - - -namespace com { -namespace onesignal { -namespace client { -namespace model { - - -/// -/// -/// -class DeletePlayerNotFoundResponse - : public ModelBase -{ -public: - DeletePlayerNotFoundResponse(); - virtual ~DeletePlayerNotFoundResponse(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - ///////////////////////////////////////////// - /// DeletePlayerNotFoundResponse members - - /// - /// - /// - bool isSuccess() const; - bool successIsSet() const; - void unsetSuccess(); - - void setSuccess(bool value); - - -protected: - bool m_Success; - bool m_SuccessIsSet; -}; - - -} -} -} -} - -#endif /* COM_ONESIGNAL_CLIENT_MODEL_DeletePlayerNotFoundResponse_H_ */ diff --git a/include/CppRestOneSignalAPIClient/model/DeleteSegmentNotFoundResponse.h b/include/CppRestOneSignalAPIClient/model/DeleteSegmentNotFoundResponse.h deleted file mode 100644 index c8cc9fc..0000000 --- a/include/CppRestOneSignalAPIClient/model/DeleteSegmentNotFoundResponse.h +++ /dev/null @@ -1,77 +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.4.0 - * Contact: devrel@onesignal.com - * - * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * DeleteSegmentNotFoundResponse.h - * - * - */ - -#ifndef COM_ONESIGNAL_CLIENT_MODEL_DeleteSegmentNotFoundResponse_H_ -#define COM_ONESIGNAL_CLIENT_MODEL_DeleteSegmentNotFoundResponse_H_ - - -#include "CppRestOneSignalAPIClient/ModelBase.h" - - -namespace com { -namespace onesignal { -namespace client { -namespace model { - - -/// -/// -/// -class DeleteSegmentNotFoundResponse - : public ModelBase -{ -public: - DeleteSegmentNotFoundResponse(); - virtual ~DeleteSegmentNotFoundResponse(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - ///////////////////////////////////////////// - /// DeleteSegmentNotFoundResponse members - - /// - /// - /// - bool isSuccess() const; - bool successIsSet() const; - void unsetSuccess(); - - void setSuccess(bool value); - - -protected: - bool m_Success; - bool m_SuccessIsSet; -}; - - -} -} -} -} - -#endif /* COM_ONESIGNAL_CLIENT_MODEL_DeleteSegmentNotFoundResponse_H_ */ diff --git a/include/CppRestOneSignalAPIClient/model/DeleteSegmentSuccessResponse.h b/include/CppRestOneSignalAPIClient/model/DeleteSegmentSuccessResponse.h deleted file mode 100644 index 03442f0..0000000 --- a/include/CppRestOneSignalAPIClient/model/DeleteSegmentSuccessResponse.h +++ /dev/null @@ -1,77 +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.4.0 - * Contact: devrel@onesignal.com - * - * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * DeleteSegmentSuccessResponse.h - * - * - */ - -#ifndef COM_ONESIGNAL_CLIENT_MODEL_DeleteSegmentSuccessResponse_H_ -#define COM_ONESIGNAL_CLIENT_MODEL_DeleteSegmentSuccessResponse_H_ - - -#include "CppRestOneSignalAPIClient/ModelBase.h" - - -namespace com { -namespace onesignal { -namespace client { -namespace model { - - -/// -/// -/// -class DeleteSegmentSuccessResponse - : public ModelBase -{ -public: - DeleteSegmentSuccessResponse(); - virtual ~DeleteSegmentSuccessResponse(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - ///////////////////////////////////////////// - /// DeleteSegmentSuccessResponse members - - /// - /// - /// - bool isSuccess() const; - bool successIsSet() const; - void unsetSuccess(); - - void setSuccess(bool value); - - -protected: - bool m_Success; - bool m_SuccessIsSet; -}; - - -} -} -} -} - -#endif /* COM_ONESIGNAL_CLIENT_MODEL_DeleteSegmentSuccessResponse_H_ */ diff --git a/include/CppRestOneSignalAPIClient/model/DeliveryData.h b/include/CppRestOneSignalAPIClient/model/DeliveryData.h index 8312fd3..be42514 100644 --- a/include/CppRestOneSignalAPIClient/model/DeliveryData.h +++ b/include/CppRestOneSignalAPIClient/model/DeliveryData.h @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. diff --git a/include/CppRestOneSignalAPIClient/model/ExportEventsSuccessResponse.h b/include/CppRestOneSignalAPIClient/model/ExportEventsSuccessResponse.h index 6be6333..a354aec 100644 --- a/include/CppRestOneSignalAPIClient/model/ExportEventsSuccessResponse.h +++ b/include/CppRestOneSignalAPIClient/model/ExportEventsSuccessResponse.h @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. diff --git a/include/CppRestOneSignalAPIClient/model/ExportPlayersSuccessResponse.h b/include/CppRestOneSignalAPIClient/model/ExportSubscriptionsSuccessResponse.h similarity index 73% rename from include/CppRestOneSignalAPIClient/model/ExportPlayersSuccessResponse.h rename to include/CppRestOneSignalAPIClient/model/ExportSubscriptionsSuccessResponse.h index 55b1af3..33033b7 100644 --- a/include/CppRestOneSignalAPIClient/model/ExportPlayersSuccessResponse.h +++ b/include/CppRestOneSignalAPIClient/model/ExportSubscriptionsSuccessResponse.h @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. @@ -11,13 +11,13 @@ */ /* - * ExportPlayersSuccessResponse.h + * ExportSubscriptionsSuccessResponse.h * * */ -#ifndef COM_ONESIGNAL_CLIENT_MODEL_ExportPlayersSuccessResponse_H_ -#define COM_ONESIGNAL_CLIENT_MODEL_ExportPlayersSuccessResponse_H_ +#ifndef COM_ONESIGNAL_CLIENT_MODEL_ExportSubscriptionsSuccessResponse_H_ +#define COM_ONESIGNAL_CLIENT_MODEL_ExportSubscriptionsSuccessResponse_H_ #include "CppRestOneSignalAPIClient/ModelBase.h" @@ -33,12 +33,12 @@ namespace model { /// /// /// -class ExportPlayersSuccessResponse +class ExportSubscriptionsSuccessResponse : public ModelBase { public: - ExportPlayersSuccessResponse(); - virtual ~ExportPlayersSuccessResponse(); + ExportSubscriptionsSuccessResponse(); + virtual ~ExportSubscriptionsSuccessResponse(); ///////////////////////////////////////////// /// ModelBase overrides @@ -52,7 +52,7 @@ class ExportPlayersSuccessResponse bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; ///////////////////////////////////////////// - /// ExportPlayersSuccessResponse members + /// ExportSubscriptionsSuccessResponse members /// /// @@ -75,4 +75,4 @@ class ExportPlayersSuccessResponse } } -#endif /* COM_ONESIGNAL_CLIENT_MODEL_ExportPlayersSuccessResponse_H_ */ +#endif /* COM_ONESIGNAL_CLIENT_MODEL_ExportSubscriptionsSuccessResponse_H_ */ diff --git a/include/CppRestOneSignalAPIClient/model/Export_players_request_body.h b/include/CppRestOneSignalAPIClient/model/Export_subscriptions_request_body.h similarity index 82% rename from include/CppRestOneSignalAPIClient/model/Export_players_request_body.h rename to include/CppRestOneSignalAPIClient/model/Export_subscriptions_request_body.h index c36d029..acb2b2c 100644 --- a/include/CppRestOneSignalAPIClient/model/Export_players_request_body.h +++ b/include/CppRestOneSignalAPIClient/model/Export_subscriptions_request_body.h @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. @@ -11,13 +11,13 @@ */ /* - * Export_players_request_body.h + * Export_subscriptions_request_body.h * * */ -#ifndef COM_ONESIGNAL_CLIENT_MODEL_Export_players_request_body_H_ -#define COM_ONESIGNAL_CLIENT_MODEL_Export_players_request_body_H_ +#ifndef COM_ONESIGNAL_CLIENT_MODEL_Export_subscriptions_request_body_H_ +#define COM_ONESIGNAL_CLIENT_MODEL_Export_subscriptions_request_body_H_ #include "CppRestOneSignalAPIClient/ModelBase.h" @@ -34,12 +34,12 @@ namespace model { /// /// /// -class Export_players_request_body +class Export_subscriptions_request_body : public ModelBase { public: - Export_players_request_body(); - virtual ~Export_players_request_body(); + Export_subscriptions_request_body(); + virtual ~Export_subscriptions_request_body(); ///////////////////////////////////////////// /// ModelBase overrides @@ -53,7 +53,7 @@ class Export_players_request_body bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; ///////////////////////////////////////////// - /// Export_players_request_body members + /// Export_subscriptions_request_body members /// /// Additional fields that you wish to include. Currently supports location, country, rooted, notification_types, ip, external_user_id, web_auth, and web_p256. @@ -98,4 +98,4 @@ class Export_players_request_body } } -#endif /* COM_ONESIGNAL_CLIENT_MODEL_Export_players_request_body_H_ */ +#endif /* COM_ONESIGNAL_CLIENT_MODEL_Export_subscriptions_request_body_H_ */ diff --git a/include/CppRestOneSignalAPIClient/model/Filter.h b/include/CppRestOneSignalAPIClient/model/Filter.h index 86e6f4f..a1af3fa 100644 --- a/include/CppRestOneSignalAPIClient/model/Filter.h +++ b/include/CppRestOneSignalAPIClient/model/Filter.h @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. @@ -55,7 +55,7 @@ class Filter /// Filter members /// - /// Name of the field to use as the first operand in the filter expression. + /// Required. Name of the field to use as the first operand in the filter expression. /// utility::string_t getField() const; bool fieldIsSet() const; @@ -82,7 +82,43 @@ class Filter void setValue(const utility::string_t& value); /// - /// Operator of a filter expression. + /// If `field` is session-related, this is *required* to specify the number of hours before or after the user's session. + /// + utility::string_t getHoursAgo() const; + bool hoursAgoIsSet() const; + void unsetHours_ago(); + + void setHoursAgo(const utility::string_t& value); + + /// + /// If `field` is `location`, this will specify the radius in meters from a provided location point. Use with `lat` and `long`. + /// + double getRadius() const; + bool radiusIsSet() const; + void unsetRadius(); + + void setRadius(double value); + + /// + /// If `field` is `location`, this is *required* to specify the user's latitude. + /// + double getLat() const; + bool latIsSet() const; + void unsetLat(); + + void setLat(double value); + + /// + /// If `field` is `location`, this is *required* to specify the user's longitude. + /// + double getLong() const; + bool r_longIsSet() const; + void unsetlong(); + + void setLong(double value); + + /// + /// Required. Operator of a filter expression. /// utility::string_t getRelation() const; bool relationIsSet() const; @@ -98,6 +134,14 @@ class Filter bool m_KeyIsSet; utility::string_t m_Value; bool m_ValueIsSet; + utility::string_t m_Hours_ago; + bool m_Hours_agoIsSet; + double m_Radius; + bool m_RadiusIsSet; + double m_Lat; + bool m_LatIsSet; + double m_long; + bool m_longIsSet; utility::string_t m_Relation; bool m_RelationIsSet; }; diff --git a/include/CppRestOneSignalAPIClient/model/FilterExpressions.h b/include/CppRestOneSignalAPIClient/model/FilterExpression.h similarity index 60% rename from include/CppRestOneSignalAPIClient/model/FilterExpressions.h rename to include/CppRestOneSignalAPIClient/model/FilterExpression.h index 3f469f5..245e2b3 100644 --- a/include/CppRestOneSignalAPIClient/model/FilterExpressions.h +++ b/include/CppRestOneSignalAPIClient/model/FilterExpression.h @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. @@ -11,13 +11,13 @@ */ /* - * FilterExpressions.h + * FilterExpression.h * * */ -#ifndef COM_ONESIGNAL_CLIENT_MODEL_FilterExpressions_H_ -#define COM_ONESIGNAL_CLIENT_MODEL_FilterExpressions_H_ +#ifndef COM_ONESIGNAL_CLIENT_MODEL_FilterExpression_H_ +#define COM_ONESIGNAL_CLIENT_MODEL_FilterExpression_H_ #include "CppRestOneSignalAPIClient/ModelBase.h" @@ -35,12 +35,12 @@ namespace model { /// /// /// -class FilterExpressions +class FilterExpression : public ModelBase { public: - FilterExpressions(); - virtual ~FilterExpressions(); + FilterExpression(); + virtual ~FilterExpression(); ///////////////////////////////////////////// /// ModelBase overrides @@ -54,10 +54,10 @@ class FilterExpressions bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; ///////////////////////////////////////////// - /// FilterExpressions members + /// FilterExpression members /// - /// Name of the field to use as the first operand in the filter expression. + /// Required. Name of the field to use as the first operand in the filter expression. /// utility::string_t getField() const; bool fieldIsSet() const; @@ -84,7 +84,43 @@ class FilterExpressions void setValue(const utility::string_t& value); /// - /// Operator of a filter expression. + /// If `field` is session-related, this is *required* to specify the number of hours before or after the user's session. + /// + utility::string_t getHoursAgo() const; + bool hoursAgoIsSet() const; + void unsetHours_ago(); + + void setHoursAgo(const utility::string_t& value); + + /// + /// If `field` is `location`, this will specify the radius in meters from a provided location point. Use with `lat` and `long`. + /// + double getRadius() const; + bool radiusIsSet() const; + void unsetRadius(); + + void setRadius(double value); + + /// + /// If `field` is `location`, this is *required* to specify the user's latitude. + /// + double getLat() const; + bool latIsSet() const; + void unsetLat(); + + void setLat(double value); + + /// + /// If `field` is `location`, this is *required* to specify the user's longitude. + /// + double getLong() const; + bool r_longIsSet() const; + void unsetlong(); + + void setLong(double value); + + /// + /// Required. Operator of a filter expression. /// utility::string_t getRelation() const; bool relationIsSet() const; @@ -109,6 +145,14 @@ class FilterExpressions bool m_KeyIsSet; utility::string_t m_Value; bool m_ValueIsSet; + utility::string_t m_Hours_ago; + bool m_Hours_agoIsSet; + double m_Radius; + bool m_RadiusIsSet; + double m_Lat; + bool m_LatIsSet; + double m_long; + bool m_longIsSet; utility::string_t m_Relation; bool m_RelationIsSet; utility::string_t m_r_operator; @@ -121,4 +165,4 @@ class FilterExpressions } } -#endif /* COM_ONESIGNAL_CLIENT_MODEL_FilterExpressions_H_ */ +#endif /* COM_ONESIGNAL_CLIENT_MODEL_FilterExpression_H_ */ diff --git a/include/CppRestOneSignalAPIClient/model/GenericError.h b/include/CppRestOneSignalAPIClient/model/GenericError.h index bc389b5..c3c18ef 100644 --- a/include/CppRestOneSignalAPIClient/model/GenericError.h +++ b/include/CppRestOneSignalAPIClient/model/GenericError.h @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. @@ -22,15 +22,12 @@ #include "CppRestOneSignalAPIClient/ModelBase.h" -#include -#include "CppRestOneSignalAPIClient/model/GenericError_errors_inner.h" namespace com { namespace onesignal { namespace client { namespace model { -class GenericError_errors_inner; /// /// @@ -59,16 +56,38 @@ class GenericError /// /// /// - std::vector>& getErrors(); + std::shared_ptr getErrors() const; bool errorsIsSet() const; void unsetErrors(); - void setErrors(const std::vector>& value); + void setErrors(const std::shared_ptr& value); + + /// + /// + /// + bool isSuccess() const; + bool successIsSet() const; + void unsetSuccess(); + + void setSuccess(bool value); + + /// + /// + /// + std::shared_ptr getReference() const; + bool referenceIsSet() const; + void unsetReference(); + + void setReference(const std::shared_ptr& value); protected: - std::vector> m_Errors; + std::shared_ptr m_Errors; bool m_ErrorsIsSet; + bool m_Success; + bool m_SuccessIsSet; + std::shared_ptr m_Reference; + bool m_ReferenceIsSet; }; diff --git a/include/CppRestOneSignalAPIClient/model/GenericError_errors_inner.h b/include/CppRestOneSignalAPIClient/model/GenericError_errors_inner.h deleted file mode 100644 index 2811b81..0000000 --- a/include/CppRestOneSignalAPIClient/model/GenericError_errors_inner.h +++ /dev/null @@ -1,89 +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.4.0 - * Contact: devrel@onesignal.com - * - * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * GenericError_errors_inner.h - * - * - */ - -#ifndef COM_ONESIGNAL_CLIENT_MODEL_GenericError_errors_inner_H_ -#define COM_ONESIGNAL_CLIENT_MODEL_GenericError_errors_inner_H_ - - -#include "CppRestOneSignalAPIClient/ModelBase.h" - -#include - -namespace com { -namespace onesignal { -namespace client { -namespace model { - - -/// -/// -/// -class GenericError_errors_inner - : public ModelBase -{ -public: - GenericError_errors_inner(); - virtual ~GenericError_errors_inner(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - ///////////////////////////////////////////// - /// GenericError_errors_inner members - - /// - /// - /// - utility::string_t getCode() const; - bool codeIsSet() const; - void unsetCode(); - - void setCode(const utility::string_t& value); - - /// - /// - /// - utility::string_t getTitle() const; - bool titleIsSet() const; - void unsetTitle(); - - void setTitle(const utility::string_t& value); - - -protected: - utility::string_t m_Code; - bool m_CodeIsSet; - utility::string_t m_Title; - bool m_TitleIsSet; -}; - - -} -} -} -} - -#endif /* COM_ONESIGNAL_CLIENT_MODEL_GenericError_errors_inner_H_ */ diff --git a/include/CppRestOneSignalAPIClient/model/DeletePlayerSuccessResponse.h b/include/CppRestOneSignalAPIClient/model/GenericSuccessBoolResponse.h similarity index 74% rename from include/CppRestOneSignalAPIClient/model/DeletePlayerSuccessResponse.h rename to include/CppRestOneSignalAPIClient/model/GenericSuccessBoolResponse.h index 6c4d1de..b465e21 100644 --- a/include/CppRestOneSignalAPIClient/model/DeletePlayerSuccessResponse.h +++ b/include/CppRestOneSignalAPIClient/model/GenericSuccessBoolResponse.h @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. @@ -11,13 +11,13 @@ */ /* - * DeletePlayerSuccessResponse.h + * GenericSuccessBoolResponse.h * * */ -#ifndef COM_ONESIGNAL_CLIENT_MODEL_DeletePlayerSuccessResponse_H_ -#define COM_ONESIGNAL_CLIENT_MODEL_DeletePlayerSuccessResponse_H_ +#ifndef COM_ONESIGNAL_CLIENT_MODEL_GenericSuccessBoolResponse_H_ +#define COM_ONESIGNAL_CLIENT_MODEL_GenericSuccessBoolResponse_H_ #include "CppRestOneSignalAPIClient/ModelBase.h" @@ -32,12 +32,12 @@ namespace model { /// /// /// -class DeletePlayerSuccessResponse +class GenericSuccessBoolResponse : public ModelBase { public: - DeletePlayerSuccessResponse(); - virtual ~DeletePlayerSuccessResponse(); + GenericSuccessBoolResponse(); + virtual ~GenericSuccessBoolResponse(); ///////////////////////////////////////////// /// ModelBase overrides @@ -51,7 +51,7 @@ class DeletePlayerSuccessResponse bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; ///////////////////////////////////////////// - /// DeletePlayerSuccessResponse members + /// GenericSuccessBoolResponse members /// /// @@ -74,4 +74,4 @@ class DeletePlayerSuccessResponse } } -#endif /* COM_ONESIGNAL_CLIENT_MODEL_DeletePlayerSuccessResponse_H_ */ +#endif /* COM_ONESIGNAL_CLIENT_MODEL_GenericSuccessBoolResponse_H_ */ diff --git a/include/CppRestOneSignalAPIClient/model/PlayerSlice.h b/include/CppRestOneSignalAPIClient/model/GetSegmentsSuccessResponse.h similarity index 63% rename from include/CppRestOneSignalAPIClient/model/PlayerSlice.h rename to include/CppRestOneSignalAPIClient/model/GetSegmentsSuccessResponse.h index 840c22d..c1be5b9 100644 --- a/include/CppRestOneSignalAPIClient/model/PlayerSlice.h +++ b/include/CppRestOneSignalAPIClient/model/GetSegmentsSuccessResponse.h @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. @@ -11,18 +11,18 @@ */ /* - * PlayerSlice.h + * GetSegmentsSuccessResponse.h * * */ -#ifndef COM_ONESIGNAL_CLIENT_MODEL_PlayerSlice_H_ -#define COM_ONESIGNAL_CLIENT_MODEL_PlayerSlice_H_ +#ifndef COM_ONESIGNAL_CLIENT_MODEL_GetSegmentsSuccessResponse_H_ +#define COM_ONESIGNAL_CLIENT_MODEL_GetSegmentsSuccessResponse_H_ #include "CppRestOneSignalAPIClient/ModelBase.h" -#include "CppRestOneSignalAPIClient/model/Player.h" +#include "CppRestOneSignalAPIClient/model/SegmentData.h" #include namespace com { @@ -30,17 +30,17 @@ namespace onesignal { namespace client { namespace model { -class Player; +class SegmentData; /// /// /// -class PlayerSlice +class GetSegmentsSuccessResponse : public ModelBase { public: - PlayerSlice(); - virtual ~PlayerSlice(); + GetSegmentsSuccessResponse(); + virtual ~GetSegmentsSuccessResponse(); ///////////////////////////////////////////// /// ModelBase overrides @@ -54,10 +54,10 @@ class PlayerSlice bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; ///////////////////////////////////////////// - /// PlayerSlice members + /// GetSegmentsSuccessResponse members /// - /// + /// The number of Segments in the response. /// int32_t getTotalCount() const; bool totalCountIsSet() const; @@ -66,7 +66,7 @@ class PlayerSlice void setTotalCount(int32_t value); /// - /// + /// Set with the offset query parameter. Default 0. /// int32_t getOffset() const; bool offsetIsSet() const; @@ -75,7 +75,7 @@ class PlayerSlice void setOffset(int32_t value); /// - /// + /// Maximum number of Segments returned. Default 300. /// int32_t getLimit() const; bool limitIsSet() const; @@ -84,13 +84,13 @@ class PlayerSlice void setLimit(int32_t value); /// - /// + /// An array containing the Segment information. /// - std::vector>& getPlayers(); - bool playersIsSet() const; - void unsetPlayers(); + std::vector>& getSegments(); + bool segmentsIsSet() const; + void unsetSegments(); - void setPlayers(const std::vector>& value); + void setSegments(const std::vector>& value); protected: @@ -100,8 +100,8 @@ class PlayerSlice bool m_OffsetIsSet; int32_t m_Limit; bool m_LimitIsSet; - std::vector> m_Players; - bool m_PlayersIsSet; + std::vector> m_Segments; + bool m_SegmentsIsSet; }; @@ -110,4 +110,4 @@ class PlayerSlice } } -#endif /* COM_ONESIGNAL_CLIENT_MODEL_PlayerSlice_H_ */ +#endif /* COM_ONESIGNAL_CLIENT_MODEL_GetSegmentsSuccessResponse_H_ */ diff --git a/include/CppRestOneSignalAPIClient/model/Get_notification_request_body.h b/include/CppRestOneSignalAPIClient/model/Get_notification_history_request_body.h similarity index 81% rename from include/CppRestOneSignalAPIClient/model/Get_notification_request_body.h rename to include/CppRestOneSignalAPIClient/model/Get_notification_history_request_body.h index 21eeed1..3a895e8 100644 --- a/include/CppRestOneSignalAPIClient/model/Get_notification_request_body.h +++ b/include/CppRestOneSignalAPIClient/model/Get_notification_history_request_body.h @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. @@ -11,13 +11,13 @@ */ /* - * Get_notification_request_body.h + * Get_notification_history_request_body.h * * */ -#ifndef COM_ONESIGNAL_CLIENT_MODEL_Get_notification_request_body_H_ -#define COM_ONESIGNAL_CLIENT_MODEL_Get_notification_request_body_H_ +#ifndef COM_ONESIGNAL_CLIENT_MODEL_Get_notification_history_request_body_H_ +#define COM_ONESIGNAL_CLIENT_MODEL_Get_notification_history_request_body_H_ #include "CppRestOneSignalAPIClient/ModelBase.h" @@ -33,12 +33,12 @@ namespace model { /// /// /// -class Get_notification_request_body +class Get_notification_history_request_body : public ModelBase { public: - Get_notification_request_body(); - virtual ~Get_notification_request_body(); + Get_notification_history_request_body(); + virtual ~Get_notification_history_request_body(); ///////////////////////////////////////////// /// ModelBase overrides @@ -52,7 +52,7 @@ class Get_notification_request_body bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; ///////////////////////////////////////////// - /// Get_notification_request_body members + /// Get_notification_history_request_body members /// /// -> \"sent\" - All the devices by player_id that were sent the specified notification_id. Notifications targeting under 1000 recipients will not have \"sent\" events recorded, but will show \"clicked\" events. \"clicked\" - All the devices by `player_id` that clicked the specified notification_id. @@ -97,4 +97,4 @@ class Get_notification_request_body } } -#endif /* COM_ONESIGNAL_CLIENT_MODEL_Get_notification_request_body_H_ */ +#endif /* COM_ONESIGNAL_CLIENT_MODEL_Get_notification_history_request_body_H_ */ diff --git a/include/CppRestOneSignalAPIClient/model/Inline_response_200_3.h b/include/CppRestOneSignalAPIClient/model/Inline_response_200_3.h deleted file mode 100644 index d3a8ebb..0000000 --- a/include/CppRestOneSignalAPIClient/model/Inline_response_200_3.h +++ /dev/null @@ -1,79 +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.4.0 - * Contact: devrel@onesignal.com - * - * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * Inline_response_200_3.h - * - * - */ - -#ifndef COM_ONESIGNAL_CLIENT_MODEL_Inline_response_200_3_H_ -#define COM_ONESIGNAL_CLIENT_MODEL_Inline_response_200_3_H_ - - -#include "CppRestOneSignalAPIClient/ModelBase.h" - -#include "CppRestOneSignalAPIClient/Object.h" -#include - -namespace com { -namespace onesignal { -namespace client { -namespace model { - - -/// -/// -/// -class Inline_response_200_3 - : public ModelBase -{ -public: - Inline_response_200_3(); - virtual ~Inline_response_200_3(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - ///////////////////////////////////////////// - /// Inline_response_200_3 members - - /// - /// - /// - std::vector>& getInAppMessages(); - bool inAppMessagesIsSet() const; - void unsetIn_app_messages(); - - void setInAppMessages(const std::vector>& value); - - -protected: - std::vector> m_In_app_messages; - bool m_In_app_messagesIsSet; -}; - - -} -} -} -} - -#endif /* COM_ONESIGNAL_CLIENT_MODEL_Inline_response_200_3_H_ */ diff --git a/include/CppRestOneSignalAPIClient/model/InvalidIdentifierError.h b/include/CppRestOneSignalAPIClient/model/InvalidIdentifierError.h deleted file mode 100644 index 7c9d45e..0000000 --- a/include/CppRestOneSignalAPIClient/model/InvalidIdentifierError.h +++ /dev/null @@ -1,90 +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.4.0 - * Contact: devrel@onesignal.com - * - * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * InvalidIdentifierError.h - * - * - */ - -#ifndef COM_ONESIGNAL_CLIENT_MODEL_InvalidIdentifierError_H_ -#define COM_ONESIGNAL_CLIENT_MODEL_InvalidIdentifierError_H_ - - -#include "CppRestOneSignalAPIClient/ModelBase.h" - -#include -#include - -namespace com { -namespace onesignal { -namespace client { -namespace model { - - -/// -/// -/// -class InvalidIdentifierError - : public ModelBase -{ -public: - InvalidIdentifierError(); - virtual ~InvalidIdentifierError(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - ///////////////////////////////////////////// - /// InvalidIdentifierError members - - /// - /// Returned if using include_external_user_ids - /// - std::vector& getInvalidExternalUserIds(); - bool invalidExternalUserIdsIsSet() const; - void unsetInvalid_external_user_ids(); - - void setInvalidExternalUserIds(const std::vector& value); - - /// - /// Returned if using include_player_ids and some were valid and others were not. - /// - std::vector& getInvalidPlayerIds(); - bool invalidPlayerIdsIsSet() const; - void unsetInvalid_player_ids(); - - void setInvalidPlayerIds(const std::vector& value); - - -protected: - std::vector m_Invalid_external_user_ids; - bool m_Invalid_external_user_idsIsSet; - std::vector m_Invalid_player_ids; - bool m_Invalid_player_idsIsSet; -}; - - -} -} -} -} - -#endif /* COM_ONESIGNAL_CLIENT_MODEL_InvalidIdentifierError_H_ */ diff --git a/include/CppRestOneSignalAPIClient/model/StringMap.h b/include/CppRestOneSignalAPIClient/model/LanguageStringMap.h similarity index 97% rename from include/CppRestOneSignalAPIClient/model/StringMap.h rename to include/CppRestOneSignalAPIClient/model/LanguageStringMap.h index 233ea83..0321839 100644 --- a/include/CppRestOneSignalAPIClient/model/StringMap.h +++ b/include/CppRestOneSignalAPIClient/model/LanguageStringMap.h @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. @@ -11,13 +11,13 @@ */ /* - * StringMap.h + * LanguageStringMap.h * * */ -#ifndef COM_ONESIGNAL_CLIENT_MODEL_StringMap_H_ -#define COM_ONESIGNAL_CLIENT_MODEL_StringMap_H_ +#ifndef COM_ONESIGNAL_CLIENT_MODEL_LanguageStringMap_H_ +#define COM_ONESIGNAL_CLIENT_MODEL_LanguageStringMap_H_ #include "CppRestOneSignalAPIClient/ModelBase.h" @@ -33,12 +33,12 @@ namespace model { /// /// /// -class StringMap +class LanguageStringMap : public ModelBase { public: - StringMap(); - virtual ~StringMap(); + LanguageStringMap(); + virtual ~LanguageStringMap(); ///////////////////////////////////////////// /// ModelBase overrides @@ -52,7 +52,7 @@ class StringMap bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; ///////////////////////////////////////////// - /// StringMap members + /// LanguageStringMap members /// /// Text in English. Will be used as a fallback @@ -537,4 +537,4 @@ class StringMap } } -#endif /* COM_ONESIGNAL_CLIENT_MODEL_StringMap_H_ */ +#endif /* COM_ONESIGNAL_CLIENT_MODEL_LanguageStringMap_H_ */ diff --git a/include/CppRestOneSignalAPIClient/model/Notification.h b/include/CppRestOneSignalAPIClient/model/Notification.h index ef55bc0..cdbe438 100644 --- a/include/CppRestOneSignalAPIClient/model/Notification.h +++ b/include/CppRestOneSignalAPIClient/model/Notification.h @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. @@ -24,13 +24,14 @@ #include "CppRestOneSignalAPIClient/model/Button.h" #include "CppRestOneSignalAPIClient/Object.h" +#include "CppRestOneSignalAPIClient/model/FilterExpression.h" +#include "CppRestOneSignalAPIClient/model/LanguageStringMap.h" #include "CppRestOneSignalAPIClient/model/BasicNotification.h" -#include "CppRestOneSignalAPIClient/model/StringMap.h" +#include "CppRestOneSignalAPIClient/model/WebButton.h" #include #include "CppRestOneSignalAPIClient/model/BasicNotification_allOf_android_background_layout.h" #include "CppRestOneSignalAPIClient/model/Notification_allOf.h" -#include "CppRestOneSignalAPIClient/model/PlayerNotificationTarget_include_aliases.h" -#include "CppRestOneSignalAPIClient/model/Filter.h" +#include #include namespace com { @@ -38,11 +39,11 @@ namespace onesignal { namespace client { namespace model { -class PlayerNotificationTarget_include_aliases; -class StringMap; +class LanguageStringMap; class Button; +class WebButton; class BasicNotification_allOf_android_background_layout; -class Filter; +class FilterExpression; /// /// @@ -87,22 +88,13 @@ class Notification void setExcludedSegments(const std::vector& value); /// - /// Specific playerids to send your notification to. _Does not require API Auth Key. Do not combine with other targeting parameters. Not compatible with any other targeting parameters. Example: [\"1dd608f2-c6a1-11e3-851d-000c2940e62c\"] Limit of 2,000 entries per REST API call + /// Specific subscription ids to send your notification to. _Does not require API Auth Key._ Not compatible with any other targeting parameters. Example: [\"1dd608f2-c6a1-11e3-851d-000c2940e62c\"] Limit of 2,000 entries per REST API call /// - std::vector& getIncludePlayerIds(); - bool includePlayerIdsIsSet() const; - void unsetInclude_player_ids(); + std::vector& getIncludeSubscriptionIds(); + bool includeSubscriptionIdsIsSet() const; + void unsetInclude_subscription_ids(); - void setIncludePlayerIds(const std::vector& value); - - /// - /// Target specific devices by custom user IDs assigned via API. Not compatible with any other targeting parameters Example: [\"custom-id-assigned-by-api\"] REQUIRED: REST API Key Authentication Limit of 2,000 entries per REST API call. Note: If targeting push, email, or sms subscribers with same ids, use with channel_for_external_user_ids to indicate you are sending a push or email or sms. - /// - std::vector& getIncludeExternalUserIds(); - bool includeExternalUserIdsIsSet() const; - void unsetInclude_external_user_ids(); - - void setIncludeExternalUserIds(const std::vector& value); + void setIncludeSubscriptionIds(const std::vector& value); /// /// Recommended for Sending Emails - Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts Limit of 2,000 entries per REST API call @@ -123,7 +115,7 @@ class Notification void setIncludePhoneNumbers(const std::vector& value); /// - /// Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using iOS device tokens. Warning: Only works with Production tokens. All non-alphanumeric characters must be removed from each token. If a token does not correspond to an existing user, a new user will be created. Example: ce777617da7f548fe7a9ab6febb56cf39fba6d38203... Limit of 2,000 entries per REST API call + /// Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using iOS device tokens. Warning: Only works with Production tokens. All non-alphanumeric characters must be removed from each token. If a token does not correspond to an existing user, a new user will be created. Example: ce777617da7f548fe7a9ab6febb56cf39fba6d38203... Limit of 2,000 entries per REST API call /// std::vector& getIncludeIosTokens(); bool includeIosTokensIsSet() const; @@ -132,7 +124,7 @@ class Notification void setIncludeIosTokens(const std::vector& value); /// - /// Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Windows URIs. If a token does not correspond to an existing user, a new user will be created. Example: http://s.notify.live.net/u/1/bn1/HmQAAACPaLDr-... Limit of 2,000 entries per REST API call + /// Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Windows URIs. If a token does not correspond to an existing user, a new user will be created. Example: http://s.notify.live.net/u/1/bn1/HmQAAACPaLDr-... Limit of 2,000 entries per REST API call /// std::vector& getIncludeWpWnsUris(); bool includeWpWnsUrisIsSet() const; @@ -141,7 +133,7 @@ class Notification void setIncludeWpWnsUris(const std::vector& value); /// - /// Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Amazon ADM registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: amzn1.adm-registration.v1.XpvSSUk0Rc3hTVVV... Limit of 2,000 entries per REST API call + /// Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Amazon ADM registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: amzn1.adm-registration.v1.XpvSSUk0Rc3hTVVV... Limit of 2,000 entries per REST API call /// std::vector& getIncludeAmazonRegIds(); bool includeAmazonRegIdsIsSet() const; @@ -150,7 +142,7 @@ class Notification void setIncludeAmazonRegIds(const std::vector& value); /// - /// Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Chrome App registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call + /// Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Chrome App registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call /// std::vector& getIncludeChromeRegIds(); bool includeChromeRegIdsIsSet() const; @@ -159,7 +151,7 @@ class Notification void setIncludeChromeRegIds(const std::vector& value); /// - /// Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Chrome Web Push registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call + /// Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Chrome Web Push registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call /// std::vector& getIncludeChromeWebRegIds(); bool includeChromeWebRegIdsIsSet() const; @@ -168,7 +160,7 @@ class Notification void setIncludeChromeWebRegIds(const std::vector& value); /// - /// Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Android device registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call + /// Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Android device registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call /// std::vector& getIncludeAndroidRegIds(); bool includeAndroidRegIdsIsSet() const; @@ -177,13 +169,13 @@ class Notification void setIncludeAndroidRegIds(const std::vector& value); /// - /// + /// Target specific users by aliases assigned via API. An alias can be an external_id, onesignal_id, or a custom alias. Accepts an object where keys are alias labels and values are arrays of alias IDs to include Example usage: { \"external_id\": [\"exId1\", \"extId2\"], \"internal_label\": [\"id1\", \"id2\"] } Not compatible with any other targeting parameters. REQUIRED: REST API Key Authentication Limit of 2,000 entries per REST API call Note: If targeting push, email, or sms subscribers with same ids, use with target_channel to indicate you are sending a push or email or sms. /// - std::shared_ptr getIncludeAliases() const; + std::map& getIncludeAliases(); bool includeAliasesIsSet() const; void unsetInclude_aliases(); - void setIncludeAliases(const std::shared_ptr& value); + void setIncludeAliases(const std::map& value); /// /// @@ -320,15 +312,6 @@ class Notification void setIsChrome(bool value); - /// - /// 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. - /// - utility::string_t getChannelForExternalUserIds() const; - bool channelForExternalUserIdsIsSet() const; - void unsetChannel_for_external_user_ids(); - - void setChannelForExternalUserIds(const utility::string_t& value); - /// /// 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. /// @@ -359,29 +342,29 @@ class Notification /// /// /// - std::shared_ptr getContents() const; + std::shared_ptr getContents() const; bool contentsIsSet() const; void unsetContents(); - void setContents(const std::shared_ptr& value); + void setContents(const std::shared_ptr& value); /// /// /// - std::shared_ptr getHeadings() const; + std::shared_ptr getHeadings() const; bool headingsIsSet() const; void unsetHeadings(); - void setHeadings(const std::shared_ptr& value); + void setHeadings(const std::shared_ptr& value); /// /// /// - std::shared_ptr getSubtitle() const; + std::shared_ptr getSubtitle() const; bool subtitleIsSet() const; void unsetSubtitle(); - void setSubtitle(const std::shared_ptr& value); + void setSubtitle(const std::shared_ptr& value); /// /// Channel: Push Notifications Platform: Huawei A custom map of data that is passed back to your app. Same as using Additional Data within the dashboard. Can use up to 2048 bytes of data. Example: {\"abc\": 123, \"foo\": \"bar\", \"event_performed\": true, \"amount\": 12.1} @@ -530,11 +513,11 @@ class Notification /// /// Channel: Push Notifications Platform: Chrome 48+ Add action buttons to the notification. The id field is required. Example: [{\"id\": \"like-button\", \"text\": \"Like\", \"icon\": \"http://i.imgur.com/N8SN8ZS.png\", \"url\": \"https://yoursite.com\"}, {\"id\": \"read-more-button\", \"text\": \"Read more\", \"icon\": \"http://i.imgur.com/MIxJp1L.png\", \"url\": \"https://yoursite.com\"}] /// - std::vector>& getWebButtons(); + std::vector>& getWebButtons(); bool webButtonsIsSet() const; void unsetWeb_buttons(); - void setWebButtons(const std::vector>& value); + void setWebButtons(const std::vector>& value); /// /// Channel: Push Notifications Platform: iOS Category APS payload, use with registerUserNotificationSettings:categories in your Objective-C / Swift code. Example: calendar category which contains actions like accept and decline iOS 10+ This will trigger your UNNotificationContentExtension whose ID matches this category. @@ -941,6 +924,24 @@ class Notification void setSummaryArgCount(int32_t value); + /// + /// Channel: Push Notifications Platform: iOS 15+ A score to be set per notification to indicate how it should be displayed when grouped. Use a float between 0-1. + /// + double getIosRelevanceScore() const; + bool iosRelevanceScoreIsSet() const; + void unsetIos_relevance_score(); + + void setIosRelevanceScore(double value); + + /// + /// Channel: Push Notifications Platform: iOS 15+ Focus Modes and Interruption Levels indicate the priority and delivery timing of a notification, to \"interrupt\" the user. Can choose from options: ['active', 'passive', 'time_sensitive', 'critical']. Default is active. + /// + utility::string_t getIosInterruptionLevel() const; + bool iosInterruptionLevelIsSet() const; + void unsetIos_interruption_level(); + + void setIosInterruptionLevel(const utility::string_t& value); + /// /// Channel: Email Required. The subject of the email. /// @@ -1016,11 +1017,11 @@ class Notification /// /// /// - std::vector>& getFilters(); + std::vector>& getFilters(); bool filtersIsSet() const; void unsetFilters(); - void setFilters(const std::vector>& value); + void setFilters(const std::vector>& value); /// /// Channel: All JSON object that can be used as a source of message personalization data for fields that support tag variable substitution. Push, SMS: Can accept up to 2048 bytes of valid JSON. Email: Can accept up to 10000 bytes of valid JSON. Example: {\"order_id\": 123, \"currency\": \"USD\", \"amount\": 25} @@ -1046,10 +1047,8 @@ class Notification bool m_Included_segmentsIsSet; std::vector m_Excluded_segments; bool m_Excluded_segmentsIsSet; - std::vector m_Include_player_ids; - bool m_Include_player_idsIsSet; - std::vector m_Include_external_user_ids; - bool m_Include_external_user_idsIsSet; + std::vector m_Include_subscription_ids; + bool m_Include_subscription_idsIsSet; std::vector m_Include_email_tokens; bool m_Include_email_tokensIsSet; std::vector m_Include_phone_numbers; @@ -1066,7 +1065,7 @@ class Notification bool m_Include_chrome_web_reg_idsIsSet; std::vector m_Include_android_reg_ids; bool m_Include_android_reg_idsIsSet; - std::shared_ptr m_Include_aliases; + std::map m_Include_aliases; bool m_Include_aliasesIsSet; utility::string_t m_Target_channel; bool m_Target_channelIsSet; @@ -1098,19 +1097,17 @@ class Notification bool m_IsAdmIsSet; bool m_IsChrome; bool m_IsChromeIsSet; - utility::string_t m_Channel_for_external_user_ids; - bool m_Channel_for_external_user_idsIsSet; utility::string_t m_App_id; bool m_App_idIsSet; utility::string_t m_External_id; bool m_External_idIsSet; utility::string_t m_Idempotency_key; bool m_Idempotency_keyIsSet; - std::shared_ptr m_Contents; + std::shared_ptr m_Contents; bool m_ContentsIsSet; - std::shared_ptr m_Headings; + std::shared_ptr m_Headings; bool m_HeadingsIsSet; - std::shared_ptr m_Subtitle; + std::shared_ptr m_Subtitle; bool m_SubtitleIsSet; std::shared_ptr m_Data; bool m_DataIsSet; @@ -1144,7 +1141,7 @@ class Notification bool m_Chrome_web_imageIsSet; std::vector> m_Buttons; bool m_ButtonsIsSet; - std::vector> m_Web_buttons; + std::vector> m_Web_buttons; bool m_Web_buttonsIsSet; utility::string_t m_Ios_category; bool m_Ios_categoryIsSet; @@ -1236,6 +1233,10 @@ class Notification bool m_Summary_argIsSet; int32_t m_Summary_arg_count; bool m_Summary_arg_countIsSet; + double m_Ios_relevance_score; + bool m_Ios_relevance_scoreIsSet; + utility::string_t m_Ios_interruption_level; + bool m_Ios_interruption_levelIsSet; utility::string_t m_Email_subject; bool m_Email_subjectIsSet; utility::string_t m_Email_body; @@ -1252,7 +1253,7 @@ class Notification bool m_Sms_fromIsSet; std::vector m_Sms_media_urls; bool m_Sms_media_urlsIsSet; - std::vector> m_Filters; + std::vector> m_Filters; bool m_FiltersIsSet; std::shared_ptr m_Custom_data; bool m_Custom_dataIsSet; diff --git a/include/CppRestOneSignalAPIClient/model/Notification200Errors.h b/include/CppRestOneSignalAPIClient/model/Notification200Errors.h deleted file mode 100644 index ccf8f26..0000000 --- a/include/CppRestOneSignalAPIClient/model/Notification200Errors.h +++ /dev/null @@ -1,91 +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.4.0 - * Contact: devrel@onesignal.com - * - * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * Notification200Errors.h - * - * - */ - -#ifndef COM_ONESIGNAL_CLIENT_MODEL_Notification200Errors_H_ -#define COM_ONESIGNAL_CLIENT_MODEL_Notification200Errors_H_ - - -#include "CppRestOneSignalAPIClient/ModelBase.h" - -#include -#include "CppRestOneSignalAPIClient/model/InvalidIdentifierError.h" -#include - -namespace com { -namespace onesignal { -namespace client { -namespace model { - - -/// -/// -/// -class Notification200Errors - : public ModelBase -{ -public: - Notification200Errors(); - virtual ~Notification200Errors(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - ///////////////////////////////////////////// - /// Notification200Errors members - - /// - /// Returned if using include_external_user_ids - /// - std::vector& getInvalidExternalUserIds(); - bool invalidExternalUserIdsIsSet() const; - void unsetInvalid_external_user_ids(); - - void setInvalidExternalUserIds(const std::vector& value); - - /// - /// Returned if using include_player_ids and some were valid and others were not. - /// - std::vector& getInvalidPlayerIds(); - bool invalidPlayerIdsIsSet() const; - void unsetInvalid_player_ids(); - - void setInvalidPlayerIds(const std::vector& value); - - -protected: - std::vector m_Invalid_external_user_ids; - bool m_Invalid_external_user_idsIsSet; - std::vector m_Invalid_player_ids; - bool m_Invalid_player_idsIsSet; -}; - - -} -} -} -} - -#endif /* COM_ONESIGNAL_CLIENT_MODEL_Notification200Errors_H_ */ diff --git a/include/CppRestOneSignalAPIClient/model/NotificationHistorySuccessResponse.h b/include/CppRestOneSignalAPIClient/model/NotificationHistorySuccessResponse.h index 5d62d7e..37e1d19 100644 --- a/include/CppRestOneSignalAPIClient/model/NotificationHistorySuccessResponse.h +++ b/include/CppRestOneSignalAPIClient/model/NotificationHistorySuccessResponse.h @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. diff --git a/include/CppRestOneSignalAPIClient/model/NotificationSlice.h b/include/CppRestOneSignalAPIClient/model/NotificationSlice.h index 791b950..71272b9 100644 --- a/include/CppRestOneSignalAPIClient/model/NotificationSlice.h +++ b/include/CppRestOneSignalAPIClient/model/NotificationSlice.h @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. diff --git a/include/CppRestOneSignalAPIClient/model/NotificationTarget.h b/include/CppRestOneSignalAPIClient/model/NotificationTarget.h index 174373e..05ff559 100644 --- a/include/CppRestOneSignalAPIClient/model/NotificationTarget.h +++ b/include/CppRestOneSignalAPIClient/model/NotificationTarget.h @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. @@ -22,9 +22,9 @@ #include "CppRestOneSignalAPIClient/ModelBase.h" -#include "CppRestOneSignalAPIClient/model/PlayerNotificationTarget.h" +#include "CppRestOneSignalAPIClient/model/SubscriptionNotificationTarget.h" #include -#include "CppRestOneSignalAPIClient/model/PlayerNotificationTarget_include_aliases.h" +#include #include #include "CppRestOneSignalAPIClient/model/SegmentNotificationTarget.h" @@ -33,7 +33,6 @@ namespace onesignal { namespace client { namespace model { -class PlayerNotificationTarget_include_aliases; /// /// @@ -78,22 +77,13 @@ class NotificationTarget void setExcludedSegments(const std::vector& value); /// - /// Specific playerids to send your notification to. _Does not require API Auth Key. Do not combine with other targeting parameters. Not compatible with any other targeting parameters. Example: [\"1dd608f2-c6a1-11e3-851d-000c2940e62c\"] Limit of 2,000 entries per REST API call + /// Specific subscription ids to send your notification to. _Does not require API Auth Key._ Not compatible with any other targeting parameters. Example: [\"1dd608f2-c6a1-11e3-851d-000c2940e62c\"] Limit of 2,000 entries per REST API call /// - std::vector& getIncludePlayerIds(); - bool includePlayerIdsIsSet() const; - void unsetInclude_player_ids(); + std::vector& getIncludeSubscriptionIds(); + bool includeSubscriptionIdsIsSet() const; + void unsetInclude_subscription_ids(); - void setIncludePlayerIds(const std::vector& value); - - /// - /// Target specific devices by custom user IDs assigned via API. Not compatible with any other targeting parameters Example: [\"custom-id-assigned-by-api\"] REQUIRED: REST API Key Authentication Limit of 2,000 entries per REST API call. Note: If targeting push, email, or sms subscribers with same ids, use with channel_for_external_user_ids to indicate you are sending a push or email or sms. - /// - std::vector& getIncludeExternalUserIds(); - bool includeExternalUserIdsIsSet() const; - void unsetInclude_external_user_ids(); - - void setIncludeExternalUserIds(const std::vector& value); + void setIncludeSubscriptionIds(const std::vector& value); /// /// Recommended for Sending Emails - Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts Limit of 2,000 entries per REST API call @@ -114,7 +104,7 @@ class NotificationTarget void setIncludePhoneNumbers(const std::vector& value); /// - /// Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using iOS device tokens. Warning: Only works with Production tokens. All non-alphanumeric characters must be removed from each token. If a token does not correspond to an existing user, a new user will be created. Example: ce777617da7f548fe7a9ab6febb56cf39fba6d38203... Limit of 2,000 entries per REST API call + /// Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using iOS device tokens. Warning: Only works with Production tokens. All non-alphanumeric characters must be removed from each token. If a token does not correspond to an existing user, a new user will be created. Example: ce777617da7f548fe7a9ab6febb56cf39fba6d38203... Limit of 2,000 entries per REST API call /// std::vector& getIncludeIosTokens(); bool includeIosTokensIsSet() const; @@ -123,7 +113,7 @@ class NotificationTarget void setIncludeIosTokens(const std::vector& value); /// - /// Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Windows URIs. If a token does not correspond to an existing user, a new user will be created. Example: http://s.notify.live.net/u/1/bn1/HmQAAACPaLDr-... Limit of 2,000 entries per REST API call + /// Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Windows URIs. If a token does not correspond to an existing user, a new user will be created. Example: http://s.notify.live.net/u/1/bn1/HmQAAACPaLDr-... Limit of 2,000 entries per REST API call /// std::vector& getIncludeWpWnsUris(); bool includeWpWnsUrisIsSet() const; @@ -132,7 +122,7 @@ class NotificationTarget void setIncludeWpWnsUris(const std::vector& value); /// - /// Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Amazon ADM registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: amzn1.adm-registration.v1.XpvSSUk0Rc3hTVVV... Limit of 2,000 entries per REST API call + /// Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Amazon ADM registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: amzn1.adm-registration.v1.XpvSSUk0Rc3hTVVV... Limit of 2,000 entries per REST API call /// std::vector& getIncludeAmazonRegIds(); bool includeAmazonRegIdsIsSet() const; @@ -141,7 +131,7 @@ class NotificationTarget void setIncludeAmazonRegIds(const std::vector& value); /// - /// Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Chrome App registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call + /// Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Chrome App registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call /// std::vector& getIncludeChromeRegIds(); bool includeChromeRegIdsIsSet() const; @@ -150,7 +140,7 @@ class NotificationTarget void setIncludeChromeRegIds(const std::vector& value); /// - /// Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Chrome Web Push registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call + /// Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Chrome Web Push registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call /// std::vector& getIncludeChromeWebRegIds(); bool includeChromeWebRegIdsIsSet() const; @@ -159,7 +149,7 @@ class NotificationTarget void setIncludeChromeWebRegIds(const std::vector& value); /// - /// Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Android device registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call + /// Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Android device registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call /// std::vector& getIncludeAndroidRegIds(); bool includeAndroidRegIdsIsSet() const; @@ -168,13 +158,13 @@ class NotificationTarget void setIncludeAndroidRegIds(const std::vector& value); /// - /// + /// Target specific users by aliases assigned via API. An alias can be an external_id, onesignal_id, or a custom alias. Accepts an object where keys are alias labels and values are arrays of alias IDs to include Example usage: { \"external_id\": [\"exId1\", \"extId2\"], \"internal_label\": [\"id1\", \"id2\"] } Not compatible with any other targeting parameters. REQUIRED: REST API Key Authentication Limit of 2,000 entries per REST API call Note: If targeting push, email, or sms subscribers with same ids, use with target_channel to indicate you are sending a push or email or sms. /// - std::shared_ptr getIncludeAliases() const; + std::map& getIncludeAliases(); bool includeAliasesIsSet() const; void unsetInclude_aliases(); - void setIncludeAliases(const std::shared_ptr& value); + void setIncludeAliases(const std::map& value); /// /// @@ -191,10 +181,8 @@ class NotificationTarget bool m_Included_segmentsIsSet; std::vector m_Excluded_segments; bool m_Excluded_segmentsIsSet; - std::vector m_Include_player_ids; - bool m_Include_player_idsIsSet; - std::vector m_Include_external_user_ids; - bool m_Include_external_user_idsIsSet; + std::vector m_Include_subscription_ids; + bool m_Include_subscription_idsIsSet; std::vector m_Include_email_tokens; bool m_Include_email_tokensIsSet; std::vector m_Include_phone_numbers; @@ -211,7 +199,7 @@ class NotificationTarget bool m_Include_chrome_web_reg_idsIsSet; std::vector m_Include_android_reg_ids; bool m_Include_android_reg_idsIsSet; - std::shared_ptr m_Include_aliases; + std::map m_Include_aliases; bool m_Include_aliasesIsSet; utility::string_t m_Target_channel; bool m_Target_channelIsSet; diff --git a/include/CppRestOneSignalAPIClient/model/NotificationWithMeta.h b/include/CppRestOneSignalAPIClient/model/NotificationWithMeta.h index 0326269..8f7a6c6 100644 --- a/include/CppRestOneSignalAPIClient/model/NotificationWithMeta.h +++ b/include/CppRestOneSignalAPIClient/model/NotificationWithMeta.h @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. @@ -25,16 +25,17 @@ #include "CppRestOneSignalAPIClient/model/PlatformDeliveryData.h" #include "CppRestOneSignalAPIClient/model/Button.h" #include "CppRestOneSignalAPIClient/model/BasicNotification.h" -#include "CppRestOneSignalAPIClient/model/StringMap.h" #include "CppRestOneSignalAPIClient/model/BasicNotification_allOf_android_background_layout.h" #include "CppRestOneSignalAPIClient/model/DeliveryData.h" #include "CppRestOneSignalAPIClient/model/OutcomeData.h" -#include "CppRestOneSignalAPIClient/model/PlayerNotificationTarget_include_aliases.h" -#include "CppRestOneSignalAPIClient/model/Filter.h" #include #include "CppRestOneSignalAPIClient/Object.h" +#include "CppRestOneSignalAPIClient/model/FilterExpression.h" +#include "CppRestOneSignalAPIClient/model/LanguageStringMap.h" #include "CppRestOneSignalAPIClient/model/OutcomesData.h" +#include "CppRestOneSignalAPIClient/model/WebButton.h" #include +#include #include "CppRestOneSignalAPIClient/model/NotificationWithMeta_allOf.h" namespace com { @@ -42,11 +43,11 @@ namespace onesignal { namespace client { namespace model { -class PlayerNotificationTarget_include_aliases; -class StringMap; +class LanguageStringMap; class Button; +class WebButton; class BasicNotification_allOf_android_background_layout; -class Filter; +class FilterExpression; class OutcomeData; class PlatformDeliveryData; @@ -93,22 +94,13 @@ class NotificationWithMeta void setExcludedSegments(const std::vector& value); /// - /// Specific playerids to send your notification to. _Does not require API Auth Key. Do not combine with other targeting parameters. Not compatible with any other targeting parameters. Example: [\"1dd608f2-c6a1-11e3-851d-000c2940e62c\"] Limit of 2,000 entries per REST API call + /// Specific subscription ids to send your notification to. _Does not require API Auth Key._ Not compatible with any other targeting parameters. Example: [\"1dd608f2-c6a1-11e3-851d-000c2940e62c\"] Limit of 2,000 entries per REST API call /// - std::vector& getIncludePlayerIds(); - bool includePlayerIdsIsSet() const; - void unsetInclude_player_ids(); + std::vector& getIncludeSubscriptionIds(); + bool includeSubscriptionIdsIsSet() const; + void unsetInclude_subscription_ids(); - void setIncludePlayerIds(const std::vector& value); - - /// - /// Target specific devices by custom user IDs assigned via API. Not compatible with any other targeting parameters Example: [\"custom-id-assigned-by-api\"] REQUIRED: REST API Key Authentication Limit of 2,000 entries per REST API call. Note: If targeting push, email, or sms subscribers with same ids, use with channel_for_external_user_ids to indicate you are sending a push or email or sms. - /// - std::vector& getIncludeExternalUserIds(); - bool includeExternalUserIdsIsSet() const; - void unsetInclude_external_user_ids(); - - void setIncludeExternalUserIds(const std::vector& value); + void setIncludeSubscriptionIds(const std::vector& value); /// /// Recommended for Sending Emails - Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts Limit of 2,000 entries per REST API call @@ -129,7 +121,7 @@ class NotificationWithMeta void setIncludePhoneNumbers(const std::vector& value); /// - /// Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using iOS device tokens. Warning: Only works with Production tokens. All non-alphanumeric characters must be removed from each token. If a token does not correspond to an existing user, a new user will be created. Example: ce777617da7f548fe7a9ab6febb56cf39fba6d38203... Limit of 2,000 entries per REST API call + /// Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using iOS device tokens. Warning: Only works with Production tokens. All non-alphanumeric characters must be removed from each token. If a token does not correspond to an existing user, a new user will be created. Example: ce777617da7f548fe7a9ab6febb56cf39fba6d38203... Limit of 2,000 entries per REST API call /// std::vector& getIncludeIosTokens(); bool includeIosTokensIsSet() const; @@ -138,7 +130,7 @@ class NotificationWithMeta void setIncludeIosTokens(const std::vector& value); /// - /// Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Windows URIs. If a token does not correspond to an existing user, a new user will be created. Example: http://s.notify.live.net/u/1/bn1/HmQAAACPaLDr-... Limit of 2,000 entries per REST API call + /// Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Windows URIs. If a token does not correspond to an existing user, a new user will be created. Example: http://s.notify.live.net/u/1/bn1/HmQAAACPaLDr-... Limit of 2,000 entries per REST API call /// std::vector& getIncludeWpWnsUris(); bool includeWpWnsUrisIsSet() const; @@ -147,7 +139,7 @@ class NotificationWithMeta void setIncludeWpWnsUris(const std::vector& value); /// - /// Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Amazon ADM registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: amzn1.adm-registration.v1.XpvSSUk0Rc3hTVVV... Limit of 2,000 entries per REST API call + /// Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Amazon ADM registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: amzn1.adm-registration.v1.XpvSSUk0Rc3hTVVV... Limit of 2,000 entries per REST API call /// std::vector& getIncludeAmazonRegIds(); bool includeAmazonRegIdsIsSet() const; @@ -156,7 +148,7 @@ class NotificationWithMeta void setIncludeAmazonRegIds(const std::vector& value); /// - /// Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Chrome App registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call + /// Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Chrome App registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call /// std::vector& getIncludeChromeRegIds(); bool includeChromeRegIdsIsSet() const; @@ -165,7 +157,7 @@ class NotificationWithMeta void setIncludeChromeRegIds(const std::vector& value); /// - /// Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Chrome Web Push registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call + /// Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Chrome Web Push registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call /// std::vector& getIncludeChromeWebRegIds(); bool includeChromeWebRegIdsIsSet() const; @@ -174,7 +166,7 @@ class NotificationWithMeta void setIncludeChromeWebRegIds(const std::vector& value); /// - /// Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Android device registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call + /// Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Android device registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call /// std::vector& getIncludeAndroidRegIds(); bool includeAndroidRegIdsIsSet() const; @@ -183,13 +175,13 @@ class NotificationWithMeta void setIncludeAndroidRegIds(const std::vector& value); /// - /// + /// Target specific users by aliases assigned via API. An alias can be an external_id, onesignal_id, or a custom alias. Accepts an object where keys are alias labels and values are arrays of alias IDs to include Example usage: { \"external_id\": [\"exId1\", \"extId2\"], \"internal_label\": [\"id1\", \"id2\"] } Not compatible with any other targeting parameters. REQUIRED: REST API Key Authentication Limit of 2,000 entries per REST API call Note: If targeting push, email, or sms subscribers with same ids, use with target_channel to indicate you are sending a push or email or sms. /// - std::shared_ptr getIncludeAliases() const; + std::map& getIncludeAliases(); bool includeAliasesIsSet() const; void unsetInclude_aliases(); - void setIncludeAliases(const std::shared_ptr& value); + void setIncludeAliases(const std::map& value); /// /// @@ -326,15 +318,6 @@ class NotificationWithMeta void setIsChrome(bool value); - /// - /// 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. - /// - utility::string_t getChannelForExternalUserIds() const; - bool channelForExternalUserIdsIsSet() const; - void unsetChannel_for_external_user_ids(); - - void setChannelForExternalUserIds(const utility::string_t& value); - /// /// 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. /// @@ -365,29 +348,29 @@ class NotificationWithMeta /// /// /// - std::shared_ptr getContents() const; + std::shared_ptr getContents() const; bool contentsIsSet() const; void unsetContents(); - void setContents(const std::shared_ptr& value); + void setContents(const std::shared_ptr& value); /// /// /// - std::shared_ptr getHeadings() const; + std::shared_ptr getHeadings() const; bool headingsIsSet() const; void unsetHeadings(); - void setHeadings(const std::shared_ptr& value); + void setHeadings(const std::shared_ptr& value); /// /// /// - std::shared_ptr getSubtitle() const; + std::shared_ptr getSubtitle() const; bool subtitleIsSet() const; void unsetSubtitle(); - void setSubtitle(const std::shared_ptr& value); + void setSubtitle(const std::shared_ptr& value); /// /// Channel: Push Notifications Platform: Huawei A custom map of data that is passed back to your app. Same as using Additional Data within the dashboard. Can use up to 2048 bytes of data. Example: {\"abc\": 123, \"foo\": \"bar\", \"event_performed\": true, \"amount\": 12.1} @@ -536,11 +519,11 @@ class NotificationWithMeta /// /// Channel: Push Notifications Platform: Chrome 48+ Add action buttons to the notification. The id field is required. Example: [{\"id\": \"like-button\", \"text\": \"Like\", \"icon\": \"http://i.imgur.com/N8SN8ZS.png\", \"url\": \"https://yoursite.com\"}, {\"id\": \"read-more-button\", \"text\": \"Read more\", \"icon\": \"http://i.imgur.com/MIxJp1L.png\", \"url\": \"https://yoursite.com\"}] /// - std::vector>& getWebButtons(); + std::vector>& getWebButtons(); bool webButtonsIsSet() const; void unsetWeb_buttons(); - void setWebButtons(const std::vector>& value); + void setWebButtons(const std::vector>& value); /// /// Channel: Push Notifications Platform: iOS Category APS payload, use with registerUserNotificationSettings:categories in your Objective-C / Swift code. Example: calendar category which contains actions like accept and decline iOS 10+ This will trigger your UNNotificationContentExtension whose ID matches this category. @@ -947,6 +930,24 @@ class NotificationWithMeta void setSummaryArgCount(int32_t value); + /// + /// Channel: Push Notifications Platform: iOS 15+ A score to be set per notification to indicate how it should be displayed when grouped. Use a float between 0-1. + /// + double getIosRelevanceScore() const; + bool iosRelevanceScoreIsSet() const; + void unsetIos_relevance_score(); + + void setIosRelevanceScore(double value); + + /// + /// Channel: Push Notifications Platform: iOS 15+ Focus Modes and Interruption Levels indicate the priority and delivery timing of a notification, to \"interrupt\" the user. Can choose from options: ['active', 'passive', 'time_sensitive', 'critical']. Default is active. + /// + utility::string_t getIosInterruptionLevel() const; + bool iosInterruptionLevelIsSet() const; + void unsetIos_interruption_level(); + + void setIosInterruptionLevel(const utility::string_t& value); + /// /// Channel: Email Required. The subject of the email. /// @@ -1022,11 +1023,11 @@ class NotificationWithMeta /// /// /// - std::vector>& getFilters(); + std::vector>& getFilters(); bool filtersIsSet() const; void unsetFilters(); - void setFilters(const std::vector>& value); + void setFilters(const std::vector>& value); /// /// Channel: All JSON object that can be used as a source of message personalization data for fields that support tag variable substitution. Push, SMS: Can accept up to 2048 bytes of valid JSON. Email: Can accept up to 10000 bytes of valid JSON. Example: {\"order_id\": 123, \"currency\": \"USD\", \"amount\": 25} @@ -1142,10 +1143,8 @@ class NotificationWithMeta bool m_Included_segmentsIsSet; std::vector m_Excluded_segments; bool m_Excluded_segmentsIsSet; - std::vector m_Include_player_ids; - bool m_Include_player_idsIsSet; - std::vector m_Include_external_user_ids; - bool m_Include_external_user_idsIsSet; + std::vector m_Include_subscription_ids; + bool m_Include_subscription_idsIsSet; std::vector m_Include_email_tokens; bool m_Include_email_tokensIsSet; std::vector m_Include_phone_numbers; @@ -1162,7 +1161,7 @@ class NotificationWithMeta bool m_Include_chrome_web_reg_idsIsSet; std::vector m_Include_android_reg_ids; bool m_Include_android_reg_idsIsSet; - std::shared_ptr m_Include_aliases; + std::map m_Include_aliases; bool m_Include_aliasesIsSet; utility::string_t m_Target_channel; bool m_Target_channelIsSet; @@ -1194,19 +1193,17 @@ class NotificationWithMeta bool m_IsAdmIsSet; bool m_IsChrome; bool m_IsChromeIsSet; - utility::string_t m_Channel_for_external_user_ids; - bool m_Channel_for_external_user_idsIsSet; utility::string_t m_App_id; bool m_App_idIsSet; utility::string_t m_External_id; bool m_External_idIsSet; utility::string_t m_Idempotency_key; bool m_Idempotency_keyIsSet; - std::shared_ptr m_Contents; + std::shared_ptr m_Contents; bool m_ContentsIsSet; - std::shared_ptr m_Headings; + std::shared_ptr m_Headings; bool m_HeadingsIsSet; - std::shared_ptr m_Subtitle; + std::shared_ptr m_Subtitle; bool m_SubtitleIsSet; std::shared_ptr m_Data; bool m_DataIsSet; @@ -1240,7 +1237,7 @@ class NotificationWithMeta bool m_Chrome_web_imageIsSet; std::vector> m_Buttons; bool m_ButtonsIsSet; - std::vector> m_Web_buttons; + std::vector> m_Web_buttons; bool m_Web_buttonsIsSet; utility::string_t m_Ios_category; bool m_Ios_categoryIsSet; @@ -1332,6 +1329,10 @@ class NotificationWithMeta bool m_Summary_argIsSet; int32_t m_Summary_arg_count; bool m_Summary_arg_countIsSet; + double m_Ios_relevance_score; + bool m_Ios_relevance_scoreIsSet; + utility::string_t m_Ios_interruption_level; + bool m_Ios_interruption_levelIsSet; utility::string_t m_Email_subject; bool m_Email_subjectIsSet; utility::string_t m_Email_body; @@ -1348,7 +1349,7 @@ class NotificationWithMeta bool m_Sms_fromIsSet; std::vector m_Sms_media_urls; bool m_Sms_media_urlsIsSet; - std::vector> m_Filters; + std::vector> m_Filters; bool m_FiltersIsSet; std::shared_ptr m_Custom_data; bool m_Custom_dataIsSet; diff --git a/include/CppRestOneSignalAPIClient/model/NotificationWithMeta_allOf.h b/include/CppRestOneSignalAPIClient/model/NotificationWithMeta_allOf.h index 642bafe..08e008e 100644 --- a/include/CppRestOneSignalAPIClient/model/NotificationWithMeta_allOf.h +++ b/include/CppRestOneSignalAPIClient/model/NotificationWithMeta_allOf.h @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. diff --git a/include/CppRestOneSignalAPIClient/model/Notification_allOf.h b/include/CppRestOneSignalAPIClient/model/Notification_allOf.h index be7fb17..21a0330 100644 --- a/include/CppRestOneSignalAPIClient/model/Notification_allOf.h +++ b/include/CppRestOneSignalAPIClient/model/Notification_allOf.h @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. diff --git a/include/CppRestOneSignalAPIClient/model/Operator.h b/include/CppRestOneSignalAPIClient/model/Operator.h index 836ea27..63cba7c 100644 --- a/include/CppRestOneSignalAPIClient/model/Operator.h +++ b/include/CppRestOneSignalAPIClient/model/Operator.h @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. diff --git a/include/CppRestOneSignalAPIClient/model/OutcomeData.h b/include/CppRestOneSignalAPIClient/model/OutcomeData.h index b31c6ff..1ae483f 100644 --- a/include/CppRestOneSignalAPIClient/model/OutcomeData.h +++ b/include/CppRestOneSignalAPIClient/model/OutcomeData.h @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. diff --git a/include/CppRestOneSignalAPIClient/model/OutcomesData.h b/include/CppRestOneSignalAPIClient/model/OutcomesData.h index dac17fa..0667f44 100644 --- a/include/CppRestOneSignalAPIClient/model/OutcomesData.h +++ b/include/CppRestOneSignalAPIClient/model/OutcomesData.h @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. diff --git a/include/CppRestOneSignalAPIClient/model/PlatformDeliveryData.h b/include/CppRestOneSignalAPIClient/model/PlatformDeliveryData.h index d5bd8fb..0605d1a 100644 --- a/include/CppRestOneSignalAPIClient/model/PlatformDeliveryData.h +++ b/include/CppRestOneSignalAPIClient/model/PlatformDeliveryData.h @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. diff --git a/include/CppRestOneSignalAPIClient/model/PlatformDeliveryData_email_allOf.h b/include/CppRestOneSignalAPIClient/model/PlatformDeliveryData_email_allOf.h index 8ad1617..c7c3669 100644 --- a/include/CppRestOneSignalAPIClient/model/PlatformDeliveryData_email_allOf.h +++ b/include/CppRestOneSignalAPIClient/model/PlatformDeliveryData_email_allOf.h @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. diff --git a/include/CppRestOneSignalAPIClient/model/PlatformDeliveryData_sms_allOf.h b/include/CppRestOneSignalAPIClient/model/PlatformDeliveryData_sms_allOf.h index 966cd44..5c122ca 100644 --- a/include/CppRestOneSignalAPIClient/model/PlatformDeliveryData_sms_allOf.h +++ b/include/CppRestOneSignalAPIClient/model/PlatformDeliveryData_sms_allOf.h @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. diff --git a/include/CppRestOneSignalAPIClient/model/Player.h b/include/CppRestOneSignalAPIClient/model/Player.h deleted file mode 100644 index dff6ea3..0000000 --- a/include/CppRestOneSignalAPIClient/model/Player.h +++ /dev/null @@ -1,365 +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.4.0 - * Contact: devrel@onesignal.com - * - * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * Player.h - * - * - */ - -#ifndef COM_ONESIGNAL_CLIENT_MODEL_Player_H_ -#define COM_ONESIGNAL_CLIENT_MODEL_Player_H_ - - -#include "CppRestOneSignalAPIClient/ModelBase.h" - -#include "CppRestOneSignalAPIClient/Object.h" -#include - -namespace com { -namespace onesignal { -namespace client { -namespace model { - - -/// -/// -/// -class Player - : public ModelBase -{ -public: - Player(); - virtual ~Player(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - ///////////////////////////////////////////// - /// Player members - - /// - /// The device's OneSignal ID - /// - utility::string_t getId() const; - bool idIsSet() const; - void unsetId(); - - void setId(const utility::string_t& value); - - /// - /// If true, this is the equivalent of a user being Unsubscribed - /// - bool isInvalidIdentifier() const; - bool invalidIdentifierIsSet() const; - void unsetInvalid_identifier(); - - void setInvalidIdentifier(bool value); - - /// - /// - /// - utility::string_t getAppId() const; - bool appIdIsSet() const; - void unsetApp_id(); - - void setAppId(const utility::string_t& value); - - /// - /// Required The device's platform: 0 = iOS 1 = Android 2 = Amazon 3 = WindowsPhone (MPNS) 4 = Chrome Apps / Extensions 5 = Chrome Web Push 6 = Windows (WNS) 7 = Safari 8 = Firefox 9 = MacOS 10 = Alexa 11 = Email 13 = For Huawei App Gallery Builds SDK Setup. Not for Huawei Devices using FCM 14 = SMS - /// - int32_t getDeviceType() const; - bool deviceTypeIsSet() const; - void unsetDevice_type(); - - void setDeviceType(int32_t value); - - /// - /// a custom user ID - /// - utility::string_t getExternalUserId() const; - bool externalUserIdIsSet() const; - void unsetExternal_user_id(); - - void setExternalUserId(const utility::string_t& value); - - /// - /// Only required if you have enabled Identity Verification and device_type is NOT 11 email. - /// - utility::string_t getExternalUserIdAuthHash() const; - bool externalUserIdAuthHashIsSet() const; - void unsetExternal_user_id_auth_hash(); - - void setExternalUserIdAuthHash(const utility::string_t& value); - - /// - /// Email - Only required if you have enabled Identity Verification and device_type is email (11). - /// - utility::string_t getEmailAuthHash() const; - bool emailAuthHashIsSet() const; - void unsetEmail_auth_hash(); - - void setEmailAuthHash(const utility::string_t& value); - - /// - /// Recommended: For Push Notifications, this is the Push Token Identifier from Google or Apple. For Apple Push identifiers, you must strip all non alphanumeric characters. Examples: iOS: 7abcd558f29d0b1f048083e2834ad8ea4b3d87d8ad9c088b33c132706ff445f0 Android: APA91bHbYHk7aq-Uam_2pyJ2qbZvqllyyh2wjfPRaw5gLEX2SUlQBRvOc6sck1sa7H7nGeLNlDco8lXj83HWWwzV... For Email Addresses, set the full email address email@email.com and make sure to set device_type to 11. - /// - utility::string_t getIdentifier() const; - bool identifierIsSet() const; - void unsetIdentifier(); - - void setIdentifier(const utility::string_t& value); - - /// - /// Language code. Typically lower case two letters, except for Chinese where it must be one of zh-Hans or zh-Hant. Example: en - /// - utility::string_t getLanguage() const; - bool languageIsSet() const; - void unsetLanguage(); - - void setLanguage(const utility::string_t& value); - - /// - /// Number of seconds away from UTC. Example: -28800 - /// - int32_t getTimezone() const; - bool timezoneIsSet() const; - void unsetTimezone(); - - void setTimezone(int32_t value); - - /// - /// Version of your app. Example: 1.1 - /// - utility::string_t getGameVersion() const; - bool gameVersionIsSet() const; - void unsetGame_version(); - - void setGameVersion(const utility::string_t& value); - - /// - /// Device make and model. Example: iPhone5,1 - /// - utility::string_t getDeviceModel() const; - bool deviceModelIsSet() const; - void unsetDevice_model(); - - void setDeviceModel(const utility::string_t& value); - - /// - /// Device operating system version. Example: 7.0.4 - /// - utility::string_t getDeviceOs() const; - bool deviceOsIsSet() const; - void unsetDevice_os(); - - void setDeviceOs(const utility::string_t& value); - - /// - /// The ad id for the device's platform: Android = Advertising Id iOS = identifierForVendor WP8.0 = DeviceUniqueId WP8.1 = AdvertisingId - /// - utility::string_t getAdId() const; - bool adIdIsSet() const; - void unsetAd_id(); - - void setAdId(const utility::string_t& value); - - /// - /// Name and version of the sdk/plugin that's calling this API method (if any) - /// - utility::string_t getSdk() const; - bool sdkIsSet() const; - void unsetSdk(); - - void setSdk(const utility::string_t& value); - - /// - /// Number of times the user has played the game, defaults to 1 - /// - int32_t getSessionCount() const; - bool sessionCountIsSet() const; - void unsetSession_count(); - - void setSessionCount(int32_t value); - - /// - /// Custom tags for the player. Only support string and integer key value pairs. Does not support arrays or other nested objects. Setting a tag value to null or an empty string will remove the tag. Example: {\"foo\":\"bar\",\"this\":\"that\"} Limitations: - 100 tags per call - Android SDK users: tags cannot be removed or changed via API if set through SDK sendTag methods. Recommended to only tag devices with 1 kilobyte of data Please consider using your own Database to save more than 1 kilobyte of data. See: Internal Database & CRM - /// - std::shared_ptr getTags() const; - bool tagsIsSet() const; - void unsetTags(); - - void setTags(const std::shared_ptr& value); - - /// - /// Amount the user has spent in USD, up to two decimal places - /// - double getAmountSpent() const; - bool amountSpentIsSet() const; - void unsetAmount_spent(); - - void setAmountSpent(double value); - - /// - /// Unixtime when the player joined the game - /// - int64_t getCreatedAt() const; - bool createdAtIsSet() const; - void unsetCreated_at(); - - void setCreatedAt(int64_t value); - - /// - /// Seconds player was running your app. - /// - int64_t getPlaytime() const; - bool playtimeIsSet() const; - void unsetPlaytime(); - - void setPlaytime(int64_t value); - - /// - /// Current iOS badge count displayed on the app icon NOTE: Not supported for apps created after June 2018, since badge count for apps created after this date are handled on the client. - /// - int32_t getBadgeCount() const; - bool badgeCountIsSet() const; - void unsetBadge_count(); - - void setBadgeCount(int32_t value); - - /// - /// Unixtime when the player was last active - /// - int32_t getLastActive() const; - bool lastActiveIsSet() const; - void unsetLast_active(); - - void setLastActive(int32_t value); - - /// - /// 1 = subscribed -2 = unsubscribed iOS - These values are set each time the user opens the app from the SDK. Use the SDK function set Subscription instead. Android - You may set this but you can no longer use the SDK method setSubscription later in your app as it will create synchronization issues. - /// - int32_t getNotificationTypes() const; - bool notificationTypesIsSet() const; - void unsetNotification_types(); - - void setNotificationTypes(int32_t value); - - /// - /// This is used in deciding whether to use your iOS Sandbox or Production push certificate when sending a push when both have been uploaded. Set to the iOS provisioning profile that was used to build your app. 1 = Development 2 = Ad-Hoc Omit this field for App Store builds. - /// - int32_t getTestType() const; - bool testTypeIsSet() const; - void unsetTest_type(); - - void setTestType(int32_t value); - - /// - /// Longitude of the device, used for geotagging to segment on. - /// - double getLong() const; - bool r_longIsSet() const; - void unsetlong(); - - void setLong(double value); - - /// - /// Latitude of the device, used for geotagging to segment on. - /// - double getLat() const; - bool latIsSet() const; - void unsetLat(); - - void setLat(double value); - - /// - /// Country code in the ISO 3166-1 Alpha 2 format - /// - utility::string_t getCountry() const; - bool countryIsSet() const; - void unsetCountry(); - - void setCountry(const utility::string_t& value); - - -protected: - utility::string_t m_Id; - bool m_IdIsSet; - bool m_Invalid_identifier; - bool m_Invalid_identifierIsSet; - utility::string_t m_App_id; - bool m_App_idIsSet; - int32_t m_Device_type; - bool m_Device_typeIsSet; - utility::string_t m_External_user_id; - bool m_External_user_idIsSet; - utility::string_t m_External_user_id_auth_hash; - bool m_External_user_id_auth_hashIsSet; - utility::string_t m_Email_auth_hash; - bool m_Email_auth_hashIsSet; - utility::string_t m_Identifier; - bool m_IdentifierIsSet; - utility::string_t m_Language; - bool m_LanguageIsSet; - int32_t m_Timezone; - bool m_TimezoneIsSet; - utility::string_t m_Game_version; - bool m_Game_versionIsSet; - utility::string_t m_Device_model; - bool m_Device_modelIsSet; - utility::string_t m_Device_os; - bool m_Device_osIsSet; - utility::string_t m_Ad_id; - bool m_Ad_idIsSet; - utility::string_t m_Sdk; - bool m_SdkIsSet; - int32_t m_Session_count; - bool m_Session_countIsSet; - std::shared_ptr m_Tags; - bool m_TagsIsSet; - double m_Amount_spent; - bool m_Amount_spentIsSet; - int64_t m_Created_at; - bool m_Created_atIsSet; - int64_t m_Playtime; - bool m_PlaytimeIsSet; - int32_t m_Badge_count; - bool m_Badge_countIsSet; - int32_t m_Last_active; - bool m_Last_activeIsSet; - int32_t m_Notification_types; - bool m_Notification_typesIsSet; - int32_t m_Test_type; - bool m_Test_typeIsSet; - double m_long; - bool m_longIsSet; - double m_Lat; - bool m_LatIsSet; - utility::string_t m_Country; - bool m_CountryIsSet; -}; - - -} -} -} -} - -#endif /* COM_ONESIGNAL_CLIENT_MODEL_Player_H_ */ diff --git a/include/CppRestOneSignalAPIClient/model/PlayerNotificationTarget_include_aliases.h b/include/CppRestOneSignalAPIClient/model/PlayerNotificationTarget_include_aliases.h deleted file mode 100644 index 70d9561..0000000 --- a/include/CppRestOneSignalAPIClient/model/PlayerNotificationTarget_include_aliases.h +++ /dev/null @@ -1,79 +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.4.0 - * Contact: devrel@onesignal.com - * - * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * PlayerNotificationTarget_include_aliases.h - * - * - */ - -#ifndef COM_ONESIGNAL_CLIENT_MODEL_PlayerNotificationTarget_include_aliases_H_ -#define COM_ONESIGNAL_CLIENT_MODEL_PlayerNotificationTarget_include_aliases_H_ - - -#include "CppRestOneSignalAPIClient/ModelBase.h" - -#include -#include - -namespace com { -namespace onesignal { -namespace client { -namespace model { - - -/// -/// -/// -class PlayerNotificationTarget_include_aliases - : public ModelBase -{ -public: - PlayerNotificationTarget_include_aliases(); - virtual ~PlayerNotificationTarget_include_aliases(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - ///////////////////////////////////////////// - /// PlayerNotificationTarget_include_aliases members - - /// - /// - /// - std::vector& getAliasLabel(); - bool aliasLabelIsSet() const; - void unsetAlias_label(); - - void setAliasLabel(const std::vector& value); - - -protected: - std::vector m_Alias_label; - bool m_Alias_labelIsSet; -}; - - -} -} -} -} - -#endif /* COM_ONESIGNAL_CLIENT_MODEL_PlayerNotificationTarget_include_aliases_H_ */ diff --git a/include/CppRestOneSignalAPIClient/model/Inline_response_202.h b/include/CppRestOneSignalAPIClient/model/PropertiesBody.h similarity index 79% rename from include/CppRestOneSignalAPIClient/model/Inline_response_202.h rename to include/CppRestOneSignalAPIClient/model/PropertiesBody.h index 966260f..8bbc086 100644 --- a/include/CppRestOneSignalAPIClient/model/Inline_response_202.h +++ b/include/CppRestOneSignalAPIClient/model/PropertiesBody.h @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. @@ -11,13 +11,13 @@ */ /* - * Inline_response_202.h + * PropertiesBody.h * * */ -#ifndef COM_ONESIGNAL_CLIENT_MODEL_Inline_response_202_H_ -#define COM_ONESIGNAL_CLIENT_MODEL_Inline_response_202_H_ +#ifndef COM_ONESIGNAL_CLIENT_MODEL_PropertiesBody_H_ +#define COM_ONESIGNAL_CLIENT_MODEL_PropertiesBody_H_ #include "CppRestOneSignalAPIClient/ModelBase.h" @@ -34,12 +34,12 @@ class PropertiesObject; /// /// /// -class Inline_response_202 +class PropertiesBody : public ModelBase { public: - Inline_response_202(); - virtual ~Inline_response_202(); + PropertiesBody(); + virtual ~PropertiesBody(); ///////////////////////////////////////////// /// ModelBase overrides @@ -53,7 +53,7 @@ class Inline_response_202 bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; ///////////////////////////////////////////// - /// Inline_response_202 members + /// PropertiesBody members /// /// @@ -76,4 +76,4 @@ class Inline_response_202 } } -#endif /* COM_ONESIGNAL_CLIENT_MODEL_Inline_response_202_H_ */ +#endif /* COM_ONESIGNAL_CLIENT_MODEL_PropertiesBody_H_ */ diff --git a/include/CppRestOneSignalAPIClient/model/PropertiesDeltas.h b/include/CppRestOneSignalAPIClient/model/PropertiesDeltas.h index 964c5af..6cfa091 100644 --- a/include/CppRestOneSignalAPIClient/model/PropertiesDeltas.h +++ b/include/CppRestOneSignalAPIClient/model/PropertiesDeltas.h @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. @@ -59,20 +59,20 @@ class PropertiesDeltas /// /// /// - double getSessionTime() const; + int32_t getSessionTime() const; bool sessionTimeIsSet() const; void unsetSession_time(); - void setSessionTime(double value); + void setSessionTime(int32_t value); /// /// /// - double getSessionCount() const; + int32_t getSessionCount() const; bool sessionCountIsSet() const; void unsetSession_count(); - void setSessionCount(double value); + void setSessionCount(int32_t value); /// /// @@ -85,9 +85,9 @@ class PropertiesDeltas protected: - double m_Session_time; + int32_t m_Session_time; bool m_Session_timeIsSet; - double m_Session_count; + int32_t m_Session_count; bool m_Session_countIsSet; std::vector> m_Purchases; bool m_PurchasesIsSet; diff --git a/include/CppRestOneSignalAPIClient/model/PropertiesObject.h b/include/CppRestOneSignalAPIClient/model/PropertiesObject.h index 325e5ae..f933324 100644 --- a/include/CppRestOneSignalAPIClient/model/PropertiesObject.h +++ b/include/CppRestOneSignalAPIClient/model/PropertiesObject.h @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. @@ -115,20 +115,20 @@ class PropertiesObject /// /// /// - double getFirstActive() const; + int32_t getFirstActive() const; bool firstActiveIsSet() const; void unsetFirst_active(); - void setFirstActive(double value); + void setFirstActive(int32_t value); /// /// /// - double getLastActive() const; + int32_t getLastActive() const; bool lastActiveIsSet() const; void unsetLast_active(); - void setLastActive(double value); + void setLastActive(int32_t value); /// /// @@ -171,9 +171,9 @@ class PropertiesObject bool m_longIsSet; utility::string_t m_Country; bool m_CountryIsSet; - double m_First_active; + int32_t m_First_active; bool m_First_activeIsSet; - double m_Last_active; + int32_t m_Last_active; bool m_Last_activeIsSet; double m_Amount_spent; bool m_Amount_spentIsSet; diff --git a/include/CppRestOneSignalAPIClient/model/Purchase.h b/include/CppRestOneSignalAPIClient/model/Purchase.h index f47703f..6922f11 100644 --- a/include/CppRestOneSignalAPIClient/model/Purchase.h +++ b/include/CppRestOneSignalAPIClient/model/Purchase.h @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. @@ -84,11 +84,11 @@ class Purchase /// /// /// - double getCount() const; + int32_t getCount() const; bool countIsSet() const; void unsetCount(); - void setCount(double value); + void setCount(int32_t value); protected: @@ -98,7 +98,7 @@ class Purchase bool m_AmountIsSet; utility::string_t m_Iso; bool m_IsoIsSet; - double m_Count; + int32_t m_Count; bool m_CountIsSet; }; diff --git a/include/CppRestOneSignalAPIClient/model/RateLimiterError.h b/include/CppRestOneSignalAPIClient/model/RateLimitError.h similarity index 61% rename from include/CppRestOneSignalAPIClient/model/RateLimiterError.h rename to include/CppRestOneSignalAPIClient/model/RateLimitError.h index ca7a55f..e56f87c 100644 --- a/include/CppRestOneSignalAPIClient/model/RateLimiterError.h +++ b/include/CppRestOneSignalAPIClient/model/RateLimitError.h @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. @@ -11,36 +11,35 @@ */ /* - * RateLimiterError.h + * RateLimitError.h * * */ -#ifndef COM_ONESIGNAL_CLIENT_MODEL_RateLimiterError_H_ -#define COM_ONESIGNAL_CLIENT_MODEL_RateLimiterError_H_ +#ifndef COM_ONESIGNAL_CLIENT_MODEL_RateLimitError_H_ +#define COM_ONESIGNAL_CLIENT_MODEL_RateLimitError_H_ #include "CppRestOneSignalAPIClient/ModelBase.h" +#include #include -#include "CppRestOneSignalAPIClient/model/GenericError_errors_inner.h" namespace com { namespace onesignal { namespace client { namespace model { -class GenericError_errors_inner; /// /// /// -class RateLimiterError +class RateLimitError : public ModelBase { public: - RateLimiterError(); - virtual ~RateLimiterError(); + RateLimitError(); + virtual ~RateLimitError(); ///////////////////////////////////////////// /// ModelBase overrides @@ -54,21 +53,32 @@ class RateLimiterError bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; ///////////////////////////////////////////// - /// RateLimiterError members + /// RateLimitError members /// /// /// - std::vector>& getErrors(); + std::vector& getErrors(); bool errorsIsSet() const; void unsetErrors(); - void setErrors(const std::vector>& value); + void setErrors(const std::vector& value); + + /// + /// + /// + utility::string_t getLimit() const; + bool limitIsSet() const; + void unsetLimit(); + + void setLimit(const utility::string_t& value); protected: - std::vector> m_Errors; + std::vector m_Errors; bool m_ErrorsIsSet; + utility::string_t m_Limit; + bool m_LimitIsSet; }; @@ -77,4 +87,4 @@ class RateLimiterError } } -#endif /* COM_ONESIGNAL_CLIENT_MODEL_RateLimiterError_H_ */ +#endif /* COM_ONESIGNAL_CLIENT_MODEL_RateLimitError_H_ */ diff --git a/include/CppRestOneSignalAPIClient/model/Segment.h b/include/CppRestOneSignalAPIClient/model/Segment.h index 37a52cd..98fc135 100644 --- a/include/CppRestOneSignalAPIClient/model/Segment.h +++ b/include/CppRestOneSignalAPIClient/model/Segment.h @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. @@ -22,7 +22,7 @@ #include "CppRestOneSignalAPIClient/ModelBase.h" -#include "CppRestOneSignalAPIClient/model/FilterExpressions.h" +#include "CppRestOneSignalAPIClient/model/FilterExpression.h" #include #include @@ -31,7 +31,7 @@ namespace onesignal { namespace client { namespace model { -class FilterExpressions; +class FilterExpression; /// /// @@ -78,11 +78,11 @@ class Segment /// /// Filter or operators the segment will have. For a list of available filters with details, please see Send to Users Based on Filters. /// - std::vector>& getFilters(); + std::vector>& getFilters(); bool filtersIsSet() const; void unsetFilters(); - void setFilters(const std::vector>& value); + void setFilters(const std::vector>& value); protected: @@ -90,7 +90,7 @@ class Segment bool m_IdIsSet; utility::string_t m_Name; bool m_NameIsSet; - std::vector> m_Filters; + std::vector> m_Filters; bool m_FiltersIsSet; }; diff --git a/include/CppRestOneSignalAPIClient/model/SegmentData.h b/include/CppRestOneSignalAPIClient/model/SegmentData.h new file mode 100644 index 0000000..1556eba --- /dev/null +++ b/include/CppRestOneSignalAPIClient/model/SegmentData.h @@ -0,0 +1,144 @@ +/** + * 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: 5.0.1 + * Contact: devrel@onesignal.com + * + * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/* + * SegmentData.h + * + * + */ + +#ifndef COM_ONESIGNAL_CLIENT_MODEL_SegmentData_H_ +#define COM_ONESIGNAL_CLIENT_MODEL_SegmentData_H_ + + +#include "CppRestOneSignalAPIClient/ModelBase.h" + +#include + +namespace com { +namespace onesignal { +namespace client { +namespace model { + + +/// +/// +/// +class SegmentData + : public ModelBase +{ +public: + SegmentData(); + virtual ~SegmentData(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + + void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; + bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; + + ///////////////////////////////////////////// + /// SegmentData members + + /// + /// The segment ID + /// + utility::string_t getId() const; + bool idIsSet() const; + void unsetId(); + + void setId(const utility::string_t& value); + + /// + /// The segment name + /// + utility::string_t getName() const; + bool nameIsSet() const; + void unsetName(); + + void setName(const utility::string_t& value); + + /// + /// Date segment created + /// + utility::string_t getCreatedAt() const; + bool createdAtIsSet() const; + void unsetCreated_at(); + + void setCreatedAt(const utility::string_t& value); + + /// + /// Date segment last updated + /// + utility::string_t getUpdatedAt() const; + bool updatedAtIsSet() const; + void unsetUpdated_at(); + + void setUpdatedAt(const utility::string_t& value); + + /// + /// The app id + /// + utility::string_t getAppId() const; + bool appIdIsSet() const; + void unsetApp_id(); + + void setAppId(const utility::string_t& value); + + /// + /// Is the segment read only? + /// + bool isReadOnly() const; + bool readOnlyIsSet() const; + void unsetRead_only(); + + void setReadOnly(bool value); + + /// + /// Is the segment active? + /// + bool isIsActive() const; + bool isActiveIsSet() const; + void unsetIs_active(); + + void setIsActive(bool value); + + +protected: + utility::string_t m_Id; + bool m_IdIsSet; + utility::string_t m_Name; + bool m_NameIsSet; + utility::string_t m_Created_at; + bool m_Created_atIsSet; + utility::string_t m_Updated_at; + bool m_Updated_atIsSet; + utility::string_t m_App_id; + bool m_App_idIsSet; + bool m_Read_only; + bool m_Read_onlyIsSet; + bool m_Is_active; + bool m_Is_activeIsSet; +}; + + +} +} +} +} + +#endif /* COM_ONESIGNAL_CLIENT_MODEL_SegmentData_H_ */ diff --git a/include/CppRestOneSignalAPIClient/model/SegmentNotificationTarget.h b/include/CppRestOneSignalAPIClient/model/SegmentNotificationTarget.h index 00ff72c..4d0bcc0 100644 --- a/include/CppRestOneSignalAPIClient/model/SegmentNotificationTarget.h +++ b/include/CppRestOneSignalAPIClient/model/SegmentNotificationTarget.h @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. diff --git a/include/CppRestOneSignalAPIClient/model/SubscriptionObject.h b/include/CppRestOneSignalAPIClient/model/Subscription.h similarity index 84% rename from include/CppRestOneSignalAPIClient/model/SubscriptionObject.h rename to include/CppRestOneSignalAPIClient/model/Subscription.h index 01c7bdc..61b3087 100644 --- a/include/CppRestOneSignalAPIClient/model/SubscriptionObject.h +++ b/include/CppRestOneSignalAPIClient/model/Subscription.h @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. @@ -11,13 +11,13 @@ */ /* - * SubscriptionObject.h + * Subscription.h * * */ -#ifndef COM_ONESIGNAL_CLIENT_MODEL_SubscriptionObject_H_ -#define COM_ONESIGNAL_CLIENT_MODEL_SubscriptionObject_H_ +#ifndef COM_ONESIGNAL_CLIENT_MODEL_Subscription_H_ +#define COM_ONESIGNAL_CLIENT_MODEL_Subscription_H_ #include "CppRestOneSignalAPIClient/ModelBase.h" @@ -33,12 +33,12 @@ namespace model { /// /// /// -class SubscriptionObject +class Subscription : public ModelBase { public: - SubscriptionObject(); - virtual ~SubscriptionObject(); + Subscription(); + virtual ~Subscription(); ///////////////////////////////////////////// /// ModelBase overrides @@ -52,7 +52,7 @@ class SubscriptionObject bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; ///////////////////////////////////////////// - /// SubscriptionObject members + /// Subscription members /// /// @@ -93,29 +93,29 @@ class SubscriptionObject /// /// /// - double getNotificationTypes() const; + int32_t getNotificationTypes() const; bool notificationTypesIsSet() const; void unsetNotification_types(); - void setNotificationTypes(double value); + void setNotificationTypes(int32_t value); /// /// /// - double getSessionTime() const; + int32_t getSessionTime() const; bool sessionTimeIsSet() const; void unsetSession_time(); - void setSessionTime(double value); + void setSessionTime(int32_t value); /// /// /// - double getSessionCount() const; + int32_t getSessionCount() const; bool sessionCountIsSet() const; void unsetSession_count(); - void setSessionCount(double value); + void setSessionCount(int32_t value); /// /// @@ -156,11 +156,11 @@ class SubscriptionObject /// /// /// - double getTestType() const; + int32_t getTestType() const; bool testTypeIsSet() const; void unsetTest_type(); - void setTestType(double value); + void setTestType(int32_t value); /// /// @@ -174,11 +174,11 @@ class SubscriptionObject /// /// /// - double getNetType() const; + int32_t getNetType() const; bool netTypeIsSet() const; void unsetNet_type(); - void setNetType(double value); + void setNetType(int32_t value); /// /// @@ -217,11 +217,11 @@ class SubscriptionObject bool m_TokenIsSet; bool m_Enabled; bool m_EnabledIsSet; - double m_Notification_types; + int32_t m_Notification_types; bool m_Notification_typesIsSet; - double m_Session_time; + int32_t m_Session_time; bool m_Session_timeIsSet; - double m_Session_count; + int32_t m_Session_count; bool m_Session_countIsSet; utility::string_t m_Sdk; bool m_SdkIsSet; @@ -231,11 +231,11 @@ class SubscriptionObject bool m_Device_osIsSet; bool m_Rooted; bool m_RootedIsSet; - double m_Test_type; + int32_t m_Test_type; bool m_Test_typeIsSet; utility::string_t m_App_version; bool m_App_versionIsSet; - double m_Net_type; + int32_t m_Net_type; bool m_Net_typeIsSet; utility::string_t m_Carrier; bool m_CarrierIsSet; @@ -251,4 +251,4 @@ class SubscriptionObject } } -#endif /* COM_ONESIGNAL_CLIENT_MODEL_SubscriptionObject_H_ */ +#endif /* COM_ONESIGNAL_CLIENT_MODEL_Subscription_H_ */ diff --git a/include/CppRestOneSignalAPIClient/model/Inline_response_201.h b/include/CppRestOneSignalAPIClient/model/SubscriptionBody.h similarity index 64% rename from include/CppRestOneSignalAPIClient/model/Inline_response_201.h rename to include/CppRestOneSignalAPIClient/model/SubscriptionBody.h index d184a90..010e4ce 100644 --- a/include/CppRestOneSignalAPIClient/model/Inline_response_201.h +++ b/include/CppRestOneSignalAPIClient/model/SubscriptionBody.h @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. @@ -11,35 +11,35 @@ */ /* - * Inline_response_201.h + * SubscriptionBody.h * * */ -#ifndef COM_ONESIGNAL_CLIENT_MODEL_Inline_response_201_H_ -#define COM_ONESIGNAL_CLIENT_MODEL_Inline_response_201_H_ +#ifndef COM_ONESIGNAL_CLIENT_MODEL_SubscriptionBody_H_ +#define COM_ONESIGNAL_CLIENT_MODEL_SubscriptionBody_H_ #include "CppRestOneSignalAPIClient/ModelBase.h" -#include "CppRestOneSignalAPIClient/model/SubscriptionObject.h" +#include "CppRestOneSignalAPIClient/model/Subscription.h" namespace com { namespace onesignal { namespace client { namespace model { -class SubscriptionObject; +class Subscription; /// /// /// -class Inline_response_201 +class SubscriptionBody : public ModelBase { public: - Inline_response_201(); - virtual ~Inline_response_201(); + SubscriptionBody(); + virtual ~SubscriptionBody(); ///////////////////////////////////////////// /// ModelBase overrides @@ -53,20 +53,20 @@ class Inline_response_201 bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; ///////////////////////////////////////////// - /// Inline_response_201 members + /// SubscriptionBody members /// /// /// - std::shared_ptr getSubscription() const; + std::shared_ptr getSubscription() const; bool subscriptionIsSet() const; void unsetSubscription(); - void setSubscription(const std::shared_ptr& value); + void setSubscription(const std::shared_ptr& value); protected: - std::shared_ptr m_Subscription; + std::shared_ptr m_Subscription; bool m_SubscriptionIsSet; }; @@ -76,4 +76,4 @@ class Inline_response_201 } } -#endif /* COM_ONESIGNAL_CLIENT_MODEL_Inline_response_201_H_ */ +#endif /* COM_ONESIGNAL_CLIENT_MODEL_SubscriptionBody_H_ */ diff --git a/include/CppRestOneSignalAPIClient/model/PlayerNotificationTarget.h b/include/CppRestOneSignalAPIClient/model/SubscriptionNotificationTarget.h similarity index 57% rename from include/CppRestOneSignalAPIClient/model/PlayerNotificationTarget.h rename to include/CppRestOneSignalAPIClient/model/SubscriptionNotificationTarget.h index 4ed929d..d039aaa 100644 --- a/include/CppRestOneSignalAPIClient/model/PlayerNotificationTarget.h +++ b/include/CppRestOneSignalAPIClient/model/SubscriptionNotificationTarget.h @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. @@ -11,19 +11,19 @@ */ /* - * PlayerNotificationTarget.h + * SubscriptionNotificationTarget.h * * */ -#ifndef COM_ONESIGNAL_CLIENT_MODEL_PlayerNotificationTarget_H_ -#define COM_ONESIGNAL_CLIENT_MODEL_PlayerNotificationTarget_H_ +#ifndef COM_ONESIGNAL_CLIENT_MODEL_SubscriptionNotificationTarget_H_ +#define COM_ONESIGNAL_CLIENT_MODEL_SubscriptionNotificationTarget_H_ #include "CppRestOneSignalAPIClient/ModelBase.h" #include -#include "CppRestOneSignalAPIClient/model/PlayerNotificationTarget_include_aliases.h" +#include #include namespace com { @@ -31,17 +31,16 @@ namespace onesignal { namespace client { namespace model { -class PlayerNotificationTarget_include_aliases; /// /// /// -class PlayerNotificationTarget +class SubscriptionNotificationTarget : public ModelBase { public: - PlayerNotificationTarget(); - virtual ~PlayerNotificationTarget(); + SubscriptionNotificationTarget(); + virtual ~SubscriptionNotificationTarget(); ///////////////////////////////////////////// /// ModelBase overrides @@ -55,25 +54,16 @@ class PlayerNotificationTarget bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; ///////////////////////////////////////////// - /// PlayerNotificationTarget members + /// SubscriptionNotificationTarget members /// - /// Specific playerids to send your notification to. _Does not require API Auth Key. Do not combine with other targeting parameters. Not compatible with any other targeting parameters. Example: [\"1dd608f2-c6a1-11e3-851d-000c2940e62c\"] Limit of 2,000 entries per REST API call + /// Specific subscription ids to send your notification to. _Does not require API Auth Key._ Not compatible with any other targeting parameters. Example: [\"1dd608f2-c6a1-11e3-851d-000c2940e62c\"] Limit of 2,000 entries per REST API call /// - std::vector& getIncludePlayerIds(); - bool includePlayerIdsIsSet() const; - void unsetInclude_player_ids(); + std::vector& getIncludeSubscriptionIds(); + bool includeSubscriptionIdsIsSet() const; + void unsetInclude_subscription_ids(); - void setIncludePlayerIds(const std::vector& value); - - /// - /// Target specific devices by custom user IDs assigned via API. Not compatible with any other targeting parameters Example: [\"custom-id-assigned-by-api\"] REQUIRED: REST API Key Authentication Limit of 2,000 entries per REST API call. Note: If targeting push, email, or sms subscribers with same ids, use with channel_for_external_user_ids to indicate you are sending a push or email or sms. - /// - std::vector& getIncludeExternalUserIds(); - bool includeExternalUserIdsIsSet() const; - void unsetInclude_external_user_ids(); - - void setIncludeExternalUserIds(const std::vector& value); + void setIncludeSubscriptionIds(const std::vector& value); /// /// Recommended for Sending Emails - Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts Limit of 2,000 entries per REST API call @@ -94,7 +84,7 @@ class PlayerNotificationTarget void setIncludePhoneNumbers(const std::vector& value); /// - /// Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using iOS device tokens. Warning: Only works with Production tokens. All non-alphanumeric characters must be removed from each token. If a token does not correspond to an existing user, a new user will be created. Example: ce777617da7f548fe7a9ab6febb56cf39fba6d38203... Limit of 2,000 entries per REST API call + /// Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using iOS device tokens. Warning: Only works with Production tokens. All non-alphanumeric characters must be removed from each token. If a token does not correspond to an existing user, a new user will be created. Example: ce777617da7f548fe7a9ab6febb56cf39fba6d38203... Limit of 2,000 entries per REST API call /// std::vector& getIncludeIosTokens(); bool includeIosTokensIsSet() const; @@ -103,7 +93,7 @@ class PlayerNotificationTarget void setIncludeIosTokens(const std::vector& value); /// - /// Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Windows URIs. If a token does not correspond to an existing user, a new user will be created. Example: http://s.notify.live.net/u/1/bn1/HmQAAACPaLDr-... Limit of 2,000 entries per REST API call + /// Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Windows URIs. If a token does not correspond to an existing user, a new user will be created. Example: http://s.notify.live.net/u/1/bn1/HmQAAACPaLDr-... Limit of 2,000 entries per REST API call /// std::vector& getIncludeWpWnsUris(); bool includeWpWnsUrisIsSet() const; @@ -112,7 +102,7 @@ class PlayerNotificationTarget void setIncludeWpWnsUris(const std::vector& value); /// - /// Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Amazon ADM registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: amzn1.adm-registration.v1.XpvSSUk0Rc3hTVVV... Limit of 2,000 entries per REST API call + /// Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Amazon ADM registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: amzn1.adm-registration.v1.XpvSSUk0Rc3hTVVV... Limit of 2,000 entries per REST API call /// std::vector& getIncludeAmazonRegIds(); bool includeAmazonRegIdsIsSet() const; @@ -121,7 +111,7 @@ class PlayerNotificationTarget void setIncludeAmazonRegIds(const std::vector& value); /// - /// Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Chrome App registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call + /// Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Chrome App registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call /// std::vector& getIncludeChromeRegIds(); bool includeChromeRegIdsIsSet() const; @@ -130,7 +120,7 @@ class PlayerNotificationTarget void setIncludeChromeRegIds(const std::vector& value); /// - /// Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Chrome Web Push registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call + /// Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Chrome Web Push registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call /// std::vector& getIncludeChromeWebRegIds(); bool includeChromeWebRegIdsIsSet() const; @@ -139,7 +129,7 @@ class PlayerNotificationTarget void setIncludeChromeWebRegIds(const std::vector& value); /// - /// Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Android device registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call + /// Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Android device registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call /// std::vector& getIncludeAndroidRegIds(); bool includeAndroidRegIdsIsSet() const; @@ -148,13 +138,13 @@ class PlayerNotificationTarget void setIncludeAndroidRegIds(const std::vector& value); /// - /// + /// Target specific users by aliases assigned via API. An alias can be an external_id, onesignal_id, or a custom alias. Accepts an object where keys are alias labels and values are arrays of alias IDs to include Example usage: { \"external_id\": [\"exId1\", \"extId2\"], \"internal_label\": [\"id1\", \"id2\"] } Not compatible with any other targeting parameters. REQUIRED: REST API Key Authentication Limit of 2,000 entries per REST API call Note: If targeting push, email, or sms subscribers with same ids, use with target_channel to indicate you are sending a push or email or sms. /// - std::shared_ptr getIncludeAliases() const; + std::map& getIncludeAliases(); bool includeAliasesIsSet() const; void unsetInclude_aliases(); - void setIncludeAliases(const std::shared_ptr& value); + void setIncludeAliases(const std::map& value); /// /// @@ -167,10 +157,8 @@ class PlayerNotificationTarget protected: - std::vector m_Include_player_ids; - bool m_Include_player_idsIsSet; - std::vector m_Include_external_user_ids; - bool m_Include_external_user_idsIsSet; + std::vector m_Include_subscription_ids; + bool m_Include_subscription_idsIsSet; std::vector m_Include_email_tokens; bool m_Include_email_tokensIsSet; std::vector m_Include_phone_numbers; @@ -187,7 +175,7 @@ class PlayerNotificationTarget bool m_Include_chrome_web_reg_idsIsSet; std::vector m_Include_android_reg_ids; bool m_Include_android_reg_idsIsSet; - std::shared_ptr m_Include_aliases; + std::map m_Include_aliases; bool m_Include_aliasesIsSet; utility::string_t m_Target_channel; bool m_Target_channelIsSet; @@ -199,4 +187,4 @@ class PlayerNotificationTarget } } -#endif /* COM_ONESIGNAL_CLIENT_MODEL_PlayerNotificationTarget_H_ */ +#endif /* COM_ONESIGNAL_CLIENT_MODEL_SubscriptionNotificationTarget_H_ */ diff --git a/include/CppRestOneSignalAPIClient/model/TransferSubscriptionRequestBody.h b/include/CppRestOneSignalAPIClient/model/TransferSubscriptionRequestBody.h index 63019ef..00a03cd 100644 --- a/include/CppRestOneSignalAPIClient/model/TransferSubscriptionRequestBody.h +++ b/include/CppRestOneSignalAPIClient/model/TransferSubscriptionRequestBody.h @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. @@ -22,6 +22,7 @@ #include "CppRestOneSignalAPIClient/ModelBase.h" +#include #include #include diff --git a/include/CppRestOneSignalAPIClient/model/UpdateLiveActivityRequest.h b/include/CppRestOneSignalAPIClient/model/UpdateLiveActivityRequest.h index b6a5cdd..d531555 100644 --- a/include/CppRestOneSignalAPIClient/model/UpdateLiveActivityRequest.h +++ b/include/CppRestOneSignalAPIClient/model/UpdateLiveActivityRequest.h @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. @@ -23,6 +23,7 @@ #include "CppRestOneSignalAPIClient/ModelBase.h" #include "CppRestOneSignalAPIClient/Object.h" +#include "CppRestOneSignalAPIClient/model/LanguageStringMap.h" #include namespace com { @@ -30,6 +31,7 @@ namespace onesignal { namespace client { namespace model { +class LanguageStringMap; /// /// @@ -56,7 +58,7 @@ class UpdateLiveActivityRequest /// UpdateLiveActivityRequest members /// - /// Type of live activity + /// An internal name to assist with your campaign organization. This does not get displayed in the message itself. /// utility::string_t getName() const; bool nameIsSet() const; @@ -74,7 +76,7 @@ class UpdateLiveActivityRequest void setEvent(const utility::string_t& value); /// - /// + /// This must match the ContentState interface you have defined within your Live Activity in your app. /// std::shared_ptr getEventUpdates() const; bool eventUpdatesIsSet() const; @@ -83,13 +85,58 @@ class UpdateLiveActivityRequest void setEventUpdates(const std::shared_ptr& value); /// - /// Timestamp; only allowed if event is \"end\" + /// + /// + std::shared_ptr getContents() const; + bool contentsIsSet() const; + void unsetContents(); + + void setContents(const std::shared_ptr& value); + + /// + /// + /// + std::shared_ptr getHeadings() const; + bool headingsIsSet() const; + void unsetHeadings(); + + void setHeadings(const std::shared_ptr& value); + + /// + /// Sound file that is included in your app to play instead of the default device notification sound. Omit to disable vibration and sound for the notification. + /// + utility::string_t getSound() const; + bool soundIsSet() const; + void unsetSound(); + + void setSound(const utility::string_t& value); + + /// + /// Accepts Unix timestamp in seconds. When time reaches the configured stale date, the system considers the Live Activity out of date, and the ActivityState of the Live Activity changes to ActivityState.stale. + /// + int32_t getStaleDate() const; + bool staleDateIsSet() const; + void unsetStale_date(); + + void setStaleDate(int32_t value); + + /// + /// Accepts Unix timestamp in seconds; only allowed if event is \"end\" + /// + int32_t getDismissalDate() const; + bool dismissalDateIsSet() const; + void unsetDismissal_date(); + + void setDismissalDate(int32_t value); + + /// + /// Delivery priority through the the push provider (APNs). Pass 10 for higher priority notifications, or 5 for lower priority notifications. Lower priority notifications are sent based on the power considerations of the end user's device. If not set, defaults to 10. Some providers (APNs) allow for a limited budget of high priority notifications per hour, and if that budget is exceeded, the provider may throttle notification delivery. /// - double getDismissAt() const; - bool dismissAtIsSet() const; - void unsetDismiss_at(); + int32_t getPriority() const; + bool priorityIsSet() const; + void unsetPriority(); - void setDismissAt(double value); + void setPriority(int32_t value); protected: @@ -99,8 +146,18 @@ class UpdateLiveActivityRequest bool m_EventIsSet; std::shared_ptr m_Event_updates; bool m_Event_updatesIsSet; - double m_Dismiss_at; - bool m_Dismiss_atIsSet; + std::shared_ptr m_Contents; + bool m_ContentsIsSet; + std::shared_ptr m_Headings; + bool m_HeadingsIsSet; + utility::string_t m_Sound; + bool m_SoundIsSet; + int32_t m_Stale_date; + bool m_Stale_dateIsSet; + int32_t m_Dismissal_date; + bool m_Dismissal_dateIsSet; + int32_t m_Priority; + bool m_PriorityIsSet; }; diff --git a/include/CppRestOneSignalAPIClient/model/UpdateLiveActivitySuccessResponse.h b/include/CppRestOneSignalAPIClient/model/UpdateLiveActivitySuccessResponse.h index d3b1e12..019761c 100644 --- a/include/CppRestOneSignalAPIClient/model/UpdateLiveActivitySuccessResponse.h +++ b/include/CppRestOneSignalAPIClient/model/UpdateLiveActivitySuccessResponse.h @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. @@ -22,7 +22,6 @@ #include "CppRestOneSignalAPIClient/ModelBase.h" -#include "CppRestOneSignalAPIClient/model/Notification200Errors.h" #include namespace com { @@ -30,7 +29,6 @@ namespace onesignal { namespace client { namespace model { -class Notification200Errors; /// /// @@ -59,27 +57,16 @@ class UpdateLiveActivitySuccessResponse /// /// /// - utility::string_t getNotificationId() const; - bool notificationIdIsSet() const; - void unsetNotification_id(); + utility::string_t getId() const; + bool idIsSet() const; + void unsetId(); - void setNotificationId(const utility::string_t& value); - - /// - /// - /// - std::shared_ptr getErrors() const; - bool errorsIsSet() const; - void unsetErrors(); - - void setErrors(const std::shared_ptr& value); + void setId(const utility::string_t& value); protected: - utility::string_t m_Notification_id; - bool m_Notification_idIsSet; - std::shared_ptr m_Errors; - bool m_ErrorsIsSet; + utility::string_t m_Id; + bool m_IdIsSet; }; diff --git a/include/CppRestOneSignalAPIClient/model/UpdatePlayerSuccessResponse.h b/include/CppRestOneSignalAPIClient/model/UpdatePlayerSuccessResponse.h deleted file mode 100644 index 79e5bc2..0000000 --- a/include/CppRestOneSignalAPIClient/model/UpdatePlayerSuccessResponse.h +++ /dev/null @@ -1,77 +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.4.0 - * Contact: devrel@onesignal.com - * - * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * UpdatePlayerSuccessResponse.h - * - * - */ - -#ifndef COM_ONESIGNAL_CLIENT_MODEL_UpdatePlayerSuccessResponse_H_ -#define COM_ONESIGNAL_CLIENT_MODEL_UpdatePlayerSuccessResponse_H_ - - -#include "CppRestOneSignalAPIClient/ModelBase.h" - - -namespace com { -namespace onesignal { -namespace client { -namespace model { - - -/// -/// -/// -class UpdatePlayerSuccessResponse - : public ModelBase -{ -public: - UpdatePlayerSuccessResponse(); - virtual ~UpdatePlayerSuccessResponse(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - ///////////////////////////////////////////// - /// UpdatePlayerSuccessResponse members - - /// - /// - /// - bool isSuccess() const; - bool successIsSet() const; - void unsetSuccess(); - - void setSuccess(bool value); - - -protected: - bool m_Success; - bool m_SuccessIsSet; -}; - - -} -} -} -} - -#endif /* COM_ONESIGNAL_CLIENT_MODEL_UpdatePlayerSuccessResponse_H_ */ diff --git a/include/CppRestOneSignalAPIClient/model/UpdatePlayerTagsSuccessResponse.h b/include/CppRestOneSignalAPIClient/model/UpdatePlayerTagsSuccessResponse.h deleted file mode 100644 index 8c99b4b..0000000 --- a/include/CppRestOneSignalAPIClient/model/UpdatePlayerTagsSuccessResponse.h +++ /dev/null @@ -1,77 +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.4.0 - * Contact: devrel@onesignal.com - * - * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * UpdatePlayerTagsSuccessResponse.h - * - * - */ - -#ifndef COM_ONESIGNAL_CLIENT_MODEL_UpdatePlayerTagsSuccessResponse_H_ -#define COM_ONESIGNAL_CLIENT_MODEL_UpdatePlayerTagsSuccessResponse_H_ - - -#include "CppRestOneSignalAPIClient/ModelBase.h" - - -namespace com { -namespace onesignal { -namespace client { -namespace model { - - -/// -/// -/// -class UpdatePlayerTagsSuccessResponse - : public ModelBase -{ -public: - UpdatePlayerTagsSuccessResponse(); - virtual ~UpdatePlayerTagsSuccessResponse(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - ///////////////////////////////////////////// - /// UpdatePlayerTagsSuccessResponse members - - /// - /// - /// - bool isSuccess() const; - bool successIsSet() const; - void unsetSuccess(); - - void setSuccess(bool value); - - -protected: - bool m_Success; - bool m_SuccessIsSet; -}; - - -} -} -} -} - -#endif /* COM_ONESIGNAL_CLIENT_MODEL_UpdatePlayerTagsSuccessResponse_H_ */ diff --git a/include/CppRestOneSignalAPIClient/model/UpdateSubscriptionRequestBody.h b/include/CppRestOneSignalAPIClient/model/UpdateSubscriptionRequestBody.h deleted file mode 100644 index 34b78a8..0000000 --- a/include/CppRestOneSignalAPIClient/model/UpdateSubscriptionRequestBody.h +++ /dev/null @@ -1,79 +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.4.0 - * Contact: devrel@onesignal.com - * - * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * UpdateSubscriptionRequestBody.h - * - * - */ - -#ifndef COM_ONESIGNAL_CLIENT_MODEL_UpdateSubscriptionRequestBody_H_ -#define COM_ONESIGNAL_CLIENT_MODEL_UpdateSubscriptionRequestBody_H_ - - -#include "CppRestOneSignalAPIClient/ModelBase.h" - -#include "CppRestOneSignalAPIClient/model/SubscriptionObject.h" - -namespace com { -namespace onesignal { -namespace client { -namespace model { - -class SubscriptionObject; - -/// -/// -/// -class UpdateSubscriptionRequestBody - : public ModelBase -{ -public: - UpdateSubscriptionRequestBody(); - virtual ~UpdateSubscriptionRequestBody(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - ///////////////////////////////////////////// - /// UpdateSubscriptionRequestBody members - - /// - /// - /// - std::shared_ptr getSubscription() const; - bool subscriptionIsSet() const; - void unsetSubscription(); - - void setSubscription(const std::shared_ptr& value); - - -protected: - std::shared_ptr m_Subscription; - bool m_SubscriptionIsSet; -}; - - -} -} -} -} - -#endif /* COM_ONESIGNAL_CLIENT_MODEL_UpdateSubscriptionRequestBody_H_ */ diff --git a/include/CppRestOneSignalAPIClient/model/UpdateUserRequest.h b/include/CppRestOneSignalAPIClient/model/UpdateUserRequest.h index 65918f7..577089e 100644 --- a/include/CppRestOneSignalAPIClient/model/UpdateUserRequest.h +++ b/include/CppRestOneSignalAPIClient/model/UpdateUserRequest.h @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. diff --git a/include/CppRestOneSignalAPIClient/model/Update_player_tags_request_body.h b/include/CppRestOneSignalAPIClient/model/Update_player_tags_request_body.h deleted file mode 100644 index 1e5560c..0000000 --- a/include/CppRestOneSignalAPIClient/model/Update_player_tags_request_body.h +++ /dev/null @@ -1,78 +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.4.0 - * Contact: devrel@onesignal.com - * - * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * Update_player_tags_request_body.h - * - * - */ - -#ifndef COM_ONESIGNAL_CLIENT_MODEL_Update_player_tags_request_body_H_ -#define COM_ONESIGNAL_CLIENT_MODEL_Update_player_tags_request_body_H_ - - -#include "CppRestOneSignalAPIClient/ModelBase.h" - -#include "CppRestOneSignalAPIClient/Object.h" - -namespace com { -namespace onesignal { -namespace client { -namespace model { - - -/// -/// -/// -class Update_player_tags_request_body - : public ModelBase -{ -public: - Update_player_tags_request_body(); - virtual ~Update_player_tags_request_body(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - ///////////////////////////////////////////// - /// Update_player_tags_request_body members - - /// - /// Custom tags for the device record. Only support string key value pairs. Does not support arrays or other nested objects. Example `{\"foo\":\"bar\",\"this\":\"that\"}`. Limitations: - 100 tags per call - Android SDK users: tags cannot be removed or changed via API if set through SDK sendTag methods. Recommended to only tag devices with 1 kilobyte of ata Please consider using your own Database to save more than 1 kilobyte of data. See: Internal Database & CRM - /// - std::shared_ptr getTags() const; - bool tagsIsSet() const; - void unsetTags(); - - void setTags(const std::shared_ptr& value); - - -protected: - std::shared_ptr m_Tags; - bool m_TagsIsSet; -}; - - -} -} -} -} - -#endif /* COM_ONESIGNAL_CLIENT_MODEL_Update_player_tags_request_body_H_ */ diff --git a/include/CppRestOneSignalAPIClient/model/User.h b/include/CppRestOneSignalAPIClient/model/User.h index 28a5928..e8c0fd2 100644 --- a/include/CppRestOneSignalAPIClient/model/User.h +++ b/include/CppRestOneSignalAPIClient/model/User.h @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. @@ -23,10 +23,10 @@ #include "CppRestOneSignalAPIClient/ModelBase.h" #include "CppRestOneSignalAPIClient/model/PropertiesObject.h" +#include +#include "CppRestOneSignalAPIClient/model/Subscription.h" #include #include -#include "CppRestOneSignalAPIClient/model/SubscriptionObject.h" -#include "CppRestOneSignalAPIClient/model/User_subscription_options.h" namespace com { namespace onesignal { @@ -34,8 +34,7 @@ namespace client { namespace model { class PropertiesObject; -class SubscriptionObject; -class User_subscription_options; +class Subscription; /// /// @@ -82,20 +81,11 @@ class User /// /// /// - std::vector>& getSubscriptions(); + std::vector>& getSubscriptions(); bool subscriptionsIsSet() const; void unsetSubscriptions(); - void setSubscriptions(const std::vector>& value); - - /// - /// - /// - std::shared_ptr getSubscriptionOptions() const; - bool subscriptionOptionsIsSet() const; - void unsetSubscription_options(); - - void setSubscriptionOptions(const std::shared_ptr& value); + void setSubscriptions(const std::vector>& value); protected: @@ -103,10 +93,8 @@ class User bool m_PropertiesIsSet; std::map m_Identity; bool m_IdentityIsSet; - std::vector> m_Subscriptions; + std::vector> m_Subscriptions; bool m_SubscriptionsIsSet; - std::shared_ptr m_Subscription_options; - bool m_Subscription_optionsIsSet; }; diff --git a/include/CppRestOneSignalAPIClient/model/Inline_response_200.h b/include/CppRestOneSignalAPIClient/model/UserIdentityBody.h similarity index 78% rename from include/CppRestOneSignalAPIClient/model/Inline_response_200.h rename to include/CppRestOneSignalAPIClient/model/UserIdentityBody.h index b9fb642..57eb531 100644 --- a/include/CppRestOneSignalAPIClient/model/Inline_response_200.h +++ b/include/CppRestOneSignalAPIClient/model/UserIdentityBody.h @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. @@ -11,17 +11,18 @@ */ /* - * Inline_response_200.h + * UserIdentityBody.h * * */ -#ifndef COM_ONESIGNAL_CLIENT_MODEL_Inline_response_200_H_ -#define COM_ONESIGNAL_CLIENT_MODEL_Inline_response_200_H_ +#ifndef COM_ONESIGNAL_CLIENT_MODEL_UserIdentityBody_H_ +#define COM_ONESIGNAL_CLIENT_MODEL_UserIdentityBody_H_ #include "CppRestOneSignalAPIClient/ModelBase.h" +#include #include #include @@ -34,12 +35,12 @@ namespace model { /// /// /// -class Inline_response_200 +class UserIdentityBody : public ModelBase { public: - Inline_response_200(); - virtual ~Inline_response_200(); + UserIdentityBody(); + virtual ~UserIdentityBody(); ///////////////////////////////////////////// /// ModelBase overrides @@ -53,7 +54,7 @@ class Inline_response_200 bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; ///////////////////////////////////////////// - /// Inline_response_200 members + /// UserIdentityBody members /// /// @@ -76,4 +77,4 @@ class Inline_response_200 } } -#endif /* COM_ONESIGNAL_CLIENT_MODEL_Inline_response_200_H_ */ +#endif /* COM_ONESIGNAL_CLIENT_MODEL_UserIdentityBody_H_ */ diff --git a/include/CppRestOneSignalAPIClient/model/UserIdentityRequestBody.h b/include/CppRestOneSignalAPIClient/model/UserIdentityRequestBody.h deleted file mode 100644 index cd27874..0000000 --- a/include/CppRestOneSignalAPIClient/model/UserIdentityRequestBody.h +++ /dev/null @@ -1,79 +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.4.0 - * Contact: devrel@onesignal.com - * - * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * UserIdentityRequestBody.h - * - * - */ - -#ifndef COM_ONESIGNAL_CLIENT_MODEL_UserIdentityRequestBody_H_ -#define COM_ONESIGNAL_CLIENT_MODEL_UserIdentityRequestBody_H_ - - -#include "CppRestOneSignalAPIClient/ModelBase.h" - -#include -#include - -namespace com { -namespace onesignal { -namespace client { -namespace model { - - -/// -/// -/// -class UserIdentityRequestBody - : public ModelBase -{ -public: - UserIdentityRequestBody(); - virtual ~UserIdentityRequestBody(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - ///////////////////////////////////////////// - /// UserIdentityRequestBody members - - /// - /// - /// - std::map& getIdentity(); - bool identityIsSet() const; - void unsetIdentity(); - - void setIdentity(const std::map& value); - - -protected: - std::map m_Identity; - bool m_IdentityIsSet; -}; - - -} -} -} -} - -#endif /* COM_ONESIGNAL_CLIENT_MODEL_UserIdentityRequestBody_H_ */ diff --git a/include/CppRestOneSignalAPIClient/model/UserIdentityResponse.h b/include/CppRestOneSignalAPIClient/model/UserIdentityResponse.h deleted file mode 100644 index 1f576a7..0000000 --- a/include/CppRestOneSignalAPIClient/model/UserIdentityResponse.h +++ /dev/null @@ -1,79 +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.4.0 - * Contact: devrel@onesignal.com - * - * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * UserIdentityResponse.h - * - * - */ - -#ifndef COM_ONESIGNAL_CLIENT_MODEL_UserIdentityResponse_H_ -#define COM_ONESIGNAL_CLIENT_MODEL_UserIdentityResponse_H_ - - -#include "CppRestOneSignalAPIClient/ModelBase.h" - -#include -#include - -namespace com { -namespace onesignal { -namespace client { -namespace model { - - -/// -/// -/// -class UserIdentityResponse - : public ModelBase -{ -public: - UserIdentityResponse(); - virtual ~UserIdentityResponse(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - ///////////////////////////////////////////// - /// UserIdentityResponse members - - /// - /// - /// - std::map& getIdentity(); - bool identityIsSet() const; - void unsetIdentity(); - - void setIdentity(const std::map& value); - - -protected: - std::map m_Identity; - bool m_IdentityIsSet; -}; - - -} -} -} -} - -#endif /* COM_ONESIGNAL_CLIENT_MODEL_UserIdentityResponse_H_ */ diff --git a/include/CppRestOneSignalAPIClient/model/User_subscription_options.h b/include/CppRestOneSignalAPIClient/model/User_subscription_options.h deleted file mode 100644 index 72fc628..0000000 --- a/include/CppRestOneSignalAPIClient/model/User_subscription_options.h +++ /dev/null @@ -1,77 +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.4.0 - * Contact: devrel@onesignal.com - * - * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * User_subscription_options.h - * - * - */ - -#ifndef COM_ONESIGNAL_CLIENT_MODEL_User_subscription_options_H_ -#define COM_ONESIGNAL_CLIENT_MODEL_User_subscription_options_H_ - - -#include "CppRestOneSignalAPIClient/ModelBase.h" - - -namespace com { -namespace onesignal { -namespace client { -namespace model { - - -/// -/// -/// -class User_subscription_options - : public ModelBase -{ -public: - User_subscription_options(); - virtual ~User_subscription_options(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - ///////////////////////////////////////////// - /// User_subscription_options members - - /// - /// - /// - bool isRetainPreviousOwner() const; - bool retainPreviousOwnerIsSet() const; - void unsetRetain_previous_owner(); - - void setRetainPreviousOwner(bool value); - - -protected: - bool m_Retain_previous_owner; - bool m_Retain_previous_ownerIsSet; -}; - - -} -} -} -} - -#endif /* COM_ONESIGNAL_CLIENT_MODEL_User_subscription_options_H_ */ diff --git a/include/CppRestOneSignalAPIClient/model/CreatePlayerSuccessResponse.h b/include/CppRestOneSignalAPIClient/model/WebButton.h similarity index 59% rename from include/CppRestOneSignalAPIClient/model/CreatePlayerSuccessResponse.h rename to include/CppRestOneSignalAPIClient/model/WebButton.h index d976fca..5376818 100644 --- a/include/CppRestOneSignalAPIClient/model/CreatePlayerSuccessResponse.h +++ b/include/CppRestOneSignalAPIClient/model/WebButton.h @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. @@ -11,13 +11,13 @@ */ /* - * CreatePlayerSuccessResponse.h + * WebButton.h * * */ -#ifndef COM_ONESIGNAL_CLIENT_MODEL_CreatePlayerSuccessResponse_H_ -#define COM_ONESIGNAL_CLIENT_MODEL_CreatePlayerSuccessResponse_H_ +#ifndef COM_ONESIGNAL_CLIENT_MODEL_WebButton_H_ +#define COM_ONESIGNAL_CLIENT_MODEL_WebButton_H_ #include "CppRestOneSignalAPIClient/ModelBase.h" @@ -33,12 +33,12 @@ namespace model { /// /// /// -class CreatePlayerSuccessResponse +class WebButton : public ModelBase { public: - CreatePlayerSuccessResponse(); - virtual ~CreatePlayerSuccessResponse(); + WebButton(); + virtual ~WebButton(); ///////////////////////////////////////////// /// ModelBase overrides @@ -52,32 +52,54 @@ class CreatePlayerSuccessResponse bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; ///////////////////////////////////////////// - /// CreatePlayerSuccessResponse members + /// WebButton members /// /// /// - bool isSuccess() const; - bool successIsSet() const; - void unsetSuccess(); + utility::string_t getId() const; + bool idIsSet() const; + void unsetId(); - void setSuccess(bool value); + void setId(const utility::string_t& value); /// /// /// - utility::string_t getId() const; - bool idIsSet() const; - void unsetId(); + utility::string_t getText() const; + bool textIsSet() const; + void unsetText(); - void setId(const utility::string_t& value); + void setText(const utility::string_t& value); + + /// + /// + /// + utility::string_t getIcon() const; + bool iconIsSet() const; + void unsetIcon(); + + void setIcon(const utility::string_t& value); + + /// + /// + /// + utility::string_t getUrl() const; + bool urlIsSet() const; + void unsetUrl(); + + void setUrl(const utility::string_t& value); protected: - bool m_Success; - bool m_SuccessIsSet; utility::string_t m_Id; bool m_IdIsSet; + utility::string_t m_Text; + bool m_TextIsSet; + utility::string_t m_Icon; + bool m_IconIsSet; + utility::string_t m_Url; + bool m_UrlIsSet; }; @@ -86,4 +108,4 @@ class CreatePlayerSuccessResponse } } -#endif /* COM_ONESIGNAL_CLIENT_MODEL_CreatePlayerSuccessResponse_H_ */ +#endif /* COM_ONESIGNAL_CLIENT_MODEL_WebButton_H_ */ diff --git a/src/ApiClient.cpp b/src/ApiClient.cpp index 33e0217..de2440d 100644 --- a/src/ApiClient.cpp +++ b/src/ApiClient.cpp @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. diff --git a/src/ApiConfiguration.cpp b/src/ApiConfiguration.cpp index ec2c446..9509da5 100644 --- a/src/ApiConfiguration.cpp +++ b/src/ApiConfiguration.cpp @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. @@ -95,13 +95,13 @@ void ApiConfiguration::setBearerToken( const utility::string_t& prefix, const ut m_BearerTokens[prefix] = bearerToken; } -void ApiConfiguration::setAppKeyToken( const utility::string_t& bearerToken ) +void ApiConfiguration::setRestApiKeyToken( const utility::string_t& bearerToken ) { - setBearerToken("app_key", bearerToken); + setBearerToken("rest_api_key", bearerToken); } -void ApiConfiguration::setUserKeyToken( const utility::string_t& bearerToken ) +void ApiConfiguration::setUserAuthKeyToken( const utility::string_t& bearerToken ) { - setBearerToken("user_key", bearerToken); + setBearerToken("user_auth_key", bearerToken); } diff --git a/src/ApiException.cpp b/src/ApiException.cpp index 453fb3d..1eb37d1 100644 --- a/src/ApiException.cpp +++ b/src/ApiException.cpp @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. diff --git a/src/HttpContent.cpp b/src/HttpContent.cpp index fa40af4..23c6e6e 100644 --- a/src/HttpContent.cpp +++ b/src/HttpContent.cpp @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. diff --git a/src/JsonBody.cpp b/src/JsonBody.cpp index 6087d46..6bb14f7 100644 --- a/src/JsonBody.cpp +++ b/src/JsonBody.cpp @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. diff --git a/src/ModelBase.cpp b/src/ModelBase.cpp index ed9d5f3..e6f3152 100644 --- a/src/ModelBase.cpp +++ b/src/ModelBase.cpp @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. diff --git a/src/MultipartFormData.cpp b/src/MultipartFormData.cpp index 25798ae..c0c51b4 100644 --- a/src/MultipartFormData.cpp +++ b/src/MultipartFormData.cpp @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. diff --git a/src/Object.cpp b/src/Object.cpp index 360ea0b..395d518 100644 --- a/src/Object.cpp +++ b/src/Object.cpp @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. diff --git a/src/api/DefaultApi.cpp b/src/api/DefaultApi.cpp index 4458307..d425a6f 100644 --- a/src/api/DefaultApi.cpp +++ b/src/api/DefaultApi.cpp @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. @@ -36,20 +36,13 @@ DefaultApi::~DefaultApi() { } -pplx::task DefaultApi::beginLiveActivity(utility::string_t appId, utility::string_t activityId, std::shared_ptr beginLiveActivityRequest) const +pplx::task> DefaultApi::cancelNotification(utility::string_t appId, utility::string_t notificationId) const { - // verify the required parameter 'beginLiveActivityRequest' is set - if (beginLiveActivityRequest == nullptr) - { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'beginLiveActivityRequest' when calling DefaultApi->beginLiveActivity")); - } - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/apps/{app_id}/live_activities/{activity_id}/token"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("app_id") + utility::conversions::to_string_t("}"), ApiClient::parameterToString(appId)); -boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("activity_id") + utility::conversions::to_string_t("}"), ApiClient::parameterToString(activityId)); + utility::string_t localVarPath = utility::conversions::to_string_t("/notifications/{notification_id}"); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("notification_id") + utility::conversions::to_string_t("}"), ApiClient::parameterToString(notificationId)); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -78,14 +71,16 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->beginLiveActivity does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->cancelNotification does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); + { + localVarQueryParams[utility::conversions::to_string_t("app_id")] = ApiClient::parameterToString(appId); + } std::shared_ptr localVarHttpBody; utility::string_t localVarRequestHttpContentType; @@ -94,27 +89,11 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - web::json::value localVarJson; - - localVarJson = ModelBase::toJson(beginLiveActivityRequest); - - - localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - std::shared_ptr localVarMultipart(new MultipartFormData); - - if(beginLiveActivityRequest.get()) - { - beginLiveActivityRequest->toMultipart(localVarMultipart, utility::conversions::to_string_t("beginLiveActivityRequest")); - } - - - localVarHttpBody = localVarMultipart; - localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -122,12 +101,12 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->beginLiveActivity does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->cancelNotification does not consume any supported media type")); } - // authentication (app_key) required + // authentication (rest_api_key) required // Basic authentication is added automatically as part of the http_client_config - utility::string_t localVarBearerKey = localVarApiConfiguration->getBearerToken(utility::conversions::to_string_t("app_key")); + utility::string_t localVarBearerKey = localVarApiConfiguration->getBearerToken(utility::conversions::to_string_t("rest_api_key")); if ( localVarBearerKey.size() > 0 ) { localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = @@ -136,9 +115,9 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit // Adds a telemetry header localVarHeaderParams[utility::conversions::to_string_t("OS-Usage-Data")] = - utility::conversions::to_string_t("kind=sdk, sdk-name=onesignal-cpp, version=2.2.0"); + utility::conversions::to_string_t("kind=sdk, sdk-name=onesignal-cpp, version=5.0.0-beta1"); - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("DELETE"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -154,7 +133,7 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling beginLiveActivity: ") + localVarResponse.to_string() + , utility::conversions::to_string_t("error calling cancelNotification: ") + localVarResponse.to_string() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -165,7 +144,7 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling beginLiveActivity: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling cancelNotification: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -174,16 +153,42 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit }) .then([=](utility::string_t localVarResponse) { - return void(); + std::shared_ptr localVarResult(new GenericSuccessBoolResponse()); + + if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) + { + web::json::value localVarJson = web::json::value::parse(localVarResponse); + + ModelBase::fromJson(localVarJson, localVarResult); + } + // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) + // { + // TODO multipart response parsing + // } + else + { + throw ApiException(500 + , utility::conversions::to_string_t("error calling cancelNotification: unsupported response type")); + } + + return localVarResult; }); } -pplx::task> DefaultApi::cancelNotification(utility::string_t appId, utility::string_t notificationId) const +pplx::task> DefaultApi::createAlias(utility::string_t appId, utility::string_t aliasLabel, utility::string_t aliasId, std::shared_ptr userIdentityBody) const { + // verify the required parameter 'userIdentityBody' is set + if (userIdentityBody == nullptr) + { + throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'userIdentityBody' when calling DefaultApi->createAlias")); + } + std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/notifications/{notification_id}"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("notification_id") + utility::conversions::to_string_t("}"), ApiClient::parameterToString(notificationId)); + utility::string_t localVarPath = utility::conversions::to_string_t("/apps/{app_id}/users/by/{alias_label}/{alias_id}/identity"); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("app_id") + utility::conversions::to_string_t("}"), ApiClient::parameterToString(appId)); +boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("alias_label") + utility::conversions::to_string_t("}"), ApiClient::parameterToString(aliasLabel)); +boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("alias_id") + utility::conversions::to_string_t("}"), ApiClient::parameterToString(aliasId)); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -212,16 +217,14 @@ pplx::task> DefaultApi::cance } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->cancelNotification does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->createAlias does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; + localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - { - localVarQueryParams[utility::conversions::to_string_t("app_id")] = ApiClient::parameterToString(appId); - } std::shared_ptr localVarHttpBody; utility::string_t localVarRequestHttpContentType; @@ -230,11 +233,27 @@ pplx::task> DefaultApi::cance if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); + web::json::value localVarJson; + + localVarJson = ModelBase::toJson(userIdentityBody); + + + localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); + std::shared_ptr localVarMultipart(new MultipartFormData); + + if(userIdentityBody.get()) + { + userIdentityBody->toMultipart(localVarMultipart, utility::conversions::to_string_t("userIdentityBody")); + } + + + localVarHttpBody = localVarMultipart; + localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -242,12 +261,12 @@ pplx::task> DefaultApi::cance } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->cancelNotification does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->createAlias does not consume any supported media type")); } - // authentication (app_key) required + // authentication (rest_api_key) required // Basic authentication is added automatically as part of the http_client_config - utility::string_t localVarBearerKey = localVarApiConfiguration->getBearerToken(utility::conversions::to_string_t("app_key")); + utility::string_t localVarBearerKey = localVarApiConfiguration->getBearerToken(utility::conversions::to_string_t("rest_api_key")); if ( localVarBearerKey.size() > 0 ) { localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = @@ -256,9 +275,9 @@ pplx::task> DefaultApi::cance // Adds a telemetry header localVarHeaderParams[utility::conversions::to_string_t("OS-Usage-Data")] = - utility::conversions::to_string_t("kind=sdk, sdk-name=onesignal-cpp, version=2.2.0"); + utility::conversions::to_string_t("kind=sdk, sdk-name=onesignal-cpp, version=5.0.0-beta1"); - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("DELETE"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("PATCH"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -274,7 +293,7 @@ pplx::task> DefaultApi::cance if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling cancelNotification: ") + localVarResponse.to_string() + , utility::conversions::to_string_t("error calling createAlias: ") + localVarResponse.to_string() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -285,7 +304,7 @@ pplx::task> DefaultApi::cance if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling cancelNotification: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling createAlias: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -294,7 +313,7 @@ pplx::task> DefaultApi::cance }) .then([=](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new CancelNotificationSuccessResponse()); + std::shared_ptr localVarResult(new UserIdentityBody()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -309,25 +328,27 @@ pplx::task> DefaultApi::cance else { throw ApiException(500 - , utility::conversions::to_string_t("error calling cancelNotification: unsupported response type")); + , utility::conversions::to_string_t("error calling createAlias: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::createApp(std::shared_ptr app) const +pplx::task> DefaultApi::createAliasBySubscription(utility::string_t appId, utility::string_t subscriptionId, std::shared_ptr userIdentityBody) const { - // verify the required parameter 'app' is set - if (app == nullptr) + // verify the required parameter 'userIdentityBody' is set + if (userIdentityBody == nullptr) { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'app' when calling DefaultApi->createApp")); + throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'userIdentityBody' when calling DefaultApi->createAliasBySubscription")); } std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/apps"); - + utility::string_t localVarPath = utility::conversions::to_string_t("/apps/{app_id}/subscriptions/{subscription_id}/user/identity"); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("app_id") + utility::conversions::to_string_t("}"), ApiClient::parameterToString(appId)); +boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("subscription_id") + utility::conversions::to_string_t("}"), ApiClient::parameterToString(subscriptionId)); + std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); std::map localVarFormParams; @@ -355,7 +376,7 @@ pplx::task> DefaultApi::createApp(std::shared_ptr app) } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->createApp does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->createAliasBySubscription does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -373,7 +394,7 @@ pplx::task> DefaultApi::createApp(std::shared_ptr app) localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); web::json::value localVarJson; - localVarJson = ModelBase::toJson(app); + localVarJson = ModelBase::toJson(userIdentityBody); localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); @@ -384,9 +405,9 @@ pplx::task> DefaultApi::createApp(std::shared_ptr app) localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); std::shared_ptr localVarMultipart(new MultipartFormData); - if(app.get()) + if(userIdentityBody.get()) { - app->toMultipart(localVarMultipart, utility::conversions::to_string_t("app")); + userIdentityBody->toMultipart(localVarMultipart, utility::conversions::to_string_t("userIdentityBody")); } @@ -399,12 +420,12 @@ pplx::task> DefaultApi::createApp(std::shared_ptr app) } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->createApp does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->createAliasBySubscription does not consume any supported media type")); } - // authentication (user_key) required + // authentication (rest_api_key) required // Basic authentication is added automatically as part of the http_client_config - utility::string_t localVarBearerKey = localVarApiConfiguration->getBearerToken(utility::conversions::to_string_t("user_key")); + utility::string_t localVarBearerKey = localVarApiConfiguration->getBearerToken(utility::conversions::to_string_t("rest_api_key")); if ( localVarBearerKey.size() > 0 ) { localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = @@ -413,9 +434,9 @@ pplx::task> DefaultApi::createApp(std::shared_ptr app) // Adds a telemetry header localVarHeaderParams[utility::conversions::to_string_t("OS-Usage-Data")] = - utility::conversions::to_string_t("kind=sdk, sdk-name=onesignal-cpp, version=2.2.0"); + utility::conversions::to_string_t("kind=sdk, sdk-name=onesignal-cpp, version=5.0.0-beta1"); - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("PATCH"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -431,7 +452,7 @@ pplx::task> DefaultApi::createApp(std::shared_ptr app) if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling createApp: ") + localVarResponse.to_string() + , utility::conversions::to_string_t("error calling createAliasBySubscription: ") + localVarResponse.to_string() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -442,7 +463,7 @@ pplx::task> DefaultApi::createApp(std::shared_ptr app) if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling createApp: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling createAliasBySubscription: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -451,7 +472,7 @@ pplx::task> DefaultApi::createApp(std::shared_ptr app) }) .then([=](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new App()); + std::shared_ptr localVarResult(new UserIdentityBody()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -466,24 +487,24 @@ pplx::task> DefaultApi::createApp(std::shared_ptr app) else { throw ApiException(500 - , utility::conversions::to_string_t("error calling createApp: unsupported response type")); + , utility::conversions::to_string_t("error calling createAliasBySubscription: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::createNotification(std::shared_ptr notification) const +pplx::task> DefaultApi::createApp(std::shared_ptr app) const { - // verify the required parameter 'notification' is set - if (notification == nullptr) + // verify the required parameter 'app' is set + if (app == nullptr) { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'notification' when calling DefaultApi->createNotification")); + throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'app' when calling DefaultApi->createApp")); } std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/notifications"); + utility::string_t localVarPath = utility::conversions::to_string_t("/apps"); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -512,7 +533,7 @@ pplx::task> DefaultApi::creat } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->createNotification does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->createApp does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -530,7 +551,7 @@ pplx::task> DefaultApi::creat localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); web::json::value localVarJson; - localVarJson = ModelBase::toJson(notification); + localVarJson = ModelBase::toJson(app); localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); @@ -541,9 +562,9 @@ pplx::task> DefaultApi::creat localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); std::shared_ptr localVarMultipart(new MultipartFormData); - if(notification.get()) + if(app.get()) { - notification->toMultipart(localVarMultipart, utility::conversions::to_string_t("notification")); + app->toMultipart(localVarMultipart, utility::conversions::to_string_t("app")); } @@ -556,12 +577,12 @@ pplx::task> DefaultApi::creat } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->createNotification does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->createApp does not consume any supported media type")); } - // authentication (app_key) required + // authentication (user_auth_key) required // Basic authentication is added automatically as part of the http_client_config - utility::string_t localVarBearerKey = localVarApiConfiguration->getBearerToken(utility::conversions::to_string_t("app_key")); + utility::string_t localVarBearerKey = localVarApiConfiguration->getBearerToken(utility::conversions::to_string_t("user_auth_key")); if ( localVarBearerKey.size() > 0 ) { localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = @@ -570,7 +591,7 @@ pplx::task> DefaultApi::creat // Adds a telemetry header localVarHeaderParams[utility::conversions::to_string_t("OS-Usage-Data")] = - utility::conversions::to_string_t("kind=sdk, sdk-name=onesignal-cpp, version=2.2.0"); + utility::conversions::to_string_t("kind=sdk, sdk-name=onesignal-cpp, version=5.0.0-beta1"); return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=](web::http::http_response localVarResponse) @@ -588,7 +609,7 @@ pplx::task> DefaultApi::creat if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling createNotification: ") + localVarResponse.to_string() + , utility::conversions::to_string_t("error calling createApp: ") + localVarResponse.to_string() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -599,7 +620,7 @@ pplx::task> DefaultApi::creat if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling createNotification: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling createApp: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -608,7 +629,7 @@ pplx::task> DefaultApi::creat }) .then([=](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new CreateNotificationSuccessResponse()); + std::shared_ptr localVarResult(new App()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -623,24 +644,24 @@ pplx::task> DefaultApi::creat else { throw ApiException(500 - , utility::conversions::to_string_t("error calling createNotification: unsupported response type")); + , utility::conversions::to_string_t("error calling createApp: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::createPlayer(std::shared_ptr player) const +pplx::task> DefaultApi::createNotification(std::shared_ptr notification) const { - // verify the required parameter 'player' is set - if (player == nullptr) + // verify the required parameter 'notification' is set + if (notification == nullptr) { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'player' when calling DefaultApi->createPlayer")); + throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'notification' when calling DefaultApi->createNotification")); } std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/players"); + utility::string_t localVarPath = utility::conversions::to_string_t("/notifications"); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -669,7 +690,7 @@ pplx::task> DefaultApi::createPlaye } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->createPlayer does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->createNotification does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -687,7 +708,7 @@ pplx::task> DefaultApi::createPlaye localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); web::json::value localVarJson; - localVarJson = ModelBase::toJson(player); + localVarJson = ModelBase::toJson(notification); localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); @@ -698,9 +719,9 @@ pplx::task> DefaultApi::createPlaye localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); std::shared_ptr localVarMultipart(new MultipartFormData); - if(player.get()) + if(notification.get()) { - player->toMultipart(localVarMultipart, utility::conversions::to_string_t("player")); + notification->toMultipart(localVarMultipart, utility::conversions::to_string_t("notification")); } @@ -713,12 +734,12 @@ pplx::task> DefaultApi::createPlaye } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->createPlayer does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->createNotification does not consume any supported media type")); } - // authentication (app_key) required + // authentication (rest_api_key) required // Basic authentication is added automatically as part of the http_client_config - utility::string_t localVarBearerKey = localVarApiConfiguration->getBearerToken(utility::conversions::to_string_t("app_key")); + utility::string_t localVarBearerKey = localVarApiConfiguration->getBearerToken(utility::conversions::to_string_t("rest_api_key")); if ( localVarBearerKey.size() > 0 ) { localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = @@ -727,7 +748,7 @@ pplx::task> DefaultApi::createPlaye // Adds a telemetry header localVarHeaderParams[utility::conversions::to_string_t("OS-Usage-Data")] = - utility::conversions::to_string_t("kind=sdk, sdk-name=onesignal-cpp, version=2.2.0"); + utility::conversions::to_string_t("kind=sdk, sdk-name=onesignal-cpp, version=5.0.0-beta1"); return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=](web::http::http_response localVarResponse) @@ -745,7 +766,7 @@ pplx::task> DefaultApi::createPlaye if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling createPlayer: ") + localVarResponse.to_string() + , utility::conversions::to_string_t("error calling createNotification: ") + localVarResponse.to_string() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -756,7 +777,7 @@ pplx::task> DefaultApi::createPlaye if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling createPlayer: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling createNotification: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -765,7 +786,7 @@ pplx::task> DefaultApi::createPlaye }) .then([=](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new CreatePlayerSuccessResponse()); + std::shared_ptr localVarResult(new CreateNotificationSuccessResponse()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -780,13 +801,13 @@ pplx::task> DefaultApi::createPlaye else { throw ApiException(500 - , utility::conversions::to_string_t("error calling createPlayer: unsupported response type")); + , utility::conversions::to_string_t("error calling createNotification: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::createSegments(utility::string_t appId, boost::optional> segment) const +pplx::task> DefaultApi::createSegment(utility::string_t appId, boost::optional> segment) const { @@ -821,7 +842,7 @@ pplx::task> DefaultApi::createSegm } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->createSegments does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->createSegment does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -865,12 +886,12 @@ pplx::task> DefaultApi::createSegm } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->createSegments does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->createSegment does not consume any supported media type")); } - // authentication (app_key) required + // authentication (rest_api_key) required // Basic authentication is added automatically as part of the http_client_config - utility::string_t localVarBearerKey = localVarApiConfiguration->getBearerToken(utility::conversions::to_string_t("app_key")); + utility::string_t localVarBearerKey = localVarApiConfiguration->getBearerToken(utility::conversions::to_string_t("rest_api_key")); if ( localVarBearerKey.size() > 0 ) { localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = @@ -879,7 +900,7 @@ pplx::task> DefaultApi::createSegm // Adds a telemetry header localVarHeaderParams[utility::conversions::to_string_t("OS-Usage-Data")] = - utility::conversions::to_string_t("kind=sdk, sdk-name=onesignal-cpp, version=2.2.0"); + utility::conversions::to_string_t("kind=sdk, sdk-name=onesignal-cpp, version=5.0.0-beta1"); return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=](web::http::http_response localVarResponse) @@ -897,7 +918,7 @@ pplx::task> DefaultApi::createSegm if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling createSegments: ") + localVarResponse.to_string() + , utility::conversions::to_string_t("error calling createSegment: ") + localVarResponse.to_string() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -908,7 +929,7 @@ pplx::task> DefaultApi::createSegm if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling createSegments: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling createSegment: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -932,19 +953,19 @@ pplx::task> DefaultApi::createSegm else { throw ApiException(500 - , utility::conversions::to_string_t("error calling createSegments: unsupported response type")); + , utility::conversions::to_string_t("error calling createSegment: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::createSubscription(utility::string_t appId, utility::string_t aliasLabel, utility::string_t aliasId, std::shared_ptr createSubscriptionRequestBody) const +pplx::task> DefaultApi::createSubscription(utility::string_t appId, utility::string_t aliasLabel, utility::string_t aliasId, std::shared_ptr subscriptionBody) const { - // verify the required parameter 'createSubscriptionRequestBody' is set - if (createSubscriptionRequestBody == nullptr) + // verify the required parameter 'subscriptionBody' is set + if (subscriptionBody == nullptr) { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'createSubscriptionRequestBody' when calling DefaultApi->createSubscription")); + throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'subscriptionBody' when calling DefaultApi->createSubscription")); } @@ -999,7 +1020,7 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); web::json::value localVarJson; - localVarJson = ModelBase::toJson(createSubscriptionRequestBody); + localVarJson = ModelBase::toJson(subscriptionBody); localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); @@ -1010,9 +1031,9 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); std::shared_ptr localVarMultipart(new MultipartFormData); - if(createSubscriptionRequestBody.get()) + if(subscriptionBody.get()) { - createSubscriptionRequestBody->toMultipart(localVarMultipart, utility::conversions::to_string_t("createSubscriptionRequestBody")); + subscriptionBody->toMultipart(localVarMultipart, utility::conversions::to_string_t("subscriptionBody")); } @@ -1028,9 +1049,9 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit throw ApiException(415, utility::conversions::to_string_t("DefaultApi->createSubscription does not consume any supported media type")); } - // authentication (app_key) required + // authentication (rest_api_key) required // Basic authentication is added automatically as part of the http_client_config - utility::string_t localVarBearerKey = localVarApiConfiguration->getBearerToken(utility::conversions::to_string_t("app_key")); + utility::string_t localVarBearerKey = localVarApiConfiguration->getBearerToken(utility::conversions::to_string_t("rest_api_key")); if ( localVarBearerKey.size() > 0 ) { localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = @@ -1039,7 +1060,7 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit // Adds a telemetry header localVarHeaderParams[utility::conversions::to_string_t("OS-Usage-Data")] = - utility::conversions::to_string_t("kind=sdk, sdk-name=onesignal-cpp, version=2.2.0"); + utility::conversions::to_string_t("kind=sdk, sdk-name=onesignal-cpp, version=5.0.0-beta1"); return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=](web::http::http_response localVarResponse) @@ -1077,7 +1098,7 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit }) .then([=](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new Inline_response_201()); + std::shared_ptr localVarResult(new SubscriptionBody()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -1186,9 +1207,9 @@ pplx::task> DefaultApi::createUser(utility::string_t appId throw ApiException(415, utility::conversions::to_string_t("DefaultApi->createUser does not consume any supported media type")); } - // authentication (app_key) required + // authentication (rest_api_key) required // Basic authentication is added automatically as part of the http_client_config - utility::string_t localVarBearerKey = localVarApiConfiguration->getBearerToken(utility::conversions::to_string_t("app_key")); + utility::string_t localVarBearerKey = localVarApiConfiguration->getBearerToken(utility::conversions::to_string_t("rest_api_key")); if ( localVarBearerKey.size() > 0 ) { localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = @@ -1197,7 +1218,7 @@ pplx::task> DefaultApi::createUser(utility::string_t appId // Adds a telemetry header localVarHeaderParams[utility::conversions::to_string_t("OS-Usage-Data")] = - utility::conversions::to_string_t("kind=sdk, sdk-name=onesignal-cpp, version=2.2.0"); + utility::conversions::to_string_t("kind=sdk, sdk-name=onesignal-cpp, version=5.0.0-beta1"); return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=](web::http::http_response localVarResponse) @@ -1256,7 +1277,7 @@ pplx::task> DefaultApi::createUser(utility::string_t appId return localVarResult; }); } -pplx::task> DefaultApi::deleteAlias(utility::string_t appId, utility::string_t aliasLabel, utility::string_t aliasId, utility::string_t aliasLabelToDelete) const +pplx::task> DefaultApi::deleteAlias(utility::string_t appId, utility::string_t aliasLabel, utility::string_t aliasId, utility::string_t aliasLabelToDelete) const { @@ -1324,9 +1345,9 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit throw ApiException(415, utility::conversions::to_string_t("DefaultApi->deleteAlias does not consume any supported media type")); } - // authentication (app_key) required + // authentication (rest_api_key) required // Basic authentication is added automatically as part of the http_client_config - utility::string_t localVarBearerKey = localVarApiConfiguration->getBearerToken(utility::conversions::to_string_t("app_key")); + utility::string_t localVarBearerKey = localVarApiConfiguration->getBearerToken(utility::conversions::to_string_t("rest_api_key")); if ( localVarBearerKey.size() > 0 ) { localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = @@ -1335,7 +1356,7 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit // Adds a telemetry header localVarHeaderParams[utility::conversions::to_string_t("OS-Usage-Data")] = - utility::conversions::to_string_t("kind=sdk, sdk-name=onesignal-cpp, version=2.2.0"); + utility::conversions::to_string_t("kind=sdk, sdk-name=onesignal-cpp, version=5.0.0-beta1"); return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("DELETE"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=](web::http::http_response localVarResponse) @@ -1373,7 +1394,7 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit }) .then([=](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new Inline_response_200()); + std::shared_ptr localVarResult(new UserIdentityBody()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -1394,13 +1415,14 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit return localVarResult; }); } -pplx::task> DefaultApi::deletePlayer(utility::string_t appId, utility::string_t playerId) const +pplx::task> DefaultApi::deleteSegment(utility::string_t appId, utility::string_t segmentId) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/players/{player_id}"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("player_id") + utility::conversions::to_string_t("}"), ApiClient::parameterToString(playerId)); + utility::string_t localVarPath = utility::conversions::to_string_t("/apps/{app_id}/segments/{segment_id}"); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("app_id") + utility::conversions::to_string_t("}"), ApiClient::parameterToString(appId)); +boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("segment_id") + utility::conversions::to_string_t("}"), ApiClient::parameterToString(segmentId)); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -1429,16 +1451,13 @@ pplx::task> DefaultApi::deletePlaye } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->deletePlayer does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->deleteSegment does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; - { - localVarQueryParams[utility::conversions::to_string_t("app_id")] = ApiClient::parameterToString(appId); - } std::shared_ptr localVarHttpBody; utility::string_t localVarRequestHttpContentType; @@ -1459,12 +1478,12 @@ pplx::task> DefaultApi::deletePlaye } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->deletePlayer does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->deleteSegment does not consume any supported media type")); } - // authentication (app_key) required + // authentication (rest_api_key) required // Basic authentication is added automatically as part of the http_client_config - utility::string_t localVarBearerKey = localVarApiConfiguration->getBearerToken(utility::conversions::to_string_t("app_key")); + utility::string_t localVarBearerKey = localVarApiConfiguration->getBearerToken(utility::conversions::to_string_t("rest_api_key")); if ( localVarBearerKey.size() > 0 ) { localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = @@ -1473,7 +1492,7 @@ pplx::task> DefaultApi::deletePlaye // Adds a telemetry header localVarHeaderParams[utility::conversions::to_string_t("OS-Usage-Data")] = - utility::conversions::to_string_t("kind=sdk, sdk-name=onesignal-cpp, version=2.2.0"); + utility::conversions::to_string_t("kind=sdk, sdk-name=onesignal-cpp, version=5.0.0-beta1"); return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("DELETE"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=](web::http::http_response localVarResponse) @@ -1491,7 +1510,7 @@ pplx::task> DefaultApi::deletePlaye if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling deletePlayer: ") + localVarResponse.to_string() + , utility::conversions::to_string_t("error calling deleteSegment: ") + localVarResponse.to_string() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -1502,7 +1521,7 @@ pplx::task> DefaultApi::deletePlaye if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling deletePlayer: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling deleteSegment: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -1511,7 +1530,7 @@ pplx::task> DefaultApi::deletePlaye }) .then([=](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new DeletePlayerSuccessResponse()); + std::shared_ptr localVarResult(new GenericSuccessBoolResponse()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -1526,20 +1545,20 @@ pplx::task> DefaultApi::deletePlaye else { throw ApiException(500 - , utility::conversions::to_string_t("error calling deletePlayer: unsupported response type")); + , utility::conversions::to_string_t("error calling deleteSegment: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::deleteSegments(utility::string_t appId, utility::string_t segmentId) const +pplx::task DefaultApi::deleteSubscription(utility::string_t appId, utility::string_t subscriptionId) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/apps/{app_id}/segments/{segment_id}"); + utility::string_t localVarPath = utility::conversions::to_string_t("/apps/{app_id}/subscriptions/{subscription_id}"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("app_id") + utility::conversions::to_string_t("}"), ApiClient::parameterToString(appId)); -boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("segment_id") + utility::conversions::to_string_t("}"), ApiClient::parameterToString(segmentId)); +boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("subscription_id") + utility::conversions::to_string_t("}"), ApiClient::parameterToString(subscriptionId)); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -1568,7 +1587,7 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->deleteSegments does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->deleteSubscription does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -1595,12 +1614,12 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->deleteSegments does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->deleteSubscription does not consume any supported media type")); } - // authentication (app_key) required + // authentication (rest_api_key) required // Basic authentication is added automatically as part of the http_client_config - utility::string_t localVarBearerKey = localVarApiConfiguration->getBearerToken(utility::conversions::to_string_t("app_key")); + utility::string_t localVarBearerKey = localVarApiConfiguration->getBearerToken(utility::conversions::to_string_t("rest_api_key")); if ( localVarBearerKey.size() > 0 ) { localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = @@ -1609,7 +1628,7 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit // Adds a telemetry header localVarHeaderParams[utility::conversions::to_string_t("OS-Usage-Data")] = - utility::conversions::to_string_t("kind=sdk, sdk-name=onesignal-cpp, version=2.2.0"); + utility::conversions::to_string_t("kind=sdk, sdk-name=onesignal-cpp, version=5.0.0-beta1"); return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("DELETE"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=](web::http::http_response localVarResponse) @@ -1627,7 +1646,7 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling deleteSegments: ") + localVarResponse.to_string() + , utility::conversions::to_string_t("error calling deleteSubscription: ") + localVarResponse.to_string() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -1638,7 +1657,7 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling deleteSegments: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling deleteSubscription: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -1647,35 +1666,18 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit }) .then([=](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new DeleteSegmentSuccessResponse()); - - if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) - { - web::json::value localVarJson = web::json::value::parse(localVarResponse); - - ModelBase::fromJson(localVarJson, localVarResult); - } - // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) - // { - // TODO multipart response parsing - // } - else - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling deleteSegments: unsupported response type")); - } - - return localVarResult; + return void(); }); } -pplx::task DefaultApi::deleteSubscription(utility::string_t appId, utility::string_t subscriptionId) const +pplx::task DefaultApi::deleteUser(utility::string_t appId, utility::string_t aliasLabel, utility::string_t aliasId) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/apps/{app_id}/subscriptions/{subscription_id}"); + utility::string_t localVarPath = utility::conversions::to_string_t("/apps/{app_id}/users/by/{alias_label}/{alias_id}"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("app_id") + utility::conversions::to_string_t("}"), ApiClient::parameterToString(appId)); -boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("subscription_id") + utility::conversions::to_string_t("}"), ApiClient::parameterToString(subscriptionId)); +boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("alias_label") + utility::conversions::to_string_t("}"), ApiClient::parameterToString(aliasLabel)); +boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("alias_id") + utility::conversions::to_string_t("}"), ApiClient::parameterToString(aliasId)); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -1704,7 +1706,7 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->deleteSubscription does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->deleteUser does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -1731,12 +1733,12 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->deleteSubscription does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->deleteUser does not consume any supported media type")); } - // authentication (app_key) required + // authentication (rest_api_key) required // Basic authentication is added automatically as part of the http_client_config - utility::string_t localVarBearerKey = localVarApiConfiguration->getBearerToken(utility::conversions::to_string_t("app_key")); + utility::string_t localVarBearerKey = localVarApiConfiguration->getBearerToken(utility::conversions::to_string_t("rest_api_key")); if ( localVarBearerKey.size() > 0 ) { localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = @@ -1745,7 +1747,7 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit // Adds a telemetry header localVarHeaderParams[utility::conversions::to_string_t("OS-Usage-Data")] = - utility::conversions::to_string_t("kind=sdk, sdk-name=onesignal-cpp, version=2.2.0"); + utility::conversions::to_string_t("kind=sdk, sdk-name=onesignal-cpp, version=5.0.0-beta1"); return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("DELETE"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=](web::http::http_response localVarResponse) @@ -1763,7 +1765,7 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling deleteSubscription: ") + localVarResponse.to_string() + , utility::conversions::to_string_t("error calling deleteUser: ") + localVarResponse.to_string() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -1774,7 +1776,7 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling deleteSubscription: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling deleteUser: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -1786,15 +1788,13 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit return void(); }); } -pplx::task DefaultApi::deleteUser(utility::string_t appId, utility::string_t aliasLabel, utility::string_t aliasId) const +pplx::task> DefaultApi::exportEvents(utility::string_t notificationId, utility::string_t appId) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/apps/{app_id}/users/by/{alias_label}/{alias_id}"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("app_id") + utility::conversions::to_string_t("}"), ApiClient::parameterToString(appId)); -boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("alias_label") + utility::conversions::to_string_t("}"), ApiClient::parameterToString(aliasLabel)); -boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("alias_id") + utility::conversions::to_string_t("}"), ApiClient::parameterToString(aliasId)); + utility::string_t localVarPath = utility::conversions::to_string_t("/notifications/{notification_id}/export_events?app_id={app_id}"); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("notification_id") + utility::conversions::to_string_t("}"), ApiClient::parameterToString(notificationId)); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -1823,13 +1823,16 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->deleteUser does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->exportEvents does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; + { + localVarQueryParams[utility::conversions::to_string_t("app_id")] = ApiClient::parameterToString(appId); + } std::shared_ptr localVarHttpBody; utility::string_t localVarRequestHttpContentType; @@ -1850,12 +1853,12 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->deleteUser does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->exportEvents does not consume any supported media type")); } - // authentication (app_key) required + // authentication (rest_api_key) required // Basic authentication is added automatically as part of the http_client_config - utility::string_t localVarBearerKey = localVarApiConfiguration->getBearerToken(utility::conversions::to_string_t("app_key")); + utility::string_t localVarBearerKey = localVarApiConfiguration->getBearerToken(utility::conversions::to_string_t("rest_api_key")); if ( localVarBearerKey.size() > 0 ) { localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = @@ -1864,9 +1867,9 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit // Adds a telemetry header localVarHeaderParams[utility::conversions::to_string_t("OS-Usage-Data")] = - utility::conversions::to_string_t("kind=sdk, sdk-name=onesignal-cpp, version=2.2.0"); + utility::conversions::to_string_t("kind=sdk, sdk-name=onesignal-cpp, version=5.0.0-beta1"); - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("DELETE"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -1882,7 +1885,7 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling deleteUser: ") + localVarResponse.to_string() + , utility::conversions::to_string_t("error calling exportEvents: ") + localVarResponse.to_string() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -1893,7 +1896,7 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling deleteUser: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling exportEvents: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -1902,18 +1905,34 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit }) .then([=](utility::string_t localVarResponse) { - return void(); + std::shared_ptr localVarResult(new ExportEventsSuccessResponse()); + + if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) + { + web::json::value localVarJson = web::json::value::parse(localVarResponse); + + ModelBase::fromJson(localVarJson, localVarResult); + } + // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) + // { + // TODO multipart response parsing + // } + else + { + throw ApiException(500 + , utility::conversions::to_string_t("error calling exportEvents: unsupported response type")); + } + + return localVarResult; }); } -pplx::task DefaultApi::endLiveActivity(utility::string_t appId, utility::string_t activityId, utility::string_t subscriptionId) const +pplx::task> DefaultApi::exportSubscriptions(utility::string_t appId, boost::optional> exportSubscriptionsRequestBody) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/apps/{app_id}/live_activities/{activity_id}/token/{subscription_id}"); + utility::string_t localVarPath = utility::conversions::to_string_t("/players/csv_export?app_id={app_id}"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("app_id") + utility::conversions::to_string_t("}"), ApiClient::parameterToString(appId)); -boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("activity_id") + utility::conversions::to_string_t("}"), ApiClient::parameterToString(activityId)); -boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("subscription_id") + utility::conversions::to_string_t("}"), ApiClient::parameterToString(subscriptionId)); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -1942,12 +1961,13 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->endLiveActivity does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->exportSubscriptions does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; + localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); std::shared_ptr localVarHttpBody; @@ -1957,11 +1977,27 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); + web::json::value localVarJson; + + if (exportSubscriptionsRequestBody) + localVarJson = ModelBase::toJson(*exportSubscriptionsRequestBody); + + localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); + std::shared_ptr localVarMultipart(new MultipartFormData); + + if(exportSubscriptionsRequestBody && (*exportSubscriptionsRequestBody).get()) + { + (*exportSubscriptionsRequestBody)->toMultipart(localVarMultipart, utility::conversions::to_string_t("exportSubscriptionsRequestBody")); + } + + + localVarHttpBody = localVarMultipart; + localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -1969,12 +2005,12 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->endLiveActivity does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->exportSubscriptions does not consume any supported media type")); } - // authentication (app_key) required + // authentication (rest_api_key) required // Basic authentication is added automatically as part of the http_client_config - utility::string_t localVarBearerKey = localVarApiConfiguration->getBearerToken(utility::conversions::to_string_t("app_key")); + utility::string_t localVarBearerKey = localVarApiConfiguration->getBearerToken(utility::conversions::to_string_t("rest_api_key")); if ( localVarBearerKey.size() > 0 ) { localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = @@ -1983,9 +2019,9 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit // Adds a telemetry header localVarHeaderParams[utility::conversions::to_string_t("OS-Usage-Data")] = - utility::conversions::to_string_t("kind=sdk, sdk-name=onesignal-cpp, version=2.2.0"); + utility::conversions::to_string_t("kind=sdk, sdk-name=onesignal-cpp, version=5.0.0-beta1"); - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("DELETE"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -2001,7 +2037,7 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling endLiveActivity: ") + localVarResponse.to_string() + , utility::conversions::to_string_t("error calling exportSubscriptions: ") + localVarResponse.to_string() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -2012,7 +2048,7 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling endLiveActivity: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling exportSubscriptions: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -2021,16 +2057,36 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit }) .then([=](utility::string_t localVarResponse) { - return void(); - }); -} -pplx::task> DefaultApi::exportEvents(utility::string_t notificationId, utility::string_t appId) const + std::shared_ptr localVarResult(new ExportSubscriptionsSuccessResponse()); + + if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) + { + web::json::value localVarJson = web::json::value::parse(localVarResponse); + + ModelBase::fromJson(localVarJson, localVarResult); + } + // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) + // { + // TODO multipart response parsing + // } + else + { + throw ApiException(500 + , utility::conversions::to_string_t("error calling exportSubscriptions: unsupported response type")); + } + + return localVarResult; + }); +} +pplx::task> DefaultApi::getAliases(utility::string_t appId, utility::string_t aliasLabel, utility::string_t aliasId) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/notifications/{notification_id}/export_events?app_id={app_id}"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("notification_id") + utility::conversions::to_string_t("}"), ApiClient::parameterToString(notificationId)); + utility::string_t localVarPath = utility::conversions::to_string_t("/apps/{app_id}/users/by/{alias_label}/{alias_id}/identity"); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("app_id") + utility::conversions::to_string_t("}"), ApiClient::parameterToString(appId)); +boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("alias_label") + utility::conversions::to_string_t("}"), ApiClient::parameterToString(aliasLabel)); +boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("alias_id") + utility::conversions::to_string_t("}"), ApiClient::parameterToString(aliasId)); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -2059,16 +2115,13 @@ pplx::task> DefaultApi::exportEvent } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->exportEvents does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->getAliases does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; - { - localVarQueryParams[utility::conversions::to_string_t("app_id")] = ApiClient::parameterToString(appId); - } std::shared_ptr localVarHttpBody; utility::string_t localVarRequestHttpContentType; @@ -2089,12 +2142,12 @@ pplx::task> DefaultApi::exportEvent } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->exportEvents does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->getAliases does not consume any supported media type")); } - // authentication (app_key) required + // authentication (rest_api_key) required // Basic authentication is added automatically as part of the http_client_config - utility::string_t localVarBearerKey = localVarApiConfiguration->getBearerToken(utility::conversions::to_string_t("app_key")); + utility::string_t localVarBearerKey = localVarApiConfiguration->getBearerToken(utility::conversions::to_string_t("rest_api_key")); if ( localVarBearerKey.size() > 0 ) { localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = @@ -2103,9 +2156,9 @@ pplx::task> DefaultApi::exportEvent // Adds a telemetry header localVarHeaderParams[utility::conversions::to_string_t("OS-Usage-Data")] = - utility::conversions::to_string_t("kind=sdk, sdk-name=onesignal-cpp, version=2.2.0"); + utility::conversions::to_string_t("kind=sdk, sdk-name=onesignal-cpp, version=5.0.0-beta1"); - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -2121,7 +2174,7 @@ pplx::task> DefaultApi::exportEvent if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling exportEvents: ") + localVarResponse.to_string() + , utility::conversions::to_string_t("error calling getAliases: ") + localVarResponse.to_string() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -2132,7 +2185,7 @@ pplx::task> DefaultApi::exportEvent if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling exportEvents: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling getAliases: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -2141,7 +2194,7 @@ pplx::task> DefaultApi::exportEvent }) .then([=](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new ExportEventsSuccessResponse()); + std::shared_ptr localVarResult(new UserIdentityBody()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -2156,19 +2209,20 @@ pplx::task> DefaultApi::exportEvent else { throw ApiException(500 - , utility::conversions::to_string_t("error calling exportEvents: unsupported response type")); + , utility::conversions::to_string_t("error calling getAliases: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::exportPlayers(utility::string_t appId, boost::optional> exportPlayersRequestBody) const +pplx::task> DefaultApi::getAliasesBySubscription(utility::string_t appId, utility::string_t subscriptionId) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/players/csv_export?app_id={app_id}"); + utility::string_t localVarPath = utility::conversions::to_string_t("/apps/{app_id}/subscriptions/{subscription_id}/user/identity"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("app_id") + utility::conversions::to_string_t("}"), ApiClient::parameterToString(appId)); +boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("subscription_id") + utility::conversions::to_string_t("}"), ApiClient::parameterToString(subscriptionId)); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -2197,13 +2251,12 @@ pplx::task> DefaultApi::exportPlay } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->exportPlayers does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->getAliasesBySubscription does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); std::shared_ptr localVarHttpBody; @@ -2213,27 +2266,11 @@ pplx::task> DefaultApi::exportPlay if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - web::json::value localVarJson; - - if (exportPlayersRequestBody) - localVarJson = ModelBase::toJson(*exportPlayersRequestBody); - - localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - std::shared_ptr localVarMultipart(new MultipartFormData); - - if(exportPlayersRequestBody && (*exportPlayersRequestBody).get()) - { - (*exportPlayersRequestBody)->toMultipart(localVarMultipart, utility::conversions::to_string_t("exportPlayersRequestBody")); - } - - - localVarHttpBody = localVarMultipart; - localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -2241,12 +2278,12 @@ pplx::task> DefaultApi::exportPlay } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->exportPlayers does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->getAliasesBySubscription does not consume any supported media type")); } - // authentication (app_key) required + // authentication (rest_api_key) required // Basic authentication is added automatically as part of the http_client_config - utility::string_t localVarBearerKey = localVarApiConfiguration->getBearerToken(utility::conversions::to_string_t("app_key")); + utility::string_t localVarBearerKey = localVarApiConfiguration->getBearerToken(utility::conversions::to_string_t("rest_api_key")); if ( localVarBearerKey.size() > 0 ) { localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = @@ -2255,9 +2292,9 @@ pplx::task> DefaultApi::exportPlay // Adds a telemetry header localVarHeaderParams[utility::conversions::to_string_t("OS-Usage-Data")] = - utility::conversions::to_string_t("kind=sdk, sdk-name=onesignal-cpp, version=2.2.0"); + utility::conversions::to_string_t("kind=sdk, sdk-name=onesignal-cpp, version=5.0.0-beta1"); - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -2273,7 +2310,7 @@ pplx::task> DefaultApi::exportPlay if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling exportPlayers: ") + localVarResponse.to_string() + , utility::conversions::to_string_t("error calling getAliasesBySubscription: ") + localVarResponse.to_string() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -2284,7 +2321,7 @@ pplx::task> DefaultApi::exportPlay if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling exportPlayers: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling getAliasesBySubscription: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -2293,7 +2330,7 @@ pplx::task> DefaultApi::exportPlay }) .then([=](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new ExportPlayersSuccessResponse()); + std::shared_ptr localVarResult(new UserIdentityBody()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -2308,20 +2345,19 @@ pplx::task> DefaultApi::exportPlay else { throw ApiException(500 - , utility::conversions::to_string_t("error calling exportPlayers: unsupported response type")); + , utility::conversions::to_string_t("error calling getAliasesBySubscription: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::fetchAliases(utility::string_t appId, utility::string_t subscriptionId) const +pplx::task> DefaultApi::getApp(utility::string_t appId) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/apps/{app_id}/subscriptions/{subscription_id}/user/identity"); + utility::string_t localVarPath = utility::conversions::to_string_t("/apps/{app_id}"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("app_id") + utility::conversions::to_string_t("}"), ApiClient::parameterToString(appId)); -boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("subscription_id") + utility::conversions::to_string_t("}"), ApiClient::parameterToString(subscriptionId)); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -2350,7 +2386,7 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->fetchAliases does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->getApp does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -2377,12 +2413,12 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->fetchAliases does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->getApp does not consume any supported media type")); } - // authentication (app_key) required + // authentication (user_auth_key) required // Basic authentication is added automatically as part of the http_client_config - utility::string_t localVarBearerKey = localVarApiConfiguration->getBearerToken(utility::conversions::to_string_t("app_key")); + utility::string_t localVarBearerKey = localVarApiConfiguration->getBearerToken(utility::conversions::to_string_t("user_auth_key")); if ( localVarBearerKey.size() > 0 ) { localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = @@ -2391,7 +2427,7 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit // Adds a telemetry header localVarHeaderParams[utility::conversions::to_string_t("OS-Usage-Data")] = - utility::conversions::to_string_t("kind=sdk, sdk-name=onesignal-cpp, version=2.2.0"); + utility::conversions::to_string_t("kind=sdk, sdk-name=onesignal-cpp, version=5.0.0-beta1"); return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=](web::http::http_response localVarResponse) @@ -2409,7 +2445,7 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling fetchAliases: ") + localVarResponse.to_string() + , utility::conversions::to_string_t("error calling getApp: ") + localVarResponse.to_string() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -2420,7 +2456,7 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling fetchAliases: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling getApp: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -2429,7 +2465,7 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit }) .then([=](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new UserIdentityResponse()); + std::shared_ptr localVarResult(new App()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -2444,22 +2480,19 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit else { throw ApiException(500 - , utility::conversions::to_string_t("error calling fetchAliases: unsupported response type")); + , utility::conversions::to_string_t("error calling getApp: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::fetchUser(utility::string_t appId, utility::string_t aliasLabel, utility::string_t aliasId) const +pplx::task>> DefaultApi::getApps() const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/apps/{app_id}/users/by/{alias_label}/{alias_id}"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("app_id") + utility::conversions::to_string_t("}"), ApiClient::parameterToString(appId)); -boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("alias_label") + utility::conversions::to_string_t("}"), ApiClient::parameterToString(aliasLabel)); -boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("alias_id") + utility::conversions::to_string_t("}"), ApiClient::parameterToString(aliasId)); - + utility::string_t localVarPath = utility::conversions::to_string_t("/apps"); + std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); std::map localVarFormParams; @@ -2487,7 +2520,7 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->fetchUser does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->getApps does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -2514,12 +2547,12 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->fetchUser does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->getApps does not consume any supported media type")); } - // authentication (app_key) required + // authentication (user_auth_key) required // Basic authentication is added automatically as part of the http_client_config - utility::string_t localVarBearerKey = localVarApiConfiguration->getBearerToken(utility::conversions::to_string_t("app_key")); + utility::string_t localVarBearerKey = localVarApiConfiguration->getBearerToken(utility::conversions::to_string_t("user_auth_key")); if ( localVarBearerKey.size() > 0 ) { localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = @@ -2528,7 +2561,7 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit // Adds a telemetry header localVarHeaderParams[utility::conversions::to_string_t("OS-Usage-Data")] = - utility::conversions::to_string_t("kind=sdk, sdk-name=onesignal-cpp, version=2.2.0"); + utility::conversions::to_string_t("kind=sdk, sdk-name=onesignal-cpp, version=5.0.0-beta1"); return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=](web::http::http_response localVarResponse) @@ -2546,7 +2579,7 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling fetchUser: ") + localVarResponse.to_string() + , utility::conversions::to_string_t("error calling getApps: ") + localVarResponse.to_string() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -2557,7 +2590,7 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling fetchUser: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling getApps: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -2566,13 +2599,17 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit }) .then([=](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new User()); + std::vector> localVarResult; if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { web::json::value localVarJson = web::json::value::parse(localVarResponse); - - ModelBase::fromJson(localVarJson, localVarResult); + for( auto& localVarItem : localVarJson.as_array() ) + { + std::shared_ptr localVarItemObj; + ModelBase::fromJson(localVarItem, localVarItemObj); + localVarResult.push_back(localVarItemObj); + } } // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) // { @@ -2581,21 +2618,19 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit else { throw ApiException(500 - , utility::conversions::to_string_t("error calling fetchUser: unsupported response type")); + , utility::conversions::to_string_t("error calling getApps: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::fetchUserIdentity(utility::string_t appId, utility::string_t aliasLabel, utility::string_t aliasId) const +pplx::task> DefaultApi::getNotification(utility::string_t appId, utility::string_t notificationId) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/apps/{app_id}/users/by/{alias_label}/{alias_id}/identity"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("app_id") + utility::conversions::to_string_t("}"), ApiClient::parameterToString(appId)); -boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("alias_label") + utility::conversions::to_string_t("}"), ApiClient::parameterToString(aliasLabel)); -boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("alias_id") + utility::conversions::to_string_t("}"), ApiClient::parameterToString(aliasId)); + utility::string_t localVarPath = utility::conversions::to_string_t("/notifications/{notification_id}"); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("notification_id") + utility::conversions::to_string_t("}"), ApiClient::parameterToString(notificationId)); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -2624,13 +2659,16 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->fetchUserIdentity does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->getNotification does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; + { + localVarQueryParams[utility::conversions::to_string_t("app_id")] = ApiClient::parameterToString(appId); + } std::shared_ptr localVarHttpBody; utility::string_t localVarRequestHttpContentType; @@ -2651,12 +2689,12 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->fetchUserIdentity does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->getNotification does not consume any supported media type")); } - // authentication (app_key) required + // authentication (rest_api_key) required // Basic authentication is added automatically as part of the http_client_config - utility::string_t localVarBearerKey = localVarApiConfiguration->getBearerToken(utility::conversions::to_string_t("app_key")); + utility::string_t localVarBearerKey = localVarApiConfiguration->getBearerToken(utility::conversions::to_string_t("rest_api_key")); if ( localVarBearerKey.size() > 0 ) { localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = @@ -2665,7 +2703,7 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit // Adds a telemetry header localVarHeaderParams[utility::conversions::to_string_t("OS-Usage-Data")] = - utility::conversions::to_string_t("kind=sdk, sdk-name=onesignal-cpp, version=2.2.0"); + utility::conversions::to_string_t("kind=sdk, sdk-name=onesignal-cpp, version=5.0.0-beta1"); return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=](web::http::http_response localVarResponse) @@ -2683,7 +2721,7 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling fetchUserIdentity: ") + localVarResponse.to_string() + , utility::conversions::to_string_t("error calling getNotification: ") + localVarResponse.to_string() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -2694,7 +2732,7 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling fetchUserIdentity: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling getNotification: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -2703,7 +2741,7 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit }) .then([=](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new Inline_response_200()); + std::shared_ptr localVarResult(new NotificationWithMeta()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -2718,19 +2756,25 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit else { throw ApiException(500 - , utility::conversions::to_string_t("error calling fetchUserIdentity: unsupported response type")); + , utility::conversions::to_string_t("error calling getNotification: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::getApp(utility::string_t appId) const +pplx::task> DefaultApi::getNotificationHistory(utility::string_t notificationId, std::shared_ptr getNotificationHistoryRequestBody) const { + // verify the required parameter 'getNotificationHistoryRequestBody' is set + if (getNotificationHistoryRequestBody == nullptr) + { + throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'getNotificationHistoryRequestBody' when calling DefaultApi->getNotificationHistory")); + } + std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/apps/{app_id}"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("app_id") + utility::conversions::to_string_t("}"), ApiClient::parameterToString(appId)); + utility::string_t localVarPath = utility::conversions::to_string_t("/notifications/{notification_id}/history"); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("notification_id") + utility::conversions::to_string_t("}"), ApiClient::parameterToString(notificationId)); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -2759,12 +2803,13 @@ pplx::task> DefaultApi::getApp(utility::string_t appId) con } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->getApp does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->getNotificationHistory does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; + localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); std::shared_ptr localVarHttpBody; @@ -2774,11 +2819,27 @@ pplx::task> DefaultApi::getApp(utility::string_t appId) con if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); + web::json::value localVarJson; + + localVarJson = ModelBase::toJson(getNotificationHistoryRequestBody); + + + localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); + std::shared_ptr localVarMultipart(new MultipartFormData); + + if(getNotificationHistoryRequestBody.get()) + { + getNotificationHistoryRequestBody->toMultipart(localVarMultipart, utility::conversions::to_string_t("getNotificationHistoryRequestBody")); + } + + + localVarHttpBody = localVarMultipart; + localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -2786,12 +2847,12 @@ pplx::task> DefaultApi::getApp(utility::string_t appId) con } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->getApp does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->getNotificationHistory does not consume any supported media type")); } - // authentication (user_key) required + // authentication (rest_api_key) required // Basic authentication is added automatically as part of the http_client_config - utility::string_t localVarBearerKey = localVarApiConfiguration->getBearerToken(utility::conversions::to_string_t("user_key")); + utility::string_t localVarBearerKey = localVarApiConfiguration->getBearerToken(utility::conversions::to_string_t("rest_api_key")); if ( localVarBearerKey.size() > 0 ) { localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = @@ -2800,9 +2861,9 @@ pplx::task> DefaultApi::getApp(utility::string_t appId) con // Adds a telemetry header localVarHeaderParams[utility::conversions::to_string_t("OS-Usage-Data")] = - utility::conversions::to_string_t("kind=sdk, sdk-name=onesignal-cpp, version=2.2.0"); + utility::conversions::to_string_t("kind=sdk, sdk-name=onesignal-cpp, version=5.0.0-beta1"); - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -2818,7 +2879,7 @@ pplx::task> DefaultApi::getApp(utility::string_t appId) con if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling getApp: ") + localVarResponse.to_string() + , utility::conversions::to_string_t("error calling getNotificationHistory: ") + localVarResponse.to_string() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -2829,7 +2890,7 @@ pplx::task> DefaultApi::getApp(utility::string_t appId) con if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling getApp: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling getNotificationHistory: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -2838,7 +2899,7 @@ pplx::task> DefaultApi::getApp(utility::string_t appId) con }) .then([=](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new App()); + std::shared_ptr localVarResult(new NotificationHistorySuccessResponse()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -2853,18 +2914,18 @@ pplx::task> DefaultApi::getApp(utility::string_t appId) con else { throw ApiException(500 - , utility::conversions::to_string_t("error calling getApp: unsupported response type")); + , utility::conversions::to_string_t("error calling getNotificationHistory: unsupported response type")); } return localVarResult; }); } -pplx::task>> DefaultApi::getApps() const +pplx::task> DefaultApi::getNotifications(utility::string_t appId, boost::optional limit, boost::optional offset, boost::optional kind) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/apps"); + utility::string_t localVarPath = utility::conversions::to_string_t("/notifications"); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -2893,13 +2954,28 @@ pplx::task>> DefaultApi::getApps() const } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->getApps does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->getNotifications does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; + { + localVarQueryParams[utility::conversions::to_string_t("app_id")] = ApiClient::parameterToString(appId); + } + if (limit) + { + localVarQueryParams[utility::conversions::to_string_t("limit")] = ApiClient::parameterToString(*limit); + } + if (offset) + { + localVarQueryParams[utility::conversions::to_string_t("offset")] = ApiClient::parameterToString(*offset); + } + if (kind) + { + localVarQueryParams[utility::conversions::to_string_t("kind")] = ApiClient::parameterToString(*kind); + } std::shared_ptr localVarHttpBody; utility::string_t localVarRequestHttpContentType; @@ -2920,12 +2996,12 @@ pplx::task>> DefaultApi::getApps() const } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->getApps does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->getNotifications does not consume any supported media type")); } - // authentication (user_key) required + // authentication (rest_api_key) required // Basic authentication is added automatically as part of the http_client_config - utility::string_t localVarBearerKey = localVarApiConfiguration->getBearerToken(utility::conversions::to_string_t("user_key")); + utility::string_t localVarBearerKey = localVarApiConfiguration->getBearerToken(utility::conversions::to_string_t("rest_api_key")); if ( localVarBearerKey.size() > 0 ) { localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = @@ -2934,7 +3010,7 @@ pplx::task>> DefaultApi::getApps() const // Adds a telemetry header localVarHeaderParams[utility::conversions::to_string_t("OS-Usage-Data")] = - utility::conversions::to_string_t("kind=sdk, sdk-name=onesignal-cpp, version=2.2.0"); + utility::conversions::to_string_t("kind=sdk, sdk-name=onesignal-cpp, version=5.0.0-beta1"); return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=](web::http::http_response localVarResponse) @@ -2952,7 +3028,7 @@ pplx::task>> DefaultApi::getApps() const if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling getApps: ") + localVarResponse.to_string() + , utility::conversions::to_string_t("error calling getNotifications: ") + localVarResponse.to_string() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -2963,7 +3039,7 @@ pplx::task>> DefaultApi::getApps() const if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling getApps: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling getNotifications: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -2972,17 +3048,13 @@ pplx::task>> DefaultApi::getApps() const }) .then([=](utility::string_t localVarResponse) { - std::vector> localVarResult; + std::shared_ptr localVarResult(new NotificationSlice()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { web::json::value localVarJson = web::json::value::parse(localVarResponse); - for( auto& localVarItem : localVarJson.as_array() ) - { - std::shared_ptr localVarItemObj; - ModelBase::fromJson(localVarItem, localVarItemObj); - localVarResult.push_back(localVarItemObj); - } + + ModelBase::fromJson(localVarJson, localVarResult); } // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) // { @@ -2991,20 +3063,19 @@ pplx::task>> DefaultApi::getApps() const else { throw ApiException(500 - , utility::conversions::to_string_t("error calling getApps: unsupported response type")); + , utility::conversions::to_string_t("error calling getNotifications: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::getEligibleIams(utility::string_t appId, utility::string_t subscriptionId) const +pplx::task> DefaultApi::getOutcomes(utility::string_t appId, utility::string_t outcomeNames, boost::optional outcomeNamesLeft_Square_BracketRight_Square_Bracket, boost::optional outcomeTimeRange, boost::optional outcomePlatforms, boost::optional outcomeAttribution) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/apps/{app_id}/subscriptions/{subscription_id}/iams"); + utility::string_t localVarPath = utility::conversions::to_string_t("/apps/{app_id}/outcomes"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("app_id") + utility::conversions::to_string_t("}"), ApiClient::parameterToString(appId)); -boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("subscription_id") + utility::conversions::to_string_t("}"), ApiClient::parameterToString(subscriptionId)); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -3033,13 +3104,32 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->getEligibleIams does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->getOutcomes does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; + { + localVarQueryParams[utility::conversions::to_string_t("outcome_names")] = ApiClient::parameterToString(outcomeNames); + } + if (outcomeNamesLeft_Square_BracketRight_Square_Bracket) + { + localVarQueryParams[utility::conversions::to_string_t("outcome_names[]")] = ApiClient::parameterToString(*outcomeNamesLeft_Square_BracketRight_Square_Bracket); + } + if (outcomeTimeRange) + { + localVarQueryParams[utility::conversions::to_string_t("outcome_time_range")] = ApiClient::parameterToString(*outcomeTimeRange); + } + if (outcomePlatforms) + { + localVarQueryParams[utility::conversions::to_string_t("outcome_platforms")] = ApiClient::parameterToString(*outcomePlatforms); + } + if (outcomeAttribution) + { + localVarQueryParams[utility::conversions::to_string_t("outcome_attribution")] = ApiClient::parameterToString(*outcomeAttribution); + } std::shared_ptr localVarHttpBody; utility::string_t localVarRequestHttpContentType; @@ -3060,12 +3150,12 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->getEligibleIams does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->getOutcomes does not consume any supported media type")); } - // authentication (app_key) required + // authentication (rest_api_key) required // Basic authentication is added automatically as part of the http_client_config - utility::string_t localVarBearerKey = localVarApiConfiguration->getBearerToken(utility::conversions::to_string_t("app_key")); + utility::string_t localVarBearerKey = localVarApiConfiguration->getBearerToken(utility::conversions::to_string_t("rest_api_key")); if ( localVarBearerKey.size() > 0 ) { localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = @@ -3074,7 +3164,7 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit // Adds a telemetry header localVarHeaderParams[utility::conversions::to_string_t("OS-Usage-Data")] = - utility::conversions::to_string_t("kind=sdk, sdk-name=onesignal-cpp, version=2.2.0"); + utility::conversions::to_string_t("kind=sdk, sdk-name=onesignal-cpp, version=5.0.0-beta1"); return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=](web::http::http_response localVarResponse) @@ -3092,7 +3182,7 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling getEligibleIams: ") + localVarResponse.to_string() + , utility::conversions::to_string_t("error calling getOutcomes: ") + localVarResponse.to_string() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -3103,7 +3193,7 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling getEligibleIams: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling getOutcomes: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -3112,7 +3202,7 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit }) .then([=](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new Inline_response_200_3()); + std::shared_ptr localVarResult(new OutcomesData()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -3127,19 +3217,19 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit else { throw ApiException(500 - , utility::conversions::to_string_t("error calling getEligibleIams: unsupported response type")); + , utility::conversions::to_string_t("error calling getOutcomes: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::getNotification(utility::string_t appId, utility::string_t notificationId) const +pplx::task> DefaultApi::getSegments(utility::string_t appId, boost::optional offset, boost::optional limit) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/notifications/{notification_id}"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("notification_id") + utility::conversions::to_string_t("}"), ApiClient::parameterToString(notificationId)); + utility::string_t localVarPath = utility::conversions::to_string_t("/apps/{app_id}/segments"); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("app_id") + utility::conversions::to_string_t("}"), ApiClient::parameterToString(appId)); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -3168,15 +3258,20 @@ pplx::task> DefaultApi::getNotification(ut } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->getNotification does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->getSegments does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; + if (offset) { - localVarQueryParams[utility::conversions::to_string_t("app_id")] = ApiClient::parameterToString(appId); + localVarQueryParams[utility::conversions::to_string_t("offset")] = ApiClient::parameterToString(*offset); + } + if (limit) + { + localVarQueryParams[utility::conversions::to_string_t("limit")] = ApiClient::parameterToString(*limit); } std::shared_ptr localVarHttpBody; @@ -3198,12 +3293,12 @@ pplx::task> DefaultApi::getNotification(ut } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->getNotification does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->getSegments does not consume any supported media type")); } - // authentication (app_key) required + // authentication (rest_api_key) required // Basic authentication is added automatically as part of the http_client_config - utility::string_t localVarBearerKey = localVarApiConfiguration->getBearerToken(utility::conversions::to_string_t("app_key")); + utility::string_t localVarBearerKey = localVarApiConfiguration->getBearerToken(utility::conversions::to_string_t("rest_api_key")); if ( localVarBearerKey.size() > 0 ) { localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = @@ -3212,7 +3307,7 @@ pplx::task> DefaultApi::getNotification(ut // Adds a telemetry header localVarHeaderParams[utility::conversions::to_string_t("OS-Usage-Data")] = - utility::conversions::to_string_t("kind=sdk, sdk-name=onesignal-cpp, version=2.2.0"); + utility::conversions::to_string_t("kind=sdk, sdk-name=onesignal-cpp, version=5.0.0-beta1"); return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=](web::http::http_response localVarResponse) @@ -3230,7 +3325,7 @@ pplx::task> DefaultApi::getNotification(ut if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling getNotification: ") + localVarResponse.to_string() + , utility::conversions::to_string_t("error calling getSegments: ") + localVarResponse.to_string() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -3241,7 +3336,7 @@ pplx::task> DefaultApi::getNotification(ut if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling getNotification: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling getSegments: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -3250,7 +3345,7 @@ pplx::task> DefaultApi::getNotification(ut }) .then([=](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new NotificationWithMeta()); + std::shared_ptr localVarResult(new GetSegmentsSuccessResponse()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -3265,25 +3360,21 @@ pplx::task> DefaultApi::getNotification(ut else { throw ApiException(500 - , utility::conversions::to_string_t("error calling getNotification: unsupported response type")); + , utility::conversions::to_string_t("error calling getSegments: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::getNotificationHistory(utility::string_t notificationId, std::shared_ptr getNotificationRequestBody) const +pplx::task> DefaultApi::getUser(utility::string_t appId, utility::string_t aliasLabel, utility::string_t aliasId) const { - // verify the required parameter 'getNotificationRequestBody' is set - if (getNotificationRequestBody == nullptr) - { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'getNotificationRequestBody' when calling DefaultApi->getNotificationHistory")); - } - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/notifications/{notification_id}/history"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("notification_id") + utility::conversions::to_string_t("}"), ApiClient::parameterToString(notificationId)); + utility::string_t localVarPath = utility::conversions::to_string_t("/apps/{app_id}/users/by/{alias_label}/{alias_id}"); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("app_id") + utility::conversions::to_string_t("}"), ApiClient::parameterToString(appId)); +boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("alias_label") + utility::conversions::to_string_t("}"), ApiClient::parameterToString(aliasLabel)); +boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("alias_id") + utility::conversions::to_string_t("}"), ApiClient::parameterToString(aliasId)); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -3312,13 +3403,12 @@ pplx::task> DefaultApi::getN } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->getNotificationHistory does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->getUser does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); std::shared_ptr localVarHttpBody; @@ -3328,27 +3418,11 @@ pplx::task> DefaultApi::getN if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - web::json::value localVarJson; - - localVarJson = ModelBase::toJson(getNotificationRequestBody); - - - localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - std::shared_ptr localVarMultipart(new MultipartFormData); - - if(getNotificationRequestBody.get()) - { - getNotificationRequestBody->toMultipart(localVarMultipart, utility::conversions::to_string_t("getNotificationRequestBody")); - } - - - localVarHttpBody = localVarMultipart; - localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -3356,12 +3430,12 @@ pplx::task> DefaultApi::getN } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->getNotificationHistory does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->getUser does not consume any supported media type")); } - // authentication (app_key) required + // authentication (rest_api_key) required // Basic authentication is added automatically as part of the http_client_config - utility::string_t localVarBearerKey = localVarApiConfiguration->getBearerToken(utility::conversions::to_string_t("app_key")); + utility::string_t localVarBearerKey = localVarApiConfiguration->getBearerToken(utility::conversions::to_string_t("rest_api_key")); if ( localVarBearerKey.size() > 0 ) { localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = @@ -3370,9 +3444,9 @@ pplx::task> DefaultApi::getN // Adds a telemetry header localVarHeaderParams[utility::conversions::to_string_t("OS-Usage-Data")] = - utility::conversions::to_string_t("kind=sdk, sdk-name=onesignal-cpp, version=2.2.0"); + utility::conversions::to_string_t("kind=sdk, sdk-name=onesignal-cpp, version=5.0.0-beta1"); - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -3388,7 +3462,7 @@ pplx::task> DefaultApi::getN if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling getNotificationHistory: ") + localVarResponse.to_string() + , utility::conversions::to_string_t("error calling getUser: ") + localVarResponse.to_string() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -3399,7 +3473,7 @@ pplx::task> DefaultApi::getN if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling getNotificationHistory: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling getUser: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -3408,7 +3482,7 @@ pplx::task> DefaultApi::getN }) .then([=](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new NotificationHistorySuccessResponse()); + std::shared_ptr localVarResult(new User()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -3423,922 +3497,13 @@ pplx::task> DefaultApi::getN else { throw ApiException(500 - , utility::conversions::to_string_t("error calling getNotificationHistory: unsupported response type")); + , utility::conversions::to_string_t("error calling getUser: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::getNotifications(utility::string_t appId, boost::optional limit, boost::optional offset, boost::optional kind) const -{ - - - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/notifications"); - - std::map localVarQueryParams; - std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); - std::map localVarFormParams; - std::map> localVarFileParams; - - std::unordered_set localVarResponseHttpContentTypes; - localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - - utility::string_t localVarResponseHttpContentType; - - // use JSON if possible - if ( localVarResponseHttpContentTypes.size() == 0 ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // JSON - else if ( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else - { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->getNotifications does not produce any supported media type")); - } - - localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; - - std::unordered_set localVarConsumeHttpContentTypes; - - { - localVarQueryParams[utility::conversions::to_string_t("app_id")] = ApiClient::parameterToString(appId); - } - if (limit) - { - localVarQueryParams[utility::conversions::to_string_t("limit")] = ApiClient::parameterToString(*limit); - } - if (offset) - { - localVarQueryParams[utility::conversions::to_string_t("offset")] = ApiClient::parameterToString(*offset); - } - if (kind) - { - localVarQueryParams[utility::conversions::to_string_t("kind")] = ApiClient::parameterToString(*kind); - } - - std::shared_ptr localVarHttpBody; - utility::string_t localVarRequestHttpContentType; - - // use JSON if possible - if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/x-www-form-urlencoded"); - } - else - { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->getNotifications does not consume any supported media type")); - } - - // authentication (app_key) required - // Basic authentication is added automatically as part of the http_client_config - utility::string_t localVarBearerKey = localVarApiConfiguration->getBearerToken(utility::conversions::to_string_t("app_key")); - if ( localVarBearerKey.size() > 0 ) - { - localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = - utility::conversions::to_string_t("Key ") + utility::conversions::to_string_t(localVarBearerKey); - } - - // Adds a telemetry header - localVarHeaderParams[utility::conversions::to_string_t("OS-Usage-Data")] = - utility::conversions::to_string_t("kind=sdk, sdk-name=onesignal-cpp, version=2.2.0"); - - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) - .then([=](web::http::http_response localVarResponse) - { - if (m_ApiClient->getResponseHandler()) - { - m_ApiClient->getResponseHandler()(localVarResponse.status_code(), localVarResponse.headers()); - } - - // 1xx - informational : OK - // 2xx - successful : OK - // 3xx - redirection : OK - // 4xx - client error : not OK - // 5xx - client error : not OK - if (localVarResponse.status_code() >= 400) - { - throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling getNotifications: ") + localVarResponse.to_string() - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - - // check response content type - if(localVarResponse.headers().has(utility::conversions::to_string_t("Content-Type"))) - { - utility::string_t localVarContentType = localVarResponse.headers()[utility::conversions::to_string_t("Content-Type")]; - if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling getNotifications: unexpected response type: ") + localVarContentType - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - } - - return localVarResponse.extract_string(); - }) - .then([=](utility::string_t localVarResponse) - { - std::shared_ptr localVarResult(new NotificationSlice()); - - if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) - { - web::json::value localVarJson = web::json::value::parse(localVarResponse); - - ModelBase::fromJson(localVarJson, localVarResult); - } - // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) - // { - // TODO multipart response parsing - // } - else - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling getNotifications: unsupported response type")); - } - - return localVarResult; - }); -} -pplx::task> DefaultApi::getOutcomes(utility::string_t appId, utility::string_t outcomeNames, boost::optional outcomeNamesLeft_Square_BracketRight_Square_Bracket, boost::optional outcomeTimeRange, boost::optional outcomePlatforms, boost::optional outcomeAttribution) const -{ - - - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/apps/{app_id}/outcomes"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("app_id") + utility::conversions::to_string_t("}"), ApiClient::parameterToString(appId)); - - std::map localVarQueryParams; - std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); - std::map localVarFormParams; - std::map> localVarFileParams; - - std::unordered_set localVarResponseHttpContentTypes; - localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - - utility::string_t localVarResponseHttpContentType; - - // use JSON if possible - if ( localVarResponseHttpContentTypes.size() == 0 ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // JSON - else if ( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else - { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->getOutcomes does not produce any supported media type")); - } - - localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; - - std::unordered_set localVarConsumeHttpContentTypes; - - { - localVarQueryParams[utility::conversions::to_string_t("outcome_names")] = ApiClient::parameterToString(outcomeNames); - } - if (outcomeNamesLeft_Square_BracketRight_Square_Bracket) - { - localVarQueryParams[utility::conversions::to_string_t("outcome_names[]")] = ApiClient::parameterToString(*outcomeNamesLeft_Square_BracketRight_Square_Bracket); - } - if (outcomeTimeRange) - { - localVarQueryParams[utility::conversions::to_string_t("outcome_time_range")] = ApiClient::parameterToString(*outcomeTimeRange); - } - if (outcomePlatforms) - { - localVarQueryParams[utility::conversions::to_string_t("outcome_platforms")] = ApiClient::parameterToString(*outcomePlatforms); - } - if (outcomeAttribution) - { - localVarQueryParams[utility::conversions::to_string_t("outcome_attribution")] = ApiClient::parameterToString(*outcomeAttribution); - } - - std::shared_ptr localVarHttpBody; - utility::string_t localVarRequestHttpContentType; - - // use JSON if possible - if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/x-www-form-urlencoded"); - } - else - { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->getOutcomes does not consume any supported media type")); - } - - // authentication (app_key) required - // Basic authentication is added automatically as part of the http_client_config - utility::string_t localVarBearerKey = localVarApiConfiguration->getBearerToken(utility::conversions::to_string_t("app_key")); - if ( localVarBearerKey.size() > 0 ) - { - localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = - utility::conversions::to_string_t("Key ") + utility::conversions::to_string_t(localVarBearerKey); - } - - // Adds a telemetry header - localVarHeaderParams[utility::conversions::to_string_t("OS-Usage-Data")] = - utility::conversions::to_string_t("kind=sdk, sdk-name=onesignal-cpp, version=2.2.0"); - - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) - .then([=](web::http::http_response localVarResponse) - { - if (m_ApiClient->getResponseHandler()) - { - m_ApiClient->getResponseHandler()(localVarResponse.status_code(), localVarResponse.headers()); - } - - // 1xx - informational : OK - // 2xx - successful : OK - // 3xx - redirection : OK - // 4xx - client error : not OK - // 5xx - client error : not OK - if (localVarResponse.status_code() >= 400) - { - throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling getOutcomes: ") + localVarResponse.to_string() - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - - // check response content type - if(localVarResponse.headers().has(utility::conversions::to_string_t("Content-Type"))) - { - utility::string_t localVarContentType = localVarResponse.headers()[utility::conversions::to_string_t("Content-Type")]; - if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling getOutcomes: unexpected response type: ") + localVarContentType - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - } - - return localVarResponse.extract_string(); - }) - .then([=](utility::string_t localVarResponse) - { - std::shared_ptr localVarResult(new OutcomesData()); - - if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) - { - web::json::value localVarJson = web::json::value::parse(localVarResponse); - - ModelBase::fromJson(localVarJson, localVarResult); - } - // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) - // { - // TODO multipart response parsing - // } - else - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling getOutcomes: unsupported response type")); - } - - return localVarResult; - }); -} -pplx::task> DefaultApi::getPlayer(utility::string_t appId, utility::string_t playerId, boost::optional emailAuthHash) const -{ - - - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/players/{player_id}"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("player_id") + utility::conversions::to_string_t("}"), ApiClient::parameterToString(playerId)); - - std::map localVarQueryParams; - std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); - std::map localVarFormParams; - std::map> localVarFileParams; - - std::unordered_set localVarResponseHttpContentTypes; - localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - - utility::string_t localVarResponseHttpContentType; - - // use JSON if possible - if ( localVarResponseHttpContentTypes.size() == 0 ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // JSON - else if ( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else - { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->getPlayer does not produce any supported media type")); - } - - localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; - - std::unordered_set localVarConsumeHttpContentTypes; - - { - localVarQueryParams[utility::conversions::to_string_t("app_id")] = ApiClient::parameterToString(appId); - } - if (emailAuthHash) - { - localVarQueryParams[utility::conversions::to_string_t("email_auth_hash")] = ApiClient::parameterToString(*emailAuthHash); - } - - std::shared_ptr localVarHttpBody; - utility::string_t localVarRequestHttpContentType; - - // use JSON if possible - if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/x-www-form-urlencoded"); - } - else - { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->getPlayer does not consume any supported media type")); - } - - // authentication (app_key) required - // Basic authentication is added automatically as part of the http_client_config - utility::string_t localVarBearerKey = localVarApiConfiguration->getBearerToken(utility::conversions::to_string_t("app_key")); - if ( localVarBearerKey.size() > 0 ) - { - localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = - utility::conversions::to_string_t("Key ") + utility::conversions::to_string_t(localVarBearerKey); - } - - // Adds a telemetry header - localVarHeaderParams[utility::conversions::to_string_t("OS-Usage-Data")] = - utility::conversions::to_string_t("kind=sdk, sdk-name=onesignal-cpp, version=2.2.0"); - - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) - .then([=](web::http::http_response localVarResponse) - { - if (m_ApiClient->getResponseHandler()) - { - m_ApiClient->getResponseHandler()(localVarResponse.status_code(), localVarResponse.headers()); - } - - // 1xx - informational : OK - // 2xx - successful : OK - // 3xx - redirection : OK - // 4xx - client error : not OK - // 5xx - client error : not OK - if (localVarResponse.status_code() >= 400) - { - throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling getPlayer: ") + localVarResponse.to_string() - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - - // check response content type - if(localVarResponse.headers().has(utility::conversions::to_string_t("Content-Type"))) - { - utility::string_t localVarContentType = localVarResponse.headers()[utility::conversions::to_string_t("Content-Type")]; - if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling getPlayer: unexpected response type: ") + localVarContentType - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - } - - return localVarResponse.extract_string(); - }) - .then([=](utility::string_t localVarResponse) - { - std::shared_ptr localVarResult(new Player()); - - if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) - { - web::json::value localVarJson = web::json::value::parse(localVarResponse); - - ModelBase::fromJson(localVarJson, localVarResult); - } - // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) - // { - // TODO multipart response parsing - // } - else - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling getPlayer: unsupported response type")); - } - - return localVarResult; - }); -} -pplx::task> DefaultApi::getPlayers(utility::string_t appId, boost::optional limit, boost::optional offset) const -{ - - - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/players"); - - std::map localVarQueryParams; - std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); - std::map localVarFormParams; - std::map> localVarFileParams; - - std::unordered_set localVarResponseHttpContentTypes; - localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - - utility::string_t localVarResponseHttpContentType; - - // use JSON if possible - if ( localVarResponseHttpContentTypes.size() == 0 ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // JSON - else if ( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else - { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->getPlayers does not produce any supported media type")); - } - - localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; - - std::unordered_set localVarConsumeHttpContentTypes; - - { - localVarQueryParams[utility::conversions::to_string_t("app_id")] = ApiClient::parameterToString(appId); - } - if (limit) - { - localVarQueryParams[utility::conversions::to_string_t("limit")] = ApiClient::parameterToString(*limit); - } - if (offset) - { - localVarQueryParams[utility::conversions::to_string_t("offset")] = ApiClient::parameterToString(*offset); - } - - std::shared_ptr localVarHttpBody; - utility::string_t localVarRequestHttpContentType; - - // use JSON if possible - if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/x-www-form-urlencoded"); - } - else - { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->getPlayers does not consume any supported media type")); - } - - // authentication (app_key) required - // Basic authentication is added automatically as part of the http_client_config - utility::string_t localVarBearerKey = localVarApiConfiguration->getBearerToken(utility::conversions::to_string_t("app_key")); - if ( localVarBearerKey.size() > 0 ) - { - localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = - utility::conversions::to_string_t("Key ") + utility::conversions::to_string_t(localVarBearerKey); - } - - // Adds a telemetry header - localVarHeaderParams[utility::conversions::to_string_t("OS-Usage-Data")] = - utility::conversions::to_string_t("kind=sdk, sdk-name=onesignal-cpp, version=2.2.0"); - - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) - .then([=](web::http::http_response localVarResponse) - { - if (m_ApiClient->getResponseHandler()) - { - m_ApiClient->getResponseHandler()(localVarResponse.status_code(), localVarResponse.headers()); - } - - // 1xx - informational : OK - // 2xx - successful : OK - // 3xx - redirection : OK - // 4xx - client error : not OK - // 5xx - client error : not OK - if (localVarResponse.status_code() >= 400) - { - throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling getPlayers: ") + localVarResponse.to_string() - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - - // check response content type - if(localVarResponse.headers().has(utility::conversions::to_string_t("Content-Type"))) - { - utility::string_t localVarContentType = localVarResponse.headers()[utility::conversions::to_string_t("Content-Type")]; - if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling getPlayers: unexpected response type: ") + localVarContentType - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - } - - return localVarResponse.extract_string(); - }) - .then([=](utility::string_t localVarResponse) - { - std::shared_ptr localVarResult(new PlayerSlice()); - - if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) - { - web::json::value localVarJson = web::json::value::parse(localVarResponse); - - ModelBase::fromJson(localVarJson, localVarResult); - } - // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) - // { - // TODO multipart response parsing - // } - else - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling getPlayers: unsupported response type")); - } - - return localVarResult; - }); -} -pplx::task> DefaultApi::identifyUserByAlias(utility::string_t appId, utility::string_t aliasLabel, utility::string_t aliasId, std::shared_ptr userIdentityRequestBody) const -{ - - // verify the required parameter 'userIdentityRequestBody' is set - if (userIdentityRequestBody == nullptr) - { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'userIdentityRequestBody' when calling DefaultApi->identifyUserByAlias")); - } - - - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/apps/{app_id}/users/by/{alias_label}/{alias_id}/identity"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("app_id") + utility::conversions::to_string_t("}"), ApiClient::parameterToString(appId)); -boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("alias_label") + utility::conversions::to_string_t("}"), ApiClient::parameterToString(aliasLabel)); -boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("alias_id") + utility::conversions::to_string_t("}"), ApiClient::parameterToString(aliasId)); - - std::map localVarQueryParams; - std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); - std::map localVarFormParams; - std::map> localVarFileParams; - - std::unordered_set localVarResponseHttpContentTypes; - localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - - utility::string_t localVarResponseHttpContentType; - - // use JSON if possible - if ( localVarResponseHttpContentTypes.size() == 0 ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // JSON - else if ( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else - { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->identifyUserByAlias does not produce any supported media type")); - } - - localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; - - std::unordered_set localVarConsumeHttpContentTypes; - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - - - std::shared_ptr localVarHttpBody; - utility::string_t localVarRequestHttpContentType; - - // use JSON if possible - if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - web::json::value localVarJson; - - localVarJson = ModelBase::toJson(userIdentityRequestBody); - - - localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); - } - // multipart formdata - else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - std::shared_ptr localVarMultipart(new MultipartFormData); - - if(userIdentityRequestBody.get()) - { - userIdentityRequestBody->toMultipart(localVarMultipart, utility::conversions::to_string_t("userIdentityRequestBody")); - } - - - localVarHttpBody = localVarMultipart; - localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); - } - else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/x-www-form-urlencoded"); - } - else - { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->identifyUserByAlias does not consume any supported media type")); - } - - // authentication (app_key) required - // Basic authentication is added automatically as part of the http_client_config - utility::string_t localVarBearerKey = localVarApiConfiguration->getBearerToken(utility::conversions::to_string_t("app_key")); - if ( localVarBearerKey.size() > 0 ) - { - localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = - utility::conversions::to_string_t("Key ") + utility::conversions::to_string_t(localVarBearerKey); - } - - // Adds a telemetry header - localVarHeaderParams[utility::conversions::to_string_t("OS-Usage-Data")] = - utility::conversions::to_string_t("kind=sdk, sdk-name=onesignal-cpp, version=2.2.0"); - - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("PATCH"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) - .then([=](web::http::http_response localVarResponse) - { - if (m_ApiClient->getResponseHandler()) - { - m_ApiClient->getResponseHandler()(localVarResponse.status_code(), localVarResponse.headers()); - } - - // 1xx - informational : OK - // 2xx - successful : OK - // 3xx - redirection : OK - // 4xx - client error : not OK - // 5xx - client error : not OK - if (localVarResponse.status_code() >= 400) - { - throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling identifyUserByAlias: ") + localVarResponse.to_string() - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - - // check response content type - if(localVarResponse.headers().has(utility::conversions::to_string_t("Content-Type"))) - { - utility::string_t localVarContentType = localVarResponse.headers()[utility::conversions::to_string_t("Content-Type")]; - if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling identifyUserByAlias: unexpected response type: ") + localVarContentType - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - } - - return localVarResponse.extract_string(); - }) - .then([=](utility::string_t localVarResponse) - { - std::shared_ptr localVarResult(new Inline_response_200()); - - if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) - { - web::json::value localVarJson = web::json::value::parse(localVarResponse); - - ModelBase::fromJson(localVarJson, localVarResult); - } - // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) - // { - // TODO multipart response parsing - // } - else - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling identifyUserByAlias: unsupported response type")); - } - - return localVarResult; - }); -} -pplx::task> DefaultApi::identifyUserBySubscriptionId(utility::string_t appId, utility::string_t subscriptionId, std::shared_ptr userIdentityRequestBody) const -{ - - // verify the required parameter 'userIdentityRequestBody' is set - if (userIdentityRequestBody == nullptr) - { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'userIdentityRequestBody' when calling DefaultApi->identifyUserBySubscriptionId")); - } - - - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/apps/{app_id}/subscriptions/{subscription_id}/user/identity"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("app_id") + utility::conversions::to_string_t("}"), ApiClient::parameterToString(appId)); -boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("subscription_id") + utility::conversions::to_string_t("}"), ApiClient::parameterToString(subscriptionId)); - - std::map localVarQueryParams; - std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); - std::map localVarFormParams; - std::map> localVarFileParams; - - std::unordered_set localVarResponseHttpContentTypes; - localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - - utility::string_t localVarResponseHttpContentType; - - // use JSON if possible - if ( localVarResponseHttpContentTypes.size() == 0 ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // JSON - else if ( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else - { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->identifyUserBySubscriptionId does not produce any supported media type")); - } - - localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; - - std::unordered_set localVarConsumeHttpContentTypes; - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - - - std::shared_ptr localVarHttpBody; - utility::string_t localVarRequestHttpContentType; - - // use JSON if possible - if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - web::json::value localVarJson; - - localVarJson = ModelBase::toJson(userIdentityRequestBody); - - - localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); - } - // multipart formdata - else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - std::shared_ptr localVarMultipart(new MultipartFormData); - - if(userIdentityRequestBody.get()) - { - userIdentityRequestBody->toMultipart(localVarMultipart, utility::conversions::to_string_t("userIdentityRequestBody")); - } - - - localVarHttpBody = localVarMultipart; - localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); - } - else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/x-www-form-urlencoded"); - } - else - { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->identifyUserBySubscriptionId does not consume any supported media type")); - } - - // authentication (app_key) required - // Basic authentication is added automatically as part of the http_client_config - utility::string_t localVarBearerKey = localVarApiConfiguration->getBearerToken(utility::conversions::to_string_t("app_key")); - if ( localVarBearerKey.size() > 0 ) - { - localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = - utility::conversions::to_string_t("Key ") + utility::conversions::to_string_t(localVarBearerKey); - } - - // Adds a telemetry header - localVarHeaderParams[utility::conversions::to_string_t("OS-Usage-Data")] = - utility::conversions::to_string_t("kind=sdk, sdk-name=onesignal-cpp, version=2.2.0"); - - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("PATCH"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) - .then([=](web::http::http_response localVarResponse) - { - if (m_ApiClient->getResponseHandler()) - { - m_ApiClient->getResponseHandler()(localVarResponse.status_code(), localVarResponse.headers()); - } - - // 1xx - informational : OK - // 2xx - successful : OK - // 3xx - redirection : OK - // 4xx - client error : not OK - // 5xx - client error : not OK - if (localVarResponse.status_code() >= 400) - { - throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling identifyUserBySubscriptionId: ") + localVarResponse.to_string() - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - - // check response content type - if(localVarResponse.headers().has(utility::conversions::to_string_t("Content-Type"))) - { - utility::string_t localVarContentType = localVarResponse.headers()[utility::conversions::to_string_t("Content-Type")]; - if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling identifyUserBySubscriptionId: unexpected response type: ") + localVarContentType - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - } - - return localVarResponse.extract_string(); - }) - .then([=](utility::string_t localVarResponse) - { - std::shared_ptr localVarResult(new UserIdentityResponse()); - - if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) - { - web::json::value localVarJson = web::json::value::parse(localVarResponse); - - ModelBase::fromJson(localVarJson, localVarResult); - } - // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) - // { - // TODO multipart response parsing - // } - else - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling identifyUserBySubscriptionId: unsupported response type")); - } - - return localVarResult; - }); -} -pplx::task> DefaultApi::transferSubscription(utility::string_t appId, utility::string_t subscriptionId, std::shared_ptr transferSubscriptionRequestBody) const +pplx::task> DefaultApi::transferSubscription(utility::string_t appId, utility::string_t subscriptionId, std::shared_ptr transferSubscriptionRequestBody) const { // verify the required parameter 'transferSubscriptionRequestBody' is set @@ -4427,9 +3592,9 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit throw ApiException(415, utility::conversions::to_string_t("DefaultApi->transferSubscription does not consume any supported media type")); } - // authentication (app_key) required + // authentication (rest_api_key) required // Basic authentication is added automatically as part of the http_client_config - utility::string_t localVarBearerKey = localVarApiConfiguration->getBearerToken(utility::conversions::to_string_t("app_key")); + utility::string_t localVarBearerKey = localVarApiConfiguration->getBearerToken(utility::conversions::to_string_t("rest_api_key")); if ( localVarBearerKey.size() > 0 ) { localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = @@ -4438,7 +3603,7 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit // Adds a telemetry header localVarHeaderParams[utility::conversions::to_string_t("OS-Usage-Data")] = - utility::conversions::to_string_t("kind=sdk, sdk-name=onesignal-cpp, version=2.2.0"); + utility::conversions::to_string_t("kind=sdk, sdk-name=onesignal-cpp, version=5.0.0-beta1"); return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("PATCH"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=](web::http::http_response localVarResponse) @@ -4476,7 +3641,7 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit }) .then([=](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new UserIdentityResponse()); + std::shared_ptr localVarResult(new UserIdentityBody()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -4497,19 +3662,14 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit return localVarResult; }); } -pplx::task> DefaultApi::updateApp(utility::string_t appId, std::shared_ptr app) const +pplx::task> DefaultApi::unsubscribeEmailWithToken(utility::string_t appId, utility::string_t notificationId, utility::string_t token) const { - // verify the required parameter 'app' is set - if (app == nullptr) - { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'app' when calling DefaultApi->updateApp")); - } - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/apps/{app_id}"); + utility::string_t localVarPath = utility::conversions::to_string_t("/apps/{app_id}/notifications/{notification_id}/unsubscribe"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("app_id") + utility::conversions::to_string_t("}"), ApiClient::parameterToString(appId)); +boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("notification_id") + utility::conversions::to_string_t("}"), ApiClient::parameterToString(notificationId)); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -4538,174 +3698,17 @@ pplx::task> DefaultApi::updateApp(utility::string_t appId, } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->updateApp does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->unsubscribeEmailWithToken does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - - - std::shared_ptr localVarHttpBody; - utility::string_t localVarRequestHttpContentType; - - // use JSON if possible - if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - web::json::value localVarJson; - - localVarJson = ModelBase::toJson(app); - - - localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); - } - // multipart formdata - else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - std::shared_ptr localVarMultipart(new MultipartFormData); - - if(app.get()) - { - app->toMultipart(localVarMultipart, utility::conversions::to_string_t("app")); - } - - - localVarHttpBody = localVarMultipart; - localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); - } - else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/x-www-form-urlencoded"); - } - else - { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->updateApp does not consume any supported media type")); - } - - // authentication (user_key) required - // Basic authentication is added automatically as part of the http_client_config - utility::string_t localVarBearerKey = localVarApiConfiguration->getBearerToken(utility::conversions::to_string_t("user_key")); - if ( localVarBearerKey.size() > 0 ) - { - localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = - utility::conversions::to_string_t("Key ") + utility::conversions::to_string_t(localVarBearerKey); - } - - // Adds a telemetry header - localVarHeaderParams[utility::conversions::to_string_t("OS-Usage-Data")] = - utility::conversions::to_string_t("kind=sdk, sdk-name=onesignal-cpp, version=2.2.0"); - - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("PUT"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) - .then([=](web::http::http_response localVarResponse) - { - if (m_ApiClient->getResponseHandler()) - { - m_ApiClient->getResponseHandler()(localVarResponse.status_code(), localVarResponse.headers()); - } - - // 1xx - informational : OK - // 2xx - successful : OK - // 3xx - redirection : OK - // 4xx - client error : not OK - // 5xx - client error : not OK - if (localVarResponse.status_code() >= 400) - { - throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling updateApp: ") + localVarResponse.to_string() - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - - // check response content type - if(localVarResponse.headers().has(utility::conversions::to_string_t("Content-Type"))) - { - utility::string_t localVarContentType = localVarResponse.headers()[utility::conversions::to_string_t("Content-Type")]; - if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling updateApp: unexpected response type: ") + localVarContentType - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - } - - return localVarResponse.extract_string(); - }) - .then([=](utility::string_t localVarResponse) - { - std::shared_ptr localVarResult(new App()); - - if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) - { - web::json::value localVarJson = web::json::value::parse(localVarResponse); - - ModelBase::fromJson(localVarJson, localVarResult); - } - // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) - // { - // TODO multipart response parsing - // } - else - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling updateApp: unsupported response type")); - } - - return localVarResult; - }); -} -pplx::task> DefaultApi::updateLiveActivity(utility::string_t appId, utility::string_t activityId, std::shared_ptr updateLiveActivityRequest) const -{ - - // verify the required parameter 'updateLiveActivityRequest' is set - if (updateLiveActivityRequest == nullptr) - { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'updateLiveActivityRequest' when calling DefaultApi->updateLiveActivity")); - } - - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/apps/{app_id}/live_activities/{activity_id}/notifications"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("app_id") + utility::conversions::to_string_t("}"), ApiClient::parameterToString(appId)); -boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("activity_id") + utility::conversions::to_string_t("}"), ApiClient::parameterToString(activityId)); - - std::map localVarQueryParams; - std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); - std::map localVarFormParams; - std::map> localVarFileParams; - - std::unordered_set localVarResponseHttpContentTypes; - localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - - utility::string_t localVarResponseHttpContentType; - - // use JSON if possible - if ( localVarResponseHttpContentTypes.size() == 0 ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // JSON - else if ( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->updateLiveActivity does not produce any supported media type")); + localVarQueryParams[utility::conversions::to_string_t("token")] = ApiClient::parameterToString(token); } - localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; - - std::unordered_set localVarConsumeHttpContentTypes; - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - - std::shared_ptr localVarHttpBody; utility::string_t localVarRequestHttpContentType; @@ -4713,27 +3716,11 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - web::json::value localVarJson; - - localVarJson = ModelBase::toJson(updateLiveActivityRequest); - - - localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - std::shared_ptr localVarMultipart(new MultipartFormData); - - if(updateLiveActivityRequest.get()) - { - updateLiveActivityRequest->toMultipart(localVarMultipart, utility::conversions::to_string_t("updateLiveActivityRequest")); - } - - - localVarHttpBody = localVarMultipart; - localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -4741,12 +3728,12 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->updateLiveActivity does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->unsubscribeEmailWithToken does not consume any supported media type")); } - // authentication (app_key) required + // authentication (rest_api_key) required // Basic authentication is added automatically as part of the http_client_config - utility::string_t localVarBearerKey = localVarApiConfiguration->getBearerToken(utility::conversions::to_string_t("app_key")); + utility::string_t localVarBearerKey = localVarApiConfiguration->getBearerToken(utility::conversions::to_string_t("rest_api_key")); if ( localVarBearerKey.size() > 0 ) { localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = @@ -4755,7 +3742,7 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit // Adds a telemetry header localVarHeaderParams[utility::conversions::to_string_t("OS-Usage-Data")] = - utility::conversions::to_string_t("kind=sdk, sdk-name=onesignal-cpp, version=2.2.0"); + utility::conversions::to_string_t("kind=sdk, sdk-name=onesignal-cpp, version=5.0.0-beta1"); return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=](web::http::http_response localVarResponse) @@ -4773,7 +3760,7 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling updateLiveActivity: ") + localVarResponse.to_string() + , utility::conversions::to_string_t("error calling unsubscribeEmailWithToken: ") + localVarResponse.to_string() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -4784,7 +3771,7 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling updateLiveActivity: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling unsubscribeEmailWithToken: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -4793,7 +3780,7 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit }) .then([=](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new UpdateLiveActivitySuccessResponse()); + std::shared_ptr localVarResult(new GenericSuccessBoolResponse()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -4808,25 +3795,25 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit else { throw ApiException(500 - , utility::conversions::to_string_t("error calling updateLiveActivity: unsupported response type")); + , utility::conversions::to_string_t("error calling unsubscribeEmailWithToken: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::updatePlayer(utility::string_t playerId, std::shared_ptr player) const +pplx::task> DefaultApi::updateApp(utility::string_t appId, std::shared_ptr app) const { - // verify the required parameter 'player' is set - if (player == nullptr) + // verify the required parameter 'app' is set + if (app == nullptr) { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'player' when calling DefaultApi->updatePlayer")); + throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'app' when calling DefaultApi->updateApp")); } std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/players/{player_id}"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("player_id") + utility::conversions::to_string_t("}"), ApiClient::parameterToString(playerId)); + utility::string_t localVarPath = utility::conversions::to_string_t("/apps/{app_id}"); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("app_id") + utility::conversions::to_string_t("}"), ApiClient::parameterToString(appId)); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -4855,7 +3842,7 @@ pplx::task> DefaultApi::updatePlaye } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->updatePlayer does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->updateApp does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -4873,7 +3860,7 @@ pplx::task> DefaultApi::updatePlaye localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); web::json::value localVarJson; - localVarJson = ModelBase::toJson(player); + localVarJson = ModelBase::toJson(app); localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); @@ -4884,9 +3871,9 @@ pplx::task> DefaultApi::updatePlaye localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); std::shared_ptr localVarMultipart(new MultipartFormData); - if(player.get()) + if(app.get()) { - player->toMultipart(localVarMultipart, utility::conversions::to_string_t("player")); + app->toMultipart(localVarMultipart, utility::conversions::to_string_t("app")); } @@ -4899,12 +3886,12 @@ pplx::task> DefaultApi::updatePlaye } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->updatePlayer does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->updateApp does not consume any supported media type")); } - // authentication (app_key) required + // authentication (user_auth_key) required // Basic authentication is added automatically as part of the http_client_config - utility::string_t localVarBearerKey = localVarApiConfiguration->getBearerToken(utility::conversions::to_string_t("app_key")); + utility::string_t localVarBearerKey = localVarApiConfiguration->getBearerToken(utility::conversions::to_string_t("user_auth_key")); if ( localVarBearerKey.size() > 0 ) { localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = @@ -4913,7 +3900,7 @@ pplx::task> DefaultApi::updatePlaye // Adds a telemetry header localVarHeaderParams[utility::conversions::to_string_t("OS-Usage-Data")] = - utility::conversions::to_string_t("kind=sdk, sdk-name=onesignal-cpp, version=2.2.0"); + utility::conversions::to_string_t("kind=sdk, sdk-name=onesignal-cpp, version=5.0.0-beta1"); return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("PUT"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=](web::http::http_response localVarResponse) @@ -4931,7 +3918,7 @@ pplx::task> DefaultApi::updatePlaye if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling updatePlayer: ") + localVarResponse.to_string() + , utility::conversions::to_string_t("error calling updateApp: ") + localVarResponse.to_string() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -4942,7 +3929,7 @@ pplx::task> DefaultApi::updatePlaye if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling updatePlayer: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling updateApp: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -4951,7 +3938,7 @@ pplx::task> DefaultApi::updatePlaye }) .then([=](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new UpdatePlayerSuccessResponse()); + std::shared_ptr localVarResult(new App()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -4966,20 +3953,26 @@ pplx::task> DefaultApi::updatePlaye else { throw ApiException(500 - , utility::conversions::to_string_t("error calling updatePlayer: unsupported response type")); + , utility::conversions::to_string_t("error calling updateApp: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::updatePlayerTags(utility::string_t appId, utility::string_t externalUserId, boost::optional> updatePlayerTagsRequestBody) const +pplx::task> DefaultApi::updateLiveActivity(utility::string_t appId, utility::string_t activityId, std::shared_ptr updateLiveActivityRequest) const { + // verify the required parameter 'updateLiveActivityRequest' is set + if (updateLiveActivityRequest == nullptr) + { + throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'updateLiveActivityRequest' when calling DefaultApi->updateLiveActivity")); + } + std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/apps/{app_id}/users/{external_user_id}"); + utility::string_t localVarPath = utility::conversions::to_string_t("/apps/{app_id}/live_activities/{activity_id}/notifications"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("app_id") + utility::conversions::to_string_t("}"), ApiClient::parameterToString(appId)); -boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("external_user_id") + utility::conversions::to_string_t("}"), ApiClient::parameterToString(externalUserId)); +boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("activity_id") + utility::conversions::to_string_t("}"), ApiClient::parameterToString(activityId)); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -5008,7 +4001,7 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->updatePlayerTags does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->updateLiveActivity does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -5026,8 +4019,8 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); web::json::value localVarJson; - if (updatePlayerTagsRequestBody) - localVarJson = ModelBase::toJson(*updatePlayerTagsRequestBody); + localVarJson = ModelBase::toJson(updateLiveActivityRequest); + localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } @@ -5037,9 +4030,9 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); std::shared_ptr localVarMultipart(new MultipartFormData); - if(updatePlayerTagsRequestBody && (*updatePlayerTagsRequestBody).get()) + if(updateLiveActivityRequest.get()) { - (*updatePlayerTagsRequestBody)->toMultipart(localVarMultipart, utility::conversions::to_string_t("updatePlayerTagsRequestBody")); + updateLiveActivityRequest->toMultipart(localVarMultipart, utility::conversions::to_string_t("updateLiveActivityRequest")); } @@ -5052,12 +4045,12 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->updatePlayerTags does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->updateLiveActivity does not consume any supported media type")); } - // authentication (app_key) required + // authentication (rest_api_key) required // Basic authentication is added automatically as part of the http_client_config - utility::string_t localVarBearerKey = localVarApiConfiguration->getBearerToken(utility::conversions::to_string_t("app_key")); + utility::string_t localVarBearerKey = localVarApiConfiguration->getBearerToken(utility::conversions::to_string_t("rest_api_key")); if ( localVarBearerKey.size() > 0 ) { localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = @@ -5066,9 +4059,9 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit // Adds a telemetry header localVarHeaderParams[utility::conversions::to_string_t("OS-Usage-Data")] = - utility::conversions::to_string_t("kind=sdk, sdk-name=onesignal-cpp, version=2.2.0"); + utility::conversions::to_string_t("kind=sdk, sdk-name=onesignal-cpp, version=5.0.0-beta1"); - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("PUT"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -5084,7 +4077,7 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling updatePlayerTags: ") + localVarResponse.to_string() + , utility::conversions::to_string_t("error calling updateLiveActivity: ") + localVarResponse.to_string() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -5095,7 +4088,7 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling updatePlayerTags: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling updateLiveActivity: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -5104,7 +4097,7 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit }) .then([=](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new UpdatePlayerTagsSuccessResponse()); + std::shared_ptr localVarResult(new UpdateLiveActivitySuccessResponse()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -5119,19 +4112,19 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit else { throw ApiException(500 - , utility::conversions::to_string_t("error calling updatePlayerTags: unsupported response type")); + , utility::conversions::to_string_t("error calling updateLiveActivity: unsupported response type")); } return localVarResult; }); } -pplx::task DefaultApi::updateSubscription(utility::string_t appId, utility::string_t subscriptionId, std::shared_ptr updateSubscriptionRequestBody) const +pplx::task DefaultApi::updateSubscription(utility::string_t appId, utility::string_t subscriptionId, std::shared_ptr subscriptionBody) const { - // verify the required parameter 'updateSubscriptionRequestBody' is set - if (updateSubscriptionRequestBody == nullptr) + // verify the required parameter 'subscriptionBody' is set + if (subscriptionBody == nullptr) { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'updateSubscriptionRequestBody' when calling DefaultApi->updateSubscription")); + throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'subscriptionBody' when calling DefaultApi->updateSubscription")); } @@ -5185,7 +4178,7 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); web::json::value localVarJson; - localVarJson = ModelBase::toJson(updateSubscriptionRequestBody); + localVarJson = ModelBase::toJson(subscriptionBody); localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); @@ -5196,9 +4189,9 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); std::shared_ptr localVarMultipart(new MultipartFormData); - if(updateSubscriptionRequestBody.get()) + if(subscriptionBody.get()) { - updateSubscriptionRequestBody->toMultipart(localVarMultipart, utility::conversions::to_string_t("updateSubscriptionRequestBody")); + subscriptionBody->toMultipart(localVarMultipart, utility::conversions::to_string_t("subscriptionBody")); } @@ -5214,9 +4207,9 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit throw ApiException(415, utility::conversions::to_string_t("DefaultApi->updateSubscription does not consume any supported media type")); } - // authentication (app_key) required + // authentication (rest_api_key) required // Basic authentication is added automatically as part of the http_client_config - utility::string_t localVarBearerKey = localVarApiConfiguration->getBearerToken(utility::conversions::to_string_t("app_key")); + utility::string_t localVarBearerKey = localVarApiConfiguration->getBearerToken(utility::conversions::to_string_t("rest_api_key")); if ( localVarBearerKey.size() > 0 ) { localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = @@ -5225,7 +4218,7 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit // Adds a telemetry header localVarHeaderParams[utility::conversions::to_string_t("OS-Usage-Data")] = - utility::conversions::to_string_t("kind=sdk, sdk-name=onesignal-cpp, version=2.2.0"); + utility::conversions::to_string_t("kind=sdk, sdk-name=onesignal-cpp, version=5.0.0-beta1"); return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("PATCH"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=](web::http::http_response localVarResponse) @@ -5266,7 +4259,7 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit return void(); }); } -pplx::task> DefaultApi::updateUser(utility::string_t appId, utility::string_t aliasLabel, utility::string_t aliasId, std::shared_ptr updateUserRequest) const +pplx::task> DefaultApi::updateUser(utility::string_t appId, utility::string_t aliasLabel, utility::string_t aliasId, std::shared_ptr updateUserRequest) const { // verify the required parameter 'updateUserRequest' is set @@ -5356,9 +4349,9 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit throw ApiException(415, utility::conversions::to_string_t("DefaultApi->updateUser does not consume any supported media type")); } - // authentication (app_key) required + // authentication (rest_api_key) required // Basic authentication is added automatically as part of the http_client_config - utility::string_t localVarBearerKey = localVarApiConfiguration->getBearerToken(utility::conversions::to_string_t("app_key")); + utility::string_t localVarBearerKey = localVarApiConfiguration->getBearerToken(utility::conversions::to_string_t("rest_api_key")); if ( localVarBearerKey.size() > 0 ) { localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = @@ -5367,7 +4360,7 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit // Adds a telemetry header localVarHeaderParams[utility::conversions::to_string_t("OS-Usage-Data")] = - utility::conversions::to_string_t("kind=sdk, sdk-name=onesignal-cpp, version=2.2.0"); + utility::conversions::to_string_t("kind=sdk, sdk-name=onesignal-cpp, version=5.0.0-beta1"); return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("PATCH"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=](web::http::http_response localVarResponse) @@ -5405,7 +4398,7 @@ boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utilit }) .then([=](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new Inline_response_202()); + std::shared_ptr localVarResult(new PropertiesBody()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { diff --git a/src/api/DefaultApiGMock.h b/src/api/DefaultApiGMock.h index 59032ca..9548588 100644 --- a/src/api/DefaultApiGMock.h +++ b/src/api/DefaultApiGMock.h @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. @@ -34,14 +34,20 @@ class DefaultApiMock : public IDefaultApi explicit DefaultApiMock( std::shared_ptr apiClient ) { }; ~DefaultApiMock() override = default; - MOCK_METHOD3( beginLiveActivity, pplx::task ( + MOCK_METHOD2( cancelNotification, pplx::task> ( utility::string_t appId, - utility::string_t activityId, - std::shared_ptr beginLiveActivityRequest + utility::string_t notificationId ) ); - MOCK_METHOD2( cancelNotification, pplx::task> ( + MOCK_METHOD4( createAlias, pplx::task> ( utility::string_t appId, - utility::string_t notificationId + utility::string_t aliasLabel, + utility::string_t aliasId, + std::shared_ptr userIdentityBody + ) ); + MOCK_METHOD3( createAliasBySubscription, pplx::task> ( + utility::string_t appId, + utility::string_t subscriptionId, + std::shared_ptr userIdentityBody ) ); MOCK_METHOD1( createApp, pplx::task> ( std::shared_ptr app @@ -49,34 +55,27 @@ class DefaultApiMock : public IDefaultApi MOCK_METHOD1( createNotification, pplx::task> ( std::shared_ptr notification ) ); - MOCK_METHOD1( createPlayer, pplx::task> ( - std::shared_ptr player - ) ); - MOCK_METHOD2( createSegments, pplx::task> ( + MOCK_METHOD2( createSegment, pplx::task> ( utility::string_t appId, boost::optional> segment ) ); - MOCK_METHOD4( createSubscription, pplx::task> ( + MOCK_METHOD4( createSubscription, pplx::task> ( utility::string_t appId, utility::string_t aliasLabel, utility::string_t aliasId, - std::shared_ptr createSubscriptionRequestBody + std::shared_ptr subscriptionBody ) ); MOCK_METHOD2( createUser, pplx::task> ( utility::string_t appId, std::shared_ptr user ) ); - MOCK_METHOD4( deleteAlias, pplx::task> ( + MOCK_METHOD4( deleteAlias, pplx::task> ( utility::string_t appId, utility::string_t aliasLabel, utility::string_t aliasId, utility::string_t aliasLabelToDelete ) ); - MOCK_METHOD2( deletePlayer, pplx::task> ( - utility::string_t appId, - utility::string_t playerId - ) ); - MOCK_METHOD2( deleteSegments, pplx::task> ( + MOCK_METHOD2( deleteSegment, pplx::task> ( utility::string_t appId, utility::string_t segmentId ) ); @@ -89,49 +88,35 @@ class DefaultApiMock : public IDefaultApi utility::string_t aliasLabel, utility::string_t aliasId ) ); - MOCK_METHOD3( endLiveActivity, pplx::task ( - utility::string_t appId, - utility::string_t activityId, - utility::string_t subscriptionId - ) ); MOCK_METHOD2( exportEvents, pplx::task> ( utility::string_t notificationId, utility::string_t appId ) ); - MOCK_METHOD2( exportPlayers, pplx::task> ( + MOCK_METHOD2( exportSubscriptions, pplx::task> ( utility::string_t appId, - boost::optional> exportPlayersRequestBody + boost::optional> exportSubscriptionsRequestBody ) ); - MOCK_METHOD2( fetchAliases, pplx::task> ( - utility::string_t appId, - utility::string_t subscriptionId - ) ); - MOCK_METHOD3( fetchUser, pplx::task> ( + MOCK_METHOD3( getAliases, pplx::task> ( utility::string_t appId, utility::string_t aliasLabel, utility::string_t aliasId ) ); - MOCK_METHOD3( fetchUserIdentity, pplx::task> ( + MOCK_METHOD2( getAliasesBySubscription, pplx::task> ( utility::string_t appId, - utility::string_t aliasLabel, - utility::string_t aliasId + utility::string_t subscriptionId ) ); MOCK_METHOD1( getApp, pplx::task> ( utility::string_t appId ) ); MOCK_METHOD0( getApps, pplx::task>> ( ) ); - MOCK_METHOD2( getEligibleIams, pplx::task> ( - utility::string_t appId, - utility::string_t subscriptionId - ) ); MOCK_METHOD2( getNotification, pplx::task> ( utility::string_t appId, utility::string_t notificationId ) ); MOCK_METHOD2( getNotificationHistory, pplx::task> ( utility::string_t notificationId, - std::shared_ptr getNotificationRequestBody + std::shared_ptr getNotificationHistoryRequestBody ) ); MOCK_METHOD4( getNotifications, pplx::task> ( utility::string_t appId, @@ -147,31 +132,25 @@ class DefaultApiMock : public IDefaultApi boost::optional outcomePlatforms, boost::optional outcomeAttribution ) ); - MOCK_METHOD3( getPlayer, pplx::task> ( + MOCK_METHOD3( getSegments, pplx::task> ( utility::string_t appId, - utility::string_t playerId, - boost::optional emailAuthHash - ) ); - MOCK_METHOD3( getPlayers, pplx::task> ( - utility::string_t appId, - boost::optional limit, - boost::optional offset + boost::optional offset, + boost::optional limit ) ); - MOCK_METHOD4( identifyUserByAlias, pplx::task> ( + MOCK_METHOD3( getUser, pplx::task> ( utility::string_t appId, utility::string_t aliasLabel, - utility::string_t aliasId, - std::shared_ptr userIdentityRequestBody + utility::string_t aliasId ) ); - MOCK_METHOD3( identifyUserBySubscriptionId, pplx::task> ( + MOCK_METHOD3( transferSubscription, pplx::task> ( utility::string_t appId, utility::string_t subscriptionId, - std::shared_ptr userIdentityRequestBody + std::shared_ptr transferSubscriptionRequestBody ) ); - MOCK_METHOD3( transferSubscription, pplx::task> ( + MOCK_METHOD3( unsubscribeEmailWithToken, pplx::task> ( utility::string_t appId, - utility::string_t subscriptionId, - std::shared_ptr transferSubscriptionRequestBody + utility::string_t notificationId, + utility::string_t token ) ); MOCK_METHOD2( updateApp, pplx::task> ( utility::string_t appId, @@ -182,21 +161,12 @@ class DefaultApiMock : public IDefaultApi utility::string_t activityId, std::shared_ptr updateLiveActivityRequest ) ); - MOCK_METHOD2( updatePlayer, pplx::task> ( - utility::string_t playerId, - std::shared_ptr player - ) ); - MOCK_METHOD3( updatePlayerTags, pplx::task> ( - utility::string_t appId, - utility::string_t externalUserId, - boost::optional> updatePlayerTagsRequestBody - ) ); MOCK_METHOD3( updateSubscription, pplx::task ( utility::string_t appId, utility::string_t subscriptionId, - std::shared_ptr updateSubscriptionRequestBody + std::shared_ptr subscriptionBody ) ); - MOCK_METHOD4( updateUser, pplx::task> ( + MOCK_METHOD4( updateUser, pplx::task> ( utility::string_t appId, utility::string_t aliasLabel, utility::string_t aliasId, diff --git a/src/model/App.cpp b/src/model/App.cpp index 192a2a9..89a16dc 100644 --- a/src/model/App.cpp +++ b/src/model/App.cpp @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. diff --git a/src/model/BasicNotification.cpp b/src/model/BasicNotification.cpp index fb3ebda..d8b040f 100644 --- a/src/model/BasicNotification.cpp +++ b/src/model/BasicNotification.cpp @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. @@ -25,8 +25,7 @@ BasicNotification::BasicNotification() { m_Included_segmentsIsSet = false; m_Excluded_segmentsIsSet = false; - m_Include_player_idsIsSet = false; - m_Include_external_user_idsIsSet = false; + m_Include_subscription_idsIsSet = false; m_Include_email_tokensIsSet = false; m_Include_phone_numbersIsSet = false; m_Include_ios_tokensIsSet = false; @@ -66,8 +65,6 @@ BasicNotification::BasicNotification() m_IsAdmIsSet = false; m_IsChrome = false; m_IsChromeIsSet = false; - m_Channel_for_external_user_ids = utility::conversions::to_string_t(""); - m_Channel_for_external_user_idsIsSet = false; m_App_id = utility::conversions::to_string_t(""); m_App_idIsSet = false; m_External_id = utility::conversions::to_string_t(""); @@ -194,6 +191,10 @@ BasicNotification::BasicNotification() m_Summary_argIsSet = false; m_Summary_arg_count = 0; m_Summary_arg_countIsSet = false; + m_Ios_relevance_score = 0.0; + m_Ios_relevance_scoreIsSet = false; + m_Ios_interruption_level = utility::conversions::to_string_t(""); + m_Ios_interruption_levelIsSet = false; m_Email_subject = utility::conversions::to_string_t(""); m_Email_subjectIsSet = false; m_Email_body = utility::conversions::to_string_t(""); @@ -235,13 +236,9 @@ web::json::value BasicNotification::toJson() const { val[utility::conversions::to_string_t(U("excluded_segments"))] = ModelBase::toJson(m_Excluded_segments); } - if(m_Include_player_idsIsSet) + if(m_Include_subscription_idsIsSet) { - val[utility::conversions::to_string_t(U("include_player_ids"))] = ModelBase::toJson(m_Include_player_ids); - } - if(m_Include_external_user_idsIsSet) - { - val[utility::conversions::to_string_t(U("include_external_user_ids"))] = ModelBase::toJson(m_Include_external_user_ids); + val[utility::conversions::to_string_t(U("include_subscription_ids"))] = ModelBase::toJson(m_Include_subscription_ids); } if(m_Include_email_tokensIsSet) { @@ -339,10 +336,6 @@ web::json::value BasicNotification::toJson() const { val[utility::conversions::to_string_t(U("isChrome"))] = ModelBase::toJson(m_IsChrome); } - if(m_Channel_for_external_user_idsIsSet) - { - val[utility::conversions::to_string_t(U("channel_for_external_user_ids"))] = ModelBase::toJson(m_Channel_for_external_user_ids); - } if(m_App_idIsSet) { val[utility::conversions::to_string_t(U("app_id"))] = ModelBase::toJson(m_App_id); @@ -615,6 +608,14 @@ web::json::value BasicNotification::toJson() const { val[utility::conversions::to_string_t(U("summary_arg_count"))] = ModelBase::toJson(m_Summary_arg_count); } + if(m_Ios_relevance_scoreIsSet) + { + val[utility::conversions::to_string_t(U("ios_relevance_score"))] = ModelBase::toJson(m_Ios_relevance_score); + } + if(m_Ios_interruption_levelIsSet) + { + val[utility::conversions::to_string_t(U("ios_interruption_level"))] = ModelBase::toJson(m_Ios_interruption_level); + } if(m_Email_subjectIsSet) { val[utility::conversions::to_string_t(U("email_subject"))] = ModelBase::toJson(m_Email_subject); @@ -683,24 +684,14 @@ bool BasicNotification::fromJson(const web::json::value& val) setExcludedSegments(refVal_setExcludedSegments); } } - if(val.has_field(utility::conversions::to_string_t(U("include_player_ids")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("include_player_ids"))); - if(!fieldValue.is_null()) - { - std::vector refVal_setIncludePlayerIds; - ok &= ModelBase::fromJson(fieldValue, refVal_setIncludePlayerIds); - setIncludePlayerIds(refVal_setIncludePlayerIds); - } - } - if(val.has_field(utility::conversions::to_string_t(U("include_external_user_ids")))) + if(val.has_field(utility::conversions::to_string_t(U("include_subscription_ids")))) { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("include_external_user_ids"))); + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("include_subscription_ids"))); if(!fieldValue.is_null()) { - std::vector refVal_setIncludeExternalUserIds; - ok &= ModelBase::fromJson(fieldValue, refVal_setIncludeExternalUserIds); - setIncludeExternalUserIds(refVal_setIncludeExternalUserIds); + std::vector refVal_setIncludeSubscriptionIds; + ok &= ModelBase::fromJson(fieldValue, refVal_setIncludeSubscriptionIds); + setIncludeSubscriptionIds(refVal_setIncludeSubscriptionIds); } } if(val.has_field(utility::conversions::to_string_t(U("include_email_tokens")))) @@ -788,7 +779,7 @@ bool BasicNotification::fromJson(const web::json::value& val) const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("include_aliases"))); if(!fieldValue.is_null()) { - std::shared_ptr refVal_setIncludeAliases; + std::map refVal_setIncludeAliases; ok &= ModelBase::fromJson(fieldValue, refVal_setIncludeAliases); setIncludeAliases(refVal_setIncludeAliases); } @@ -943,16 +934,6 @@ bool BasicNotification::fromJson(const web::json::value& val) setIsChrome(refVal_setIsChrome); } } - if(val.has_field(utility::conversions::to_string_t(U("channel_for_external_user_ids")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("channel_for_external_user_ids"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setChannelForExternalUserIds; - ok &= ModelBase::fromJson(fieldValue, refVal_setChannelForExternalUserIds); - setChannelForExternalUserIds(refVal_setChannelForExternalUserIds); - } - } if(val.has_field(utility::conversions::to_string_t(U("app_id")))) { const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("app_id"))); @@ -988,7 +969,7 @@ bool BasicNotification::fromJson(const web::json::value& val) const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("contents"))); if(!fieldValue.is_null()) { - std::shared_ptr refVal_setContents; + std::shared_ptr refVal_setContents; ok &= ModelBase::fromJson(fieldValue, refVal_setContents); setContents(refVal_setContents); } @@ -998,7 +979,7 @@ bool BasicNotification::fromJson(const web::json::value& val) const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("headings"))); if(!fieldValue.is_null()) { - std::shared_ptr refVal_setHeadings; + std::shared_ptr refVal_setHeadings; ok &= ModelBase::fromJson(fieldValue, refVal_setHeadings); setHeadings(refVal_setHeadings); } @@ -1008,7 +989,7 @@ bool BasicNotification::fromJson(const web::json::value& val) const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("subtitle"))); if(!fieldValue.is_null()) { - std::shared_ptr refVal_setSubtitle; + std::shared_ptr refVal_setSubtitle; ok &= ModelBase::fromJson(fieldValue, refVal_setSubtitle); setSubtitle(refVal_setSubtitle); } @@ -1178,7 +1159,7 @@ bool BasicNotification::fromJson(const web::json::value& val) const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("web_buttons"))); if(!fieldValue.is_null()) { - std::vector> refVal_setWebButtons; + std::vector> refVal_setWebButtons; ok &= ModelBase::fromJson(fieldValue, refVal_setWebButtons); setWebButtons(refVal_setWebButtons); } @@ -1633,6 +1614,26 @@ bool BasicNotification::fromJson(const web::json::value& val) setSummaryArgCount(refVal_setSummaryArgCount); } } + if(val.has_field(utility::conversions::to_string_t(U("ios_relevance_score")))) + { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("ios_relevance_score"))); + if(!fieldValue.is_null()) + { + double refVal_setIosRelevanceScore; + ok &= ModelBase::fromJson(fieldValue, refVal_setIosRelevanceScore); + setIosRelevanceScore(refVal_setIosRelevanceScore); + } + } + if(val.has_field(utility::conversions::to_string_t(U("ios_interruption_level")))) + { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("ios_interruption_level"))); + if(!fieldValue.is_null()) + { + utility::string_t refVal_setIosInterruptionLevel; + ok &= ModelBase::fromJson(fieldValue, refVal_setIosInterruptionLevel); + setIosInterruptionLevel(refVal_setIosInterruptionLevel); + } + } if(val.has_field(utility::conversions::to_string_t(U("email_subject")))) { const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("email_subject"))); @@ -1718,7 +1719,7 @@ bool BasicNotification::fromJson(const web::json::value& val) const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("filters"))); if(!fieldValue.is_null()) { - std::vector> refVal_setFilters; + std::vector> refVal_setFilters; ok &= ModelBase::fromJson(fieldValue, refVal_setFilters); setFilters(refVal_setFilters); } @@ -1751,13 +1752,9 @@ void BasicNotification::toMultipart(std::shared_ptr multipart { multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("excluded_segments")), m_Excluded_segments)); } - if(m_Include_player_idsIsSet) + if(m_Include_subscription_idsIsSet) { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("include_player_ids")), m_Include_player_ids)); - } - if(m_Include_external_user_idsIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("include_external_user_ids")), m_Include_external_user_ids)); + multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("include_subscription_ids")), m_Include_subscription_ids)); } if(m_Include_email_tokensIsSet) { @@ -1855,10 +1852,6 @@ void BasicNotification::toMultipart(std::shared_ptr multipart { multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("isChrome")), m_IsChrome)); } - if(m_Channel_for_external_user_idsIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("channel_for_external_user_ids")), m_Channel_for_external_user_ids)); - } if(m_App_idIsSet) { multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("app_id")), m_App_id)); @@ -2131,6 +2124,14 @@ void BasicNotification::toMultipart(std::shared_ptr multipart { multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("summary_arg_count")), m_Summary_arg_count)); } + if(m_Ios_relevance_scoreIsSet) + { + multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("ios_relevance_score")), m_Ios_relevance_score)); + } + if(m_Ios_interruption_levelIsSet) + { + multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("ios_interruption_level")), m_Ios_interruption_level)); + } if(m_Email_subjectIsSet) { multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("email_subject")), m_Email_subject)); @@ -2194,17 +2195,11 @@ bool BasicNotification::fromMultiPart(std::shared_ptr multipa ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("excluded_segments"))), refVal_setExcludedSegments ); setExcludedSegments(refVal_setExcludedSegments); } - if(multipart->hasContent(utility::conversions::to_string_t(U("include_player_ids")))) + if(multipart->hasContent(utility::conversions::to_string_t(U("include_subscription_ids")))) { - std::vector refVal_setIncludePlayerIds; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("include_player_ids"))), refVal_setIncludePlayerIds ); - setIncludePlayerIds(refVal_setIncludePlayerIds); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("include_external_user_ids")))) - { - std::vector refVal_setIncludeExternalUserIds; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("include_external_user_ids"))), refVal_setIncludeExternalUserIds ); - setIncludeExternalUserIds(refVal_setIncludeExternalUserIds); + std::vector refVal_setIncludeSubscriptionIds; + ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("include_subscription_ids"))), refVal_setIncludeSubscriptionIds ); + setIncludeSubscriptionIds(refVal_setIncludeSubscriptionIds); } if(multipart->hasContent(utility::conversions::to_string_t(U("include_email_tokens")))) { @@ -2256,7 +2251,7 @@ bool BasicNotification::fromMultiPart(std::shared_ptr multipa } if(multipart->hasContent(utility::conversions::to_string_t(U("include_aliases")))) { - std::shared_ptr refVal_setIncludeAliases; + std::map refVal_setIncludeAliases; ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("include_aliases"))), refVal_setIncludeAliases ); setIncludeAliases(refVal_setIncludeAliases); } @@ -2350,12 +2345,6 @@ bool BasicNotification::fromMultiPart(std::shared_ptr multipa ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("isChrome"))), refVal_setIsChrome ); setIsChrome(refVal_setIsChrome); } - if(multipart->hasContent(utility::conversions::to_string_t(U("channel_for_external_user_ids")))) - { - utility::string_t refVal_setChannelForExternalUserIds; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("channel_for_external_user_ids"))), refVal_setChannelForExternalUserIds ); - setChannelForExternalUserIds(refVal_setChannelForExternalUserIds); - } if(multipart->hasContent(utility::conversions::to_string_t(U("app_id")))) { utility::string_t refVal_setAppId; @@ -2376,19 +2365,19 @@ bool BasicNotification::fromMultiPart(std::shared_ptr multipa } if(multipart->hasContent(utility::conversions::to_string_t(U("contents")))) { - std::shared_ptr refVal_setContents; + std::shared_ptr refVal_setContents; ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("contents"))), refVal_setContents ); setContents(refVal_setContents); } if(multipart->hasContent(utility::conversions::to_string_t(U("headings")))) { - std::shared_ptr refVal_setHeadings; + std::shared_ptr refVal_setHeadings; ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("headings"))), refVal_setHeadings ); setHeadings(refVal_setHeadings); } if(multipart->hasContent(utility::conversions::to_string_t(U("subtitle")))) { - std::shared_ptr refVal_setSubtitle; + std::shared_ptr refVal_setSubtitle; ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("subtitle"))), refVal_setSubtitle ); setSubtitle(refVal_setSubtitle); } @@ -2490,7 +2479,7 @@ bool BasicNotification::fromMultiPart(std::shared_ptr multipa } if(multipart->hasContent(utility::conversions::to_string_t(U("web_buttons")))) { - std::vector> refVal_setWebButtons; + std::vector> refVal_setWebButtons; ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("web_buttons"))), refVal_setWebButtons ); setWebButtons(refVal_setWebButtons); } @@ -2764,6 +2753,18 @@ bool BasicNotification::fromMultiPart(std::shared_ptr multipa ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("summary_arg_count"))), refVal_setSummaryArgCount ); setSummaryArgCount(refVal_setSummaryArgCount); } + if(multipart->hasContent(utility::conversions::to_string_t(U("ios_relevance_score")))) + { + double refVal_setIosRelevanceScore; + ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("ios_relevance_score"))), refVal_setIosRelevanceScore ); + setIosRelevanceScore(refVal_setIosRelevanceScore); + } + if(multipart->hasContent(utility::conversions::to_string_t(U("ios_interruption_level")))) + { + utility::string_t refVal_setIosInterruptionLevel; + ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("ios_interruption_level"))), refVal_setIosInterruptionLevel ); + setIosInterruptionLevel(refVal_setIosInterruptionLevel); + } if(multipart->hasContent(utility::conversions::to_string_t(U("email_subject")))) { utility::string_t refVal_setEmailSubject; @@ -2814,7 +2815,7 @@ bool BasicNotification::fromMultiPart(std::shared_ptr multipa } if(multipart->hasContent(utility::conversions::to_string_t(U("filters")))) { - std::vector> refVal_setFilters; + std::vector> refVal_setFilters; ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("filters"))), refVal_setFilters ); setFilters(refVal_setFilters); } @@ -2867,45 +2868,25 @@ void BasicNotification::unsetExcluded_segments() { m_Excluded_segmentsIsSet = false; } -std::vector& BasicNotification::getIncludePlayerIds() +std::vector& BasicNotification::getIncludeSubscriptionIds() { - return m_Include_player_ids; + return m_Include_subscription_ids; } -void BasicNotification::setIncludePlayerIds(const std::vector& value) +void BasicNotification::setIncludeSubscriptionIds(const std::vector& value) { - m_Include_player_ids = value; - m_Include_player_idsIsSet = true; + m_Include_subscription_ids = value; + m_Include_subscription_idsIsSet = true; } -bool BasicNotification::includePlayerIdsIsSet() const +bool BasicNotification::includeSubscriptionIdsIsSet() const { - return m_Include_player_idsIsSet; + return m_Include_subscription_idsIsSet; } -void BasicNotification::unsetInclude_player_ids() +void BasicNotification::unsetInclude_subscription_ids() { - m_Include_player_idsIsSet = false; -} -std::vector& BasicNotification::getIncludeExternalUserIds() -{ - return m_Include_external_user_ids; -} - -void BasicNotification::setIncludeExternalUserIds(const std::vector& value) -{ - m_Include_external_user_ids = value; - m_Include_external_user_idsIsSet = true; -} - -bool BasicNotification::includeExternalUserIdsIsSet() const -{ - return m_Include_external_user_idsIsSet; -} - -void BasicNotification::unsetInclude_external_user_ids() -{ - m_Include_external_user_idsIsSet = false; + m_Include_subscription_idsIsSet = false; } std::vector& BasicNotification::getIncludeEmailTokens() { @@ -3067,12 +3048,12 @@ void BasicNotification::unsetInclude_android_reg_ids() { m_Include_android_reg_idsIsSet = false; } -std::shared_ptr BasicNotification::getIncludeAliases() const +std::map& BasicNotification::getIncludeAliases() { return m_Include_aliases; } -void BasicNotification::setIncludeAliases(const std::shared_ptr& value) +void BasicNotification::setIncludeAliases(const std::map& value) { m_Include_aliases = value; m_Include_aliasesIsSet = true; @@ -3387,26 +3368,6 @@ void BasicNotification::unsetIsChrome() { m_IsChromeIsSet = false; } -utility::string_t BasicNotification::getChannelForExternalUserIds() const -{ - return m_Channel_for_external_user_ids; -} - -void BasicNotification::setChannelForExternalUserIds(const utility::string_t& value) -{ - m_Channel_for_external_user_ids = value; - m_Channel_for_external_user_idsIsSet = true; -} - -bool BasicNotification::channelForExternalUserIdsIsSet() const -{ - return m_Channel_for_external_user_idsIsSet; -} - -void BasicNotification::unsetChannel_for_external_user_ids() -{ - m_Channel_for_external_user_idsIsSet = false; -} utility::string_t BasicNotification::getAppId() const { return m_App_id; @@ -3467,12 +3428,12 @@ void BasicNotification::unsetIdempotency_key() { m_Idempotency_keyIsSet = false; } -std::shared_ptr BasicNotification::getContents() const +std::shared_ptr BasicNotification::getContents() const { return m_Contents; } -void BasicNotification::setContents(const std::shared_ptr& value) +void BasicNotification::setContents(const std::shared_ptr& value) { m_Contents = value; m_ContentsIsSet = true; @@ -3487,12 +3448,12 @@ void BasicNotification::unsetContents() { m_ContentsIsSet = false; } -std::shared_ptr BasicNotification::getHeadings() const +std::shared_ptr BasicNotification::getHeadings() const { return m_Headings; } -void BasicNotification::setHeadings(const std::shared_ptr& value) +void BasicNotification::setHeadings(const std::shared_ptr& value) { m_Headings = value; m_HeadingsIsSet = true; @@ -3507,12 +3468,12 @@ void BasicNotification::unsetHeadings() { m_HeadingsIsSet = false; } -std::shared_ptr BasicNotification::getSubtitle() const +std::shared_ptr BasicNotification::getSubtitle() const { return m_Subtitle; } -void BasicNotification::setSubtitle(const std::shared_ptr& value) +void BasicNotification::setSubtitle(const std::shared_ptr& value) { m_Subtitle = value; m_SubtitleIsSet = true; @@ -3847,12 +3808,12 @@ void BasicNotification::unsetButtons() { m_ButtonsIsSet = false; } -std::vector>& BasicNotification::getWebButtons() +std::vector>& BasicNotification::getWebButtons() { return m_Web_buttons; } -void BasicNotification::setWebButtons(const std::vector>& value) +void BasicNotification::setWebButtons(const std::vector>& value) { m_Web_buttons = value; m_Web_buttonsIsSet = true; @@ -4767,6 +4728,46 @@ void BasicNotification::unsetSummary_arg_count() { m_Summary_arg_countIsSet = false; } +double BasicNotification::getIosRelevanceScore() const +{ + return m_Ios_relevance_score; +} + +void BasicNotification::setIosRelevanceScore(double value) +{ + m_Ios_relevance_score = value; + m_Ios_relevance_scoreIsSet = true; +} + +bool BasicNotification::iosRelevanceScoreIsSet() const +{ + return m_Ios_relevance_scoreIsSet; +} + +void BasicNotification::unsetIos_relevance_score() +{ + m_Ios_relevance_scoreIsSet = false; +} +utility::string_t BasicNotification::getIosInterruptionLevel() const +{ + return m_Ios_interruption_level; +} + +void BasicNotification::setIosInterruptionLevel(const utility::string_t& value) +{ + m_Ios_interruption_level = value; + m_Ios_interruption_levelIsSet = true; +} + +bool BasicNotification::iosInterruptionLevelIsSet() const +{ + return m_Ios_interruption_levelIsSet; +} + +void BasicNotification::unsetIos_interruption_level() +{ + m_Ios_interruption_levelIsSet = false; +} utility::string_t BasicNotification::getEmailSubject() const { return m_Email_subject; @@ -4927,12 +4928,12 @@ void BasicNotification::unsetSms_media_urls() { m_Sms_media_urlsIsSet = false; } -std::vector>& BasicNotification::getFilters() +std::vector>& BasicNotification::getFilters() { return m_Filters; } -void BasicNotification::setFilters(const std::vector>& value) +void BasicNotification::setFilters(const std::vector>& value) { m_Filters = value; m_FiltersIsSet = true; diff --git a/src/model/BasicNotification_allOf.cpp b/src/model/BasicNotification_allOf.cpp index 5bb688f..c775f3b 100644 --- a/src/model/BasicNotification_allOf.cpp +++ b/src/model/BasicNotification_allOf.cpp @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. @@ -51,8 +51,6 @@ BasicNotification_allOf::BasicNotification_allOf() m_IsAdmIsSet = false; m_IsChrome = false; m_IsChromeIsSet = false; - m_Channel_for_external_user_ids = utility::conversions::to_string_t(""); - m_Channel_for_external_user_idsIsSet = false; m_App_id = utility::conversions::to_string_t(""); m_App_idIsSet = false; m_External_id = utility::conversions::to_string_t(""); @@ -179,6 +177,10 @@ BasicNotification_allOf::BasicNotification_allOf() m_Summary_argIsSet = false; m_Summary_arg_count = 0; m_Summary_arg_countIsSet = false; + m_Ios_relevance_score = 0.0; + m_Ios_relevance_scoreIsSet = false; + m_Ios_interruption_level = utility::conversions::to_string_t(""); + m_Ios_interruption_levelIsSet = false; m_Email_subject = utility::conversions::to_string_t(""); m_Email_subjectIsSet = false; m_Email_body = utility::conversions::to_string_t(""); @@ -268,10 +270,6 @@ web::json::value BasicNotification_allOf::toJson() const { val[utility::conversions::to_string_t(U("isChrome"))] = ModelBase::toJson(m_IsChrome); } - if(m_Channel_for_external_user_idsIsSet) - { - val[utility::conversions::to_string_t(U("channel_for_external_user_ids"))] = ModelBase::toJson(m_Channel_for_external_user_ids); - } if(m_App_idIsSet) { val[utility::conversions::to_string_t(U("app_id"))] = ModelBase::toJson(m_App_id); @@ -544,6 +542,14 @@ web::json::value BasicNotification_allOf::toJson() const { val[utility::conversions::to_string_t(U("summary_arg_count"))] = ModelBase::toJson(m_Summary_arg_count); } + if(m_Ios_relevance_scoreIsSet) + { + val[utility::conversions::to_string_t(U("ios_relevance_score"))] = ModelBase::toJson(m_Ios_relevance_score); + } + if(m_Ios_interruption_levelIsSet) + { + val[utility::conversions::to_string_t(U("ios_interruption_level"))] = ModelBase::toJson(m_Ios_interruption_level); + } if(m_Email_subjectIsSet) { val[utility::conversions::to_string_t(U("email_subject"))] = ModelBase::toJson(m_Email_subject); @@ -732,16 +738,6 @@ bool BasicNotification_allOf::fromJson(const web::json::value& val) setIsChrome(refVal_setIsChrome); } } - if(val.has_field(utility::conversions::to_string_t(U("channel_for_external_user_ids")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("channel_for_external_user_ids"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setChannelForExternalUserIds; - ok &= ModelBase::fromJson(fieldValue, refVal_setChannelForExternalUserIds); - setChannelForExternalUserIds(refVal_setChannelForExternalUserIds); - } - } if(val.has_field(utility::conversions::to_string_t(U("app_id")))) { const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("app_id"))); @@ -777,7 +773,7 @@ bool BasicNotification_allOf::fromJson(const web::json::value& val) const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("contents"))); if(!fieldValue.is_null()) { - std::shared_ptr refVal_setContents; + std::shared_ptr refVal_setContents; ok &= ModelBase::fromJson(fieldValue, refVal_setContents); setContents(refVal_setContents); } @@ -787,7 +783,7 @@ bool BasicNotification_allOf::fromJson(const web::json::value& val) const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("headings"))); if(!fieldValue.is_null()) { - std::shared_ptr refVal_setHeadings; + std::shared_ptr refVal_setHeadings; ok &= ModelBase::fromJson(fieldValue, refVal_setHeadings); setHeadings(refVal_setHeadings); } @@ -797,7 +793,7 @@ bool BasicNotification_allOf::fromJson(const web::json::value& val) const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("subtitle"))); if(!fieldValue.is_null()) { - std::shared_ptr refVal_setSubtitle; + std::shared_ptr refVal_setSubtitle; ok &= ModelBase::fromJson(fieldValue, refVal_setSubtitle); setSubtitle(refVal_setSubtitle); } @@ -967,7 +963,7 @@ bool BasicNotification_allOf::fromJson(const web::json::value& val) const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("web_buttons"))); if(!fieldValue.is_null()) { - std::vector> refVal_setWebButtons; + std::vector> refVal_setWebButtons; ok &= ModelBase::fromJson(fieldValue, refVal_setWebButtons); setWebButtons(refVal_setWebButtons); } @@ -1422,6 +1418,26 @@ bool BasicNotification_allOf::fromJson(const web::json::value& val) setSummaryArgCount(refVal_setSummaryArgCount); } } + if(val.has_field(utility::conversions::to_string_t(U("ios_relevance_score")))) + { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("ios_relevance_score"))); + if(!fieldValue.is_null()) + { + double refVal_setIosRelevanceScore; + ok &= ModelBase::fromJson(fieldValue, refVal_setIosRelevanceScore); + setIosRelevanceScore(refVal_setIosRelevanceScore); + } + } + if(val.has_field(utility::conversions::to_string_t(U("ios_interruption_level")))) + { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("ios_interruption_level"))); + if(!fieldValue.is_null()) + { + utility::string_t refVal_setIosInterruptionLevel; + ok &= ModelBase::fromJson(fieldValue, refVal_setIosInterruptionLevel); + setIosInterruptionLevel(refVal_setIosInterruptionLevel); + } + } if(val.has_field(utility::conversions::to_string_t(U("email_subject")))) { const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("email_subject"))); @@ -1507,7 +1523,7 @@ bool BasicNotification_allOf::fromJson(const web::json::value& val) const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("filters"))); if(!fieldValue.is_null()) { - std::vector> refVal_setFilters; + std::vector> refVal_setFilters; ok &= ModelBase::fromJson(fieldValue, refVal_setFilters); setFilters(refVal_setFilters); } @@ -1588,10 +1604,6 @@ void BasicNotification_allOf::toMultipart(std::shared_ptr mul { multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("isChrome")), m_IsChrome)); } - if(m_Channel_for_external_user_idsIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("channel_for_external_user_ids")), m_Channel_for_external_user_ids)); - } if(m_App_idIsSet) { multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("app_id")), m_App_id)); @@ -1864,6 +1876,14 @@ void BasicNotification_allOf::toMultipart(std::shared_ptr mul { multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("summary_arg_count")), m_Summary_arg_count)); } + if(m_Ios_relevance_scoreIsSet) + { + multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("ios_relevance_score")), m_Ios_relevance_score)); + } + if(m_Ios_interruption_levelIsSet) + { + multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("ios_interruption_level")), m_Ios_interruption_level)); + } if(m_Email_subjectIsSet) { multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("email_subject")), m_Email_subject)); @@ -1999,12 +2019,6 @@ bool BasicNotification_allOf::fromMultiPart(std::shared_ptr m ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("isChrome"))), refVal_setIsChrome ); setIsChrome(refVal_setIsChrome); } - if(multipart->hasContent(utility::conversions::to_string_t(U("channel_for_external_user_ids")))) - { - utility::string_t refVal_setChannelForExternalUserIds; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("channel_for_external_user_ids"))), refVal_setChannelForExternalUserIds ); - setChannelForExternalUserIds(refVal_setChannelForExternalUserIds); - } if(multipart->hasContent(utility::conversions::to_string_t(U("app_id")))) { utility::string_t refVal_setAppId; @@ -2025,19 +2039,19 @@ bool BasicNotification_allOf::fromMultiPart(std::shared_ptr m } if(multipart->hasContent(utility::conversions::to_string_t(U("contents")))) { - std::shared_ptr refVal_setContents; + std::shared_ptr refVal_setContents; ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("contents"))), refVal_setContents ); setContents(refVal_setContents); } if(multipart->hasContent(utility::conversions::to_string_t(U("headings")))) { - std::shared_ptr refVal_setHeadings; + std::shared_ptr refVal_setHeadings; ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("headings"))), refVal_setHeadings ); setHeadings(refVal_setHeadings); } if(multipart->hasContent(utility::conversions::to_string_t(U("subtitle")))) { - std::shared_ptr refVal_setSubtitle; + std::shared_ptr refVal_setSubtitle; ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("subtitle"))), refVal_setSubtitle ); setSubtitle(refVal_setSubtitle); } @@ -2139,7 +2153,7 @@ bool BasicNotification_allOf::fromMultiPart(std::shared_ptr m } if(multipart->hasContent(utility::conversions::to_string_t(U("web_buttons")))) { - std::vector> refVal_setWebButtons; + std::vector> refVal_setWebButtons; ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("web_buttons"))), refVal_setWebButtons ); setWebButtons(refVal_setWebButtons); } @@ -2413,6 +2427,18 @@ bool BasicNotification_allOf::fromMultiPart(std::shared_ptr m ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("summary_arg_count"))), refVal_setSummaryArgCount ); setSummaryArgCount(refVal_setSummaryArgCount); } + if(multipart->hasContent(utility::conversions::to_string_t(U("ios_relevance_score")))) + { + double refVal_setIosRelevanceScore; + ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("ios_relevance_score"))), refVal_setIosRelevanceScore ); + setIosRelevanceScore(refVal_setIosRelevanceScore); + } + if(multipart->hasContent(utility::conversions::to_string_t(U("ios_interruption_level")))) + { + utility::string_t refVal_setIosInterruptionLevel; + ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("ios_interruption_level"))), refVal_setIosInterruptionLevel ); + setIosInterruptionLevel(refVal_setIosInterruptionLevel); + } if(multipart->hasContent(utility::conversions::to_string_t(U("email_subject")))) { utility::string_t refVal_setEmailSubject; @@ -2463,7 +2489,7 @@ bool BasicNotification_allOf::fromMultiPart(std::shared_ptr m } if(multipart->hasContent(utility::conversions::to_string_t(U("filters")))) { - std::vector> refVal_setFilters; + std::vector> refVal_setFilters; ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("filters"))), refVal_setFilters ); setFilters(refVal_setFilters); } @@ -2756,26 +2782,6 @@ void BasicNotification_allOf::unsetIsChrome() { m_IsChromeIsSet = false; } -utility::string_t BasicNotification_allOf::getChannelForExternalUserIds() const -{ - return m_Channel_for_external_user_ids; -} - -void BasicNotification_allOf::setChannelForExternalUserIds(const utility::string_t& value) -{ - m_Channel_for_external_user_ids = value; - m_Channel_for_external_user_idsIsSet = true; -} - -bool BasicNotification_allOf::channelForExternalUserIdsIsSet() const -{ - return m_Channel_for_external_user_idsIsSet; -} - -void BasicNotification_allOf::unsetChannel_for_external_user_ids() -{ - m_Channel_for_external_user_idsIsSet = false; -} utility::string_t BasicNotification_allOf::getAppId() const { return m_App_id; @@ -2836,12 +2842,12 @@ void BasicNotification_allOf::unsetIdempotency_key() { m_Idempotency_keyIsSet = false; } -std::shared_ptr BasicNotification_allOf::getContents() const +std::shared_ptr BasicNotification_allOf::getContents() const { return m_Contents; } -void BasicNotification_allOf::setContents(const std::shared_ptr& value) +void BasicNotification_allOf::setContents(const std::shared_ptr& value) { m_Contents = value; m_ContentsIsSet = true; @@ -2856,12 +2862,12 @@ void BasicNotification_allOf::unsetContents() { m_ContentsIsSet = false; } -std::shared_ptr BasicNotification_allOf::getHeadings() const +std::shared_ptr BasicNotification_allOf::getHeadings() const { return m_Headings; } -void BasicNotification_allOf::setHeadings(const std::shared_ptr& value) +void BasicNotification_allOf::setHeadings(const std::shared_ptr& value) { m_Headings = value; m_HeadingsIsSet = true; @@ -2876,12 +2882,12 @@ void BasicNotification_allOf::unsetHeadings() { m_HeadingsIsSet = false; } -std::shared_ptr BasicNotification_allOf::getSubtitle() const +std::shared_ptr BasicNotification_allOf::getSubtitle() const { return m_Subtitle; } -void BasicNotification_allOf::setSubtitle(const std::shared_ptr& value) +void BasicNotification_allOf::setSubtitle(const std::shared_ptr& value) { m_Subtitle = value; m_SubtitleIsSet = true; @@ -3216,12 +3222,12 @@ void BasicNotification_allOf::unsetButtons() { m_ButtonsIsSet = false; } -std::vector>& BasicNotification_allOf::getWebButtons() +std::vector>& BasicNotification_allOf::getWebButtons() { return m_Web_buttons; } -void BasicNotification_allOf::setWebButtons(const std::vector>& value) +void BasicNotification_allOf::setWebButtons(const std::vector>& value) { m_Web_buttons = value; m_Web_buttonsIsSet = true; @@ -4136,6 +4142,46 @@ void BasicNotification_allOf::unsetSummary_arg_count() { m_Summary_arg_countIsSet = false; } +double BasicNotification_allOf::getIosRelevanceScore() const +{ + return m_Ios_relevance_score; +} + +void BasicNotification_allOf::setIosRelevanceScore(double value) +{ + m_Ios_relevance_score = value; + m_Ios_relevance_scoreIsSet = true; +} + +bool BasicNotification_allOf::iosRelevanceScoreIsSet() const +{ + return m_Ios_relevance_scoreIsSet; +} + +void BasicNotification_allOf::unsetIos_relevance_score() +{ + m_Ios_relevance_scoreIsSet = false; +} +utility::string_t BasicNotification_allOf::getIosInterruptionLevel() const +{ + return m_Ios_interruption_level; +} + +void BasicNotification_allOf::setIosInterruptionLevel(const utility::string_t& value) +{ + m_Ios_interruption_level = value; + m_Ios_interruption_levelIsSet = true; +} + +bool BasicNotification_allOf::iosInterruptionLevelIsSet() const +{ + return m_Ios_interruption_levelIsSet; +} + +void BasicNotification_allOf::unsetIos_interruption_level() +{ + m_Ios_interruption_levelIsSet = false; +} utility::string_t BasicNotification_allOf::getEmailSubject() const { return m_Email_subject; @@ -4296,12 +4342,12 @@ void BasicNotification_allOf::unsetSms_media_urls() { m_Sms_media_urlsIsSet = false; } -std::vector>& BasicNotification_allOf::getFilters() +std::vector>& BasicNotification_allOf::getFilters() { return m_Filters; } -void BasicNotification_allOf::setFilters(const std::vector>& value) +void BasicNotification_allOf::setFilters(const std::vector>& value) { m_Filters = value; m_FiltersIsSet = true; diff --git a/src/model/BasicNotification_allOf_android_background_layout.cpp b/src/model/BasicNotification_allOf_android_background_layout.cpp index c7ab5a0..1215d14 100644 --- a/src/model/BasicNotification_allOf_android_background_layout.cpp +++ b/src/model/BasicNotification_allOf_android_background_layout.cpp @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. diff --git a/src/model/BeginLiveActivityRequest.cpp b/src/model/BeginLiveActivityRequest.cpp deleted file mode 100644 index c26998c..0000000 --- a/src/model/BeginLiveActivityRequest.cpp +++ /dev/null @@ -1,171 +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.4.0 - * Contact: devrel@onesignal.com - * - * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOneSignalAPIClient/model/BeginLiveActivityRequest.h" - -namespace com { -namespace onesignal { -namespace client { -namespace model { - - - -BeginLiveActivityRequest::BeginLiveActivityRequest() -{ - m_Push_token = utility::conversions::to_string_t(""); - m_Push_tokenIsSet = false; - m_Subscription_id = utility::conversions::to_string_t(""); - m_Subscription_idIsSet = false; -} - -BeginLiveActivityRequest::~BeginLiveActivityRequest() -{ -} - -void BeginLiveActivityRequest::validate() -{ - // TODO: implement validation -} - -web::json::value BeginLiveActivityRequest::toJson() const -{ - - web::json::value val = web::json::value::object(); - - if(m_Push_tokenIsSet) - { - val[utility::conversions::to_string_t(U("push_token"))] = ModelBase::toJson(m_Push_token); - } - if(m_Subscription_idIsSet) - { - val[utility::conversions::to_string_t(U("subscription_id"))] = ModelBase::toJson(m_Subscription_id); - } - - return val; -} - -bool BeginLiveActivityRequest::fromJson(const web::json::value& val) -{ - bool ok = true; - - if(val.has_field(utility::conversions::to_string_t(U("push_token")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("push_token"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setPushToken; - ok &= ModelBase::fromJson(fieldValue, refVal_setPushToken); - setPushToken(refVal_setPushToken); - } - } - if(val.has_field(utility::conversions::to_string_t(U("subscription_id")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("subscription_id"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setSubscriptionId; - ok &= ModelBase::fromJson(fieldValue, refVal_setSubscriptionId); - setSubscriptionId(refVal_setSubscriptionId); - } - } - return ok; -} - -void BeginLiveActivityRequest::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - if(m_Push_tokenIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("push_token")), m_Push_token)); - } - if(m_Subscription_idIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("subscription_id")), m_Subscription_id)); - } -} - -bool BeginLiveActivityRequest::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(U("push_token")))) - { - utility::string_t refVal_setPushToken; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("push_token"))), refVal_setPushToken ); - setPushToken(refVal_setPushToken); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("subscription_id")))) - { - utility::string_t refVal_setSubscriptionId; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("subscription_id"))), refVal_setSubscriptionId ); - setSubscriptionId(refVal_setSubscriptionId); - } - return ok; -} - -utility::string_t BeginLiveActivityRequest::getPushToken() const -{ - return m_Push_token; -} - -void BeginLiveActivityRequest::setPushToken(const utility::string_t& value) -{ - m_Push_token = value; - m_Push_tokenIsSet = true; -} - -bool BeginLiveActivityRequest::pushTokenIsSet() const -{ - return m_Push_tokenIsSet; -} - -void BeginLiveActivityRequest::unsetPush_token() -{ - m_Push_tokenIsSet = false; -} -utility::string_t BeginLiveActivityRequest::getSubscriptionId() const -{ - return m_Subscription_id; -} - -void BeginLiveActivityRequest::setSubscriptionId(const utility::string_t& value) -{ - m_Subscription_id = value; - m_Subscription_idIsSet = true; -} - -bool BeginLiveActivityRequest::subscriptionIdIsSet() const -{ - return m_Subscription_idIsSet; -} - -void BeginLiveActivityRequest::unsetSubscription_id() -{ - m_Subscription_idIsSet = false; -} -} -} -} -} - - diff --git a/src/model/Button.cpp b/src/model/Button.cpp index f1c1535..70d97a6 100644 --- a/src/model/Button.cpp +++ b/src/model/Button.cpp @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. diff --git a/src/model/CancelNotificationSuccessResponse.cpp b/src/model/CancelNotificationSuccessResponse.cpp deleted file mode 100644 index 19dcab4..0000000 --- a/src/model/CancelNotificationSuccessResponse.cpp +++ /dev/null @@ -1,125 +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.4.0 - * Contact: devrel@onesignal.com - * - * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOneSignalAPIClient/model/CancelNotificationSuccessResponse.h" - -namespace com { -namespace onesignal { -namespace client { -namespace model { - - - -CancelNotificationSuccessResponse::CancelNotificationSuccessResponse() -{ - m_Success = false; - m_SuccessIsSet = false; -} - -CancelNotificationSuccessResponse::~CancelNotificationSuccessResponse() -{ -} - -void CancelNotificationSuccessResponse::validate() -{ - // TODO: implement validation -} - -web::json::value CancelNotificationSuccessResponse::toJson() const -{ - - web::json::value val = web::json::value::object(); - - if(m_SuccessIsSet) - { - val[utility::conversions::to_string_t(U("success"))] = ModelBase::toJson(m_Success); - } - - return val; -} - -bool CancelNotificationSuccessResponse::fromJson(const web::json::value& val) -{ - bool ok = true; - - if(val.has_field(utility::conversions::to_string_t(U("success")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("success"))); - if(!fieldValue.is_null()) - { - bool refVal_setSuccess; - ok &= ModelBase::fromJson(fieldValue, refVal_setSuccess); - setSuccess(refVal_setSuccess); - } - } - return ok; -} - -void CancelNotificationSuccessResponse::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - if(m_SuccessIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("success")), m_Success)); - } -} - -bool CancelNotificationSuccessResponse::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(U("success")))) - { - bool refVal_setSuccess; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("success"))), refVal_setSuccess ); - setSuccess(refVal_setSuccess); - } - return ok; -} - -bool CancelNotificationSuccessResponse::isSuccess() const -{ - return m_Success; -} - -void CancelNotificationSuccessResponse::setSuccess(bool value) -{ - m_Success = value; - m_SuccessIsSet = true; -} - -bool CancelNotificationSuccessResponse::successIsSet() const -{ - return m_SuccessIsSet; -} - -void CancelNotificationSuccessResponse::unsetSuccess() -{ - m_SuccessIsSet = false; -} -} -} -} -} - - diff --git a/src/model/CreateNotificationSuccessResponse.cpp b/src/model/CreateNotificationSuccessResponse.cpp index 19b95ec..a74b1b9 100644 --- a/src/model/CreateNotificationSuccessResponse.cpp +++ b/src/model/CreateNotificationSuccessResponse.cpp @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. @@ -25,8 +25,6 @@ CreateNotificationSuccessResponse::CreateNotificationSuccessResponse() { m_Id = utility::conversions::to_string_t(""); m_IdIsSet = false; - m_Recipients = 0; - m_RecipientsIsSet = false; m_External_id = utility::conversions::to_string_t(""); m_External_idIsSet = false; m_ErrorsIsSet = false; @@ -50,10 +48,6 @@ web::json::value CreateNotificationSuccessResponse::toJson() const { val[utility::conversions::to_string_t(U("id"))] = ModelBase::toJson(m_Id); } - if(m_RecipientsIsSet) - { - val[utility::conversions::to_string_t(U("recipients"))] = ModelBase::toJson(m_Recipients); - } if(m_External_idIsSet) { val[utility::conversions::to_string_t(U("external_id"))] = ModelBase::toJson(m_External_id); @@ -80,16 +74,6 @@ bool CreateNotificationSuccessResponse::fromJson(const web::json::value& val) setId(refVal_setId); } } - if(val.has_field(utility::conversions::to_string_t(U("recipients")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("recipients"))); - if(!fieldValue.is_null()) - { - int32_t refVal_setRecipients; - ok &= ModelBase::fromJson(fieldValue, refVal_setRecipients); - setRecipients(refVal_setRecipients); - } - } if(val.has_field(utility::conversions::to_string_t(U("external_id")))) { const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("external_id"))); @@ -105,7 +89,7 @@ bool CreateNotificationSuccessResponse::fromJson(const web::json::value& val) const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("errors"))); if(!fieldValue.is_null()) { - std::shared_ptr refVal_setErrors; + std::shared_ptr refVal_setErrors; ok &= ModelBase::fromJson(fieldValue, refVal_setErrors); setErrors(refVal_setErrors); } @@ -124,10 +108,6 @@ void CreateNotificationSuccessResponse::toMultipart(std::shared_ptradd(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("id")), m_Id)); } - if(m_RecipientsIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("recipients")), m_Recipients)); - } if(m_External_idIsSet) { multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("external_id")), m_External_id)); @@ -153,12 +133,6 @@ bool CreateNotificationSuccessResponse::fromMultiPart(std::shared_ptrgetContent(utility::conversions::to_string_t(U("id"))), refVal_setId ); setId(refVal_setId); } - if(multipart->hasContent(utility::conversions::to_string_t(U("recipients")))) - { - int32_t refVal_setRecipients; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("recipients"))), refVal_setRecipients ); - setRecipients(refVal_setRecipients); - } if(multipart->hasContent(utility::conversions::to_string_t(U("external_id")))) { utility::string_t refVal_setExternalId; @@ -167,7 +141,7 @@ bool CreateNotificationSuccessResponse::fromMultiPart(std::shared_ptrhasContent(utility::conversions::to_string_t(U("errors")))) { - std::shared_ptr refVal_setErrors; + std::shared_ptr refVal_setErrors; ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("errors"))), refVal_setErrors ); setErrors(refVal_setErrors); } @@ -194,26 +168,6 @@ void CreateNotificationSuccessResponse::unsetId() { m_IdIsSet = false; } -int32_t CreateNotificationSuccessResponse::getRecipients() const -{ - return m_Recipients; -} - -void CreateNotificationSuccessResponse::setRecipients(int32_t value) -{ - m_Recipients = value; - m_RecipientsIsSet = true; -} - -bool CreateNotificationSuccessResponse::recipientsIsSet() const -{ - return m_RecipientsIsSet; -} - -void CreateNotificationSuccessResponse::unsetRecipients() -{ - m_RecipientsIsSet = false; -} utility::string_t CreateNotificationSuccessResponse::getExternalId() const { return m_External_id; @@ -234,12 +188,12 @@ void CreateNotificationSuccessResponse::unsetExternal_id() { m_External_idIsSet = false; } -std::shared_ptr CreateNotificationSuccessResponse::getErrors() const +std::shared_ptr CreateNotificationSuccessResponse::getErrors() const { return m_Errors; } -void CreateNotificationSuccessResponse::setErrors(const std::shared_ptr& value) +void CreateNotificationSuccessResponse::setErrors(const std::shared_ptr& value) { m_Errors = value; m_ErrorsIsSet = true; diff --git a/src/model/CreatePlayerSuccessResponse.cpp b/src/model/CreatePlayerSuccessResponse.cpp deleted file mode 100644 index 58ca66f..0000000 --- a/src/model/CreatePlayerSuccessResponse.cpp +++ /dev/null @@ -1,171 +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.4.0 - * Contact: devrel@onesignal.com - * - * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOneSignalAPIClient/model/CreatePlayerSuccessResponse.h" - -namespace com { -namespace onesignal { -namespace client { -namespace model { - - - -CreatePlayerSuccessResponse::CreatePlayerSuccessResponse() -{ - m_Success = false; - m_SuccessIsSet = false; - m_Id = utility::conversions::to_string_t(""); - m_IdIsSet = false; -} - -CreatePlayerSuccessResponse::~CreatePlayerSuccessResponse() -{ -} - -void CreatePlayerSuccessResponse::validate() -{ - // TODO: implement validation -} - -web::json::value CreatePlayerSuccessResponse::toJson() const -{ - - web::json::value val = web::json::value::object(); - - if(m_SuccessIsSet) - { - val[utility::conversions::to_string_t(U("success"))] = ModelBase::toJson(m_Success); - } - if(m_IdIsSet) - { - val[utility::conversions::to_string_t(U("id"))] = ModelBase::toJson(m_Id); - } - - return val; -} - -bool CreatePlayerSuccessResponse::fromJson(const web::json::value& val) -{ - bool ok = true; - - if(val.has_field(utility::conversions::to_string_t(U("success")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("success"))); - if(!fieldValue.is_null()) - { - bool refVal_setSuccess; - ok &= ModelBase::fromJson(fieldValue, refVal_setSuccess); - setSuccess(refVal_setSuccess); - } - } - if(val.has_field(utility::conversions::to_string_t(U("id")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("id"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setId; - ok &= ModelBase::fromJson(fieldValue, refVal_setId); - setId(refVal_setId); - } - } - return ok; -} - -void CreatePlayerSuccessResponse::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - if(m_SuccessIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("success")), m_Success)); - } - if(m_IdIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("id")), m_Id)); - } -} - -bool CreatePlayerSuccessResponse::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(U("success")))) - { - bool refVal_setSuccess; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("success"))), refVal_setSuccess ); - setSuccess(refVal_setSuccess); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("id")))) - { - utility::string_t refVal_setId; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("id"))), refVal_setId ); - setId(refVal_setId); - } - return ok; -} - -bool CreatePlayerSuccessResponse::isSuccess() const -{ - return m_Success; -} - -void CreatePlayerSuccessResponse::setSuccess(bool value) -{ - m_Success = value; - m_SuccessIsSet = true; -} - -bool CreatePlayerSuccessResponse::successIsSet() const -{ - return m_SuccessIsSet; -} - -void CreatePlayerSuccessResponse::unsetSuccess() -{ - m_SuccessIsSet = false; -} -utility::string_t CreatePlayerSuccessResponse::getId() const -{ - return m_Id; -} - -void CreatePlayerSuccessResponse::setId(const utility::string_t& value) -{ - m_Id = value; - m_IdIsSet = true; -} - -bool CreatePlayerSuccessResponse::idIsSet() const -{ - return m_IdIsSet; -} - -void CreatePlayerSuccessResponse::unsetId() -{ - m_IdIsSet = false; -} -} -} -} -} - - diff --git a/src/model/CreateSegmentConflictResponse.cpp b/src/model/CreateSegmentConflictResponse.cpp index 04f548d..70e5cc8 100644 --- a/src/model/CreateSegmentConflictResponse.cpp +++ b/src/model/CreateSegmentConflictResponse.cpp @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. diff --git a/src/model/CreateSegmentSuccessResponse.cpp b/src/model/CreateSegmentSuccessResponse.cpp index 52851c4..5c7d6d9 100644 --- a/src/model/CreateSegmentSuccessResponse.cpp +++ b/src/model/CreateSegmentSuccessResponse.cpp @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. diff --git a/src/model/CreateSubscriptionRequestBody.cpp b/src/model/CreateSubscriptionRequestBody.cpp deleted file mode 100644 index d16b927..0000000 --- a/src/model/CreateSubscriptionRequestBody.cpp +++ /dev/null @@ -1,170 +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.4.0 - * Contact: devrel@onesignal.com - * - * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOneSignalAPIClient/model/CreateSubscriptionRequestBody.h" - -namespace com { -namespace onesignal { -namespace client { -namespace model { - - - -CreateSubscriptionRequestBody::CreateSubscriptionRequestBody() -{ - m_SubscriptionIsSet = false; - m_Retain_previous_owner = false; - m_Retain_previous_ownerIsSet = false; -} - -CreateSubscriptionRequestBody::~CreateSubscriptionRequestBody() -{ -} - -void CreateSubscriptionRequestBody::validate() -{ - // TODO: implement validation -} - -web::json::value CreateSubscriptionRequestBody::toJson() const -{ - - web::json::value val = web::json::value::object(); - - if(m_SubscriptionIsSet) - { - val[utility::conversions::to_string_t(U("subscription"))] = ModelBase::toJson(m_Subscription); - } - if(m_Retain_previous_ownerIsSet) - { - val[utility::conversions::to_string_t(U("retain_previous_owner"))] = ModelBase::toJson(m_Retain_previous_owner); - } - - return val; -} - -bool CreateSubscriptionRequestBody::fromJson(const web::json::value& val) -{ - bool ok = true; - - if(val.has_field(utility::conversions::to_string_t(U("subscription")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("subscription"))); - if(!fieldValue.is_null()) - { - std::shared_ptr refVal_setSubscription; - ok &= ModelBase::fromJson(fieldValue, refVal_setSubscription); - setSubscription(refVal_setSubscription); - } - } - if(val.has_field(utility::conversions::to_string_t(U("retain_previous_owner")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("retain_previous_owner"))); - if(!fieldValue.is_null()) - { - bool refVal_setRetainPreviousOwner; - ok &= ModelBase::fromJson(fieldValue, refVal_setRetainPreviousOwner); - setRetainPreviousOwner(refVal_setRetainPreviousOwner); - } - } - return ok; -} - -void CreateSubscriptionRequestBody::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - if(m_SubscriptionIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("subscription")), m_Subscription)); - } - if(m_Retain_previous_ownerIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("retain_previous_owner")), m_Retain_previous_owner)); - } -} - -bool CreateSubscriptionRequestBody::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(U("subscription")))) - { - std::shared_ptr refVal_setSubscription; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("subscription"))), refVal_setSubscription ); - setSubscription(refVal_setSubscription); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("retain_previous_owner")))) - { - bool refVal_setRetainPreviousOwner; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("retain_previous_owner"))), refVal_setRetainPreviousOwner ); - setRetainPreviousOwner(refVal_setRetainPreviousOwner); - } - return ok; -} - -std::shared_ptr CreateSubscriptionRequestBody::getSubscription() const -{ - return m_Subscription; -} - -void CreateSubscriptionRequestBody::setSubscription(const std::shared_ptr& value) -{ - m_Subscription = value; - m_SubscriptionIsSet = true; -} - -bool CreateSubscriptionRequestBody::subscriptionIsSet() const -{ - return m_SubscriptionIsSet; -} - -void CreateSubscriptionRequestBody::unsetSubscription() -{ - m_SubscriptionIsSet = false; -} -bool CreateSubscriptionRequestBody::isRetainPreviousOwner() const -{ - return m_Retain_previous_owner; -} - -void CreateSubscriptionRequestBody::setRetainPreviousOwner(bool value) -{ - m_Retain_previous_owner = value; - m_Retain_previous_ownerIsSet = true; -} - -bool CreateSubscriptionRequestBody::retainPreviousOwnerIsSet() const -{ - return m_Retain_previous_ownerIsSet; -} - -void CreateSubscriptionRequestBody::unsetRetain_previous_owner() -{ - m_Retain_previous_ownerIsSet = false; -} -} -} -} -} - - diff --git a/src/model/CreateUserConflictResponse.cpp b/src/model/CreateUserConflictResponse.cpp index f5ceaa3..4b05a9d 100644 --- a/src/model/CreateUserConflictResponse.cpp +++ b/src/model/CreateUserConflictResponse.cpp @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. diff --git a/src/model/CreateUserConflictResponse_errorsItems_meta.cpp b/src/model/CreateUserConflictResponse_errorsItems_meta.cpp index a41e5cb..6662866 100644 --- a/src/model/CreateUserConflictResponse_errorsItems_meta.cpp +++ b/src/model/CreateUserConflictResponse_errorsItems_meta.cpp @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. diff --git a/src/model/CreateUserConflictResponse_errors_inner.cpp b/src/model/CreateUserConflictResponse_errors_inner.cpp index dcf2672..e95d995 100644 --- a/src/model/CreateUserConflictResponse_errors_inner.cpp +++ b/src/model/CreateUserConflictResponse_errors_inner.cpp @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. diff --git a/src/model/DeletePlayerNotFoundResponse.cpp b/src/model/DeletePlayerNotFoundResponse.cpp deleted file mode 100644 index cde61c1..0000000 --- a/src/model/DeletePlayerNotFoundResponse.cpp +++ /dev/null @@ -1,125 +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.4.0 - * Contact: devrel@onesignal.com - * - * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOneSignalAPIClient/model/DeletePlayerNotFoundResponse.h" - -namespace com { -namespace onesignal { -namespace client { -namespace model { - - - -DeletePlayerNotFoundResponse::DeletePlayerNotFoundResponse() -{ - m_Success = false; - m_SuccessIsSet = false; -} - -DeletePlayerNotFoundResponse::~DeletePlayerNotFoundResponse() -{ -} - -void DeletePlayerNotFoundResponse::validate() -{ - // TODO: implement validation -} - -web::json::value DeletePlayerNotFoundResponse::toJson() const -{ - - web::json::value val = web::json::value::object(); - - if(m_SuccessIsSet) - { - val[utility::conversions::to_string_t(U("success"))] = ModelBase::toJson(m_Success); - } - - return val; -} - -bool DeletePlayerNotFoundResponse::fromJson(const web::json::value& val) -{ - bool ok = true; - - if(val.has_field(utility::conversions::to_string_t(U("success")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("success"))); - if(!fieldValue.is_null()) - { - bool refVal_setSuccess; - ok &= ModelBase::fromJson(fieldValue, refVal_setSuccess); - setSuccess(refVal_setSuccess); - } - } - return ok; -} - -void DeletePlayerNotFoundResponse::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - if(m_SuccessIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("success")), m_Success)); - } -} - -bool DeletePlayerNotFoundResponse::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(U("success")))) - { - bool refVal_setSuccess; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("success"))), refVal_setSuccess ); - setSuccess(refVal_setSuccess); - } - return ok; -} - -bool DeletePlayerNotFoundResponse::isSuccess() const -{ - return m_Success; -} - -void DeletePlayerNotFoundResponse::setSuccess(bool value) -{ - m_Success = value; - m_SuccessIsSet = true; -} - -bool DeletePlayerNotFoundResponse::successIsSet() const -{ - return m_SuccessIsSet; -} - -void DeletePlayerNotFoundResponse::unsetSuccess() -{ - m_SuccessIsSet = false; -} -} -} -} -} - - diff --git a/src/model/DeleteSegmentNotFoundResponse.cpp b/src/model/DeleteSegmentNotFoundResponse.cpp deleted file mode 100644 index 0eaafe3..0000000 --- a/src/model/DeleteSegmentNotFoundResponse.cpp +++ /dev/null @@ -1,125 +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.4.0 - * Contact: devrel@onesignal.com - * - * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOneSignalAPIClient/model/DeleteSegmentNotFoundResponse.h" - -namespace com { -namespace onesignal { -namespace client { -namespace model { - - - -DeleteSegmentNotFoundResponse::DeleteSegmentNotFoundResponse() -{ - m_Success = false; - m_SuccessIsSet = false; -} - -DeleteSegmentNotFoundResponse::~DeleteSegmentNotFoundResponse() -{ -} - -void DeleteSegmentNotFoundResponse::validate() -{ - // TODO: implement validation -} - -web::json::value DeleteSegmentNotFoundResponse::toJson() const -{ - - web::json::value val = web::json::value::object(); - - if(m_SuccessIsSet) - { - val[utility::conversions::to_string_t(U("success"))] = ModelBase::toJson(m_Success); - } - - return val; -} - -bool DeleteSegmentNotFoundResponse::fromJson(const web::json::value& val) -{ - bool ok = true; - - if(val.has_field(utility::conversions::to_string_t(U("success")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("success"))); - if(!fieldValue.is_null()) - { - bool refVal_setSuccess; - ok &= ModelBase::fromJson(fieldValue, refVal_setSuccess); - setSuccess(refVal_setSuccess); - } - } - return ok; -} - -void DeleteSegmentNotFoundResponse::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - if(m_SuccessIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("success")), m_Success)); - } -} - -bool DeleteSegmentNotFoundResponse::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(U("success")))) - { - bool refVal_setSuccess; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("success"))), refVal_setSuccess ); - setSuccess(refVal_setSuccess); - } - return ok; -} - -bool DeleteSegmentNotFoundResponse::isSuccess() const -{ - return m_Success; -} - -void DeleteSegmentNotFoundResponse::setSuccess(bool value) -{ - m_Success = value; - m_SuccessIsSet = true; -} - -bool DeleteSegmentNotFoundResponse::successIsSet() const -{ - return m_SuccessIsSet; -} - -void DeleteSegmentNotFoundResponse::unsetSuccess() -{ - m_SuccessIsSet = false; -} -} -} -} -} - - diff --git a/src/model/DeleteSegmentSuccessResponse.cpp b/src/model/DeleteSegmentSuccessResponse.cpp deleted file mode 100644 index 8a070d1..0000000 --- a/src/model/DeleteSegmentSuccessResponse.cpp +++ /dev/null @@ -1,125 +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.4.0 - * Contact: devrel@onesignal.com - * - * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOneSignalAPIClient/model/DeleteSegmentSuccessResponse.h" - -namespace com { -namespace onesignal { -namespace client { -namespace model { - - - -DeleteSegmentSuccessResponse::DeleteSegmentSuccessResponse() -{ - m_Success = false; - m_SuccessIsSet = false; -} - -DeleteSegmentSuccessResponse::~DeleteSegmentSuccessResponse() -{ -} - -void DeleteSegmentSuccessResponse::validate() -{ - // TODO: implement validation -} - -web::json::value DeleteSegmentSuccessResponse::toJson() const -{ - - web::json::value val = web::json::value::object(); - - if(m_SuccessIsSet) - { - val[utility::conversions::to_string_t(U("success"))] = ModelBase::toJson(m_Success); - } - - return val; -} - -bool DeleteSegmentSuccessResponse::fromJson(const web::json::value& val) -{ - bool ok = true; - - if(val.has_field(utility::conversions::to_string_t(U("success")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("success"))); - if(!fieldValue.is_null()) - { - bool refVal_setSuccess; - ok &= ModelBase::fromJson(fieldValue, refVal_setSuccess); - setSuccess(refVal_setSuccess); - } - } - return ok; -} - -void DeleteSegmentSuccessResponse::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - if(m_SuccessIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("success")), m_Success)); - } -} - -bool DeleteSegmentSuccessResponse::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(U("success")))) - { - bool refVal_setSuccess; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("success"))), refVal_setSuccess ); - setSuccess(refVal_setSuccess); - } - return ok; -} - -bool DeleteSegmentSuccessResponse::isSuccess() const -{ - return m_Success; -} - -void DeleteSegmentSuccessResponse::setSuccess(bool value) -{ - m_Success = value; - m_SuccessIsSet = true; -} - -bool DeleteSegmentSuccessResponse::successIsSet() const -{ - return m_SuccessIsSet; -} - -void DeleteSegmentSuccessResponse::unsetSuccess() -{ - m_SuccessIsSet = false; -} -} -} -} -} - - diff --git a/src/model/DeliveryData.cpp b/src/model/DeliveryData.cpp index adce327..1529b1d 100644 --- a/src/model/DeliveryData.cpp +++ b/src/model/DeliveryData.cpp @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. diff --git a/src/model/ExportEventsSuccessResponse.cpp b/src/model/ExportEventsSuccessResponse.cpp index f24fe96..1c3478c 100644 --- a/src/model/ExportEventsSuccessResponse.cpp +++ b/src/model/ExportEventsSuccessResponse.cpp @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. diff --git a/src/model/ExportPlayersSuccessResponse.cpp b/src/model/ExportSubscriptionsSuccessResponse.cpp similarity index 70% rename from src/model/ExportPlayersSuccessResponse.cpp rename to src/model/ExportSubscriptionsSuccessResponse.cpp index 9aabe93..96746a0 100644 --- a/src/model/ExportPlayersSuccessResponse.cpp +++ b/src/model/ExportSubscriptionsSuccessResponse.cpp @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. @@ -12,7 +12,7 @@ -#include "CppRestOneSignalAPIClient/model/ExportPlayersSuccessResponse.h" +#include "CppRestOneSignalAPIClient/model/ExportSubscriptionsSuccessResponse.h" namespace com { namespace onesignal { @@ -21,22 +21,22 @@ namespace model { -ExportPlayersSuccessResponse::ExportPlayersSuccessResponse() +ExportSubscriptionsSuccessResponse::ExportSubscriptionsSuccessResponse() { m_Csv_file_url = utility::conversions::to_string_t(""); m_Csv_file_urlIsSet = false; } -ExportPlayersSuccessResponse::~ExportPlayersSuccessResponse() +ExportSubscriptionsSuccessResponse::~ExportSubscriptionsSuccessResponse() { } -void ExportPlayersSuccessResponse::validate() +void ExportSubscriptionsSuccessResponse::validate() { // TODO: implement validation } -web::json::value ExportPlayersSuccessResponse::toJson() const +web::json::value ExportSubscriptionsSuccessResponse::toJson() const { web::json::value val = web::json::value::object(); @@ -49,7 +49,7 @@ web::json::value ExportPlayersSuccessResponse::toJson() const return val; } -bool ExportPlayersSuccessResponse::fromJson(const web::json::value& val) +bool ExportSubscriptionsSuccessResponse::fromJson(const web::json::value& val) { bool ok = true; @@ -66,7 +66,7 @@ bool ExportPlayersSuccessResponse::fromJson(const web::json::value& val) return ok; } -void ExportPlayersSuccessResponse::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const +void ExportSubscriptionsSuccessResponse::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const { utility::string_t namePrefix = prefix; if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) @@ -79,7 +79,7 @@ void ExportPlayersSuccessResponse::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) +bool ExportSubscriptionsSuccessResponse::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) { bool ok = true; utility::string_t namePrefix = prefix; @@ -97,23 +97,23 @@ bool ExportPlayersSuccessResponse::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) const +void Export_subscriptions_request_body::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const { utility::string_t namePrefix = prefix; if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) @@ -118,7 +118,7 @@ void Export_players_request_body::toMultipart(std::shared_ptr } } -bool Export_players_request_body::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) +bool Export_subscriptions_request_body::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) { bool ok = true; utility::string_t namePrefix = prefix; @@ -148,63 +148,63 @@ bool Export_players_request_body::fromMultiPart(std::shared_ptr& Export_players_request_body::getExtraFields() +std::vector& Export_subscriptions_request_body::getExtraFields() { return m_Extra_fields; } -void Export_players_request_body::setExtraFields(const std::vector& value) +void Export_subscriptions_request_body::setExtraFields(const std::vector& value) { m_Extra_fields = value; m_Extra_fieldsIsSet = true; } -bool Export_players_request_body::extraFieldsIsSet() const +bool Export_subscriptions_request_body::extraFieldsIsSet() const { return m_Extra_fieldsIsSet; } -void Export_players_request_body::unsetExtra_fields() +void Export_subscriptions_request_body::unsetExtra_fields() { m_Extra_fieldsIsSet = false; } -utility::string_t Export_players_request_body::getLastActiveSince() const +utility::string_t Export_subscriptions_request_body::getLastActiveSince() const { return m_Last_active_since; } -void Export_players_request_body::setLastActiveSince(const utility::string_t& value) +void Export_subscriptions_request_body::setLastActiveSince(const utility::string_t& value) { m_Last_active_since = value; m_Last_active_sinceIsSet = true; } -bool Export_players_request_body::lastActiveSinceIsSet() const +bool Export_subscriptions_request_body::lastActiveSinceIsSet() const { return m_Last_active_sinceIsSet; } -void Export_players_request_body::unsetLast_active_since() +void Export_subscriptions_request_body::unsetLast_active_since() { m_Last_active_sinceIsSet = false; } -utility::string_t Export_players_request_body::getSegmentName() const +utility::string_t Export_subscriptions_request_body::getSegmentName() const { return m_Segment_name; } -void Export_players_request_body::setSegmentName(const utility::string_t& value) +void Export_subscriptions_request_body::setSegmentName(const utility::string_t& value) { m_Segment_name = value; m_Segment_nameIsSet = true; } -bool Export_players_request_body::segmentNameIsSet() const +bool Export_subscriptions_request_body::segmentNameIsSet() const { return m_Segment_nameIsSet; } -void Export_players_request_body::unsetSegment_name() +void Export_subscriptions_request_body::unsetSegment_name() { m_Segment_nameIsSet = false; } diff --git a/src/model/Filter.cpp b/src/model/Filter.cpp index 233d91a..3fda796 100644 --- a/src/model/Filter.cpp +++ b/src/model/Filter.cpp @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. @@ -29,6 +29,14 @@ Filter::Filter() m_KeyIsSet = false; m_Value = utility::conversions::to_string_t(""); m_ValueIsSet = false; + m_Hours_ago = utility::conversions::to_string_t(""); + m_Hours_agoIsSet = false; + m_Radius = 0.0; + m_RadiusIsSet = false; + m_Lat = 0.0; + m_LatIsSet = false; + m_long = 0.0; + m_longIsSet = false; m_Relation = utility::conversions::to_string_t(""); m_RelationIsSet = false; } @@ -59,6 +67,22 @@ web::json::value Filter::toJson() const { val[utility::conversions::to_string_t(U("value"))] = ModelBase::toJson(m_Value); } + if(m_Hours_agoIsSet) + { + val[utility::conversions::to_string_t(U("hours_ago"))] = ModelBase::toJson(m_Hours_ago); + } + if(m_RadiusIsSet) + { + val[utility::conversions::to_string_t(U("radius"))] = ModelBase::toJson(m_Radius); + } + if(m_LatIsSet) + { + val[utility::conversions::to_string_t(U("lat"))] = ModelBase::toJson(m_Lat); + } + if(m_longIsSet) + { + val[utility::conversions::to_string_t(U("long"))] = ModelBase::toJson(m_long); + } if(m_RelationIsSet) { val[utility::conversions::to_string_t(U("relation"))] = ModelBase::toJson(m_Relation); @@ -101,6 +125,46 @@ bool Filter::fromJson(const web::json::value& val) setValue(refVal_setValue); } } + if(val.has_field(utility::conversions::to_string_t(U("hours_ago")))) + { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("hours_ago"))); + if(!fieldValue.is_null()) + { + utility::string_t refVal_setHoursAgo; + ok &= ModelBase::fromJson(fieldValue, refVal_setHoursAgo); + setHoursAgo(refVal_setHoursAgo); + } + } + if(val.has_field(utility::conversions::to_string_t(U("radius")))) + { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("radius"))); + if(!fieldValue.is_null()) + { + double refVal_setRadius; + ok &= ModelBase::fromJson(fieldValue, refVal_setRadius); + setRadius(refVal_setRadius); + } + } + if(val.has_field(utility::conversions::to_string_t(U("lat")))) + { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("lat"))); + if(!fieldValue.is_null()) + { + double refVal_setLat; + ok &= ModelBase::fromJson(fieldValue, refVal_setLat); + setLat(refVal_setLat); + } + } + if(val.has_field(utility::conversions::to_string_t(U("long")))) + { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("long"))); + if(!fieldValue.is_null()) + { + double refVal_setLong; + ok &= ModelBase::fromJson(fieldValue, refVal_setLong); + setLong(refVal_setLong); + } + } if(val.has_field(utility::conversions::to_string_t(U("relation")))) { const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("relation"))); @@ -133,6 +197,22 @@ void Filter::toMultipart(std::shared_ptr multipart, const uti { multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("value")), m_Value)); } + if(m_Hours_agoIsSet) + { + multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("hours_ago")), m_Hours_ago)); + } + if(m_RadiusIsSet) + { + multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("radius")), m_Radius)); + } + if(m_LatIsSet) + { + multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("lat")), m_Lat)); + } + if(m_longIsSet) + { + multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("long")), m_long)); + } if(m_RelationIsSet) { multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("relation")), m_Relation)); @@ -166,6 +246,30 @@ bool Filter::fromMultiPart(std::shared_ptr multipart, const u ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("value"))), refVal_setValue ); setValue(refVal_setValue); } + if(multipart->hasContent(utility::conversions::to_string_t(U("hours_ago")))) + { + utility::string_t refVal_setHoursAgo; + ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("hours_ago"))), refVal_setHoursAgo ); + setHoursAgo(refVal_setHoursAgo); + } + if(multipart->hasContent(utility::conversions::to_string_t(U("radius")))) + { + double refVal_setRadius; + ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("radius"))), refVal_setRadius ); + setRadius(refVal_setRadius); + } + if(multipart->hasContent(utility::conversions::to_string_t(U("lat")))) + { + double refVal_setLat; + ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("lat"))), refVal_setLat ); + setLat(refVal_setLat); + } + if(multipart->hasContent(utility::conversions::to_string_t(U("long")))) + { + double refVal_setLong; + ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("long"))), refVal_setLong ); + setLong(refVal_setLong); + } if(multipart->hasContent(utility::conversions::to_string_t(U("relation")))) { utility::string_t refVal_setRelation; @@ -235,6 +339,86 @@ void Filter::unsetValue() { m_ValueIsSet = false; } +utility::string_t Filter::getHoursAgo() const +{ + return m_Hours_ago; +} + +void Filter::setHoursAgo(const utility::string_t& value) +{ + m_Hours_ago = value; + m_Hours_agoIsSet = true; +} + +bool Filter::hoursAgoIsSet() const +{ + return m_Hours_agoIsSet; +} + +void Filter::unsetHours_ago() +{ + m_Hours_agoIsSet = false; +} +double Filter::getRadius() const +{ + return m_Radius; +} + +void Filter::setRadius(double value) +{ + m_Radius = value; + m_RadiusIsSet = true; +} + +bool Filter::radiusIsSet() const +{ + return m_RadiusIsSet; +} + +void Filter::unsetRadius() +{ + m_RadiusIsSet = false; +} +double Filter::getLat() const +{ + return m_Lat; +} + +void Filter::setLat(double value) +{ + m_Lat = value; + m_LatIsSet = true; +} + +bool Filter::latIsSet() const +{ + return m_LatIsSet; +} + +void Filter::unsetLat() +{ + m_LatIsSet = false; +} +double Filter::getLong() const +{ + return m_long; +} + +void Filter::setLong(double value) +{ + m_long = value; + m_longIsSet = true; +} + +bool Filter::r_longIsSet() const +{ + return m_longIsSet; +} + +void Filter::unsetlong() +{ + m_longIsSet = false; +} utility::string_t Filter::getRelation() const { return m_Relation; diff --git a/src/model/FilterExpressions.cpp b/src/model/FilterExpression.cpp similarity index 51% rename from src/model/FilterExpressions.cpp rename to src/model/FilterExpression.cpp index 6437384..231942d 100644 --- a/src/model/FilterExpressions.cpp +++ b/src/model/FilterExpression.cpp @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. @@ -12,7 +12,7 @@ -#include "CppRestOneSignalAPIClient/model/FilterExpressions.h" +#include "CppRestOneSignalAPIClient/model/FilterExpression.h" namespace com { namespace onesignal { @@ -21,7 +21,7 @@ namespace model { -FilterExpressions::FilterExpressions() +FilterExpression::FilterExpression() { m_Field = utility::conversions::to_string_t(""); m_FieldIsSet = false; @@ -29,22 +29,30 @@ FilterExpressions::FilterExpressions() m_KeyIsSet = false; m_Value = utility::conversions::to_string_t(""); m_ValueIsSet = false; + m_Hours_ago = utility::conversions::to_string_t(""); + m_Hours_agoIsSet = false; + m_Radius = 0.0; + m_RadiusIsSet = false; + m_Lat = 0.0; + m_LatIsSet = false; + m_long = 0.0; + m_longIsSet = false; m_Relation = utility::conversions::to_string_t(""); m_RelationIsSet = false; m_r_operator = utility::conversions::to_string_t(""); m_r_operatorIsSet = false; } -FilterExpressions::~FilterExpressions() +FilterExpression::~FilterExpression() { } -void FilterExpressions::validate() +void FilterExpression::validate() { // TODO: implement validation } -web::json::value FilterExpressions::toJson() const +web::json::value FilterExpression::toJson() const { web::json::value val = web::json::value::object(); @@ -61,6 +69,22 @@ web::json::value FilterExpressions::toJson() const { val[utility::conversions::to_string_t(U("value"))] = ModelBase::toJson(m_Value); } + if(m_Hours_agoIsSet) + { + val[utility::conversions::to_string_t(U("hours_ago"))] = ModelBase::toJson(m_Hours_ago); + } + if(m_RadiusIsSet) + { + val[utility::conversions::to_string_t(U("radius"))] = ModelBase::toJson(m_Radius); + } + if(m_LatIsSet) + { + val[utility::conversions::to_string_t(U("lat"))] = ModelBase::toJson(m_Lat); + } + if(m_longIsSet) + { + val[utility::conversions::to_string_t(U("long"))] = ModelBase::toJson(m_long); + } if(m_RelationIsSet) { val[utility::conversions::to_string_t(U("relation"))] = ModelBase::toJson(m_Relation); @@ -73,7 +97,7 @@ web::json::value FilterExpressions::toJson() const return val; } -bool FilterExpressions::fromJson(const web::json::value& val) +bool FilterExpression::fromJson(const web::json::value& val) { bool ok = true; @@ -107,6 +131,46 @@ bool FilterExpressions::fromJson(const web::json::value& val) setValue(refVal_setValue); } } + if(val.has_field(utility::conversions::to_string_t(U("hours_ago")))) + { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("hours_ago"))); + if(!fieldValue.is_null()) + { + utility::string_t refVal_setHoursAgo; + ok &= ModelBase::fromJson(fieldValue, refVal_setHoursAgo); + setHoursAgo(refVal_setHoursAgo); + } + } + if(val.has_field(utility::conversions::to_string_t(U("radius")))) + { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("radius"))); + if(!fieldValue.is_null()) + { + double refVal_setRadius; + ok &= ModelBase::fromJson(fieldValue, refVal_setRadius); + setRadius(refVal_setRadius); + } + } + if(val.has_field(utility::conversions::to_string_t(U("lat")))) + { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("lat"))); + if(!fieldValue.is_null()) + { + double refVal_setLat; + ok &= ModelBase::fromJson(fieldValue, refVal_setLat); + setLat(refVal_setLat); + } + } + if(val.has_field(utility::conversions::to_string_t(U("long")))) + { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("long"))); + if(!fieldValue.is_null()) + { + double refVal_setLong; + ok &= ModelBase::fromJson(fieldValue, refVal_setLong); + setLong(refVal_setLong); + } + } if(val.has_field(utility::conversions::to_string_t(U("relation")))) { const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("relation"))); @@ -130,7 +194,7 @@ bool FilterExpressions::fromJson(const web::json::value& val) return ok; } -void FilterExpressions::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const +void FilterExpression::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const { utility::string_t namePrefix = prefix; if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) @@ -149,6 +213,22 @@ void FilterExpressions::toMultipart(std::shared_ptr multipart { multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("value")), m_Value)); } + if(m_Hours_agoIsSet) + { + multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("hours_ago")), m_Hours_ago)); + } + if(m_RadiusIsSet) + { + multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("radius")), m_Radius)); + } + if(m_LatIsSet) + { + multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("lat")), m_Lat)); + } + if(m_longIsSet) + { + multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("long")), m_long)); + } if(m_RelationIsSet) { multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("relation")), m_Relation)); @@ -159,7 +239,7 @@ void FilterExpressions::toMultipart(std::shared_ptr multipart } } -bool FilterExpressions::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) +bool FilterExpression::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) { bool ok = true; utility::string_t namePrefix = prefix; @@ -186,6 +266,30 @@ bool FilterExpressions::fromMultiPart(std::shared_ptr multipa ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("value"))), refVal_setValue ); setValue(refVal_setValue); } + if(multipart->hasContent(utility::conversions::to_string_t(U("hours_ago")))) + { + utility::string_t refVal_setHoursAgo; + ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("hours_ago"))), refVal_setHoursAgo ); + setHoursAgo(refVal_setHoursAgo); + } + if(multipart->hasContent(utility::conversions::to_string_t(U("radius")))) + { + double refVal_setRadius; + ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("radius"))), refVal_setRadius ); + setRadius(refVal_setRadius); + } + if(multipart->hasContent(utility::conversions::to_string_t(U("lat")))) + { + double refVal_setLat; + ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("lat"))), refVal_setLat ); + setLat(refVal_setLat); + } + if(multipart->hasContent(utility::conversions::to_string_t(U("long")))) + { + double refVal_setLong; + ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("long"))), refVal_setLong ); + setLong(refVal_setLong); + } if(multipart->hasContent(utility::conversions::to_string_t(U("relation")))) { utility::string_t refVal_setRelation; @@ -201,103 +305,183 @@ bool FilterExpressions::fromMultiPart(std::shared_ptr multipa return ok; } -utility::string_t FilterExpressions::getField() const +utility::string_t FilterExpression::getField() const { return m_Field; } -void FilterExpressions::setField(const utility::string_t& value) +void FilterExpression::setField(const utility::string_t& value) { m_Field = value; m_FieldIsSet = true; } -bool FilterExpressions::fieldIsSet() const +bool FilterExpression::fieldIsSet() const { return m_FieldIsSet; } -void FilterExpressions::unsetField() +void FilterExpression::unsetField() { m_FieldIsSet = false; } -utility::string_t FilterExpressions::getKey() const +utility::string_t FilterExpression::getKey() const { return m_Key; } -void FilterExpressions::setKey(const utility::string_t& value) +void FilterExpression::setKey(const utility::string_t& value) { m_Key = value; m_KeyIsSet = true; } -bool FilterExpressions::keyIsSet() const +bool FilterExpression::keyIsSet() const { return m_KeyIsSet; } -void FilterExpressions::unsetKey() +void FilterExpression::unsetKey() { m_KeyIsSet = false; } -utility::string_t FilterExpressions::getValue() const +utility::string_t FilterExpression::getValue() const { return m_Value; } -void FilterExpressions::setValue(const utility::string_t& value) +void FilterExpression::setValue(const utility::string_t& value) { m_Value = value; m_ValueIsSet = true; } -bool FilterExpressions::valueIsSet() const +bool FilterExpression::valueIsSet() const { return m_ValueIsSet; } -void FilterExpressions::unsetValue() +void FilterExpression::unsetValue() { m_ValueIsSet = false; } -utility::string_t FilterExpressions::getRelation() const +utility::string_t FilterExpression::getHoursAgo() const +{ + return m_Hours_ago; +} + +void FilterExpression::setHoursAgo(const utility::string_t& value) +{ + m_Hours_ago = value; + m_Hours_agoIsSet = true; +} + +bool FilterExpression::hoursAgoIsSet() const +{ + return m_Hours_agoIsSet; +} + +void FilterExpression::unsetHours_ago() +{ + m_Hours_agoIsSet = false; +} +double FilterExpression::getRadius() const +{ + return m_Radius; +} + +void FilterExpression::setRadius(double value) +{ + m_Radius = value; + m_RadiusIsSet = true; +} + +bool FilterExpression::radiusIsSet() const +{ + return m_RadiusIsSet; +} + +void FilterExpression::unsetRadius() +{ + m_RadiusIsSet = false; +} +double FilterExpression::getLat() const +{ + return m_Lat; +} + +void FilterExpression::setLat(double value) +{ + m_Lat = value; + m_LatIsSet = true; +} + +bool FilterExpression::latIsSet() const +{ + return m_LatIsSet; +} + +void FilterExpression::unsetLat() +{ + m_LatIsSet = false; +} +double FilterExpression::getLong() const +{ + return m_long; +} + +void FilterExpression::setLong(double value) +{ + m_long = value; + m_longIsSet = true; +} + +bool FilterExpression::r_longIsSet() const +{ + return m_longIsSet; +} + +void FilterExpression::unsetlong() +{ + m_longIsSet = false; +} +utility::string_t FilterExpression::getRelation() const { return m_Relation; } -void FilterExpressions::setRelation(const utility::string_t& value) +void FilterExpression::setRelation(const utility::string_t& value) { m_Relation = value; m_RelationIsSet = true; } -bool FilterExpressions::relationIsSet() const +bool FilterExpression::relationIsSet() const { return m_RelationIsSet; } -void FilterExpressions::unsetRelation() +void FilterExpression::unsetRelation() { m_RelationIsSet = false; } -utility::string_t FilterExpressions::getROperator() const +utility::string_t FilterExpression::getROperator() const { return m_r_operator; } -void FilterExpressions::setROperator(const utility::string_t& value) +void FilterExpression::setROperator(const utility::string_t& value) { m_r_operator = value; m_r_operatorIsSet = true; } -bool FilterExpressions::rOperatorIsSet() const +bool FilterExpression::rOperatorIsSet() const { return m_r_operatorIsSet; } -void FilterExpressions::unsetr_operator() +void FilterExpression::unsetr_operator() { m_r_operatorIsSet = false; } diff --git a/src/model/GenericError.cpp b/src/model/GenericError.cpp index 17695cb..bd7ab7a 100644 --- a/src/model/GenericError.cpp +++ b/src/model/GenericError.cpp @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. @@ -24,6 +24,9 @@ namespace model { GenericError::GenericError() { m_ErrorsIsSet = false; + m_Success = false; + m_SuccessIsSet = false; + m_ReferenceIsSet = false; } GenericError::~GenericError() @@ -44,6 +47,14 @@ web::json::value GenericError::toJson() const { val[utility::conversions::to_string_t(U("errors"))] = ModelBase::toJson(m_Errors); } + if(m_SuccessIsSet) + { + val[utility::conversions::to_string_t(U("success"))] = ModelBase::toJson(m_Success); + } + if(m_ReferenceIsSet) + { + val[utility::conversions::to_string_t(U("reference"))] = ModelBase::toJson(m_Reference); + } return val; } @@ -57,11 +68,31 @@ bool GenericError::fromJson(const web::json::value& val) const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("errors"))); if(!fieldValue.is_null()) { - std::vector> refVal_setErrors; + std::shared_ptr refVal_setErrors; ok &= ModelBase::fromJson(fieldValue, refVal_setErrors); setErrors(refVal_setErrors); } } + if(val.has_field(utility::conversions::to_string_t(U("success")))) + { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("success"))); + if(!fieldValue.is_null()) + { + bool refVal_setSuccess; + ok &= ModelBase::fromJson(fieldValue, refVal_setSuccess); + setSuccess(refVal_setSuccess); + } + } + if(val.has_field(utility::conversions::to_string_t(U("reference")))) + { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("reference"))); + if(!fieldValue.is_null()) + { + std::shared_ptr refVal_setReference; + ok &= ModelBase::fromJson(fieldValue, refVal_setReference); + setReference(refVal_setReference); + } + } return ok; } @@ -76,6 +107,14 @@ void GenericError::toMultipart(std::shared_ptr multipart, con { multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("errors")), m_Errors)); } + if(m_SuccessIsSet) + { + multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("success")), m_Success)); + } + if(m_ReferenceIsSet) + { + multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("reference")), m_Reference)); + } } bool GenericError::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) @@ -89,19 +128,31 @@ bool GenericError::fromMultiPart(std::shared_ptr multipart, c if(multipart->hasContent(utility::conversions::to_string_t(U("errors")))) { - std::vector> refVal_setErrors; + std::shared_ptr refVal_setErrors; ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("errors"))), refVal_setErrors ); setErrors(refVal_setErrors); } + if(multipart->hasContent(utility::conversions::to_string_t(U("success")))) + { + bool refVal_setSuccess; + ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("success"))), refVal_setSuccess ); + setSuccess(refVal_setSuccess); + } + if(multipart->hasContent(utility::conversions::to_string_t(U("reference")))) + { + std::shared_ptr refVal_setReference; + ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("reference"))), refVal_setReference ); + setReference(refVal_setReference); + } return ok; } -std::vector>& GenericError::getErrors() +std::shared_ptr GenericError::getErrors() const { return m_Errors; } -void GenericError::setErrors(const std::vector>& value) +void GenericError::setErrors(const std::shared_ptr& value) { m_Errors = value; m_ErrorsIsSet = true; @@ -116,6 +167,46 @@ void GenericError::unsetErrors() { m_ErrorsIsSet = false; } +bool GenericError::isSuccess() const +{ + return m_Success; +} + +void GenericError::setSuccess(bool value) +{ + m_Success = value; + m_SuccessIsSet = true; +} + +bool GenericError::successIsSet() const +{ + return m_SuccessIsSet; +} + +void GenericError::unsetSuccess() +{ + m_SuccessIsSet = false; +} +std::shared_ptr GenericError::getReference() const +{ + return m_Reference; +} + +void GenericError::setReference(const std::shared_ptr& value) +{ + m_Reference = value; + m_ReferenceIsSet = true; +} + +bool GenericError::referenceIsSet() const +{ + return m_ReferenceIsSet; +} + +void GenericError::unsetReference() +{ + m_ReferenceIsSet = false; +} } } } diff --git a/src/model/GenericError_errors_inner.cpp b/src/model/GenericError_errors_inner.cpp deleted file mode 100644 index c74e7f2..0000000 --- a/src/model/GenericError_errors_inner.cpp +++ /dev/null @@ -1,171 +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.4.0 - * Contact: devrel@onesignal.com - * - * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOneSignalAPIClient/model/GenericError_errors_inner.h" - -namespace com { -namespace onesignal { -namespace client { -namespace model { - - - -GenericError_errors_inner::GenericError_errors_inner() -{ - m_Code = utility::conversions::to_string_t(""); - m_CodeIsSet = false; - m_Title = utility::conversions::to_string_t(""); - m_TitleIsSet = false; -} - -GenericError_errors_inner::~GenericError_errors_inner() -{ -} - -void GenericError_errors_inner::validate() -{ - // TODO: implement validation -} - -web::json::value GenericError_errors_inner::toJson() const -{ - - web::json::value val = web::json::value::object(); - - if(m_CodeIsSet) - { - val[utility::conversions::to_string_t(U("code"))] = ModelBase::toJson(m_Code); - } - if(m_TitleIsSet) - { - val[utility::conversions::to_string_t(U("title"))] = ModelBase::toJson(m_Title); - } - - return val; -} - -bool GenericError_errors_inner::fromJson(const web::json::value& val) -{ - bool ok = true; - - if(val.has_field(utility::conversions::to_string_t(U("code")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("code"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setCode; - ok &= ModelBase::fromJson(fieldValue, refVal_setCode); - setCode(refVal_setCode); - } - } - if(val.has_field(utility::conversions::to_string_t(U("title")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("title"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setTitle; - ok &= ModelBase::fromJson(fieldValue, refVal_setTitle); - setTitle(refVal_setTitle); - } - } - return ok; -} - -void GenericError_errors_inner::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - if(m_CodeIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("code")), m_Code)); - } - if(m_TitleIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("title")), m_Title)); - } -} - -bool GenericError_errors_inner::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(U("code")))) - { - utility::string_t refVal_setCode; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("code"))), refVal_setCode ); - setCode(refVal_setCode); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("title")))) - { - utility::string_t refVal_setTitle; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("title"))), refVal_setTitle ); - setTitle(refVal_setTitle); - } - return ok; -} - -utility::string_t GenericError_errors_inner::getCode() const -{ - return m_Code; -} - -void GenericError_errors_inner::setCode(const utility::string_t& value) -{ - m_Code = value; - m_CodeIsSet = true; -} - -bool GenericError_errors_inner::codeIsSet() const -{ - return m_CodeIsSet; -} - -void GenericError_errors_inner::unsetCode() -{ - m_CodeIsSet = false; -} -utility::string_t GenericError_errors_inner::getTitle() const -{ - return m_Title; -} - -void GenericError_errors_inner::setTitle(const utility::string_t& value) -{ - m_Title = value; - m_TitleIsSet = true; -} - -bool GenericError_errors_inner::titleIsSet() const -{ - return m_TitleIsSet; -} - -void GenericError_errors_inner::unsetTitle() -{ - m_TitleIsSet = false; -} -} -} -} -} - - diff --git a/src/model/DeletePlayerSuccessResponse.cpp b/src/model/GenericSuccessBoolResponse.cpp similarity index 72% rename from src/model/DeletePlayerSuccessResponse.cpp rename to src/model/GenericSuccessBoolResponse.cpp index 75a341f..b9d25f3 100644 --- a/src/model/DeletePlayerSuccessResponse.cpp +++ b/src/model/GenericSuccessBoolResponse.cpp @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. @@ -12,7 +12,7 @@ -#include "CppRestOneSignalAPIClient/model/DeletePlayerSuccessResponse.h" +#include "CppRestOneSignalAPIClient/model/GenericSuccessBoolResponse.h" namespace com { namespace onesignal { @@ -21,22 +21,22 @@ namespace model { -DeletePlayerSuccessResponse::DeletePlayerSuccessResponse() +GenericSuccessBoolResponse::GenericSuccessBoolResponse() { m_Success = false; m_SuccessIsSet = false; } -DeletePlayerSuccessResponse::~DeletePlayerSuccessResponse() +GenericSuccessBoolResponse::~GenericSuccessBoolResponse() { } -void DeletePlayerSuccessResponse::validate() +void GenericSuccessBoolResponse::validate() { // TODO: implement validation } -web::json::value DeletePlayerSuccessResponse::toJson() const +web::json::value GenericSuccessBoolResponse::toJson() const { web::json::value val = web::json::value::object(); @@ -49,7 +49,7 @@ web::json::value DeletePlayerSuccessResponse::toJson() const return val; } -bool DeletePlayerSuccessResponse::fromJson(const web::json::value& val) +bool GenericSuccessBoolResponse::fromJson(const web::json::value& val) { bool ok = true; @@ -66,7 +66,7 @@ bool DeletePlayerSuccessResponse::fromJson(const web::json::value& val) return ok; } -void DeletePlayerSuccessResponse::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const +void GenericSuccessBoolResponse::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const { utility::string_t namePrefix = prefix; if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) @@ -79,7 +79,7 @@ void DeletePlayerSuccessResponse::toMultipart(std::shared_ptr } } -bool DeletePlayerSuccessResponse::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) +bool GenericSuccessBoolResponse::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) { bool ok = true; utility::string_t namePrefix = prefix; @@ -97,23 +97,23 @@ bool DeletePlayerSuccessResponse::fromMultiPart(std::shared_ptr> refVal_setPlayers; - ok &= ModelBase::fromJson(fieldValue, refVal_setPlayers); - setPlayers(refVal_setPlayers); + std::vector> refVal_setSegments; + ok &= ModelBase::fromJson(fieldValue, refVal_setSegments); + setSegments(refVal_setSegments); } } return ok; } -void PlayerSlice::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const +void GetSegmentsSuccessResponse::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const { utility::string_t namePrefix = prefix; if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) @@ -132,13 +132,13 @@ void PlayerSlice::toMultipart(std::shared_ptr multipart, cons { multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("limit")), m_Limit)); } - if(m_PlayersIsSet) + if(m_SegmentsIsSet) { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("players")), m_Players)); + multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("segments")), m_Segments)); } } -bool PlayerSlice::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) +bool GetSegmentsSuccessResponse::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) { bool ok = true; utility::string_t namePrefix = prefix; @@ -165,94 +165,94 @@ bool PlayerSlice::fromMultiPart(std::shared_ptr multipart, co ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("limit"))), refVal_setLimit ); setLimit(refVal_setLimit); } - if(multipart->hasContent(utility::conversions::to_string_t(U("players")))) + if(multipart->hasContent(utility::conversions::to_string_t(U("segments")))) { - std::vector> refVal_setPlayers; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("players"))), refVal_setPlayers ); - setPlayers(refVal_setPlayers); + std::vector> refVal_setSegments; + ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("segments"))), refVal_setSegments ); + setSegments(refVal_setSegments); } return ok; } -int32_t PlayerSlice::getTotalCount() const +int32_t GetSegmentsSuccessResponse::getTotalCount() const { return m_Total_count; } -void PlayerSlice::setTotalCount(int32_t value) +void GetSegmentsSuccessResponse::setTotalCount(int32_t value) { m_Total_count = value; m_Total_countIsSet = true; } -bool PlayerSlice::totalCountIsSet() const +bool GetSegmentsSuccessResponse::totalCountIsSet() const { return m_Total_countIsSet; } -void PlayerSlice::unsetTotal_count() +void GetSegmentsSuccessResponse::unsetTotal_count() { m_Total_countIsSet = false; } -int32_t PlayerSlice::getOffset() const +int32_t GetSegmentsSuccessResponse::getOffset() const { return m_Offset; } -void PlayerSlice::setOffset(int32_t value) +void GetSegmentsSuccessResponse::setOffset(int32_t value) { m_Offset = value; m_OffsetIsSet = true; } -bool PlayerSlice::offsetIsSet() const +bool GetSegmentsSuccessResponse::offsetIsSet() const { return m_OffsetIsSet; } -void PlayerSlice::unsetOffset() +void GetSegmentsSuccessResponse::unsetOffset() { m_OffsetIsSet = false; } -int32_t PlayerSlice::getLimit() const +int32_t GetSegmentsSuccessResponse::getLimit() const { return m_Limit; } -void PlayerSlice::setLimit(int32_t value) +void GetSegmentsSuccessResponse::setLimit(int32_t value) { m_Limit = value; m_LimitIsSet = true; } -bool PlayerSlice::limitIsSet() const +bool GetSegmentsSuccessResponse::limitIsSet() const { return m_LimitIsSet; } -void PlayerSlice::unsetLimit() +void GetSegmentsSuccessResponse::unsetLimit() { m_LimitIsSet = false; } -std::vector>& PlayerSlice::getPlayers() +std::vector>& GetSegmentsSuccessResponse::getSegments() { - return m_Players; + return m_Segments; } -void PlayerSlice::setPlayers(const std::vector>& value) +void GetSegmentsSuccessResponse::setSegments(const std::vector>& value) { - m_Players = value; - m_PlayersIsSet = true; + m_Segments = value; + m_SegmentsIsSet = true; } -bool PlayerSlice::playersIsSet() const +bool GetSegmentsSuccessResponse::segmentsIsSet() const { - return m_PlayersIsSet; + return m_SegmentsIsSet; } -void PlayerSlice::unsetPlayers() +void GetSegmentsSuccessResponse::unsetSegments() { - m_PlayersIsSet = false; + m_SegmentsIsSet = false; } } } diff --git a/src/model/Get_notification_request_body.cpp b/src/model/Get_notification_history_request_body.cpp similarity index 74% rename from src/model/Get_notification_request_body.cpp rename to src/model/Get_notification_history_request_body.cpp index a8e8705..39343cc 100644 --- a/src/model/Get_notification_request_body.cpp +++ b/src/model/Get_notification_history_request_body.cpp @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. @@ -12,7 +12,7 @@ -#include "CppRestOneSignalAPIClient/model/Get_notification_request_body.h" +#include "CppRestOneSignalAPIClient/model/Get_notification_history_request_body.h" namespace com { namespace onesignal { @@ -21,7 +21,7 @@ namespace model { -Get_notification_request_body::Get_notification_request_body() +Get_notification_history_request_body::Get_notification_history_request_body() { m_Events = utility::conversions::to_string_t(""); m_EventsIsSet = false; @@ -31,16 +31,16 @@ Get_notification_request_body::Get_notification_request_body() m_App_idIsSet = false; } -Get_notification_request_body::~Get_notification_request_body() +Get_notification_history_request_body::~Get_notification_history_request_body() { } -void Get_notification_request_body::validate() +void Get_notification_history_request_body::validate() { // TODO: implement validation } -web::json::value Get_notification_request_body::toJson() const +web::json::value Get_notification_history_request_body::toJson() const { web::json::value val = web::json::value::object(); @@ -61,7 +61,7 @@ web::json::value Get_notification_request_body::toJson() const return val; } -bool Get_notification_request_body::fromJson(const web::json::value& val) +bool Get_notification_history_request_body::fromJson(const web::json::value& val) { bool ok = true; @@ -98,7 +98,7 @@ bool Get_notification_request_body::fromJson(const web::json::value& val) return ok; } -void Get_notification_request_body::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const +void Get_notification_history_request_body::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const { utility::string_t namePrefix = prefix; if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) @@ -119,7 +119,7 @@ void Get_notification_request_body::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) +bool Get_notification_history_request_body::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) { bool ok = true; utility::string_t namePrefix = prefix; @@ -149,63 +149,63 @@ bool Get_notification_request_body::fromMultiPart(std::shared_ptr> refVal_setInAppMessages; - ok &= ModelBase::fromJson(fieldValue, refVal_setInAppMessages); - setInAppMessages(refVal_setInAppMessages); - } - } - return ok; -} - -void Inline_response_200_3::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - if(m_In_app_messagesIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("in_app_messages")), m_In_app_messages)); - } -} - -bool Inline_response_200_3::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(U("in_app_messages")))) - { - std::vector> refVal_setInAppMessages; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("in_app_messages"))), refVal_setInAppMessages ); - setInAppMessages(refVal_setInAppMessages); - } - return ok; -} - -std::vector>& Inline_response_200_3::getInAppMessages() -{ - return m_In_app_messages; -} - -void Inline_response_200_3::setInAppMessages(const std::vector>& value) -{ - m_In_app_messages = value; - m_In_app_messagesIsSet = true; -} - -bool Inline_response_200_3::inAppMessagesIsSet() const -{ - return m_In_app_messagesIsSet; -} - -void Inline_response_200_3::unsetIn_app_messages() -{ - m_In_app_messagesIsSet = false; -} -} -} -} -} - - diff --git a/src/model/InvalidIdentifierError.cpp b/src/model/InvalidIdentifierError.cpp deleted file mode 100644 index 0ead081..0000000 --- a/src/model/InvalidIdentifierError.cpp +++ /dev/null @@ -1,169 +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.4.0 - * Contact: devrel@onesignal.com - * - * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOneSignalAPIClient/model/InvalidIdentifierError.h" - -namespace com { -namespace onesignal { -namespace client { -namespace model { - - - -InvalidIdentifierError::InvalidIdentifierError() -{ - m_Invalid_external_user_idsIsSet = false; - m_Invalid_player_idsIsSet = false; -} - -InvalidIdentifierError::~InvalidIdentifierError() -{ -} - -void InvalidIdentifierError::validate() -{ - // TODO: implement validation -} - -web::json::value InvalidIdentifierError::toJson() const -{ - - web::json::value val = web::json::value::object(); - - if(m_Invalid_external_user_idsIsSet) - { - val[utility::conversions::to_string_t(U("invalid_external_user_ids"))] = ModelBase::toJson(m_Invalid_external_user_ids); - } - if(m_Invalid_player_idsIsSet) - { - val[utility::conversions::to_string_t(U("invalid_player_ids"))] = ModelBase::toJson(m_Invalid_player_ids); - } - - return val; -} - -bool InvalidIdentifierError::fromJson(const web::json::value& val) -{ - bool ok = true; - - if(val.has_field(utility::conversions::to_string_t(U("invalid_external_user_ids")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("invalid_external_user_ids"))); - if(!fieldValue.is_null()) - { - std::vector refVal_setInvalidExternalUserIds; - ok &= ModelBase::fromJson(fieldValue, refVal_setInvalidExternalUserIds); - setInvalidExternalUserIds(refVal_setInvalidExternalUserIds); - } - } - if(val.has_field(utility::conversions::to_string_t(U("invalid_player_ids")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("invalid_player_ids"))); - if(!fieldValue.is_null()) - { - std::vector refVal_setInvalidPlayerIds; - ok &= ModelBase::fromJson(fieldValue, refVal_setInvalidPlayerIds); - setInvalidPlayerIds(refVal_setInvalidPlayerIds); - } - } - return ok; -} - -void InvalidIdentifierError::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - if(m_Invalid_external_user_idsIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("invalid_external_user_ids")), m_Invalid_external_user_ids)); - } - if(m_Invalid_player_idsIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("invalid_player_ids")), m_Invalid_player_ids)); - } -} - -bool InvalidIdentifierError::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(U("invalid_external_user_ids")))) - { - std::vector refVal_setInvalidExternalUserIds; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("invalid_external_user_ids"))), refVal_setInvalidExternalUserIds ); - setInvalidExternalUserIds(refVal_setInvalidExternalUserIds); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("invalid_player_ids")))) - { - std::vector refVal_setInvalidPlayerIds; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("invalid_player_ids"))), refVal_setInvalidPlayerIds ); - setInvalidPlayerIds(refVal_setInvalidPlayerIds); - } - return ok; -} - -std::vector& InvalidIdentifierError::getInvalidExternalUserIds() -{ - return m_Invalid_external_user_ids; -} - -void InvalidIdentifierError::setInvalidExternalUserIds(const std::vector& value) -{ - m_Invalid_external_user_ids = value; - m_Invalid_external_user_idsIsSet = true; -} - -bool InvalidIdentifierError::invalidExternalUserIdsIsSet() const -{ - return m_Invalid_external_user_idsIsSet; -} - -void InvalidIdentifierError::unsetInvalid_external_user_ids() -{ - m_Invalid_external_user_idsIsSet = false; -} -std::vector& InvalidIdentifierError::getInvalidPlayerIds() -{ - return m_Invalid_player_ids; -} - -void InvalidIdentifierError::setInvalidPlayerIds(const std::vector& value) -{ - m_Invalid_player_ids = value; - m_Invalid_player_idsIsSet = true; -} - -bool InvalidIdentifierError::invalidPlayerIdsIsSet() const -{ - return m_Invalid_player_idsIsSet; -} - -void InvalidIdentifierError::unsetInvalid_player_ids() -{ - m_Invalid_player_idsIsSet = false; -} -} -} -} -} - - diff --git a/src/model/StringMap.cpp b/src/model/LanguageStringMap.cpp similarity index 84% rename from src/model/StringMap.cpp rename to src/model/LanguageStringMap.cpp index 2c3bd80..5219d18 100644 --- a/src/model/StringMap.cpp +++ b/src/model/LanguageStringMap.cpp @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. @@ -12,7 +12,7 @@ -#include "CppRestOneSignalAPIClient/model/StringMap.h" +#include "CppRestOneSignalAPIClient/model/LanguageStringMap.h" namespace com { namespace onesignal { @@ -21,7 +21,7 @@ namespace model { -StringMap::StringMap() +LanguageStringMap::LanguageStringMap() { m_En = utility::conversions::to_string_t(""); m_EnIsSet = false; @@ -111,16 +111,16 @@ StringMap::StringMap() m_ViIsSet = false; } -StringMap::~StringMap() +LanguageStringMap::~LanguageStringMap() { } -void StringMap::validate() +void LanguageStringMap::validate() { // TODO: implement validation } -web::json::value StringMap::toJson() const +web::json::value LanguageStringMap::toJson() const { web::json::value val = web::json::value::object(); @@ -301,7 +301,7 @@ web::json::value StringMap::toJson() const return val; } -bool StringMap::fromJson(const web::json::value& val) +bool LanguageStringMap::fromJson(const web::json::value& val) { bool ok = true; @@ -738,7 +738,7 @@ bool StringMap::fromJson(const web::json::value& val) return ok; } -void StringMap::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const +void LanguageStringMap::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const { utility::string_t namePrefix = prefix; if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) @@ -919,7 +919,7 @@ void StringMap::toMultipart(std::shared_ptr multipart, const } } -bool StringMap::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) +bool LanguageStringMap::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) { bool ok = true; utility::string_t namePrefix = prefix; @@ -1189,863 +1189,863 @@ bool StringMap::fromMultiPart(std::shared_ptr multipart, cons return ok; } -utility::string_t StringMap::getEn() const +utility::string_t LanguageStringMap::getEn() const { return m_En; } -void StringMap::setEn(const utility::string_t& value) +void LanguageStringMap::setEn(const utility::string_t& value) { m_En = value; m_EnIsSet = true; } -bool StringMap::enIsSet() const +bool LanguageStringMap::enIsSet() const { return m_EnIsSet; } -void StringMap::unsetEn() +void LanguageStringMap::unsetEn() { m_EnIsSet = false; } -utility::string_t StringMap::getAr() const +utility::string_t LanguageStringMap::getAr() const { return m_Ar; } -void StringMap::setAr(const utility::string_t& value) +void LanguageStringMap::setAr(const utility::string_t& value) { m_Ar = value; m_ArIsSet = true; } -bool StringMap::arIsSet() const +bool LanguageStringMap::arIsSet() const { return m_ArIsSet; } -void StringMap::unsetAr() +void LanguageStringMap::unsetAr() { m_ArIsSet = false; } -utility::string_t StringMap::getBs() const +utility::string_t LanguageStringMap::getBs() const { return m_Bs; } -void StringMap::setBs(const utility::string_t& value) +void LanguageStringMap::setBs(const utility::string_t& value) { m_Bs = value; m_BsIsSet = true; } -bool StringMap::bsIsSet() const +bool LanguageStringMap::bsIsSet() const { return m_BsIsSet; } -void StringMap::unsetBs() +void LanguageStringMap::unsetBs() { m_BsIsSet = false; } -utility::string_t StringMap::getBg() const +utility::string_t LanguageStringMap::getBg() const { return m_Bg; } -void StringMap::setBg(const utility::string_t& value) +void LanguageStringMap::setBg(const utility::string_t& value) { m_Bg = value; m_BgIsSet = true; } -bool StringMap::bgIsSet() const +bool LanguageStringMap::bgIsSet() const { return m_BgIsSet; } -void StringMap::unsetBg() +void LanguageStringMap::unsetBg() { m_BgIsSet = false; } -utility::string_t StringMap::getCa() const +utility::string_t LanguageStringMap::getCa() const { return m_Ca; } -void StringMap::setCa(const utility::string_t& value) +void LanguageStringMap::setCa(const utility::string_t& value) { m_Ca = value; m_CaIsSet = true; } -bool StringMap::caIsSet() const +bool LanguageStringMap::caIsSet() const { return m_CaIsSet; } -void StringMap::unsetCa() +void LanguageStringMap::unsetCa() { m_CaIsSet = false; } -utility::string_t StringMap::getZhHans() const +utility::string_t LanguageStringMap::getZhHans() const { return m_Zh_Hans; } -void StringMap::setZhHans(const utility::string_t& value) +void LanguageStringMap::setZhHans(const utility::string_t& value) { m_Zh_Hans = value; m_Zh_HansIsSet = true; } -bool StringMap::zhHansIsSet() const +bool LanguageStringMap::zhHansIsSet() const { return m_Zh_HansIsSet; } -void StringMap::unsetZh_Hans() +void LanguageStringMap::unsetZh_Hans() { m_Zh_HansIsSet = false; } -utility::string_t StringMap::getZhHant() const +utility::string_t LanguageStringMap::getZhHant() const { return m_Zh_Hant; } -void StringMap::setZhHant(const utility::string_t& value) +void LanguageStringMap::setZhHant(const utility::string_t& value) { m_Zh_Hant = value; m_Zh_HantIsSet = true; } -bool StringMap::zhHantIsSet() const +bool LanguageStringMap::zhHantIsSet() const { return m_Zh_HantIsSet; } -void StringMap::unsetZh_Hant() +void LanguageStringMap::unsetZh_Hant() { m_Zh_HantIsSet = false; } -utility::string_t StringMap::getZh() const +utility::string_t LanguageStringMap::getZh() const { return m_Zh; } -void StringMap::setZh(const utility::string_t& value) +void LanguageStringMap::setZh(const utility::string_t& value) { m_Zh = value; m_ZhIsSet = true; } -bool StringMap::zhIsSet() const +bool LanguageStringMap::zhIsSet() const { return m_ZhIsSet; } -void StringMap::unsetZh() +void LanguageStringMap::unsetZh() { m_ZhIsSet = false; } -utility::string_t StringMap::getHr() const +utility::string_t LanguageStringMap::getHr() const { return m_Hr; } -void StringMap::setHr(const utility::string_t& value) +void LanguageStringMap::setHr(const utility::string_t& value) { m_Hr = value; m_HrIsSet = true; } -bool StringMap::hrIsSet() const +bool LanguageStringMap::hrIsSet() const { return m_HrIsSet; } -void StringMap::unsetHr() +void LanguageStringMap::unsetHr() { m_HrIsSet = false; } -utility::string_t StringMap::getCs() const +utility::string_t LanguageStringMap::getCs() const { return m_Cs; } -void StringMap::setCs(const utility::string_t& value) +void LanguageStringMap::setCs(const utility::string_t& value) { m_Cs = value; m_CsIsSet = true; } -bool StringMap::csIsSet() const +bool LanguageStringMap::csIsSet() const { return m_CsIsSet; } -void StringMap::unsetCs() +void LanguageStringMap::unsetCs() { m_CsIsSet = false; } -utility::string_t StringMap::getDa() const +utility::string_t LanguageStringMap::getDa() const { return m_Da; } -void StringMap::setDa(const utility::string_t& value) +void LanguageStringMap::setDa(const utility::string_t& value) { m_Da = value; m_DaIsSet = true; } -bool StringMap::daIsSet() const +bool LanguageStringMap::daIsSet() const { return m_DaIsSet; } -void StringMap::unsetDa() +void LanguageStringMap::unsetDa() { m_DaIsSet = false; } -utility::string_t StringMap::getNl() const +utility::string_t LanguageStringMap::getNl() const { return m_Nl; } -void StringMap::setNl(const utility::string_t& value) +void LanguageStringMap::setNl(const utility::string_t& value) { m_Nl = value; m_NlIsSet = true; } -bool StringMap::nlIsSet() const +bool LanguageStringMap::nlIsSet() const { return m_NlIsSet; } -void StringMap::unsetNl() +void LanguageStringMap::unsetNl() { m_NlIsSet = false; } -utility::string_t StringMap::getEt() const +utility::string_t LanguageStringMap::getEt() const { return m_Et; } -void StringMap::setEt(const utility::string_t& value) +void LanguageStringMap::setEt(const utility::string_t& value) { m_Et = value; m_EtIsSet = true; } -bool StringMap::etIsSet() const +bool LanguageStringMap::etIsSet() const { return m_EtIsSet; } -void StringMap::unsetEt() +void LanguageStringMap::unsetEt() { m_EtIsSet = false; } -utility::string_t StringMap::getFi() const +utility::string_t LanguageStringMap::getFi() const { return m_Fi; } -void StringMap::setFi(const utility::string_t& value) +void LanguageStringMap::setFi(const utility::string_t& value) { m_Fi = value; m_FiIsSet = true; } -bool StringMap::fiIsSet() const +bool LanguageStringMap::fiIsSet() const { return m_FiIsSet; } -void StringMap::unsetFi() +void LanguageStringMap::unsetFi() { m_FiIsSet = false; } -utility::string_t StringMap::getFr() const +utility::string_t LanguageStringMap::getFr() const { return m_Fr; } -void StringMap::setFr(const utility::string_t& value) +void LanguageStringMap::setFr(const utility::string_t& value) { m_Fr = value; m_FrIsSet = true; } -bool StringMap::frIsSet() const +bool LanguageStringMap::frIsSet() const { return m_FrIsSet; } -void StringMap::unsetFr() +void LanguageStringMap::unsetFr() { m_FrIsSet = false; } -utility::string_t StringMap::getKa() const +utility::string_t LanguageStringMap::getKa() const { return m_Ka; } -void StringMap::setKa(const utility::string_t& value) +void LanguageStringMap::setKa(const utility::string_t& value) { m_Ka = value; m_KaIsSet = true; } -bool StringMap::kaIsSet() const +bool LanguageStringMap::kaIsSet() const { return m_KaIsSet; } -void StringMap::unsetKa() +void LanguageStringMap::unsetKa() { m_KaIsSet = false; } -utility::string_t StringMap::getDe() const +utility::string_t LanguageStringMap::getDe() const { return m_De; } -void StringMap::setDe(const utility::string_t& value) +void LanguageStringMap::setDe(const utility::string_t& value) { m_De = value; m_DeIsSet = true; } -bool StringMap::deIsSet() const +bool LanguageStringMap::deIsSet() const { return m_DeIsSet; } -void StringMap::unsetDe() +void LanguageStringMap::unsetDe() { m_DeIsSet = false; } -utility::string_t StringMap::getEl() const +utility::string_t LanguageStringMap::getEl() const { return m_El; } -void StringMap::setEl(const utility::string_t& value) +void LanguageStringMap::setEl(const utility::string_t& value) { m_El = value; m_ElIsSet = true; } -bool StringMap::elIsSet() const +bool LanguageStringMap::elIsSet() const { return m_ElIsSet; } -void StringMap::unsetEl() +void LanguageStringMap::unsetEl() { m_ElIsSet = false; } -utility::string_t StringMap::getHi() const +utility::string_t LanguageStringMap::getHi() const { return m_Hi; } -void StringMap::setHi(const utility::string_t& value) +void LanguageStringMap::setHi(const utility::string_t& value) { m_Hi = value; m_HiIsSet = true; } -bool StringMap::hiIsSet() const +bool LanguageStringMap::hiIsSet() const { return m_HiIsSet; } -void StringMap::unsetHi() +void LanguageStringMap::unsetHi() { m_HiIsSet = false; } -utility::string_t StringMap::getHe() const +utility::string_t LanguageStringMap::getHe() const { return m_He; } -void StringMap::setHe(const utility::string_t& value) +void LanguageStringMap::setHe(const utility::string_t& value) { m_He = value; m_HeIsSet = true; } -bool StringMap::heIsSet() const +bool LanguageStringMap::heIsSet() const { return m_HeIsSet; } -void StringMap::unsetHe() +void LanguageStringMap::unsetHe() { m_HeIsSet = false; } -utility::string_t StringMap::getHu() const +utility::string_t LanguageStringMap::getHu() const { return m_Hu; } -void StringMap::setHu(const utility::string_t& value) +void LanguageStringMap::setHu(const utility::string_t& value) { m_Hu = value; m_HuIsSet = true; } -bool StringMap::huIsSet() const +bool LanguageStringMap::huIsSet() const { return m_HuIsSet; } -void StringMap::unsetHu() +void LanguageStringMap::unsetHu() { m_HuIsSet = false; } -utility::string_t StringMap::getId() const +utility::string_t LanguageStringMap::getId() const { return m_Id; } -void StringMap::setId(const utility::string_t& value) +void LanguageStringMap::setId(const utility::string_t& value) { m_Id = value; m_IdIsSet = true; } -bool StringMap::idIsSet() const +bool LanguageStringMap::idIsSet() const { return m_IdIsSet; } -void StringMap::unsetId() +void LanguageStringMap::unsetId() { m_IdIsSet = false; } -utility::string_t StringMap::getIt() const +utility::string_t LanguageStringMap::getIt() const { return m_It; } -void StringMap::setIt(const utility::string_t& value) +void LanguageStringMap::setIt(const utility::string_t& value) { m_It = value; m_ItIsSet = true; } -bool StringMap::itIsSet() const +bool LanguageStringMap::itIsSet() const { return m_ItIsSet; } -void StringMap::unsetIt() +void LanguageStringMap::unsetIt() { m_ItIsSet = false; } -utility::string_t StringMap::getJa() const +utility::string_t LanguageStringMap::getJa() const { return m_Ja; } -void StringMap::setJa(const utility::string_t& value) +void LanguageStringMap::setJa(const utility::string_t& value) { m_Ja = value; m_JaIsSet = true; } -bool StringMap::jaIsSet() const +bool LanguageStringMap::jaIsSet() const { return m_JaIsSet; } -void StringMap::unsetJa() +void LanguageStringMap::unsetJa() { m_JaIsSet = false; } -utility::string_t StringMap::getKo() const +utility::string_t LanguageStringMap::getKo() const { return m_Ko; } -void StringMap::setKo(const utility::string_t& value) +void LanguageStringMap::setKo(const utility::string_t& value) { m_Ko = value; m_KoIsSet = true; } -bool StringMap::koIsSet() const +bool LanguageStringMap::koIsSet() const { return m_KoIsSet; } -void StringMap::unsetKo() +void LanguageStringMap::unsetKo() { m_KoIsSet = false; } -utility::string_t StringMap::getLv() const +utility::string_t LanguageStringMap::getLv() const { return m_Lv; } -void StringMap::setLv(const utility::string_t& value) +void LanguageStringMap::setLv(const utility::string_t& value) { m_Lv = value; m_LvIsSet = true; } -bool StringMap::lvIsSet() const +bool LanguageStringMap::lvIsSet() const { return m_LvIsSet; } -void StringMap::unsetLv() +void LanguageStringMap::unsetLv() { m_LvIsSet = false; } -utility::string_t StringMap::getLt() const +utility::string_t LanguageStringMap::getLt() const { return m_Lt; } -void StringMap::setLt(const utility::string_t& value) +void LanguageStringMap::setLt(const utility::string_t& value) { m_Lt = value; m_LtIsSet = true; } -bool StringMap::ltIsSet() const +bool LanguageStringMap::ltIsSet() const { return m_LtIsSet; } -void StringMap::unsetLt() +void LanguageStringMap::unsetLt() { m_LtIsSet = false; } -utility::string_t StringMap::getMs() const +utility::string_t LanguageStringMap::getMs() const { return m_Ms; } -void StringMap::setMs(const utility::string_t& value) +void LanguageStringMap::setMs(const utility::string_t& value) { m_Ms = value; m_MsIsSet = true; } -bool StringMap::msIsSet() const +bool LanguageStringMap::msIsSet() const { return m_MsIsSet; } -void StringMap::unsetMs() +void LanguageStringMap::unsetMs() { m_MsIsSet = false; } -utility::string_t StringMap::getNb() const +utility::string_t LanguageStringMap::getNb() const { return m_Nb; } -void StringMap::setNb(const utility::string_t& value) +void LanguageStringMap::setNb(const utility::string_t& value) { m_Nb = value; m_NbIsSet = true; } -bool StringMap::nbIsSet() const +bool LanguageStringMap::nbIsSet() const { return m_NbIsSet; } -void StringMap::unsetNb() +void LanguageStringMap::unsetNb() { m_NbIsSet = false; } -utility::string_t StringMap::getPl() const +utility::string_t LanguageStringMap::getPl() const { return m_Pl; } -void StringMap::setPl(const utility::string_t& value) +void LanguageStringMap::setPl(const utility::string_t& value) { m_Pl = value; m_PlIsSet = true; } -bool StringMap::plIsSet() const +bool LanguageStringMap::plIsSet() const { return m_PlIsSet; } -void StringMap::unsetPl() +void LanguageStringMap::unsetPl() { m_PlIsSet = false; } -utility::string_t StringMap::getFa() const +utility::string_t LanguageStringMap::getFa() const { return m_Fa; } -void StringMap::setFa(const utility::string_t& value) +void LanguageStringMap::setFa(const utility::string_t& value) { m_Fa = value; m_FaIsSet = true; } -bool StringMap::faIsSet() const +bool LanguageStringMap::faIsSet() const { return m_FaIsSet; } -void StringMap::unsetFa() +void LanguageStringMap::unsetFa() { m_FaIsSet = false; } -utility::string_t StringMap::getPt() const +utility::string_t LanguageStringMap::getPt() const { return m_Pt; } -void StringMap::setPt(const utility::string_t& value) +void LanguageStringMap::setPt(const utility::string_t& value) { m_Pt = value; m_PtIsSet = true; } -bool StringMap::ptIsSet() const +bool LanguageStringMap::ptIsSet() const { return m_PtIsSet; } -void StringMap::unsetPt() +void LanguageStringMap::unsetPt() { m_PtIsSet = false; } -utility::string_t StringMap::getPa() const +utility::string_t LanguageStringMap::getPa() const { return m_Pa; } -void StringMap::setPa(const utility::string_t& value) +void LanguageStringMap::setPa(const utility::string_t& value) { m_Pa = value; m_PaIsSet = true; } -bool StringMap::paIsSet() const +bool LanguageStringMap::paIsSet() const { return m_PaIsSet; } -void StringMap::unsetPa() +void LanguageStringMap::unsetPa() { m_PaIsSet = false; } -utility::string_t StringMap::getRo() const +utility::string_t LanguageStringMap::getRo() const { return m_Ro; } -void StringMap::setRo(const utility::string_t& value) +void LanguageStringMap::setRo(const utility::string_t& value) { m_Ro = value; m_RoIsSet = true; } -bool StringMap::roIsSet() const +bool LanguageStringMap::roIsSet() const { return m_RoIsSet; } -void StringMap::unsetRo() +void LanguageStringMap::unsetRo() { m_RoIsSet = false; } -utility::string_t StringMap::getRu() const +utility::string_t LanguageStringMap::getRu() const { return m_Ru; } -void StringMap::setRu(const utility::string_t& value) +void LanguageStringMap::setRu(const utility::string_t& value) { m_Ru = value; m_RuIsSet = true; } -bool StringMap::ruIsSet() const +bool LanguageStringMap::ruIsSet() const { return m_RuIsSet; } -void StringMap::unsetRu() +void LanguageStringMap::unsetRu() { m_RuIsSet = false; } -utility::string_t StringMap::getSr() const +utility::string_t LanguageStringMap::getSr() const { return m_Sr; } -void StringMap::setSr(const utility::string_t& value) +void LanguageStringMap::setSr(const utility::string_t& value) { m_Sr = value; m_SrIsSet = true; } -bool StringMap::srIsSet() const +bool LanguageStringMap::srIsSet() const { return m_SrIsSet; } -void StringMap::unsetSr() +void LanguageStringMap::unsetSr() { m_SrIsSet = false; } -utility::string_t StringMap::getSk() const +utility::string_t LanguageStringMap::getSk() const { return m_Sk; } -void StringMap::setSk(const utility::string_t& value) +void LanguageStringMap::setSk(const utility::string_t& value) { m_Sk = value; m_SkIsSet = true; } -bool StringMap::skIsSet() const +bool LanguageStringMap::skIsSet() const { return m_SkIsSet; } -void StringMap::unsetSk() +void LanguageStringMap::unsetSk() { m_SkIsSet = false; } -utility::string_t StringMap::getEs() const +utility::string_t LanguageStringMap::getEs() const { return m_Es; } -void StringMap::setEs(const utility::string_t& value) +void LanguageStringMap::setEs(const utility::string_t& value) { m_Es = value; m_EsIsSet = true; } -bool StringMap::esIsSet() const +bool LanguageStringMap::esIsSet() const { return m_EsIsSet; } -void StringMap::unsetEs() +void LanguageStringMap::unsetEs() { m_EsIsSet = false; } -utility::string_t StringMap::getSv() const +utility::string_t LanguageStringMap::getSv() const { return m_Sv; } -void StringMap::setSv(const utility::string_t& value) +void LanguageStringMap::setSv(const utility::string_t& value) { m_Sv = value; m_SvIsSet = true; } -bool StringMap::svIsSet() const +bool LanguageStringMap::svIsSet() const { return m_SvIsSet; } -void StringMap::unsetSv() +void LanguageStringMap::unsetSv() { m_SvIsSet = false; } -utility::string_t StringMap::getTh() const +utility::string_t LanguageStringMap::getTh() const { return m_Th; } -void StringMap::setTh(const utility::string_t& value) +void LanguageStringMap::setTh(const utility::string_t& value) { m_Th = value; m_ThIsSet = true; } -bool StringMap::thIsSet() const +bool LanguageStringMap::thIsSet() const { return m_ThIsSet; } -void StringMap::unsetTh() +void LanguageStringMap::unsetTh() { m_ThIsSet = false; } -utility::string_t StringMap::getTr() const +utility::string_t LanguageStringMap::getTr() const { return m_Tr; } -void StringMap::setTr(const utility::string_t& value) +void LanguageStringMap::setTr(const utility::string_t& value) { m_Tr = value; m_TrIsSet = true; } -bool StringMap::trIsSet() const +bool LanguageStringMap::trIsSet() const { return m_TrIsSet; } -void StringMap::unsetTr() +void LanguageStringMap::unsetTr() { m_TrIsSet = false; } -utility::string_t StringMap::getUk() const +utility::string_t LanguageStringMap::getUk() const { return m_Uk; } -void StringMap::setUk(const utility::string_t& value) +void LanguageStringMap::setUk(const utility::string_t& value) { m_Uk = value; m_UkIsSet = true; } -bool StringMap::ukIsSet() const +bool LanguageStringMap::ukIsSet() const { return m_UkIsSet; } -void StringMap::unsetUk() +void LanguageStringMap::unsetUk() { m_UkIsSet = false; } -utility::string_t StringMap::getVi() const +utility::string_t LanguageStringMap::getVi() const { return m_Vi; } -void StringMap::setVi(const utility::string_t& value) +void LanguageStringMap::setVi(const utility::string_t& value) { m_Vi = value; m_ViIsSet = true; } -bool StringMap::viIsSet() const +bool LanguageStringMap::viIsSet() const { return m_ViIsSet; } -void StringMap::unsetVi() +void LanguageStringMap::unsetVi() { m_ViIsSet = false; } diff --git a/src/model/Notification.cpp b/src/model/Notification.cpp index 786b666..9c0b95a 100644 --- a/src/model/Notification.cpp +++ b/src/model/Notification.cpp @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. @@ -25,8 +25,7 @@ Notification::Notification() { m_Included_segmentsIsSet = false; m_Excluded_segmentsIsSet = false; - m_Include_player_idsIsSet = false; - m_Include_external_user_idsIsSet = false; + m_Include_subscription_idsIsSet = false; m_Include_email_tokensIsSet = false; m_Include_phone_numbersIsSet = false; m_Include_ios_tokensIsSet = false; @@ -66,8 +65,6 @@ Notification::Notification() m_IsAdmIsSet = false; m_IsChrome = false; m_IsChromeIsSet = false; - m_Channel_for_external_user_ids = utility::conversions::to_string_t(""); - m_Channel_for_external_user_idsIsSet = false; m_App_id = utility::conversions::to_string_t(""); m_App_idIsSet = false; m_External_id = utility::conversions::to_string_t(""); @@ -194,6 +191,10 @@ Notification::Notification() m_Summary_argIsSet = false; m_Summary_arg_count = 0; m_Summary_arg_countIsSet = false; + m_Ios_relevance_score = 0.0; + m_Ios_relevance_scoreIsSet = false; + m_Ios_interruption_level = utility::conversions::to_string_t(""); + m_Ios_interruption_levelIsSet = false; m_Email_subject = utility::conversions::to_string_t(""); m_Email_subjectIsSet = false; m_Email_body = utility::conversions::to_string_t(""); @@ -237,13 +238,9 @@ web::json::value Notification::toJson() const { val[utility::conversions::to_string_t(U("excluded_segments"))] = ModelBase::toJson(m_Excluded_segments); } - if(m_Include_player_idsIsSet) + if(m_Include_subscription_idsIsSet) { - val[utility::conversions::to_string_t(U("include_player_ids"))] = ModelBase::toJson(m_Include_player_ids); - } - if(m_Include_external_user_idsIsSet) - { - val[utility::conversions::to_string_t(U("include_external_user_ids"))] = ModelBase::toJson(m_Include_external_user_ids); + val[utility::conversions::to_string_t(U("include_subscription_ids"))] = ModelBase::toJson(m_Include_subscription_ids); } if(m_Include_email_tokensIsSet) { @@ -341,10 +338,6 @@ web::json::value Notification::toJson() const { val[utility::conversions::to_string_t(U("isChrome"))] = ModelBase::toJson(m_IsChrome); } - if(m_Channel_for_external_user_idsIsSet) - { - val[utility::conversions::to_string_t(U("channel_for_external_user_ids"))] = ModelBase::toJson(m_Channel_for_external_user_ids); - } if(m_App_idIsSet) { val[utility::conversions::to_string_t(U("app_id"))] = ModelBase::toJson(m_App_id); @@ -617,6 +610,14 @@ web::json::value Notification::toJson() const { val[utility::conversions::to_string_t(U("summary_arg_count"))] = ModelBase::toJson(m_Summary_arg_count); } + if(m_Ios_relevance_scoreIsSet) + { + val[utility::conversions::to_string_t(U("ios_relevance_score"))] = ModelBase::toJson(m_Ios_relevance_score); + } + if(m_Ios_interruption_levelIsSet) + { + val[utility::conversions::to_string_t(U("ios_interruption_level"))] = ModelBase::toJson(m_Ios_interruption_level); + } if(m_Email_subjectIsSet) { val[utility::conversions::to_string_t(U("email_subject"))] = ModelBase::toJson(m_Email_subject); @@ -689,24 +690,14 @@ bool Notification::fromJson(const web::json::value& val) setExcludedSegments(refVal_setExcludedSegments); } } - if(val.has_field(utility::conversions::to_string_t(U("include_player_ids")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("include_player_ids"))); - if(!fieldValue.is_null()) - { - std::vector refVal_setIncludePlayerIds; - ok &= ModelBase::fromJson(fieldValue, refVal_setIncludePlayerIds); - setIncludePlayerIds(refVal_setIncludePlayerIds); - } - } - if(val.has_field(utility::conversions::to_string_t(U("include_external_user_ids")))) + if(val.has_field(utility::conversions::to_string_t(U("include_subscription_ids")))) { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("include_external_user_ids"))); + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("include_subscription_ids"))); if(!fieldValue.is_null()) { - std::vector refVal_setIncludeExternalUserIds; - ok &= ModelBase::fromJson(fieldValue, refVal_setIncludeExternalUserIds); - setIncludeExternalUserIds(refVal_setIncludeExternalUserIds); + std::vector refVal_setIncludeSubscriptionIds; + ok &= ModelBase::fromJson(fieldValue, refVal_setIncludeSubscriptionIds); + setIncludeSubscriptionIds(refVal_setIncludeSubscriptionIds); } } if(val.has_field(utility::conversions::to_string_t(U("include_email_tokens")))) @@ -794,7 +785,7 @@ bool Notification::fromJson(const web::json::value& val) const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("include_aliases"))); if(!fieldValue.is_null()) { - std::shared_ptr refVal_setIncludeAliases; + std::map refVal_setIncludeAliases; ok &= ModelBase::fromJson(fieldValue, refVal_setIncludeAliases); setIncludeAliases(refVal_setIncludeAliases); } @@ -949,16 +940,6 @@ bool Notification::fromJson(const web::json::value& val) setIsChrome(refVal_setIsChrome); } } - if(val.has_field(utility::conversions::to_string_t(U("channel_for_external_user_ids")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("channel_for_external_user_ids"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setChannelForExternalUserIds; - ok &= ModelBase::fromJson(fieldValue, refVal_setChannelForExternalUserIds); - setChannelForExternalUserIds(refVal_setChannelForExternalUserIds); - } - } if(val.has_field(utility::conversions::to_string_t(U("app_id")))) { const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("app_id"))); @@ -994,7 +975,7 @@ bool Notification::fromJson(const web::json::value& val) const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("contents"))); if(!fieldValue.is_null()) { - std::shared_ptr refVal_setContents; + std::shared_ptr refVal_setContents; ok &= ModelBase::fromJson(fieldValue, refVal_setContents); setContents(refVal_setContents); } @@ -1004,7 +985,7 @@ bool Notification::fromJson(const web::json::value& val) const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("headings"))); if(!fieldValue.is_null()) { - std::shared_ptr refVal_setHeadings; + std::shared_ptr refVal_setHeadings; ok &= ModelBase::fromJson(fieldValue, refVal_setHeadings); setHeadings(refVal_setHeadings); } @@ -1014,7 +995,7 @@ bool Notification::fromJson(const web::json::value& val) const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("subtitle"))); if(!fieldValue.is_null()) { - std::shared_ptr refVal_setSubtitle; + std::shared_ptr refVal_setSubtitle; ok &= ModelBase::fromJson(fieldValue, refVal_setSubtitle); setSubtitle(refVal_setSubtitle); } @@ -1184,7 +1165,7 @@ bool Notification::fromJson(const web::json::value& val) const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("web_buttons"))); if(!fieldValue.is_null()) { - std::vector> refVal_setWebButtons; + std::vector> refVal_setWebButtons; ok &= ModelBase::fromJson(fieldValue, refVal_setWebButtons); setWebButtons(refVal_setWebButtons); } @@ -1639,6 +1620,26 @@ bool Notification::fromJson(const web::json::value& val) setSummaryArgCount(refVal_setSummaryArgCount); } } + if(val.has_field(utility::conversions::to_string_t(U("ios_relevance_score")))) + { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("ios_relevance_score"))); + if(!fieldValue.is_null()) + { + double refVal_setIosRelevanceScore; + ok &= ModelBase::fromJson(fieldValue, refVal_setIosRelevanceScore); + setIosRelevanceScore(refVal_setIosRelevanceScore); + } + } + if(val.has_field(utility::conversions::to_string_t(U("ios_interruption_level")))) + { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("ios_interruption_level"))); + if(!fieldValue.is_null()) + { + utility::string_t refVal_setIosInterruptionLevel; + ok &= ModelBase::fromJson(fieldValue, refVal_setIosInterruptionLevel); + setIosInterruptionLevel(refVal_setIosInterruptionLevel); + } + } if(val.has_field(utility::conversions::to_string_t(U("email_subject")))) { const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("email_subject"))); @@ -1724,7 +1725,7 @@ bool Notification::fromJson(const web::json::value& val) const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("filters"))); if(!fieldValue.is_null()) { - std::vector> refVal_setFilters; + std::vector> refVal_setFilters; ok &= ModelBase::fromJson(fieldValue, refVal_setFilters); setFilters(refVal_setFilters); } @@ -1767,13 +1768,9 @@ void Notification::toMultipart(std::shared_ptr multipart, con { multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("excluded_segments")), m_Excluded_segments)); } - if(m_Include_player_idsIsSet) + if(m_Include_subscription_idsIsSet) { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("include_player_ids")), m_Include_player_ids)); - } - if(m_Include_external_user_idsIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("include_external_user_ids")), m_Include_external_user_ids)); + multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("include_subscription_ids")), m_Include_subscription_ids)); } if(m_Include_email_tokensIsSet) { @@ -1871,10 +1868,6 @@ void Notification::toMultipart(std::shared_ptr multipart, con { multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("isChrome")), m_IsChrome)); } - if(m_Channel_for_external_user_idsIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("channel_for_external_user_ids")), m_Channel_for_external_user_ids)); - } if(m_App_idIsSet) { multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("app_id")), m_App_id)); @@ -2147,6 +2140,14 @@ void Notification::toMultipart(std::shared_ptr multipart, con { multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("summary_arg_count")), m_Summary_arg_count)); } + if(m_Ios_relevance_scoreIsSet) + { + multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("ios_relevance_score")), m_Ios_relevance_score)); + } + if(m_Ios_interruption_levelIsSet) + { + multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("ios_interruption_level")), m_Ios_interruption_level)); + } if(m_Email_subjectIsSet) { multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("email_subject")), m_Email_subject)); @@ -2214,17 +2215,11 @@ bool Notification::fromMultiPart(std::shared_ptr multipart, c ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("excluded_segments"))), refVal_setExcludedSegments ); setExcludedSegments(refVal_setExcludedSegments); } - if(multipart->hasContent(utility::conversions::to_string_t(U("include_player_ids")))) + if(multipart->hasContent(utility::conversions::to_string_t(U("include_subscription_ids")))) { - std::vector refVal_setIncludePlayerIds; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("include_player_ids"))), refVal_setIncludePlayerIds ); - setIncludePlayerIds(refVal_setIncludePlayerIds); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("include_external_user_ids")))) - { - std::vector refVal_setIncludeExternalUserIds; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("include_external_user_ids"))), refVal_setIncludeExternalUserIds ); - setIncludeExternalUserIds(refVal_setIncludeExternalUserIds); + std::vector refVal_setIncludeSubscriptionIds; + ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("include_subscription_ids"))), refVal_setIncludeSubscriptionIds ); + setIncludeSubscriptionIds(refVal_setIncludeSubscriptionIds); } if(multipart->hasContent(utility::conversions::to_string_t(U("include_email_tokens")))) { @@ -2276,7 +2271,7 @@ bool Notification::fromMultiPart(std::shared_ptr multipart, c } if(multipart->hasContent(utility::conversions::to_string_t(U("include_aliases")))) { - std::shared_ptr refVal_setIncludeAliases; + std::map refVal_setIncludeAliases; ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("include_aliases"))), refVal_setIncludeAliases ); setIncludeAliases(refVal_setIncludeAliases); } @@ -2370,12 +2365,6 @@ bool Notification::fromMultiPart(std::shared_ptr multipart, c ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("isChrome"))), refVal_setIsChrome ); setIsChrome(refVal_setIsChrome); } - if(multipart->hasContent(utility::conversions::to_string_t(U("channel_for_external_user_ids")))) - { - utility::string_t refVal_setChannelForExternalUserIds; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("channel_for_external_user_ids"))), refVal_setChannelForExternalUserIds ); - setChannelForExternalUserIds(refVal_setChannelForExternalUserIds); - } if(multipart->hasContent(utility::conversions::to_string_t(U("app_id")))) { utility::string_t refVal_setAppId; @@ -2396,19 +2385,19 @@ bool Notification::fromMultiPart(std::shared_ptr multipart, c } if(multipart->hasContent(utility::conversions::to_string_t(U("contents")))) { - std::shared_ptr refVal_setContents; + std::shared_ptr refVal_setContents; ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("contents"))), refVal_setContents ); setContents(refVal_setContents); } if(multipart->hasContent(utility::conversions::to_string_t(U("headings")))) { - std::shared_ptr refVal_setHeadings; + std::shared_ptr refVal_setHeadings; ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("headings"))), refVal_setHeadings ); setHeadings(refVal_setHeadings); } if(multipart->hasContent(utility::conversions::to_string_t(U("subtitle")))) { - std::shared_ptr refVal_setSubtitle; + std::shared_ptr refVal_setSubtitle; ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("subtitle"))), refVal_setSubtitle ); setSubtitle(refVal_setSubtitle); } @@ -2510,7 +2499,7 @@ bool Notification::fromMultiPart(std::shared_ptr multipart, c } if(multipart->hasContent(utility::conversions::to_string_t(U("web_buttons")))) { - std::vector> refVal_setWebButtons; + std::vector> refVal_setWebButtons; ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("web_buttons"))), refVal_setWebButtons ); setWebButtons(refVal_setWebButtons); } @@ -2784,6 +2773,18 @@ bool Notification::fromMultiPart(std::shared_ptr multipart, c ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("summary_arg_count"))), refVal_setSummaryArgCount ); setSummaryArgCount(refVal_setSummaryArgCount); } + if(multipart->hasContent(utility::conversions::to_string_t(U("ios_relevance_score")))) + { + double refVal_setIosRelevanceScore; + ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("ios_relevance_score"))), refVal_setIosRelevanceScore ); + setIosRelevanceScore(refVal_setIosRelevanceScore); + } + if(multipart->hasContent(utility::conversions::to_string_t(U("ios_interruption_level")))) + { + utility::string_t refVal_setIosInterruptionLevel; + ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("ios_interruption_level"))), refVal_setIosInterruptionLevel ); + setIosInterruptionLevel(refVal_setIosInterruptionLevel); + } if(multipart->hasContent(utility::conversions::to_string_t(U("email_subject")))) { utility::string_t refVal_setEmailSubject; @@ -2834,7 +2835,7 @@ bool Notification::fromMultiPart(std::shared_ptr multipart, c } if(multipart->hasContent(utility::conversions::to_string_t(U("filters")))) { - std::vector> refVal_setFilters; + std::vector> refVal_setFilters; ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("filters"))), refVal_setFilters ); setFilters(refVal_setFilters); } @@ -2893,45 +2894,25 @@ void Notification::unsetExcluded_segments() { m_Excluded_segmentsIsSet = false; } -std::vector& Notification::getIncludePlayerIds() +std::vector& Notification::getIncludeSubscriptionIds() { - return m_Include_player_ids; + return m_Include_subscription_ids; } -void Notification::setIncludePlayerIds(const std::vector& value) +void Notification::setIncludeSubscriptionIds(const std::vector& value) { - m_Include_player_ids = value; - m_Include_player_idsIsSet = true; + m_Include_subscription_ids = value; + m_Include_subscription_idsIsSet = true; } -bool Notification::includePlayerIdsIsSet() const +bool Notification::includeSubscriptionIdsIsSet() const { - return m_Include_player_idsIsSet; + return m_Include_subscription_idsIsSet; } -void Notification::unsetInclude_player_ids() +void Notification::unsetInclude_subscription_ids() { - m_Include_player_idsIsSet = false; -} -std::vector& Notification::getIncludeExternalUserIds() -{ - return m_Include_external_user_ids; -} - -void Notification::setIncludeExternalUserIds(const std::vector& value) -{ - m_Include_external_user_ids = value; - m_Include_external_user_idsIsSet = true; -} - -bool Notification::includeExternalUserIdsIsSet() const -{ - return m_Include_external_user_idsIsSet; -} - -void Notification::unsetInclude_external_user_ids() -{ - m_Include_external_user_idsIsSet = false; + m_Include_subscription_idsIsSet = false; } std::vector& Notification::getIncludeEmailTokens() { @@ -3093,12 +3074,12 @@ void Notification::unsetInclude_android_reg_ids() { m_Include_android_reg_idsIsSet = false; } -std::shared_ptr Notification::getIncludeAliases() const +std::map& Notification::getIncludeAliases() { return m_Include_aliases; } -void Notification::setIncludeAliases(const std::shared_ptr& value) +void Notification::setIncludeAliases(const std::map& value) { m_Include_aliases = value; m_Include_aliasesIsSet = true; @@ -3413,26 +3394,6 @@ void Notification::unsetIsChrome() { m_IsChromeIsSet = false; } -utility::string_t Notification::getChannelForExternalUserIds() const -{ - return m_Channel_for_external_user_ids; -} - -void Notification::setChannelForExternalUserIds(const utility::string_t& value) -{ - m_Channel_for_external_user_ids = value; - m_Channel_for_external_user_idsIsSet = true; -} - -bool Notification::channelForExternalUserIdsIsSet() const -{ - return m_Channel_for_external_user_idsIsSet; -} - -void Notification::unsetChannel_for_external_user_ids() -{ - m_Channel_for_external_user_idsIsSet = false; -} utility::string_t Notification::getAppId() const { return m_App_id; @@ -3493,12 +3454,12 @@ void Notification::unsetIdempotency_key() { m_Idempotency_keyIsSet = false; } -std::shared_ptr Notification::getContents() const +std::shared_ptr Notification::getContents() const { return m_Contents; } -void Notification::setContents(const std::shared_ptr& value) +void Notification::setContents(const std::shared_ptr& value) { m_Contents = value; m_ContentsIsSet = true; @@ -3513,12 +3474,12 @@ void Notification::unsetContents() { m_ContentsIsSet = false; } -std::shared_ptr Notification::getHeadings() const +std::shared_ptr Notification::getHeadings() const { return m_Headings; } -void Notification::setHeadings(const std::shared_ptr& value) +void Notification::setHeadings(const std::shared_ptr& value) { m_Headings = value; m_HeadingsIsSet = true; @@ -3533,12 +3494,12 @@ void Notification::unsetHeadings() { m_HeadingsIsSet = false; } -std::shared_ptr Notification::getSubtitle() const +std::shared_ptr Notification::getSubtitle() const { return m_Subtitle; } -void Notification::setSubtitle(const std::shared_ptr& value) +void Notification::setSubtitle(const std::shared_ptr& value) { m_Subtitle = value; m_SubtitleIsSet = true; @@ -3873,12 +3834,12 @@ void Notification::unsetButtons() { m_ButtonsIsSet = false; } -std::vector>& Notification::getWebButtons() +std::vector>& Notification::getWebButtons() { return m_Web_buttons; } -void Notification::setWebButtons(const std::vector>& value) +void Notification::setWebButtons(const std::vector>& value) { m_Web_buttons = value; m_Web_buttonsIsSet = true; @@ -4793,6 +4754,46 @@ void Notification::unsetSummary_arg_count() { m_Summary_arg_countIsSet = false; } +double Notification::getIosRelevanceScore() const +{ + return m_Ios_relevance_score; +} + +void Notification::setIosRelevanceScore(double value) +{ + m_Ios_relevance_score = value; + m_Ios_relevance_scoreIsSet = true; +} + +bool Notification::iosRelevanceScoreIsSet() const +{ + return m_Ios_relevance_scoreIsSet; +} + +void Notification::unsetIos_relevance_score() +{ + m_Ios_relevance_scoreIsSet = false; +} +utility::string_t Notification::getIosInterruptionLevel() const +{ + return m_Ios_interruption_level; +} + +void Notification::setIosInterruptionLevel(const utility::string_t& value) +{ + m_Ios_interruption_level = value; + m_Ios_interruption_levelIsSet = true; +} + +bool Notification::iosInterruptionLevelIsSet() const +{ + return m_Ios_interruption_levelIsSet; +} + +void Notification::unsetIos_interruption_level() +{ + m_Ios_interruption_levelIsSet = false; +} utility::string_t Notification::getEmailSubject() const { return m_Email_subject; @@ -4953,12 +4954,12 @@ void Notification::unsetSms_media_urls() { m_Sms_media_urlsIsSet = false; } -std::vector>& Notification::getFilters() +std::vector>& Notification::getFilters() { return m_Filters; } -void Notification::setFilters(const std::vector>& value) +void Notification::setFilters(const std::vector>& value) { m_Filters = value; m_FiltersIsSet = true; diff --git a/src/model/Notification200Errors.cpp b/src/model/Notification200Errors.cpp deleted file mode 100644 index 75c10fd..0000000 --- a/src/model/Notification200Errors.cpp +++ /dev/null @@ -1,169 +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.4.0 - * Contact: devrel@onesignal.com - * - * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOneSignalAPIClient/model/Notification200Errors.h" - -namespace com { -namespace onesignal { -namespace client { -namespace model { - - - -Notification200Errors::Notification200Errors() -{ - m_Invalid_external_user_idsIsSet = false; - m_Invalid_player_idsIsSet = false; -} - -Notification200Errors::~Notification200Errors() -{ -} - -void Notification200Errors::validate() -{ - // TODO: implement validation -} - -web::json::value Notification200Errors::toJson() const -{ - - web::json::value val = web::json::value::object(); - - if(m_Invalid_external_user_idsIsSet) - { - val[utility::conversions::to_string_t(U("invalid_external_user_ids"))] = ModelBase::toJson(m_Invalid_external_user_ids); - } - if(m_Invalid_player_idsIsSet) - { - val[utility::conversions::to_string_t(U("invalid_player_ids"))] = ModelBase::toJson(m_Invalid_player_ids); - } - - return val; -} - -bool Notification200Errors::fromJson(const web::json::value& val) -{ - bool ok = true; - - if(val.has_field(utility::conversions::to_string_t(U("invalid_external_user_ids")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("invalid_external_user_ids"))); - if(!fieldValue.is_null()) - { - std::vector refVal_setInvalidExternalUserIds; - ok &= ModelBase::fromJson(fieldValue, refVal_setInvalidExternalUserIds); - setInvalidExternalUserIds(refVal_setInvalidExternalUserIds); - } - } - if(val.has_field(utility::conversions::to_string_t(U("invalid_player_ids")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("invalid_player_ids"))); - if(!fieldValue.is_null()) - { - std::vector refVal_setInvalidPlayerIds; - ok &= ModelBase::fromJson(fieldValue, refVal_setInvalidPlayerIds); - setInvalidPlayerIds(refVal_setInvalidPlayerIds); - } - } - return ok; -} - -void Notification200Errors::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - if(m_Invalid_external_user_idsIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("invalid_external_user_ids")), m_Invalid_external_user_ids)); - } - if(m_Invalid_player_idsIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("invalid_player_ids")), m_Invalid_player_ids)); - } -} - -bool Notification200Errors::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(U("invalid_external_user_ids")))) - { - std::vector refVal_setInvalidExternalUserIds; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("invalid_external_user_ids"))), refVal_setInvalidExternalUserIds ); - setInvalidExternalUserIds(refVal_setInvalidExternalUserIds); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("invalid_player_ids")))) - { - std::vector refVal_setInvalidPlayerIds; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("invalid_player_ids"))), refVal_setInvalidPlayerIds ); - setInvalidPlayerIds(refVal_setInvalidPlayerIds); - } - return ok; -} - -std::vector& Notification200Errors::getInvalidExternalUserIds() -{ - return m_Invalid_external_user_ids; -} - -void Notification200Errors::setInvalidExternalUserIds(const std::vector& value) -{ - m_Invalid_external_user_ids = value; - m_Invalid_external_user_idsIsSet = true; -} - -bool Notification200Errors::invalidExternalUserIdsIsSet() const -{ - return m_Invalid_external_user_idsIsSet; -} - -void Notification200Errors::unsetInvalid_external_user_ids() -{ - m_Invalid_external_user_idsIsSet = false; -} -std::vector& Notification200Errors::getInvalidPlayerIds() -{ - return m_Invalid_player_ids; -} - -void Notification200Errors::setInvalidPlayerIds(const std::vector& value) -{ - m_Invalid_player_ids = value; - m_Invalid_player_idsIsSet = true; -} - -bool Notification200Errors::invalidPlayerIdsIsSet() const -{ - return m_Invalid_player_idsIsSet; -} - -void Notification200Errors::unsetInvalid_player_ids() -{ - m_Invalid_player_idsIsSet = false; -} -} -} -} -} - - diff --git a/src/model/NotificationHistorySuccessResponse.cpp b/src/model/NotificationHistorySuccessResponse.cpp index ac6b8d7..1711faf 100644 --- a/src/model/NotificationHistorySuccessResponse.cpp +++ b/src/model/NotificationHistorySuccessResponse.cpp @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. diff --git a/src/model/NotificationSlice.cpp b/src/model/NotificationSlice.cpp index e6fd51b..520154f 100644 --- a/src/model/NotificationSlice.cpp +++ b/src/model/NotificationSlice.cpp @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. diff --git a/src/model/NotificationTarget.cpp b/src/model/NotificationTarget.cpp index 6ad18c4..9f70063 100644 --- a/src/model/NotificationTarget.cpp +++ b/src/model/NotificationTarget.cpp @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. @@ -25,8 +25,7 @@ NotificationTarget::NotificationTarget() { m_Included_segmentsIsSet = false; m_Excluded_segmentsIsSet = false; - m_Include_player_idsIsSet = false; - m_Include_external_user_idsIsSet = false; + m_Include_subscription_idsIsSet = false; m_Include_email_tokensIsSet = false; m_Include_phone_numbersIsSet = false; m_Include_ios_tokensIsSet = false; @@ -62,13 +61,9 @@ web::json::value NotificationTarget::toJson() const { val[utility::conversions::to_string_t(U("excluded_segments"))] = ModelBase::toJson(m_Excluded_segments); } - if(m_Include_player_idsIsSet) + if(m_Include_subscription_idsIsSet) { - val[utility::conversions::to_string_t(U("include_player_ids"))] = ModelBase::toJson(m_Include_player_ids); - } - if(m_Include_external_user_idsIsSet) - { - val[utility::conversions::to_string_t(U("include_external_user_ids"))] = ModelBase::toJson(m_Include_external_user_ids); + val[utility::conversions::to_string_t(U("include_subscription_ids"))] = ModelBase::toJson(m_Include_subscription_ids); } if(m_Include_email_tokensIsSet) { @@ -138,24 +133,14 @@ bool NotificationTarget::fromJson(const web::json::value& val) setExcludedSegments(refVal_setExcludedSegments); } } - if(val.has_field(utility::conversions::to_string_t(U("include_player_ids")))) + if(val.has_field(utility::conversions::to_string_t(U("include_subscription_ids")))) { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("include_player_ids"))); + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("include_subscription_ids"))); if(!fieldValue.is_null()) { - std::vector refVal_setIncludePlayerIds; - ok &= ModelBase::fromJson(fieldValue, refVal_setIncludePlayerIds); - setIncludePlayerIds(refVal_setIncludePlayerIds); - } - } - if(val.has_field(utility::conversions::to_string_t(U("include_external_user_ids")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("include_external_user_ids"))); - if(!fieldValue.is_null()) - { - std::vector refVal_setIncludeExternalUserIds; - ok &= ModelBase::fromJson(fieldValue, refVal_setIncludeExternalUserIds); - setIncludeExternalUserIds(refVal_setIncludeExternalUserIds); + std::vector refVal_setIncludeSubscriptionIds; + ok &= ModelBase::fromJson(fieldValue, refVal_setIncludeSubscriptionIds); + setIncludeSubscriptionIds(refVal_setIncludeSubscriptionIds); } } if(val.has_field(utility::conversions::to_string_t(U("include_email_tokens")))) @@ -243,7 +228,7 @@ bool NotificationTarget::fromJson(const web::json::value& val) const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("include_aliases"))); if(!fieldValue.is_null()) { - std::shared_ptr refVal_setIncludeAliases; + std::map refVal_setIncludeAliases; ok &= ModelBase::fromJson(fieldValue, refVal_setIncludeAliases); setIncludeAliases(refVal_setIncludeAliases); } @@ -276,13 +261,9 @@ void NotificationTarget::toMultipart(std::shared_ptr multipar { multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("excluded_segments")), m_Excluded_segments)); } - if(m_Include_player_idsIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("include_player_ids")), m_Include_player_ids)); - } - if(m_Include_external_user_idsIsSet) + if(m_Include_subscription_idsIsSet) { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("include_external_user_ids")), m_Include_external_user_ids)); + multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("include_subscription_ids")), m_Include_subscription_ids)); } if(m_Include_email_tokensIsSet) { @@ -347,17 +328,11 @@ bool NotificationTarget::fromMultiPart(std::shared_ptr multip ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("excluded_segments"))), refVal_setExcludedSegments ); setExcludedSegments(refVal_setExcludedSegments); } - if(multipart->hasContent(utility::conversions::to_string_t(U("include_player_ids")))) - { - std::vector refVal_setIncludePlayerIds; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("include_player_ids"))), refVal_setIncludePlayerIds ); - setIncludePlayerIds(refVal_setIncludePlayerIds); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("include_external_user_ids")))) + if(multipart->hasContent(utility::conversions::to_string_t(U("include_subscription_ids")))) { - std::vector refVal_setIncludeExternalUserIds; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("include_external_user_ids"))), refVal_setIncludeExternalUserIds ); - setIncludeExternalUserIds(refVal_setIncludeExternalUserIds); + std::vector refVal_setIncludeSubscriptionIds; + ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("include_subscription_ids"))), refVal_setIncludeSubscriptionIds ); + setIncludeSubscriptionIds(refVal_setIncludeSubscriptionIds); } if(multipart->hasContent(utility::conversions::to_string_t(U("include_email_tokens")))) { @@ -409,7 +384,7 @@ bool NotificationTarget::fromMultiPart(std::shared_ptr multip } if(multipart->hasContent(utility::conversions::to_string_t(U("include_aliases")))) { - std::shared_ptr refVal_setIncludeAliases; + std::map refVal_setIncludeAliases; ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("include_aliases"))), refVal_setIncludeAliases ); setIncludeAliases(refVal_setIncludeAliases); } @@ -462,45 +437,25 @@ void NotificationTarget::unsetExcluded_segments() { m_Excluded_segmentsIsSet = false; } -std::vector& NotificationTarget::getIncludePlayerIds() -{ - return m_Include_player_ids; -} - -void NotificationTarget::setIncludePlayerIds(const std::vector& value) -{ - m_Include_player_ids = value; - m_Include_player_idsIsSet = true; -} - -bool NotificationTarget::includePlayerIdsIsSet() const -{ - return m_Include_player_idsIsSet; -} - -void NotificationTarget::unsetInclude_player_ids() -{ - m_Include_player_idsIsSet = false; -} -std::vector& NotificationTarget::getIncludeExternalUserIds() +std::vector& NotificationTarget::getIncludeSubscriptionIds() { - return m_Include_external_user_ids; + return m_Include_subscription_ids; } -void NotificationTarget::setIncludeExternalUserIds(const std::vector& value) +void NotificationTarget::setIncludeSubscriptionIds(const std::vector& value) { - m_Include_external_user_ids = value; - m_Include_external_user_idsIsSet = true; + m_Include_subscription_ids = value; + m_Include_subscription_idsIsSet = true; } -bool NotificationTarget::includeExternalUserIdsIsSet() const +bool NotificationTarget::includeSubscriptionIdsIsSet() const { - return m_Include_external_user_idsIsSet; + return m_Include_subscription_idsIsSet; } -void NotificationTarget::unsetInclude_external_user_ids() +void NotificationTarget::unsetInclude_subscription_ids() { - m_Include_external_user_idsIsSet = false; + m_Include_subscription_idsIsSet = false; } std::vector& NotificationTarget::getIncludeEmailTokens() { @@ -662,12 +617,12 @@ void NotificationTarget::unsetInclude_android_reg_ids() { m_Include_android_reg_idsIsSet = false; } -std::shared_ptr NotificationTarget::getIncludeAliases() const +std::map& NotificationTarget::getIncludeAliases() { return m_Include_aliases; } -void NotificationTarget::setIncludeAliases(const std::shared_ptr& value) +void NotificationTarget::setIncludeAliases(const std::map& value) { m_Include_aliases = value; m_Include_aliasesIsSet = true; diff --git a/src/model/NotificationWithMeta.cpp b/src/model/NotificationWithMeta.cpp index fc5cbd0..8a6339b 100644 --- a/src/model/NotificationWithMeta.cpp +++ b/src/model/NotificationWithMeta.cpp @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. @@ -25,8 +25,7 @@ NotificationWithMeta::NotificationWithMeta() { m_Included_segmentsIsSet = false; m_Excluded_segmentsIsSet = false; - m_Include_player_idsIsSet = false; - m_Include_external_user_idsIsSet = false; + m_Include_subscription_idsIsSet = false; m_Include_email_tokensIsSet = false; m_Include_phone_numbersIsSet = false; m_Include_ios_tokensIsSet = false; @@ -66,8 +65,6 @@ NotificationWithMeta::NotificationWithMeta() m_IsAdmIsSet = false; m_IsChrome = false; m_IsChromeIsSet = false; - m_Channel_for_external_user_ids = utility::conversions::to_string_t(""); - m_Channel_for_external_user_idsIsSet = false; m_App_id = utility::conversions::to_string_t(""); m_App_idIsSet = false; m_External_id = utility::conversions::to_string_t(""); @@ -194,6 +191,10 @@ NotificationWithMeta::NotificationWithMeta() m_Summary_argIsSet = false; m_Summary_arg_count = 0; m_Summary_arg_countIsSet = false; + m_Ios_relevance_score = 0.0; + m_Ios_relevance_scoreIsSet = false; + m_Ios_interruption_level = utility::conversions::to_string_t(""); + m_Ios_interruption_levelIsSet = false; m_Email_subject = utility::conversions::to_string_t(""); m_Email_subjectIsSet = false; m_Email_body = utility::conversions::to_string_t(""); @@ -255,13 +256,9 @@ web::json::value NotificationWithMeta::toJson() const { val[utility::conversions::to_string_t(U("excluded_segments"))] = ModelBase::toJson(m_Excluded_segments); } - if(m_Include_player_idsIsSet) + if(m_Include_subscription_idsIsSet) { - val[utility::conversions::to_string_t(U("include_player_ids"))] = ModelBase::toJson(m_Include_player_ids); - } - if(m_Include_external_user_idsIsSet) - { - val[utility::conversions::to_string_t(U("include_external_user_ids"))] = ModelBase::toJson(m_Include_external_user_ids); + val[utility::conversions::to_string_t(U("include_subscription_ids"))] = ModelBase::toJson(m_Include_subscription_ids); } if(m_Include_email_tokensIsSet) { @@ -359,10 +356,6 @@ web::json::value NotificationWithMeta::toJson() const { val[utility::conversions::to_string_t(U("isChrome"))] = ModelBase::toJson(m_IsChrome); } - if(m_Channel_for_external_user_idsIsSet) - { - val[utility::conversions::to_string_t(U("channel_for_external_user_ids"))] = ModelBase::toJson(m_Channel_for_external_user_ids); - } if(m_App_idIsSet) { val[utility::conversions::to_string_t(U("app_id"))] = ModelBase::toJson(m_App_id); @@ -635,6 +628,14 @@ web::json::value NotificationWithMeta::toJson() const { val[utility::conversions::to_string_t(U("summary_arg_count"))] = ModelBase::toJson(m_Summary_arg_count); } + if(m_Ios_relevance_scoreIsSet) + { + val[utility::conversions::to_string_t(U("ios_relevance_score"))] = ModelBase::toJson(m_Ios_relevance_score); + } + if(m_Ios_interruption_levelIsSet) + { + val[utility::conversions::to_string_t(U("ios_interruption_level"))] = ModelBase::toJson(m_Ios_interruption_level); + } if(m_Email_subjectIsSet) { val[utility::conversions::to_string_t(U("email_subject"))] = ModelBase::toJson(m_Email_subject); @@ -747,24 +748,14 @@ bool NotificationWithMeta::fromJson(const web::json::value& val) setExcludedSegments(refVal_setExcludedSegments); } } - if(val.has_field(utility::conversions::to_string_t(U("include_player_ids")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("include_player_ids"))); - if(!fieldValue.is_null()) - { - std::vector refVal_setIncludePlayerIds; - ok &= ModelBase::fromJson(fieldValue, refVal_setIncludePlayerIds); - setIncludePlayerIds(refVal_setIncludePlayerIds); - } - } - if(val.has_field(utility::conversions::to_string_t(U("include_external_user_ids")))) + if(val.has_field(utility::conversions::to_string_t(U("include_subscription_ids")))) { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("include_external_user_ids"))); + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("include_subscription_ids"))); if(!fieldValue.is_null()) { - std::vector refVal_setIncludeExternalUserIds; - ok &= ModelBase::fromJson(fieldValue, refVal_setIncludeExternalUserIds); - setIncludeExternalUserIds(refVal_setIncludeExternalUserIds); + std::vector refVal_setIncludeSubscriptionIds; + ok &= ModelBase::fromJson(fieldValue, refVal_setIncludeSubscriptionIds); + setIncludeSubscriptionIds(refVal_setIncludeSubscriptionIds); } } if(val.has_field(utility::conversions::to_string_t(U("include_email_tokens")))) @@ -852,7 +843,7 @@ bool NotificationWithMeta::fromJson(const web::json::value& val) const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("include_aliases"))); if(!fieldValue.is_null()) { - std::shared_ptr refVal_setIncludeAliases; + std::map refVal_setIncludeAliases; ok &= ModelBase::fromJson(fieldValue, refVal_setIncludeAliases); setIncludeAliases(refVal_setIncludeAliases); } @@ -1007,16 +998,6 @@ bool NotificationWithMeta::fromJson(const web::json::value& val) setIsChrome(refVal_setIsChrome); } } - if(val.has_field(utility::conversions::to_string_t(U("channel_for_external_user_ids")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("channel_for_external_user_ids"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setChannelForExternalUserIds; - ok &= ModelBase::fromJson(fieldValue, refVal_setChannelForExternalUserIds); - setChannelForExternalUserIds(refVal_setChannelForExternalUserIds); - } - } if(val.has_field(utility::conversions::to_string_t(U("app_id")))) { const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("app_id"))); @@ -1052,7 +1033,7 @@ bool NotificationWithMeta::fromJson(const web::json::value& val) const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("contents"))); if(!fieldValue.is_null()) { - std::shared_ptr refVal_setContents; + std::shared_ptr refVal_setContents; ok &= ModelBase::fromJson(fieldValue, refVal_setContents); setContents(refVal_setContents); } @@ -1062,7 +1043,7 @@ bool NotificationWithMeta::fromJson(const web::json::value& val) const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("headings"))); if(!fieldValue.is_null()) { - std::shared_ptr refVal_setHeadings; + std::shared_ptr refVal_setHeadings; ok &= ModelBase::fromJson(fieldValue, refVal_setHeadings); setHeadings(refVal_setHeadings); } @@ -1072,7 +1053,7 @@ bool NotificationWithMeta::fromJson(const web::json::value& val) const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("subtitle"))); if(!fieldValue.is_null()) { - std::shared_ptr refVal_setSubtitle; + std::shared_ptr refVal_setSubtitle; ok &= ModelBase::fromJson(fieldValue, refVal_setSubtitle); setSubtitle(refVal_setSubtitle); } @@ -1242,7 +1223,7 @@ bool NotificationWithMeta::fromJson(const web::json::value& val) const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("web_buttons"))); if(!fieldValue.is_null()) { - std::vector> refVal_setWebButtons; + std::vector> refVal_setWebButtons; ok &= ModelBase::fromJson(fieldValue, refVal_setWebButtons); setWebButtons(refVal_setWebButtons); } @@ -1697,6 +1678,26 @@ bool NotificationWithMeta::fromJson(const web::json::value& val) setSummaryArgCount(refVal_setSummaryArgCount); } } + if(val.has_field(utility::conversions::to_string_t(U("ios_relevance_score")))) + { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("ios_relevance_score"))); + if(!fieldValue.is_null()) + { + double refVal_setIosRelevanceScore; + ok &= ModelBase::fromJson(fieldValue, refVal_setIosRelevanceScore); + setIosRelevanceScore(refVal_setIosRelevanceScore); + } + } + if(val.has_field(utility::conversions::to_string_t(U("ios_interruption_level")))) + { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("ios_interruption_level"))); + if(!fieldValue.is_null()) + { + utility::string_t refVal_setIosInterruptionLevel; + ok &= ModelBase::fromJson(fieldValue, refVal_setIosInterruptionLevel); + setIosInterruptionLevel(refVal_setIosInterruptionLevel); + } + } if(val.has_field(utility::conversions::to_string_t(U("email_subject")))) { const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("email_subject"))); @@ -1782,7 +1783,7 @@ bool NotificationWithMeta::fromJson(const web::json::value& val) const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("filters"))); if(!fieldValue.is_null()) { - std::vector> refVal_setFilters; + std::vector> refVal_setFilters; ok &= ModelBase::fromJson(fieldValue, refVal_setFilters); setFilters(refVal_setFilters); } @@ -1925,13 +1926,9 @@ void NotificationWithMeta::toMultipart(std::shared_ptr multip { multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("excluded_segments")), m_Excluded_segments)); } - if(m_Include_player_idsIsSet) + if(m_Include_subscription_idsIsSet) { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("include_player_ids")), m_Include_player_ids)); - } - if(m_Include_external_user_idsIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("include_external_user_ids")), m_Include_external_user_ids)); + multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("include_subscription_ids")), m_Include_subscription_ids)); } if(m_Include_email_tokensIsSet) { @@ -2029,10 +2026,6 @@ void NotificationWithMeta::toMultipart(std::shared_ptr multip { multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("isChrome")), m_IsChrome)); } - if(m_Channel_for_external_user_idsIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("channel_for_external_user_ids")), m_Channel_for_external_user_ids)); - } if(m_App_idIsSet) { multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("app_id")), m_App_id)); @@ -2305,6 +2298,14 @@ void NotificationWithMeta::toMultipart(std::shared_ptr multip { multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("summary_arg_count")), m_Summary_arg_count)); } + if(m_Ios_relevance_scoreIsSet) + { + multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("ios_relevance_score")), m_Ios_relevance_score)); + } + if(m_Ios_interruption_levelIsSet) + { + multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("ios_interruption_level")), m_Ios_interruption_level)); + } if(m_Email_subjectIsSet) { multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("email_subject")), m_Email_subject)); @@ -2412,17 +2413,11 @@ bool NotificationWithMeta::fromMultiPart(std::shared_ptr mult ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("excluded_segments"))), refVal_setExcludedSegments ); setExcludedSegments(refVal_setExcludedSegments); } - if(multipart->hasContent(utility::conversions::to_string_t(U("include_player_ids")))) + if(multipart->hasContent(utility::conversions::to_string_t(U("include_subscription_ids")))) { - std::vector refVal_setIncludePlayerIds; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("include_player_ids"))), refVal_setIncludePlayerIds ); - setIncludePlayerIds(refVal_setIncludePlayerIds); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("include_external_user_ids")))) - { - std::vector refVal_setIncludeExternalUserIds; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("include_external_user_ids"))), refVal_setIncludeExternalUserIds ); - setIncludeExternalUserIds(refVal_setIncludeExternalUserIds); + std::vector refVal_setIncludeSubscriptionIds; + ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("include_subscription_ids"))), refVal_setIncludeSubscriptionIds ); + setIncludeSubscriptionIds(refVal_setIncludeSubscriptionIds); } if(multipart->hasContent(utility::conversions::to_string_t(U("include_email_tokens")))) { @@ -2474,7 +2469,7 @@ bool NotificationWithMeta::fromMultiPart(std::shared_ptr mult } if(multipart->hasContent(utility::conversions::to_string_t(U("include_aliases")))) { - std::shared_ptr refVal_setIncludeAliases; + std::map refVal_setIncludeAliases; ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("include_aliases"))), refVal_setIncludeAliases ); setIncludeAliases(refVal_setIncludeAliases); } @@ -2568,12 +2563,6 @@ bool NotificationWithMeta::fromMultiPart(std::shared_ptr mult ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("isChrome"))), refVal_setIsChrome ); setIsChrome(refVal_setIsChrome); } - if(multipart->hasContent(utility::conversions::to_string_t(U("channel_for_external_user_ids")))) - { - utility::string_t refVal_setChannelForExternalUserIds; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("channel_for_external_user_ids"))), refVal_setChannelForExternalUserIds ); - setChannelForExternalUserIds(refVal_setChannelForExternalUserIds); - } if(multipart->hasContent(utility::conversions::to_string_t(U("app_id")))) { utility::string_t refVal_setAppId; @@ -2594,19 +2583,19 @@ bool NotificationWithMeta::fromMultiPart(std::shared_ptr mult } if(multipart->hasContent(utility::conversions::to_string_t(U("contents")))) { - std::shared_ptr refVal_setContents; + std::shared_ptr refVal_setContents; ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("contents"))), refVal_setContents ); setContents(refVal_setContents); } if(multipart->hasContent(utility::conversions::to_string_t(U("headings")))) { - std::shared_ptr refVal_setHeadings; + std::shared_ptr refVal_setHeadings; ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("headings"))), refVal_setHeadings ); setHeadings(refVal_setHeadings); } if(multipart->hasContent(utility::conversions::to_string_t(U("subtitle")))) { - std::shared_ptr refVal_setSubtitle; + std::shared_ptr refVal_setSubtitle; ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("subtitle"))), refVal_setSubtitle ); setSubtitle(refVal_setSubtitle); } @@ -2708,7 +2697,7 @@ bool NotificationWithMeta::fromMultiPart(std::shared_ptr mult } if(multipart->hasContent(utility::conversions::to_string_t(U("web_buttons")))) { - std::vector> refVal_setWebButtons; + std::vector> refVal_setWebButtons; ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("web_buttons"))), refVal_setWebButtons ); setWebButtons(refVal_setWebButtons); } @@ -2982,6 +2971,18 @@ bool NotificationWithMeta::fromMultiPart(std::shared_ptr mult ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("summary_arg_count"))), refVal_setSummaryArgCount ); setSummaryArgCount(refVal_setSummaryArgCount); } + if(multipart->hasContent(utility::conversions::to_string_t(U("ios_relevance_score")))) + { + double refVal_setIosRelevanceScore; + ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("ios_relevance_score"))), refVal_setIosRelevanceScore ); + setIosRelevanceScore(refVal_setIosRelevanceScore); + } + if(multipart->hasContent(utility::conversions::to_string_t(U("ios_interruption_level")))) + { + utility::string_t refVal_setIosInterruptionLevel; + ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("ios_interruption_level"))), refVal_setIosInterruptionLevel ); + setIosInterruptionLevel(refVal_setIosInterruptionLevel); + } if(multipart->hasContent(utility::conversions::to_string_t(U("email_subject")))) { utility::string_t refVal_setEmailSubject; @@ -3032,7 +3033,7 @@ bool NotificationWithMeta::fromMultiPart(std::shared_ptr mult } if(multipart->hasContent(utility::conversions::to_string_t(U("filters")))) { - std::vector> refVal_setFilters; + std::vector> refVal_setFilters; ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("filters"))), refVal_setFilters ); setFilters(refVal_setFilters); } @@ -3151,45 +3152,25 @@ void NotificationWithMeta::unsetExcluded_segments() { m_Excluded_segmentsIsSet = false; } -std::vector& NotificationWithMeta::getIncludePlayerIds() +std::vector& NotificationWithMeta::getIncludeSubscriptionIds() { - return m_Include_player_ids; + return m_Include_subscription_ids; } -void NotificationWithMeta::setIncludePlayerIds(const std::vector& value) +void NotificationWithMeta::setIncludeSubscriptionIds(const std::vector& value) { - m_Include_player_ids = value; - m_Include_player_idsIsSet = true; + m_Include_subscription_ids = value; + m_Include_subscription_idsIsSet = true; } -bool NotificationWithMeta::includePlayerIdsIsSet() const +bool NotificationWithMeta::includeSubscriptionIdsIsSet() const { - return m_Include_player_idsIsSet; + return m_Include_subscription_idsIsSet; } -void NotificationWithMeta::unsetInclude_player_ids() +void NotificationWithMeta::unsetInclude_subscription_ids() { - m_Include_player_idsIsSet = false; -} -std::vector& NotificationWithMeta::getIncludeExternalUserIds() -{ - return m_Include_external_user_ids; -} - -void NotificationWithMeta::setIncludeExternalUserIds(const std::vector& value) -{ - m_Include_external_user_ids = value; - m_Include_external_user_idsIsSet = true; -} - -bool NotificationWithMeta::includeExternalUserIdsIsSet() const -{ - return m_Include_external_user_idsIsSet; -} - -void NotificationWithMeta::unsetInclude_external_user_ids() -{ - m_Include_external_user_idsIsSet = false; + m_Include_subscription_idsIsSet = false; } std::vector& NotificationWithMeta::getIncludeEmailTokens() { @@ -3351,12 +3332,12 @@ void NotificationWithMeta::unsetInclude_android_reg_ids() { m_Include_android_reg_idsIsSet = false; } -std::shared_ptr NotificationWithMeta::getIncludeAliases() const +std::map& NotificationWithMeta::getIncludeAliases() { return m_Include_aliases; } -void NotificationWithMeta::setIncludeAliases(const std::shared_ptr& value) +void NotificationWithMeta::setIncludeAliases(const std::map& value) { m_Include_aliases = value; m_Include_aliasesIsSet = true; @@ -3671,26 +3652,6 @@ void NotificationWithMeta::unsetIsChrome() { m_IsChromeIsSet = false; } -utility::string_t NotificationWithMeta::getChannelForExternalUserIds() const -{ - return m_Channel_for_external_user_ids; -} - -void NotificationWithMeta::setChannelForExternalUserIds(const utility::string_t& value) -{ - m_Channel_for_external_user_ids = value; - m_Channel_for_external_user_idsIsSet = true; -} - -bool NotificationWithMeta::channelForExternalUserIdsIsSet() const -{ - return m_Channel_for_external_user_idsIsSet; -} - -void NotificationWithMeta::unsetChannel_for_external_user_ids() -{ - m_Channel_for_external_user_idsIsSet = false; -} utility::string_t NotificationWithMeta::getAppId() const { return m_App_id; @@ -3751,12 +3712,12 @@ void NotificationWithMeta::unsetIdempotency_key() { m_Idempotency_keyIsSet = false; } -std::shared_ptr NotificationWithMeta::getContents() const +std::shared_ptr NotificationWithMeta::getContents() const { return m_Contents; } -void NotificationWithMeta::setContents(const std::shared_ptr& value) +void NotificationWithMeta::setContents(const std::shared_ptr& value) { m_Contents = value; m_ContentsIsSet = true; @@ -3771,12 +3732,12 @@ void NotificationWithMeta::unsetContents() { m_ContentsIsSet = false; } -std::shared_ptr NotificationWithMeta::getHeadings() const +std::shared_ptr NotificationWithMeta::getHeadings() const { return m_Headings; } -void NotificationWithMeta::setHeadings(const std::shared_ptr& value) +void NotificationWithMeta::setHeadings(const std::shared_ptr& value) { m_Headings = value; m_HeadingsIsSet = true; @@ -3791,12 +3752,12 @@ void NotificationWithMeta::unsetHeadings() { m_HeadingsIsSet = false; } -std::shared_ptr NotificationWithMeta::getSubtitle() const +std::shared_ptr NotificationWithMeta::getSubtitle() const { return m_Subtitle; } -void NotificationWithMeta::setSubtitle(const std::shared_ptr& value) +void NotificationWithMeta::setSubtitle(const std::shared_ptr& value) { m_Subtitle = value; m_SubtitleIsSet = true; @@ -4131,12 +4092,12 @@ void NotificationWithMeta::unsetButtons() { m_ButtonsIsSet = false; } -std::vector>& NotificationWithMeta::getWebButtons() +std::vector>& NotificationWithMeta::getWebButtons() { return m_Web_buttons; } -void NotificationWithMeta::setWebButtons(const std::vector>& value) +void NotificationWithMeta::setWebButtons(const std::vector>& value) { m_Web_buttons = value; m_Web_buttonsIsSet = true; @@ -5051,6 +5012,46 @@ void NotificationWithMeta::unsetSummary_arg_count() { m_Summary_arg_countIsSet = false; } +double NotificationWithMeta::getIosRelevanceScore() const +{ + return m_Ios_relevance_score; +} + +void NotificationWithMeta::setIosRelevanceScore(double value) +{ + m_Ios_relevance_score = value; + m_Ios_relevance_scoreIsSet = true; +} + +bool NotificationWithMeta::iosRelevanceScoreIsSet() const +{ + return m_Ios_relevance_scoreIsSet; +} + +void NotificationWithMeta::unsetIos_relevance_score() +{ + m_Ios_relevance_scoreIsSet = false; +} +utility::string_t NotificationWithMeta::getIosInterruptionLevel() const +{ + return m_Ios_interruption_level; +} + +void NotificationWithMeta::setIosInterruptionLevel(const utility::string_t& value) +{ + m_Ios_interruption_level = value; + m_Ios_interruption_levelIsSet = true; +} + +bool NotificationWithMeta::iosInterruptionLevelIsSet() const +{ + return m_Ios_interruption_levelIsSet; +} + +void NotificationWithMeta::unsetIos_interruption_level() +{ + m_Ios_interruption_levelIsSet = false; +} utility::string_t NotificationWithMeta::getEmailSubject() const { return m_Email_subject; @@ -5211,12 +5212,12 @@ void NotificationWithMeta::unsetSms_media_urls() { m_Sms_media_urlsIsSet = false; } -std::vector>& NotificationWithMeta::getFilters() +std::vector>& NotificationWithMeta::getFilters() { return m_Filters; } -void NotificationWithMeta::setFilters(const std::vector>& value) +void NotificationWithMeta::setFilters(const std::vector>& value) { m_Filters = value; m_FiltersIsSet = true; diff --git a/src/model/NotificationWithMeta_allOf.cpp b/src/model/NotificationWithMeta_allOf.cpp index d8d7d60..ba2eb1b 100644 --- a/src/model/NotificationWithMeta_allOf.cpp +++ b/src/model/NotificationWithMeta_allOf.cpp @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. diff --git a/src/model/Notification_allOf.cpp b/src/model/Notification_allOf.cpp index f05d53d..2da6d6e 100644 --- a/src/model/Notification_allOf.cpp +++ b/src/model/Notification_allOf.cpp @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. diff --git a/src/model/Operator.cpp b/src/model/Operator.cpp index 07c5aff..46ff696 100644 --- a/src/model/Operator.cpp +++ b/src/model/Operator.cpp @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. diff --git a/src/model/OutcomeData.cpp b/src/model/OutcomeData.cpp index 654f9e6..b45e47b 100644 --- a/src/model/OutcomeData.cpp +++ b/src/model/OutcomeData.cpp @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. diff --git a/src/model/OutcomesData.cpp b/src/model/OutcomesData.cpp index 3c0b46c..76c5867 100644 --- a/src/model/OutcomesData.cpp +++ b/src/model/OutcomesData.cpp @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. diff --git a/src/model/PlatformDeliveryData.cpp b/src/model/PlatformDeliveryData.cpp index 08ca068..c605872 100644 --- a/src/model/PlatformDeliveryData.cpp +++ b/src/model/PlatformDeliveryData.cpp @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. diff --git a/src/model/PlatformDeliveryData_email_allOf.cpp b/src/model/PlatformDeliveryData_email_allOf.cpp index 8c8dbb3..37c1533 100644 --- a/src/model/PlatformDeliveryData_email_allOf.cpp +++ b/src/model/PlatformDeliveryData_email_allOf.cpp @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. diff --git a/src/model/PlatformDeliveryData_sms_allOf.cpp b/src/model/PlatformDeliveryData_sms_allOf.cpp index 59a2987..dc0a4dd 100644 --- a/src/model/PlatformDeliveryData_sms_allOf.cpp +++ b/src/model/PlatformDeliveryData_sms_allOf.cpp @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. diff --git a/src/model/Player.cpp b/src/model/Player.cpp deleted file mode 100644 index 473107f..0000000 --- a/src/model/Player.cpp +++ /dev/null @@ -1,1320 +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.4.0 - * Contact: devrel@onesignal.com - * - * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOneSignalAPIClient/model/Player.h" - -namespace com { -namespace onesignal { -namespace client { -namespace model { - - - -Player::Player() -{ - m_Id = utility::conversions::to_string_t(""); - m_IdIsSet = false; - m_Invalid_identifier = false; - m_Invalid_identifierIsSet = false; - m_App_id = utility::conversions::to_string_t(""); - m_App_idIsSet = false; - m_Device_type = 0; - m_Device_typeIsSet = false; - m_External_user_id = utility::conversions::to_string_t(""); - m_External_user_idIsSet = false; - m_External_user_id_auth_hash = utility::conversions::to_string_t(""); - m_External_user_id_auth_hashIsSet = false; - m_Email_auth_hash = utility::conversions::to_string_t(""); - m_Email_auth_hashIsSet = false; - m_Identifier = utility::conversions::to_string_t(""); - m_IdentifierIsSet = false; - m_Language = utility::conversions::to_string_t(""); - m_LanguageIsSet = false; - m_Timezone = 0; - m_TimezoneIsSet = false; - m_Game_version = utility::conversions::to_string_t(""); - m_Game_versionIsSet = false; - m_Device_model = utility::conversions::to_string_t(""); - m_Device_modelIsSet = false; - m_Device_os = utility::conversions::to_string_t(""); - m_Device_osIsSet = false; - m_Ad_id = utility::conversions::to_string_t(""); - m_Ad_idIsSet = false; - m_Sdk = utility::conversions::to_string_t(""); - m_SdkIsSet = false; - m_Session_count = 0; - m_Session_countIsSet = false; - m_TagsIsSet = false; - m_Amount_spent = 0.0; - m_Amount_spentIsSet = false; - m_Created_at = 0L; - m_Created_atIsSet = false; - m_Playtime = 0L; - m_PlaytimeIsSet = false; - m_Badge_count = 0; - m_Badge_countIsSet = false; - m_Last_active = 0; - m_Last_activeIsSet = false; - m_Notification_types = 0; - m_Notification_typesIsSet = false; - m_Test_type = 0; - m_Test_typeIsSet = false; - m_long = 0.0; - m_longIsSet = false; - m_Lat = 0.0; - m_LatIsSet = false; - m_Country = utility::conversions::to_string_t(""); - m_CountryIsSet = false; -} - -Player::~Player() -{ -} - -void Player::validate() -{ - // TODO: implement validation -} - -web::json::value Player::toJson() const -{ - - web::json::value val = web::json::value::object(); - - if(m_IdIsSet) - { - val[utility::conversions::to_string_t(U("id"))] = ModelBase::toJson(m_Id); - } - if(m_Invalid_identifierIsSet) - { - val[utility::conversions::to_string_t(U("invalid_identifier"))] = ModelBase::toJson(m_Invalid_identifier); - } - if(m_App_idIsSet) - { - val[utility::conversions::to_string_t(U("app_id"))] = ModelBase::toJson(m_App_id); - } - if(m_Device_typeIsSet) - { - val[utility::conversions::to_string_t(U("device_type"))] = ModelBase::toJson(m_Device_type); - } - if(m_External_user_idIsSet) - { - val[utility::conversions::to_string_t(U("external_user_id"))] = ModelBase::toJson(m_External_user_id); - } - if(m_External_user_id_auth_hashIsSet) - { - val[utility::conversions::to_string_t(U("external_user_id_auth_hash"))] = ModelBase::toJson(m_External_user_id_auth_hash); - } - if(m_Email_auth_hashIsSet) - { - val[utility::conversions::to_string_t(U("email_auth_hash"))] = ModelBase::toJson(m_Email_auth_hash); - } - if(m_IdentifierIsSet) - { - val[utility::conversions::to_string_t(U("identifier"))] = ModelBase::toJson(m_Identifier); - } - if(m_LanguageIsSet) - { - val[utility::conversions::to_string_t(U("language"))] = ModelBase::toJson(m_Language); - } - if(m_TimezoneIsSet) - { - val[utility::conversions::to_string_t(U("timezone"))] = ModelBase::toJson(m_Timezone); - } - if(m_Game_versionIsSet) - { - val[utility::conversions::to_string_t(U("game_version"))] = ModelBase::toJson(m_Game_version); - } - if(m_Device_modelIsSet) - { - val[utility::conversions::to_string_t(U("device_model"))] = ModelBase::toJson(m_Device_model); - } - if(m_Device_osIsSet) - { - val[utility::conversions::to_string_t(U("device_os"))] = ModelBase::toJson(m_Device_os); - } - if(m_Ad_idIsSet) - { - val[utility::conversions::to_string_t(U("ad_id"))] = ModelBase::toJson(m_Ad_id); - } - if(m_SdkIsSet) - { - val[utility::conversions::to_string_t(U("sdk"))] = ModelBase::toJson(m_Sdk); - } - if(m_Session_countIsSet) - { - val[utility::conversions::to_string_t(U("session_count"))] = ModelBase::toJson(m_Session_count); - } - if(m_TagsIsSet) - { - val[utility::conversions::to_string_t(U("tags"))] = ModelBase::toJson(m_Tags); - } - if(m_Amount_spentIsSet) - { - val[utility::conversions::to_string_t(U("amount_spent"))] = ModelBase::toJson(m_Amount_spent); - } - if(m_Created_atIsSet) - { - val[utility::conversions::to_string_t(U("created_at"))] = ModelBase::toJson(m_Created_at); - } - if(m_PlaytimeIsSet) - { - val[utility::conversions::to_string_t(U("playtime"))] = ModelBase::toJson(m_Playtime); - } - if(m_Badge_countIsSet) - { - val[utility::conversions::to_string_t(U("badge_count"))] = ModelBase::toJson(m_Badge_count); - } - if(m_Last_activeIsSet) - { - val[utility::conversions::to_string_t(U("last_active"))] = ModelBase::toJson(m_Last_active); - } - if(m_Notification_typesIsSet) - { - val[utility::conversions::to_string_t(U("notification_types"))] = ModelBase::toJson(m_Notification_types); - } - if(m_Test_typeIsSet) - { - val[utility::conversions::to_string_t(U("test_type"))] = ModelBase::toJson(m_Test_type); - } - if(m_longIsSet) - { - val[utility::conversions::to_string_t(U("long"))] = ModelBase::toJson(m_long); - } - if(m_LatIsSet) - { - val[utility::conversions::to_string_t(U("lat"))] = ModelBase::toJson(m_Lat); - } - if(m_CountryIsSet) - { - val[utility::conversions::to_string_t(U("country"))] = ModelBase::toJson(m_Country); - } - - return val; -} - -bool Player::fromJson(const web::json::value& val) -{ - bool ok = true; - - if(val.has_field(utility::conversions::to_string_t(U("id")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("id"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setId; - ok &= ModelBase::fromJson(fieldValue, refVal_setId); - setId(refVal_setId); - } - } - if(val.has_field(utility::conversions::to_string_t(U("invalid_identifier")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("invalid_identifier"))); - if(!fieldValue.is_null()) - { - bool refVal_setInvalidIdentifier; - ok &= ModelBase::fromJson(fieldValue, refVal_setInvalidIdentifier); - setInvalidIdentifier(refVal_setInvalidIdentifier); - } - } - if(val.has_field(utility::conversions::to_string_t(U("app_id")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("app_id"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setAppId; - ok &= ModelBase::fromJson(fieldValue, refVal_setAppId); - setAppId(refVal_setAppId); - } - } - if(val.has_field(utility::conversions::to_string_t(U("device_type")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("device_type"))); - if(!fieldValue.is_null()) - { - int32_t refVal_setDeviceType; - ok &= ModelBase::fromJson(fieldValue, refVal_setDeviceType); - setDeviceType(refVal_setDeviceType); - } - } - if(val.has_field(utility::conversions::to_string_t(U("external_user_id")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("external_user_id"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setExternalUserId; - ok &= ModelBase::fromJson(fieldValue, refVal_setExternalUserId); - setExternalUserId(refVal_setExternalUserId); - } - } - if(val.has_field(utility::conversions::to_string_t(U("external_user_id_auth_hash")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("external_user_id_auth_hash"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setExternalUserIdAuthHash; - ok &= ModelBase::fromJson(fieldValue, refVal_setExternalUserIdAuthHash); - setExternalUserIdAuthHash(refVal_setExternalUserIdAuthHash); - } - } - if(val.has_field(utility::conversions::to_string_t(U("email_auth_hash")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("email_auth_hash"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setEmailAuthHash; - ok &= ModelBase::fromJson(fieldValue, refVal_setEmailAuthHash); - setEmailAuthHash(refVal_setEmailAuthHash); - } - } - if(val.has_field(utility::conversions::to_string_t(U("identifier")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("identifier"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setIdentifier; - ok &= ModelBase::fromJson(fieldValue, refVal_setIdentifier); - setIdentifier(refVal_setIdentifier); - } - } - if(val.has_field(utility::conversions::to_string_t(U("language")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("language"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setLanguage; - ok &= ModelBase::fromJson(fieldValue, refVal_setLanguage); - setLanguage(refVal_setLanguage); - } - } - if(val.has_field(utility::conversions::to_string_t(U("timezone")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("timezone"))); - if(!fieldValue.is_null()) - { - int32_t refVal_setTimezone; - ok &= ModelBase::fromJson(fieldValue, refVal_setTimezone); - setTimezone(refVal_setTimezone); - } - } - if(val.has_field(utility::conversions::to_string_t(U("game_version")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("game_version"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setGameVersion; - ok &= ModelBase::fromJson(fieldValue, refVal_setGameVersion); - setGameVersion(refVal_setGameVersion); - } - } - if(val.has_field(utility::conversions::to_string_t(U("device_model")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("device_model"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setDeviceModel; - ok &= ModelBase::fromJson(fieldValue, refVal_setDeviceModel); - setDeviceModel(refVal_setDeviceModel); - } - } - if(val.has_field(utility::conversions::to_string_t(U("device_os")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("device_os"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setDeviceOs; - ok &= ModelBase::fromJson(fieldValue, refVal_setDeviceOs); - setDeviceOs(refVal_setDeviceOs); - } - } - if(val.has_field(utility::conversions::to_string_t(U("ad_id")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("ad_id"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setAdId; - ok &= ModelBase::fromJson(fieldValue, refVal_setAdId); - setAdId(refVal_setAdId); - } - } - if(val.has_field(utility::conversions::to_string_t(U("sdk")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("sdk"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setSdk; - ok &= ModelBase::fromJson(fieldValue, refVal_setSdk); - setSdk(refVal_setSdk); - } - } - if(val.has_field(utility::conversions::to_string_t(U("session_count")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("session_count"))); - if(!fieldValue.is_null()) - { - int32_t refVal_setSessionCount; - ok &= ModelBase::fromJson(fieldValue, refVal_setSessionCount); - setSessionCount(refVal_setSessionCount); - } - } - if(val.has_field(utility::conversions::to_string_t(U("tags")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("tags"))); - if(!fieldValue.is_null()) - { - std::shared_ptr refVal_setTags; - ok &= ModelBase::fromJson(fieldValue, refVal_setTags); - setTags(refVal_setTags); - } - } - if(val.has_field(utility::conversions::to_string_t(U("amount_spent")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("amount_spent"))); - if(!fieldValue.is_null()) - { - double refVal_setAmountSpent; - ok &= ModelBase::fromJson(fieldValue, refVal_setAmountSpent); - setAmountSpent(refVal_setAmountSpent); - } - } - if(val.has_field(utility::conversions::to_string_t(U("created_at")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("created_at"))); - if(!fieldValue.is_null()) - { - int64_t refVal_setCreatedAt; - ok &= ModelBase::fromJson(fieldValue, refVal_setCreatedAt); - setCreatedAt(refVal_setCreatedAt); - } - } - if(val.has_field(utility::conversions::to_string_t(U("playtime")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("playtime"))); - if(!fieldValue.is_null()) - { - int64_t refVal_setPlaytime; - ok &= ModelBase::fromJson(fieldValue, refVal_setPlaytime); - setPlaytime(refVal_setPlaytime); - } - } - if(val.has_field(utility::conversions::to_string_t(U("badge_count")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("badge_count"))); - if(!fieldValue.is_null()) - { - int32_t refVal_setBadgeCount; - ok &= ModelBase::fromJson(fieldValue, refVal_setBadgeCount); - setBadgeCount(refVal_setBadgeCount); - } - } - if(val.has_field(utility::conversions::to_string_t(U("last_active")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("last_active"))); - if(!fieldValue.is_null()) - { - int32_t refVal_setLastActive; - ok &= ModelBase::fromJson(fieldValue, refVal_setLastActive); - setLastActive(refVal_setLastActive); - } - } - if(val.has_field(utility::conversions::to_string_t(U("notification_types")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("notification_types"))); - if(!fieldValue.is_null()) - { - int32_t refVal_setNotificationTypes; - ok &= ModelBase::fromJson(fieldValue, refVal_setNotificationTypes); - setNotificationTypes(refVal_setNotificationTypes); - } - } - if(val.has_field(utility::conversions::to_string_t(U("test_type")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("test_type"))); - if(!fieldValue.is_null()) - { - int32_t refVal_setTestType; - ok &= ModelBase::fromJson(fieldValue, refVal_setTestType); - setTestType(refVal_setTestType); - } - } - if(val.has_field(utility::conversions::to_string_t(U("long")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("long"))); - if(!fieldValue.is_null()) - { - double refVal_setLong; - ok &= ModelBase::fromJson(fieldValue, refVal_setLong); - setLong(refVal_setLong); - } - } - if(val.has_field(utility::conversions::to_string_t(U("lat")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("lat"))); - if(!fieldValue.is_null()) - { - double refVal_setLat; - ok &= ModelBase::fromJson(fieldValue, refVal_setLat); - setLat(refVal_setLat); - } - } - if(val.has_field(utility::conversions::to_string_t(U("country")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("country"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setCountry; - ok &= ModelBase::fromJson(fieldValue, refVal_setCountry); - setCountry(refVal_setCountry); - } - } - return ok; -} - -void Player::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - if(m_IdIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("id")), m_Id)); - } - if(m_Invalid_identifierIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("invalid_identifier")), m_Invalid_identifier)); - } - if(m_App_idIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("app_id")), m_App_id)); - } - if(m_Device_typeIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("device_type")), m_Device_type)); - } - if(m_External_user_idIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("external_user_id")), m_External_user_id)); - } - if(m_External_user_id_auth_hashIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("external_user_id_auth_hash")), m_External_user_id_auth_hash)); - } - if(m_Email_auth_hashIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("email_auth_hash")), m_Email_auth_hash)); - } - if(m_IdentifierIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("identifier")), m_Identifier)); - } - if(m_LanguageIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("language")), m_Language)); - } - if(m_TimezoneIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("timezone")), m_Timezone)); - } - if(m_Game_versionIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("game_version")), m_Game_version)); - } - if(m_Device_modelIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("device_model")), m_Device_model)); - } - if(m_Device_osIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("device_os")), m_Device_os)); - } - if(m_Ad_idIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("ad_id")), m_Ad_id)); - } - if(m_SdkIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("sdk")), m_Sdk)); - } - if(m_Session_countIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("session_count")), m_Session_count)); - } - if(m_TagsIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("tags")), m_Tags)); - } - if(m_Amount_spentIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("amount_spent")), m_Amount_spent)); - } - if(m_Created_atIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("created_at")), m_Created_at)); - } - if(m_PlaytimeIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("playtime")), m_Playtime)); - } - if(m_Badge_countIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("badge_count")), m_Badge_count)); - } - if(m_Last_activeIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("last_active")), m_Last_active)); - } - if(m_Notification_typesIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("notification_types")), m_Notification_types)); - } - if(m_Test_typeIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("test_type")), m_Test_type)); - } - if(m_longIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("long")), m_long)); - } - if(m_LatIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("lat")), m_Lat)); - } - if(m_CountryIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("country")), m_Country)); - } -} - -bool Player::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(U("id")))) - { - utility::string_t refVal_setId; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("id"))), refVal_setId ); - setId(refVal_setId); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("invalid_identifier")))) - { - bool refVal_setInvalidIdentifier; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("invalid_identifier"))), refVal_setInvalidIdentifier ); - setInvalidIdentifier(refVal_setInvalidIdentifier); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("app_id")))) - { - utility::string_t refVal_setAppId; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("app_id"))), refVal_setAppId ); - setAppId(refVal_setAppId); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("device_type")))) - { - int32_t refVal_setDeviceType; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("device_type"))), refVal_setDeviceType ); - setDeviceType(refVal_setDeviceType); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("external_user_id")))) - { - utility::string_t refVal_setExternalUserId; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("external_user_id"))), refVal_setExternalUserId ); - setExternalUserId(refVal_setExternalUserId); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("external_user_id_auth_hash")))) - { - utility::string_t refVal_setExternalUserIdAuthHash; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("external_user_id_auth_hash"))), refVal_setExternalUserIdAuthHash ); - setExternalUserIdAuthHash(refVal_setExternalUserIdAuthHash); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("email_auth_hash")))) - { - utility::string_t refVal_setEmailAuthHash; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("email_auth_hash"))), refVal_setEmailAuthHash ); - setEmailAuthHash(refVal_setEmailAuthHash); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("identifier")))) - { - utility::string_t refVal_setIdentifier; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("identifier"))), refVal_setIdentifier ); - setIdentifier(refVal_setIdentifier); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("language")))) - { - utility::string_t refVal_setLanguage; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("language"))), refVal_setLanguage ); - setLanguage(refVal_setLanguage); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("timezone")))) - { - int32_t refVal_setTimezone; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("timezone"))), refVal_setTimezone ); - setTimezone(refVal_setTimezone); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("game_version")))) - { - utility::string_t refVal_setGameVersion; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("game_version"))), refVal_setGameVersion ); - setGameVersion(refVal_setGameVersion); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("device_model")))) - { - utility::string_t refVal_setDeviceModel; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("device_model"))), refVal_setDeviceModel ); - setDeviceModel(refVal_setDeviceModel); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("device_os")))) - { - utility::string_t refVal_setDeviceOs; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("device_os"))), refVal_setDeviceOs ); - setDeviceOs(refVal_setDeviceOs); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("ad_id")))) - { - utility::string_t refVal_setAdId; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("ad_id"))), refVal_setAdId ); - setAdId(refVal_setAdId); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("sdk")))) - { - utility::string_t refVal_setSdk; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("sdk"))), refVal_setSdk ); - setSdk(refVal_setSdk); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("session_count")))) - { - int32_t refVal_setSessionCount; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("session_count"))), refVal_setSessionCount ); - setSessionCount(refVal_setSessionCount); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("tags")))) - { - std::shared_ptr refVal_setTags; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("tags"))), refVal_setTags ); - setTags(refVal_setTags); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("amount_spent")))) - { - double refVal_setAmountSpent; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("amount_spent"))), refVal_setAmountSpent ); - setAmountSpent(refVal_setAmountSpent); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("created_at")))) - { - int64_t refVal_setCreatedAt; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("created_at"))), refVal_setCreatedAt ); - setCreatedAt(refVal_setCreatedAt); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("playtime")))) - { - int64_t refVal_setPlaytime; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("playtime"))), refVal_setPlaytime ); - setPlaytime(refVal_setPlaytime); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("badge_count")))) - { - int32_t refVal_setBadgeCount; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("badge_count"))), refVal_setBadgeCount ); - setBadgeCount(refVal_setBadgeCount); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("last_active")))) - { - int32_t refVal_setLastActive; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("last_active"))), refVal_setLastActive ); - setLastActive(refVal_setLastActive); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("notification_types")))) - { - int32_t refVal_setNotificationTypes; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("notification_types"))), refVal_setNotificationTypes ); - setNotificationTypes(refVal_setNotificationTypes); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("test_type")))) - { - int32_t refVal_setTestType; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("test_type"))), refVal_setTestType ); - setTestType(refVal_setTestType); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("long")))) - { - double refVal_setLong; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("long"))), refVal_setLong ); - setLong(refVal_setLong); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("lat")))) - { - double refVal_setLat; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("lat"))), refVal_setLat ); - setLat(refVal_setLat); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("country")))) - { - utility::string_t refVal_setCountry; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("country"))), refVal_setCountry ); - setCountry(refVal_setCountry); - } - return ok; -} - -utility::string_t Player::getId() const -{ - return m_Id; -} - -void Player::setId(const utility::string_t& value) -{ - m_Id = value; - m_IdIsSet = true; -} - -bool Player::idIsSet() const -{ - return m_IdIsSet; -} - -void Player::unsetId() -{ - m_IdIsSet = false; -} -bool Player::isInvalidIdentifier() const -{ - return m_Invalid_identifier; -} - -void Player::setInvalidIdentifier(bool value) -{ - m_Invalid_identifier = value; - m_Invalid_identifierIsSet = true; -} - -bool Player::invalidIdentifierIsSet() const -{ - return m_Invalid_identifierIsSet; -} - -void Player::unsetInvalid_identifier() -{ - m_Invalid_identifierIsSet = false; -} -utility::string_t Player::getAppId() const -{ - return m_App_id; -} - -void Player::setAppId(const utility::string_t& value) -{ - m_App_id = value; - m_App_idIsSet = true; -} - -bool Player::appIdIsSet() const -{ - return m_App_idIsSet; -} - -void Player::unsetApp_id() -{ - m_App_idIsSet = false; -} -int32_t Player::getDeviceType() const -{ - return m_Device_type; -} - -void Player::setDeviceType(int32_t value) -{ - m_Device_type = value; - m_Device_typeIsSet = true; -} - -bool Player::deviceTypeIsSet() const -{ - return m_Device_typeIsSet; -} - -void Player::unsetDevice_type() -{ - m_Device_typeIsSet = false; -} -utility::string_t Player::getExternalUserId() const -{ - return m_External_user_id; -} - -void Player::setExternalUserId(const utility::string_t& value) -{ - m_External_user_id = value; - m_External_user_idIsSet = true; -} - -bool Player::externalUserIdIsSet() const -{ - return m_External_user_idIsSet; -} - -void Player::unsetExternal_user_id() -{ - m_External_user_idIsSet = false; -} -utility::string_t Player::getExternalUserIdAuthHash() const -{ - return m_External_user_id_auth_hash; -} - -void Player::setExternalUserIdAuthHash(const utility::string_t& value) -{ - m_External_user_id_auth_hash = value; - m_External_user_id_auth_hashIsSet = true; -} - -bool Player::externalUserIdAuthHashIsSet() const -{ - return m_External_user_id_auth_hashIsSet; -} - -void Player::unsetExternal_user_id_auth_hash() -{ - m_External_user_id_auth_hashIsSet = false; -} -utility::string_t Player::getEmailAuthHash() const -{ - return m_Email_auth_hash; -} - -void Player::setEmailAuthHash(const utility::string_t& value) -{ - m_Email_auth_hash = value; - m_Email_auth_hashIsSet = true; -} - -bool Player::emailAuthHashIsSet() const -{ - return m_Email_auth_hashIsSet; -} - -void Player::unsetEmail_auth_hash() -{ - m_Email_auth_hashIsSet = false; -} -utility::string_t Player::getIdentifier() const -{ - return m_Identifier; -} - -void Player::setIdentifier(const utility::string_t& value) -{ - m_Identifier = value; - m_IdentifierIsSet = true; -} - -bool Player::identifierIsSet() const -{ - return m_IdentifierIsSet; -} - -void Player::unsetIdentifier() -{ - m_IdentifierIsSet = false; -} -utility::string_t Player::getLanguage() const -{ - return m_Language; -} - -void Player::setLanguage(const utility::string_t& value) -{ - m_Language = value; - m_LanguageIsSet = true; -} - -bool Player::languageIsSet() const -{ - return m_LanguageIsSet; -} - -void Player::unsetLanguage() -{ - m_LanguageIsSet = false; -} -int32_t Player::getTimezone() const -{ - return m_Timezone; -} - -void Player::setTimezone(int32_t value) -{ - m_Timezone = value; - m_TimezoneIsSet = true; -} - -bool Player::timezoneIsSet() const -{ - return m_TimezoneIsSet; -} - -void Player::unsetTimezone() -{ - m_TimezoneIsSet = false; -} -utility::string_t Player::getGameVersion() const -{ - return m_Game_version; -} - -void Player::setGameVersion(const utility::string_t& value) -{ - m_Game_version = value; - m_Game_versionIsSet = true; -} - -bool Player::gameVersionIsSet() const -{ - return m_Game_versionIsSet; -} - -void Player::unsetGame_version() -{ - m_Game_versionIsSet = false; -} -utility::string_t Player::getDeviceModel() const -{ - return m_Device_model; -} - -void Player::setDeviceModel(const utility::string_t& value) -{ - m_Device_model = value; - m_Device_modelIsSet = true; -} - -bool Player::deviceModelIsSet() const -{ - return m_Device_modelIsSet; -} - -void Player::unsetDevice_model() -{ - m_Device_modelIsSet = false; -} -utility::string_t Player::getDeviceOs() const -{ - return m_Device_os; -} - -void Player::setDeviceOs(const utility::string_t& value) -{ - m_Device_os = value; - m_Device_osIsSet = true; -} - -bool Player::deviceOsIsSet() const -{ - return m_Device_osIsSet; -} - -void Player::unsetDevice_os() -{ - m_Device_osIsSet = false; -} -utility::string_t Player::getAdId() const -{ - return m_Ad_id; -} - -void Player::setAdId(const utility::string_t& value) -{ - m_Ad_id = value; - m_Ad_idIsSet = true; -} - -bool Player::adIdIsSet() const -{ - return m_Ad_idIsSet; -} - -void Player::unsetAd_id() -{ - m_Ad_idIsSet = false; -} -utility::string_t Player::getSdk() const -{ - return m_Sdk; -} - -void Player::setSdk(const utility::string_t& value) -{ - m_Sdk = value; - m_SdkIsSet = true; -} - -bool Player::sdkIsSet() const -{ - return m_SdkIsSet; -} - -void Player::unsetSdk() -{ - m_SdkIsSet = false; -} -int32_t Player::getSessionCount() const -{ - return m_Session_count; -} - -void Player::setSessionCount(int32_t value) -{ - m_Session_count = value; - m_Session_countIsSet = true; -} - -bool Player::sessionCountIsSet() const -{ - return m_Session_countIsSet; -} - -void Player::unsetSession_count() -{ - m_Session_countIsSet = false; -} -std::shared_ptr Player::getTags() const -{ - return m_Tags; -} - -void Player::setTags(const std::shared_ptr& value) -{ - m_Tags = value; - m_TagsIsSet = true; -} - -bool Player::tagsIsSet() const -{ - return m_TagsIsSet; -} - -void Player::unsetTags() -{ - m_TagsIsSet = false; -} -double Player::getAmountSpent() const -{ - return m_Amount_spent; -} - -void Player::setAmountSpent(double value) -{ - m_Amount_spent = value; - m_Amount_spentIsSet = true; -} - -bool Player::amountSpentIsSet() const -{ - return m_Amount_spentIsSet; -} - -void Player::unsetAmount_spent() -{ - m_Amount_spentIsSet = false; -} -int64_t Player::getCreatedAt() const -{ - return m_Created_at; -} - -void Player::setCreatedAt(int64_t value) -{ - m_Created_at = value; - m_Created_atIsSet = true; -} - -bool Player::createdAtIsSet() const -{ - return m_Created_atIsSet; -} - -void Player::unsetCreated_at() -{ - m_Created_atIsSet = false; -} -int64_t Player::getPlaytime() const -{ - return m_Playtime; -} - -void Player::setPlaytime(int64_t value) -{ - m_Playtime = value; - m_PlaytimeIsSet = true; -} - -bool Player::playtimeIsSet() const -{ - return m_PlaytimeIsSet; -} - -void Player::unsetPlaytime() -{ - m_PlaytimeIsSet = false; -} -int32_t Player::getBadgeCount() const -{ - return m_Badge_count; -} - -void Player::setBadgeCount(int32_t value) -{ - m_Badge_count = value; - m_Badge_countIsSet = true; -} - -bool Player::badgeCountIsSet() const -{ - return m_Badge_countIsSet; -} - -void Player::unsetBadge_count() -{ - m_Badge_countIsSet = false; -} -int32_t Player::getLastActive() const -{ - return m_Last_active; -} - -void Player::setLastActive(int32_t value) -{ - m_Last_active = value; - m_Last_activeIsSet = true; -} - -bool Player::lastActiveIsSet() const -{ - return m_Last_activeIsSet; -} - -void Player::unsetLast_active() -{ - m_Last_activeIsSet = false; -} -int32_t Player::getNotificationTypes() const -{ - return m_Notification_types; -} - -void Player::setNotificationTypes(int32_t value) -{ - m_Notification_types = value; - m_Notification_typesIsSet = true; -} - -bool Player::notificationTypesIsSet() const -{ - return m_Notification_typesIsSet; -} - -void Player::unsetNotification_types() -{ - m_Notification_typesIsSet = false; -} -int32_t Player::getTestType() const -{ - return m_Test_type; -} - -void Player::setTestType(int32_t value) -{ - m_Test_type = value; - m_Test_typeIsSet = true; -} - -bool Player::testTypeIsSet() const -{ - return m_Test_typeIsSet; -} - -void Player::unsetTest_type() -{ - m_Test_typeIsSet = false; -} -double Player::getLong() const -{ - return m_long; -} - -void Player::setLong(double value) -{ - m_long = value; - m_longIsSet = true; -} - -bool Player::r_longIsSet() const -{ - return m_longIsSet; -} - -void Player::unsetlong() -{ - m_longIsSet = false; -} -double Player::getLat() const -{ - return m_Lat; -} - -void Player::setLat(double value) -{ - m_Lat = value; - m_LatIsSet = true; -} - -bool Player::latIsSet() const -{ - return m_LatIsSet; -} - -void Player::unsetLat() -{ - m_LatIsSet = false; -} -utility::string_t Player::getCountry() const -{ - return m_Country; -} - -void Player::setCountry(const utility::string_t& value) -{ - m_Country = value; - m_CountryIsSet = true; -} - -bool Player::countryIsSet() const -{ - return m_CountryIsSet; -} - -void Player::unsetCountry() -{ - m_CountryIsSet = false; -} -} -} -} -} - - diff --git a/src/model/PlayerNotificationTarget_include_aliases.cpp b/src/model/PlayerNotificationTarget_include_aliases.cpp deleted file mode 100644 index 65747b0..0000000 --- a/src/model/PlayerNotificationTarget_include_aliases.cpp +++ /dev/null @@ -1,124 +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.4.0 - * Contact: devrel@onesignal.com - * - * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOneSignalAPIClient/model/PlayerNotificationTarget_include_aliases.h" - -namespace com { -namespace onesignal { -namespace client { -namespace model { - - - -PlayerNotificationTarget_include_aliases::PlayerNotificationTarget_include_aliases() -{ - m_Alias_labelIsSet = false; -} - -PlayerNotificationTarget_include_aliases::~PlayerNotificationTarget_include_aliases() -{ -} - -void PlayerNotificationTarget_include_aliases::validate() -{ - // TODO: implement validation -} - -web::json::value PlayerNotificationTarget_include_aliases::toJson() const -{ - - web::json::value val = web::json::value::object(); - - if(m_Alias_labelIsSet) - { - val[utility::conversions::to_string_t(U("alias_label"))] = ModelBase::toJson(m_Alias_label); - } - - return val; -} - -bool PlayerNotificationTarget_include_aliases::fromJson(const web::json::value& val) -{ - bool ok = true; - - if(val.has_field(utility::conversions::to_string_t(U("alias_label")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("alias_label"))); - if(!fieldValue.is_null()) - { - std::vector refVal_setAliasLabel; - ok &= ModelBase::fromJson(fieldValue, refVal_setAliasLabel); - setAliasLabel(refVal_setAliasLabel); - } - } - return ok; -} - -void PlayerNotificationTarget_include_aliases::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - if(m_Alias_labelIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("alias_label")), m_Alias_label)); - } -} - -bool PlayerNotificationTarget_include_aliases::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(U("alias_label")))) - { - std::vector refVal_setAliasLabel; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("alias_label"))), refVal_setAliasLabel ); - setAliasLabel(refVal_setAliasLabel); - } - return ok; -} - -std::vector& PlayerNotificationTarget_include_aliases::getAliasLabel() -{ - return m_Alias_label; -} - -void PlayerNotificationTarget_include_aliases::setAliasLabel(const std::vector& value) -{ - m_Alias_label = value; - m_Alias_labelIsSet = true; -} - -bool PlayerNotificationTarget_include_aliases::aliasLabelIsSet() const -{ - return m_Alias_labelIsSet; -} - -void PlayerNotificationTarget_include_aliases::unsetAlias_label() -{ - m_Alias_labelIsSet = false; -} -} -} -} -} - - diff --git a/src/model/Inline_response_202.cpp b/src/model/PropertiesBody.cpp similarity index 73% rename from src/model/Inline_response_202.cpp rename to src/model/PropertiesBody.cpp index 034ccfc..f49ad53 100644 --- a/src/model/Inline_response_202.cpp +++ b/src/model/PropertiesBody.cpp @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. @@ -12,7 +12,7 @@ -#include "CppRestOneSignalAPIClient/model/Inline_response_202.h" +#include "CppRestOneSignalAPIClient/model/PropertiesBody.h" namespace com { namespace onesignal { @@ -21,21 +21,21 @@ namespace model { -Inline_response_202::Inline_response_202() +PropertiesBody::PropertiesBody() { m_PropertiesIsSet = false; } -Inline_response_202::~Inline_response_202() +PropertiesBody::~PropertiesBody() { } -void Inline_response_202::validate() +void PropertiesBody::validate() { // TODO: implement validation } -web::json::value Inline_response_202::toJson() const +web::json::value PropertiesBody::toJson() const { web::json::value val = web::json::value::object(); @@ -48,7 +48,7 @@ web::json::value Inline_response_202::toJson() const return val; } -bool Inline_response_202::fromJson(const web::json::value& val) +bool PropertiesBody::fromJson(const web::json::value& val) { bool ok = true; @@ -65,7 +65,7 @@ bool Inline_response_202::fromJson(const web::json::value& val) return ok; } -void Inline_response_202::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const +void PropertiesBody::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const { utility::string_t namePrefix = prefix; if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) @@ -78,7 +78,7 @@ void Inline_response_202::toMultipart(std::shared_ptr multipa } } -bool Inline_response_202::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) +bool PropertiesBody::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) { bool ok = true; utility::string_t namePrefix = prefix; @@ -96,23 +96,23 @@ bool Inline_response_202::fromMultiPart(std::shared_ptr multi return ok; } -std::shared_ptr Inline_response_202::getProperties() const +std::shared_ptr PropertiesBody::getProperties() const { return m_Properties; } -void Inline_response_202::setProperties(const std::shared_ptr& value) +void PropertiesBody::setProperties(const std::shared_ptr& value) { m_Properties = value; m_PropertiesIsSet = true; } -bool Inline_response_202::propertiesIsSet() const +bool PropertiesBody::propertiesIsSet() const { return m_PropertiesIsSet; } -void Inline_response_202::unsetProperties() +void PropertiesBody::unsetProperties() { m_PropertiesIsSet = false; } diff --git a/src/model/PropertiesDeltas.cpp b/src/model/PropertiesDeltas.cpp index d83b9da..73a4d5a 100644 --- a/src/model/PropertiesDeltas.cpp +++ b/src/model/PropertiesDeltas.cpp @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. @@ -23,9 +23,9 @@ namespace model { PropertiesDeltas::PropertiesDeltas() { - m_Session_time = 0.0; + m_Session_time = 0; m_Session_timeIsSet = false; - m_Session_count = 0.0; + m_Session_count = 0; m_Session_countIsSet = false; m_PurchasesIsSet = false; } @@ -69,7 +69,7 @@ bool PropertiesDeltas::fromJson(const web::json::value& val) const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("session_time"))); if(!fieldValue.is_null()) { - double refVal_setSessionTime; + int32_t refVal_setSessionTime; ok &= ModelBase::fromJson(fieldValue, refVal_setSessionTime); setSessionTime(refVal_setSessionTime); } @@ -79,7 +79,7 @@ bool PropertiesDeltas::fromJson(const web::json::value& val) const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("session_count"))); if(!fieldValue.is_null()) { - double refVal_setSessionCount; + int32_t refVal_setSessionCount; ok &= ModelBase::fromJson(fieldValue, refVal_setSessionCount); setSessionCount(refVal_setSessionCount); } @@ -129,13 +129,13 @@ bool PropertiesDeltas::fromMultiPart(std::shared_ptr multipar if(multipart->hasContent(utility::conversions::to_string_t(U("session_time")))) { - double refVal_setSessionTime; + int32_t refVal_setSessionTime; ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("session_time"))), refVal_setSessionTime ); setSessionTime(refVal_setSessionTime); } if(multipart->hasContent(utility::conversions::to_string_t(U("session_count")))) { - double refVal_setSessionCount; + int32_t refVal_setSessionCount; ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("session_count"))), refVal_setSessionCount ); setSessionCount(refVal_setSessionCount); } @@ -148,12 +148,12 @@ bool PropertiesDeltas::fromMultiPart(std::shared_ptr multipar return ok; } -double PropertiesDeltas::getSessionTime() const +int32_t PropertiesDeltas::getSessionTime() const { return m_Session_time; } -void PropertiesDeltas::setSessionTime(double value) +void PropertiesDeltas::setSessionTime(int32_t value) { m_Session_time = value; m_Session_timeIsSet = true; @@ -168,12 +168,12 @@ void PropertiesDeltas::unsetSession_time() { m_Session_timeIsSet = false; } -double PropertiesDeltas::getSessionCount() const +int32_t PropertiesDeltas::getSessionCount() const { return m_Session_count; } -void PropertiesDeltas::setSessionCount(double value) +void PropertiesDeltas::setSessionCount(int32_t value) { m_Session_count = value; m_Session_countIsSet = true; diff --git a/src/model/PropertiesObject.cpp b/src/model/PropertiesObject.cpp index 82c8508..045a2ca 100644 --- a/src/model/PropertiesObject.cpp +++ b/src/model/PropertiesObject.cpp @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. @@ -34,9 +34,9 @@ PropertiesObject::PropertiesObject() m_longIsSet = false; m_Country = utility::conversions::to_string_t(""); m_CountryIsSet = false; - m_First_active = 0.0; + m_First_active = 0; m_First_activeIsSet = false; - m_Last_active = 0.0; + m_Last_active = 0; m_Last_activeIsSet = false; m_Amount_spent = 0.0; m_Amount_spentIsSet = false; @@ -176,7 +176,7 @@ bool PropertiesObject::fromJson(const web::json::value& val) const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("first_active"))); if(!fieldValue.is_null()) { - double refVal_setFirstActive; + int32_t refVal_setFirstActive; ok &= ModelBase::fromJson(fieldValue, refVal_setFirstActive); setFirstActive(refVal_setFirstActive); } @@ -186,7 +186,7 @@ bool PropertiesObject::fromJson(const web::json::value& val) const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("last_active"))); if(!fieldValue.is_null()) { - double refVal_setLastActive; + int32_t refVal_setLastActive; ok &= ModelBase::fromJson(fieldValue, refVal_setLastActive); setLastActive(refVal_setLastActive); } @@ -324,13 +324,13 @@ bool PropertiesObject::fromMultiPart(std::shared_ptr multipar } if(multipart->hasContent(utility::conversions::to_string_t(U("first_active")))) { - double refVal_setFirstActive; + int32_t refVal_setFirstActive; ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("first_active"))), refVal_setFirstActive ); setFirstActive(refVal_setFirstActive); } if(multipart->hasContent(utility::conversions::to_string_t(U("last_active")))) { - double refVal_setLastActive; + int32_t refVal_setLastActive; ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("last_active"))), refVal_setLastActive ); setLastActive(refVal_setLastActive); } @@ -475,12 +475,12 @@ void PropertiesObject::unsetCountry() { m_CountryIsSet = false; } -double PropertiesObject::getFirstActive() const +int32_t PropertiesObject::getFirstActive() const { return m_First_active; } -void PropertiesObject::setFirstActive(double value) +void PropertiesObject::setFirstActive(int32_t value) { m_First_active = value; m_First_activeIsSet = true; @@ -495,12 +495,12 @@ void PropertiesObject::unsetFirst_active() { m_First_activeIsSet = false; } -double PropertiesObject::getLastActive() const +int32_t PropertiesObject::getLastActive() const { return m_Last_active; } -void PropertiesObject::setLastActive(double value) +void PropertiesObject::setLastActive(int32_t value) { m_Last_active = value; m_Last_activeIsSet = true; diff --git a/src/model/Purchase.cpp b/src/model/Purchase.cpp index 843ecbc..25be8b9 100644 --- a/src/model/Purchase.cpp +++ b/src/model/Purchase.cpp @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. @@ -29,7 +29,7 @@ Purchase::Purchase() m_AmountIsSet = false; m_Iso = utility::conversions::to_string_t(""); m_IsoIsSet = false; - m_Count = 0.0; + m_Count = 0; m_CountIsSet = false; } @@ -106,7 +106,7 @@ bool Purchase::fromJson(const web::json::value& val) const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("count"))); if(!fieldValue.is_null()) { - double refVal_setCount; + int32_t refVal_setCount; ok &= ModelBase::fromJson(fieldValue, refVal_setCount); setCount(refVal_setCount); } @@ -168,7 +168,7 @@ bool Purchase::fromMultiPart(std::shared_ptr multipart, const } if(multipart->hasContent(utility::conversions::to_string_t(U("count")))) { - double refVal_setCount; + int32_t refVal_setCount; ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("count"))), refVal_setCount ); setCount(refVal_setCount); } @@ -235,12 +235,12 @@ void Purchase::unsetIso() { m_IsoIsSet = false; } -double Purchase::getCount() const +int32_t Purchase::getCount() const { return m_Count; } -void Purchase::setCount(double value) +void Purchase::setCount(int32_t value) { m_Count = value; m_CountIsSet = true; diff --git a/src/model/RateLimitError.cpp b/src/model/RateLimitError.cpp new file mode 100644 index 0000000..cdcd932 --- /dev/null +++ b/src/model/RateLimitError.cpp @@ -0,0 +1,170 @@ +/** + * 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: 5.0.1 + * Contact: devrel@onesignal.com + * + * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +#include "CppRestOneSignalAPIClient/model/RateLimitError.h" + +namespace com { +namespace onesignal { +namespace client { +namespace model { + + + +RateLimitError::RateLimitError() +{ + m_ErrorsIsSet = false; + m_Limit = utility::conversions::to_string_t(""); + m_LimitIsSet = false; +} + +RateLimitError::~RateLimitError() +{ +} + +void RateLimitError::validate() +{ + // TODO: implement validation +} + +web::json::value RateLimitError::toJson() const +{ + + web::json::value val = web::json::value::object(); + + if(m_ErrorsIsSet) + { + val[utility::conversions::to_string_t(U("errors"))] = ModelBase::toJson(m_Errors); + } + if(m_LimitIsSet) + { + val[utility::conversions::to_string_t(U("limit"))] = ModelBase::toJson(m_Limit); + } + + return val; +} + +bool RateLimitError::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t(U("errors")))) + { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("errors"))); + if(!fieldValue.is_null()) + { + std::vector refVal_setErrors; + ok &= ModelBase::fromJson(fieldValue, refVal_setErrors); + setErrors(refVal_setErrors); + } + } + if(val.has_field(utility::conversions::to_string_t(U("limit")))) + { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("limit"))); + if(!fieldValue.is_null()) + { + utility::string_t refVal_setLimit; + ok &= ModelBase::fromJson(fieldValue, refVal_setLimit); + setLimit(refVal_setLimit); + } + } + return ok; +} + +void RateLimitError::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const +{ + utility::string_t namePrefix = prefix; + if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) + { + namePrefix += utility::conversions::to_string_t(U(".")); + } + if(m_ErrorsIsSet) + { + multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("errors")), m_Errors)); + } + if(m_LimitIsSet) + { + multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("limit")), m_Limit)); + } +} + +bool RateLimitError::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) +{ + bool ok = true; + utility::string_t namePrefix = prefix; + if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) + { + namePrefix += utility::conversions::to_string_t(U(".")); + } + + if(multipart->hasContent(utility::conversions::to_string_t(U("errors")))) + { + std::vector refVal_setErrors; + ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("errors"))), refVal_setErrors ); + setErrors(refVal_setErrors); + } + if(multipart->hasContent(utility::conversions::to_string_t(U("limit")))) + { + utility::string_t refVal_setLimit; + ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("limit"))), refVal_setLimit ); + setLimit(refVal_setLimit); + } + return ok; +} + +std::vector& RateLimitError::getErrors() +{ + return m_Errors; +} + +void RateLimitError::setErrors(const std::vector& value) +{ + m_Errors = value; + m_ErrorsIsSet = true; +} + +bool RateLimitError::errorsIsSet() const +{ + return m_ErrorsIsSet; +} + +void RateLimitError::unsetErrors() +{ + m_ErrorsIsSet = false; +} +utility::string_t RateLimitError::getLimit() const +{ + return m_Limit; +} + +void RateLimitError::setLimit(const utility::string_t& value) +{ + m_Limit = value; + m_LimitIsSet = true; +} + +bool RateLimitError::limitIsSet() const +{ + return m_LimitIsSet; +} + +void RateLimitError::unsetLimit() +{ + m_LimitIsSet = false; +} +} +} +} +} + + diff --git a/src/model/RateLimiterError.cpp b/src/model/RateLimiterError.cpp deleted file mode 100644 index e969205..0000000 --- a/src/model/RateLimiterError.cpp +++ /dev/null @@ -1,124 +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.4.0 - * Contact: devrel@onesignal.com - * - * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOneSignalAPIClient/model/RateLimiterError.h" - -namespace com { -namespace onesignal { -namespace client { -namespace model { - - - -RateLimiterError::RateLimiterError() -{ - m_ErrorsIsSet = false; -} - -RateLimiterError::~RateLimiterError() -{ -} - -void RateLimiterError::validate() -{ - // TODO: implement validation -} - -web::json::value RateLimiterError::toJson() const -{ - - web::json::value val = web::json::value::object(); - - if(m_ErrorsIsSet) - { - val[utility::conversions::to_string_t(U("errors"))] = ModelBase::toJson(m_Errors); - } - - return val; -} - -bool RateLimiterError::fromJson(const web::json::value& val) -{ - bool ok = true; - - if(val.has_field(utility::conversions::to_string_t(U("errors")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("errors"))); - if(!fieldValue.is_null()) - { - std::vector> refVal_setErrors; - ok &= ModelBase::fromJson(fieldValue, refVal_setErrors); - setErrors(refVal_setErrors); - } - } - return ok; -} - -void RateLimiterError::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - if(m_ErrorsIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("errors")), m_Errors)); - } -} - -bool RateLimiterError::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(U("errors")))) - { - std::vector> refVal_setErrors; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("errors"))), refVal_setErrors ); - setErrors(refVal_setErrors); - } - return ok; -} - -std::vector>& RateLimiterError::getErrors() -{ - return m_Errors; -} - -void RateLimiterError::setErrors(const std::vector>& value) -{ - m_Errors = value; - m_ErrorsIsSet = true; -} - -bool RateLimiterError::errorsIsSet() const -{ - return m_ErrorsIsSet; -} - -void RateLimiterError::unsetErrors() -{ - m_ErrorsIsSet = false; -} -} -} -} -} - - diff --git a/src/model/Segment.cpp b/src/model/Segment.cpp index 40be2a5..02b11d0 100644 --- a/src/model/Segment.cpp +++ b/src/model/Segment.cpp @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. @@ -89,7 +89,7 @@ bool Segment::fromJson(const web::json::value& val) const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("filters"))); if(!fieldValue.is_null()) { - std::vector> refVal_setFilters; + std::vector> refVal_setFilters; ok &= ModelBase::fromJson(fieldValue, refVal_setFilters); setFilters(refVal_setFilters); } @@ -141,7 +141,7 @@ bool Segment::fromMultiPart(std::shared_ptr multipart, const } if(multipart->hasContent(utility::conversions::to_string_t(U("filters")))) { - std::vector> refVal_setFilters; + std::vector> refVal_setFilters; ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("filters"))), refVal_setFilters ); setFilters(refVal_setFilters); } @@ -188,12 +188,12 @@ void Segment::unsetName() { m_NameIsSet = false; } -std::vector>& Segment::getFilters() +std::vector>& Segment::getFilters() { return m_Filters; } -void Segment::setFilters(const std::vector>& value) +void Segment::setFilters(const std::vector>& value) { m_Filters = value; m_FiltersIsSet = true; diff --git a/src/model/SegmentData.cpp b/src/model/SegmentData.cpp new file mode 100644 index 0000000..7a6f2b9 --- /dev/null +++ b/src/model/SegmentData.cpp @@ -0,0 +1,401 @@ +/** + * 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: 5.0.1 + * Contact: devrel@onesignal.com + * + * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +#include "CppRestOneSignalAPIClient/model/SegmentData.h" + +namespace com { +namespace onesignal { +namespace client { +namespace model { + + + +SegmentData::SegmentData() +{ + m_Id = utility::conversions::to_string_t(""); + m_IdIsSet = false; + m_Name = utility::conversions::to_string_t(""); + m_NameIsSet = false; + m_Created_at = utility::conversions::to_string_t(""); + m_Created_atIsSet = false; + m_Updated_at = utility::conversions::to_string_t(""); + m_Updated_atIsSet = false; + m_App_id = utility::conversions::to_string_t(""); + m_App_idIsSet = false; + m_Read_only = false; + m_Read_onlyIsSet = false; + m_Is_active = false; + m_Is_activeIsSet = false; +} + +SegmentData::~SegmentData() +{ +} + +void SegmentData::validate() +{ + // TODO: implement validation +} + +web::json::value SegmentData::toJson() const +{ + + web::json::value val = web::json::value::object(); + + if(m_IdIsSet) + { + val[utility::conversions::to_string_t(U("id"))] = ModelBase::toJson(m_Id); + } + if(m_NameIsSet) + { + val[utility::conversions::to_string_t(U("name"))] = ModelBase::toJson(m_Name); + } + if(m_Created_atIsSet) + { + val[utility::conversions::to_string_t(U("created_at"))] = ModelBase::toJson(m_Created_at); + } + if(m_Updated_atIsSet) + { + val[utility::conversions::to_string_t(U("updated_at"))] = ModelBase::toJson(m_Updated_at); + } + if(m_App_idIsSet) + { + val[utility::conversions::to_string_t(U("app_id"))] = ModelBase::toJson(m_App_id); + } + if(m_Read_onlyIsSet) + { + val[utility::conversions::to_string_t(U("read_only"))] = ModelBase::toJson(m_Read_only); + } + if(m_Is_activeIsSet) + { + val[utility::conversions::to_string_t(U("is_active"))] = ModelBase::toJson(m_Is_active); + } + + return val; +} + +bool SegmentData::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t(U("id")))) + { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("id"))); + if(!fieldValue.is_null()) + { + utility::string_t refVal_setId; + ok &= ModelBase::fromJson(fieldValue, refVal_setId); + setId(refVal_setId); + } + } + if(val.has_field(utility::conversions::to_string_t(U("name")))) + { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("name"))); + if(!fieldValue.is_null()) + { + utility::string_t refVal_setName; + ok &= ModelBase::fromJson(fieldValue, refVal_setName); + setName(refVal_setName); + } + } + if(val.has_field(utility::conversions::to_string_t(U("created_at")))) + { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("created_at"))); + if(!fieldValue.is_null()) + { + utility::string_t refVal_setCreatedAt; + ok &= ModelBase::fromJson(fieldValue, refVal_setCreatedAt); + setCreatedAt(refVal_setCreatedAt); + } + } + if(val.has_field(utility::conversions::to_string_t(U("updated_at")))) + { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("updated_at"))); + if(!fieldValue.is_null()) + { + utility::string_t refVal_setUpdatedAt; + ok &= ModelBase::fromJson(fieldValue, refVal_setUpdatedAt); + setUpdatedAt(refVal_setUpdatedAt); + } + } + if(val.has_field(utility::conversions::to_string_t(U("app_id")))) + { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("app_id"))); + if(!fieldValue.is_null()) + { + utility::string_t refVal_setAppId; + ok &= ModelBase::fromJson(fieldValue, refVal_setAppId); + setAppId(refVal_setAppId); + } + } + if(val.has_field(utility::conversions::to_string_t(U("read_only")))) + { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("read_only"))); + if(!fieldValue.is_null()) + { + bool refVal_setReadOnly; + ok &= ModelBase::fromJson(fieldValue, refVal_setReadOnly); + setReadOnly(refVal_setReadOnly); + } + } + if(val.has_field(utility::conversions::to_string_t(U("is_active")))) + { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("is_active"))); + if(!fieldValue.is_null()) + { + bool refVal_setIsActive; + ok &= ModelBase::fromJson(fieldValue, refVal_setIsActive); + setIsActive(refVal_setIsActive); + } + } + return ok; +} + +void SegmentData::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const +{ + utility::string_t namePrefix = prefix; + if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) + { + namePrefix += utility::conversions::to_string_t(U(".")); + } + if(m_IdIsSet) + { + multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("id")), m_Id)); + } + if(m_NameIsSet) + { + multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("name")), m_Name)); + } + if(m_Created_atIsSet) + { + multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("created_at")), m_Created_at)); + } + if(m_Updated_atIsSet) + { + multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("updated_at")), m_Updated_at)); + } + if(m_App_idIsSet) + { + multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("app_id")), m_App_id)); + } + if(m_Read_onlyIsSet) + { + multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("read_only")), m_Read_only)); + } + if(m_Is_activeIsSet) + { + multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("is_active")), m_Is_active)); + } +} + +bool SegmentData::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) +{ + bool ok = true; + utility::string_t namePrefix = prefix; + if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) + { + namePrefix += utility::conversions::to_string_t(U(".")); + } + + if(multipart->hasContent(utility::conversions::to_string_t(U("id")))) + { + utility::string_t refVal_setId; + ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("id"))), refVal_setId ); + setId(refVal_setId); + } + if(multipart->hasContent(utility::conversions::to_string_t(U("name")))) + { + utility::string_t refVal_setName; + ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("name"))), refVal_setName ); + setName(refVal_setName); + } + if(multipart->hasContent(utility::conversions::to_string_t(U("created_at")))) + { + utility::string_t refVal_setCreatedAt; + ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("created_at"))), refVal_setCreatedAt ); + setCreatedAt(refVal_setCreatedAt); + } + if(multipart->hasContent(utility::conversions::to_string_t(U("updated_at")))) + { + utility::string_t refVal_setUpdatedAt; + ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("updated_at"))), refVal_setUpdatedAt ); + setUpdatedAt(refVal_setUpdatedAt); + } + if(multipart->hasContent(utility::conversions::to_string_t(U("app_id")))) + { + utility::string_t refVal_setAppId; + ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("app_id"))), refVal_setAppId ); + setAppId(refVal_setAppId); + } + if(multipart->hasContent(utility::conversions::to_string_t(U("read_only")))) + { + bool refVal_setReadOnly; + ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("read_only"))), refVal_setReadOnly ); + setReadOnly(refVal_setReadOnly); + } + if(multipart->hasContent(utility::conversions::to_string_t(U("is_active")))) + { + bool refVal_setIsActive; + ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("is_active"))), refVal_setIsActive ); + setIsActive(refVal_setIsActive); + } + return ok; +} + +utility::string_t SegmentData::getId() const +{ + return m_Id; +} + +void SegmentData::setId(const utility::string_t& value) +{ + m_Id = value; + m_IdIsSet = true; +} + +bool SegmentData::idIsSet() const +{ + return m_IdIsSet; +} + +void SegmentData::unsetId() +{ + m_IdIsSet = false; +} +utility::string_t SegmentData::getName() const +{ + return m_Name; +} + +void SegmentData::setName(const utility::string_t& value) +{ + m_Name = value; + m_NameIsSet = true; +} + +bool SegmentData::nameIsSet() const +{ + return m_NameIsSet; +} + +void SegmentData::unsetName() +{ + m_NameIsSet = false; +} +utility::string_t SegmentData::getCreatedAt() const +{ + return m_Created_at; +} + +void SegmentData::setCreatedAt(const utility::string_t& value) +{ + m_Created_at = value; + m_Created_atIsSet = true; +} + +bool SegmentData::createdAtIsSet() const +{ + return m_Created_atIsSet; +} + +void SegmentData::unsetCreated_at() +{ + m_Created_atIsSet = false; +} +utility::string_t SegmentData::getUpdatedAt() const +{ + return m_Updated_at; +} + +void SegmentData::setUpdatedAt(const utility::string_t& value) +{ + m_Updated_at = value; + m_Updated_atIsSet = true; +} + +bool SegmentData::updatedAtIsSet() const +{ + return m_Updated_atIsSet; +} + +void SegmentData::unsetUpdated_at() +{ + m_Updated_atIsSet = false; +} +utility::string_t SegmentData::getAppId() const +{ + return m_App_id; +} + +void SegmentData::setAppId(const utility::string_t& value) +{ + m_App_id = value; + m_App_idIsSet = true; +} + +bool SegmentData::appIdIsSet() const +{ + return m_App_idIsSet; +} + +void SegmentData::unsetApp_id() +{ + m_App_idIsSet = false; +} +bool SegmentData::isReadOnly() const +{ + return m_Read_only; +} + +void SegmentData::setReadOnly(bool value) +{ + m_Read_only = value; + m_Read_onlyIsSet = true; +} + +bool SegmentData::readOnlyIsSet() const +{ + return m_Read_onlyIsSet; +} + +void SegmentData::unsetRead_only() +{ + m_Read_onlyIsSet = false; +} +bool SegmentData::isIsActive() const +{ + return m_Is_active; +} + +void SegmentData::setIsActive(bool value) +{ + m_Is_active = value; + m_Is_activeIsSet = true; +} + +bool SegmentData::isActiveIsSet() const +{ + return m_Is_activeIsSet; +} + +void SegmentData::unsetIs_active() +{ + m_Is_activeIsSet = false; +} +} +} +} +} + + diff --git a/src/model/SegmentNotificationTarget.cpp b/src/model/SegmentNotificationTarget.cpp index 011ac5d..916dcb1 100644 --- a/src/model/SegmentNotificationTarget.cpp +++ b/src/model/SegmentNotificationTarget.cpp @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. diff --git a/src/model/SubscriptionObject.cpp b/src/model/Subscription.cpp similarity index 82% rename from src/model/SubscriptionObject.cpp rename to src/model/Subscription.cpp index 4db4fd2..f96fded 100644 --- a/src/model/SubscriptionObject.cpp +++ b/src/model/Subscription.cpp @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. @@ -12,7 +12,7 @@ -#include "CppRestOneSignalAPIClient/model/SubscriptionObject.h" +#include "CppRestOneSignalAPIClient/model/Subscription.h" namespace com { namespace onesignal { @@ -21,7 +21,7 @@ namespace model { -SubscriptionObject::SubscriptionObject() +Subscription::Subscription() { m_Id = utility::conversions::to_string_t(""); m_IdIsSet = false; @@ -31,11 +31,11 @@ SubscriptionObject::SubscriptionObject() m_TokenIsSet = false; m_Enabled = false; m_EnabledIsSet = false; - m_Notification_types = 0.0; + m_Notification_types = 0; m_Notification_typesIsSet = false; - m_Session_time = 0.0; + m_Session_time = 0; m_Session_timeIsSet = false; - m_Session_count = 0.0; + m_Session_count = 0; m_Session_countIsSet = false; m_Sdk = utility::conversions::to_string_t(""); m_SdkIsSet = false; @@ -45,11 +45,11 @@ SubscriptionObject::SubscriptionObject() m_Device_osIsSet = false; m_Rooted = false; m_RootedIsSet = false; - m_Test_type = 0.0; + m_Test_type = 0; m_Test_typeIsSet = false; m_App_version = utility::conversions::to_string_t(""); m_App_versionIsSet = false; - m_Net_type = 0.0; + m_Net_type = 0; m_Net_typeIsSet = false; m_Carrier = utility::conversions::to_string_t(""); m_CarrierIsSet = false; @@ -59,16 +59,16 @@ SubscriptionObject::SubscriptionObject() m_Web_p256IsSet = false; } -SubscriptionObject::~SubscriptionObject() +Subscription::~Subscription() { } -void SubscriptionObject::validate() +void Subscription::validate() { // TODO: implement validation } -web::json::value SubscriptionObject::toJson() const +web::json::value Subscription::toJson() const { web::json::value val = web::json::value::object(); @@ -145,7 +145,7 @@ web::json::value SubscriptionObject::toJson() const return val; } -bool SubscriptionObject::fromJson(const web::json::value& val) +bool Subscription::fromJson(const web::json::value& val) { bool ok = true; @@ -194,7 +194,7 @@ bool SubscriptionObject::fromJson(const web::json::value& val) const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("notification_types"))); if(!fieldValue.is_null()) { - double refVal_setNotificationTypes; + int32_t refVal_setNotificationTypes; ok &= ModelBase::fromJson(fieldValue, refVal_setNotificationTypes); setNotificationTypes(refVal_setNotificationTypes); } @@ -204,7 +204,7 @@ bool SubscriptionObject::fromJson(const web::json::value& val) const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("session_time"))); if(!fieldValue.is_null()) { - double refVal_setSessionTime; + int32_t refVal_setSessionTime; ok &= ModelBase::fromJson(fieldValue, refVal_setSessionTime); setSessionTime(refVal_setSessionTime); } @@ -214,7 +214,7 @@ bool SubscriptionObject::fromJson(const web::json::value& val) const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("session_count"))); if(!fieldValue.is_null()) { - double refVal_setSessionCount; + int32_t refVal_setSessionCount; ok &= ModelBase::fromJson(fieldValue, refVal_setSessionCount); setSessionCount(refVal_setSessionCount); } @@ -264,7 +264,7 @@ bool SubscriptionObject::fromJson(const web::json::value& val) const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("test_type"))); if(!fieldValue.is_null()) { - double refVal_setTestType; + int32_t refVal_setTestType; ok &= ModelBase::fromJson(fieldValue, refVal_setTestType); setTestType(refVal_setTestType); } @@ -284,7 +284,7 @@ bool SubscriptionObject::fromJson(const web::json::value& val) const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("net_type"))); if(!fieldValue.is_null()) { - double refVal_setNetType; + int32_t refVal_setNetType; ok &= ModelBase::fromJson(fieldValue, refVal_setNetType); setNetType(refVal_setNetType); } @@ -322,7 +322,7 @@ bool SubscriptionObject::fromJson(const web::json::value& val) return ok; } -void SubscriptionObject::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const +void Subscription::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const { utility::string_t namePrefix = prefix; if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) @@ -399,7 +399,7 @@ void SubscriptionObject::toMultipart(std::shared_ptr multipar } } -bool SubscriptionObject::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) +bool Subscription::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) { bool ok = true; utility::string_t namePrefix = prefix; @@ -434,19 +434,19 @@ bool SubscriptionObject::fromMultiPart(std::shared_ptr multip } if(multipart->hasContent(utility::conversions::to_string_t(U("notification_types")))) { - double refVal_setNotificationTypes; + int32_t refVal_setNotificationTypes; ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("notification_types"))), refVal_setNotificationTypes ); setNotificationTypes(refVal_setNotificationTypes); } if(multipart->hasContent(utility::conversions::to_string_t(U("session_time")))) { - double refVal_setSessionTime; + int32_t refVal_setSessionTime; ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("session_time"))), refVal_setSessionTime ); setSessionTime(refVal_setSessionTime); } if(multipart->hasContent(utility::conversions::to_string_t(U("session_count")))) { - double refVal_setSessionCount; + int32_t refVal_setSessionCount; ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("session_count"))), refVal_setSessionCount ); setSessionCount(refVal_setSessionCount); } @@ -476,7 +476,7 @@ bool SubscriptionObject::fromMultiPart(std::shared_ptr multip } if(multipart->hasContent(utility::conversions::to_string_t(U("test_type")))) { - double refVal_setTestType; + int32_t refVal_setTestType; ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("test_type"))), refVal_setTestType ); setTestType(refVal_setTestType); } @@ -488,7 +488,7 @@ bool SubscriptionObject::fromMultiPart(std::shared_ptr multip } if(multipart->hasContent(utility::conversions::to_string_t(U("net_type")))) { - double refVal_setNetType; + int32_t refVal_setNetType; ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("net_type"))), refVal_setNetType ); setNetType(refVal_setNetType); } @@ -513,343 +513,343 @@ bool SubscriptionObject::fromMultiPart(std::shared_ptr multip return ok; } -utility::string_t SubscriptionObject::getId() const +utility::string_t Subscription::getId() const { return m_Id; } -void SubscriptionObject::setId(const utility::string_t& value) +void Subscription::setId(const utility::string_t& value) { m_Id = value; m_IdIsSet = true; } -bool SubscriptionObject::idIsSet() const +bool Subscription::idIsSet() const { return m_IdIsSet; } -void SubscriptionObject::unsetId() +void Subscription::unsetId() { m_IdIsSet = false; } -utility::string_t SubscriptionObject::getType() const +utility::string_t Subscription::getType() const { return m_Type; } -void SubscriptionObject::setType(const utility::string_t& value) +void Subscription::setType(const utility::string_t& value) { m_Type = value; m_TypeIsSet = true; } -bool SubscriptionObject::typeIsSet() const +bool Subscription::typeIsSet() const { return m_TypeIsSet; } -void SubscriptionObject::unsetType() +void Subscription::unsetType() { m_TypeIsSet = false; } -utility::string_t SubscriptionObject::getToken() const +utility::string_t Subscription::getToken() const { return m_Token; } -void SubscriptionObject::setToken(const utility::string_t& value) +void Subscription::setToken(const utility::string_t& value) { m_Token = value; m_TokenIsSet = true; } -bool SubscriptionObject::tokenIsSet() const +bool Subscription::tokenIsSet() const { return m_TokenIsSet; } -void SubscriptionObject::unsetToken() +void Subscription::unsetToken() { m_TokenIsSet = false; } -bool SubscriptionObject::isEnabled() const +bool Subscription::isEnabled() const { return m_Enabled; } -void SubscriptionObject::setEnabled(bool value) +void Subscription::setEnabled(bool value) { m_Enabled = value; m_EnabledIsSet = true; } -bool SubscriptionObject::enabledIsSet() const +bool Subscription::enabledIsSet() const { return m_EnabledIsSet; } -void SubscriptionObject::unsetEnabled() +void Subscription::unsetEnabled() { m_EnabledIsSet = false; } -double SubscriptionObject::getNotificationTypes() const +int32_t Subscription::getNotificationTypes() const { return m_Notification_types; } -void SubscriptionObject::setNotificationTypes(double value) +void Subscription::setNotificationTypes(int32_t value) { m_Notification_types = value; m_Notification_typesIsSet = true; } -bool SubscriptionObject::notificationTypesIsSet() const +bool Subscription::notificationTypesIsSet() const { return m_Notification_typesIsSet; } -void SubscriptionObject::unsetNotification_types() +void Subscription::unsetNotification_types() { m_Notification_typesIsSet = false; } -double SubscriptionObject::getSessionTime() const +int32_t Subscription::getSessionTime() const { return m_Session_time; } -void SubscriptionObject::setSessionTime(double value) +void Subscription::setSessionTime(int32_t value) { m_Session_time = value; m_Session_timeIsSet = true; } -bool SubscriptionObject::sessionTimeIsSet() const +bool Subscription::sessionTimeIsSet() const { return m_Session_timeIsSet; } -void SubscriptionObject::unsetSession_time() +void Subscription::unsetSession_time() { m_Session_timeIsSet = false; } -double SubscriptionObject::getSessionCount() const +int32_t Subscription::getSessionCount() const { return m_Session_count; } -void SubscriptionObject::setSessionCount(double value) +void Subscription::setSessionCount(int32_t value) { m_Session_count = value; m_Session_countIsSet = true; } -bool SubscriptionObject::sessionCountIsSet() const +bool Subscription::sessionCountIsSet() const { return m_Session_countIsSet; } -void SubscriptionObject::unsetSession_count() +void Subscription::unsetSession_count() { m_Session_countIsSet = false; } -utility::string_t SubscriptionObject::getSdk() const +utility::string_t Subscription::getSdk() const { return m_Sdk; } -void SubscriptionObject::setSdk(const utility::string_t& value) +void Subscription::setSdk(const utility::string_t& value) { m_Sdk = value; m_SdkIsSet = true; } -bool SubscriptionObject::sdkIsSet() const +bool Subscription::sdkIsSet() const { return m_SdkIsSet; } -void SubscriptionObject::unsetSdk() +void Subscription::unsetSdk() { m_SdkIsSet = false; } -utility::string_t SubscriptionObject::getDeviceModel() const +utility::string_t Subscription::getDeviceModel() const { return m_Device_model; } -void SubscriptionObject::setDeviceModel(const utility::string_t& value) +void Subscription::setDeviceModel(const utility::string_t& value) { m_Device_model = value; m_Device_modelIsSet = true; } -bool SubscriptionObject::deviceModelIsSet() const +bool Subscription::deviceModelIsSet() const { return m_Device_modelIsSet; } -void SubscriptionObject::unsetDevice_model() +void Subscription::unsetDevice_model() { m_Device_modelIsSet = false; } -utility::string_t SubscriptionObject::getDeviceOs() const +utility::string_t Subscription::getDeviceOs() const { return m_Device_os; } -void SubscriptionObject::setDeviceOs(const utility::string_t& value) +void Subscription::setDeviceOs(const utility::string_t& value) { m_Device_os = value; m_Device_osIsSet = true; } -bool SubscriptionObject::deviceOsIsSet() const +bool Subscription::deviceOsIsSet() const { return m_Device_osIsSet; } -void SubscriptionObject::unsetDevice_os() +void Subscription::unsetDevice_os() { m_Device_osIsSet = false; } -bool SubscriptionObject::isRooted() const +bool Subscription::isRooted() const { return m_Rooted; } -void SubscriptionObject::setRooted(bool value) +void Subscription::setRooted(bool value) { m_Rooted = value; m_RootedIsSet = true; } -bool SubscriptionObject::rootedIsSet() const +bool Subscription::rootedIsSet() const { return m_RootedIsSet; } -void SubscriptionObject::unsetRooted() +void Subscription::unsetRooted() { m_RootedIsSet = false; } -double SubscriptionObject::getTestType() const +int32_t Subscription::getTestType() const { return m_Test_type; } -void SubscriptionObject::setTestType(double value) +void Subscription::setTestType(int32_t value) { m_Test_type = value; m_Test_typeIsSet = true; } -bool SubscriptionObject::testTypeIsSet() const +bool Subscription::testTypeIsSet() const { return m_Test_typeIsSet; } -void SubscriptionObject::unsetTest_type() +void Subscription::unsetTest_type() { m_Test_typeIsSet = false; } -utility::string_t SubscriptionObject::getAppVersion() const +utility::string_t Subscription::getAppVersion() const { return m_App_version; } -void SubscriptionObject::setAppVersion(const utility::string_t& value) +void Subscription::setAppVersion(const utility::string_t& value) { m_App_version = value; m_App_versionIsSet = true; } -bool SubscriptionObject::appVersionIsSet() const +bool Subscription::appVersionIsSet() const { return m_App_versionIsSet; } -void SubscriptionObject::unsetApp_version() +void Subscription::unsetApp_version() { m_App_versionIsSet = false; } -double SubscriptionObject::getNetType() const +int32_t Subscription::getNetType() const { return m_Net_type; } -void SubscriptionObject::setNetType(double value) +void Subscription::setNetType(int32_t value) { m_Net_type = value; m_Net_typeIsSet = true; } -bool SubscriptionObject::netTypeIsSet() const +bool Subscription::netTypeIsSet() const { return m_Net_typeIsSet; } -void SubscriptionObject::unsetNet_type() +void Subscription::unsetNet_type() { m_Net_typeIsSet = false; } -utility::string_t SubscriptionObject::getCarrier() const +utility::string_t Subscription::getCarrier() const { return m_Carrier; } -void SubscriptionObject::setCarrier(const utility::string_t& value) +void Subscription::setCarrier(const utility::string_t& value) { m_Carrier = value; m_CarrierIsSet = true; } -bool SubscriptionObject::carrierIsSet() const +bool Subscription::carrierIsSet() const { return m_CarrierIsSet; } -void SubscriptionObject::unsetCarrier() +void Subscription::unsetCarrier() { m_CarrierIsSet = false; } -utility::string_t SubscriptionObject::getWebAuth() const +utility::string_t Subscription::getWebAuth() const { return m_Web_auth; } -void SubscriptionObject::setWebAuth(const utility::string_t& value) +void Subscription::setWebAuth(const utility::string_t& value) { m_Web_auth = value; m_Web_authIsSet = true; } -bool SubscriptionObject::webAuthIsSet() const +bool Subscription::webAuthIsSet() const { return m_Web_authIsSet; } -void SubscriptionObject::unsetWeb_auth() +void Subscription::unsetWeb_auth() { m_Web_authIsSet = false; } -utility::string_t SubscriptionObject::getWebP256() const +utility::string_t Subscription::getWebP256() const { return m_Web_p256; } -void SubscriptionObject::setWebP256(const utility::string_t& value) +void Subscription::setWebP256(const utility::string_t& value) { m_Web_p256 = value; m_Web_p256IsSet = true; } -bool SubscriptionObject::webP256IsSet() const +bool Subscription::webP256IsSet() const { return m_Web_p256IsSet; } -void SubscriptionObject::unsetWeb_p256() +void Subscription::unsetWeb_p256() { m_Web_p256IsSet = false; } diff --git a/src/model/Inline_response_201.cpp b/src/model/SubscriptionBody.cpp similarity index 69% rename from src/model/Inline_response_201.cpp rename to src/model/SubscriptionBody.cpp index 6ce001d..b9c3b17 100644 --- a/src/model/Inline_response_201.cpp +++ b/src/model/SubscriptionBody.cpp @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. @@ -12,7 +12,7 @@ -#include "CppRestOneSignalAPIClient/model/Inline_response_201.h" +#include "CppRestOneSignalAPIClient/model/SubscriptionBody.h" namespace com { namespace onesignal { @@ -21,21 +21,21 @@ namespace model { -Inline_response_201::Inline_response_201() +SubscriptionBody::SubscriptionBody() { m_SubscriptionIsSet = false; } -Inline_response_201::~Inline_response_201() +SubscriptionBody::~SubscriptionBody() { } -void Inline_response_201::validate() +void SubscriptionBody::validate() { // TODO: implement validation } -web::json::value Inline_response_201::toJson() const +web::json::value SubscriptionBody::toJson() const { web::json::value val = web::json::value::object(); @@ -48,7 +48,7 @@ web::json::value Inline_response_201::toJson() const return val; } -bool Inline_response_201::fromJson(const web::json::value& val) +bool SubscriptionBody::fromJson(const web::json::value& val) { bool ok = true; @@ -57,7 +57,7 @@ bool Inline_response_201::fromJson(const web::json::value& val) const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("subscription"))); if(!fieldValue.is_null()) { - std::shared_ptr refVal_setSubscription; + std::shared_ptr refVal_setSubscription; ok &= ModelBase::fromJson(fieldValue, refVal_setSubscription); setSubscription(refVal_setSubscription); } @@ -65,7 +65,7 @@ bool Inline_response_201::fromJson(const web::json::value& val) return ok; } -void Inline_response_201::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const +void SubscriptionBody::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const { utility::string_t namePrefix = prefix; if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) @@ -78,7 +78,7 @@ void Inline_response_201::toMultipart(std::shared_ptr multipa } } -bool Inline_response_201::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) +bool SubscriptionBody::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) { bool ok = true; utility::string_t namePrefix = prefix; @@ -89,30 +89,30 @@ bool Inline_response_201::fromMultiPart(std::shared_ptr multi if(multipart->hasContent(utility::conversions::to_string_t(U("subscription")))) { - std::shared_ptr refVal_setSubscription; + std::shared_ptr refVal_setSubscription; ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("subscription"))), refVal_setSubscription ); setSubscription(refVal_setSubscription); } return ok; } -std::shared_ptr Inline_response_201::getSubscription() const +std::shared_ptr SubscriptionBody::getSubscription() const { return m_Subscription; } -void Inline_response_201::setSubscription(const std::shared_ptr& value) +void SubscriptionBody::setSubscription(const std::shared_ptr& value) { m_Subscription = value; m_SubscriptionIsSet = true; } -bool Inline_response_201::subscriptionIsSet() const +bool SubscriptionBody::subscriptionIsSet() const { return m_SubscriptionIsSet; } -void Inline_response_201::unsetSubscription() +void SubscriptionBody::unsetSubscription() { m_SubscriptionIsSet = false; } diff --git a/src/model/PlayerNotificationTarget.cpp b/src/model/SubscriptionNotificationTarget.cpp similarity index 70% rename from src/model/PlayerNotificationTarget.cpp rename to src/model/SubscriptionNotificationTarget.cpp index 9614a88..1dc0846 100644 --- a/src/model/PlayerNotificationTarget.cpp +++ b/src/model/SubscriptionNotificationTarget.cpp @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. @@ -12,7 +12,7 @@ -#include "CppRestOneSignalAPIClient/model/PlayerNotificationTarget.h" +#include "CppRestOneSignalAPIClient/model/SubscriptionNotificationTarget.h" namespace com { namespace onesignal { @@ -21,10 +21,9 @@ namespace model { -PlayerNotificationTarget::PlayerNotificationTarget() +SubscriptionNotificationTarget::SubscriptionNotificationTarget() { - m_Include_player_idsIsSet = false; - m_Include_external_user_idsIsSet = false; + m_Include_subscription_idsIsSet = false; m_Include_email_tokensIsSet = false; m_Include_phone_numbersIsSet = false; m_Include_ios_tokensIsSet = false; @@ -38,27 +37,23 @@ PlayerNotificationTarget::PlayerNotificationTarget() m_Target_channelIsSet = false; } -PlayerNotificationTarget::~PlayerNotificationTarget() +SubscriptionNotificationTarget::~SubscriptionNotificationTarget() { } -void PlayerNotificationTarget::validate() +void SubscriptionNotificationTarget::validate() { // TODO: implement validation } -web::json::value PlayerNotificationTarget::toJson() const +web::json::value SubscriptionNotificationTarget::toJson() const { web::json::value val = web::json::value::object(); - if(m_Include_player_idsIsSet) + if(m_Include_subscription_idsIsSet) { - val[utility::conversions::to_string_t(U("include_player_ids"))] = ModelBase::toJson(m_Include_player_ids); - } - if(m_Include_external_user_idsIsSet) - { - val[utility::conversions::to_string_t(U("include_external_user_ids"))] = ModelBase::toJson(m_Include_external_user_ids); + val[utility::conversions::to_string_t(U("include_subscription_ids"))] = ModelBase::toJson(m_Include_subscription_ids); } if(m_Include_email_tokensIsSet) { @@ -104,28 +99,18 @@ web::json::value PlayerNotificationTarget::toJson() const return val; } -bool PlayerNotificationTarget::fromJson(const web::json::value& val) +bool SubscriptionNotificationTarget::fromJson(const web::json::value& val) { bool ok = true; - if(val.has_field(utility::conversions::to_string_t(U("include_player_ids")))) + if(val.has_field(utility::conversions::to_string_t(U("include_subscription_ids")))) { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("include_player_ids"))); + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("include_subscription_ids"))); if(!fieldValue.is_null()) { - std::vector refVal_setIncludePlayerIds; - ok &= ModelBase::fromJson(fieldValue, refVal_setIncludePlayerIds); - setIncludePlayerIds(refVal_setIncludePlayerIds); - } - } - if(val.has_field(utility::conversions::to_string_t(U("include_external_user_ids")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("include_external_user_ids"))); - if(!fieldValue.is_null()) - { - std::vector refVal_setIncludeExternalUserIds; - ok &= ModelBase::fromJson(fieldValue, refVal_setIncludeExternalUserIds); - setIncludeExternalUserIds(refVal_setIncludeExternalUserIds); + std::vector refVal_setIncludeSubscriptionIds; + ok &= ModelBase::fromJson(fieldValue, refVal_setIncludeSubscriptionIds); + setIncludeSubscriptionIds(refVal_setIncludeSubscriptionIds); } } if(val.has_field(utility::conversions::to_string_t(U("include_email_tokens")))) @@ -213,7 +198,7 @@ bool PlayerNotificationTarget::fromJson(const web::json::value& val) const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("include_aliases"))); if(!fieldValue.is_null()) { - std::shared_ptr refVal_setIncludeAliases; + std::map refVal_setIncludeAliases; ok &= ModelBase::fromJson(fieldValue, refVal_setIncludeAliases); setIncludeAliases(refVal_setIncludeAliases); } @@ -231,20 +216,16 @@ bool PlayerNotificationTarget::fromJson(const web::json::value& val) return ok; } -void PlayerNotificationTarget::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const +void SubscriptionNotificationTarget::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const { utility::string_t namePrefix = prefix; if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) { namePrefix += utility::conversions::to_string_t(U(".")); } - if(m_Include_player_idsIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("include_player_ids")), m_Include_player_ids)); - } - if(m_Include_external_user_idsIsSet) + if(m_Include_subscription_idsIsSet) { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("include_external_user_ids")), m_Include_external_user_ids)); + multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("include_subscription_ids")), m_Include_subscription_ids)); } if(m_Include_email_tokensIsSet) { @@ -288,7 +269,7 @@ void PlayerNotificationTarget::toMultipart(std::shared_ptr mu } } -bool PlayerNotificationTarget::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) +bool SubscriptionNotificationTarget::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) { bool ok = true; utility::string_t namePrefix = prefix; @@ -297,17 +278,11 @@ bool PlayerNotificationTarget::fromMultiPart(std::shared_ptr namePrefix += utility::conversions::to_string_t(U(".")); } - if(multipart->hasContent(utility::conversions::to_string_t(U("include_player_ids")))) - { - std::vector refVal_setIncludePlayerIds; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("include_player_ids"))), refVal_setIncludePlayerIds ); - setIncludePlayerIds(refVal_setIncludePlayerIds); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("include_external_user_ids")))) + if(multipart->hasContent(utility::conversions::to_string_t(U("include_subscription_ids")))) { - std::vector refVal_setIncludeExternalUserIds; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("include_external_user_ids"))), refVal_setIncludeExternalUserIds ); - setIncludeExternalUserIds(refVal_setIncludeExternalUserIds); + std::vector refVal_setIncludeSubscriptionIds; + ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("include_subscription_ids"))), refVal_setIncludeSubscriptionIds ); + setIncludeSubscriptionIds(refVal_setIncludeSubscriptionIds); } if(multipart->hasContent(utility::conversions::to_string_t(U("include_email_tokens")))) { @@ -359,7 +334,7 @@ bool PlayerNotificationTarget::fromMultiPart(std::shared_ptr } if(multipart->hasContent(utility::conversions::to_string_t(U("include_aliases")))) { - std::shared_ptr refVal_setIncludeAliases; + std::map refVal_setIncludeAliases; ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("include_aliases"))), refVal_setIncludeAliases ); setIncludeAliases(refVal_setIncludeAliases); } @@ -372,243 +347,223 @@ bool PlayerNotificationTarget::fromMultiPart(std::shared_ptr return ok; } -std::vector& PlayerNotificationTarget::getIncludePlayerIds() -{ - return m_Include_player_ids; -} - -void PlayerNotificationTarget::setIncludePlayerIds(const std::vector& value) -{ - m_Include_player_ids = value; - m_Include_player_idsIsSet = true; -} - -bool PlayerNotificationTarget::includePlayerIdsIsSet() const -{ - return m_Include_player_idsIsSet; -} - -void PlayerNotificationTarget::unsetInclude_player_ids() -{ - m_Include_player_idsIsSet = false; -} -std::vector& PlayerNotificationTarget::getIncludeExternalUserIds() +std::vector& SubscriptionNotificationTarget::getIncludeSubscriptionIds() { - return m_Include_external_user_ids; + return m_Include_subscription_ids; } -void PlayerNotificationTarget::setIncludeExternalUserIds(const std::vector& value) +void SubscriptionNotificationTarget::setIncludeSubscriptionIds(const std::vector& value) { - m_Include_external_user_ids = value; - m_Include_external_user_idsIsSet = true; + m_Include_subscription_ids = value; + m_Include_subscription_idsIsSet = true; } -bool PlayerNotificationTarget::includeExternalUserIdsIsSet() const +bool SubscriptionNotificationTarget::includeSubscriptionIdsIsSet() const { - return m_Include_external_user_idsIsSet; + return m_Include_subscription_idsIsSet; } -void PlayerNotificationTarget::unsetInclude_external_user_ids() +void SubscriptionNotificationTarget::unsetInclude_subscription_ids() { - m_Include_external_user_idsIsSet = false; + m_Include_subscription_idsIsSet = false; } -std::vector& PlayerNotificationTarget::getIncludeEmailTokens() +std::vector& SubscriptionNotificationTarget::getIncludeEmailTokens() { return m_Include_email_tokens; } -void PlayerNotificationTarget::setIncludeEmailTokens(const std::vector& value) +void SubscriptionNotificationTarget::setIncludeEmailTokens(const std::vector& value) { m_Include_email_tokens = value; m_Include_email_tokensIsSet = true; } -bool PlayerNotificationTarget::includeEmailTokensIsSet() const +bool SubscriptionNotificationTarget::includeEmailTokensIsSet() const { return m_Include_email_tokensIsSet; } -void PlayerNotificationTarget::unsetInclude_email_tokens() +void SubscriptionNotificationTarget::unsetInclude_email_tokens() { m_Include_email_tokensIsSet = false; } -std::vector& PlayerNotificationTarget::getIncludePhoneNumbers() +std::vector& SubscriptionNotificationTarget::getIncludePhoneNumbers() { return m_Include_phone_numbers; } -void PlayerNotificationTarget::setIncludePhoneNumbers(const std::vector& value) +void SubscriptionNotificationTarget::setIncludePhoneNumbers(const std::vector& value) { m_Include_phone_numbers = value; m_Include_phone_numbersIsSet = true; } -bool PlayerNotificationTarget::includePhoneNumbersIsSet() const +bool SubscriptionNotificationTarget::includePhoneNumbersIsSet() const { return m_Include_phone_numbersIsSet; } -void PlayerNotificationTarget::unsetInclude_phone_numbers() +void SubscriptionNotificationTarget::unsetInclude_phone_numbers() { m_Include_phone_numbersIsSet = false; } -std::vector& PlayerNotificationTarget::getIncludeIosTokens() +std::vector& SubscriptionNotificationTarget::getIncludeIosTokens() { return m_Include_ios_tokens; } -void PlayerNotificationTarget::setIncludeIosTokens(const std::vector& value) +void SubscriptionNotificationTarget::setIncludeIosTokens(const std::vector& value) { m_Include_ios_tokens = value; m_Include_ios_tokensIsSet = true; } -bool PlayerNotificationTarget::includeIosTokensIsSet() const +bool SubscriptionNotificationTarget::includeIosTokensIsSet() const { return m_Include_ios_tokensIsSet; } -void PlayerNotificationTarget::unsetInclude_ios_tokens() +void SubscriptionNotificationTarget::unsetInclude_ios_tokens() { m_Include_ios_tokensIsSet = false; } -std::vector& PlayerNotificationTarget::getIncludeWpWnsUris() +std::vector& SubscriptionNotificationTarget::getIncludeWpWnsUris() { return m_Include_wp_wns_uris; } -void PlayerNotificationTarget::setIncludeWpWnsUris(const std::vector& value) +void SubscriptionNotificationTarget::setIncludeWpWnsUris(const std::vector& value) { m_Include_wp_wns_uris = value; m_Include_wp_wns_urisIsSet = true; } -bool PlayerNotificationTarget::includeWpWnsUrisIsSet() const +bool SubscriptionNotificationTarget::includeWpWnsUrisIsSet() const { return m_Include_wp_wns_urisIsSet; } -void PlayerNotificationTarget::unsetInclude_wp_wns_uris() +void SubscriptionNotificationTarget::unsetInclude_wp_wns_uris() { m_Include_wp_wns_urisIsSet = false; } -std::vector& PlayerNotificationTarget::getIncludeAmazonRegIds() +std::vector& SubscriptionNotificationTarget::getIncludeAmazonRegIds() { return m_Include_amazon_reg_ids; } -void PlayerNotificationTarget::setIncludeAmazonRegIds(const std::vector& value) +void SubscriptionNotificationTarget::setIncludeAmazonRegIds(const std::vector& value) { m_Include_amazon_reg_ids = value; m_Include_amazon_reg_idsIsSet = true; } -bool PlayerNotificationTarget::includeAmazonRegIdsIsSet() const +bool SubscriptionNotificationTarget::includeAmazonRegIdsIsSet() const { return m_Include_amazon_reg_idsIsSet; } -void PlayerNotificationTarget::unsetInclude_amazon_reg_ids() +void SubscriptionNotificationTarget::unsetInclude_amazon_reg_ids() { m_Include_amazon_reg_idsIsSet = false; } -std::vector& PlayerNotificationTarget::getIncludeChromeRegIds() +std::vector& SubscriptionNotificationTarget::getIncludeChromeRegIds() { return m_Include_chrome_reg_ids; } -void PlayerNotificationTarget::setIncludeChromeRegIds(const std::vector& value) +void SubscriptionNotificationTarget::setIncludeChromeRegIds(const std::vector& value) { m_Include_chrome_reg_ids = value; m_Include_chrome_reg_idsIsSet = true; } -bool PlayerNotificationTarget::includeChromeRegIdsIsSet() const +bool SubscriptionNotificationTarget::includeChromeRegIdsIsSet() const { return m_Include_chrome_reg_idsIsSet; } -void PlayerNotificationTarget::unsetInclude_chrome_reg_ids() +void SubscriptionNotificationTarget::unsetInclude_chrome_reg_ids() { m_Include_chrome_reg_idsIsSet = false; } -std::vector& PlayerNotificationTarget::getIncludeChromeWebRegIds() +std::vector& SubscriptionNotificationTarget::getIncludeChromeWebRegIds() { return m_Include_chrome_web_reg_ids; } -void PlayerNotificationTarget::setIncludeChromeWebRegIds(const std::vector& value) +void SubscriptionNotificationTarget::setIncludeChromeWebRegIds(const std::vector& value) { m_Include_chrome_web_reg_ids = value; m_Include_chrome_web_reg_idsIsSet = true; } -bool PlayerNotificationTarget::includeChromeWebRegIdsIsSet() const +bool SubscriptionNotificationTarget::includeChromeWebRegIdsIsSet() const { return m_Include_chrome_web_reg_idsIsSet; } -void PlayerNotificationTarget::unsetInclude_chrome_web_reg_ids() +void SubscriptionNotificationTarget::unsetInclude_chrome_web_reg_ids() { m_Include_chrome_web_reg_idsIsSet = false; } -std::vector& PlayerNotificationTarget::getIncludeAndroidRegIds() +std::vector& SubscriptionNotificationTarget::getIncludeAndroidRegIds() { return m_Include_android_reg_ids; } -void PlayerNotificationTarget::setIncludeAndroidRegIds(const std::vector& value) +void SubscriptionNotificationTarget::setIncludeAndroidRegIds(const std::vector& value) { m_Include_android_reg_ids = value; m_Include_android_reg_idsIsSet = true; } -bool PlayerNotificationTarget::includeAndroidRegIdsIsSet() const +bool SubscriptionNotificationTarget::includeAndroidRegIdsIsSet() const { return m_Include_android_reg_idsIsSet; } -void PlayerNotificationTarget::unsetInclude_android_reg_ids() +void SubscriptionNotificationTarget::unsetInclude_android_reg_ids() { m_Include_android_reg_idsIsSet = false; } -std::shared_ptr PlayerNotificationTarget::getIncludeAliases() const +std::map& SubscriptionNotificationTarget::getIncludeAliases() { return m_Include_aliases; } -void PlayerNotificationTarget::setIncludeAliases(const std::shared_ptr& value) +void SubscriptionNotificationTarget::setIncludeAliases(const std::map& value) { m_Include_aliases = value; m_Include_aliasesIsSet = true; } -bool PlayerNotificationTarget::includeAliasesIsSet() const +bool SubscriptionNotificationTarget::includeAliasesIsSet() const { return m_Include_aliasesIsSet; } -void PlayerNotificationTarget::unsetInclude_aliases() +void SubscriptionNotificationTarget::unsetInclude_aliases() { m_Include_aliasesIsSet = false; } -utility::string_t PlayerNotificationTarget::getTargetChannel() const +utility::string_t SubscriptionNotificationTarget::getTargetChannel() const { return m_Target_channel; } -void PlayerNotificationTarget::setTargetChannel(const utility::string_t& value) +void SubscriptionNotificationTarget::setTargetChannel(const utility::string_t& value) { m_Target_channel = value; m_Target_channelIsSet = true; } -bool PlayerNotificationTarget::targetChannelIsSet() const +bool SubscriptionNotificationTarget::targetChannelIsSet() const { return m_Target_channelIsSet; } -void PlayerNotificationTarget::unsetTarget_channel() +void SubscriptionNotificationTarget::unsetTarget_channel() { m_Target_channelIsSet = false; } diff --git a/src/model/TransferSubscriptionRequestBody.cpp b/src/model/TransferSubscriptionRequestBody.cpp index 0cb73de..e7926f9 100644 --- a/src/model/TransferSubscriptionRequestBody.cpp +++ b/src/model/TransferSubscriptionRequestBody.cpp @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. diff --git a/src/model/UpdateLiveActivityRequest.cpp b/src/model/UpdateLiveActivityRequest.cpp index f33f08c..03f1019 100644 --- a/src/model/UpdateLiveActivityRequest.cpp +++ b/src/model/UpdateLiveActivityRequest.cpp @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. @@ -28,8 +28,16 @@ UpdateLiveActivityRequest::UpdateLiveActivityRequest() m_Event = utility::conversions::to_string_t(""); m_EventIsSet = false; m_Event_updatesIsSet = false; - m_Dismiss_at = 0.0; - m_Dismiss_atIsSet = false; + m_ContentsIsSet = false; + m_HeadingsIsSet = false; + m_Sound = utility::conversions::to_string_t(""); + m_SoundIsSet = false; + m_Stale_date = 0; + m_Stale_dateIsSet = false; + m_Dismissal_date = 0; + m_Dismissal_dateIsSet = false; + m_Priority = 0; + m_PriorityIsSet = false; } UpdateLiveActivityRequest::~UpdateLiveActivityRequest() @@ -58,9 +66,29 @@ web::json::value UpdateLiveActivityRequest::toJson() const { val[utility::conversions::to_string_t(U("event_updates"))] = ModelBase::toJson(m_Event_updates); } - if(m_Dismiss_atIsSet) + if(m_ContentsIsSet) { - val[utility::conversions::to_string_t(U("dismiss_at"))] = ModelBase::toJson(m_Dismiss_at); + val[utility::conversions::to_string_t(U("contents"))] = ModelBase::toJson(m_Contents); + } + if(m_HeadingsIsSet) + { + val[utility::conversions::to_string_t(U("headings"))] = ModelBase::toJson(m_Headings); + } + if(m_SoundIsSet) + { + val[utility::conversions::to_string_t(U("sound"))] = ModelBase::toJson(m_Sound); + } + if(m_Stale_dateIsSet) + { + val[utility::conversions::to_string_t(U("stale_date"))] = ModelBase::toJson(m_Stale_date); + } + if(m_Dismissal_dateIsSet) + { + val[utility::conversions::to_string_t(U("dismissal_date"))] = ModelBase::toJson(m_Dismissal_date); + } + if(m_PriorityIsSet) + { + val[utility::conversions::to_string_t(U("priority"))] = ModelBase::toJson(m_Priority); } return val; @@ -100,14 +128,64 @@ bool UpdateLiveActivityRequest::fromJson(const web::json::value& val) setEventUpdates(refVal_setEventUpdates); } } - if(val.has_field(utility::conversions::to_string_t(U("dismiss_at")))) + if(val.has_field(utility::conversions::to_string_t(U("contents")))) + { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("contents"))); + if(!fieldValue.is_null()) + { + std::shared_ptr refVal_setContents; + ok &= ModelBase::fromJson(fieldValue, refVal_setContents); + setContents(refVal_setContents); + } + } + if(val.has_field(utility::conversions::to_string_t(U("headings")))) + { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("headings"))); + if(!fieldValue.is_null()) + { + std::shared_ptr refVal_setHeadings; + ok &= ModelBase::fromJson(fieldValue, refVal_setHeadings); + setHeadings(refVal_setHeadings); + } + } + if(val.has_field(utility::conversions::to_string_t(U("sound")))) + { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("sound"))); + if(!fieldValue.is_null()) + { + utility::string_t refVal_setSound; + ok &= ModelBase::fromJson(fieldValue, refVal_setSound); + setSound(refVal_setSound); + } + } + if(val.has_field(utility::conversions::to_string_t(U("stale_date")))) { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("dismiss_at"))); + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("stale_date"))); if(!fieldValue.is_null()) { - double refVal_setDismissAt; - ok &= ModelBase::fromJson(fieldValue, refVal_setDismissAt); - setDismissAt(refVal_setDismissAt); + int32_t refVal_setStaleDate; + ok &= ModelBase::fromJson(fieldValue, refVal_setStaleDate); + setStaleDate(refVal_setStaleDate); + } + } + if(val.has_field(utility::conversions::to_string_t(U("dismissal_date")))) + { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("dismissal_date"))); + if(!fieldValue.is_null()) + { + int32_t refVal_setDismissalDate; + ok &= ModelBase::fromJson(fieldValue, refVal_setDismissalDate); + setDismissalDate(refVal_setDismissalDate); + } + } + if(val.has_field(utility::conversions::to_string_t(U("priority")))) + { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("priority"))); + if(!fieldValue.is_null()) + { + int32_t refVal_setPriority; + ok &= ModelBase::fromJson(fieldValue, refVal_setPriority); + setPriority(refVal_setPriority); } } return ok; @@ -132,9 +210,29 @@ void UpdateLiveActivityRequest::toMultipart(std::shared_ptr m { multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("event_updates")), m_Event_updates)); } - if(m_Dismiss_atIsSet) + if(m_ContentsIsSet) { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("dismiss_at")), m_Dismiss_at)); + multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("contents")), m_Contents)); + } + if(m_HeadingsIsSet) + { + multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("headings")), m_Headings)); + } + if(m_SoundIsSet) + { + multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("sound")), m_Sound)); + } + if(m_Stale_dateIsSet) + { + multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("stale_date")), m_Stale_date)); + } + if(m_Dismissal_dateIsSet) + { + multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("dismissal_date")), m_Dismissal_date)); + } + if(m_PriorityIsSet) + { + multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("priority")), m_Priority)); } } @@ -165,11 +263,41 @@ bool UpdateLiveActivityRequest::fromMultiPart(std::shared_ptr ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("event_updates"))), refVal_setEventUpdates ); setEventUpdates(refVal_setEventUpdates); } - if(multipart->hasContent(utility::conversions::to_string_t(U("dismiss_at")))) + if(multipart->hasContent(utility::conversions::to_string_t(U("contents")))) + { + std::shared_ptr refVal_setContents; + ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("contents"))), refVal_setContents ); + setContents(refVal_setContents); + } + if(multipart->hasContent(utility::conversions::to_string_t(U("headings")))) + { + std::shared_ptr refVal_setHeadings; + ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("headings"))), refVal_setHeadings ); + setHeadings(refVal_setHeadings); + } + if(multipart->hasContent(utility::conversions::to_string_t(U("sound")))) + { + utility::string_t refVal_setSound; + ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("sound"))), refVal_setSound ); + setSound(refVal_setSound); + } + if(multipart->hasContent(utility::conversions::to_string_t(U("stale_date")))) + { + int32_t refVal_setStaleDate; + ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("stale_date"))), refVal_setStaleDate ); + setStaleDate(refVal_setStaleDate); + } + if(multipart->hasContent(utility::conversions::to_string_t(U("dismissal_date")))) + { + int32_t refVal_setDismissalDate; + ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("dismissal_date"))), refVal_setDismissalDate ); + setDismissalDate(refVal_setDismissalDate); + } + if(multipart->hasContent(utility::conversions::to_string_t(U("priority")))) { - double refVal_setDismissAt; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("dismiss_at"))), refVal_setDismissAt ); - setDismissAt(refVal_setDismissAt); + int32_t refVal_setPriority; + ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("priority"))), refVal_setPriority ); + setPriority(refVal_setPriority); } return ok; } @@ -234,25 +362,125 @@ void UpdateLiveActivityRequest::unsetEvent_updates() { m_Event_updatesIsSet = false; } -double UpdateLiveActivityRequest::getDismissAt() const +std::shared_ptr UpdateLiveActivityRequest::getContents() const +{ + return m_Contents; +} + +void UpdateLiveActivityRequest::setContents(const std::shared_ptr& value) +{ + m_Contents = value; + m_ContentsIsSet = true; +} + +bool UpdateLiveActivityRequest::contentsIsSet() const +{ + return m_ContentsIsSet; +} + +void UpdateLiveActivityRequest::unsetContents() +{ + m_ContentsIsSet = false; +} +std::shared_ptr UpdateLiveActivityRequest::getHeadings() const +{ + return m_Headings; +} + +void UpdateLiveActivityRequest::setHeadings(const std::shared_ptr& value) +{ + m_Headings = value; + m_HeadingsIsSet = true; +} + +bool UpdateLiveActivityRequest::headingsIsSet() const +{ + return m_HeadingsIsSet; +} + +void UpdateLiveActivityRequest::unsetHeadings() +{ + m_HeadingsIsSet = false; +} +utility::string_t UpdateLiveActivityRequest::getSound() const +{ + return m_Sound; +} + +void UpdateLiveActivityRequest::setSound(const utility::string_t& value) +{ + m_Sound = value; + m_SoundIsSet = true; +} + +bool UpdateLiveActivityRequest::soundIsSet() const +{ + return m_SoundIsSet; +} + +void UpdateLiveActivityRequest::unsetSound() +{ + m_SoundIsSet = false; +} +int32_t UpdateLiveActivityRequest::getStaleDate() const +{ + return m_Stale_date; +} + +void UpdateLiveActivityRequest::setStaleDate(int32_t value) +{ + m_Stale_date = value; + m_Stale_dateIsSet = true; +} + +bool UpdateLiveActivityRequest::staleDateIsSet() const +{ + return m_Stale_dateIsSet; +} + +void UpdateLiveActivityRequest::unsetStale_date() +{ + m_Stale_dateIsSet = false; +} +int32_t UpdateLiveActivityRequest::getDismissalDate() const +{ + return m_Dismissal_date; +} + +void UpdateLiveActivityRequest::setDismissalDate(int32_t value) +{ + m_Dismissal_date = value; + m_Dismissal_dateIsSet = true; +} + +bool UpdateLiveActivityRequest::dismissalDateIsSet() const +{ + return m_Dismissal_dateIsSet; +} + +void UpdateLiveActivityRequest::unsetDismissal_date() +{ + m_Dismissal_dateIsSet = false; +} +int32_t UpdateLiveActivityRequest::getPriority() const { - return m_Dismiss_at; + return m_Priority; } -void UpdateLiveActivityRequest::setDismissAt(double value) +void UpdateLiveActivityRequest::setPriority(int32_t value) { - m_Dismiss_at = value; - m_Dismiss_atIsSet = true; + m_Priority = value; + m_PriorityIsSet = true; } -bool UpdateLiveActivityRequest::dismissAtIsSet() const +bool UpdateLiveActivityRequest::priorityIsSet() const { - return m_Dismiss_atIsSet; + return m_PriorityIsSet; } -void UpdateLiveActivityRequest::unsetDismiss_at() +void UpdateLiveActivityRequest::unsetPriority() { - m_Dismiss_atIsSet = false; + m_PriorityIsSet = false; } } } diff --git a/src/model/UpdateLiveActivitySuccessResponse.cpp b/src/model/UpdateLiveActivitySuccessResponse.cpp index 2b513bc..16dc731 100644 --- a/src/model/UpdateLiveActivitySuccessResponse.cpp +++ b/src/model/UpdateLiveActivitySuccessResponse.cpp @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. @@ -23,9 +23,8 @@ namespace model { UpdateLiveActivitySuccessResponse::UpdateLiveActivitySuccessResponse() { - m_Notification_id = utility::conversions::to_string_t(""); - m_Notification_idIsSet = false; - m_ErrorsIsSet = false; + m_Id = utility::conversions::to_string_t(""); + m_IdIsSet = false; } UpdateLiveActivitySuccessResponse::~UpdateLiveActivitySuccessResponse() @@ -42,13 +41,9 @@ web::json::value UpdateLiveActivitySuccessResponse::toJson() const web::json::value val = web::json::value::object(); - if(m_Notification_idIsSet) + if(m_IdIsSet) { - val[utility::conversions::to_string_t(U("notification_id"))] = ModelBase::toJson(m_Notification_id); - } - if(m_ErrorsIsSet) - { - val[utility::conversions::to_string_t(U("errors"))] = ModelBase::toJson(m_Errors); + val[utility::conversions::to_string_t(U("id"))] = ModelBase::toJson(m_Id); } return val; @@ -58,24 +53,14 @@ bool UpdateLiveActivitySuccessResponse::fromJson(const web::json::value& val) { bool ok = true; - if(val.has_field(utility::conversions::to_string_t(U("notification_id")))) + if(val.has_field(utility::conversions::to_string_t(U("id")))) { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("notification_id"))); + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("id"))); if(!fieldValue.is_null()) { - utility::string_t refVal_setNotificationId; - ok &= ModelBase::fromJson(fieldValue, refVal_setNotificationId); - setNotificationId(refVal_setNotificationId); - } - } - if(val.has_field(utility::conversions::to_string_t(U("errors")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("errors"))); - if(!fieldValue.is_null()) - { - std::shared_ptr refVal_setErrors; - ok &= ModelBase::fromJson(fieldValue, refVal_setErrors); - setErrors(refVal_setErrors); + utility::string_t refVal_setId; + ok &= ModelBase::fromJson(fieldValue, refVal_setId); + setId(refVal_setId); } } return ok; @@ -88,13 +73,9 @@ void UpdateLiveActivitySuccessResponse::toMultipart(std::shared_ptradd(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("notification_id")), m_Notification_id)); - } - if(m_ErrorsIsSet) + if(m_IdIsSet) { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("errors")), m_Errors)); + multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("id")), m_Id)); } } @@ -107,60 +88,34 @@ bool UpdateLiveActivitySuccessResponse::fromMultiPart(std::shared_ptrhasContent(utility::conversions::to_string_t(U("notification_id")))) - { - utility::string_t refVal_setNotificationId; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("notification_id"))), refVal_setNotificationId ); - setNotificationId(refVal_setNotificationId); - } - if(multipart->hasContent(utility::conversions::to_string_t(U("errors")))) + if(multipart->hasContent(utility::conversions::to_string_t(U("id")))) { - std::shared_ptr refVal_setErrors; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("errors"))), refVal_setErrors ); - setErrors(refVal_setErrors); + utility::string_t refVal_setId; + ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("id"))), refVal_setId ); + setId(refVal_setId); } return ok; } -utility::string_t UpdateLiveActivitySuccessResponse::getNotificationId() const -{ - return m_Notification_id; -} - -void UpdateLiveActivitySuccessResponse::setNotificationId(const utility::string_t& value) -{ - m_Notification_id = value; - m_Notification_idIsSet = true; -} - -bool UpdateLiveActivitySuccessResponse::notificationIdIsSet() const -{ - return m_Notification_idIsSet; -} - -void UpdateLiveActivitySuccessResponse::unsetNotification_id() -{ - m_Notification_idIsSet = false; -} -std::shared_ptr UpdateLiveActivitySuccessResponse::getErrors() const +utility::string_t UpdateLiveActivitySuccessResponse::getId() const { - return m_Errors; + return m_Id; } -void UpdateLiveActivitySuccessResponse::setErrors(const std::shared_ptr& value) +void UpdateLiveActivitySuccessResponse::setId(const utility::string_t& value) { - m_Errors = value; - m_ErrorsIsSet = true; + m_Id = value; + m_IdIsSet = true; } -bool UpdateLiveActivitySuccessResponse::errorsIsSet() const +bool UpdateLiveActivitySuccessResponse::idIsSet() const { - return m_ErrorsIsSet; + return m_IdIsSet; } -void UpdateLiveActivitySuccessResponse::unsetErrors() +void UpdateLiveActivitySuccessResponse::unsetId() { - m_ErrorsIsSet = false; + m_IdIsSet = false; } } } diff --git a/src/model/UpdatePlayerSuccessResponse.cpp b/src/model/UpdatePlayerSuccessResponse.cpp deleted file mode 100644 index 3a71cad..0000000 --- a/src/model/UpdatePlayerSuccessResponse.cpp +++ /dev/null @@ -1,125 +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.4.0 - * Contact: devrel@onesignal.com - * - * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOneSignalAPIClient/model/UpdatePlayerSuccessResponse.h" - -namespace com { -namespace onesignal { -namespace client { -namespace model { - - - -UpdatePlayerSuccessResponse::UpdatePlayerSuccessResponse() -{ - m_Success = false; - m_SuccessIsSet = false; -} - -UpdatePlayerSuccessResponse::~UpdatePlayerSuccessResponse() -{ -} - -void UpdatePlayerSuccessResponse::validate() -{ - // TODO: implement validation -} - -web::json::value UpdatePlayerSuccessResponse::toJson() const -{ - - web::json::value val = web::json::value::object(); - - if(m_SuccessIsSet) - { - val[utility::conversions::to_string_t(U("success"))] = ModelBase::toJson(m_Success); - } - - return val; -} - -bool UpdatePlayerSuccessResponse::fromJson(const web::json::value& val) -{ - bool ok = true; - - if(val.has_field(utility::conversions::to_string_t(U("success")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("success"))); - if(!fieldValue.is_null()) - { - bool refVal_setSuccess; - ok &= ModelBase::fromJson(fieldValue, refVal_setSuccess); - setSuccess(refVal_setSuccess); - } - } - return ok; -} - -void UpdatePlayerSuccessResponse::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - if(m_SuccessIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("success")), m_Success)); - } -} - -bool UpdatePlayerSuccessResponse::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(U("success")))) - { - bool refVal_setSuccess; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("success"))), refVal_setSuccess ); - setSuccess(refVal_setSuccess); - } - return ok; -} - -bool UpdatePlayerSuccessResponse::isSuccess() const -{ - return m_Success; -} - -void UpdatePlayerSuccessResponse::setSuccess(bool value) -{ - m_Success = value; - m_SuccessIsSet = true; -} - -bool UpdatePlayerSuccessResponse::successIsSet() const -{ - return m_SuccessIsSet; -} - -void UpdatePlayerSuccessResponse::unsetSuccess() -{ - m_SuccessIsSet = false; -} -} -} -} -} - - diff --git a/src/model/UpdatePlayerTagsSuccessResponse.cpp b/src/model/UpdatePlayerTagsSuccessResponse.cpp deleted file mode 100644 index 567ab67..0000000 --- a/src/model/UpdatePlayerTagsSuccessResponse.cpp +++ /dev/null @@ -1,125 +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.4.0 - * Contact: devrel@onesignal.com - * - * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOneSignalAPIClient/model/UpdatePlayerTagsSuccessResponse.h" - -namespace com { -namespace onesignal { -namespace client { -namespace model { - - - -UpdatePlayerTagsSuccessResponse::UpdatePlayerTagsSuccessResponse() -{ - m_Success = false; - m_SuccessIsSet = false; -} - -UpdatePlayerTagsSuccessResponse::~UpdatePlayerTagsSuccessResponse() -{ -} - -void UpdatePlayerTagsSuccessResponse::validate() -{ - // TODO: implement validation -} - -web::json::value UpdatePlayerTagsSuccessResponse::toJson() const -{ - - web::json::value val = web::json::value::object(); - - if(m_SuccessIsSet) - { - val[utility::conversions::to_string_t(U("success"))] = ModelBase::toJson(m_Success); - } - - return val; -} - -bool UpdatePlayerTagsSuccessResponse::fromJson(const web::json::value& val) -{ - bool ok = true; - - if(val.has_field(utility::conversions::to_string_t(U("success")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("success"))); - if(!fieldValue.is_null()) - { - bool refVal_setSuccess; - ok &= ModelBase::fromJson(fieldValue, refVal_setSuccess); - setSuccess(refVal_setSuccess); - } - } - return ok; -} - -void UpdatePlayerTagsSuccessResponse::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - if(m_SuccessIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("success")), m_Success)); - } -} - -bool UpdatePlayerTagsSuccessResponse::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(U("success")))) - { - bool refVal_setSuccess; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("success"))), refVal_setSuccess ); - setSuccess(refVal_setSuccess); - } - return ok; -} - -bool UpdatePlayerTagsSuccessResponse::isSuccess() const -{ - return m_Success; -} - -void UpdatePlayerTagsSuccessResponse::setSuccess(bool value) -{ - m_Success = value; - m_SuccessIsSet = true; -} - -bool UpdatePlayerTagsSuccessResponse::successIsSet() const -{ - return m_SuccessIsSet; -} - -void UpdatePlayerTagsSuccessResponse::unsetSuccess() -{ - m_SuccessIsSet = false; -} -} -} -} -} - - diff --git a/src/model/UpdateSubscriptionRequestBody.cpp b/src/model/UpdateSubscriptionRequestBody.cpp deleted file mode 100644 index ab4f190..0000000 --- a/src/model/UpdateSubscriptionRequestBody.cpp +++ /dev/null @@ -1,124 +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.4.0 - * Contact: devrel@onesignal.com - * - * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOneSignalAPIClient/model/UpdateSubscriptionRequestBody.h" - -namespace com { -namespace onesignal { -namespace client { -namespace model { - - - -UpdateSubscriptionRequestBody::UpdateSubscriptionRequestBody() -{ - m_SubscriptionIsSet = false; -} - -UpdateSubscriptionRequestBody::~UpdateSubscriptionRequestBody() -{ -} - -void UpdateSubscriptionRequestBody::validate() -{ - // TODO: implement validation -} - -web::json::value UpdateSubscriptionRequestBody::toJson() const -{ - - web::json::value val = web::json::value::object(); - - if(m_SubscriptionIsSet) - { - val[utility::conversions::to_string_t(U("subscription"))] = ModelBase::toJson(m_Subscription); - } - - return val; -} - -bool UpdateSubscriptionRequestBody::fromJson(const web::json::value& val) -{ - bool ok = true; - - if(val.has_field(utility::conversions::to_string_t(U("subscription")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("subscription"))); - if(!fieldValue.is_null()) - { - std::shared_ptr refVal_setSubscription; - ok &= ModelBase::fromJson(fieldValue, refVal_setSubscription); - setSubscription(refVal_setSubscription); - } - } - return ok; -} - -void UpdateSubscriptionRequestBody::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - if(m_SubscriptionIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("subscription")), m_Subscription)); - } -} - -bool UpdateSubscriptionRequestBody::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(U("subscription")))) - { - std::shared_ptr refVal_setSubscription; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("subscription"))), refVal_setSubscription ); - setSubscription(refVal_setSubscription); - } - return ok; -} - -std::shared_ptr UpdateSubscriptionRequestBody::getSubscription() const -{ - return m_Subscription; -} - -void UpdateSubscriptionRequestBody::setSubscription(const std::shared_ptr& value) -{ - m_Subscription = value; - m_SubscriptionIsSet = true; -} - -bool UpdateSubscriptionRequestBody::subscriptionIsSet() const -{ - return m_SubscriptionIsSet; -} - -void UpdateSubscriptionRequestBody::unsetSubscription() -{ - m_SubscriptionIsSet = false; -} -} -} -} -} - - diff --git a/src/model/UpdateUserRequest.cpp b/src/model/UpdateUserRequest.cpp index 5afa60d..47e24f4 100644 --- a/src/model/UpdateUserRequest.cpp +++ b/src/model/UpdateUserRequest.cpp @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. diff --git a/src/model/Update_player_tags_request_body.cpp b/src/model/Update_player_tags_request_body.cpp deleted file mode 100644 index b0c50dd..0000000 --- a/src/model/Update_player_tags_request_body.cpp +++ /dev/null @@ -1,124 +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.4.0 - * Contact: devrel@onesignal.com - * - * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOneSignalAPIClient/model/Update_player_tags_request_body.h" - -namespace com { -namespace onesignal { -namespace client { -namespace model { - - - -Update_player_tags_request_body::Update_player_tags_request_body() -{ - m_TagsIsSet = false; -} - -Update_player_tags_request_body::~Update_player_tags_request_body() -{ -} - -void Update_player_tags_request_body::validate() -{ - // TODO: implement validation -} - -web::json::value Update_player_tags_request_body::toJson() const -{ - - web::json::value val = web::json::value::object(); - - if(m_TagsIsSet) - { - val[utility::conversions::to_string_t(U("tags"))] = ModelBase::toJson(m_Tags); - } - - return val; -} - -bool Update_player_tags_request_body::fromJson(const web::json::value& val) -{ - bool ok = true; - - if(val.has_field(utility::conversions::to_string_t(U("tags")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("tags"))); - if(!fieldValue.is_null()) - { - std::shared_ptr refVal_setTags; - ok &= ModelBase::fromJson(fieldValue, refVal_setTags); - setTags(refVal_setTags); - } - } - return ok; -} - -void Update_player_tags_request_body::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - if(m_TagsIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("tags")), m_Tags)); - } -} - -bool Update_player_tags_request_body::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(U("tags")))) - { - std::shared_ptr refVal_setTags; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("tags"))), refVal_setTags ); - setTags(refVal_setTags); - } - return ok; -} - -std::shared_ptr Update_player_tags_request_body::getTags() const -{ - return m_Tags; -} - -void Update_player_tags_request_body::setTags(const std::shared_ptr& value) -{ - m_Tags = value; - m_TagsIsSet = true; -} - -bool Update_player_tags_request_body::tagsIsSet() const -{ - return m_TagsIsSet; -} - -void Update_player_tags_request_body::unsetTags() -{ - m_TagsIsSet = false; -} -} -} -} -} - - diff --git a/src/model/User.cpp b/src/model/User.cpp index 52090b0..1e80e35 100644 --- a/src/model/User.cpp +++ b/src/model/User.cpp @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. @@ -26,7 +26,6 @@ User::User() m_PropertiesIsSet = false; m_IdentityIsSet = false; m_SubscriptionsIsSet = false; - m_Subscription_optionsIsSet = false; } User::~User() @@ -55,10 +54,6 @@ web::json::value User::toJson() const { val[utility::conversions::to_string_t(U("subscriptions"))] = ModelBase::toJson(m_Subscriptions); } - if(m_Subscription_optionsIsSet) - { - val[utility::conversions::to_string_t(U("subscription_options"))] = ModelBase::toJson(m_Subscription_options); - } return val; } @@ -92,21 +87,11 @@ bool User::fromJson(const web::json::value& val) const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("subscriptions"))); if(!fieldValue.is_null()) { - std::vector> refVal_setSubscriptions; + std::vector> refVal_setSubscriptions; ok &= ModelBase::fromJson(fieldValue, refVal_setSubscriptions); setSubscriptions(refVal_setSubscriptions); } } - if(val.has_field(utility::conversions::to_string_t(U("subscription_options")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("subscription_options"))); - if(!fieldValue.is_null()) - { - std::shared_ptr refVal_setSubscriptionOptions; - ok &= ModelBase::fromJson(fieldValue, refVal_setSubscriptionOptions); - setSubscriptionOptions(refVal_setSubscriptionOptions); - } - } return ok; } @@ -129,10 +114,6 @@ void User::toMultipart(std::shared_ptr multipart, const utili { multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("subscriptions")), m_Subscriptions)); } - if(m_Subscription_optionsIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("subscription_options")), m_Subscription_options)); - } } bool User::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) @@ -158,16 +139,10 @@ bool User::fromMultiPart(std::shared_ptr multipart, const uti } if(multipart->hasContent(utility::conversions::to_string_t(U("subscriptions")))) { - std::vector> refVal_setSubscriptions; + std::vector> refVal_setSubscriptions; ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("subscriptions"))), refVal_setSubscriptions ); setSubscriptions(refVal_setSubscriptions); } - if(multipart->hasContent(utility::conversions::to_string_t(U("subscription_options")))) - { - std::shared_ptr refVal_setSubscriptionOptions; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("subscription_options"))), refVal_setSubscriptionOptions ); - setSubscriptionOptions(refVal_setSubscriptionOptions); - } return ok; } @@ -211,12 +186,12 @@ void User::unsetIdentity() { m_IdentityIsSet = false; } -std::vector>& User::getSubscriptions() +std::vector>& User::getSubscriptions() { return m_Subscriptions; } -void User::setSubscriptions(const std::vector>& value) +void User::setSubscriptions(const std::vector>& value) { m_Subscriptions = value; m_SubscriptionsIsSet = true; @@ -231,26 +206,6 @@ void User::unsetSubscriptions() { m_SubscriptionsIsSet = false; } -std::shared_ptr User::getSubscriptionOptions() const -{ - return m_Subscription_options; -} - -void User::setSubscriptionOptions(const std::shared_ptr& value) -{ - m_Subscription_options = value; - m_Subscription_optionsIsSet = true; -} - -bool User::subscriptionOptionsIsSet() const -{ - return m_Subscription_optionsIsSet; -} - -void User::unsetSubscription_options() -{ - m_Subscription_optionsIsSet = false; -} } } } diff --git a/src/model/Inline_response_200.cpp b/src/model/UserIdentityBody.cpp similarity index 73% rename from src/model/Inline_response_200.cpp rename to src/model/UserIdentityBody.cpp index 8ed2b13..1abbe0a 100644 --- a/src/model/Inline_response_200.cpp +++ b/src/model/UserIdentityBody.cpp @@ -2,7 +2,7 @@ * 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.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. @@ -12,7 +12,7 @@ -#include "CppRestOneSignalAPIClient/model/Inline_response_200.h" +#include "CppRestOneSignalAPIClient/model/UserIdentityBody.h" namespace com { namespace onesignal { @@ -21,21 +21,21 @@ namespace model { -Inline_response_200::Inline_response_200() +UserIdentityBody::UserIdentityBody() { m_IdentityIsSet = false; } -Inline_response_200::~Inline_response_200() +UserIdentityBody::~UserIdentityBody() { } -void Inline_response_200::validate() +void UserIdentityBody::validate() { // TODO: implement validation } -web::json::value Inline_response_200::toJson() const +web::json::value UserIdentityBody::toJson() const { web::json::value val = web::json::value::object(); @@ -48,7 +48,7 @@ web::json::value Inline_response_200::toJson() const return val; } -bool Inline_response_200::fromJson(const web::json::value& val) +bool UserIdentityBody::fromJson(const web::json::value& val) { bool ok = true; @@ -65,7 +65,7 @@ bool Inline_response_200::fromJson(const web::json::value& val) return ok; } -void Inline_response_200::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const +void UserIdentityBody::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const { utility::string_t namePrefix = prefix; if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) @@ -78,7 +78,7 @@ void Inline_response_200::toMultipart(std::shared_ptr multipa } } -bool Inline_response_200::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) +bool UserIdentityBody::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) { bool ok = true; utility::string_t namePrefix = prefix; @@ -96,23 +96,23 @@ bool Inline_response_200::fromMultiPart(std::shared_ptr multi return ok; } -std::map& Inline_response_200::getIdentity() +std::map& UserIdentityBody::getIdentity() { return m_Identity; } -void Inline_response_200::setIdentity(const std::map& value) +void UserIdentityBody::setIdentity(const std::map& value) { m_Identity = value; m_IdentityIsSet = true; } -bool Inline_response_200::identityIsSet() const +bool UserIdentityBody::identityIsSet() const { return m_IdentityIsSet; } -void Inline_response_200::unsetIdentity() +void UserIdentityBody::unsetIdentity() { m_IdentityIsSet = false; } diff --git a/src/model/UserIdentityRequestBody.cpp b/src/model/UserIdentityRequestBody.cpp deleted file mode 100644 index 564f204..0000000 --- a/src/model/UserIdentityRequestBody.cpp +++ /dev/null @@ -1,124 +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.4.0 - * Contact: devrel@onesignal.com - * - * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOneSignalAPIClient/model/UserIdentityRequestBody.h" - -namespace com { -namespace onesignal { -namespace client { -namespace model { - - - -UserIdentityRequestBody::UserIdentityRequestBody() -{ - m_IdentityIsSet = false; -} - -UserIdentityRequestBody::~UserIdentityRequestBody() -{ -} - -void UserIdentityRequestBody::validate() -{ - // TODO: implement validation -} - -web::json::value UserIdentityRequestBody::toJson() const -{ - - web::json::value val = web::json::value::object(); - - if(m_IdentityIsSet) - { - val[utility::conversions::to_string_t(U("identity"))] = ModelBase::toJson(m_Identity); - } - - return val; -} - -bool UserIdentityRequestBody::fromJson(const web::json::value& val) -{ - bool ok = true; - - if(val.has_field(utility::conversions::to_string_t(U("identity")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("identity"))); - if(!fieldValue.is_null()) - { - std::map refVal_setIdentity; - ok &= ModelBase::fromJson(fieldValue, refVal_setIdentity); - setIdentity(refVal_setIdentity); - } - } - return ok; -} - -void UserIdentityRequestBody::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - if(m_IdentityIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("identity")), m_Identity)); - } -} - -bool UserIdentityRequestBody::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(U("identity")))) - { - std::map refVal_setIdentity; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("identity"))), refVal_setIdentity ); - setIdentity(refVal_setIdentity); - } - return ok; -} - -std::map& UserIdentityRequestBody::getIdentity() -{ - return m_Identity; -} - -void UserIdentityRequestBody::setIdentity(const std::map& value) -{ - m_Identity = value; - m_IdentityIsSet = true; -} - -bool UserIdentityRequestBody::identityIsSet() const -{ - return m_IdentityIsSet; -} - -void UserIdentityRequestBody::unsetIdentity() -{ - m_IdentityIsSet = false; -} -} -} -} -} - - diff --git a/src/model/UserIdentityResponse.cpp b/src/model/UserIdentityResponse.cpp deleted file mode 100644 index 09276d0..0000000 --- a/src/model/UserIdentityResponse.cpp +++ /dev/null @@ -1,124 +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.4.0 - * Contact: devrel@onesignal.com - * - * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOneSignalAPIClient/model/UserIdentityResponse.h" - -namespace com { -namespace onesignal { -namespace client { -namespace model { - - - -UserIdentityResponse::UserIdentityResponse() -{ - m_IdentityIsSet = false; -} - -UserIdentityResponse::~UserIdentityResponse() -{ -} - -void UserIdentityResponse::validate() -{ - // TODO: implement validation -} - -web::json::value UserIdentityResponse::toJson() const -{ - - web::json::value val = web::json::value::object(); - - if(m_IdentityIsSet) - { - val[utility::conversions::to_string_t(U("identity"))] = ModelBase::toJson(m_Identity); - } - - return val; -} - -bool UserIdentityResponse::fromJson(const web::json::value& val) -{ - bool ok = true; - - if(val.has_field(utility::conversions::to_string_t(U("identity")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("identity"))); - if(!fieldValue.is_null()) - { - std::map refVal_setIdentity; - ok &= ModelBase::fromJson(fieldValue, refVal_setIdentity); - setIdentity(refVal_setIdentity); - } - } - return ok; -} - -void UserIdentityResponse::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - if(m_IdentityIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("identity")), m_Identity)); - } -} - -bool UserIdentityResponse::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(U("identity")))) - { - std::map refVal_setIdentity; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("identity"))), refVal_setIdentity ); - setIdentity(refVal_setIdentity); - } - return ok; -} - -std::map& UserIdentityResponse::getIdentity() -{ - return m_Identity; -} - -void UserIdentityResponse::setIdentity(const std::map& value) -{ - m_Identity = value; - m_IdentityIsSet = true; -} - -bool UserIdentityResponse::identityIsSet() const -{ - return m_IdentityIsSet; -} - -void UserIdentityResponse::unsetIdentity() -{ - m_IdentityIsSet = false; -} -} -} -} -} - - diff --git a/src/model/User_subscription_options.cpp b/src/model/User_subscription_options.cpp deleted file mode 100644 index 7ae7759..0000000 --- a/src/model/User_subscription_options.cpp +++ /dev/null @@ -1,125 +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.4.0 - * Contact: devrel@onesignal.com - * - * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOneSignalAPIClient/model/User_subscription_options.h" - -namespace com { -namespace onesignal { -namespace client { -namespace model { - - - -User_subscription_options::User_subscription_options() -{ - m_Retain_previous_owner = false; - m_Retain_previous_ownerIsSet = false; -} - -User_subscription_options::~User_subscription_options() -{ -} - -void User_subscription_options::validate() -{ - // TODO: implement validation -} - -web::json::value User_subscription_options::toJson() const -{ - - web::json::value val = web::json::value::object(); - - if(m_Retain_previous_ownerIsSet) - { - val[utility::conversions::to_string_t(U("retain_previous_owner"))] = ModelBase::toJson(m_Retain_previous_owner); - } - - return val; -} - -bool User_subscription_options::fromJson(const web::json::value& val) -{ - bool ok = true; - - if(val.has_field(utility::conversions::to_string_t(U("retain_previous_owner")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("retain_previous_owner"))); - if(!fieldValue.is_null()) - { - bool refVal_setRetainPreviousOwner; - ok &= ModelBase::fromJson(fieldValue, refVal_setRetainPreviousOwner); - setRetainPreviousOwner(refVal_setRetainPreviousOwner); - } - } - return ok; -} - -void User_subscription_options::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - if(m_Retain_previous_ownerIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("retain_previous_owner")), m_Retain_previous_owner)); - } -} - -bool User_subscription_options::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) - { - namePrefix += utility::conversions::to_string_t(U(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(U("retain_previous_owner")))) - { - bool refVal_setRetainPreviousOwner; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("retain_previous_owner"))), refVal_setRetainPreviousOwner ); - setRetainPreviousOwner(refVal_setRetainPreviousOwner); - } - return ok; -} - -bool User_subscription_options::isRetainPreviousOwner() const -{ - return m_Retain_previous_owner; -} - -void User_subscription_options::setRetainPreviousOwner(bool value) -{ - m_Retain_previous_owner = value; - m_Retain_previous_ownerIsSet = true; -} - -bool User_subscription_options::retainPreviousOwnerIsSet() const -{ - return m_Retain_previous_ownerIsSet; -} - -void User_subscription_options::unsetRetain_previous_owner() -{ - m_Retain_previous_ownerIsSet = false; -} -} -} -} -} - - diff --git a/src/model/WebButton.cpp b/src/model/WebButton.cpp new file mode 100644 index 0000000..7417021 --- /dev/null +++ b/src/model/WebButton.cpp @@ -0,0 +1,263 @@ +/** + * 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: 5.0.1 + * Contact: devrel@onesignal.com + * + * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT. + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +#include "CppRestOneSignalAPIClient/model/WebButton.h" + +namespace com { +namespace onesignal { +namespace client { +namespace model { + + + +WebButton::WebButton() +{ + m_Id = utility::conversions::to_string_t(""); + m_IdIsSet = false; + m_Text = utility::conversions::to_string_t(""); + m_TextIsSet = false; + m_Icon = utility::conversions::to_string_t(""); + m_IconIsSet = false; + m_Url = utility::conversions::to_string_t(""); + m_UrlIsSet = false; +} + +WebButton::~WebButton() +{ +} + +void WebButton::validate() +{ + // TODO: implement validation +} + +web::json::value WebButton::toJson() const +{ + + web::json::value val = web::json::value::object(); + + if(m_IdIsSet) + { + val[utility::conversions::to_string_t(U("id"))] = ModelBase::toJson(m_Id); + } + if(m_TextIsSet) + { + val[utility::conversions::to_string_t(U("text"))] = ModelBase::toJson(m_Text); + } + if(m_IconIsSet) + { + val[utility::conversions::to_string_t(U("icon"))] = ModelBase::toJson(m_Icon); + } + if(m_UrlIsSet) + { + val[utility::conversions::to_string_t(U("url"))] = ModelBase::toJson(m_Url); + } + + return val; +} + +bool WebButton::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t(U("id")))) + { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("id"))); + if(!fieldValue.is_null()) + { + utility::string_t refVal_setId; + ok &= ModelBase::fromJson(fieldValue, refVal_setId); + setId(refVal_setId); + } + } + if(val.has_field(utility::conversions::to_string_t(U("text")))) + { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("text"))); + if(!fieldValue.is_null()) + { + utility::string_t refVal_setText; + ok &= ModelBase::fromJson(fieldValue, refVal_setText); + setText(refVal_setText); + } + } + if(val.has_field(utility::conversions::to_string_t(U("icon")))) + { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("icon"))); + if(!fieldValue.is_null()) + { + utility::string_t refVal_setIcon; + ok &= ModelBase::fromJson(fieldValue, refVal_setIcon); + setIcon(refVal_setIcon); + } + } + if(val.has_field(utility::conversions::to_string_t(U("url")))) + { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("url"))); + if(!fieldValue.is_null()) + { + utility::string_t refVal_setUrl; + ok &= ModelBase::fromJson(fieldValue, refVal_setUrl); + setUrl(refVal_setUrl); + } + } + return ok; +} + +void WebButton::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const +{ + utility::string_t namePrefix = prefix; + if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) + { + namePrefix += utility::conversions::to_string_t(U(".")); + } + if(m_IdIsSet) + { + multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("id")), m_Id)); + } + if(m_TextIsSet) + { + multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("text")), m_Text)); + } + if(m_IconIsSet) + { + multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("icon")), m_Icon)); + } + if(m_UrlIsSet) + { + multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("url")), m_Url)); + } +} + +bool WebButton::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) +{ + bool ok = true; + utility::string_t namePrefix = prefix; + if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U("."))) + { + namePrefix += utility::conversions::to_string_t(U(".")); + } + + if(multipart->hasContent(utility::conversions::to_string_t(U("id")))) + { + utility::string_t refVal_setId; + ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("id"))), refVal_setId ); + setId(refVal_setId); + } + if(multipart->hasContent(utility::conversions::to_string_t(U("text")))) + { + utility::string_t refVal_setText; + ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("text"))), refVal_setText ); + setText(refVal_setText); + } + if(multipart->hasContent(utility::conversions::to_string_t(U("icon")))) + { + utility::string_t refVal_setIcon; + ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("icon"))), refVal_setIcon ); + setIcon(refVal_setIcon); + } + if(multipart->hasContent(utility::conversions::to_string_t(U("url")))) + { + utility::string_t refVal_setUrl; + ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("url"))), refVal_setUrl ); + setUrl(refVal_setUrl); + } + return ok; +} + +utility::string_t WebButton::getId() const +{ + return m_Id; +} + +void WebButton::setId(const utility::string_t& value) +{ + m_Id = value; + m_IdIsSet = true; +} + +bool WebButton::idIsSet() const +{ + return m_IdIsSet; +} + +void WebButton::unsetId() +{ + m_IdIsSet = false; +} +utility::string_t WebButton::getText() const +{ + return m_Text; +} + +void WebButton::setText(const utility::string_t& value) +{ + m_Text = value; + m_TextIsSet = true; +} + +bool WebButton::textIsSet() const +{ + return m_TextIsSet; +} + +void WebButton::unsetText() +{ + m_TextIsSet = false; +} +utility::string_t WebButton::getIcon() const +{ + return m_Icon; +} + +void WebButton::setIcon(const utility::string_t& value) +{ + m_Icon = value; + m_IconIsSet = true; +} + +bool WebButton::iconIsSet() const +{ + return m_IconIsSet; +} + +void WebButton::unsetIcon() +{ + m_IconIsSet = false; +} +utility::string_t WebButton::getUrl() const +{ + return m_Url; +} + +void WebButton::setUrl(const utility::string_t& value) +{ + m_Url = value; + m_UrlIsSet = true; +} + +bool WebButton::urlIsSet() const +{ + return m_UrlIsSet; +} + +void WebButton::unsetUrl() +{ + m_UrlIsSet = false; +} +} +} +} +} + +