diff --git a/.github/ISSUE_TEMPLATE/ask-question.yml b/.github/ISSUE_TEMPLATE/ask-question.yml index 3da173f..6a3c282 100644 --- a/.github/ISSUE_TEMPLATE/ask-question.yml +++ b/.github/ISSUE_TEMPLATE/ask-question.yml @@ -1,7 +1,7 @@ name: 🙋‍♂️ Ask a question description: Tell us what's on your mind -title: "[question]: " -labels: ["triage"] +title: "[Question]: " +labels: ["Question"] body: - type: markdown attributes: @@ -22,4 +22,4 @@ body: description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/OneSignal/api/blob/main/CONTRIBUTING.md) options: - label: I agree to follow this project's Code of Conduct - required: true \ No newline at end of file + required: true diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml index f274813..f99d9f6 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.yml +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -1,7 +1,7 @@ name: 🪳 Bug report description: File a bug report title: "[Bug]: " -labels: ["bug", "triage"] +labels: ["Bug"] body: - type: markdown attributes: @@ -48,4 +48,4 @@ body: description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/OneSignal/api/blob/main/CONTRIBUTING.md) options: - label: I agree to follow this project's Code of Conduct - required: true \ No newline at end of file + required: true diff --git a/.github/ISSUE_TEMPLATE/general-feedback.yml b/.github/ISSUE_TEMPLATE/general-feedback.yml index e632759..704514e 100644 --- a/.github/ISSUE_TEMPLATE/general-feedback.yml +++ b/.github/ISSUE_TEMPLATE/general-feedback.yml @@ -1,7 +1,7 @@ name: 📣 General feedback description: Tell us what's on your mind -title: "[Bug]: " -labels: ["triage"] +title: "[Feedback]: " +labels: ["Feedback"] body: - type: markdown attributes: @@ -22,4 +22,4 @@ body: description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/OneSignal/api/blob/main/CONTRIBUTING.md) options: - label: I agree to follow this project's Code of Conduct - required: true \ No newline at end of file + required: true diff --git a/.github/workflows/project.yml b/.github/workflows/project.yml new file mode 100644 index 0000000..69960fe --- /dev/null +++ b/.github/workflows/project.yml @@ -0,0 +1,17 @@ +name: Add issues to project + +on: + issues: + types: + - opened + +jobs: + add-to-project: + runs-on: ubuntu-latest + steps: + - name: Add issue to project + uses: actions/add-to-project@v1.0.2 + with: + # SDK Server Project + project-url: https://github.com/orgs/OneSignal/projects/11 + github-token: ${{ secrets.GH_PROJECTS_TOKEN }} diff --git a/README.md b/README.md index 9a50ae8..5fa5aa1 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://www.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.GoClientCodegen For more information, please visit [https://onesignal.com](https://onesignal.com) @@ -81,41 +81,34 @@ All URIs are relative to *https://api.onesignal.com* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*DefaultApi* | [**BeginLiveActivity**](docs/DefaultApi.md#beginliveactivity) | **Post** /apps/{app_id}/live_activities/{activity_id}/token | Start Live Activity *DefaultApi* | [**CancelNotification**](docs/DefaultApi.md#cancelnotification) | **Delete** /notifications/{notification_id} | Stop a scheduled or currently outgoing notification +*DefaultApi* | [**CreateAlias**](docs/DefaultApi.md#createalias) | **Patch** /apps/{app_id}/users/by/{alias_label}/{alias_id}/identity | +*DefaultApi* | [**CreateAliasBySubscription**](docs/DefaultApi.md#createaliasbysubscription) | **Patch** /apps/{app_id}/subscriptions/{subscription_id}/user/identity | *DefaultApi* | [**CreateApp**](docs/DefaultApi.md#createapp) | **Post** /apps | Create an app *DefaultApi* | [**CreateNotification**](docs/DefaultApi.md#createnotification) | **Post** /notifications | Create notification -*DefaultApi* | [**CreatePlayer**](docs/DefaultApi.md#createplayer) | **Post** /players | Add a device -*DefaultApi* | [**CreateSegments**](docs/DefaultApi.md#createsegments) | **Post** /apps/{app_id}/segments | Create Segments +*DefaultApi* | [**CreateSegment**](docs/DefaultApi.md#createsegment) | **Post** /apps/{app_id}/segments | Create Segment *DefaultApi* | [**CreateSubscription**](docs/DefaultApi.md#createsubscription) | **Post** /apps/{app_id}/users/by/{alias_label}/{alias_id}/subscriptions | *DefaultApi* | [**CreateUser**](docs/DefaultApi.md#createuser) | **Post** /apps/{app_id}/users | *DefaultApi* | [**DeleteAlias**](docs/DefaultApi.md#deletealias) | **Delete** /apps/{app_id}/users/by/{alias_label}/{alias_id}/identity/{alias_label_to_delete} | -*DefaultApi* | [**DeletePlayer**](docs/DefaultApi.md#deleteplayer) | **Delete** /players/{player_id} | Delete a user record -*DefaultApi* | [**DeleteSegments**](docs/DefaultApi.md#deletesegments) | **Delete** /apps/{app_id}/segments/{segment_id} | Delete Segments +*DefaultApi* | [**DeleteSegment**](docs/DefaultApi.md#deletesegment) | **Delete** /apps/{app_id}/segments/{segment_id} | Delete Segment *DefaultApi* | [**DeleteSubscription**](docs/DefaultApi.md#deletesubscription) | **Delete** /apps/{app_id}/subscriptions/{subscription_id} | *DefaultApi* | [**DeleteUser**](docs/DefaultApi.md#deleteuser) | **Delete** /apps/{app_id}/users/by/{alias_label}/{alias_id} | -*DefaultApi* | [**EndLiveActivity**](docs/DefaultApi.md#endliveactivity) | **Delete** /apps/{app_id}/live_activities/{activity_id}/token/{subscription_id} | Stop Live Activity *DefaultApi* | [**ExportEvents**](docs/DefaultApi.md#exportevents) | **Post** /notifications/{notification_id}/export_events?app_id={app_id} | Export CSV of Events -*DefaultApi* | [**ExportPlayers**](docs/DefaultApi.md#exportplayers) | **Post** /players/csv_export?app_id={app_id} | Export CSV of Players -*DefaultApi* | [**FetchAliases**](docs/DefaultApi.md#fetchaliases) | **Get** /apps/{app_id}/subscriptions/{subscription_id}/user/identity | -*DefaultApi* | [**FetchUser**](docs/DefaultApi.md#fetchuser) | **Get** /apps/{app_id}/users/by/{alias_label}/{alias_id} | -*DefaultApi* | [**FetchUserIdentity**](docs/DefaultApi.md#fetchuseridentity) | **Get** /apps/{app_id}/users/by/{alias_label}/{alias_id}/identity | +*DefaultApi* | [**ExportSubscriptions**](docs/DefaultApi.md#exportsubscriptions) | **Post** /players/csv_export?app_id={app_id} | Export CSV of Subscriptions +*DefaultApi* | [**GetAliases**](docs/DefaultApi.md#getaliases) | **Get** /apps/{app_id}/users/by/{alias_label}/{alias_id}/identity | +*DefaultApi* | [**GetAliasesBySubscription**](docs/DefaultApi.md#getaliasesbysubscription) | **Get** /apps/{app_id}/subscriptions/{subscription_id}/user/identity | *DefaultApi* | [**GetApp**](docs/DefaultApi.md#getapp) | **Get** /apps/{app_id} | View an app *DefaultApi* | [**GetApps**](docs/DefaultApi.md#getapps) | **Get** /apps | View apps -*DefaultApi* | [**GetEligibleIams**](docs/DefaultApi.md#geteligibleiams) | **Get** /apps/{app_id}/subscriptions/{subscription_id}/iams | *DefaultApi* | [**GetNotification**](docs/DefaultApi.md#getnotification) | **Get** /notifications/{notification_id} | View notification *DefaultApi* | [**GetNotificationHistory**](docs/DefaultApi.md#getnotificationhistory) | **Post** /notifications/{notification_id}/history | Notification History *DefaultApi* | [**GetNotifications**](docs/DefaultApi.md#getnotifications) | **Get** /notifications | View notifications *DefaultApi* | [**GetOutcomes**](docs/DefaultApi.md#getoutcomes) | **Get** /apps/{app_id}/outcomes | View Outcomes -*DefaultApi* | [**GetPlayer**](docs/DefaultApi.md#getplayer) | **Get** /players/{player_id} | View device -*DefaultApi* | [**GetPlayers**](docs/DefaultApi.md#getplayers) | **Get** /players | View devices -*DefaultApi* | [**IdentifyUserByAlias**](docs/DefaultApi.md#identifyuserbyalias) | **Patch** /apps/{app_id}/users/by/{alias_label}/{alias_id}/identity | -*DefaultApi* | [**IdentifyUserBySubscriptionId**](docs/DefaultApi.md#identifyuserbysubscriptionid) | **Patch** /apps/{app_id}/subscriptions/{subscription_id}/user/identity | +*DefaultApi* | [**GetSegments**](docs/DefaultApi.md#getsegments) | **Get** /apps/{app_id}/segments | Get Segments +*DefaultApi* | [**GetUser**](docs/DefaultApi.md#getuser) | **Get** /apps/{app_id}/users/by/{alias_label}/{alias_id} | *DefaultApi* | [**TransferSubscription**](docs/DefaultApi.md#transfersubscription) | **Patch** /apps/{app_id}/subscriptions/{subscription_id}/owner | +*DefaultApi* | [**UnsubscribeEmailWithToken**](docs/DefaultApi.md#unsubscribeemailwithtoken) | **Post** /apps/{app_id}/notifications/{notification_id}/unsubscribe | Unsubscribe with token *DefaultApi* | [**UpdateApp**](docs/DefaultApi.md#updateapp) | **Put** /apps/{app_id} | Update an app *DefaultApi* | [**UpdateLiveActivity**](docs/DefaultApi.md#updateliveactivity) | **Post** /apps/{app_id}/live_activities/{activity_id}/notifications | Update a Live Activity via Push -*DefaultApi* | [**UpdatePlayer**](docs/DefaultApi.md#updateplayer) | **Put** /players/{player_id} | Edit device -*DefaultApi* | [**UpdatePlayerTags**](docs/DefaultApi.md#updateplayertags) | **Put** /apps/{app_id}/users/{external_user_id} | Edit tags with external user id *DefaultApi* | [**UpdateSubscription**](docs/DefaultApi.md#updatesubscription) | **Patch** /apps/{app_id}/subscriptions/{subscription_id} | *DefaultApi* | [**UpdateUser**](docs/DefaultApi.md#updateuser) | **Patch** /apps/{app_id}/users/by/{alias_label}/{alias_id} | @@ -126,37 +119,25 @@ Class | Method | HTTP request | Description - [BasicNotification](docs/BasicNotification.md) - [BasicNotificationAllOf](docs/BasicNotificationAllOf.md) - [BasicNotificationAllOfAndroidBackgroundLayout](docs/BasicNotificationAllOfAndroidBackgroundLayout.md) - - [BeginLiveActivityRequest](docs/BeginLiveActivityRequest.md) - [Button](docs/Button.md) - - [CancelNotificationSuccessResponse](docs/CancelNotificationSuccessResponse.md) - [CreateNotificationSuccessResponse](docs/CreateNotificationSuccessResponse.md) - - [CreatePlayerSuccessResponse](docs/CreatePlayerSuccessResponse.md) - [CreateSegmentConflictResponse](docs/CreateSegmentConflictResponse.md) - [CreateSegmentSuccessResponse](docs/CreateSegmentSuccessResponse.md) - - [CreateSubscriptionRequestBody](docs/CreateSubscriptionRequestBody.md) - [CreateUserConflictResponse](docs/CreateUserConflictResponse.md) - [CreateUserConflictResponseErrorsInner](docs/CreateUserConflictResponseErrorsInner.md) - [CreateUserConflictResponseErrorsItemsMeta](docs/CreateUserConflictResponseErrorsItemsMeta.md) - - [DeletePlayerNotFoundResponse](docs/DeletePlayerNotFoundResponse.md) - - [DeletePlayerSuccessResponse](docs/DeletePlayerSuccessResponse.md) - - [DeleteSegmentNotFoundResponse](docs/DeleteSegmentNotFoundResponse.md) - - [DeleteSegmentSuccessResponse](docs/DeleteSegmentSuccessResponse.md) - [DeliveryData](docs/DeliveryData.md) - [ExportEventsSuccessResponse](docs/ExportEventsSuccessResponse.md) - - [ExportPlayersRequestBody](docs/ExportPlayersRequestBody.md) - - [ExportPlayersSuccessResponse](docs/ExportPlayersSuccessResponse.md) + - [ExportSubscriptionsRequestBody](docs/ExportSubscriptionsRequestBody.md) + - [ExportSubscriptionsSuccessResponse](docs/ExportSubscriptionsSuccessResponse.md) - [Filter](docs/Filter.md) - - [FilterExpressions](docs/FilterExpressions.md) + - [FilterExpression](docs/FilterExpression.md) - [GenericError](docs/GenericError.md) - - [GenericErrorErrorsInner](docs/GenericErrorErrorsInner.md) - - [GetNotificationRequestBody](docs/GetNotificationRequestBody.md) - - [InlineResponse200](docs/InlineResponse200.md) - - [InlineResponse2003](docs/InlineResponse2003.md) - - [InlineResponse201](docs/InlineResponse201.md) - - [InlineResponse202](docs/InlineResponse202.md) - - [InvalidIdentifierError](docs/InvalidIdentifierError.md) + - [GenericSuccessBoolResponse](docs/GenericSuccessBoolResponse.md) + - [GetNotificationHistoryRequestBody](docs/GetNotificationHistoryRequestBody.md) + - [GetSegmentsSuccessResponse](docs/GetSegmentsSuccessResponse.md) + - [LanguageStringMap](docs/LanguageStringMap.md) - [Notification](docs/Notification.md) - - [Notification200Errors](docs/Notification200Errors.md) - [NotificationAllOf](docs/NotificationAllOf.md) - [NotificationHistorySuccessResponse](docs/NotificationHistorySuccessResponse.md) - [NotificationSlice](docs/NotificationSlice.md) @@ -169,30 +150,24 @@ Class | Method | HTTP request | Description - [PlatformDeliveryData](docs/PlatformDeliveryData.md) - [PlatformDeliveryDataEmailAllOf](docs/PlatformDeliveryDataEmailAllOf.md) - [PlatformDeliveryDataSmsAllOf](docs/PlatformDeliveryDataSmsAllOf.md) - - [Player](docs/Player.md) - - [PlayerNotificationTarget](docs/PlayerNotificationTarget.md) - - [PlayerNotificationTargetIncludeAliases](docs/PlayerNotificationTargetIncludeAliases.md) - - [PlayerSlice](docs/PlayerSlice.md) + - [PropertiesBody](docs/PropertiesBody.md) - [PropertiesDeltas](docs/PropertiesDeltas.md) - [PropertiesObject](docs/PropertiesObject.md) - [Purchase](docs/Purchase.md) - - [RateLimiterError](docs/RateLimiterError.md) + - [RateLimitError](docs/RateLimitError.md) - [Segment](docs/Segment.md) + - [SegmentData](docs/SegmentData.md) - [SegmentNotificationTarget](docs/SegmentNotificationTarget.md) - - [StringMap](docs/StringMap.md) - - [SubscriptionObject](docs/SubscriptionObject.md) + - [Subscription](docs/Subscription.md) + - [SubscriptionBody](docs/SubscriptionBody.md) + - [SubscriptionNotificationTarget](docs/SubscriptionNotificationTarget.md) - [TransferSubscriptionRequestBody](docs/TransferSubscriptionRequestBody.md) - [UpdateLiveActivityRequest](docs/UpdateLiveActivityRequest.md) - [UpdateLiveActivitySuccessResponse](docs/UpdateLiveActivitySuccessResponse.md) - - [UpdatePlayerSuccessResponse](docs/UpdatePlayerSuccessResponse.md) - - [UpdatePlayerTagsRequestBody](docs/UpdatePlayerTagsRequestBody.md) - - [UpdatePlayerTagsSuccessResponse](docs/UpdatePlayerTagsSuccessResponse.md) - - [UpdateSubscriptionRequestBody](docs/UpdateSubscriptionRequestBody.md) - [UpdateUserRequest](docs/UpdateUserRequest.md) - [User](docs/User.md) - - [UserIdentityRequestBody](docs/UserIdentityRequestBody.md) - - [UserIdentityResponse](docs/UserIdentityResponse.md) - - [UserSubscriptionOptions](docs/UserSubscriptionOptions.md) + - [UserIdentityBody](docs/UserIdentityBody.md) + - [WebButton](docs/WebButton.md) ## Documentation For Authorization @@ -200,22 +175,20 @@ Use a OneSignal authentication context for each auth type: - `AppAuth` - `UserAuth` -### app_key +### rest_api_key - **Type**: HTTP Bearer token authentication Example ```golang -appAuth := context.WithValue(context.Background(), onesignal.AppAuth, "APP_KEY_STRING") ``` -### user_key +### user_auth_key - **Type**: HTTP Bearer token authentication Example ```golang -userAuth := context.WithValue(context.Background(), onesignal.UserAuth, "USER_KEY_STRING") ``` diff --git a/api/openapi.yaml b/api/openapi.yaml index 7c3666a..c27efa4 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -8,7 +8,7 @@ info: customer engagement strategies. Learn more at onesignal.com termsOfService: https://onesignal.com/tos title: OneSignal - version: 1.4.0 + version: 5.0.1 servers: - url: https://api.onesignal.com paths: @@ -77,10 +77,10 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/RateLimiterError' + $ref: '#/components/schemas/RateLimitError' description: Rate Limit Exceeded security: - - app_key: [] + - rest_api_key: [] summary: View notifications post: description: | @@ -98,14 +98,14 @@ paths: application/json: schema: $ref: '#/components/schemas/CreateNotificationSuccessResponse' - description: "OK, invalid_player_ids, invalid_external_user_ids or No Subscribed\ - \ Players\nIf a message was successfully created, you will get a 200 response\ - \ and an id for the notification.\nIf the 200 response contains \"invalid_player_ids\"\ - \ or \"invalid_external_user_ids\" this will mark devices that exist in\ - \ the provided app_id but are no longer subscribed.\nIf no id is returned,\ - \ then a message was not created and the targeted User IDs do not exist\ - \ under the provided app_id.\nAny User IDs sent in the request that do\ - \ not exist under the specified app_id will be ignored.\n" + description: "OK, invalid_aliases, or No Subscribed Players\nIf a message\ + \ was successfully created, you will get a 200 response and an id for\ + \ the notification.\nIf the 200 response contains \"invalid_aliases\"\ + \ this will mark devices that exist in the provided app_id but are no\ + \ longer subscribed.\nIf no id is returned, then a message was not created\ + \ and the targeted User IDs do not exist under the provided app_id.\n\ + Any User IDs sent in the request that do not exist under the specified\ + \ app_id will be ignored.\n" "400": content: application/json: @@ -116,10 +116,10 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/RateLimiterError' + $ref: '#/components/schemas/RateLimitError' description: Rate Limit Exceeded security: - - app_key: [] + - rest_api_key: [] summary: Create notification /notifications/{notification_id}: delete: @@ -145,7 +145,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/CancelNotificationSuccessResponse' + $ref: '#/components/schemas/GenericSuccessBoolResponse' description: OK "400": content: @@ -153,14 +153,20 @@ paths: schema: $ref: '#/components/schemas/GenericError' description: Bad Request + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Not Found "429": content: application/json: schema: - $ref: '#/components/schemas/RateLimiterError' + $ref: '#/components/schemas/RateLimitError' description: Rate Limit Exceeded security: - - app_key: [] + - rest_api_key: [] summary: Stop a scheduled or currently outgoing notification get: description: View the details of a single notification and outcomes associated @@ -194,14 +200,20 @@ paths: schema: $ref: '#/components/schemas/GenericError' description: Bad Request + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Not Found "429": content: application/json: schema: - $ref: '#/components/schemas/RateLimiterError' + $ref: '#/components/schemas/RateLimitError' description: Rate Limit Exceeded security: - - app_key: [] + - rest_api_key: [] summary: View notification /notifications/{notification_id}/history: post: @@ -230,7 +242,7 @@ paths: type: string style: simple requestBody: - $ref: '#/components/requestBodies/get_notification_request_body' + $ref: '#/components/requestBodies/get_notification_history_request_body' content: application/json: schema: @@ -252,7 +264,7 @@ paths: type: string required: - id - title: get_notification_request_body + title: get_notification_history_request_body type: object required: true responses: @@ -268,14 +280,20 @@ paths: schema: $ref: '#/components/schemas/GenericError' description: Bad Request + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Not Found "429": content: application/json: schema: - $ref: '#/components/schemas/RateLimiterError' + $ref: '#/components/schemas/RateLimitError' description: Rate Limit Exceeded security: - - app_key: [] + - rest_api_key: [] summary: Notification History /apps: get: @@ -298,10 +316,10 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/RateLimiterError' + $ref: '#/components/schemas/RateLimitError' description: Rate Limit Exceeded security: - - user_key: [] + - user_auth_key: [] summary: View apps post: description: Creates a new OneSignal app @@ -329,10 +347,10 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/RateLimiterError' + $ref: '#/components/schemas/RateLimitError' description: Rate Limit Exceeded security: - - user_key: [] + - user_auth_key: [] summary: Create an app /apps/{app_id}: get: @@ -364,10 +382,10 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/RateLimiterError' + $ref: '#/components/schemas/RateLimitError' description: Rate Limit Exceeded security: - - user_key: [] + - user_auth_key: [] summary: View an app put: description: Updates the name or configuration settings of an existing OneSignal @@ -405,22 +423,74 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/RateLimiterError' + $ref: '#/components/schemas/RateLimitError' description: Rate Limit Exceeded security: - - user_key: [] + - user_auth_key: [] summary: Update an app /apps/{app_id}/segments: + get: + description: Returns an array of segments from an app. + operationId: get_segments + parameters: + - description: The OneSignal App ID for your app. Available in Keys & IDs. + explode: false + in: path + name: app_id + required: true + schema: + type: string + style: simple + - description: "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." + explode: true + in: query + name: offset + required: false + schema: + type: integer + style: form + - description: The amount of Segments in the response. Maximum 300. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/GetSegmentsSuccessResponse' + description: OK + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Bad Request + "429": + content: + application/json: + schema: + $ref: '#/components/schemas/RateLimitError' + description: Rate Limit Exceeded + security: + - rest_api_key: [] + summary: Get Segments post: - description: "Create segments visible and usable in the dashboard and API -\ + description: "Create a segment visible and usable in the dashboard and API -\ \ Required: OneSignal Paid Plan\nThe 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.\n🚧\n\ Does Not Update Segments\nThis 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.\n" - operationId: create_segments + \ Delete Segment endpoint and re-create it with this endpoint to edit.\n" + operationId: create_segment parameters: - description: The OneSignal App ID for your app. Available in Keys & IDs. explode: false @@ -459,19 +529,19 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/RateLimiterError' + $ref: '#/components/schemas/RateLimitError' description: Rate Limit Exceeded security: - - app_key: [] - summary: Create Segments + - rest_api_key: [] + summary: Create Segment /apps/{app_id}/segments/{segment_id}: delete: - description: "Delete segments (not user devices) - Required: OneSignal Paid\ + description: "Delete a segment (not user devices) - Required: OneSignal Paid\ \ Plan\nYou 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.\nThe segment_id can be found in the URL of the segment when viewing\ \ it in the dashboard.\n" - operationId: delete_segments + operationId: delete_segment parameters: - description: The OneSignal App ID for your app. Available in Keys & IDs. explode: false @@ -495,7 +565,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/DeleteSegmentSuccessResponse' + $ref: '#/components/schemas/GenericSuccessBoolResponse' description: OK "400": content: @@ -507,17 +577,17 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/DeleteSegmentNotFoundResponse' + $ref: '#/components/schemas/GenericSuccessBoolResponse' description: Not Found "429": content: application/json: schema: - $ref: '#/components/schemas/RateLimiterError' + $ref: '#/components/schemas/RateLimitError' description: Rate Limit Exceeded security: - - app_key: [] - summary: Delete Segments + - rest_api_key: [] + summary: Delete Segment /apps/{app_id}/outcomes: get: description: "View the details of all the outcomes associated with your app\n\ @@ -606,10 +676,10 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/RateLimiterError' + $ref: '#/components/schemas/RateLimitError' description: Rate Limit Exceeded security: - - app_key: [] + - rest_api_key: [] summary: View Outcomes /apps/{app_id}/live_activities/{activity_id}/notifications: post: @@ -655,103 +725,11 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/RateLimiterError' + $ref: '#/components/schemas/RateLimitError' description: Rate Limit Exceeded security: - - app_key: [] + - rest_api_key: [] summary: Update a Live Activity via Push - /apps/{app_id}/live_activities/{activity_id}/token: - post: - description: Starts a Live Activity - operationId: begin_live_activity - parameters: - - description: The OneSignal App ID for your app. Available in Keys & IDs. - explode: false - in: path - name: app_id - required: true - schema: - type: string - style: simple - - description: Live Activity record ID - explode: false - in: path - name: activity_id - required: true - schema: - type: string - style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/BeginLiveActivityRequest' - required: true - responses: - "204": - description: OK - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/GenericError' - description: Bad Request - "429": - content: - application/json: - schema: - $ref: '#/components/schemas/RateLimiterError' - description: Rate Limit Exceeded - security: - - app_key: [] - summary: Start Live Activity - /apps/{app_id}/live_activities/{activity_id}/token/{subscription_id}: - delete: - description: Stops a Live Activity - operationId: end_live_activity - parameters: - - description: The OneSignal App ID for your app. Available in Keys & IDs. - explode: false - in: path - name: app_id - required: true - schema: - type: string - style: simple - - description: Live Activity record ID - explode: false - in: path - name: activity_id - required: true - schema: - type: string - style: simple - - description: Subscription ID - explode: false - in: path - name: subscription_id - required: true - schema: - type: string - style: simple - responses: - "204": - description: OK - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/GenericError' - description: Bad Request - "429": - content: - application/json: - schema: - $ref: '#/components/schemas/RateLimiterError' - description: Rate Limit Exceeded - security: - - app_key: [] - summary: Stop Live Activity /apps/{app_id}/users: post: description: "Creates a User, optionally Subscriptions owned by the User as\ @@ -807,95 +785,10 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/RateLimiterError' - description: Rate Limit Exceeded - security: - - app_key: [] - /apps/{app_id}/users/{external_user_id}: - put: - description: "Update an existing device's tags in one of your OneSignal apps\ - \ using the External User ID.\nWarning - Android SDK Data Synchronization\n\ - Tags added through the Android SDK tagging methods may not update if using\ - \ the API to change or update the same tag.\nFor 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.\nRecommendations if using this Endpoint on Android\ - \ Mobile Apps:\n1 - Do not use the same tag keys for SDK and API updates\n\ - 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.\nThis is only applicable\ - \ on the Android Mobile App SDKs.\n📘\nDeleting Tags\nTo delete a tag,\ - \ include its key and set its value to blank. Omitting a key/value will not\ - \ delete it.\nFor 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:\n\"tags\": {\n \"rank\": \"\",\n \"category\"\ - : \"\",\n \"class\": \"my_new_value\"\n}\n" - operationId: update_player_tags - parameters: - - description: The OneSignal App ID the user record is found under. - explode: false - in: path - name: app_id - required: true - schema: - type: string - style: simple - - description: The External User ID mapped to teh device record in OneSignal. Must - be actively set on the device to be updated. - explode: false - in: path - name: external_user_id - required: true - schema: - type: string - style: simple - requestBody: - $ref: '#/components/requestBodies/update_player_tags_request_body' - content: - application/json: - schema: - properties: - tags: - description: "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\"}`.\nLimitations:\n\ - - 100 tags per call\n- Android SDK users: tags cannot be removed\ - \ or changed via API if set through SDK sendTag methods.\nRecommended\ - \ to only tag devices with 1 kilobyte of ata\nPlease consider\ - \ using your own Database to save more than 1 kilobyte of data.\ - \ See: Internal Database & CRM\n" - type: object - title: update_player_tags_request_body - type: object - required: false - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/UpdatePlayerTagsSuccessResponse' - description: OK - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/GenericError' - description: Bad Request - "409": - content: - application/json: - schema: - $ref: '#/components/schemas/GenericError' - description: Conflict - "429": - content: - application/json: - schema: - $ref: '#/components/schemas/RateLimiterError' + $ref: '#/components/schemas/RateLimitError' description: Rate Limit Exceeded security: - - app_key: [] - summary: Edit tags with external user id + - rest_api_key: [] /apps/{app_id}/users/by/{alias_label}/{alias_id}: delete: description: "Removes the User identified by (:alias_label, :alias_id), and\ @@ -942,13 +835,13 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/RateLimiterError' + $ref: '#/components/schemas/RateLimitError' description: Rate Limit Exceeded security: - - app_key: [] + - rest_api_key: [] get: description: "Returns the User’s properties, Aliases, and Subscriptions." - operationId: fetch_user + operationId: get_user parameters: - explode: false in: path @@ -984,14 +877,20 @@ paths: schema: $ref: '#/components/schemas/GenericError' description: Bad Request + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Not Found "429": content: application/json: schema: - $ref: '#/components/schemas/RateLimiterError' + $ref: '#/components/schemas/RateLimitError' description: Rate Limit Exceeded security: - - app_key: [] + - rest_api_key: [] patch: description: Updates an existing User’s properties. operationId: update_user @@ -1028,7 +927,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/inline_response_202' + $ref: '#/components/schemas/PropertiesBody' description: ACCEPTED "400": content: @@ -1046,14 +945,14 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/RateLimiterError' + $ref: '#/components/schemas/RateLimitError' description: Rate Limit Exceeded security: - - app_key: [] + - rest_api_key: [] /apps/{app_id}/users/by/{alias_label}/{alias_id}/identity: get: description: "Lists all Aliases for the User identified by (:alias_label, :alias_id)." - operationId: fetch_user_identity + operationId: get_aliases parameters: - explode: false in: path @@ -1081,7 +980,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/inline_response_200' + $ref: '#/components/schemas/UserIdentityBody' description: OK "400": content: @@ -1089,18 +988,24 @@ paths: schema: $ref: '#/components/schemas/GenericError' description: Bad Request + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Not Found "429": content: application/json: schema: - $ref: '#/components/schemas/RateLimiterError' + $ref: '#/components/schemas/RateLimitError' description: Rate Limit Exceeded security: - - app_key: [] + - rest_api_key: [] patch: description: "Upserts one or more Aliases to an existing User identified by\ \ (:alias_label, :alias_id)." - operationId: identify_user_by_alias + operationId: create_alias parameters: - explode: false in: path @@ -1127,14 +1032,14 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/UserIdentityRequestBody' + $ref: '#/components/schemas/UserIdentityBody' required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/inline_response_200' + $ref: '#/components/schemas/UserIdentityBody' description: OK "400": content: @@ -1142,6 +1047,12 @@ paths: schema: $ref: '#/components/schemas/GenericError' description: Bad Request + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Not Found "409": content: application/json: @@ -1152,10 +1063,10 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/RateLimiterError' + $ref: '#/components/schemas/RateLimitError' description: Rate Limit Exceeded security: - - app_key: [] + - rest_api_key: [] /apps/{app_id}/users/by/{alias_label}/{alias_id}/identity/{alias_label_to_delete}: delete: description: Deletes an alias by alias label @@ -1194,7 +1105,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/inline_response_200' + $ref: '#/components/schemas/UserIdentityBody' description: OK "400": content: @@ -1202,6 +1113,12 @@ paths: schema: $ref: '#/components/schemas/GenericError' description: Bad Request + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Not Found "409": content: application/json: @@ -1212,10 +1129,10 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/RateLimiterError' + $ref: '#/components/schemas/RateLimitError' description: Rate Limit Exceeded security: - - app_key: [] + - rest_api_key: [] /apps/{app_id}/users/by/{alias_label}/{alias_id}/subscriptions: post: description: Creates a new Subscription under the User provided. Useful to add @@ -1247,20 +1164,20 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/CreateSubscriptionRequestBody' + $ref: '#/components/schemas/SubscriptionBody' required: true responses: "201": content: application/json: schema: - $ref: '#/components/schemas/inline_response_201' + $ref: '#/components/schemas/SubscriptionBody' description: CREATED "202": content: application/json: schema: - $ref: '#/components/schemas/inline_response_201' + $ref: '#/components/schemas/SubscriptionBody' description: ACCEPTED "400": content: @@ -1268,6 +1185,12 @@ paths: schema: $ref: '#/components/schemas/GenericError' description: Bad Request + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Not Found "409": content: application/json: @@ -1279,10 +1202,10 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/RateLimiterError' + $ref: '#/components/schemas/RateLimitError' description: Rate Limit Exceeded security: - - app_key: [] + - rest_api_key: [] /apps/{app_id}/subscriptions/{subscription_id}: delete: description: Deletes the Subscription. @@ -1311,6 +1234,12 @@ paths: schema: $ref: '#/components/schemas/GenericError' description: Bad Request + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Not Found "409": content: application/json: @@ -1321,10 +1250,10 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/RateLimiterError' + $ref: '#/components/schemas/RateLimitError' description: Rate Limit Exceeded security: - - app_key: [] + - rest_api_key: [] patch: description: Updates an existing Subscription’s properties. operationId: update_subscription @@ -1347,17 +1276,23 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/UpdateSubscriptionRequestBody' + $ref: '#/components/schemas/SubscriptionBody' required: true responses: - "202": - description: ACCEPTED + "200": + description: OK "400": content: application/json: schema: $ref: '#/components/schemas/GenericError' description: Bad Request + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Not Found "409": content: application/json: @@ -1368,14 +1303,14 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/RateLimiterError' + $ref: '#/components/schemas/RateLimitError' description: Rate Limit Exceeded security: - - app_key: [] + - rest_api_key: [] /apps/{app_id}/subscriptions/{subscription_id}/user/identity: get: description: Lists all Aliases for the User identified by :subscription_id. - operationId: fetch_aliases + operationId: get_aliases_by_subscription parameters: - explode: false in: path @@ -1396,7 +1331,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/UserIdentityResponse' + $ref: '#/components/schemas/UserIdentityBody' description: OK "400": content: @@ -1404,11 +1339,17 @@ paths: schema: $ref: '#/components/schemas/GenericError' description: Bad Request + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Not Found security: - - app_key: [] + - rest_api_key: [] patch: description: Upserts one or more Aliases for the User identified by :subscription_id. - operationId: identify_user_by_subscription_id + operationId: create_alias_by_subscription parameters: - explode: false in: path @@ -1428,14 +1369,14 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/UserIdentityRequestBody' + $ref: '#/components/schemas/UserIdentityBody' required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/UserIdentityResponse' + $ref: '#/components/schemas/UserIdentityBody' description: OK "400": content: @@ -1443,6 +1384,12 @@ paths: schema: $ref: '#/components/schemas/GenericError' description: Bad Request + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Not Found "409": content: application/json: @@ -1453,10 +1400,10 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/RateLimiterError' + $ref: '#/components/schemas/RateLimitError' description: Rate Limit Exceeded security: - - app_key: [] + - rest_api_key: [] /apps/{app_id}/subscriptions/{subscription_id}/owner: patch: description: Transfers this Subscription to the User identified by the identity @@ -1488,7 +1435,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/UserIdentityResponse' + $ref: '#/components/schemas/UserIdentityBody' description: OK "400": content: @@ -1496,6 +1443,12 @@ paths: schema: $ref: '#/components/schemas/GenericError' description: Bad Request + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Not Found "409": content: application/json: @@ -1506,281 +1459,48 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/RateLimiterError' + $ref: '#/components/schemas/RateLimitError' description: Rate Limit Exceeded security: - - app_key: [] - /apps/{app_id}/subscriptions/{subscription_id}/iams: - get: - description: Manifest of In-App Messages the Subscription is eligible to display - by the SDK. - operationId: get_eligible_iams + - rest_api_key: [] + /apps/{app_id}/notifications/{notification_id}/unsubscribe: + post: + description: Unsubscribe an email with a token when using your own custom email + unsubscribe landing page + operationId: unsubscribe_email_with_token parameters: - - explode: false + - description: The OneSignal App ID for your app. Available in Keys & IDs. + explode: false in: path name: app_id required: true schema: type: string style: simple - - explode: false + - description: "The id of the message found in the creation notification POST\ + \ response, View Notifications GET response, or URL within the Message Report." + explode: false in: path - name: subscription_id + name: notification_id required: true schema: type: string style: simple - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/inline_response_200_3' - description: OK - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/GenericError' - description: Bad Request - "429": - content: - application/json: - schema: - $ref: '#/components/schemas/RateLimiterError' - description: Rate Limit Exceeded - security: - - app_key: [] - /players: - get: - description: "View the details of multiple devices in one of your OneSignal\ - \ apps\nUnavailable for Apps Over 80,000 Users\nFor performance reasons, this\ - \ method is not available for larger apps. Larger apps should use the CSV\ - \ export API endpoint, which is much more performant.\n" - operationId: get_players - parameters: - - description: The app ID that you want to view players from + - description: "The unsubscribe token that is generated via liquid syntax in\ + \ {{subscription.unsubscribe_token}} when personalizing an email." explode: true in: query - name: app_id + name: token required: true schema: type: string style: form - - description: How many devices to return. Max is 300. Default is 300 - explode: true - in: query - name: limit - required: false - schema: - type: integer - style: form - - description: Result offset. Default is 0. Results are sorted by id; - explode: true - in: query - name: offset - required: false - schema: - type: integer - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/PlayerSlice' - description: OK - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/GenericError' - description: Bad Request - "429": - content: - application/json: - schema: - $ref: '#/components/schemas/RateLimiterError' - description: Rate Limit Exceeded - security: - - app_key: [] - summary: View devices - post: - description: "Register a new device to one of your OneSignal apps\n🚧\n\ - Don't use this\nThis 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.\nIf 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.\nThis\ - \ method is used to register a new device with OneSignal.\nIf a device is\ - \ already registered with the specified identifier, then this will update\ - \ the existing device record instead of creating a new one.\nThe 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.\n🚧\niOS\nMust set test_type to 1 when building your\ - \ iOS app as development. Omit this field in your production app builds.\n" - operationId: create_player - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Player' - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/CreatePlayerSuccessResponse' - description: OK - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/GenericError' - description: Bad Request - "409": - content: - application/json: - schema: - $ref: '#/components/schemas/GenericError' - description: Conflict - "429": - content: - application/json: - schema: - $ref: '#/components/schemas/RateLimiterError' - description: Rate Limit Exceeded - security: - - app_key: [] - summary: Add a device - /players/{player_id}: - delete: - description: "Delete player - Required:\nUsed to delete a single, specific Player\ - \ ID record from a specific OneSignal app.\n" - operationId: delete_player - parameters: - - description: The OneSignal App ID for your app. Available in Keys & IDs. - explode: true - in: query - name: app_id - required: true - schema: - type: string - style: form - - description: The OneSignal player_id - explode: false - in: path - name: player_id - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/DeletePlayerSuccessResponse' - description: OK - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/GenericError' - description: Bad Request - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/DeletePlayerNotFoundResponse' - description: Not Found - "429": - content: - application/json: - schema: - $ref: '#/components/schemas/RateLimiterError' - description: Rate Limit Exceeded - security: - - app_key: [] - summary: Delete a user record - get: - description: View the details of an existing device in one of your OneSignal - apps - operationId: get_player - parameters: - - description: Your app_id for this device - explode: true - in: query - name: app_id - required: true - schema: - type: string - style: form - - description: Player's OneSignal ID - explode: false - in: path - name: player_id - required: true - schema: - type: string - style: simple - - description: Email - Only required if you have enabled Identity Verification - and device_type is email (11). - explode: true - in: query - name: email_auth_hash - required: false - schema: - type: string - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/Player' - description: OK - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/GenericError' - description: Bad Request - "429": - content: - application/json: - schema: - $ref: '#/components/schemas/RateLimiterError' - description: Rate Limit Exceeded - security: - - app_key: [] - summary: View device - put: - description: Update an existing device in one of your OneSignal apps - operationId: update_player - parameters: - - description: Player's OneSignal ID - explode: false - in: path - name: player_id - required: true - schema: - type: string - style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Player' - required: true responses: - "200": + "202": content: application/json: schema: - $ref: '#/components/schemas/UpdatePlayerSuccessResponse' + $ref: '#/components/schemas/GenericSuccessBoolResponse' description: OK "400": content: @@ -1788,21 +1508,15 @@ paths: schema: $ref: '#/components/schemas/GenericError' description: Bad Request - "409": - content: - application/json: - schema: - $ref: '#/components/schemas/GenericError' - description: Conflict "429": content: application/json: schema: - $ref: '#/components/schemas/RateLimiterError' + $ref: '#/components/schemas/RateLimitError' description: Rate Limit Exceeded security: - - app_key: [] - summary: Edit device + - rest_api_key: [] + summary: Unsubscribe with token /players/csv_export?app_id={app_id}: post: description: "Generate a compressed CSV export of all of your current user data\n\ @@ -1847,7 +1561,7 @@ paths: \ rooted or not |\n | ip | IP Address of the device if being tracked. See\ \ Handling Personal Data. |\n | web_auth | Web Only authorization key. |\n\ \ | web_p256 | Web Only p256 key. |\n" - operationId: export_players + operationId: export_subscriptions parameters: - description: The app ID that you want to export devices from explode: false @@ -1858,7 +1572,7 @@ paths: type: string style: simple requestBody: - $ref: '#/components/requestBodies/export_players_request_body' + $ref: '#/components/requestBodies/export_subscriptions_request_body' content: application/json: schema: @@ -1877,14 +1591,14 @@ paths: segment_name: description: Export all devices belonging to the segment. type: string - title: export_players_request_body + title: export_subscriptions_request_body type: object responses: "200": content: application/json: schema: - $ref: '#/components/schemas/ExportPlayersSuccessResponse' + $ref: '#/components/schemas/ExportSubscriptionsSuccessResponse' description: OK "400": content: @@ -1896,11 +1610,11 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/RateLimiterError' + $ref: '#/components/schemas/RateLimitError' description: Rate Limit Exceeded security: - - app_key: [] - summary: Export CSV of Players + - rest_api_key: [] + summary: Export CSV of Subscriptions /notifications/{notification_id}/export_events?app_id={app_id}: post: description: |- @@ -1947,30 +1661,24 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/RateLimiterError' + $ref: '#/components/schemas/RateLimitError' description: Rate Limit Exceeded security: - - app_key: [] + - rest_api_key: [] summary: Export CSV of Events components: requestBodies: - get_notification_request_body: + get_notification_history_request_body: content: application/json: schema: - $ref: '#/components/schemas/get_notification_request_body' + $ref: '#/components/schemas/get_notification_history_request_body' required: true - update_player_tags_request_body: + export_subscriptions_request_body: content: application/json: schema: - $ref: '#/components/schemas/update_player_tags_request_body' - required: false - export_players_request_body: - content: - application/json: - schema: - $ref: '#/components/schemas/export_players_request_body' + $ref: '#/components/schemas/export_subscriptions_request_body' schemas: App: example: @@ -2182,26 +1890,13 @@ components: type: string type: array type: object - PlayerNotificationTarget: + SubscriptionNotificationTarget: properties: - include_player_ids: - deprecated: true - description: "Specific playerids to send your notification to. _Does not\ - \ require API Auth Key.\nDo not combine with other targeting parameters.\ - \ Not compatible with any other targeting parameters.\nExample: [\"1dd608f2-c6a1-11e3-851d-000c2940e62c\"\ - ]\nLimit of 2,000 entries per REST API call\n" - items: - type: string - nullable: true - type: array - include_external_user_ids: - deprecated: true - description: "Target specific devices by custom user IDs assigned via API.\n\ - Not compatible with any other targeting parameters\nExample: [\"custom-id-assigned-by-api\"\ - ]\nREQUIRED: REST API Key Authentication\nLimit of 2,000 entries per REST\ - \ API call.\nNote: 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.\n" + include_subscription_ids: + description: "Specific subscription ids to send your notification to. _Does\ + \ not require API Auth Key._\nNot compatible with any other targeting\ + \ parameters.\nExample: [\"1dd608f2-c6a1-11e3-851d-000c2940e62c\"]\nLimit\ + \ of 2,000 entries per REST API call\n" items: type: string nullable: true @@ -2224,9 +1919,9 @@ components: type: string type: array include_ios_tokens: - description: "Not Recommended: Please consider using include_player_ids\ - \ or include_external_user_ids instead.\nTarget using iOS device tokens.\n\ - Warning: Only works with Production tokens.\nAll non-alphanumeric characters\ + description: "Not Recommended: Please consider using include_subscription_ids\ + \ or include_aliases instead.\nTarget using iOS device tokens.\nWarning:\ + \ Only works with Production tokens.\nAll 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.\nExample: ce777617da7f548fe7a9ab6febb56cf39fba6d38203...\n\ Limit of 2,000 entries per REST API call\n" @@ -2234,44 +1929,44 @@ components: type: string type: array include_wp_wns_uris: - description: "Not Recommended: Please consider using include_player_ids\ - \ or include_external_user_ids instead.\nTarget using Windows URIs. If\ - \ a token does not correspond to an existing user, a new user will be\ - \ created.\nExample: http://s.notify.live.net/u/1/bn1/HmQAAACPaLDr-...\n\ - Limit of 2,000 entries per REST API call\n" + description: "Not Recommended: Please consider using include_subscription_ids\ + \ or include_aliases instead.\nTarget using Windows URIs. If a token does\ + \ not correspond to an existing user, a new user will be created.\nExample:\ + \ http://s.notify.live.net/u/1/bn1/HmQAAACPaLDr-...\nLimit of 2,000 entries\ + \ per REST API call\n" items: type: string type: array include_amazon_reg_ids: - description: "Not Recommended: Please consider using include_player_ids\ - \ or include_external_user_ids instead.\nTarget using Amazon ADM registration\ - \ IDs. If a token does not correspond to an existing user, a new user\ - \ will be created.\nExample: amzn1.adm-registration.v1.XpvSSUk0Rc3hTVVV...\n\ + description: "Not Recommended: Please consider using include_subscription_ids\ + \ or include_aliases instead.\nTarget using Amazon ADM registration IDs.\ + \ If a token does not correspond to an existing user, a new user will\ + \ be created.\nExample: amzn1.adm-registration.v1.XpvSSUk0Rc3hTVVV...\n\ Limit of 2,000 entries per REST API call\n" items: type: string type: array include_chrome_reg_ids: - description: "Not Recommended: Please consider using include_player_ids\ - \ or include_external_user_ids instead.\nTarget using Chrome App registration\ - \ IDs. If a token does not correspond to an existing user, a new user\ - \ will be created.\nExample: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_...\n\ - Limit of 2,000 entries per REST API call\n" + description: "Not Recommended: Please consider using include_subscription_ids\ + \ or include_aliases instead.\nTarget using Chrome App registration IDs.\ + \ If a token does not correspond to an existing user, a new user will\ + \ be created.\nExample: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_...\nLimit\ + \ of 2,000 entries per REST API call\n" items: type: string type: array include_chrome_web_reg_ids: - description: "Not Recommended: Please consider using include_player_ids\ - \ or include_external_user_ids instead.\nTarget using Chrome Web Push\ - \ registration IDs. If a token does not correspond to an existing user,\ - \ a new user will be created.\nExample: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_...\n\ + description: "Not Recommended: Please consider using include_subscription_ids\ + \ or include_aliases instead.\nTarget using Chrome Web Push registration\ + \ IDs. If a token does not correspond to an existing user, a new user\ + \ will be created.\nExample: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_...\n\ Limit of 2,000 entries per REST API call\n" items: type: string type: array include_android_reg_ids: - description: "Not Recommended: Please consider using include_player_ids\ - \ or include_external_user_ids instead.\nTarget using Android device registration\ + description: "Not Recommended: Please consider using include_subscription_ids\ + \ or include_aliases instead.\nTarget using Android device registration\ \ IDs. If a token does not correspond to an existing user, a new user\ \ will be created.\nExample: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_...\n\ Limit of 2,000 entries per REST API call\n" @@ -2279,7 +1974,21 @@ components: type: string type: array include_aliases: - $ref: '#/components/schemas/PlayerNotificationTarget_include_aliases' + additionalProperties: + items: + type: string + type: array + description: "Target specific users by aliases assigned via API. An alias\ + \ can be an external_id, onesignal_id, or a custom alias.\nAccepts an\ + \ object where keys are alias labels and values are arrays of alias IDs\ + \ to include\nExample usage: { \"external_id\": [\"exId1\", \"extId2\"\ + ], \"internal_label\": [\"id1\", \"id2\"] }\nNot compatible with any other\ + \ targeting parameters.\nREQUIRED: REST API Key Authentication\nLimit\ + \ of 2,000 entries per REST API call\nNote: 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." + nullable: true + type: object target_channel: enum: - push @@ -2290,7 +1999,7 @@ components: NotificationTarget: anyOf: - $ref: '#/components/schemas/SegmentNotificationTarget' - - $ref: '#/components/schemas/PlayerNotificationTarget' + - $ref: '#/components/schemas/SubscriptionNotificationTarget' BasicNotification: allOf: - $ref: '#/components/schemas/NotificationTarget' @@ -2318,11 +2027,64 @@ components: required: - id type: object - Buttons: - items: - $ref: '#/components/schemas/Button' - type: array - StringMap: + WebButton: + properties: + id: + type: string + text: + type: string + icon: + type: string + url: + type: string + required: + - id + type: object + LanguageStringMap: + example: + de: de + hi: hi + fi: fi + ru: ru + pt: pt + bg: bg + lt: lt + hr: hr + lv: lv + fr: fr + hu: hu + bs: bs + zh-Hans: zh-Hans + zh-Hant: zh-Hant + ka: ka + uk: uk + sk: sk + id: id + ca: ca + sr: sr + sv: sv + ko: ko + ms: ms + el: el + en: en + it: it + zh: zh + es: es + et: et + cs: cs + ar: ar + pa: pa + vi: vi + nb: nb + th: th + ja: ja + fa: fa + pl: pl + da: da + he: he + ro: ro + nl: nl + tr: tr properties: en: description: Text in English. Will be used as a fallback @@ -2526,7 +2288,7 @@ components: example: amount: amount iso: iso - count: 2.3021358869347655 + count: 2 sku: sku properties: sku: @@ -2540,7 +2302,7 @@ components: and conversion of amount. type: string count: - type: number + type: integer required: - amount - iso @@ -2584,8 +2346,8 @@ components: Filter: properties: field: - description: Name of the field to use as the first operand in the filter - expression. + description: Required. Name of the field to use as the first operand in + the filter expression. type: string key: description: "If `field` is `tag`, this field is *required* to specify `key`\ @@ -2595,8 +2357,24 @@ components: description: Constant value to use as the second operand in the filter expression. This value is *required* when the relation operator is a binary operator. type: string + hours_ago: + description: "If `field` is session-related, this is *required* to specify\ + \ the number of hours before or after the user's session." + type: string + radius: + description: "If `field` is `location`, this will specify the radius in\ + \ meters from a provided location point. Use with `lat` and `long`." + type: number + lat: + description: "If `field` is `location`, this is *required* to specify the\ + \ user's latitude." + type: number + long: + description: "If `field` is `location`, this is *required* to specify the\ + \ user's longitude." + type: number relation: - description: Operator of a filter expression. + description: Required. Operator of a filter expression. enum: - '>' - < @@ -2607,9 +2385,6 @@ components: - time_elapsed_gt - time_elapsed_lt type: string - required: - - field - - relation type: object Operator: properties: @@ -2621,8 +2396,8 @@ components: - AND type: string type: object - FilterExpressions: - anyOf: + FilterExpression: + oneOf: - $ref: '#/components/schemas/Filter' - $ref: '#/components/schemas/Operator' Segment: @@ -2643,302 +2418,181 @@ components: description: "Filter or operators the segment will have. For a list of\ \ available filters with details, please see Send to Users Based on Filters." items: - $ref: '#/components/schemas/FilterExpressions' + $ref: '#/components/schemas/FilterExpression' type: array required: - filters - name type: object - Player: + SegmentData: example: - country: country - external_user_id_auth_hash: external_user_id_auth_hash - device_model: device_model - timezone: 5 - created_at: 9 - device_type: 5 - language: language - playtime: 3 - long: 1.0246457001441578 - amount_spent: 7.061401241503109 + is_active: true + updated_at: updated_at + read_only: true + name: name + created_at: created_at id: id app_id: app_id - lat: 1.4894159098541704 - identifier: identifier - game_version: game_version - notification_types: 7 - device_os: device_os - email_auth_hash: email_auth_hash - test_type: 1 - external_user_id: external_user_id - tags: "{}" - ad_id: ad_id - session_count: 2 - sdk: sdk - last_active: 4 - invalid_identifier: true - badge_count: 2 properties: id: - description: The device's OneSignal ID - readOnly: true - type: string - invalid_identifier: - description: "If true, this is the equivalent of a user being Unsubscribed" - readOnly: true - type: boolean - app_id: - type: string - device_type: - description: | - 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 - type: integer - external_user_id: - description: a custom user ID - nullable: true - type: string - external_user_id_auth_hash: - description: Only required if you have enabled Identity Verification and - device_type is NOT 11 email. - type: string - email_auth_hash: - description: Email - Only required if you have enabled Identity Verification - and device_type is email (11). - type: string - identifier: - description: "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.\nExamples:\niOS: 7abcd558f29d0b1f048083e2834ad8ea4b3d87d8ad9c088b33c132706ff445f0\n\ - Android: APA91bHbYHk7aq-Uam_2pyJ2qbZvqllyyh2wjfPRaw5gLEX2SUlQBRvOc6sck1sa7H7nGeLNlDco8lXj83HWWwzV...\n\ - For Email Addresses, set the full email address email@email.com and make\ - \ sure to set device_type to 11.\n" - nullable: true - type: string - language: - description: "Language code. Typically lower case two letters, except for\ - \ Chinese where it must be one of zh-Hans or zh-Hant. Example: en\n" - type: string - timezone: - description: "Number of seconds away from UTC. Example: -28800\n" - nullable: true - type: integer - game_version: - description: "Version of your app. Example: 1.1\n" - nullable: true + description: The segment ID type: string - device_model: - description: "Device make and model. Example: iPhone5,1\n" - nullable: true - type: string - device_os: - description: "Device operating system version. Example: 7.0.4\n" - nullable: true + name: + description: The segment name type: string - ad_id: - description: | - The ad id for the device's platform: - Android = Advertising Id - iOS = identifierForVendor - WP8.0 = DeviceUniqueId - WP8.1 = AdvertisingId - nullable: true + created_at: + description: Date segment created type: string - sdk: - description: Name and version of the sdk/plugin that's calling this API - method (if any) - nullable: true + updated_at: + description: Date segment last updated type: string - session_count: - description: "Number of times the user has played the game, defaults to\ - \ 1" - type: integer - tags: - description: "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\"}\nLimitations:\n- 100 tags per call\n\ - - Android SDK users: tags cannot be removed or changed via API if set\ - \ through SDK sendTag methods.\nRecommended to only tag devices with 1\ - \ kilobyte of data\nPlease consider using your own Database to save more\ - \ than 1 kilobyte of data. See: Internal Database & CRM\n" - nullable: true - type: object - amount_spent: - description: "Amount the user has spent in USD, up to two decimal places" - type: number - created_at: - description: Unixtime when the player joined the game - format: int64 - type: integer - playtime: - description: Seconds player was running your app. - format: int64 - type: integer - badge_count: - description: "Current iOS badge count displayed on the app icon\nNOTE: Not\ - \ supported for apps created after June 2018, since badge count for apps\ - \ created after this date are handled on the client.\n" - type: integer - last_active: - description: Unixtime when the player was last active - type: integer - notification_types: - description: | - 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. - type: integer - test_type: - description: | - 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. - nullable: true - type: integer - long: - description: "Longitude of the device, used for geotagging to segment on." - type: number - lat: - description: "Latitude of the device, used for geotagging to segment on." - type: number - country: - description: Country code in the ISO 3166-1 Alpha 2 format + app_id: + description: The app id type: string - required: - - device_type + read_only: + description: Is the segment read only? + type: boolean + is_active: + description: Is the segment active? + type: boolean type: object - Players: - items: - $ref: '#/components/schemas/Player' - type: array - PlayerSlice: + GetSegmentsSuccessResponse: example: offset: 6 total_count: 0 - players: - - country: country - external_user_id_auth_hash: external_user_id_auth_hash - device_model: device_model - timezone: 5 - created_at: 9 - device_type: 5 - language: language - playtime: 3 - long: 1.0246457001441578 - amount_spent: 7.061401241503109 + limit: 1 + segments: + - is_active: true + updated_at: updated_at + read_only: true + name: name + created_at: created_at id: id app_id: app_id - lat: 1.4894159098541704 - identifier: identifier - game_version: game_version - notification_types: 7 - device_os: device_os - email_auth_hash: email_auth_hash - test_type: 1 - external_user_id: external_user_id - tags: "{}" - ad_id: ad_id - session_count: 2 - sdk: sdk - last_active: 4 - invalid_identifier: true - badge_count: 2 - - country: country - external_user_id_auth_hash: external_user_id_auth_hash - device_model: device_model - timezone: 5 - created_at: 9 - device_type: 5 - language: language - playtime: 3 - long: 1.0246457001441578 - amount_spent: 7.061401241503109 + - is_active: true + updated_at: updated_at + read_only: true + name: name + created_at: created_at id: id app_id: app_id - lat: 1.4894159098541704 - identifier: identifier - game_version: game_version - notification_types: 7 - device_os: device_os - email_auth_hash: email_auth_hash - test_type: 1 - external_user_id: external_user_id - tags: "{}" - ad_id: ad_id - session_count: 2 - sdk: sdk - last_active: 4 - invalid_identifier: true - badge_count: 2 - limit: 1 properties: total_count: + description: The number of Segments in the response. type: integer offset: + description: Set with the offset query parameter. Default 0. type: integer limit: + description: Maximum number of Segments returned. Default 300. type: integer - players: - items: - $ref: '#/components/schemas/Player' - type: array - type: object - InvalidIdentifierError: - properties: - invalid_external_user_ids: - description: Returned if using include_external_user_ids - items: - type: string - type: array - invalid_player_ids: - description: Returned if using include_player_ids and some were valid and - others were not. + segments: + description: An array containing the Segment information. items: - type: string + $ref: '#/components/schemas/SegmentData' type: array type: object - NoSubscribersError: - description: | - Returned if no subscribed players. - items: - format: string - type: string - type: array - Notification200Errors: - oneOf: - - $ref: '#/components/schemas/InvalidIdentifierError' - - $ref: '#/components/schemas/NoSubscribersError' UpdateLiveActivityRequest: example: event_updates: "{}" - name: headings + stale_date: 0 + contents: + de: de + hi: hi + fi: fi + ru: ru + pt: pt + bg: bg + lt: lt + hr: hr + lv: lv + fr: fr + hu: hu + bs: bs + zh-Hans: zh-Hans + zh-Hant: zh-Hant + ka: ka + uk: uk + sk: sk + id: id + ca: ca + sr: sr + sv: sv + ko: ko + ms: ms + el: el + en: en + it: it + zh: zh + es: es + et: et + cs: cs + ar: ar + pa: pa + vi: vi + nb: nb + th: th + ja: ja + fa: fa + pl: pl + da: da + he: he + ro: ro + nl: nl + tr: tr + sound: sound + name: name + headings: + de: de + hi: hi + fi: fi + ru: ru + pt: pt + bg: bg + lt: lt + hr: hr + lv: lv + fr: fr + hu: hu + bs: bs + zh-Hans: zh-Hans + zh-Hant: zh-Hant + ka: ka + uk: uk + sk: sk + id: id + ca: ca + sr: sr + sv: sv + ko: ko + ms: ms + el: el + en: en + it: it + zh: zh + es: es + et: et + cs: cs + ar: ar + pa: pa + vi: vi + nb: nb + th: th + ja: ja + fa: fa + pl: pl + da: da + he: he + ro: ro + nl: nl + tr: tr + dismissal_date: 6 event: update - dismiss_at: 0.8008281904610115 + priority: 1 properties: name: - description: Type of live activity - enum: - - headings - - contents - - ios_sound - - priority_level + description: An internal name to assist with your campaign organization. + This does not get displayed in the message itself. type: string event: enum: @@ -2946,30 +2600,44 @@ components: - end type: string event_updates: + description: This must match the ContentState interface you have defined + within your Live Activity in your app. type: object - dismiss_at: - description: Timestamp; only allowed if event is "end" - type: number + contents: + $ref: '#/components/schemas/LanguageStringMap' + headings: + $ref: '#/components/schemas/LanguageStringMap' + sound: + description: 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. + type: string + stale_date: + description: "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." + type: integer + dismissal_date: + description: Accepts Unix timestamp in seconds; only allowed if event is + "end" + type: integer + priority: + description: "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." + type: integer required: - event - event_updates - name type: object - BeginLiveActivityRequest: - example: - subscription_id: subscription_id - push_token: push_token - properties: - push_token: - type: string - subscription_id: - type: string - required: - - push_token - - subscription_id - type: object IdentityObject: - additionalProperties: true + additionalProperties: + type: string type: object PropertiesObject: example: @@ -2977,17 +2645,17 @@ components: purchases: - amount: amount iso: iso - count: 2.3021358869347655 + count: 2 sku: sku - amount: amount iso: iso - count: 2.3021358869347655 + count: 2 sku: sku ip: ip timezone_id: timezone_id language: language - first_active: 1.4658129805029452 - last_active: 5.962133916683182 + first_active: 1 + last_active: 5 lat: 0.8008281904610115 long: 6.027456183070403 tags: @@ -3008,9 +2676,9 @@ components: country: type: string first_active: - type: number + type: integer last_active: - type: number + type: integer amount_spent: type: number purchases: @@ -3025,39 +2693,39 @@ components: purchases: - amount: amount iso: iso - count: 2.3021358869347655 + count: 2 sku: sku - amount: amount iso: iso - count: 2.3021358869347655 + count: 2 sku: sku - session_count: 6.027456183070403 - session_time: 0.8008281904610115 + session_count: 6 + session_time: 0 properties: session_time: - type: number + type: integer session_count: - type: number + type: integer purchases: items: $ref: '#/components/schemas/Purchase' type: array type: object - SubscriptionObject: + Subscription: example: - notification_types: 7.061401241503109 + notification_types: 7 device_model: device_model app_version: app_version web_p256: web_p256 - net_type: 4.145608029883936 + net_type: 4 type: iOSPush device_os: device_os enabled: true - session_time: 9.301444243932576 - test_type: 2.027123023002322 + session_time: 9 + test_type: 2 token: token carrier: carrier - session_count: 3.616076749251911 + session_count: 3 web_auth: web_auth rooted: true id: id @@ -3086,11 +2754,11 @@ components: enabled: type: boolean notification_types: - type: number + type: integer session_time: - type: number + type: integer session_count: - type: number + type: integer sdk: type: string device_model: @@ -3100,11 +2768,11 @@ components: rooted: type: boolean test_type: - type: number + type: integer app_version: type: string net_type: - type: number + type: integer carrier: type: string web_auth: @@ -3115,60 +2783,58 @@ components: User: example: subscriptions: - - notification_types: 7.061401241503109 + - notification_types: 7 device_model: device_model app_version: app_version web_p256: web_p256 - net_type: 4.145608029883936 + net_type: 4 type: iOSPush device_os: device_os enabled: true - session_time: 9.301444243932576 - test_type: 2.027123023002322 + session_time: 9 + test_type: 2 token: token carrier: carrier - session_count: 3.616076749251911 + session_count: 3 web_auth: web_auth rooted: true id: id sdk: sdk - - notification_types: 7.061401241503109 + - notification_types: 7 device_model: device_model app_version: app_version web_p256: web_p256 - net_type: 4.145608029883936 + net_type: 4 type: iOSPush device_os: device_os enabled: true - session_time: 9.301444243932576 - test_type: 2.027123023002322 + session_time: 9 + test_type: 2 token: token carrier: carrier - session_count: 3.616076749251911 + session_count: 3 web_auth: web_auth rooted: true id: id sdk: sdk identity: - key: "" - subscription_options: - retain_previous_owner: true + key: identity properties: country: country purchases: - amount: amount iso: iso - count: 2.3021358869347655 + count: 2 sku: sku - amount: amount iso: iso - count: 2.3021358869347655 + count: 2 sku: sku ip: ip timezone_id: timezone_id language: language - first_active: 1.4658129805029452 - last_active: 5.962133916683182 + first_active: 1 + last_active: 5 lat: 0.8008281904610115 long: 6.027456183070403 tags: @@ -3178,14 +2844,13 @@ components: properties: $ref: '#/components/schemas/PropertiesObject' identity: - additionalProperties: true + additionalProperties: + type: string type: object subscriptions: items: - $ref: '#/components/schemas/SubscriptionObject' + $ref: '#/components/schemas/Subscription' type: array - subscription_options: - $ref: '#/components/schemas/User_subscription_options' type: object UpdateUserRequest: example: @@ -3194,30 +2859,30 @@ components: purchases: - amount: amount iso: iso - count: 2.3021358869347655 + count: 2 sku: sku - amount: amount iso: iso - count: 2.3021358869347655 + count: 2 sku: sku - session_count: 6.027456183070403 - session_time: 0.8008281904610115 + session_count: 6 + session_time: 0 properties: country: country purchases: - amount: amount iso: iso - count: 2.3021358869347655 + count: 2 sku: sku - amount: amount iso: iso - count: 2.3021358869347655 + count: 2 sku: sku ip: ip timezone_id: timezone_id language: language - first_active: 1.4658129805029452 - last_active: 5.962133916683182 + first_active: 1 + last_active: 5 lat: 0.8008281904610115 long: 6.027456183070403 tags: @@ -3234,23 +2899,20 @@ components: type: object CreateNotificationSuccessResponse: example: - recipients: 0 external_id: external_id id: id - errors: null + errors: "" properties: id: type: string - recipients: - description: Estimated number of subscribers targetted by notification. - type: integer external_id: nullable: true type: string errors: - $ref: '#/components/schemas/Notification200Errors' + description: "Errors include the identifiers that are invalid, or that there\ + \ are no subscribers." type: object - CancelNotificationSuccessResponse: + GenericSuccessBoolResponse: example: success: true properties: @@ -3267,13 +2929,6 @@ components: destination_url: type: string type: object - UpdatePlayerTagsSuccessResponse: - example: - success: true - properties: - success: - type: boolean - type: object CreateSegmentSuccessResponse: example: success: true @@ -3294,48 +2949,7 @@ components: type: string type: array type: object - DeleteSegmentSuccessResponse: - example: - success: true - properties: - success: - type: boolean - type: object - DeleteSegmentNotFoundResponse: - properties: - success: - type: boolean - type: object - CreatePlayerSuccessResponse: - example: - success: true - id: id - properties: - success: - type: boolean - id: - type: string - type: object - DeletePlayerSuccessResponse: - example: - success: true - properties: - success: - type: boolean - type: object - DeletePlayerNotFoundResponse: - properties: - success: - type: boolean - type: object - UpdatePlayerSuccessResponse: - example: - success: true - properties: - success: - type: boolean - type: object - ExportPlayersSuccessResponse: + ExportSubscriptionsSuccessResponse: example: csv_file_url: csv_file_url properties: @@ -3344,13 +2958,10 @@ components: type: object UpdateLiveActivitySuccessResponse: example: - notification_id: notification_id - errors: null + id: id properties: - notification_id: + id: type: string - errors: - $ref: '#/components/schemas/Notification200Errors' type: object CreateUserConflictResponse: properties: @@ -3361,94 +2972,91 @@ components: type: object GenericError: properties: - errors: - items: - $ref: '#/components/schemas/GenericError_errors_inner' - type: array + errors: {} + success: + type: boolean + reference: {} type: object - RateLimiterError: + RateLimitError: properties: errors: items: - $ref: '#/components/schemas/GenericError_errors_inner' + type: string type: array + limit: + type: string type: object - CreateSubscriptionRequestBody: + PropertiesBody: example: - subscription: - notification_types: 7.061401241503109 - device_model: device_model - app_version: app_version - web_p256: web_p256 - net_type: 4.145608029883936 - type: iOSPush - device_os: device_os - enabled: true - session_time: 9.301444243932576 - test_type: 2.027123023002322 - token: token - carrier: carrier - session_count: 3.616076749251911 - web_auth: web_auth - rooted: true - id: id - sdk: sdk - retain_previous_owner: true + properties: + country: country + purchases: + - amount: amount + iso: iso + count: 2 + sku: sku + - amount: amount + iso: iso + count: 2 + sku: sku + ip: ip + timezone_id: timezone_id + language: language + first_active: 1 + last_active: 5 + lat: 0.8008281904610115 + long: 6.027456183070403 + tags: + key: "" + amount_spent: 5.637376656633329 properties: - subscription: - $ref: '#/components/schemas/SubscriptionObject' - retain_previous_owner: - type: boolean + properties: + $ref: '#/components/schemas/PropertiesObject' type: object - UpdateSubscriptionRequestBody: + SubscriptionBody: example: subscription: - notification_types: 7.061401241503109 + notification_types: 7 device_model: device_model app_version: app_version web_p256: web_p256 - net_type: 4.145608029883936 + net_type: 4 type: iOSPush device_os: device_os enabled: true - session_time: 9.301444243932576 - test_type: 2.027123023002322 + session_time: 9 + test_type: 2 token: token carrier: carrier - session_count: 3.616076749251911 + session_count: 3 web_auth: web_auth rooted: true id: id sdk: sdk properties: subscription: - $ref: '#/components/schemas/SubscriptionObject' + $ref: '#/components/schemas/Subscription' type: object TransferSubscriptionRequestBody: example: identity: - key: "" - properties: - identity: - additionalProperties: true - type: object - type: object - UserIdentityRequestBody: - example: - identity: - key: "" + key: identity properties: identity: - additionalProperties: true + additionalProperties: + type: string + maxProperties: 1 + minProperties: 1 type: object type: object - UserIdentityResponse: + UserIdentityBody: example: identity: - key: "" + key: identity properties: identity: - additionalProperties: true + additionalProperties: + type: string type: object type: object ExportEventsSuccessResponse: @@ -3458,7 +3066,7 @@ components: csv_file_url: type: string type: object - get_notification_request_body: + get_notification_history_request_body: properties: events: description: "-> \"sent\" - All the devices by player_id that were sent\ @@ -3477,93 +3085,9 @@ components: type: string required: - id - title: get_notification_request_body - type: object - update_player_tags_request_body: - properties: - tags: - description: "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\"}`.\nLimitations:\n- 100 tags per\ - \ call\n- Android SDK users: tags cannot be removed or changed via API\ - \ if set through SDK sendTag methods.\nRecommended to only tag devices\ - \ with 1 kilobyte of ata\nPlease consider using your own Database to save\ - \ more than 1 kilobyte of data. See: Internal Database & CRM\n" - type: object - title: update_player_tags_request_body - type: object - inline_response_202: - example: - properties: - country: country - purchases: - - amount: amount - iso: iso - count: 2.3021358869347655 - sku: sku - - amount: amount - iso: iso - count: 2.3021358869347655 - sku: sku - ip: ip - timezone_id: timezone_id - language: language - first_active: 1.4658129805029452 - last_active: 5.962133916683182 - lat: 0.8008281904610115 - long: 6.027456183070403 - tags: - key: "" - amount_spent: 5.637376656633329 - properties: - properties: - $ref: '#/components/schemas/PropertiesObject' - type: object - inline_response_200: - example: - identity: - key: "" - properties: - identity: - additionalProperties: true - type: object - type: object - inline_response_201: - example: - subscription: - notification_types: 7.061401241503109 - device_model: device_model - app_version: app_version - web_p256: web_p256 - net_type: 4.145608029883936 - type: iOSPush - device_os: device_os - enabled: true - session_time: 9.301444243932576 - test_type: 2.027123023002322 - token: token - carrier: carrier - session_count: 3.616076749251911 - web_auth: web_auth - rooted: true - id: id - sdk: sdk - properties: - subscription: - $ref: '#/components/schemas/SubscriptionObject' - type: object - inline_response_200_3: - example: - in_app_messages: - - "{}" - - "{}" - properties: - in_app_messages: - items: - type: object - type: array + title: get_notification_history_request_body type: object - export_players_request_body: + export_subscriptions_request_body: properties: extra_fields: description: "Additional fields that you wish to include. Currently supports\ @@ -3579,15 +3103,7 @@ components: segment_name: description: Export all devices belonging to the segment. type: string - title: export_players_request_body - type: object - PlayerNotificationTarget_include_aliases: - nullable: true - properties: - alias_label: - items: - type: string - type: array + title: export_subscriptions_request_body type: object BasicNotification_allOf_android_background_layout: description: "Channel: Push Notifications\nPlatform: Android\nAllowing setting\ @@ -3691,14 +3207,6 @@ components: nullable: true type: boolean writeOnly: true - channel_for_external_user_ids: - description: "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.\nExample: Use the string \"push\" to indicate you\ - \ are sending a push notification or the string \"email\"for sending emails\ - \ or \"sms\"for sending SMS.\n" - type: string - writeOnly: true app_id: description: "Required: Your OneSignal Application ID, which can be found\ \ in Keys & IDs.\nIt is a UUID and looks similar to 8250eaf6-1a58-489e-b136-7c74a864b434.\n" @@ -3732,7 +3240,7 @@ components: type: string contents: allOf: - - $ref: '#/components/schemas/StringMap' + - $ref: '#/components/schemas/LanguageStringMap' - description: "Required unless content_available=true or template_id is\ \ set.\nThe message's content (excluding the title), a map of language\ \ codes to text for each language.\nEach hash must have a language code\ @@ -3743,7 +3251,7 @@ components: writeOnly: true headings: allOf: - - $ref: '#/components/schemas/StringMap' + - $ref: '#/components/schemas/LanguageStringMap' - description: "The message's title, a map of language codes to text for\ \ each language. Each hash must have a language code string for a key,\ \ mapped to the localized text you would like users to receive for that\ @@ -3752,7 +3260,7 @@ components: writeOnly: true subtitle: allOf: - - $ref: '#/components/schemas/StringMap' + - $ref: '#/components/schemas/LanguageStringMap' - description: "The message's subtitle, a map of language codes to text\ \ for each language. Each hash must have a language code string for\ \ a key, mapped to the localized text you would like users to receive\ @@ -3889,7 +3397,7 @@ components: text\": \"Read more\", \"icon\": \"http://i.imgur.com/MIxJp1L.png\", \"\ url\": \"https://yoursite.com\"}]\n" items: - $ref: '#/components/schemas/Button' + $ref: '#/components/schemas/WebButton' nullable: true type: array writeOnly: true @@ -4273,6 +3781,21 @@ components: \ summary_arg\"\n" type: integer writeOnly: true + ios_relevance_score: + description: "Channel: Push Notifications\nPlatform: iOS 15+\nA score to\ + \ be set per notification to indicate how it should be displayed when\ + \ grouped. Use a float between 0-1.\n" + nullable: true + type: number + writeOnly: true + ios_interruption_level: + description: "Channel: Push Notifications\nPlatform: iOS 15+\nFocus Modes\ + \ and Interruption Levels indicate the priority and delivery timing of\ + \ a notification, to \"interrupt\" the user.\nCan choose from options:\ + \ ['active', 'passive', 'time_sensitive', 'critical']. Default is active.\n" + nullable: true + type: string + writeOnly: true email_subject: description: "Channel: Email\nRequired. The subject of the email.\n" nullable: true @@ -4332,7 +3855,7 @@ components: writeOnly: true filters: items: - $ref: '#/components/schemas/Filter' + $ref: '#/components/schemas/FilterExpression' nullable: true type: array custom_data: @@ -4463,13 +3986,6 @@ components: unsubscribe link in this email. nullable: true type: integer - User_subscription_options: - example: - retain_previous_owner: true - properties: - retain_previous_owner: - type: boolean - type: object CreateUserConflictResponse_errorsItems_meta: properties: conflicting_aliases: @@ -4484,17 +4000,10 @@ components: meta: $ref: '#/components/schemas/CreateUserConflictResponse_errorsItems_meta' type: object - GenericError_errors_inner: - properties: - code: - type: string - title: - type: string - type: object securitySchemes: - app_key: + rest_api_key: scheme: bearer type: http - user_key: + user_auth_key: scheme: bearer type: http diff --git a/api_default.go b/api_default.go index 5631696..079ceb5 100644 --- a/api_default.go +++ b/api_default.go @@ -3,7 +3,7 @@ OneSignal A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com -API version: 1.4.0 +API version: 5.0.1 Contact: devrel@onesignal.com */ @@ -24,68 +24,67 @@ import ( // DefaultApiService DefaultApi service type DefaultApiService service -type ApiBeginLiveActivityRequest struct { +type ApiCancelNotificationRequest struct { ctx context.Context ApiService *DefaultApiService - appId string - activityId string - beginLiveActivityRequest *BeginLiveActivityRequest + appId *string + notificationId string } -func (r ApiBeginLiveActivityRequest) BeginLiveActivityRequest(beginLiveActivityRequest BeginLiveActivityRequest) ApiBeginLiveActivityRequest { - r.beginLiveActivityRequest = &beginLiveActivityRequest +func (r ApiCancelNotificationRequest) AppId(appId string) ApiCancelNotificationRequest { + r.appId = &appId return r } -func (r ApiBeginLiveActivityRequest) Execute() (*http.Response, error) { - return r.ApiService.BeginLiveActivityExecute(r) +func (r ApiCancelNotificationRequest) Execute() (*GenericSuccessBoolResponse, *http.Response, error) { + return r.ApiService.CancelNotificationExecute(r) } /* -BeginLiveActivity Start Live Activity +CancelNotification Stop a scheduled or currently outgoing notification -Starts a Live Activity +Used to stop a scheduled or currently outgoing notification @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param appId The OneSignal App ID for your app. Available in Keys & IDs. - @param activityId Live Activity record ID - @return ApiBeginLiveActivityRequest + @param notificationId + @return ApiCancelNotificationRequest */ -func (a *DefaultApiService) BeginLiveActivity(ctx context.Context, appId string, activityId string) ApiBeginLiveActivityRequest { - return ApiBeginLiveActivityRequest{ +func (a *DefaultApiService) CancelNotification(ctx context.Context, notificationId string) ApiCancelNotificationRequest { + return ApiCancelNotificationRequest{ ApiService: a, ctx: ctx, - appId: appId, - activityId: activityId, + notificationId: notificationId, } } // Execute executes the request -func (a *DefaultApiService) BeginLiveActivityExecute(r ApiBeginLiveActivityRequest) (*http.Response, error) { +// @return GenericSuccessBoolResponse +func (a *DefaultApiService) CancelNotificationExecute(r ApiCancelNotificationRequest) (*GenericSuccessBoolResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost + localVarHTTPMethod = http.MethodDelete localVarPostBody interface{} formFiles []formFile + localVarReturnValue *GenericSuccessBoolResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.BeginLiveActivity") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.CancelNotification") if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/apps/{app_id}/live_activities/{activity_id}/token" - localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", url.PathEscape(parameterToString(r.appId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"activity_id"+"}", url.PathEscape(parameterToString(r.activityId, "")), -1) + localVarPath := localBasePath + "/notifications/{notification_id}" + localVarPath = strings.Replace(localVarPath, "{"+"notification_id"+"}", url.PathEscape(parameterToString(r.notificationId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} - if r.beginLiveActivityRequest == nil { - return nil, reportError("beginLiveActivityRequest is required and must be specified") + if r.appId == nil { + return localVarReturnValue, nil, reportError("appId is required and must be specified") } + localVarQueryParams.Add("app_id", parameterToString(*r.appId, "")) // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} + localVarHTTPContentTypes := []string{} // set Content-Type header localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) @@ -101,23 +100,21 @@ func (a *DefaultApiService) BeginLiveActivityExecute(r ApiBeginLiveActivityReque if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - // body params - localVarPostBody = r.beginLiveActivityRequest req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { - return nil, err + return localVarReturnValue, nil, err } localVarHTTPResponse, err := a.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err + return localVarReturnValue, localVarHTTPResponse, err } localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { - return localVarHTTPResponse, err + return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { @@ -130,87 +127,113 @@ func (a *DefaultApiService) BeginLiveActivityExecute(r ApiBeginLiveActivityReque err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() - return localVarHTTPResponse, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarHTTPResponse, newErr + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v GenericError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr } if localVarHTTPResponse.StatusCode == 429 { - var v RateLimiterError + var v RateLimitError err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() - return localVarHTTPResponse, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v } - return localVarHTTPResponse, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarHTTPResponse, nil + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil } -type ApiCancelNotificationRequest struct { +type ApiCreateAliasRequest struct { ctx context.Context ApiService *DefaultApiService - appId *string - notificationId string + appId string + aliasLabel string + aliasId string + userIdentityBody *UserIdentityBody } -func (r ApiCancelNotificationRequest) AppId(appId string) ApiCancelNotificationRequest { - r.appId = &appId +func (r ApiCreateAliasRequest) UserIdentityBody(userIdentityBody UserIdentityBody) ApiCreateAliasRequest { + r.userIdentityBody = &userIdentityBody return r } -func (r ApiCancelNotificationRequest) Execute() (*CancelNotificationSuccessResponse, *http.Response, error) { - return r.ApiService.CancelNotificationExecute(r) +func (r ApiCreateAliasRequest) Execute() (*UserIdentityBody, *http.Response, error) { + return r.ApiService.CreateAliasExecute(r) } /* -CancelNotification Stop a scheduled or currently outgoing notification +CreateAlias Method for CreateAlias -Used to stop a scheduled or currently outgoing notification +Upserts one or more Aliases to an existing User identified by (:alias_label, :alias_id). @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param notificationId - @return ApiCancelNotificationRequest + @param appId + @param aliasLabel + @param aliasId + @return ApiCreateAliasRequest */ -func (a *DefaultApiService) CancelNotification(ctx context.Context, notificationId string) ApiCancelNotificationRequest { - return ApiCancelNotificationRequest{ +func (a *DefaultApiService) CreateAlias(ctx context.Context, appId string, aliasLabel string, aliasId string) ApiCreateAliasRequest { + return ApiCreateAliasRequest{ ApiService: a, ctx: ctx, - notificationId: notificationId, + appId: appId, + aliasLabel: aliasLabel, + aliasId: aliasId, } } // Execute executes the request -// @return CancelNotificationSuccessResponse -func (a *DefaultApiService) CancelNotificationExecute(r ApiCancelNotificationRequest) (*CancelNotificationSuccessResponse, *http.Response, error) { +// @return UserIdentityBody +func (a *DefaultApiService) CreateAliasExecute(r ApiCreateAliasRequest) (*UserIdentityBody, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodDelete + localVarHTTPMethod = http.MethodPatch localVarPostBody interface{} formFiles []formFile - localVarReturnValue *CancelNotificationSuccessResponse + localVarReturnValue *UserIdentityBody ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.CancelNotification") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.CreateAlias") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/notifications/{notification_id}" - localVarPath = strings.Replace(localVarPath, "{"+"notification_id"+"}", url.PathEscape(parameterToString(r.notificationId, "")), -1) + localVarPath := localBasePath + "/apps/{app_id}/users/by/{alias_label}/{alias_id}/identity" + localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", url.PathEscape(parameterToString(r.appId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"alias_label"+"}", url.PathEscape(parameterToString(r.aliasLabel, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"alias_id"+"}", url.PathEscape(parameterToString(r.aliasId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} - if r.appId == nil { - return localVarReturnValue, nil, reportError("appId is required and must be specified") + if r.userIdentityBody == nil { + return localVarReturnValue, nil, reportError("userIdentityBody is required and must be specified") } - localVarQueryParams.Add("app_id", parameterToString(*r.appId, "")) // to determine the Content-Type header - localVarHTTPContentTypes := []string{} + localVarHTTPContentTypes := []string{"application/json"} // set Content-Type header localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) @@ -226,6 +249,8 @@ func (a *DefaultApiService) CancelNotificationExecute(r ApiCancelNotificationReq if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } + // body params + localVarPostBody = r.userIdentityBody req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err @@ -258,8 +283,28 @@ func (a *DefaultApiService) CancelNotificationExecute(r ApiCancelNotificationReq newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } + if localVarHTTPResponse.StatusCode == 404 { + var v GenericError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v GenericError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } if localVarHTTPResponse.StatusCode == 429 { - var v RateLimiterError + var v RateLimitError err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -282,58 +327,66 @@ func (a *DefaultApiService) CancelNotificationExecute(r ApiCancelNotificationReq return localVarReturnValue, localVarHTTPResponse, nil } -type ApiCreateAppRequest struct { +type ApiCreateAliasBySubscriptionRequest struct { ctx context.Context ApiService *DefaultApiService - app *App + appId string + subscriptionId string + userIdentityBody *UserIdentityBody } -func (r ApiCreateAppRequest) App(app App) ApiCreateAppRequest { - r.app = &app +func (r ApiCreateAliasBySubscriptionRequest) UserIdentityBody(userIdentityBody UserIdentityBody) ApiCreateAliasBySubscriptionRequest { + r.userIdentityBody = &userIdentityBody return r } -func (r ApiCreateAppRequest) Execute() (*App, *http.Response, error) { - return r.ApiService.CreateAppExecute(r) +func (r ApiCreateAliasBySubscriptionRequest) Execute() (*UserIdentityBody, *http.Response, error) { + return r.ApiService.CreateAliasBySubscriptionExecute(r) } /* -CreateApp Create an app +CreateAliasBySubscription Method for CreateAliasBySubscription -Creates a new OneSignal app +Upserts one or more Aliases for the User identified by :subscription_id. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiCreateAppRequest + @param appId + @param subscriptionId + @return ApiCreateAliasBySubscriptionRequest */ -func (a *DefaultApiService) CreateApp(ctx context.Context) ApiCreateAppRequest { - return ApiCreateAppRequest{ +func (a *DefaultApiService) CreateAliasBySubscription(ctx context.Context, appId string, subscriptionId string) ApiCreateAliasBySubscriptionRequest { + return ApiCreateAliasBySubscriptionRequest{ ApiService: a, ctx: ctx, + appId: appId, + subscriptionId: subscriptionId, } } // Execute executes the request -// @return App -func (a *DefaultApiService) CreateAppExecute(r ApiCreateAppRequest) (*App, *http.Response, error) { +// @return UserIdentityBody +func (a *DefaultApiService) CreateAliasBySubscriptionExecute(r ApiCreateAliasBySubscriptionRequest) (*UserIdentityBody, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost + localVarHTTPMethod = http.MethodPatch localVarPostBody interface{} formFiles []formFile - localVarReturnValue *App + localVarReturnValue *UserIdentityBody ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.CreateApp") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.CreateAliasBySubscription") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/apps" + localVarPath := localBasePath + "/apps/{app_id}/subscriptions/{subscription_id}/user/identity" + localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", url.PathEscape(parameterToString(r.appId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"subscription_id"+"}", url.PathEscape(parameterToString(r.subscriptionId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} - if r.app == nil { - return localVarReturnValue, nil, reportError("app is required and must be specified") + if r.userIdentityBody == nil { + return localVarReturnValue, nil, reportError("userIdentityBody is required and must be specified") } // to determine the Content-Type header @@ -354,7 +407,7 @@ func (a *DefaultApiService) CreateAppExecute(r ApiCreateAppRequest) (*App, *http localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = r.app + localVarPostBody = r.userIdentityBody req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err @@ -387,8 +440,28 @@ func (a *DefaultApiService) CreateAppExecute(r ApiCreateAppRequest) (*App, *http newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } + if localVarHTTPResponse.StatusCode == 404 { + var v GenericError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v GenericError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } if localVarHTTPResponse.StatusCode == 429 { - var v RateLimiterError + var v RateLimitError err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -411,59 +484,58 @@ func (a *DefaultApiService) CreateAppExecute(r ApiCreateAppRequest) (*App, *http return localVarReturnValue, localVarHTTPResponse, nil } -type ApiCreateNotificationRequest struct { +type ApiCreateAppRequest struct { ctx context.Context ApiService *DefaultApiService - notification *Notification + app *App } -func (r ApiCreateNotificationRequest) Notification(notification Notification) ApiCreateNotificationRequest { - r.notification = ¬ification +func (r ApiCreateAppRequest) App(app App) ApiCreateAppRequest { + r.app = &app return r } -func (r ApiCreateNotificationRequest) Execute() (*CreateNotificationSuccessResponse, *http.Response, error) { - return r.ApiService.CreateNotificationExecute(r) +func (r ApiCreateAppRequest) Execute() (*App, *http.Response, error) { + return r.ApiService.CreateAppExecute(r) } /* -CreateNotification Create notification - -Sends notifications to your users +CreateApp Create an app +Creates a new OneSignal app @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiCreateNotificationRequest + @return ApiCreateAppRequest */ -func (a *DefaultApiService) CreateNotification(ctx context.Context) ApiCreateNotificationRequest { - return ApiCreateNotificationRequest{ +func (a *DefaultApiService) CreateApp(ctx context.Context) ApiCreateAppRequest { + return ApiCreateAppRequest{ ApiService: a, ctx: ctx, } } // Execute executes the request -// @return CreateNotificationSuccessResponse -func (a *DefaultApiService) CreateNotificationExecute(r ApiCreateNotificationRequest) (*CreateNotificationSuccessResponse, *http.Response, error) { +// @return App +func (a *DefaultApiService) CreateAppExecute(r ApiCreateAppRequest) (*App, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile - localVarReturnValue *CreateNotificationSuccessResponse + localVarReturnValue *App ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.CreateNotification") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.CreateApp") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/notifications" + localVarPath := localBasePath + "/apps" localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} - if r.notification == nil { - return localVarReturnValue, nil, reportError("notification is required and must be specified") + if r.app == nil { + return localVarReturnValue, nil, reportError("app is required and must be specified") } // to determine the Content-Type header @@ -484,7 +556,7 @@ func (a *DefaultApiService) CreateNotificationExecute(r ApiCreateNotificationReq localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = r.notification + localVarPostBody = r.app req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err @@ -518,7 +590,7 @@ func (a *DefaultApiService) CreateNotificationExecute(r ApiCreateNotificationReq return localVarReturnValue, localVarHTTPResponse, newErr } if localVarHTTPResponse.StatusCode == 429 { - var v RateLimiterError + var v RateLimitError err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -541,69 +613,59 @@ func (a *DefaultApiService) CreateNotificationExecute(r ApiCreateNotificationReq return localVarReturnValue, localVarHTTPResponse, nil } -type ApiCreatePlayerRequest struct { +type ApiCreateNotificationRequest struct { ctx context.Context ApiService *DefaultApiService - player *Player + notification *Notification } -func (r ApiCreatePlayerRequest) Player(player Player) ApiCreatePlayerRequest { - r.player = &player +func (r ApiCreateNotificationRequest) Notification(notification Notification) ApiCreateNotificationRequest { + r.notification = ¬ification return r } -func (r ApiCreatePlayerRequest) Execute() (*CreatePlayerSuccessResponse, *http.Response, error) { - return r.ApiService.CreatePlayerExecute(r) +func (r ApiCreateNotificationRequest) Execute() (*CreateNotificationSuccessResponse, *http.Response, error) { + return r.ApiService.CreateNotificationExecute(r) } /* -CreatePlayer Add a device +CreateNotification Create notification -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. +Sends notifications to your users @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiCreatePlayerRequest + @return ApiCreateNotificationRequest */ -func (a *DefaultApiService) CreatePlayer(ctx context.Context) ApiCreatePlayerRequest { - return ApiCreatePlayerRequest{ +func (a *DefaultApiService) CreateNotification(ctx context.Context) ApiCreateNotificationRequest { + return ApiCreateNotificationRequest{ ApiService: a, ctx: ctx, } } // Execute executes the request -// @return CreatePlayerSuccessResponse -func (a *DefaultApiService) CreatePlayerExecute(r ApiCreatePlayerRequest) (*CreatePlayerSuccessResponse, *http.Response, error) { +// @return CreateNotificationSuccessResponse +func (a *DefaultApiService) CreateNotificationExecute(r ApiCreateNotificationRequest) (*CreateNotificationSuccessResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile - localVarReturnValue *CreatePlayerSuccessResponse + localVarReturnValue *CreateNotificationSuccessResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.CreatePlayer") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.CreateNotification") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/players" + localVarPath := localBasePath + "/notifications" localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} - if r.player == nil { - return localVarReturnValue, nil, reportError("player is required and must be specified") + if r.notification == nil { + return localVarReturnValue, nil, reportError("notification is required and must be specified") } // to determine the Content-Type header @@ -624,7 +686,7 @@ func (a *DefaultApiService) CreatePlayerExecute(r ApiCreatePlayerRequest) (*Crea localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = r.player + localVarPostBody = r.notification req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err @@ -657,18 +719,8 @@ func (a *DefaultApiService) CreatePlayerExecute(r ApiCreatePlayerRequest) (*Crea newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } - if localVarHTTPResponse.StatusCode == 409 { - var v GenericError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } if localVarHTTPResponse.StatusCode == 429 { - var v RateLimiterError + var v RateLimitError err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -691,38 +743,38 @@ func (a *DefaultApiService) CreatePlayerExecute(r ApiCreatePlayerRequest) (*Crea return localVarReturnValue, localVarHTTPResponse, nil } -type ApiCreateSegmentsRequest struct { +type ApiCreateSegmentRequest struct { ctx context.Context ApiService *DefaultApiService appId string segment *Segment } -func (r ApiCreateSegmentsRequest) Segment(segment Segment) ApiCreateSegmentsRequest { +func (r ApiCreateSegmentRequest) Segment(segment Segment) ApiCreateSegmentRequest { r.segment = &segment return r } -func (r ApiCreateSegmentsRequest) Execute() (*CreateSegmentSuccessResponse, *http.Response, error) { - return r.ApiService.CreateSegmentsExecute(r) +func (r ApiCreateSegmentRequest) Execute() (*CreateSegmentSuccessResponse, *http.Response, error) { + return r.ApiService.CreateSegmentExecute(r) } /* -CreateSegments Create Segments +CreateSegment Create Segment -Create segments visible and usable in the dashboard and API - Required: OneSignal Paid Plan +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 Segments endpoint and re-create it with this endpoint to edit. +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. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param appId The OneSignal App ID for your app. Available in Keys & IDs. - @return ApiCreateSegmentsRequest + @return ApiCreateSegmentRequest */ -func (a *DefaultApiService) CreateSegments(ctx context.Context, appId string) ApiCreateSegmentsRequest { - return ApiCreateSegmentsRequest{ +func (a *DefaultApiService) CreateSegment(ctx context.Context, appId string) ApiCreateSegmentRequest { + return ApiCreateSegmentRequest{ ApiService: a, ctx: ctx, appId: appId, @@ -731,7 +783,7 @@ func (a *DefaultApiService) CreateSegments(ctx context.Context, appId string) Ap // Execute executes the request // @return CreateSegmentSuccessResponse -func (a *DefaultApiService) CreateSegmentsExecute(r ApiCreateSegmentsRequest) (*CreateSegmentSuccessResponse, *http.Response, error) { +func (a *DefaultApiService) CreateSegmentExecute(r ApiCreateSegmentRequest) (*CreateSegmentSuccessResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} @@ -739,7 +791,7 @@ func (a *DefaultApiService) CreateSegmentsExecute(r ApiCreateSegmentsRequest) (* localVarReturnValue *CreateSegmentSuccessResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.CreateSegments") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.CreateSegment") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -813,7 +865,7 @@ func (a *DefaultApiService) CreateSegmentsExecute(r ApiCreateSegmentsRequest) (* return localVarReturnValue, localVarHTTPResponse, newErr } if localVarHTTPResponse.StatusCode == 429 { - var v RateLimiterError + var v RateLimitError err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -842,15 +894,15 @@ type ApiCreateSubscriptionRequest struct { appId string aliasLabel string aliasId string - createSubscriptionRequestBody *CreateSubscriptionRequestBody + subscriptionBody *SubscriptionBody } -func (r ApiCreateSubscriptionRequest) CreateSubscriptionRequestBody(createSubscriptionRequestBody CreateSubscriptionRequestBody) ApiCreateSubscriptionRequest { - r.createSubscriptionRequestBody = &createSubscriptionRequestBody +func (r ApiCreateSubscriptionRequest) SubscriptionBody(subscriptionBody SubscriptionBody) ApiCreateSubscriptionRequest { + r.subscriptionBody = &subscriptionBody return r } -func (r ApiCreateSubscriptionRequest) Execute() (*InlineResponse201, *http.Response, error) { +func (r ApiCreateSubscriptionRequest) Execute() (*SubscriptionBody, *http.Response, error) { return r.ApiService.CreateSubscriptionExecute(r) } @@ -876,13 +928,13 @@ func (a *DefaultApiService) CreateSubscription(ctx context.Context, appId string } // Execute executes the request -// @return InlineResponse201 -func (a *DefaultApiService) CreateSubscriptionExecute(r ApiCreateSubscriptionRequest) (*InlineResponse201, *http.Response, error) { +// @return SubscriptionBody +func (a *DefaultApiService) CreateSubscriptionExecute(r ApiCreateSubscriptionRequest) (*SubscriptionBody, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile - localVarReturnValue *InlineResponse201 + localVarReturnValue *SubscriptionBody ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.CreateSubscription") @@ -898,8 +950,8 @@ func (a *DefaultApiService) CreateSubscriptionExecute(r ApiCreateSubscriptionReq localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} - if r.createSubscriptionRequestBody == nil { - return localVarReturnValue, nil, reportError("createSubscriptionRequestBody is required and must be specified") + if r.subscriptionBody == nil { + return localVarReturnValue, nil, reportError("subscriptionBody is required and must be specified") } // to determine the Content-Type header @@ -920,7 +972,7 @@ func (a *DefaultApiService) CreateSubscriptionExecute(r ApiCreateSubscriptionReq localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = r.createSubscriptionRequestBody + localVarPostBody = r.subscriptionBody req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err @@ -953,7 +1005,7 @@ func (a *DefaultApiService) CreateSubscriptionExecute(r ApiCreateSubscriptionReq newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } - if localVarHTTPResponse.StatusCode == 409 { + if localVarHTTPResponse.StatusCode == 404 { var v GenericError err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { @@ -963,17 +1015,27 @@ func (a *DefaultApiService) CreateSubscriptionExecute(r ApiCreateSubscriptionReq newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } - if localVarHTTPResponse.StatusCode == 429 { - var v RateLimiterError + if localVarHTTPResponse.StatusCode == 409 { + var v GenericError err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, newErr - } + if localVarHTTPResponse.StatusCode == 429 { + var v RateLimitError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { @@ -1108,7 +1170,7 @@ func (a *DefaultApiService) CreateUserExecute(r ApiCreateUserRequest) (*User, *h return localVarReturnValue, localVarHTTPResponse, newErr } if localVarHTTPResponse.StatusCode == 429 { - var v RateLimiterError + var v RateLimitError err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -1140,7 +1202,7 @@ type ApiDeleteAliasRequest struct { aliasLabelToDelete string } -func (r ApiDeleteAliasRequest) Execute() (*InlineResponse200, *http.Response, error) { +func (r ApiDeleteAliasRequest) Execute() (*UserIdentityBody, *http.Response, error) { return r.ApiService.DeleteAliasExecute(r) } @@ -1168,13 +1230,13 @@ func (a *DefaultApiService) DeleteAlias(ctx context.Context, appId string, alias } // Execute executes the request -// @return InlineResponse200 -func (a *DefaultApiService) DeleteAliasExecute(r ApiDeleteAliasRequest) (*InlineResponse200, *http.Response, error) { +// @return UserIdentityBody +func (a *DefaultApiService) DeleteAliasExecute(r ApiDeleteAliasRequest) (*UserIdentityBody, *http.Response, error) { var ( localVarHTTPMethod = http.MethodDelete localVarPostBody interface{} formFiles []formFile - localVarReturnValue *InlineResponse200 + localVarReturnValue *UserIdentityBody ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.DeleteAlias") @@ -1241,7 +1303,7 @@ func (a *DefaultApiService) DeleteAliasExecute(r ApiDeleteAliasRequest) (*Inline newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } - if localVarHTTPResponse.StatusCode == 409 { + if localVarHTTPResponse.StatusCode == 404 { var v GenericError err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { @@ -1251,132 +1313,7 @@ func (a *DefaultApiService) DeleteAliasExecute(r ApiDeleteAliasRequest) (*Inline newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } - if localVarHTTPResponse.StatusCode == 429 { - var v RateLimiterError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiDeletePlayerRequest struct { - ctx context.Context - ApiService *DefaultApiService - appId *string - playerId string -} - -// The OneSignal App ID for your app. Available in Keys & IDs. -func (r ApiDeletePlayerRequest) AppId(appId string) ApiDeletePlayerRequest { - r.appId = &appId - return r -} - -func (r ApiDeletePlayerRequest) Execute() (*DeletePlayerSuccessResponse, *http.Response, error) { - return r.ApiService.DeletePlayerExecute(r) -} - -/* -DeletePlayer Delete a user record - -Delete player - Required: -Used to delete a single, specific Player ID record from a specific OneSignal app. - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param playerId The OneSignal player_id - @return ApiDeletePlayerRequest -*/ -func (a *DefaultApiService) DeletePlayer(ctx context.Context, playerId string) ApiDeletePlayerRequest { - return ApiDeletePlayerRequest{ - ApiService: a, - ctx: ctx, - playerId: playerId, - } -} - -// Execute executes the request -// @return DeletePlayerSuccessResponse -func (a *DefaultApiService) DeletePlayerExecute(r ApiDeletePlayerRequest) (*DeletePlayerSuccessResponse, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *DeletePlayerSuccessResponse - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.DeletePlayer") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/players/{player_id}" - localVarPath = strings.Replace(localVarPath, "{"+"player_id"+"}", url.PathEscape(parameterToString(r.playerId, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.appId == nil { - return localVarReturnValue, nil, reportError("appId is required and must be specified") - } - - localVarQueryParams.Add("app_id", parameterToString(*r.appId, "")) - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { + if localVarHTTPResponse.StatusCode == 409 { var v GenericError err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { @@ -1386,18 +1323,8 @@ func (a *DefaultApiService) DeletePlayerExecute(r ApiDeletePlayerRequest) (*Dele newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } - if localVarHTTPResponse.StatusCode == 404 { - var v DeletePlayerNotFoundResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } if localVarHTTPResponse.StatusCode == 429 { - var v RateLimiterError + var v RateLimitError err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -1420,21 +1347,21 @@ func (a *DefaultApiService) DeletePlayerExecute(r ApiDeletePlayerRequest) (*Dele return localVarReturnValue, localVarHTTPResponse, nil } -type ApiDeleteSegmentsRequest struct { +type ApiDeleteSegmentRequest struct { ctx context.Context ApiService *DefaultApiService appId string segmentId string } -func (r ApiDeleteSegmentsRequest) Execute() (*DeleteSegmentSuccessResponse, *http.Response, error) { - return r.ApiService.DeleteSegmentsExecute(r) +func (r ApiDeleteSegmentRequest) Execute() (*GenericSuccessBoolResponse, *http.Response, error) { + return r.ApiService.DeleteSegmentExecute(r) } /* -DeleteSegments Delete Segments +DeleteSegment Delete Segment -Delete segments (not user devices) - Required: OneSignal Paid Plan +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. @@ -1442,10 +1369,10 @@ The segment_id can be found in the URL of the segment when viewing it in the das @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param appId The OneSignal App ID for your app. Available in Keys & IDs. @param segmentId The segment_id can be found in the URL of the segment when viewing it in the dashboard. - @return ApiDeleteSegmentsRequest + @return ApiDeleteSegmentRequest */ -func (a *DefaultApiService) DeleteSegments(ctx context.Context, appId string, segmentId string) ApiDeleteSegmentsRequest { - return ApiDeleteSegmentsRequest{ +func (a *DefaultApiService) DeleteSegment(ctx context.Context, appId string, segmentId string) ApiDeleteSegmentRequest { + return ApiDeleteSegmentRequest{ ApiService: a, ctx: ctx, appId: appId, @@ -1454,16 +1381,16 @@ func (a *DefaultApiService) DeleteSegments(ctx context.Context, appId string, se } // Execute executes the request -// @return DeleteSegmentSuccessResponse -func (a *DefaultApiService) DeleteSegmentsExecute(r ApiDeleteSegmentsRequest) (*DeleteSegmentSuccessResponse, *http.Response, error) { +// @return GenericSuccessBoolResponse +func (a *DefaultApiService) DeleteSegmentExecute(r ApiDeleteSegmentRequest) (*GenericSuccessBoolResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodDelete localVarPostBody interface{} formFiles []formFile - localVarReturnValue *DeleteSegmentSuccessResponse + localVarReturnValue *GenericSuccessBoolResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.DeleteSegments") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.DeleteSegment") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -1526,7 +1453,7 @@ func (a *DefaultApiService) DeleteSegmentsExecute(r ApiDeleteSegmentsRequest) (* return localVarReturnValue, localVarHTTPResponse, newErr } if localVarHTTPResponse.StatusCode == 404 { - var v DeleteSegmentNotFoundResponse + var v GenericSuccessBoolResponse err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -1536,7 +1463,7 @@ func (a *DefaultApiService) DeleteSegmentsExecute(r ApiDeleteSegmentsRequest) (* return localVarReturnValue, localVarHTTPResponse, newErr } if localVarHTTPResponse.StatusCode == 429 { - var v RateLimiterError + var v RateLimitError err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -1659,6 +1586,16 @@ func (a *DefaultApiService) DeleteSubscriptionExecute(r ApiDeleteSubscriptionReq newErr.model = v return localVarHTTPResponse, newErr } + if localVarHTTPResponse.StatusCode == 404 { + var v GenericError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.model = v + return localVarHTTPResponse, newErr + } if localVarHTTPResponse.StatusCode == 409 { var v GenericError err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) @@ -1670,7 +1607,7 @@ func (a *DefaultApiService) DeleteSubscriptionExecute(r ApiDeleteSubscriptionReq return localVarHTTPResponse, newErr } if localVarHTTPResponse.StatusCode == 429 { - var v RateLimiterError + var v RateLimitError err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -1799,126 +1736,7 @@ func (a *DefaultApiService) DeleteUserExecute(r ApiDeleteUserRequest) (*http.Res return localVarHTTPResponse, newErr } if localVarHTTPResponse.StatusCode == 429 { - var v RateLimiterError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiEndLiveActivityRequest struct { - ctx context.Context - ApiService *DefaultApiService - appId string - activityId string - subscriptionId string -} - -func (r ApiEndLiveActivityRequest) Execute() (*http.Response, error) { - return r.ApiService.EndLiveActivityExecute(r) -} - -/* -EndLiveActivity Stop Live Activity - -Stops a Live Activity - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param appId The OneSignal App ID for your app. Available in Keys & IDs. - @param activityId Live Activity record ID - @param subscriptionId Subscription ID - @return ApiEndLiveActivityRequest -*/ -func (a *DefaultApiService) EndLiveActivity(ctx context.Context, appId string, activityId string, subscriptionId string) ApiEndLiveActivityRequest { - return ApiEndLiveActivityRequest{ - ApiService: a, - ctx: ctx, - appId: appId, - activityId: activityId, - subscriptionId: subscriptionId, - } -} - -// Execute executes the request -func (a *DefaultApiService) EndLiveActivityExecute(r ApiEndLiveActivityRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.EndLiveActivity") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/apps/{app_id}/live_activities/{activity_id}/token/{subscription_id}" - localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", url.PathEscape(parameterToString(r.appId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"activity_id"+"}", url.PathEscape(parameterToString(r.activityId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"subscription_id"+"}", url.PathEscape(parameterToString(r.subscriptionId, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v GenericError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.model = v - return localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v RateLimiterError + var v RateLimitError err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -2053,7 +1871,7 @@ func (a *DefaultApiService) ExportEventsExecute(r ApiExportEventsRequest) (*Expo return localVarReturnValue, localVarHTTPResponse, newErr } if localVarHTTPResponse.StatusCode == 429 { - var v RateLimiterError + var v RateLimitError err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -2076,24 +1894,24 @@ func (a *DefaultApiService) ExportEventsExecute(r ApiExportEventsRequest) (*Expo return localVarReturnValue, localVarHTTPResponse, nil } -type ApiExportPlayersRequest struct { +type ApiExportSubscriptionsRequest struct { ctx context.Context ApiService *DefaultApiService appId string - exportPlayersRequestBody *ExportPlayersRequestBody + exportSubscriptionsRequestBody *ExportSubscriptionsRequestBody } -func (r ApiExportPlayersRequest) ExportPlayersRequestBody(exportPlayersRequestBody ExportPlayersRequestBody) ApiExportPlayersRequest { - r.exportPlayersRequestBody = &exportPlayersRequestBody +func (r ApiExportSubscriptionsRequest) ExportSubscriptionsRequestBody(exportSubscriptionsRequestBody ExportSubscriptionsRequestBody) ApiExportSubscriptionsRequest { + r.exportSubscriptionsRequestBody = &exportSubscriptionsRequestBody return r } -func (r ApiExportPlayersRequest) Execute() (*ExportPlayersSuccessResponse, *http.Response, error) { - return r.ApiService.ExportPlayersExecute(r) +func (r ApiExportSubscriptionsRequest) Execute() (*ExportSubscriptionsSuccessResponse, *http.Response, error) { + return r.ApiService.ExportSubscriptionsExecute(r) } /* -ExportPlayers Export CSV of Players +ExportSubscriptions 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. @@ -2144,10 +1962,10 @@ CSV File Format: @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param appId The app ID that you want to export devices from - @return ApiExportPlayersRequest + @return ApiExportSubscriptionsRequest */ -func (a *DefaultApiService) ExportPlayers(ctx context.Context, appId string) ApiExportPlayersRequest { - return ApiExportPlayersRequest{ +func (a *DefaultApiService) ExportSubscriptions(ctx context.Context, appId string) ApiExportSubscriptionsRequest { + return ApiExportSubscriptionsRequest{ ApiService: a, ctx: ctx, appId: appId, @@ -2155,16 +1973,16 @@ func (a *DefaultApiService) ExportPlayers(ctx context.Context, appId string) Api } // Execute executes the request -// @return ExportPlayersSuccessResponse -func (a *DefaultApiService) ExportPlayersExecute(r ApiExportPlayersRequest) (*ExportPlayersSuccessResponse, *http.Response, error) { +// @return ExportSubscriptionsSuccessResponse +func (a *DefaultApiService) ExportSubscriptionsExecute(r ApiExportSubscriptionsRequest) (*ExportSubscriptionsSuccessResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile - localVarReturnValue *ExportPlayersSuccessResponse + localVarReturnValue *ExportSubscriptionsSuccessResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ExportPlayers") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ExportSubscriptions") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -2194,7 +2012,7 @@ func (a *DefaultApiService) ExportPlayersExecute(r ApiExportPlayersRequest) (*Ex localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = r.exportPlayersRequestBody + localVarPostBody = r.exportSubscriptionsRequestBody req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err @@ -2228,7 +2046,7 @@ func (a *DefaultApiService) ExportPlayersExecute(r ApiExportPlayersRequest) (*Ex return localVarReturnValue, localVarHTTPResponse, newErr } if localVarHTTPResponse.StatusCode == 429 { - var v RateLimiterError + var v RateLimitError err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -2251,54 +2069,58 @@ func (a *DefaultApiService) ExportPlayersExecute(r ApiExportPlayersRequest) (*Ex return localVarReturnValue, localVarHTTPResponse, nil } -type ApiFetchAliasesRequest struct { +type ApiGetAliasesRequest struct { ctx context.Context ApiService *DefaultApiService appId string - subscriptionId string + aliasLabel string + aliasId string } -func (r ApiFetchAliasesRequest) Execute() (*UserIdentityResponse, *http.Response, error) { - return r.ApiService.FetchAliasesExecute(r) +func (r ApiGetAliasesRequest) Execute() (*UserIdentityBody, *http.Response, error) { + return r.ApiService.GetAliasesExecute(r) } /* -FetchAliases Method for FetchAliases +GetAliases Method for GetAliases -Lists all Aliases for the User identified by :subscription_id. +Lists all Aliases for the User identified by (:alias_label, :alias_id). @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param appId - @param subscriptionId - @return ApiFetchAliasesRequest + @param aliasLabel + @param aliasId + @return ApiGetAliasesRequest */ -func (a *DefaultApiService) FetchAliases(ctx context.Context, appId string, subscriptionId string) ApiFetchAliasesRequest { - return ApiFetchAliasesRequest{ +func (a *DefaultApiService) GetAliases(ctx context.Context, appId string, aliasLabel string, aliasId string) ApiGetAliasesRequest { + return ApiGetAliasesRequest{ ApiService: a, ctx: ctx, appId: appId, - subscriptionId: subscriptionId, + aliasLabel: aliasLabel, + aliasId: aliasId, } } // Execute executes the request -// @return UserIdentityResponse -func (a *DefaultApiService) FetchAliasesExecute(r ApiFetchAliasesRequest) (*UserIdentityResponse, *http.Response, error) { +// @return UserIdentityBody +func (a *DefaultApiService) GetAliasesExecute(r ApiGetAliasesRequest) (*UserIdentityBody, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *UserIdentityResponse + localVarReturnValue *UserIdentityBody ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.FetchAliases") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetAliases") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/apps/{app_id}/subscriptions/{subscription_id}/user/identity" + localVarPath := localBasePath + "/apps/{app_id}/users/by/{alias_label}/{alias_id}/identity" localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", url.PathEscape(parameterToString(r.appId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"subscription_id"+"}", url.PathEscape(parameterToString(r.subscriptionId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"alias_label"+"}", url.PathEscape(parameterToString(r.aliasLabel, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"alias_id"+"}", url.PathEscape(parameterToString(r.aliasId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -2351,6 +2173,26 @@ func (a *DefaultApiService) FetchAliasesExecute(r ApiFetchAliasesRequest) (*User return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v GenericError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v RateLimitError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr } @@ -2367,58 +2209,54 @@ func (a *DefaultApiService) FetchAliasesExecute(r ApiFetchAliasesRequest) (*User return localVarReturnValue, localVarHTTPResponse, nil } -type ApiFetchUserRequest struct { +type ApiGetAliasesBySubscriptionRequest struct { ctx context.Context ApiService *DefaultApiService appId string - aliasLabel string - aliasId string + subscriptionId string } -func (r ApiFetchUserRequest) Execute() (*User, *http.Response, error) { - return r.ApiService.FetchUserExecute(r) +func (r ApiGetAliasesBySubscriptionRequest) Execute() (*UserIdentityBody, *http.Response, error) { + return r.ApiService.GetAliasesBySubscriptionExecute(r) } /* -FetchUser Method for FetchUser +GetAliasesBySubscription Method for GetAliasesBySubscription -Returns the User’s properties, Aliases, and Subscriptions. +Lists all Aliases for the User identified by :subscription_id. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param appId - @param aliasLabel - @param aliasId - @return ApiFetchUserRequest + @param subscriptionId + @return ApiGetAliasesBySubscriptionRequest */ -func (a *DefaultApiService) FetchUser(ctx context.Context, appId string, aliasLabel string, aliasId string) ApiFetchUserRequest { - return ApiFetchUserRequest{ +func (a *DefaultApiService) GetAliasesBySubscription(ctx context.Context, appId string, subscriptionId string) ApiGetAliasesBySubscriptionRequest { + return ApiGetAliasesBySubscriptionRequest{ ApiService: a, ctx: ctx, appId: appId, - aliasLabel: aliasLabel, - aliasId: aliasId, + subscriptionId: subscriptionId, } } // Execute executes the request -// @return User -func (a *DefaultApiService) FetchUserExecute(r ApiFetchUserRequest) (*User, *http.Response, error) { +// @return UserIdentityBody +func (a *DefaultApiService) GetAliasesBySubscriptionExecute(r ApiGetAliasesBySubscriptionRequest) (*UserIdentityBody, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *User + localVarReturnValue *UserIdentityBody ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.FetchUser") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetAliasesBySubscription") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/apps/{app_id}/users/by/{alias_label}/{alias_id}" + localVarPath := localBasePath + "/apps/{app_id}/subscriptions/{subscription_id}/user/identity" localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", url.PathEscape(parameterToString(r.appId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"alias_label"+"}", url.PathEscape(parameterToString(r.aliasLabel, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"alias_id"+"}", url.PathEscape(parameterToString(r.aliasId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"subscription_id"+"}", url.PathEscape(parameterToString(r.subscriptionId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -2473,8 +2311,8 @@ func (a *DefaultApiService) FetchUserExecute(r ApiFetchUserRequest) (*User, *htt newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } - if localVarHTTPResponse.StatusCode == 429 { - var v RateLimiterError + if localVarHTTPResponse.StatusCode == 404 { + var v GenericError err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -2497,58 +2335,50 @@ func (a *DefaultApiService) FetchUserExecute(r ApiFetchUserRequest) (*User, *htt return localVarReturnValue, localVarHTTPResponse, nil } -type ApiFetchUserIdentityRequest struct { +type ApiGetAppRequest struct { ctx context.Context ApiService *DefaultApiService appId string - aliasLabel string - aliasId string } -func (r ApiFetchUserIdentityRequest) Execute() (*InlineResponse200, *http.Response, error) { - return r.ApiService.FetchUserIdentityExecute(r) +func (r ApiGetAppRequest) Execute() (*App, *http.Response, error) { + return r.ApiService.GetAppExecute(r) } /* -FetchUserIdentity Method for FetchUserIdentity +GetApp View an app -Lists all Aliases for the User identified by (:alias_label, :alias_id). +View the details of a single OneSignal app @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param appId - @param aliasLabel - @param aliasId - @return ApiFetchUserIdentityRequest + @param appId An app id + @return ApiGetAppRequest */ -func (a *DefaultApiService) FetchUserIdentity(ctx context.Context, appId string, aliasLabel string, aliasId string) ApiFetchUserIdentityRequest { - return ApiFetchUserIdentityRequest{ +func (a *DefaultApiService) GetApp(ctx context.Context, appId string) ApiGetAppRequest { + return ApiGetAppRequest{ ApiService: a, ctx: ctx, appId: appId, - aliasLabel: aliasLabel, - aliasId: aliasId, } } // Execute executes the request -// @return InlineResponse200 -func (a *DefaultApiService) FetchUserIdentityExecute(r ApiFetchUserIdentityRequest) (*InlineResponse200, *http.Response, error) { +// @return App +func (a *DefaultApiService) GetAppExecute(r ApiGetAppRequest) (*App, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *InlineResponse200 + localVarReturnValue *App ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.FetchUserIdentity") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetApp") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/apps/{app_id}/users/by/{alias_label}/{alias_id}/identity" + localVarPath := localBasePath + "/apps/{app_id}" localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", url.PathEscape(parameterToString(r.appId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"alias_label"+"}", url.PathEscape(parameterToString(r.aliasLabel, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"alias_id"+"}", url.PathEscape(parameterToString(r.aliasId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -2604,7 +2434,7 @@ func (a *DefaultApiService) FetchUserIdentityExecute(r ApiFetchUserIdentityReque return localVarReturnValue, localVarHTTPResponse, newErr } if localVarHTTPResponse.StatusCode == 429 { - var v RateLimiterError + var v RateLimitError err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -2627,50 +2457,46 @@ func (a *DefaultApiService) FetchUserIdentityExecute(r ApiFetchUserIdentityReque return localVarReturnValue, localVarHTTPResponse, nil } -type ApiGetAppRequest struct { +type ApiGetAppsRequest struct { ctx context.Context ApiService *DefaultApiService - appId string } -func (r ApiGetAppRequest) Execute() (*App, *http.Response, error) { - return r.ApiService.GetAppExecute(r) +func (r ApiGetAppsRequest) Execute() ([]App, *http.Response, error) { + return r.ApiService.GetAppsExecute(r) } /* -GetApp View an app +GetApps View apps -View the details of a single OneSignal app +View the details of all of your current OneSignal apps @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param appId An app id - @return ApiGetAppRequest + @return ApiGetAppsRequest */ -func (a *DefaultApiService) GetApp(ctx context.Context, appId string) ApiGetAppRequest { - return ApiGetAppRequest{ +func (a *DefaultApiService) GetApps(ctx context.Context) ApiGetAppsRequest { + return ApiGetAppsRequest{ ApiService: a, ctx: ctx, - appId: appId, } } // Execute executes the request -// @return App -func (a *DefaultApiService) GetAppExecute(r ApiGetAppRequest) (*App, *http.Response, error) { +// @return []App +func (a *DefaultApiService) GetAppsExecute(r ApiGetAppsRequest) ([]App, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *App + localVarReturnValue []App ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetApp") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetApps") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/apps/{app_id}" - localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", url.PathEscape(parameterToString(r.appId, "")), -1) + localVarPath := localBasePath + "/apps" localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -2726,7 +2552,7 @@ func (a *DefaultApiService) GetAppExecute(r ApiGetAppRequest) (*App, *http.Respo return localVarReturnValue, localVarHTTPResponse, newErr } if localVarHTTPResponse.StatusCode == 429 { - var v RateLimiterError + var v RateLimitError err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -2749,51 +2575,65 @@ func (a *DefaultApiService) GetAppExecute(r ApiGetAppRequest) (*App, *http.Respo return localVarReturnValue, localVarHTTPResponse, nil } -type ApiGetAppsRequest struct { +type ApiGetNotificationRequest struct { ctx context.Context ApiService *DefaultApiService + appId *string + notificationId string } -func (r ApiGetAppsRequest) Execute() ([]App, *http.Response, error) { - return r.ApiService.GetAppsExecute(r) +func (r ApiGetNotificationRequest) AppId(appId string) ApiGetNotificationRequest { + r.appId = &appId + return r +} + +func (r ApiGetNotificationRequest) Execute() (*NotificationWithMeta, *http.Response, error) { + return r.ApiService.GetNotificationExecute(r) } /* -GetApps View apps +GetNotification View notification -View the details of all of your current OneSignal apps +View the details of a single notification and outcomes associated with it @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetAppsRequest + @param notificationId + @return ApiGetNotificationRequest */ -func (a *DefaultApiService) GetApps(ctx context.Context) ApiGetAppsRequest { - return ApiGetAppsRequest{ +func (a *DefaultApiService) GetNotification(ctx context.Context, notificationId string) ApiGetNotificationRequest { + return ApiGetNotificationRequest{ ApiService: a, ctx: ctx, + notificationId: notificationId, } } // Execute executes the request -// @return []App -func (a *DefaultApiService) GetAppsExecute(r ApiGetAppsRequest) ([]App, *http.Response, error) { +// @return NotificationWithMeta +func (a *DefaultApiService) GetNotificationExecute(r ApiGetNotificationRequest) (*NotificationWithMeta, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue []App + localVarReturnValue *NotificationWithMeta ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetApps") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetNotification") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/apps" + localVarPath := localBasePath + "/notifications/{notification_id}" + localVarPath = strings.Replace(localVarPath, "{"+"notification_id"+"}", url.PathEscape(parameterToString(r.notificationId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} + if r.appId == nil { + return localVarReturnValue, nil, reportError("appId is required and must be specified") + } + localVarQueryParams.Add("app_id", parameterToString(*r.appId, "")) // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -2843,8 +2683,18 @@ func (a *DefaultApiService) GetAppsExecute(r ApiGetAppsRequest) ([]App, *http.Re newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } + if localVarHTTPResponse.StatusCode == 404 { + var v GenericError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } if localVarHTTPResponse.StatusCode == 429 { - var v RateLimiterError + var v RateLimitError err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -2867,61 +2717,66 @@ func (a *DefaultApiService) GetAppsExecute(r ApiGetAppsRequest) ([]App, *http.Re return localVarReturnValue, localVarHTTPResponse, nil } -type ApiGetEligibleIamsRequest struct { +type ApiGetNotificationHistoryRequest struct { ctx context.Context ApiService *DefaultApiService - appId string - subscriptionId string + notificationId string + getNotificationHistoryRequestBody *GetNotificationHistoryRequestBody } -func (r ApiGetEligibleIamsRequest) Execute() (*InlineResponse2003, *http.Response, error) { - return r.ApiService.GetEligibleIamsExecute(r) +func (r ApiGetNotificationHistoryRequest) GetNotificationHistoryRequestBody(getNotificationHistoryRequestBody GetNotificationHistoryRequestBody) ApiGetNotificationHistoryRequest { + r.getNotificationHistoryRequestBody = &getNotificationHistoryRequestBody + return r +} + +func (r ApiGetNotificationHistoryRequest) Execute() (*NotificationHistorySuccessResponse, *http.Response, error) { + return r.ApiService.GetNotificationHistoryExecute(r) } /* -GetEligibleIams Method for GetEligibleIams +GetNotificationHistory Notification History -Manifest of In-App Messages the Subscription is eligible to display by the SDK. +-> 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. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param appId - @param subscriptionId - @return ApiGetEligibleIamsRequest + @param notificationId The \"id\" of the message found in the Notification object + @return ApiGetNotificationHistoryRequest */ -func (a *DefaultApiService) GetEligibleIams(ctx context.Context, appId string, subscriptionId string) ApiGetEligibleIamsRequest { - return ApiGetEligibleIamsRequest{ +func (a *DefaultApiService) GetNotificationHistory(ctx context.Context, notificationId string) ApiGetNotificationHistoryRequest { + return ApiGetNotificationHistoryRequest{ ApiService: a, ctx: ctx, - appId: appId, - subscriptionId: subscriptionId, + notificationId: notificationId, } } // Execute executes the request -// @return InlineResponse2003 -func (a *DefaultApiService) GetEligibleIamsExecute(r ApiGetEligibleIamsRequest) (*InlineResponse2003, *http.Response, error) { +// @return NotificationHistorySuccessResponse +func (a *DefaultApiService) GetNotificationHistoryExecute(r ApiGetNotificationHistoryRequest) (*NotificationHistorySuccessResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet + localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile - localVarReturnValue *InlineResponse2003 + localVarReturnValue *NotificationHistorySuccessResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetEligibleIams") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetNotificationHistory") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/apps/{app_id}/subscriptions/{subscription_id}/iams" - localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", url.PathEscape(parameterToString(r.appId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"subscription_id"+"}", url.PathEscape(parameterToString(r.subscriptionId, "")), -1) + localVarPath := localBasePath + "/notifications/{notification_id}/history" + localVarPath = strings.Replace(localVarPath, "{"+"notification_id"+"}", url.PathEscape(parameterToString(r.notificationId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} + if r.getNotificationHistoryRequestBody == nil { + return localVarReturnValue, nil, reportError("getNotificationHistoryRequestBody is required and must be specified") + } // to determine the Content-Type header - localVarHTTPContentTypes := []string{} + localVarHTTPContentTypes := []string{"application/json"} // set Content-Type header localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) @@ -2937,6 +2792,8 @@ func (a *DefaultApiService) GetEligibleIamsExecute(r ApiGetEligibleIamsRequest) if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } + // body params + localVarPostBody = r.getNotificationHistoryRequestBody req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err @@ -2969,8 +2826,18 @@ func (a *DefaultApiService) GetEligibleIamsExecute(r ApiGetEligibleIamsRequest) newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } + if localVarHTTPResponse.StatusCode == 404 { + var v GenericError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } if localVarHTTPResponse.StatusCode == 429 { - var v RateLimiterError + var v RateLimitError err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -2993,56 +2860,74 @@ func (a *DefaultApiService) GetEligibleIamsExecute(r ApiGetEligibleIamsRequest) return localVarReturnValue, localVarHTTPResponse, nil } -type ApiGetNotificationRequest struct { +type ApiGetNotificationsRequest struct { ctx context.Context ApiService *DefaultApiService appId *string - notificationId string + limit *int32 + offset *int32 + kind *int32 } -func (r ApiGetNotificationRequest) AppId(appId string) ApiGetNotificationRequest { +// The app ID that you want to view notifications from +func (r ApiGetNotificationsRequest) AppId(appId string) ApiGetNotificationsRequest { r.appId = &appId return r } -func (r ApiGetNotificationRequest) Execute() (*NotificationWithMeta, *http.Response, error) { - return r.ApiService.GetNotificationExecute(r) +// How many notifications to return. Max is 50. Default is 50. +func (r ApiGetNotificationsRequest) Limit(limit int32) ApiGetNotificationsRequest { + r.limit = &limit + return r +} + +// Page offset. Default is 0. Results are sorted by queued_at in descending order. queued_at is a representation of the time that the notification was queued at. +func (r ApiGetNotificationsRequest) Offset(offset int32) ApiGetNotificationsRequest { + r.offset = &offset + return r +} + +// Kind of notifications returned: * unset - All notification types (default) * `0` - Dashboard only * `1` - API only * `3` - Automated only +func (r ApiGetNotificationsRequest) Kind(kind int32) ApiGetNotificationsRequest { + r.kind = &kind + return r +} + +func (r ApiGetNotificationsRequest) Execute() (*NotificationSlice, *http.Response, error) { + return r.ApiService.GetNotificationsExecute(r) } /* -GetNotification View notification +GetNotifications View notifications -View the details of a single notification and outcomes associated with it +View the details of multiple notifications @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param notificationId - @return ApiGetNotificationRequest + @return ApiGetNotificationsRequest */ -func (a *DefaultApiService) GetNotification(ctx context.Context, notificationId string) ApiGetNotificationRequest { - return ApiGetNotificationRequest{ +func (a *DefaultApiService) GetNotifications(ctx context.Context) ApiGetNotificationsRequest { + return ApiGetNotificationsRequest{ ApiService: a, ctx: ctx, - notificationId: notificationId, } } // Execute executes the request -// @return NotificationWithMeta -func (a *DefaultApiService) GetNotificationExecute(r ApiGetNotificationRequest) (*NotificationWithMeta, *http.Response, error) { +// @return NotificationSlice +func (a *DefaultApiService) GetNotificationsExecute(r ApiGetNotificationsRequest) (*NotificationSlice, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *NotificationWithMeta + localVarReturnValue *NotificationSlice ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetNotification") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetNotifications") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/notifications/{notification_id}" - localVarPath = strings.Replace(localVarPath, "{"+"notification_id"+"}", url.PathEscape(parameterToString(r.notificationId, "")), -1) + localVarPath := localBasePath + "/notifications" localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -3052,6 +2937,15 @@ func (a *DefaultApiService) GetNotificationExecute(r ApiGetNotificationRequest) } localVarQueryParams.Add("app_id", parameterToString(*r.appId, "")) + if r.limit != nil { + localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) + } + if r.offset != nil { + localVarQueryParams.Add("offset", parameterToString(*r.offset, "")) + } + if r.kind != nil { + localVarQueryParams.Add("kind", parameterToString(*r.kind, "")) + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -3102,7 +2996,7 @@ func (a *DefaultApiService) GetNotificationExecute(r ApiGetNotificationRequest) return localVarReturnValue, localVarHTTPResponse, newErr } if localVarHTTPResponse.StatusCode == 429 { - var v RateLimiterError + var v RateLimitError err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -3125,224 +3019,114 @@ func (a *DefaultApiService) GetNotificationExecute(r ApiGetNotificationRequest) return localVarReturnValue, localVarHTTPResponse, nil } -type ApiGetNotificationHistoryRequest struct { +type ApiGetOutcomesRequest struct { ctx context.Context ApiService *DefaultApiService - notificationId string - getNotificationRequestBody *GetNotificationRequestBody + appId string + outcomeNames *string + outcomeNames2 *string + outcomeTimeRange *string + outcomePlatforms *string + outcomeAttribution *string } -func (r ApiGetNotificationHistoryRequest) GetNotificationRequestBody(getNotificationRequestBody GetNotificationRequestBody) ApiGetNotificationHistoryRequest { - r.getNotificationRequestBody = &getNotificationRequestBody +// Required Comma-separated list of names and the value (sum/count) for the returned outcome data. Note: Clicks only support count aggregation. For out-of-the-box OneSignal outcomes such as click and session duration, please use the \"os\" prefix with two underscores. For other outcomes, please use the name specified by the user. Example:os__session_duration.count,os__click.count,CustomOutcomeName.sum +func (r ApiGetOutcomesRequest) OutcomeNames(outcomeNames string) ApiGetOutcomesRequest { + r.outcomeNames = &outcomeNames return r } -func (r ApiGetNotificationHistoryRequest) Execute() (*NotificationHistorySuccessResponse, *http.Response, error) { - return r.ApiService.GetNotificationHistoryExecute(r) -} - -/* -GetNotificationHistory Notification History - --> 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. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param notificationId The \"id\" of the message found in the Notification object - @return ApiGetNotificationHistoryRequest -*/ -func (a *DefaultApiService) GetNotificationHistory(ctx context.Context, notificationId string) ApiGetNotificationHistoryRequest { - return ApiGetNotificationHistoryRequest{ - ApiService: a, - ctx: ctx, - notificationId: notificationId, - } -} - -// Execute executes the request -// @return NotificationHistorySuccessResponse -func (a *DefaultApiService) GetNotificationHistoryExecute(r ApiGetNotificationHistoryRequest) (*NotificationHistorySuccessResponse, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *NotificationHistorySuccessResponse - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetNotificationHistory") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/notifications/{notification_id}/history" - localVarPath = strings.Replace(localVarPath, "{"+"notification_id"+"}", url.PathEscape(parameterToString(r.notificationId, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.getNotificationRequestBody == nil { - return localVarReturnValue, nil, reportError("getNotificationRequestBody is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.getNotificationRequestBody - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v GenericError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v RateLimiterError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetNotificationsRequest struct { - ctx context.Context - ApiService *DefaultApiService - appId *string - limit *int32 - offset *int32 - kind *int32 -} - -// The app ID that you want to view notifications from -func (r ApiGetNotificationsRequest) AppId(appId string) ApiGetNotificationsRequest { - r.appId = &appId +// Optional If outcome names contain any commas, then please specify only one value at a time. Example: outcome_names[]=os__click.count&outcome_names[]=Sales, Purchase.count where \"Sales, Purchase\" is the custom outcomes with a comma in the name. +func (r ApiGetOutcomesRequest) OutcomeNames2(outcomeNames2 string) ApiGetOutcomesRequest { + r.outcomeNames2 = &outcomeNames2 return r } -// How many notifications to return. Max is 50. Default is 50. -func (r ApiGetNotificationsRequest) Limit(limit int32) ApiGetNotificationsRequest { - r.limit = &limit +// Optional Time range for the returned data. The values can be 1h (for the last 1 hour data), 1d (for the last 1 day data), or 1mo (for the last 1 month data). Default is 1h if the parameter is omitted. +func (r ApiGetOutcomesRequest) OutcomeTimeRange(outcomeTimeRange string) ApiGetOutcomesRequest { + r.outcomeTimeRange = &outcomeTimeRange return r } -// Page offset. Default is 0. Results are sorted by queued_at in descending order. queued_at is a representation of the time that the notification was queued at. -func (r ApiGetNotificationsRequest) Offset(offset int32) ApiGetNotificationsRequest { - r.offset = &offset +// Optional Platform id. Refer device's platform ids for values. Example: outcome_platform=0 for iOS outcome_platform=7,8 for Safari and Firefox Default is data from all platforms if the parameter is omitted. +func (r ApiGetOutcomesRequest) OutcomePlatforms(outcomePlatforms string) ApiGetOutcomesRequest { + r.outcomePlatforms = &outcomePlatforms return r } -// Kind of notifications returned: * unset - All notification types (default) * `0` - Dashboard only * `1` - API only * `3` - Automated only -func (r ApiGetNotificationsRequest) Kind(kind int32) ApiGetNotificationsRequest { - r.kind = &kind +// Optional Attribution type for the outcomes. The values can be direct or influenced or unattributed. Example: outcome_attribution=direct Default is total (returns direct+influenced+unattributed) if the parameter is omitted. +func (r ApiGetOutcomesRequest) OutcomeAttribution(outcomeAttribution string) ApiGetOutcomesRequest { + r.outcomeAttribution = &outcomeAttribution return r } -func (r ApiGetNotificationsRequest) Execute() (*NotificationSlice, *http.Response, error) { - return r.ApiService.GetNotificationsExecute(r) +func (r ApiGetOutcomesRequest) Execute() (*OutcomesData, *http.Response, error) { + return r.ApiService.GetOutcomesExecute(r) } /* -GetNotifications View notifications +GetOutcomes View Outcomes + +View the details of all the outcomes associated with your app + +🚧 +Requires Authentication Key +Requires your OneSignal App's REST API Key, available in Keys & IDs. + +🚧 +Outcome Data Limitations +Outcomes are only accessible for around 30 days before deleted from our servers. You will need to export this data every month if you want to keep it. -View the details of multiple notifications @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetNotificationsRequest + @param appId The OneSignal App ID for your app. Available in Keys & IDs. + @return ApiGetOutcomesRequest */ -func (a *DefaultApiService) GetNotifications(ctx context.Context) ApiGetNotificationsRequest { - return ApiGetNotificationsRequest{ +func (a *DefaultApiService) GetOutcomes(ctx context.Context, appId string) ApiGetOutcomesRequest { + return ApiGetOutcomesRequest{ ApiService: a, ctx: ctx, + appId: appId, } } // Execute executes the request -// @return NotificationSlice -func (a *DefaultApiService) GetNotificationsExecute(r ApiGetNotificationsRequest) (*NotificationSlice, *http.Response, error) { +// @return OutcomesData +func (a *DefaultApiService) GetOutcomesExecute(r ApiGetOutcomesRequest) (*OutcomesData, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *NotificationSlice + localVarReturnValue *OutcomesData ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetNotifications") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetOutcomes") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/notifications" + localVarPath := localBasePath + "/apps/{app_id}/outcomes" + localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", url.PathEscape(parameterToString(r.appId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} - if r.appId == nil { - return localVarReturnValue, nil, reportError("appId is required and must be specified") + if r.outcomeNames == nil { + return localVarReturnValue, nil, reportError("outcomeNames is required and must be specified") } - localVarQueryParams.Add("app_id", parameterToString(*r.appId, "")) - if r.limit != nil { - localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) + localVarQueryParams.Add("outcome_names", parameterToString(*r.outcomeNames, "")) + if r.outcomeNames2 != nil { + localVarQueryParams.Add("outcome_names[]", parameterToString(*r.outcomeNames2, "")) } - if r.offset != nil { - localVarQueryParams.Add("offset", parameterToString(*r.offset, "")) + if r.outcomeTimeRange != nil { + localVarQueryParams.Add("outcome_time_range", parameterToString(*r.outcomeTimeRange, "")) } - if r.kind != nil { - localVarQueryParams.Add("kind", parameterToString(*r.kind, "")) + if r.outcomePlatforms != nil { + localVarQueryParams.Add("outcome_platforms", parameterToString(*r.outcomePlatforms, "")) + } + if r.outcomeAttribution != nil { + localVarQueryParams.Add("outcome_attribution", parameterToString(*r.outcomeAttribution, "")) } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -3380,638 +3164,10 @@ func (a *DefaultApiService) GetNotificationsExecute(r ApiGetNotificationsRequest if localVarHTTPResponse.StatusCode >= 300 { newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v GenericError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v RateLimiterError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetOutcomesRequest struct { - ctx context.Context - ApiService *DefaultApiService - appId string - outcomeNames *string - outcomeNames2 *string - outcomeTimeRange *string - outcomePlatforms *string - outcomeAttribution *string -} - -// Required Comma-separated list of names and the value (sum/count) for the returned outcome data. Note: Clicks only support count aggregation. For out-of-the-box OneSignal outcomes such as click and session duration, please use the \"os\" prefix with two underscores. For other outcomes, please use the name specified by the user. Example:os__session_duration.count,os__click.count,CustomOutcomeName.sum -func (r ApiGetOutcomesRequest) OutcomeNames(outcomeNames string) ApiGetOutcomesRequest { - r.outcomeNames = &outcomeNames - return r -} - -// Optional If outcome names contain any commas, then please specify only one value at a time. Example: outcome_names[]=os__click.count&outcome_names[]=Sales, Purchase.count where \"Sales, Purchase\" is the custom outcomes with a comma in the name. -func (r ApiGetOutcomesRequest) OutcomeNames2(outcomeNames2 string) ApiGetOutcomesRequest { - r.outcomeNames2 = &outcomeNames2 - return r -} - -// Optional Time range for the returned data. The values can be 1h (for the last 1 hour data), 1d (for the last 1 day data), or 1mo (for the last 1 month data). Default is 1h if the parameter is omitted. -func (r ApiGetOutcomesRequest) OutcomeTimeRange(outcomeTimeRange string) ApiGetOutcomesRequest { - r.outcomeTimeRange = &outcomeTimeRange - return r -} - -// Optional Platform id. Refer device's platform ids for values. Example: outcome_platform=0 for iOS outcome_platform=7,8 for Safari and Firefox Default is data from all platforms if the parameter is omitted. -func (r ApiGetOutcomesRequest) OutcomePlatforms(outcomePlatforms string) ApiGetOutcomesRequest { - r.outcomePlatforms = &outcomePlatforms - return r -} - -// Optional Attribution type for the outcomes. The values can be direct or influenced or unattributed. Example: outcome_attribution=direct Default is total (returns direct+influenced+unattributed) if the parameter is omitted. -func (r ApiGetOutcomesRequest) OutcomeAttribution(outcomeAttribution string) ApiGetOutcomesRequest { - r.outcomeAttribution = &outcomeAttribution - return r -} - -func (r ApiGetOutcomesRequest) Execute() (*OutcomesData, *http.Response, error) { - return r.ApiService.GetOutcomesExecute(r) -} - -/* -GetOutcomes View Outcomes - -View the details of all the outcomes associated with your app - -🚧 -Requires Authentication Key -Requires your OneSignal App's REST API Key, available in Keys & IDs. - -🚧 -Outcome Data Limitations -Outcomes are only accessible for around 30 days before deleted from our servers. You will need to export this data every month if you want to keep it. - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param appId The OneSignal App ID for your app. Available in Keys & IDs. - @return ApiGetOutcomesRequest -*/ -func (a *DefaultApiService) GetOutcomes(ctx context.Context, appId string) ApiGetOutcomesRequest { - return ApiGetOutcomesRequest{ - ApiService: a, - ctx: ctx, - appId: appId, - } -} - -// Execute executes the request -// @return OutcomesData -func (a *DefaultApiService) GetOutcomesExecute(r ApiGetOutcomesRequest) (*OutcomesData, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *OutcomesData - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetOutcomes") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/apps/{app_id}/outcomes" - localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", url.PathEscape(parameterToString(r.appId, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.outcomeNames == nil { - return localVarReturnValue, nil, reportError("outcomeNames is required and must be specified") - } - - localVarQueryParams.Add("outcome_names", parameterToString(*r.outcomeNames, "")) - if r.outcomeNames2 != nil { - localVarQueryParams.Add("outcome_names[]", parameterToString(*r.outcomeNames2, "")) - } - if r.outcomeTimeRange != nil { - localVarQueryParams.Add("outcome_time_range", parameterToString(*r.outcomeTimeRange, "")) - } - if r.outcomePlatforms != nil { - localVarQueryParams.Add("outcome_platforms", parameterToString(*r.outcomePlatforms, "")) - } - if r.outcomeAttribution != nil { - localVarQueryParams.Add("outcome_attribution", parameterToString(*r.outcomeAttribution, "")) - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v GenericError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v RateLimiterError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetPlayerRequest struct { - ctx context.Context - ApiService *DefaultApiService - appId *string - playerId string - emailAuthHash *string -} - -// Your app_id for this device -func (r ApiGetPlayerRequest) AppId(appId string) ApiGetPlayerRequest { - r.appId = &appId - return r -} - -// Email - Only required if you have enabled Identity Verification and device_type is email (11). -func (r ApiGetPlayerRequest) EmailAuthHash(emailAuthHash string) ApiGetPlayerRequest { - r.emailAuthHash = &emailAuthHash - return r -} - -func (r ApiGetPlayerRequest) Execute() (*Player, *http.Response, error) { - return r.ApiService.GetPlayerExecute(r) -} - -/* -GetPlayer View device - -View the details of an existing device in one of your OneSignal apps - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param playerId Player's OneSignal ID - @return ApiGetPlayerRequest -*/ -func (a *DefaultApiService) GetPlayer(ctx context.Context, playerId string) ApiGetPlayerRequest { - return ApiGetPlayerRequest{ - ApiService: a, - ctx: ctx, - playerId: playerId, - } -} - -// Execute executes the request -// @return Player -func (a *DefaultApiService) GetPlayerExecute(r ApiGetPlayerRequest) (*Player, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Player - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetPlayer") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/players/{player_id}" - localVarPath = strings.Replace(localVarPath, "{"+"player_id"+"}", url.PathEscape(parameterToString(r.playerId, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.appId == nil { - return localVarReturnValue, nil, reportError("appId is required and must be specified") - } - - localVarQueryParams.Add("app_id", parameterToString(*r.appId, "")) - if r.emailAuthHash != nil { - localVarQueryParams.Add("email_auth_hash", parameterToString(*r.emailAuthHash, "")) - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v GenericError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v RateLimiterError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetPlayersRequest struct { - ctx context.Context - ApiService *DefaultApiService - appId *string - limit *int32 - offset *int32 -} - -// The app ID that you want to view players from -func (r ApiGetPlayersRequest) AppId(appId string) ApiGetPlayersRequest { - r.appId = &appId - return r -} - -// How many devices to return. Max is 300. Default is 300 -func (r ApiGetPlayersRequest) Limit(limit int32) ApiGetPlayersRequest { - r.limit = &limit - return r -} - -// Result offset. Default is 0. Results are sorted by id; -func (r ApiGetPlayersRequest) Offset(offset int32) ApiGetPlayersRequest { - r.offset = &offset - return r -} - -func (r ApiGetPlayersRequest) Execute() (*PlayerSlice, *http.Response, error) { - return r.ApiService.GetPlayersExecute(r) -} - -/* -GetPlayers View devices - -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. - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetPlayersRequest -*/ -func (a *DefaultApiService) GetPlayers(ctx context.Context) ApiGetPlayersRequest { - return ApiGetPlayersRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return PlayerSlice -func (a *DefaultApiService) GetPlayersExecute(r ApiGetPlayersRequest) (*PlayerSlice, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *PlayerSlice - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetPlayers") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/players" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.appId == nil { - return localVarReturnValue, nil, reportError("appId is required and must be specified") - } - - localVarQueryParams.Add("app_id", parameterToString(*r.appId, "")) - if r.limit != nil { - localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) - } - if r.offset != nil { - localVarQueryParams.Add("offset", parameterToString(*r.offset, "")) - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v GenericError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v RateLimiterError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiIdentifyUserByAliasRequest struct { - ctx context.Context - ApiService *DefaultApiService - appId string - aliasLabel string - aliasId string - userIdentityRequestBody *UserIdentityRequestBody -} - -func (r ApiIdentifyUserByAliasRequest) UserIdentityRequestBody(userIdentityRequestBody UserIdentityRequestBody) ApiIdentifyUserByAliasRequest { - r.userIdentityRequestBody = &userIdentityRequestBody - return r -} - -func (r ApiIdentifyUserByAliasRequest) Execute() (*InlineResponse200, *http.Response, error) { - return r.ApiService.IdentifyUserByAliasExecute(r) -} - -/* -IdentifyUserByAlias Method for IdentifyUserByAlias - -Upserts one or more Aliases to an existing User identified by (:alias_label, :alias_id). - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param appId - @param aliasLabel - @param aliasId - @return ApiIdentifyUserByAliasRequest -*/ -func (a *DefaultApiService) IdentifyUserByAlias(ctx context.Context, appId string, aliasLabel string, aliasId string) ApiIdentifyUserByAliasRequest { - return ApiIdentifyUserByAliasRequest{ - ApiService: a, - ctx: ctx, - appId: appId, - aliasLabel: aliasLabel, - aliasId: aliasId, - } -} - -// Execute executes the request -// @return InlineResponse200 -func (a *DefaultApiService) IdentifyUserByAliasExecute(r ApiIdentifyUserByAliasRequest) (*InlineResponse200, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *InlineResponse200 - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.IdentifyUserByAlias") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/apps/{app_id}/users/by/{alias_label}/{alias_id}/identity" - localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", url.PathEscape(parameterToString(r.appId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"alias_label"+"}", url.PathEscape(parameterToString(r.aliasLabel, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"alias_id"+"}", url.PathEscape(parameterToString(r.aliasId, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.userIdentityRequestBody == nil { - return localVarReturnValue, nil, reportError("userIdentityRequestBody is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.userIdentityRequestBody - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v GenericError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr + body: localVarBody, + error: localVarHTTPResponse.Status, } - if localVarHTTPResponse.StatusCode == 409 { + if localVarHTTPResponse.StatusCode == 400 { var v GenericError err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { @@ -4022,7 +3178,7 @@ func (a *DefaultApiService) IdentifyUserByAliasExecute(r ApiIdentifyUserByAliasR return localVarReturnValue, localVarHTTPResponse, newErr } if localVarHTTPResponse.StatusCode == 429 { - var v RateLimiterError + var v RateLimitError err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -4045,70 +3201,77 @@ func (a *DefaultApiService) IdentifyUserByAliasExecute(r ApiIdentifyUserByAliasR return localVarReturnValue, localVarHTTPResponse, nil } -type ApiIdentifyUserBySubscriptionIdRequest struct { +type ApiGetSegmentsRequest struct { ctx context.Context ApiService *DefaultApiService appId string - subscriptionId string - userIdentityRequestBody *UserIdentityRequestBody + offset *int32 + limit *int32 +} + +// 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. +func (r ApiGetSegmentsRequest) Offset(offset int32) ApiGetSegmentsRequest { + r.offset = &offset + return r } -func (r ApiIdentifyUserBySubscriptionIdRequest) UserIdentityRequestBody(userIdentityRequestBody UserIdentityRequestBody) ApiIdentifyUserBySubscriptionIdRequest { - r.userIdentityRequestBody = &userIdentityRequestBody +// The amount of Segments in the response. Maximum 300. +func (r ApiGetSegmentsRequest) Limit(limit int32) ApiGetSegmentsRequest { + r.limit = &limit return r } -func (r ApiIdentifyUserBySubscriptionIdRequest) Execute() (*UserIdentityResponse, *http.Response, error) { - return r.ApiService.IdentifyUserBySubscriptionIdExecute(r) +func (r ApiGetSegmentsRequest) Execute() (*GetSegmentsSuccessResponse, *http.Response, error) { + return r.ApiService.GetSegmentsExecute(r) } /* -IdentifyUserBySubscriptionId Method for IdentifyUserBySubscriptionId +GetSegments Get Segments -Upserts one or more Aliases for the User identified by :subscription_id. +Returns an array of segments from an app. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param appId - @param subscriptionId - @return ApiIdentifyUserBySubscriptionIdRequest + @param appId The OneSignal App ID for your app. Available in Keys & IDs. + @return ApiGetSegmentsRequest */ -func (a *DefaultApiService) IdentifyUserBySubscriptionId(ctx context.Context, appId string, subscriptionId string) ApiIdentifyUserBySubscriptionIdRequest { - return ApiIdentifyUserBySubscriptionIdRequest{ +func (a *DefaultApiService) GetSegments(ctx context.Context, appId string) ApiGetSegmentsRequest { + return ApiGetSegmentsRequest{ ApiService: a, ctx: ctx, appId: appId, - subscriptionId: subscriptionId, } } // Execute executes the request -// @return UserIdentityResponse -func (a *DefaultApiService) IdentifyUserBySubscriptionIdExecute(r ApiIdentifyUserBySubscriptionIdRequest) (*UserIdentityResponse, *http.Response, error) { +// @return GetSegmentsSuccessResponse +func (a *DefaultApiService) GetSegmentsExecute(r ApiGetSegmentsRequest) (*GetSegmentsSuccessResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPatch + localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *UserIdentityResponse + localVarReturnValue *GetSegmentsSuccessResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.IdentifyUserBySubscriptionId") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetSegments") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/apps/{app_id}/subscriptions/{subscription_id}/user/identity" + localVarPath := localBasePath + "/apps/{app_id}/segments" localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", url.PathEscape(parameterToString(r.appId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"subscription_id"+"}", url.PathEscape(parameterToString(r.subscriptionId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} - if r.userIdentityRequestBody == nil { - return localVarReturnValue, nil, reportError("userIdentityRequestBody is required and must be specified") - } + if r.offset != nil { + localVarQueryParams.Add("offset", parameterToString(*r.offset, "")) + } + if r.limit != nil { + localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) + } // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} + localVarHTTPContentTypes := []string{} // set Content-Type header localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) @@ -4124,8 +3287,6 @@ func (a *DefaultApiService) IdentifyUserBySubscriptionIdExecute(r ApiIdentifyUse if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - // body params - localVarPostBody = r.userIdentityRequestBody req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err @@ -4158,18 +3319,8 @@ func (a *DefaultApiService) IdentifyUserBySubscriptionIdExecute(r ApiIdentifyUse newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } - if localVarHTTPResponse.StatusCode == 409 { - var v GenericError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } if localVarHTTPResponse.StatusCode == 429 { - var v RateLimiterError + var v RateLimitError err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -4192,70 +3343,65 @@ func (a *DefaultApiService) IdentifyUserBySubscriptionIdExecute(r ApiIdentifyUse return localVarReturnValue, localVarHTTPResponse, nil } -type ApiTransferSubscriptionRequest struct { +type ApiGetUserRequest struct { ctx context.Context ApiService *DefaultApiService appId string - subscriptionId string - transferSubscriptionRequestBody *TransferSubscriptionRequestBody -} - -func (r ApiTransferSubscriptionRequest) TransferSubscriptionRequestBody(transferSubscriptionRequestBody TransferSubscriptionRequestBody) ApiTransferSubscriptionRequest { - r.transferSubscriptionRequestBody = &transferSubscriptionRequestBody - return r + aliasLabel string + aliasId string } -func (r ApiTransferSubscriptionRequest) Execute() (*UserIdentityResponse, *http.Response, error) { - return r.ApiService.TransferSubscriptionExecute(r) +func (r ApiGetUserRequest) Execute() (*User, *http.Response, error) { + return r.ApiService.GetUserExecute(r) } /* -TransferSubscription Method for TransferSubscription +GetUser Method for GetUser -Transfers this Subscription to the User identified by the identity in the payload. +Returns the User’s properties, Aliases, and Subscriptions. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param appId - @param subscriptionId - @return ApiTransferSubscriptionRequest + @param aliasLabel + @param aliasId + @return ApiGetUserRequest */ -func (a *DefaultApiService) TransferSubscription(ctx context.Context, appId string, subscriptionId string) ApiTransferSubscriptionRequest { - return ApiTransferSubscriptionRequest{ +func (a *DefaultApiService) GetUser(ctx context.Context, appId string, aliasLabel string, aliasId string) ApiGetUserRequest { + return ApiGetUserRequest{ ApiService: a, ctx: ctx, appId: appId, - subscriptionId: subscriptionId, + aliasLabel: aliasLabel, + aliasId: aliasId, } } // Execute executes the request -// @return UserIdentityResponse -func (a *DefaultApiService) TransferSubscriptionExecute(r ApiTransferSubscriptionRequest) (*UserIdentityResponse, *http.Response, error) { +// @return User +func (a *DefaultApiService) GetUserExecute(r ApiGetUserRequest) (*User, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPatch + localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *UserIdentityResponse + localVarReturnValue *User ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.TransferSubscription") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetUser") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/apps/{app_id}/subscriptions/{subscription_id}/owner" + localVarPath := localBasePath + "/apps/{app_id}/users/by/{alias_label}/{alias_id}" localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", url.PathEscape(parameterToString(r.appId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"subscription_id"+"}", url.PathEscape(parameterToString(r.subscriptionId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"alias_label"+"}", url.PathEscape(parameterToString(r.aliasLabel, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"alias_id"+"}", url.PathEscape(parameterToString(r.aliasId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} - if r.transferSubscriptionRequestBody == nil { - return localVarReturnValue, nil, reportError("transferSubscriptionRequestBody is required and must be specified") - } // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} + localVarHTTPContentTypes := []string{} // set Content-Type header localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) @@ -4271,8 +3417,6 @@ func (a *DefaultApiService) TransferSubscriptionExecute(r ApiTransferSubscriptio if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - // body params - localVarPostBody = r.transferSubscriptionRequestBody req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err @@ -4305,7 +3449,7 @@ func (a *DefaultApiService) TransferSubscriptionExecute(r ApiTransferSubscriptio newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } - if localVarHTTPResponse.StatusCode == 409 { + if localVarHTTPResponse.StatusCode == 404 { var v GenericError err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { @@ -4316,7 +3460,7 @@ func (a *DefaultApiService) TransferSubscriptionExecute(r ApiTransferSubscriptio return localVarReturnValue, localVarHTTPResponse, newErr } if localVarHTTPResponse.StatusCode == 429 { - var v RateLimiterError + var v RateLimitError err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -4339,62 +3483,66 @@ func (a *DefaultApiService) TransferSubscriptionExecute(r ApiTransferSubscriptio return localVarReturnValue, localVarHTTPResponse, nil } -type ApiUpdateAppRequest struct { +type ApiTransferSubscriptionRequest struct { ctx context.Context ApiService *DefaultApiService appId string - app *App + subscriptionId string + transferSubscriptionRequestBody *TransferSubscriptionRequestBody } -func (r ApiUpdateAppRequest) App(app App) ApiUpdateAppRequest { - r.app = &app +func (r ApiTransferSubscriptionRequest) TransferSubscriptionRequestBody(transferSubscriptionRequestBody TransferSubscriptionRequestBody) ApiTransferSubscriptionRequest { + r.transferSubscriptionRequestBody = &transferSubscriptionRequestBody return r } -func (r ApiUpdateAppRequest) Execute() (*App, *http.Response, error) { - return r.ApiService.UpdateAppExecute(r) +func (r ApiTransferSubscriptionRequest) Execute() (*UserIdentityBody, *http.Response, error) { + return r.ApiService.TransferSubscriptionExecute(r) } /* -UpdateApp Update an app +TransferSubscription Method for TransferSubscription -Updates the name or configuration settings of an existing OneSignal app +Transfers this Subscription to the User identified by the identity in the payload. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param appId An app id - @return ApiUpdateAppRequest + @param appId + @param subscriptionId + @return ApiTransferSubscriptionRequest */ -func (a *DefaultApiService) UpdateApp(ctx context.Context, appId string) ApiUpdateAppRequest { - return ApiUpdateAppRequest{ +func (a *DefaultApiService) TransferSubscription(ctx context.Context, appId string, subscriptionId string) ApiTransferSubscriptionRequest { + return ApiTransferSubscriptionRequest{ ApiService: a, ctx: ctx, appId: appId, + subscriptionId: subscriptionId, } } // Execute executes the request -// @return App -func (a *DefaultApiService) UpdateAppExecute(r ApiUpdateAppRequest) (*App, *http.Response, error) { +// @return UserIdentityBody +func (a *DefaultApiService) TransferSubscriptionExecute(r ApiTransferSubscriptionRequest) (*UserIdentityBody, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPut + localVarHTTPMethod = http.MethodPatch localVarPostBody interface{} formFiles []formFile - localVarReturnValue *App + localVarReturnValue *UserIdentityBody ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.UpdateApp") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.TransferSubscription") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/apps/{app_id}" + localVarPath := localBasePath + "/apps/{app_id}/subscriptions/{subscription_id}/owner" localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", url.PathEscape(parameterToString(r.appId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"subscription_id"+"}", url.PathEscape(parameterToString(r.subscriptionId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} - if r.app == nil { - return localVarReturnValue, nil, reportError("app is required and must be specified") + if r.transferSubscriptionRequestBody == nil { + return localVarReturnValue, nil, reportError("transferSubscriptionRequestBody is required and must be specified") } // to determine the Content-Type header @@ -4415,7 +3563,7 @@ func (a *DefaultApiService) UpdateAppExecute(r ApiUpdateAppRequest) (*App, *http localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = r.app + localVarPostBody = r.transferSubscriptionRequestBody req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err @@ -4448,8 +3596,28 @@ func (a *DefaultApiService) UpdateAppExecute(r ApiUpdateAppRequest) (*App, *http newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } + if localVarHTTPResponse.StatusCode == 404 { + var v GenericError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v GenericError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } if localVarHTTPResponse.StatusCode == 429 { - var v RateLimiterError + var v RateLimitError err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -4472,70 +3640,72 @@ func (a *DefaultApiService) UpdateAppExecute(r ApiUpdateAppRequest) (*App, *http return localVarReturnValue, localVarHTTPResponse, nil } -type ApiUpdateLiveActivityRequest struct { +type ApiUnsubscribeEmailWithTokenRequest struct { ctx context.Context ApiService *DefaultApiService appId string - activityId string - updateLiveActivityRequest *UpdateLiveActivityRequest + notificationId string + token *string } -func (r ApiUpdateLiveActivityRequest) UpdateLiveActivityRequest(updateLiveActivityRequest UpdateLiveActivityRequest) ApiUpdateLiveActivityRequest { - r.updateLiveActivityRequest = &updateLiveActivityRequest +// The unsubscribe token that is generated via liquid syntax in {{subscription.unsubscribe_token}} when personalizing an email. +func (r ApiUnsubscribeEmailWithTokenRequest) Token(token string) ApiUnsubscribeEmailWithTokenRequest { + r.token = &token return r } -func (r ApiUpdateLiveActivityRequest) Execute() (*UpdateLiveActivitySuccessResponse, *http.Response, error) { - return r.ApiService.UpdateLiveActivityExecute(r) +func (r ApiUnsubscribeEmailWithTokenRequest) Execute() (*GenericSuccessBoolResponse, *http.Response, error) { + return r.ApiService.UnsubscribeEmailWithTokenExecute(r) } /* -UpdateLiveActivity Update a Live Activity via Push +UnsubscribeEmailWithToken Unsubscribe with token -Updates a specified live activity. +Unsubscribe an email with a token when using your own custom email unsubscribe landing page @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param appId The OneSignal App ID for your app. Available in Keys & IDs. - @param activityId Live Activity record ID - @return ApiUpdateLiveActivityRequest + @param notificationId The id of the message found in the creation notification POST response, View Notifications GET response, or URL within the Message Report. + @return ApiUnsubscribeEmailWithTokenRequest */ -func (a *DefaultApiService) UpdateLiveActivity(ctx context.Context, appId string, activityId string) ApiUpdateLiveActivityRequest { - return ApiUpdateLiveActivityRequest{ +func (a *DefaultApiService) UnsubscribeEmailWithToken(ctx context.Context, appId string, notificationId string) ApiUnsubscribeEmailWithTokenRequest { + return ApiUnsubscribeEmailWithTokenRequest{ ApiService: a, ctx: ctx, appId: appId, - activityId: activityId, + notificationId: notificationId, } } // Execute executes the request -// @return UpdateLiveActivitySuccessResponse -func (a *DefaultApiService) UpdateLiveActivityExecute(r ApiUpdateLiveActivityRequest) (*UpdateLiveActivitySuccessResponse, *http.Response, error) { +// @return GenericSuccessBoolResponse +func (a *DefaultApiService) UnsubscribeEmailWithTokenExecute(r ApiUnsubscribeEmailWithTokenRequest) (*GenericSuccessBoolResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile - localVarReturnValue *UpdateLiveActivitySuccessResponse + localVarReturnValue *GenericSuccessBoolResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.UpdateLiveActivity") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.UnsubscribeEmailWithToken") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/apps/{app_id}/live_activities/{activity_id}/notifications" + localVarPath := localBasePath + "/apps/{app_id}/notifications/{notification_id}/unsubscribe" localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", url.PathEscape(parameterToString(r.appId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"activity_id"+"}", url.PathEscape(parameterToString(r.activityId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"notification_id"+"}", url.PathEscape(parameterToString(r.notificationId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} - if r.updateLiveActivityRequest == nil { - return localVarReturnValue, nil, reportError("updateLiveActivityRequest is required and must be specified") + if r.token == nil { + return localVarReturnValue, nil, reportError("token is required and must be specified") } + localVarQueryParams.Add("token", parameterToString(*r.token, "")) // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} + localVarHTTPContentTypes := []string{} // set Content-Type header localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) @@ -4551,8 +3721,6 @@ func (a *DefaultApiService) UpdateLiveActivityExecute(r ApiUpdateLiveActivityReq if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - // body params - localVarPostBody = r.updateLiveActivityRequest req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err @@ -4586,7 +3754,7 @@ func (a *DefaultApiService) UpdateLiveActivityExecute(r ApiUpdateLiveActivityReq return localVarReturnValue, localVarHTTPResponse, newErr } if localVarHTTPResponse.StatusCode == 429 { - var v RateLimiterError + var v RateLimitError err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -4609,62 +3777,62 @@ func (a *DefaultApiService) UpdateLiveActivityExecute(r ApiUpdateLiveActivityReq return localVarReturnValue, localVarHTTPResponse, nil } -type ApiUpdatePlayerRequest struct { +type ApiUpdateAppRequest struct { ctx context.Context ApiService *DefaultApiService - playerId string - player *Player + appId string + app *App } -func (r ApiUpdatePlayerRequest) Player(player Player) ApiUpdatePlayerRequest { - r.player = &player +func (r ApiUpdateAppRequest) App(app App) ApiUpdateAppRequest { + r.app = &app return r } -func (r ApiUpdatePlayerRequest) Execute() (*UpdatePlayerSuccessResponse, *http.Response, error) { - return r.ApiService.UpdatePlayerExecute(r) +func (r ApiUpdateAppRequest) Execute() (*App, *http.Response, error) { + return r.ApiService.UpdateAppExecute(r) } /* -UpdatePlayer Edit device +UpdateApp Update an app -Update an existing device in one of your OneSignal apps +Updates the name or configuration settings of an existing OneSignal app @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param playerId Player's OneSignal ID - @return ApiUpdatePlayerRequest + @param appId An app id + @return ApiUpdateAppRequest */ -func (a *DefaultApiService) UpdatePlayer(ctx context.Context, playerId string) ApiUpdatePlayerRequest { - return ApiUpdatePlayerRequest{ +func (a *DefaultApiService) UpdateApp(ctx context.Context, appId string) ApiUpdateAppRequest { + return ApiUpdateAppRequest{ ApiService: a, ctx: ctx, - playerId: playerId, + appId: appId, } } // Execute executes the request -// @return UpdatePlayerSuccessResponse -func (a *DefaultApiService) UpdatePlayerExecute(r ApiUpdatePlayerRequest) (*UpdatePlayerSuccessResponse, *http.Response, error) { +// @return App +func (a *DefaultApiService) UpdateAppExecute(r ApiUpdateAppRequest) (*App, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPut localVarPostBody interface{} formFiles []formFile - localVarReturnValue *UpdatePlayerSuccessResponse + localVarReturnValue *App ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.UpdatePlayer") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.UpdateApp") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/players/{player_id}" - localVarPath = strings.Replace(localVarPath, "{"+"player_id"+"}", url.PathEscape(parameterToString(r.playerId, "")), -1) + localVarPath := localBasePath + "/apps/{app_id}" + localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", url.PathEscape(parameterToString(r.appId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} - if r.player == nil { - return localVarReturnValue, nil, reportError("player is required and must be specified") + if r.app == nil { + return localVarReturnValue, nil, reportError("app is required and must be specified") } // to determine the Content-Type header @@ -4685,7 +3853,7 @@ func (a *DefaultApiService) UpdatePlayerExecute(r ApiUpdatePlayerRequest) (*Upda localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = r.player + localVarPostBody = r.app req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err @@ -4718,18 +3886,8 @@ func (a *DefaultApiService) UpdatePlayerExecute(r ApiUpdatePlayerRequest) (*Upda newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } - if localVarHTTPResponse.StatusCode == 409 { - var v GenericError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } if localVarHTTPResponse.StatusCode == 429 { - var v RateLimiterError + var v RateLimitError err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -4752,81 +3910,67 @@ func (a *DefaultApiService) UpdatePlayerExecute(r ApiUpdatePlayerRequest) (*Upda return localVarReturnValue, localVarHTTPResponse, nil } -type ApiUpdatePlayerTagsRequest struct { +type ApiUpdateLiveActivityRequest struct { ctx context.Context ApiService *DefaultApiService appId string - externalUserId string - updatePlayerTagsRequestBody *UpdatePlayerTagsRequestBody + activityId string + updateLiveActivityRequest *UpdateLiveActivityRequest } -func (r ApiUpdatePlayerTagsRequest) UpdatePlayerTagsRequestBody(updatePlayerTagsRequestBody UpdatePlayerTagsRequestBody) ApiUpdatePlayerTagsRequest { - r.updatePlayerTagsRequestBody = &updatePlayerTagsRequestBody +func (r ApiUpdateLiveActivityRequest) UpdateLiveActivityRequest(updateLiveActivityRequest UpdateLiveActivityRequest) ApiUpdateLiveActivityRequest { + r.updateLiveActivityRequest = &updateLiveActivityRequest return r } -func (r ApiUpdatePlayerTagsRequest) Execute() (*UpdatePlayerTagsSuccessResponse, *http.Response, error) { - return r.ApiService.UpdatePlayerTagsExecute(r) +func (r ApiUpdateLiveActivityRequest) Execute() (*UpdateLiveActivitySuccessResponse, *http.Response, error) { + return r.ApiService.UpdateLiveActivityExecute(r) } /* -UpdatePlayerTags 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" -} +UpdateLiveActivity Update a Live Activity via Push +Updates a specified live activity. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param appId The OneSignal App ID the user record is found under. - @param externalUserId The External User ID mapped to teh device record in OneSignal. Must be actively set on the device to be updated. - @return ApiUpdatePlayerTagsRequest + @param appId The OneSignal App ID for your app. Available in Keys & IDs. + @param activityId Live Activity record ID + @return ApiUpdateLiveActivityRequest */ -func (a *DefaultApiService) UpdatePlayerTags(ctx context.Context, appId string, externalUserId string) ApiUpdatePlayerTagsRequest { - return ApiUpdatePlayerTagsRequest{ +func (a *DefaultApiService) UpdateLiveActivity(ctx context.Context, appId string, activityId string) ApiUpdateLiveActivityRequest { + return ApiUpdateLiveActivityRequest{ ApiService: a, ctx: ctx, appId: appId, - externalUserId: externalUserId, + activityId: activityId, } } // Execute executes the request -// @return UpdatePlayerTagsSuccessResponse -func (a *DefaultApiService) UpdatePlayerTagsExecute(r ApiUpdatePlayerTagsRequest) (*UpdatePlayerTagsSuccessResponse, *http.Response, error) { +// @return UpdateLiveActivitySuccessResponse +func (a *DefaultApiService) UpdateLiveActivityExecute(r ApiUpdateLiveActivityRequest) (*UpdateLiveActivitySuccessResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPut + localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile - localVarReturnValue *UpdatePlayerTagsSuccessResponse + localVarReturnValue *UpdateLiveActivitySuccessResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.UpdatePlayerTags") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.UpdateLiveActivity") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/apps/{app_id}/users/{external_user_id}" + localVarPath := localBasePath + "/apps/{app_id}/live_activities/{activity_id}/notifications" localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", url.PathEscape(parameterToString(r.appId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"external_user_id"+"}", url.PathEscape(parameterToString(r.externalUserId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"activity_id"+"}", url.PathEscape(parameterToString(r.activityId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} + if r.updateLiveActivityRequest == nil { + return localVarReturnValue, nil, reportError("updateLiveActivityRequest is required and must be specified") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/json"} @@ -4846,7 +3990,7 @@ func (a *DefaultApiService) UpdatePlayerTagsExecute(r ApiUpdatePlayerTagsRequest localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = r.updatePlayerTagsRequestBody + localVarPostBody = r.updateLiveActivityRequest req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err @@ -4879,18 +4023,8 @@ func (a *DefaultApiService) UpdatePlayerTagsExecute(r ApiUpdatePlayerTagsRequest newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } - if localVarHTTPResponse.StatusCode == 409 { - var v GenericError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } if localVarHTTPResponse.StatusCode == 429 { - var v RateLimiterError + var v RateLimitError err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -4918,11 +4052,11 @@ type ApiUpdateSubscriptionRequest struct { ApiService *DefaultApiService appId string subscriptionId string - updateSubscriptionRequestBody *UpdateSubscriptionRequestBody + subscriptionBody *SubscriptionBody } -func (r ApiUpdateSubscriptionRequest) UpdateSubscriptionRequestBody(updateSubscriptionRequestBody UpdateSubscriptionRequestBody) ApiUpdateSubscriptionRequest { - r.updateSubscriptionRequestBody = &updateSubscriptionRequestBody +func (r ApiUpdateSubscriptionRequest) SubscriptionBody(subscriptionBody SubscriptionBody) ApiUpdateSubscriptionRequest { + r.subscriptionBody = &subscriptionBody return r } @@ -4969,8 +4103,8 @@ func (a *DefaultApiService) UpdateSubscriptionExecute(r ApiUpdateSubscriptionReq localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} - if r.updateSubscriptionRequestBody == nil { - return nil, reportError("updateSubscriptionRequestBody is required and must be specified") + if r.subscriptionBody == nil { + return nil, reportError("subscriptionBody is required and must be specified") } // to determine the Content-Type header @@ -4991,7 +4125,7 @@ func (a *DefaultApiService) UpdateSubscriptionExecute(r ApiUpdateSubscriptionReq localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = r.updateSubscriptionRequestBody + localVarPostBody = r.subscriptionBody req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return nil, err @@ -5024,6 +4158,16 @@ func (a *DefaultApiService) UpdateSubscriptionExecute(r ApiUpdateSubscriptionReq newErr.model = v return localVarHTTPResponse, newErr } + if localVarHTTPResponse.StatusCode == 404 { + var v GenericError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.model = v + return localVarHTTPResponse, newErr + } if localVarHTTPResponse.StatusCode == 409 { var v GenericError err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) @@ -5035,7 +4179,7 @@ func (a *DefaultApiService) UpdateSubscriptionExecute(r ApiUpdateSubscriptionReq return localVarHTTPResponse, newErr } if localVarHTTPResponse.StatusCode == 429 { - var v RateLimiterError + var v RateLimitError err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -5063,7 +4207,7 @@ func (r ApiUpdateUserRequest) UpdateUserRequest(updateUserRequest UpdateUserRequ return r } -func (r ApiUpdateUserRequest) Execute() (*InlineResponse202, *http.Response, error) { +func (r ApiUpdateUserRequest) Execute() (*PropertiesBody, *http.Response, error) { return r.ApiService.UpdateUserExecute(r) } @@ -5089,13 +4233,13 @@ func (a *DefaultApiService) UpdateUser(ctx context.Context, appId string, aliasL } // Execute executes the request -// @return InlineResponse202 -func (a *DefaultApiService) UpdateUserExecute(r ApiUpdateUserRequest) (*InlineResponse202, *http.Response, error) { +// @return PropertiesBody +func (a *DefaultApiService) UpdateUserExecute(r ApiUpdateUserRequest) (*PropertiesBody, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPatch localVarPostBody interface{} formFiles []formFile - localVarReturnValue *InlineResponse202 + localVarReturnValue *PropertiesBody ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.UpdateUser") @@ -5177,7 +4321,7 @@ func (a *DefaultApiService) UpdateUserExecute(r ApiUpdateUserRequest) (*InlineRe return localVarReturnValue, localVarHTTPResponse, newErr } if localVarHTTPResponse.StatusCode == 429 { - var v RateLimiterError + var v RateLimitError err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() diff --git a/client.go b/client.go index b61a8fb..80221bd 100644 --- a/client.go +++ b/client.go @@ -3,7 +3,7 @@ OneSignal A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com -API version: 1.4.0 +API version: 5.0.1 Contact: devrel@onesignal.com */ @@ -42,7 +42,7 @@ var ( xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`) ) -// APIClient manages communication with the OneSignal API v1.4.0 +// APIClient manages communication with the OneSignal API v5.0.1 // In most cases there should be only one, shared, APIClient. type APIClient struct { cfg *Configuration @@ -324,7 +324,7 @@ func (c *APIClient) prepareRequest( localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent) // Add the SDK version to OS-Usage header for telemetry - localVarRequest.Header.Add("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-go, version=2.2.0") + localVarRequest.Header.Add("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-go, version=5.0.0-beta1") if ctx != nil { // add context to the request diff --git a/configuration.go b/configuration.go index 1d69451..0e6d9f8 100644 --- a/configuration.go +++ b/configuration.go @@ -3,7 +3,7 @@ OneSignal A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com -API version: 1.4.0 +API version: 5.0.1 Contact: devrel@onesignal.com */ @@ -105,7 +105,7 @@ type Configuration struct { func NewConfiguration() *Configuration { cfg := &Configuration{ DefaultHeader: make(map[string]string), - UserAgent: "OpenAPI-Generator/2.2.0/go", + UserAgent: "OpenAPI-Generator/5.0.0-beta1/go", Debug: false, Servers: ServerConfigurations{ { diff --git a/docs/BasicNotification.md b/docs/BasicNotification.md index b64de78..06810ef 100644 --- a/docs/BasicNotification.md +++ b/docs/BasicNotification.md @@ -6,17 +6,16 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **IncludedSegments** | Pointer to **[]string** | The segment names you want to target. Users in these segments will receive a notification. This targeting parameter is only compatible with excluded_segments. Example: [\"Active Users\", \"Inactive Users\"] | [optional] **ExcludedSegments** | Pointer to **[]string** | Segment that will be excluded when sending. Users in these segments will not receive a notification, even if they were included in included_segments. This targeting parameter is only compatible with included_segments. Example: [\"Active Users\", \"Inactive Users\"] | [optional] -**IncludePlayerIds** | Pointer to **[]string** | 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 | [optional] -**IncludeExternalUserIds** | Pointer to **[]string** | 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. | [optional] +**IncludeSubscriptionIds** | Pointer to **[]string** | 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 | [optional] **IncludeEmailTokens** | Pointer to **[]string** | 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 | [optional] **IncludePhoneNumbers** | Pointer to **[]string** | Recommended for Sending SMS - Target specific phone numbers. The phone number should be in the E.164 format. Phone number should be an existing subscriber on OneSignal. Refer our docs to learn how to add phone numbers to OneSignal. Example phone number: +1999999999 Limit of 2,000 entries per REST API call | [optional] -**IncludeIosTokens** | Pointer to **[]string** | 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 | [optional] -**IncludeWpWnsUris** | Pointer to **[]string** | 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 | [optional] -**IncludeAmazonRegIds** | Pointer to **[]string** | 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 | [optional] -**IncludeChromeRegIds** | Pointer to **[]string** | 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 | [optional] -**IncludeChromeWebRegIds** | Pointer to **[]string** | 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 | [optional] -**IncludeAndroidRegIds** | Pointer to **[]string** | 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 | [optional] -**IncludeAliases** | Pointer to [**NullablePlayerNotificationTargetIncludeAliases**](PlayerNotificationTargetIncludeAliases.md) | | [optional] +**IncludeIosTokens** | Pointer to **[]string** | 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 | [optional] +**IncludeWpWnsUris** | Pointer to **[]string** | 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 | [optional] +**IncludeAmazonRegIds** | Pointer to **[]string** | 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 | [optional] +**IncludeChromeRegIds** | Pointer to **[]string** | 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 | [optional] +**IncludeChromeWebRegIds** | Pointer to **[]string** | 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 | [optional] +**IncludeAndroidRegIds** | Pointer to **[]string** | 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 | [optional] +**IncludeAliases** | Pointer to **map[string][]string** | 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. | [optional] **TargetChannel** | Pointer to **string** | | [optional] **Id** | Pointer to **string** | | [optional] **Value** | Pointer to **int32** | | [optional] [readonly] @@ -32,13 +31,12 @@ Name | Type | Description | Notes **IsWPWNS** | Pointer to **NullableBool** | Indicates whether to send to all devices registered under your app's Windows platform. | [optional] **IsAdm** | Pointer to **NullableBool** | Indicates whether to send to all devices registered under your app's Amazon Fire platform. | [optional] **IsChrome** | Pointer to **NullableBool** | This flag is not used for web push Please see isChromeWeb for sending to web push users. This flag only applies to Google Chrome Apps & Extensions. Indicates whether to send to all devices registered under your app's Google Chrome Apps & Extension platform. | [optional] -**ChannelForExternalUserIds** | Pointer to **string** | Indicates if the message type when targeting with include_external_user_ids for cases where an email, sms, and/or push subscribers have the same external user id. Example: Use the string \"push\" to indicate you are sending a push notification or the string \"email\"for sending emails or \"sms\"for sending SMS. | [optional] **AppId** | **string** | Required: Your OneSignal Application ID, which can be found in Keys & IDs. It is a UUID and looks similar to 8250eaf6-1a58-489e-b136-7c74a864b434. | **ExternalId** | Pointer to **NullableString** | [DEPRECATED] Correlation and idempotency key. A request received with this parameter will first look for another notification with the same external_id. If one exists, a notification will not be sent, and result of the previous operation will instead be returned. Therefore, if you plan on using this feature, it's important to use a good source of randomness to generate the UUID passed here. This key is only idempotent for 30 days. After 30 days, the notification could be removed from our system and a notification with the same external_id will be sent again. See Idempotent Notification Requests for more details writeOnly: true | [optional] **IdempotencyKey** | Pointer to **NullableString** | Correlation and idempotency key. A request received with this parameter will first look for another notification with the same idempotency key. If one exists, a notification will not be sent, and result of the previous operation will instead be returned. Therefore, if you plan on using this feature, it's important to use a good source of randomness to generate the UUID passed here. This key is only idempotent for 30 days. After 30 days, the notification could be removed from our system and a notification with the same idempotency key will be sent again. See Idempotent Notification Requests for more details writeOnly: true | [optional] -**Contents** | Pointer to [**NullableStringMap**](StringMap.md) | | [optional] -**Headings** | Pointer to [**NullableStringMap**](StringMap.md) | | [optional] -**Subtitle** | Pointer to [**NullableStringMap**](StringMap.md) | | [optional] +**Contents** | Pointer to [**NullableLanguageStringMap**](LanguageStringMap.md) | | [optional] +**Headings** | Pointer to [**NullableLanguageStringMap**](LanguageStringMap.md) | | [optional] +**Subtitle** | Pointer to [**NullableLanguageStringMap**](LanguageStringMap.md) | | [optional] **Data** | Pointer to **map[string]interface{}** | 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} | [optional] **HuaweiMsgType** | Pointer to **NullableString** | Channel: Push Notifications Platform: Huawei Use \"data\" or \"message\" depending on the type of notification you are sending. More details in Data & Background Notifications. | [optional] **Url** | Pointer to **NullableString** | Channel: Push Notifications Platform: All The URL to open in the browser when a user clicks on the notification. Note: iOS needs https or updated NSAppTransportSecurity in plist This field supports inline substitutions. Omit if including web_url or app_url Example: https://onesignal.com | [optional] @@ -55,7 +53,7 @@ Name | Type | Description | Notes **ChromeBigPicture** | Pointer to **NullableString** | Channel: Push Notifications Platform: ChromeApp Large picture to display below the notification text. Must be a local URL. | [optional] **ChromeWebImage** | Pointer to **NullableString** | Channel: Push Notifications Platform: Chrome 56+ Sets the web push notification's large image to be shown below the notification's title and text. Please see Web Push Notification Icons. | [optional] **Buttons** | Pointer to [**[]Button**](Button.md) | Channel: Push Notifications Platform: iOS 8.0+, Android 4.1+, and derivatives like Amazon Buttons to add to the notification. Icon only works for Android. Buttons show in reverse order of array position i.e. Last item in array shows as first button on device. Example: [{\"id\": \"id2\", \"text\": \"second button\", \"icon\": \"ic_menu_share\"}, {\"id\": \"id1\", \"text\": \"first button\", \"icon\": \"ic_menu_send\"}] | [optional] -**WebButtons** | Pointer to [**[]Button**](Button.md) | 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\"}] | [optional] +**WebButtons** | Pointer to [**[]WebButton**](WebButton.md) | 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\"}] | [optional] **IosCategory** | Pointer to **NullableString** | 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. | [optional] **AndroidChannelId** | Pointer to **string** | Channel: Push Notifications Platform: Android The Android Oreo Notification Category to send the notification under. See the Category documentation on creating one and getting it's id. | [optional] **HuaweiChannelId** | Pointer to **NullableString** | Channel: Push Notifications Platform: Huawei The Android Oreo Notification Category to send the notification under. See the Category documentation on creating one and getting it's id. | [optional] @@ -101,6 +99,8 @@ Name | Type | Description | Notes **ThreadId** | Pointer to **NullableString** | Channel: Push Notifications Platform: iOS 12+ This parameter is supported in iOS 12 and above. It allows you to group related notifications together. If two notifications have the same thread-id, they will both be added to the same group. | [optional] **SummaryArg** | Pointer to **string** | Channel: Push Notifications Platform: iOS 12+ When using thread_id to create grouped notifications in iOS 12+, you can also control the summary. For example, a grouped notification can say \"12 more notifications from John Doe\". The summary_arg lets you set the name of the person/thing the notifications are coming from, and will show up as \"X more notifications from summary_arg\" | [optional] **SummaryArgCount** | Pointer to **int32** | Channel: Push Notifications Platform: iOS 12+ When using thread_id, you can also control the count of the number of notifications in the group. For example, if the group already has 12 notifications, and you send a new notification with summary_arg_count = 2, the new total will be 14 and the summary will be \"14 more notifications from summary_arg\" | [optional] +**IosRelevanceScore** | Pointer to **NullableFloat32** | 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. | [optional] +**IosInterruptionLevel** | Pointer to **NullableString** | 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. | [optional] **EmailSubject** | Pointer to **NullableString** | Channel: Email Required. The subject of the email. | [optional] **EmailBody** | Pointer to **string** | Channel: Email Required unless template_id is set. HTML suported The body of the email you wish to send. Typically, customers include their own HTML templates here. Must include [unsubscribe_url] in an <a> tag somewhere in the email. Note: any malformed HTML content will be sent to users. Please double-check your HTML is valid. | [optional] **EmailFromName** | Pointer to **NullableString** | Channel: Email The name the email is from. If not specified, will default to \"from name\" set in the OneSignal Dashboard Email Settings. | [optional] @@ -109,7 +109,7 @@ Name | Type | Description | Notes **IncludeUnsubscribed** | Pointer to **bool** | Channel: Email Default is `false`. This field is used to send transactional notifications. If set to `true`, this notification will also be sent to unsubscribed emails. If a `template_id` is provided, the `include_unsubscribed` value from the template will be inherited. If you are using a third-party ESP, this field requires the ESP's list of unsubscribed emails to be cleared. | [optional] **SmsFrom** | Pointer to **NullableString** | Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format. | [optional] **SmsMediaUrls** | Pointer to **[]string** | Channel: SMS URLs for the media files to be attached to the SMS content. Limit: 10 media urls with a total max. size of 5MBs. | [optional] -**Filters** | Pointer to [**[]Filter**](Filter.md) | | [optional] +**Filters** | Pointer to [**[]FilterExpression**](FilterExpression.md) | | [optional] **CustomData** | Pointer to **map[string]interface{}** | 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} | [optional] ## Methods @@ -181,76 +181,41 @@ SetExcludedSegments sets ExcludedSegments field to given value. HasExcludedSegments returns a boolean if a field has been set. -### GetIncludePlayerIds +### GetIncludeSubscriptionIds -`func (o *BasicNotification) GetIncludePlayerIds() []string` +`func (o *BasicNotification) GetIncludeSubscriptionIds() []string` -GetIncludePlayerIds returns the IncludePlayerIds field if non-nil, zero value otherwise. +GetIncludeSubscriptionIds returns the IncludeSubscriptionIds field if non-nil, zero value otherwise. -### GetIncludePlayerIdsOk +### GetIncludeSubscriptionIdsOk -`func (o *BasicNotification) GetIncludePlayerIdsOk() (*[]string, bool)` +`func (o *BasicNotification) GetIncludeSubscriptionIdsOk() (*[]string, bool)` -GetIncludePlayerIdsOk returns a tuple with the IncludePlayerIds field if it's non-nil, zero value otherwise +GetIncludeSubscriptionIdsOk returns a tuple with the IncludeSubscriptionIds field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetIncludePlayerIds +### SetIncludeSubscriptionIds -`func (o *BasicNotification) SetIncludePlayerIds(v []string)` +`func (o *BasicNotification) SetIncludeSubscriptionIds(v []string)` -SetIncludePlayerIds sets IncludePlayerIds field to given value. +SetIncludeSubscriptionIds sets IncludeSubscriptionIds field to given value. -### HasIncludePlayerIds +### HasIncludeSubscriptionIds -`func (o *BasicNotification) HasIncludePlayerIds() bool` +`func (o *BasicNotification) HasIncludeSubscriptionIds() bool` -HasIncludePlayerIds returns a boolean if a field has been set. +HasIncludeSubscriptionIds returns a boolean if a field has been set. -### SetIncludePlayerIdsNil +### SetIncludeSubscriptionIdsNil -`func (o *BasicNotification) SetIncludePlayerIdsNil(b bool)` +`func (o *BasicNotification) SetIncludeSubscriptionIdsNil(b bool)` - SetIncludePlayerIdsNil sets the value for IncludePlayerIds to be an explicit nil + SetIncludeSubscriptionIdsNil sets the value for IncludeSubscriptionIds to be an explicit nil -### UnsetIncludePlayerIds -`func (o *BasicNotification) UnsetIncludePlayerIds()` +### UnsetIncludeSubscriptionIds +`func (o *BasicNotification) UnsetIncludeSubscriptionIds()` -UnsetIncludePlayerIds ensures that no value is present for IncludePlayerIds, not even an explicit nil -### GetIncludeExternalUserIds - -`func (o *BasicNotification) GetIncludeExternalUserIds() []string` - -GetIncludeExternalUserIds returns the IncludeExternalUserIds field if non-nil, zero value otherwise. - -### GetIncludeExternalUserIdsOk - -`func (o *BasicNotification) GetIncludeExternalUserIdsOk() (*[]string, bool)` - -GetIncludeExternalUserIdsOk returns a tuple with the IncludeExternalUserIds field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIncludeExternalUserIds - -`func (o *BasicNotification) SetIncludeExternalUserIds(v []string)` - -SetIncludeExternalUserIds sets IncludeExternalUserIds field to given value. - -### HasIncludeExternalUserIds - -`func (o *BasicNotification) HasIncludeExternalUserIds() bool` - -HasIncludeExternalUserIds returns a boolean if a field has been set. - -### SetIncludeExternalUserIdsNil - -`func (o *BasicNotification) SetIncludeExternalUserIdsNil(b bool)` - - SetIncludeExternalUserIdsNil sets the value for IncludeExternalUserIds to be an explicit nil - -### UnsetIncludeExternalUserIds -`func (o *BasicNotification) UnsetIncludeExternalUserIds()` - -UnsetIncludeExternalUserIds ensures that no value is present for IncludeExternalUserIds, not even an explicit nil +UnsetIncludeSubscriptionIds ensures that no value is present for IncludeSubscriptionIds, not even an explicit nil ### GetIncludeEmailTokens `func (o *BasicNotification) GetIncludeEmailTokens() []string` @@ -453,20 +418,20 @@ HasIncludeAndroidRegIds returns a boolean if a field has been set. ### GetIncludeAliases -`func (o *BasicNotification) GetIncludeAliases() PlayerNotificationTargetIncludeAliases` +`func (o *BasicNotification) GetIncludeAliases() map[string][]string` GetIncludeAliases returns the IncludeAliases field if non-nil, zero value otherwise. ### GetIncludeAliasesOk -`func (o *BasicNotification) GetIncludeAliasesOk() (*PlayerNotificationTargetIncludeAliases, bool)` +`func (o *BasicNotification) GetIncludeAliasesOk() (*map[string][]string, bool)` GetIncludeAliasesOk returns a tuple with the IncludeAliases field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetIncludeAliases -`func (o *BasicNotification) SetIncludeAliases(v PlayerNotificationTargetIncludeAliases)` +`func (o *BasicNotification) SetIncludeAliases(v map[string][]string)` SetIncludeAliases sets IncludeAliases field to given value. @@ -971,31 +936,6 @@ HasIsChrome returns a boolean if a field has been set. `func (o *BasicNotification) UnsetIsChrome()` UnsetIsChrome ensures that no value is present for IsChrome, not even an explicit nil -### GetChannelForExternalUserIds - -`func (o *BasicNotification) GetChannelForExternalUserIds() string` - -GetChannelForExternalUserIds returns the ChannelForExternalUserIds field if non-nil, zero value otherwise. - -### GetChannelForExternalUserIdsOk - -`func (o *BasicNotification) GetChannelForExternalUserIdsOk() (*string, bool)` - -GetChannelForExternalUserIdsOk returns a tuple with the ChannelForExternalUserIds field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetChannelForExternalUserIds - -`func (o *BasicNotification) SetChannelForExternalUserIds(v string)` - -SetChannelForExternalUserIds sets ChannelForExternalUserIds field to given value. - -### HasChannelForExternalUserIds - -`func (o *BasicNotification) HasChannelForExternalUserIds() bool` - -HasChannelForExternalUserIds returns a boolean if a field has been set. - ### GetAppId `func (o *BasicNotification) GetAppId() string` @@ -1088,20 +1028,20 @@ HasIdempotencyKey returns a boolean if a field has been set. UnsetIdempotencyKey ensures that no value is present for IdempotencyKey, not even an explicit nil ### GetContents -`func (o *BasicNotification) GetContents() StringMap` +`func (o *BasicNotification) GetContents() LanguageStringMap` GetContents returns the Contents field if non-nil, zero value otherwise. ### GetContentsOk -`func (o *BasicNotification) GetContentsOk() (*StringMap, bool)` +`func (o *BasicNotification) GetContentsOk() (*LanguageStringMap, bool)` GetContentsOk returns a tuple with the Contents field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetContents -`func (o *BasicNotification) SetContents(v StringMap)` +`func (o *BasicNotification) SetContents(v LanguageStringMap)` SetContents sets Contents field to given value. @@ -1123,20 +1063,20 @@ HasContents returns a boolean if a field has been set. UnsetContents ensures that no value is present for Contents, not even an explicit nil ### GetHeadings -`func (o *BasicNotification) GetHeadings() StringMap` +`func (o *BasicNotification) GetHeadings() LanguageStringMap` GetHeadings returns the Headings field if non-nil, zero value otherwise. ### GetHeadingsOk -`func (o *BasicNotification) GetHeadingsOk() (*StringMap, bool)` +`func (o *BasicNotification) GetHeadingsOk() (*LanguageStringMap, bool)` GetHeadingsOk returns a tuple with the Headings field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHeadings -`func (o *BasicNotification) SetHeadings(v StringMap)` +`func (o *BasicNotification) SetHeadings(v LanguageStringMap)` SetHeadings sets Headings field to given value. @@ -1158,20 +1098,20 @@ HasHeadings returns a boolean if a field has been set. UnsetHeadings ensures that no value is present for Headings, not even an explicit nil ### GetSubtitle -`func (o *BasicNotification) GetSubtitle() StringMap` +`func (o *BasicNotification) GetSubtitle() LanguageStringMap` GetSubtitle returns the Subtitle field if non-nil, zero value otherwise. ### GetSubtitleOk -`func (o *BasicNotification) GetSubtitleOk() (*StringMap, bool)` +`func (o *BasicNotification) GetSubtitleOk() (*LanguageStringMap, bool)` GetSubtitleOk returns a tuple with the Subtitle field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetSubtitle -`func (o *BasicNotification) SetSubtitle(v StringMap)` +`func (o *BasicNotification) SetSubtitle(v LanguageStringMap)` SetSubtitle sets Subtitle field to given value. @@ -1743,20 +1683,20 @@ HasButtons returns a boolean if a field has been set. UnsetButtons ensures that no value is present for Buttons, not even an explicit nil ### GetWebButtons -`func (o *BasicNotification) GetWebButtons() []Button` +`func (o *BasicNotification) GetWebButtons() []WebButton` GetWebButtons returns the WebButtons field if non-nil, zero value otherwise. ### GetWebButtonsOk -`func (o *BasicNotification) GetWebButtonsOk() (*[]Button, bool)` +`func (o *BasicNotification) GetWebButtonsOk() (*[]WebButton, bool)` GetWebButtonsOk returns a tuple with the WebButtons field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetWebButtons -`func (o *BasicNotification) SetWebButtons(v []Button)` +`func (o *BasicNotification) SetWebButtons(v []WebButton)` SetWebButtons sets WebButtons field to given value. @@ -3281,6 +3221,76 @@ SetSummaryArgCount sets SummaryArgCount field to given value. HasSummaryArgCount returns a boolean if a field has been set. +### GetIosRelevanceScore + +`func (o *BasicNotification) GetIosRelevanceScore() float32` + +GetIosRelevanceScore returns the IosRelevanceScore field if non-nil, zero value otherwise. + +### GetIosRelevanceScoreOk + +`func (o *BasicNotification) GetIosRelevanceScoreOk() (*float32, bool)` + +GetIosRelevanceScoreOk returns a tuple with the IosRelevanceScore field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIosRelevanceScore + +`func (o *BasicNotification) SetIosRelevanceScore(v float32)` + +SetIosRelevanceScore sets IosRelevanceScore field to given value. + +### HasIosRelevanceScore + +`func (o *BasicNotification) HasIosRelevanceScore() bool` + +HasIosRelevanceScore returns a boolean if a field has been set. + +### SetIosRelevanceScoreNil + +`func (o *BasicNotification) SetIosRelevanceScoreNil(b bool)` + + SetIosRelevanceScoreNil sets the value for IosRelevanceScore to be an explicit nil + +### UnsetIosRelevanceScore +`func (o *BasicNotification) UnsetIosRelevanceScore()` + +UnsetIosRelevanceScore ensures that no value is present for IosRelevanceScore, not even an explicit nil +### GetIosInterruptionLevel + +`func (o *BasicNotification) GetIosInterruptionLevel() string` + +GetIosInterruptionLevel returns the IosInterruptionLevel field if non-nil, zero value otherwise. + +### GetIosInterruptionLevelOk + +`func (o *BasicNotification) GetIosInterruptionLevelOk() (*string, bool)` + +GetIosInterruptionLevelOk returns a tuple with the IosInterruptionLevel field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIosInterruptionLevel + +`func (o *BasicNotification) SetIosInterruptionLevel(v string)` + +SetIosInterruptionLevel sets IosInterruptionLevel field to given value. + +### HasIosInterruptionLevel + +`func (o *BasicNotification) HasIosInterruptionLevel() bool` + +HasIosInterruptionLevel returns a boolean if a field has been set. + +### SetIosInterruptionLevelNil + +`func (o *BasicNotification) SetIosInterruptionLevelNil(b bool)` + + SetIosInterruptionLevelNil sets the value for IosInterruptionLevel to be an explicit nil + +### UnsetIosInterruptionLevel +`func (o *BasicNotification) UnsetIosInterruptionLevel()` + +UnsetIosInterruptionLevel ensures that no value is present for IosInterruptionLevel, not even an explicit nil ### GetEmailSubject `func (o *BasicNotification) GetEmailSubject() string` @@ -3543,20 +3553,20 @@ HasSmsMediaUrls returns a boolean if a field has been set. UnsetSmsMediaUrls ensures that no value is present for SmsMediaUrls, not even an explicit nil ### GetFilters -`func (o *BasicNotification) GetFilters() []Filter` +`func (o *BasicNotification) GetFilters() []FilterExpression` GetFilters returns the Filters field if non-nil, zero value otherwise. ### GetFiltersOk -`func (o *BasicNotification) GetFiltersOk() (*[]Filter, bool)` +`func (o *BasicNotification) GetFiltersOk() (*[]FilterExpression, bool)` GetFiltersOk returns a tuple with the Filters field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetFilters -`func (o *BasicNotification) SetFilters(v []Filter)` +`func (o *BasicNotification) SetFilters(v []FilterExpression)` SetFilters sets Filters field to given value. diff --git a/docs/BasicNotificationAllOf.md b/docs/BasicNotificationAllOf.md index 1fbfea9..14e54d1 100644 --- a/docs/BasicNotificationAllOf.md +++ b/docs/BasicNotificationAllOf.md @@ -18,13 +18,12 @@ Name | Type | Description | Notes **IsWPWNS** | Pointer to **NullableBool** | Indicates whether to send to all devices registered under your app's Windows platform. | [optional] **IsAdm** | Pointer to **NullableBool** | Indicates whether to send to all devices registered under your app's Amazon Fire platform. | [optional] **IsChrome** | Pointer to **NullableBool** | This flag is not used for web push Please see isChromeWeb for sending to web push users. This flag only applies to Google Chrome Apps & Extensions. Indicates whether to send to all devices registered under your app's Google Chrome Apps & Extension platform. | [optional] -**ChannelForExternalUserIds** | Pointer to **string** | Indicates if the message type when targeting with include_external_user_ids for cases where an email, sms, and/or push subscribers have the same external user id. Example: Use the string \"push\" to indicate you are sending a push notification or the string \"email\"for sending emails or \"sms\"for sending SMS. | [optional] **AppId** | Pointer to **string** | Required: Your OneSignal Application ID, which can be found in Keys & IDs. It is a UUID and looks similar to 8250eaf6-1a58-489e-b136-7c74a864b434. | [optional] **ExternalId** | Pointer to **NullableString** | [DEPRECATED] Correlation and idempotency key. A request received with this parameter will first look for another notification with the same external_id. If one exists, a notification will not be sent, and result of the previous operation will instead be returned. Therefore, if you plan on using this feature, it's important to use a good source of randomness to generate the UUID passed here. This key is only idempotent for 30 days. After 30 days, the notification could be removed from our system and a notification with the same external_id will be sent again. See Idempotent Notification Requests for more details writeOnly: true | [optional] **IdempotencyKey** | Pointer to **NullableString** | Correlation and idempotency key. A request received with this parameter will first look for another notification with the same idempotency key. If one exists, a notification will not be sent, and result of the previous operation will instead be returned. Therefore, if you plan on using this feature, it's important to use a good source of randomness to generate the UUID passed here. This key is only idempotent for 30 days. After 30 days, the notification could be removed from our system and a notification with the same idempotency key will be sent again. See Idempotent Notification Requests for more details writeOnly: true | [optional] -**Contents** | Pointer to [**NullableStringMap**](StringMap.md) | | [optional] -**Headings** | Pointer to [**NullableStringMap**](StringMap.md) | | [optional] -**Subtitle** | Pointer to [**NullableStringMap**](StringMap.md) | | [optional] +**Contents** | Pointer to [**NullableLanguageStringMap**](LanguageStringMap.md) | | [optional] +**Headings** | Pointer to [**NullableLanguageStringMap**](LanguageStringMap.md) | | [optional] +**Subtitle** | Pointer to [**NullableLanguageStringMap**](LanguageStringMap.md) | | [optional] **Data** | Pointer to **map[string]interface{}** | 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} | [optional] **HuaweiMsgType** | Pointer to **NullableString** | Channel: Push Notifications Platform: Huawei Use \"data\" or \"message\" depending on the type of notification you are sending. More details in Data & Background Notifications. | [optional] **Url** | Pointer to **NullableString** | Channel: Push Notifications Platform: All The URL to open in the browser when a user clicks on the notification. Note: iOS needs https or updated NSAppTransportSecurity in plist This field supports inline substitutions. Omit if including web_url or app_url Example: https://onesignal.com | [optional] @@ -41,7 +40,7 @@ Name | Type | Description | Notes **ChromeBigPicture** | Pointer to **NullableString** | Channel: Push Notifications Platform: ChromeApp Large picture to display below the notification text. Must be a local URL. | [optional] **ChromeWebImage** | Pointer to **NullableString** | Channel: Push Notifications Platform: Chrome 56+ Sets the web push notification's large image to be shown below the notification's title and text. Please see Web Push Notification Icons. | [optional] **Buttons** | Pointer to [**[]Button**](Button.md) | Channel: Push Notifications Platform: iOS 8.0+, Android 4.1+, and derivatives like Amazon Buttons to add to the notification. Icon only works for Android. Buttons show in reverse order of array position i.e. Last item in array shows as first button on device. Example: [{\"id\": \"id2\", \"text\": \"second button\", \"icon\": \"ic_menu_share\"}, {\"id\": \"id1\", \"text\": \"first button\", \"icon\": \"ic_menu_send\"}] | [optional] -**WebButtons** | Pointer to [**[]Button**](Button.md) | 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\"}] | [optional] +**WebButtons** | Pointer to [**[]WebButton**](WebButton.md) | 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\"}] | [optional] **IosCategory** | Pointer to **NullableString** | 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. | [optional] **AndroidChannelId** | Pointer to **string** | Channel: Push Notifications Platform: Android The Android Oreo Notification Category to send the notification under. See the Category documentation on creating one and getting it's id. | [optional] **HuaweiChannelId** | Pointer to **NullableString** | Channel: Push Notifications Platform: Huawei The Android Oreo Notification Category to send the notification under. See the Category documentation on creating one and getting it's id. | [optional] @@ -87,6 +86,8 @@ Name | Type | Description | Notes **ThreadId** | Pointer to **NullableString** | Channel: Push Notifications Platform: iOS 12+ This parameter is supported in iOS 12 and above. It allows you to group related notifications together. If two notifications have the same thread-id, they will both be added to the same group. | [optional] **SummaryArg** | Pointer to **string** | Channel: Push Notifications Platform: iOS 12+ When using thread_id to create grouped notifications in iOS 12+, you can also control the summary. For example, a grouped notification can say \"12 more notifications from John Doe\". The summary_arg lets you set the name of the person/thing the notifications are coming from, and will show up as \"X more notifications from summary_arg\" | [optional] **SummaryArgCount** | Pointer to **int32** | Channel: Push Notifications Platform: iOS 12+ When using thread_id, you can also control the count of the number of notifications in the group. For example, if the group already has 12 notifications, and you send a new notification with summary_arg_count = 2, the new total will be 14 and the summary will be \"14 more notifications from summary_arg\" | [optional] +**IosRelevanceScore** | Pointer to **NullableFloat32** | 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. | [optional] +**IosInterruptionLevel** | Pointer to **NullableString** | 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. | [optional] **EmailSubject** | Pointer to **NullableString** | Channel: Email Required. The subject of the email. | [optional] **EmailBody** | Pointer to **string** | Channel: Email Required unless template_id is set. HTML suported The body of the email you wish to send. Typically, customers include their own HTML templates here. Must include [unsubscribe_url] in an <a> tag somewhere in the email. Note: any malformed HTML content will be sent to users. Please double-check your HTML is valid. | [optional] **EmailFromName** | Pointer to **NullableString** | Channel: Email The name the email is from. If not specified, will default to \"from name\" set in the OneSignal Dashboard Email Settings. | [optional] @@ -95,7 +96,7 @@ Name | Type | Description | Notes **IncludeUnsubscribed** | Pointer to **bool** | Channel: Email Default is `false`. This field is used to send transactional notifications. If set to `true`, this notification will also be sent to unsubscribed emails. If a `template_id` is provided, the `include_unsubscribed` value from the template will be inherited. If you are using a third-party ESP, this field requires the ESP's list of unsubscribed emails to be cleared. | [optional] **SmsFrom** | Pointer to **NullableString** | Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format. | [optional] **SmsMediaUrls** | Pointer to **[]string** | Channel: SMS URLs for the media files to be attached to the SMS content. Limit: 10 media urls with a total max. size of 5MBs. | [optional] -**Filters** | Pointer to [**[]Filter**](Filter.md) | | [optional] +**Filters** | Pointer to [**[]FilterExpression**](FilterExpression.md) | | [optional] **CustomData** | Pointer to **map[string]interface{}** | 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} | [optional] ## Methods @@ -577,31 +578,6 @@ HasIsChrome returns a boolean if a field has been set. `func (o *BasicNotificationAllOf) UnsetIsChrome()` UnsetIsChrome ensures that no value is present for IsChrome, not even an explicit nil -### GetChannelForExternalUserIds - -`func (o *BasicNotificationAllOf) GetChannelForExternalUserIds() string` - -GetChannelForExternalUserIds returns the ChannelForExternalUserIds field if non-nil, zero value otherwise. - -### GetChannelForExternalUserIdsOk - -`func (o *BasicNotificationAllOf) GetChannelForExternalUserIdsOk() (*string, bool)` - -GetChannelForExternalUserIdsOk returns a tuple with the ChannelForExternalUserIds field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetChannelForExternalUserIds - -`func (o *BasicNotificationAllOf) SetChannelForExternalUserIds(v string)` - -SetChannelForExternalUserIds sets ChannelForExternalUserIds field to given value. - -### HasChannelForExternalUserIds - -`func (o *BasicNotificationAllOf) HasChannelForExternalUserIds() bool` - -HasChannelForExternalUserIds returns a boolean if a field has been set. - ### GetAppId `func (o *BasicNotificationAllOf) GetAppId() string` @@ -699,20 +675,20 @@ HasIdempotencyKey returns a boolean if a field has been set. UnsetIdempotencyKey ensures that no value is present for IdempotencyKey, not even an explicit nil ### GetContents -`func (o *BasicNotificationAllOf) GetContents() StringMap` +`func (o *BasicNotificationAllOf) GetContents() LanguageStringMap` GetContents returns the Contents field if non-nil, zero value otherwise. ### GetContentsOk -`func (o *BasicNotificationAllOf) GetContentsOk() (*StringMap, bool)` +`func (o *BasicNotificationAllOf) GetContentsOk() (*LanguageStringMap, bool)` GetContentsOk returns a tuple with the Contents field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetContents -`func (o *BasicNotificationAllOf) SetContents(v StringMap)` +`func (o *BasicNotificationAllOf) SetContents(v LanguageStringMap)` SetContents sets Contents field to given value. @@ -734,20 +710,20 @@ HasContents returns a boolean if a field has been set. UnsetContents ensures that no value is present for Contents, not even an explicit nil ### GetHeadings -`func (o *BasicNotificationAllOf) GetHeadings() StringMap` +`func (o *BasicNotificationAllOf) GetHeadings() LanguageStringMap` GetHeadings returns the Headings field if non-nil, zero value otherwise. ### GetHeadingsOk -`func (o *BasicNotificationAllOf) GetHeadingsOk() (*StringMap, bool)` +`func (o *BasicNotificationAllOf) GetHeadingsOk() (*LanguageStringMap, bool)` GetHeadingsOk returns a tuple with the Headings field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHeadings -`func (o *BasicNotificationAllOf) SetHeadings(v StringMap)` +`func (o *BasicNotificationAllOf) SetHeadings(v LanguageStringMap)` SetHeadings sets Headings field to given value. @@ -769,20 +745,20 @@ HasHeadings returns a boolean if a field has been set. UnsetHeadings ensures that no value is present for Headings, not even an explicit nil ### GetSubtitle -`func (o *BasicNotificationAllOf) GetSubtitle() StringMap` +`func (o *BasicNotificationAllOf) GetSubtitle() LanguageStringMap` GetSubtitle returns the Subtitle field if non-nil, zero value otherwise. ### GetSubtitleOk -`func (o *BasicNotificationAllOf) GetSubtitleOk() (*StringMap, bool)` +`func (o *BasicNotificationAllOf) GetSubtitleOk() (*LanguageStringMap, bool)` GetSubtitleOk returns a tuple with the Subtitle field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetSubtitle -`func (o *BasicNotificationAllOf) SetSubtitle(v StringMap)` +`func (o *BasicNotificationAllOf) SetSubtitle(v LanguageStringMap)` SetSubtitle sets Subtitle field to given value. @@ -1354,20 +1330,20 @@ HasButtons returns a boolean if a field has been set. UnsetButtons ensures that no value is present for Buttons, not even an explicit nil ### GetWebButtons -`func (o *BasicNotificationAllOf) GetWebButtons() []Button` +`func (o *BasicNotificationAllOf) GetWebButtons() []WebButton` GetWebButtons returns the WebButtons field if non-nil, zero value otherwise. ### GetWebButtonsOk -`func (o *BasicNotificationAllOf) GetWebButtonsOk() (*[]Button, bool)` +`func (o *BasicNotificationAllOf) GetWebButtonsOk() (*[]WebButton, bool)` GetWebButtonsOk returns a tuple with the WebButtons field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetWebButtons -`func (o *BasicNotificationAllOf) SetWebButtons(v []Button)` +`func (o *BasicNotificationAllOf) SetWebButtons(v []WebButton)` SetWebButtons sets WebButtons field to given value. @@ -2892,6 +2868,76 @@ SetSummaryArgCount sets SummaryArgCount field to given value. HasSummaryArgCount returns a boolean if a field has been set. +### GetIosRelevanceScore + +`func (o *BasicNotificationAllOf) GetIosRelevanceScore() float32` + +GetIosRelevanceScore returns the IosRelevanceScore field if non-nil, zero value otherwise. + +### GetIosRelevanceScoreOk + +`func (o *BasicNotificationAllOf) GetIosRelevanceScoreOk() (*float32, bool)` + +GetIosRelevanceScoreOk returns a tuple with the IosRelevanceScore field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIosRelevanceScore + +`func (o *BasicNotificationAllOf) SetIosRelevanceScore(v float32)` + +SetIosRelevanceScore sets IosRelevanceScore field to given value. + +### HasIosRelevanceScore + +`func (o *BasicNotificationAllOf) HasIosRelevanceScore() bool` + +HasIosRelevanceScore returns a boolean if a field has been set. + +### SetIosRelevanceScoreNil + +`func (o *BasicNotificationAllOf) SetIosRelevanceScoreNil(b bool)` + + SetIosRelevanceScoreNil sets the value for IosRelevanceScore to be an explicit nil + +### UnsetIosRelevanceScore +`func (o *BasicNotificationAllOf) UnsetIosRelevanceScore()` + +UnsetIosRelevanceScore ensures that no value is present for IosRelevanceScore, not even an explicit nil +### GetIosInterruptionLevel + +`func (o *BasicNotificationAllOf) GetIosInterruptionLevel() string` + +GetIosInterruptionLevel returns the IosInterruptionLevel field if non-nil, zero value otherwise. + +### GetIosInterruptionLevelOk + +`func (o *BasicNotificationAllOf) GetIosInterruptionLevelOk() (*string, bool)` + +GetIosInterruptionLevelOk returns a tuple with the IosInterruptionLevel field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIosInterruptionLevel + +`func (o *BasicNotificationAllOf) SetIosInterruptionLevel(v string)` + +SetIosInterruptionLevel sets IosInterruptionLevel field to given value. + +### HasIosInterruptionLevel + +`func (o *BasicNotificationAllOf) HasIosInterruptionLevel() bool` + +HasIosInterruptionLevel returns a boolean if a field has been set. + +### SetIosInterruptionLevelNil + +`func (o *BasicNotificationAllOf) SetIosInterruptionLevelNil(b bool)` + + SetIosInterruptionLevelNil sets the value for IosInterruptionLevel to be an explicit nil + +### UnsetIosInterruptionLevel +`func (o *BasicNotificationAllOf) UnsetIosInterruptionLevel()` + +UnsetIosInterruptionLevel ensures that no value is present for IosInterruptionLevel, not even an explicit nil ### GetEmailSubject `func (o *BasicNotificationAllOf) GetEmailSubject() string` @@ -3154,20 +3200,20 @@ HasSmsMediaUrls returns a boolean if a field has been set. UnsetSmsMediaUrls ensures that no value is present for SmsMediaUrls, not even an explicit nil ### GetFilters -`func (o *BasicNotificationAllOf) GetFilters() []Filter` +`func (o *BasicNotificationAllOf) GetFilters() []FilterExpression` GetFilters returns the Filters field if non-nil, zero value otherwise. ### GetFiltersOk -`func (o *BasicNotificationAllOf) GetFiltersOk() (*[]Filter, bool)` +`func (o *BasicNotificationAllOf) GetFiltersOk() (*[]FilterExpression, bool)` GetFiltersOk returns a tuple with the Filters field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetFilters -`func (o *BasicNotificationAllOf) SetFilters(v []Filter)` +`func (o *BasicNotificationAllOf) SetFilters(v []FilterExpression)` SetFilters sets Filters field to given value. diff --git a/docs/BeginLiveActivityRequest.md b/docs/BeginLiveActivityRequest.md deleted file mode 100644 index e6770c0..0000000 --- a/docs/BeginLiveActivityRequest.md +++ /dev/null @@ -1,72 +0,0 @@ -# BeginLiveActivityRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**PushToken** | **string** | | -**SubscriptionId** | **string** | | - -## Methods - -### NewBeginLiveActivityRequest - -`func NewBeginLiveActivityRequest(pushToken string, subscriptionId string, ) *BeginLiveActivityRequest` - -NewBeginLiveActivityRequest instantiates a new BeginLiveActivityRequest object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewBeginLiveActivityRequestWithDefaults - -`func NewBeginLiveActivityRequestWithDefaults() *BeginLiveActivityRequest` - -NewBeginLiveActivityRequestWithDefaults instantiates a new BeginLiveActivityRequest object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetPushToken - -`func (o *BeginLiveActivityRequest) GetPushToken() string` - -GetPushToken returns the PushToken field if non-nil, zero value otherwise. - -### GetPushTokenOk - -`func (o *BeginLiveActivityRequest) GetPushTokenOk() (*string, bool)` - -GetPushTokenOk returns a tuple with the PushToken field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPushToken - -`func (o *BeginLiveActivityRequest) SetPushToken(v string)` - -SetPushToken sets PushToken field to given value. - - -### GetSubscriptionId - -`func (o *BeginLiveActivityRequest) GetSubscriptionId() string` - -GetSubscriptionId returns the SubscriptionId field if non-nil, zero value otherwise. - -### GetSubscriptionIdOk - -`func (o *BeginLiveActivityRequest) GetSubscriptionIdOk() (*string, bool)` - -GetSubscriptionIdOk returns a tuple with the SubscriptionId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSubscriptionId - -`func (o *BeginLiveActivityRequest) SetSubscriptionId(v string)` - -SetSubscriptionId sets SubscriptionId field to given value. - - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CancelNotificationSuccessResponse.md b/docs/CancelNotificationSuccessResponse.md deleted file mode 100644 index f1a5908..0000000 --- a/docs/CancelNotificationSuccessResponse.md +++ /dev/null @@ -1,56 +0,0 @@ -# CancelNotificationSuccessResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Success** | Pointer to **bool** | | [optional] - -## Methods - -### NewCancelNotificationSuccessResponse - -`func NewCancelNotificationSuccessResponse() *CancelNotificationSuccessResponse` - -NewCancelNotificationSuccessResponse instantiates a new CancelNotificationSuccessResponse object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewCancelNotificationSuccessResponseWithDefaults - -`func NewCancelNotificationSuccessResponseWithDefaults() *CancelNotificationSuccessResponse` - -NewCancelNotificationSuccessResponseWithDefaults instantiates a new CancelNotificationSuccessResponse object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetSuccess - -`func (o *CancelNotificationSuccessResponse) GetSuccess() bool` - -GetSuccess returns the Success field if non-nil, zero value otherwise. - -### GetSuccessOk - -`func (o *CancelNotificationSuccessResponse) GetSuccessOk() (*bool, bool)` - -GetSuccessOk returns a tuple with the Success field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSuccess - -`func (o *CancelNotificationSuccessResponse) SetSuccess(v bool)` - -SetSuccess sets Success field to given value. - -### HasSuccess - -`func (o *CancelNotificationSuccessResponse) HasSuccess() bool` - -HasSuccess returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CreateNotificationSuccessResponse.md b/docs/CreateNotificationSuccessResponse.md index 1aee9a5..adf8862 100644 --- a/docs/CreateNotificationSuccessResponse.md +++ b/docs/CreateNotificationSuccessResponse.md @@ -5,9 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Id** | Pointer to **string** | | [optional] -**Recipients** | Pointer to **int32** | Estimated number of subscribers targetted by notification. | [optional] **ExternalId** | Pointer to **NullableString** | | [optional] -**Errors** | Pointer to [**Notification200Errors**](Notification200Errors.md) | | [optional] +**Errors** | Pointer to **interface{}** | Errors include the identifiers that are invalid, or that there are no subscribers. | [optional] ## Methods @@ -53,31 +52,6 @@ SetId sets Id field to given value. HasId returns a boolean if a field has been set. -### GetRecipients - -`func (o *CreateNotificationSuccessResponse) GetRecipients() int32` - -GetRecipients returns the Recipients field if non-nil, zero value otherwise. - -### GetRecipientsOk - -`func (o *CreateNotificationSuccessResponse) GetRecipientsOk() (*int32, bool)` - -GetRecipientsOk returns a tuple with the Recipients field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRecipients - -`func (o *CreateNotificationSuccessResponse) SetRecipients(v int32)` - -SetRecipients sets Recipients field to given value. - -### HasRecipients - -`func (o *CreateNotificationSuccessResponse) HasRecipients() bool` - -HasRecipients returns a boolean if a field has been set. - ### GetExternalId `func (o *CreateNotificationSuccessResponse) GetExternalId() string` @@ -115,20 +89,20 @@ HasExternalId returns a boolean if a field has been set. UnsetExternalId ensures that no value is present for ExternalId, not even an explicit nil ### GetErrors -`func (o *CreateNotificationSuccessResponse) GetErrors() Notification200Errors` +`func (o *CreateNotificationSuccessResponse) GetErrors() interface{}` GetErrors returns the Errors field if non-nil, zero value otherwise. ### GetErrorsOk -`func (o *CreateNotificationSuccessResponse) GetErrorsOk() (*Notification200Errors, bool)` +`func (o *CreateNotificationSuccessResponse) GetErrorsOk() (*interface{}, bool)` GetErrorsOk returns a tuple with the Errors field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetErrors -`func (o *CreateNotificationSuccessResponse) SetErrors(v Notification200Errors)` +`func (o *CreateNotificationSuccessResponse) SetErrors(v interface{})` SetErrors sets Errors field to given value. @@ -138,6 +112,16 @@ SetErrors sets Errors field to given value. HasErrors returns a boolean if a field has been set. +### SetErrorsNil + +`func (o *CreateNotificationSuccessResponse) SetErrorsNil(b bool)` + + SetErrorsNil sets the value for Errors to be an explicit nil + +### UnsetErrors +`func (o *CreateNotificationSuccessResponse) UnsetErrors()` + +UnsetErrors ensures that no value is present for Errors, not even an explicit nil [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreatePlayerSuccessResponse.md b/docs/CreatePlayerSuccessResponse.md deleted file mode 100644 index c57287b..0000000 --- a/docs/CreatePlayerSuccessResponse.md +++ /dev/null @@ -1,82 +0,0 @@ -# CreatePlayerSuccessResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Success** | Pointer to **bool** | | [optional] -**Id** | Pointer to **string** | | [optional] - -## Methods - -### NewCreatePlayerSuccessResponse - -`func NewCreatePlayerSuccessResponse() *CreatePlayerSuccessResponse` - -NewCreatePlayerSuccessResponse instantiates a new CreatePlayerSuccessResponse object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewCreatePlayerSuccessResponseWithDefaults - -`func NewCreatePlayerSuccessResponseWithDefaults() *CreatePlayerSuccessResponse` - -NewCreatePlayerSuccessResponseWithDefaults instantiates a new CreatePlayerSuccessResponse object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetSuccess - -`func (o *CreatePlayerSuccessResponse) GetSuccess() bool` - -GetSuccess returns the Success field if non-nil, zero value otherwise. - -### GetSuccessOk - -`func (o *CreatePlayerSuccessResponse) GetSuccessOk() (*bool, bool)` - -GetSuccessOk returns a tuple with the Success field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSuccess - -`func (o *CreatePlayerSuccessResponse) SetSuccess(v bool)` - -SetSuccess sets Success field to given value. - -### HasSuccess - -`func (o *CreatePlayerSuccessResponse) HasSuccess() bool` - -HasSuccess returns a boolean if a field has been set. - -### GetId - -`func (o *CreatePlayerSuccessResponse) GetId() string` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *CreatePlayerSuccessResponse) GetIdOk() (*string, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *CreatePlayerSuccessResponse) SetId(v string)` - -SetId sets Id field to given value. - -### HasId - -`func (o *CreatePlayerSuccessResponse) HasId() bool` - -HasId returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CreateSubscriptionRequestBody.md b/docs/CreateSubscriptionRequestBody.md deleted file mode 100644 index 2d348b2..0000000 --- a/docs/CreateSubscriptionRequestBody.md +++ /dev/null @@ -1,82 +0,0 @@ -# CreateSubscriptionRequestBody - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Subscription** | Pointer to [**SubscriptionObject**](SubscriptionObject.md) | | [optional] -**RetainPreviousOwner** | Pointer to **bool** | | [optional] - -## Methods - -### NewCreateSubscriptionRequestBody - -`func NewCreateSubscriptionRequestBody() *CreateSubscriptionRequestBody` - -NewCreateSubscriptionRequestBody instantiates a new CreateSubscriptionRequestBody object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewCreateSubscriptionRequestBodyWithDefaults - -`func NewCreateSubscriptionRequestBodyWithDefaults() *CreateSubscriptionRequestBody` - -NewCreateSubscriptionRequestBodyWithDefaults instantiates a new CreateSubscriptionRequestBody object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetSubscription - -`func (o *CreateSubscriptionRequestBody) GetSubscription() SubscriptionObject` - -GetSubscription returns the Subscription field if non-nil, zero value otherwise. - -### GetSubscriptionOk - -`func (o *CreateSubscriptionRequestBody) GetSubscriptionOk() (*SubscriptionObject, bool)` - -GetSubscriptionOk returns a tuple with the Subscription field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSubscription - -`func (o *CreateSubscriptionRequestBody) SetSubscription(v SubscriptionObject)` - -SetSubscription sets Subscription field to given value. - -### HasSubscription - -`func (o *CreateSubscriptionRequestBody) HasSubscription() bool` - -HasSubscription returns a boolean if a field has been set. - -### GetRetainPreviousOwner - -`func (o *CreateSubscriptionRequestBody) GetRetainPreviousOwner() bool` - -GetRetainPreviousOwner returns the RetainPreviousOwner field if non-nil, zero value otherwise. - -### GetRetainPreviousOwnerOk - -`func (o *CreateSubscriptionRequestBody) GetRetainPreviousOwnerOk() (*bool, bool)` - -GetRetainPreviousOwnerOk returns a tuple with the RetainPreviousOwner field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRetainPreviousOwner - -`func (o *CreateSubscriptionRequestBody) SetRetainPreviousOwner(v bool)` - -SetRetainPreviousOwner sets RetainPreviousOwner field to given value. - -### HasRetainPreviousOwner - -`func (o *CreateSubscriptionRequestBody) HasRetainPreviousOwner() bool` - -HasRetainPreviousOwner returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/DefaultApi.md b/docs/DefaultApi.md index 606c9ae..2b1502b 100644 --- a/docs/DefaultApi.md +++ b/docs/DefaultApi.md @@ -4,57 +4,50 @@ All URIs are relative to *https://api.onesignal.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**BeginLiveActivity**](DefaultApi.md#BeginLiveActivity) | **Post** /apps/{app_id}/live_activities/{activity_id}/token | Start Live Activity [**CancelNotification**](DefaultApi.md#CancelNotification) | **Delete** /notifications/{notification_id} | Stop a scheduled or currently outgoing notification +[**CreateAlias**](DefaultApi.md#CreateAlias) | **Patch** /apps/{app_id}/users/by/{alias_label}/{alias_id}/identity | +[**CreateAliasBySubscription**](DefaultApi.md#CreateAliasBySubscription) | **Patch** /apps/{app_id}/subscriptions/{subscription_id}/user/identity | [**CreateApp**](DefaultApi.md#CreateApp) | **Post** /apps | Create an app [**CreateNotification**](DefaultApi.md#CreateNotification) | **Post** /notifications | Create notification -[**CreatePlayer**](DefaultApi.md#CreatePlayer) | **Post** /players | Add a device -[**CreateSegments**](DefaultApi.md#CreateSegments) | **Post** /apps/{app_id}/segments | Create Segments +[**CreateSegment**](DefaultApi.md#CreateSegment) | **Post** /apps/{app_id}/segments | Create Segment [**CreateSubscription**](DefaultApi.md#CreateSubscription) | **Post** /apps/{app_id}/users/by/{alias_label}/{alias_id}/subscriptions | [**CreateUser**](DefaultApi.md#CreateUser) | **Post** /apps/{app_id}/users | [**DeleteAlias**](DefaultApi.md#DeleteAlias) | **Delete** /apps/{app_id}/users/by/{alias_label}/{alias_id}/identity/{alias_label_to_delete} | -[**DeletePlayer**](DefaultApi.md#DeletePlayer) | **Delete** /players/{player_id} | Delete a user record -[**DeleteSegments**](DefaultApi.md#DeleteSegments) | **Delete** /apps/{app_id}/segments/{segment_id} | Delete Segments +[**DeleteSegment**](DefaultApi.md#DeleteSegment) | **Delete** /apps/{app_id}/segments/{segment_id} | Delete Segment [**DeleteSubscription**](DefaultApi.md#DeleteSubscription) | **Delete** /apps/{app_id}/subscriptions/{subscription_id} | [**DeleteUser**](DefaultApi.md#DeleteUser) | **Delete** /apps/{app_id}/users/by/{alias_label}/{alias_id} | -[**EndLiveActivity**](DefaultApi.md#EndLiveActivity) | **Delete** /apps/{app_id}/live_activities/{activity_id}/token/{subscription_id} | Stop Live Activity [**ExportEvents**](DefaultApi.md#ExportEvents) | **Post** /notifications/{notification_id}/export_events?app_id={app_id} | Export CSV of Events -[**ExportPlayers**](DefaultApi.md#ExportPlayers) | **Post** /players/csv_export?app_id={app_id} | Export CSV of Players -[**FetchAliases**](DefaultApi.md#FetchAliases) | **Get** /apps/{app_id}/subscriptions/{subscription_id}/user/identity | -[**FetchUser**](DefaultApi.md#FetchUser) | **Get** /apps/{app_id}/users/by/{alias_label}/{alias_id} | -[**FetchUserIdentity**](DefaultApi.md#FetchUserIdentity) | **Get** /apps/{app_id}/users/by/{alias_label}/{alias_id}/identity | +[**ExportSubscriptions**](DefaultApi.md#ExportSubscriptions) | **Post** /players/csv_export?app_id={app_id} | Export CSV of Subscriptions +[**GetAliases**](DefaultApi.md#GetAliases) | **Get** /apps/{app_id}/users/by/{alias_label}/{alias_id}/identity | +[**GetAliasesBySubscription**](DefaultApi.md#GetAliasesBySubscription) | **Get** /apps/{app_id}/subscriptions/{subscription_id}/user/identity | [**GetApp**](DefaultApi.md#GetApp) | **Get** /apps/{app_id} | View an app [**GetApps**](DefaultApi.md#GetApps) | **Get** /apps | View apps -[**GetEligibleIams**](DefaultApi.md#GetEligibleIams) | **Get** /apps/{app_id}/subscriptions/{subscription_id}/iams | [**GetNotification**](DefaultApi.md#GetNotification) | **Get** /notifications/{notification_id} | View notification [**GetNotificationHistory**](DefaultApi.md#GetNotificationHistory) | **Post** /notifications/{notification_id}/history | Notification History [**GetNotifications**](DefaultApi.md#GetNotifications) | **Get** /notifications | View notifications [**GetOutcomes**](DefaultApi.md#GetOutcomes) | **Get** /apps/{app_id}/outcomes | View Outcomes -[**GetPlayer**](DefaultApi.md#GetPlayer) | **Get** /players/{player_id} | View device -[**GetPlayers**](DefaultApi.md#GetPlayers) | **Get** /players | View devices -[**IdentifyUserByAlias**](DefaultApi.md#IdentifyUserByAlias) | **Patch** /apps/{app_id}/users/by/{alias_label}/{alias_id}/identity | -[**IdentifyUserBySubscriptionId**](DefaultApi.md#IdentifyUserBySubscriptionId) | **Patch** /apps/{app_id}/subscriptions/{subscription_id}/user/identity | +[**GetSegments**](DefaultApi.md#GetSegments) | **Get** /apps/{app_id}/segments | Get Segments +[**GetUser**](DefaultApi.md#GetUser) | **Get** /apps/{app_id}/users/by/{alias_label}/{alias_id} | [**TransferSubscription**](DefaultApi.md#TransferSubscription) | **Patch** /apps/{app_id}/subscriptions/{subscription_id}/owner | +[**UnsubscribeEmailWithToken**](DefaultApi.md#UnsubscribeEmailWithToken) | **Post** /apps/{app_id}/notifications/{notification_id}/unsubscribe | Unsubscribe with token [**UpdateApp**](DefaultApi.md#UpdateApp) | **Put** /apps/{app_id} | Update an app [**UpdateLiveActivity**](DefaultApi.md#UpdateLiveActivity) | **Post** /apps/{app_id}/live_activities/{activity_id}/notifications | Update a Live Activity via Push -[**UpdatePlayer**](DefaultApi.md#UpdatePlayer) | **Put** /players/{player_id} | Edit device -[**UpdatePlayerTags**](DefaultApi.md#UpdatePlayerTags) | **Put** /apps/{app_id}/users/{external_user_id} | Edit tags with external user id [**UpdateSubscription**](DefaultApi.md#UpdateSubscription) | **Patch** /apps/{app_id}/subscriptions/{subscription_id} | [**UpdateUser**](DefaultApi.md#UpdateUser) | **Patch** /apps/{app_id}/users/by/{alias_label}/{alias_id} | -## BeginLiveActivity +## CancelNotification -> BeginLiveActivity(ctx, appId, activityId).BeginLiveActivityRequest(beginLiveActivityRequest).Execute() +> GenericSuccessBoolResponse CancelNotification(ctx, notificationId).AppId(appId).Execute() -Start Live Activity +Stop a scheduled or currently outgoing notification ### Authorization -[app_key](../README.md#app_key) +[rest_api_key](../README.md#rest_api_key) ### Example @@ -70,21 +63,21 @@ import ( ) func main() { - appId := "appId_example" // string | The OneSignal App ID for your app. Available in Keys & IDs. - activityId := "activityId_example" // string | Live Activity record ID - beginLiveActivityRequest := *onesignal.NewBeginLiveActivityRequest("PushToken_example", "SubscriptionId_example") // BeginLiveActivityRequest | + appId := "appId_example" // string | + notificationId := "notificationId_example" // string | configuration := onesignal.NewConfiguration() apiClient := onesignal.NewAPIClient(configuration) - appAuth := context.WithValue(context.Background(), onesignal.AppAuth, "REST_API_KEY") // App REST API key required for most endpoints - resp, r, err := apiClient.DefaultApi.BeginLiveActivity(appAuth, appId, activityId).BeginLiveActivityRequest(beginLiveActivityRequest).Execute() + resp, r, err := apiClient.DefaultApi.CancelNotification(, notificationId).AppId(appId).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.BeginLiveActivity``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.CancelNotification``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } + // response from `CancelNotification`: GenericSuccessBoolResponse + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.CancelNotification`: %v\n", resp) } ``` @@ -94,27 +87,25 @@ func main() { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**appId** | **string** | The OneSignal App ID for your app. Available in Keys & IDs. | -**activityId** | **string** | Live Activity record ID | +**notificationId** | **string** | | ### Other Parameters -Other parameters are passed through a pointer to a apiBeginLiveActivityRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiCancelNotificationRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- + **appId** | **string** | | - **beginLiveActivityRequest** | [**BeginLiveActivityRequest**](BeginLiveActivityRequest.md) | | - ### Return type - (empty response body) +[**GenericSuccessBoolResponse**](GenericSuccessBoolResponse.md) ### HTTP request headers -- **Content-Type**: application/json +- **Content-Type**: Not defined - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) @@ -122,17 +113,17 @@ Name | Type | Description | Notes [[Back to README]](../README.md) -## CancelNotification +## CreateAlias + +> UserIdentityBody CreateAlias(ctx, appId, aliasLabel, aliasId).UserIdentityBody(userIdentityBody).Execute() -> CancelNotificationSuccessResponse CancelNotification(ctx, notificationId).AppId(appId).Execute() -Stop a scheduled or currently outgoing notification ### Authorization -[app_key](../README.md#app_key) +[rest_api_key](../README.md#rest_api_key) ### Example @@ -149,21 +140,22 @@ import ( func main() { appId := "appId_example" // string | - notificationId := "notificationId_example" // string | + aliasLabel := "aliasLabel_example" // string | + aliasId := "aliasId_example" // string | + userIdentityBody := *onesignal.NewUserIdentityBody() // UserIdentityBody | configuration := onesignal.NewConfiguration() apiClient := onesignal.NewAPIClient(configuration) - appAuth := context.WithValue(context.Background(), onesignal.AppAuth, "REST_API_KEY") // App REST API key required for most endpoints - resp, r, err := apiClient.DefaultApi.CancelNotification(appAuth, notificationId).AppId(appId).Execute() + resp, r, err := apiClient.DefaultApi.CreateAlias(, appId, aliasLabel, aliasId).UserIdentityBody(userIdentityBody).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.CancelNotification``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.CreateAlias``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } - // response from `CancelNotification`: CancelNotificationSuccessResponse - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.CancelNotification`: %v\n", resp) + // response from `CreateAlias`: UserIdentityBody + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.CreateAlias`: %v\n", resp) } ``` @@ -173,25 +165,29 @@ func main() { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**notificationId** | **string** | | +**appId** | **string** | | +**aliasLabel** | **string** | | +**aliasId** | **string** | | ### Other Parameters -Other parameters are passed through a pointer to a apiCancelNotificationRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiCreateAliasRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **appId** | **string** | | + + **userIdentityBody** | [**UserIdentityBody**](UserIdentityBody.md) | | + ### Return type -[**CancelNotificationSuccessResponse**](CancelNotificationSuccessResponse.md) +[**UserIdentityBody**](UserIdentityBody.md) ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) @@ -199,17 +195,17 @@ Name | Type | Description | Notes [[Back to README]](../README.md) -## CreateApp +## CreateAliasBySubscription + +> UserIdentityBody CreateAliasBySubscription(ctx, appId, subscriptionId).UserIdentityBody(userIdentityBody).Execute() -> App CreateApp(ctx).App(app).Execute() -Create an app ### Authorization -[user_key](../README.md#user_key) +[rest_api_key](../README.md#rest_api_key) ### Example @@ -225,40 +221,48 @@ import ( ) func main() { - app := *onesignal.NewApp() // App | + appId := "appId_example" // string | + subscriptionId := "subscriptionId_example" // string | + userIdentityBody := *onesignal.NewUserIdentityBody() // UserIdentityBody | configuration := onesignal.NewConfiguration() apiClient := onesignal.NewAPIClient(configuration) - userAuth := context.WithValue(context.Background(), onesignal.UserAuth, "ORGANIZATION_API_KEY") // Organization key is only required for creating new apps and other top-level endpoints - resp, r, err := apiClient.DefaultApi.CreateApp(userAuth).App(app).Execute() + resp, r, err := apiClient.DefaultApi.CreateAliasBySubscription(, appId, subscriptionId).UserIdentityBody(userIdentityBody).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.CreateApp``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.CreateAliasBySubscription``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } - // response from `CreateApp`: App - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.CreateApp`: %v\n", resp) + // response from `CreateAliasBySubscription`: UserIdentityBody + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.CreateAliasBySubscription`: %v\n", resp) } ``` ### Path Parameters +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**appId** | **string** | | +**subscriptionId** | **string** | | ### Other Parameters -Other parameters are passed through a pointer to a apiCreateAppRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiCreateAliasBySubscriptionRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **app** | [**App**](App.md) | | + + + **userIdentityBody** | [**UserIdentityBody**](UserIdentityBody.md) | | ### Return type -[**App**](App.md) +[**UserIdentityBody**](UserIdentityBody.md) ### HTTP request headers @@ -270,17 +274,17 @@ Name | Type | Description | Notes [[Back to README]](../README.md) -## CreateNotification +## CreateApp -> CreateNotificationSuccessResponse CreateNotification(ctx).Notification(notification).Execute() +> App CreateApp(ctx).App(app).Execute() -Create notification +Create an app ### Authorization -[app_key](../README.md#app_key) +[user_auth_key](../README.md#user_auth_key) ### Example @@ -296,21 +300,20 @@ import ( ) func main() { - notification := *onesignal.NewNotification("AppId_example") // Notification | + app := *onesignal.NewApp() // App | configuration := onesignal.NewConfiguration() apiClient := onesignal.NewAPIClient(configuration) - appAuth := context.WithValue(context.Background(), onesignal.AppAuth, "REST_API_KEY") // App REST API key required for most endpoints - resp, r, err := apiClient.DefaultApi.CreateNotification(appAuth).Notification(notification).Execute() + resp, r, err := apiClient.DefaultApi.CreateApp().App(app).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.CreateNotification``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.CreateApp``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } - // response from `CreateNotification`: CreateNotificationSuccessResponse - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.CreateNotification`: %v\n", resp) + // response from `CreateApp`: App + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.CreateApp`: %v\n", resp) } ``` @@ -320,16 +323,16 @@ func main() { ### Other Parameters -Other parameters are passed through a pointer to a apiCreateNotificationRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiCreateAppRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **notification** | [**Notification**](Notification.md) | | + **app** | [**App**](App.md) | | ### Return type -[**CreateNotificationSuccessResponse**](CreateNotificationSuccessResponse.md) +[**App**](App.md) ### HTTP request headers @@ -341,17 +344,17 @@ Name | Type | Description | Notes [[Back to README]](../README.md) -## CreatePlayer +## CreateNotification -> CreatePlayerSuccessResponse CreatePlayer(ctx).Player(player).Execute() +> CreateNotificationSuccessResponse CreateNotification(ctx).Notification(notification).Execute() -Add a device +Create notification ### Authorization -[app_key](../README.md#app_key) +[rest_api_key](../README.md#rest_api_key) ### Example @@ -367,21 +370,20 @@ import ( ) func main() { - player := *onesignal.NewPlayer(int32(123)) // Player | + notification := *onesignal.NewNotification("AppId_example") // Notification | configuration := onesignal.NewConfiguration() apiClient := onesignal.NewAPIClient(configuration) - appAuth := context.WithValue(context.Background(), onesignal.AppAuth, "REST_API_KEY") // App REST API key required for most endpoints - resp, r, err := apiClient.DefaultApi.CreatePlayer(appAuth).Player(player).Execute() + resp, r, err := apiClient.DefaultApi.CreateNotification().Notification(notification).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.CreatePlayer``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.CreateNotification``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } - // response from `CreatePlayer`: CreatePlayerSuccessResponse - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.CreatePlayer`: %v\n", resp) + // response from `CreateNotification`: CreateNotificationSuccessResponse + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.CreateNotification`: %v\n", resp) } ``` @@ -391,16 +393,16 @@ func main() { ### Other Parameters -Other parameters are passed through a pointer to a apiCreatePlayerRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiCreateNotificationRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **player** | [**Player**](Player.md) | | + **notification** | [**Notification**](Notification.md) | | ### Return type -[**CreatePlayerSuccessResponse**](CreatePlayerSuccessResponse.md) +[**CreateNotificationSuccessResponse**](CreateNotificationSuccessResponse.md) ### HTTP request headers @@ -412,17 +414,17 @@ Name | Type | Description | Notes [[Back to README]](../README.md) -## CreateSegments +## CreateSegment -> CreateSegmentSuccessResponse CreateSegments(ctx, appId).Segment(segment).Execute() +> CreateSegmentSuccessResponse CreateSegment(ctx, appId).Segment(segment).Execute() -Create Segments +Create Segment ### Authorization -[app_key](../README.md#app_key) +[rest_api_key](../README.md#rest_api_key) ### Example @@ -439,21 +441,20 @@ import ( func main() { appId := "appId_example" // string | The OneSignal App ID for your app. Available in Keys & IDs. - segment := *onesignal.NewSegment("Name_example", []onesignal.FilterExpressions{*onesignal.NewFilterExpressions("Field_example", "Relation_example")}) // Segment | (optional) + segment := *onesignal.NewSegment("Name_example", []onesignal.FilterExpression{onesignal.FilterExpression{Filter: onesignal.NewFilter()}}) // Segment | (optional) configuration := onesignal.NewConfiguration() apiClient := onesignal.NewAPIClient(configuration) - appAuth := context.WithValue(context.Background(), onesignal.AppAuth, "REST_API_KEY") // App REST API key required for most endpoints - resp, r, err := apiClient.DefaultApi.CreateSegments(appAuth, appId).Segment(segment).Execute() + resp, r, err := apiClient.DefaultApi.CreateSegment(, appId).Segment(segment).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.CreateSegments``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.CreateSegment``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } - // response from `CreateSegments`: CreateSegmentSuccessResponse - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.CreateSegments`: %v\n", resp) + // response from `CreateSegment`: CreateSegmentSuccessResponse + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.CreateSegment`: %v\n", resp) } ``` @@ -467,7 +468,7 @@ Name | Type | Description | Notes ### Other Parameters -Other parameters are passed through a pointer to a apiCreateSegmentsRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiCreateSegmentRequest struct via the builder pattern Name | Type | Description | Notes @@ -491,7 +492,7 @@ Name | Type | Description | Notes ## CreateSubscription -> InlineResponse201 CreateSubscription(ctx, appId, aliasLabel, aliasId).CreateSubscriptionRequestBody(createSubscriptionRequestBody).Execute() +> SubscriptionBody CreateSubscription(ctx, appId, aliasLabel, aliasId).SubscriptionBody(subscriptionBody).Execute() @@ -499,7 +500,7 @@ Name | Type | Description | Notes ### Authorization -[app_key](../README.md#app_key) +[rest_api_key](../README.md#rest_api_key) ### Example @@ -518,20 +519,19 @@ func main() { appId := "appId_example" // string | aliasLabel := "aliasLabel_example" // string | aliasId := "aliasId_example" // string | - createSubscriptionRequestBody := *onesignal.NewCreateSubscriptionRequestBody() // CreateSubscriptionRequestBody | + subscriptionBody := *onesignal.NewSubscriptionBody() // SubscriptionBody | configuration := onesignal.NewConfiguration() apiClient := onesignal.NewAPIClient(configuration) - appAuth := context.WithValue(context.Background(), onesignal.AppAuth, "REST_API_KEY") // App REST API key required for most endpoints - resp, r, err := apiClient.DefaultApi.CreateSubscription(appAuth, appId, aliasLabel, aliasId).CreateSubscriptionRequestBody(createSubscriptionRequestBody).Execute() + resp, r, err := apiClient.DefaultApi.CreateSubscription(, appId, aliasLabel, aliasId).SubscriptionBody(subscriptionBody).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.CreateSubscription``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } - // response from `CreateSubscription`: InlineResponse201 + // response from `CreateSubscription`: SubscriptionBody fmt.Fprintf(os.Stdout, "Response from `DefaultApi.CreateSubscription`: %v\n", resp) } ``` @@ -556,11 +556,11 @@ Name | Type | Description | Notes - **createSubscriptionRequestBody** | [**CreateSubscriptionRequestBody**](CreateSubscriptionRequestBody.md) | | + **subscriptionBody** | [**SubscriptionBody**](SubscriptionBody.md) | | ### Return type -[**InlineResponse201**](InlineResponse201.md) +[**SubscriptionBody**](SubscriptionBody.md) ### HTTP request headers @@ -582,7 +582,7 @@ Name | Type | Description | Notes ### Authorization -[app_key](../README.md#app_key) +[rest_api_key](../README.md#rest_api_key) ### Example @@ -604,9 +604,8 @@ func main() { configuration := onesignal.NewConfiguration() apiClient := onesignal.NewAPIClient(configuration) - appAuth := context.WithValue(context.Background(), onesignal.AppAuth, "REST_API_KEY") // App REST API key required for most endpoints - resp, r, err := apiClient.DefaultApi.CreateUser(appAuth, appId).User(user).Execute() + resp, r, err := apiClient.DefaultApi.CreateUser(, appId).User(user).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.CreateUser``: %v\n", err) @@ -651,7 +650,7 @@ Name | Type | Description | Notes ## DeleteAlias -> InlineResponse200 DeleteAlias(ctx, appId, aliasLabel, aliasId, aliasLabelToDelete).Execute() +> UserIdentityBody DeleteAlias(ctx, appId, aliasLabel, aliasId, aliasLabelToDelete).Execute() @@ -659,7 +658,7 @@ Name | Type | Description | Notes ### Authorization -[app_key](../README.md#app_key) +[rest_api_key](../README.md#rest_api_key) ### Example @@ -683,15 +682,14 @@ func main() { configuration := onesignal.NewConfiguration() apiClient := onesignal.NewAPIClient(configuration) - appAuth := context.WithValue(context.Background(), onesignal.AppAuth, "REST_API_KEY") // App REST API key required for most endpoints - resp, r, err := apiClient.DefaultApi.DeleteAlias(appAuth, appId, aliasLabel, aliasId, aliasLabelToDelete).Execute() + resp, r, err := apiClient.DefaultApi.DeleteAlias(, appId, aliasLabel, aliasId, aliasLabelToDelete).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.DeleteAlias``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } - // response from `DeleteAlias`: InlineResponse200 + // response from `DeleteAlias`: UserIdentityBody fmt.Fprintf(os.Stdout, "Response from `DefaultApi.DeleteAlias`: %v\n", resp) } ``` @@ -721,7 +719,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse200**](InlineResponse200.md) +[**UserIdentityBody**](UserIdentityBody.md) ### HTTP request headers @@ -733,17 +731,17 @@ Name | Type | Description | Notes [[Back to README]](../README.md) -## DeletePlayer +## DeleteSegment -> DeletePlayerSuccessResponse DeletePlayer(ctx, playerId).AppId(appId).Execute() +> GenericSuccessBoolResponse DeleteSegment(ctx, appId, segmentId).Execute() -Delete a user record +Delete Segment ### Authorization -[app_key](../README.md#app_key) +[rest_api_key](../README.md#rest_api_key) ### Example @@ -760,21 +758,20 @@ import ( func main() { appId := "appId_example" // string | The OneSignal App ID for your app. Available in Keys & IDs. - playerId := "playerId_example" // string | The OneSignal player_id + segmentId := "segmentId_example" // string | The segment_id can be found in the URL of the segment when viewing it in the dashboard. configuration := onesignal.NewConfiguration() apiClient := onesignal.NewAPIClient(configuration) - appAuth := context.WithValue(context.Background(), onesignal.AppAuth, "REST_API_KEY") // App REST API key required for most endpoints - resp, r, err := apiClient.DefaultApi.DeletePlayer(appAuth, playerId).AppId(appId).Execute() + resp, r, err := apiClient.DefaultApi.DeleteSegment(, appId, segmentId).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.DeletePlayer``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.DeleteSegment``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } - // response from `DeletePlayer`: DeletePlayerSuccessResponse - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.DeletePlayer`: %v\n", resp) + // response from `DeleteSegment`: GenericSuccessBoolResponse + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.DeleteSegment`: %v\n", resp) } ``` @@ -784,21 +781,22 @@ func main() { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**playerId** | **string** | The OneSignal player_id | +**appId** | **string** | The OneSignal App ID for your app. Available in Keys & IDs. | +**segmentId** | **string** | The segment_id can be found in the URL of the segment when viewing it in the dashboard. | ### Other Parameters -Other parameters are passed through a pointer to a apiDeletePlayerRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiDeleteSegmentRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **appId** | **string** | The OneSignal App ID for your app. Available in Keys & IDs. | + ### Return type -[**DeletePlayerSuccessResponse**](DeletePlayerSuccessResponse.md) +[**GenericSuccessBoolResponse**](GenericSuccessBoolResponse.md) ### HTTP request headers @@ -810,17 +808,17 @@ Name | Type | Description | Notes [[Back to README]](../README.md) -## DeleteSegments +## DeleteSubscription + +> DeleteSubscription(ctx, appId, subscriptionId).Execute() -> DeleteSegmentSuccessResponse DeleteSegments(ctx, appId, segmentId).Execute() -Delete Segments ### Authorization -[app_key](../README.md#app_key) +[rest_api_key](../README.md#rest_api_key) ### Example @@ -836,22 +834,19 @@ import ( ) func main() { - appId := "appId_example" // string | The OneSignal App ID for your app. Available in Keys & IDs. - segmentId := "segmentId_example" // string | The segment_id can be found in the URL of the segment when viewing it in the dashboard. + appId := "appId_example" // string | + subscriptionId := "subscriptionId_example" // string | configuration := onesignal.NewConfiguration() apiClient := onesignal.NewAPIClient(configuration) - appAuth := context.WithValue(context.Background(), onesignal.AppAuth, "REST_API_KEY") // App REST API key required for most endpoints - resp, r, err := apiClient.DefaultApi.DeleteSegments(appAuth, appId, segmentId).Execute() + resp, r, err := apiClient.DefaultApi.DeleteSubscription(, appId, subscriptionId).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.DeleteSegments``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.DeleteSubscription``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } - // response from `DeleteSegments`: DeleteSegmentSuccessResponse - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.DeleteSegments`: %v\n", resp) } ``` @@ -861,12 +856,12 @@ func main() { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**appId** | **string** | The OneSignal App ID for your app. Available in Keys & IDs. | -**segmentId** | **string** | The segment_id can be found in the URL of the segment when viewing it in the dashboard. | +**appId** | **string** | | +**subscriptionId** | **string** | | ### Other Parameters -Other parameters are passed through a pointer to a apiDeleteSegmentsRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiDeleteSubscriptionRequest struct via the builder pattern Name | Type | Description | Notes @@ -876,7 +871,7 @@ Name | Type | Description | Notes ### Return type -[**DeleteSegmentSuccessResponse**](DeleteSegmentSuccessResponse.md) + (empty response body) ### HTTP request headers @@ -888,9 +883,9 @@ Name | Type | Description | Notes [[Back to README]](../README.md) -## DeleteSubscription +## DeleteUser -> DeleteSubscription(ctx, appId, subscriptionId).Execute() +> DeleteUser(ctx, appId, aliasLabel, aliasId).Execute() @@ -898,7 +893,7 @@ Name | Type | Description | Notes ### Authorization -[app_key](../README.md#app_key) +[rest_api_key](../README.md#rest_api_key) ### Example @@ -915,17 +910,17 @@ import ( func main() { appId := "appId_example" // string | - subscriptionId := "subscriptionId_example" // string | + aliasLabel := "aliasLabel_example" // string | + aliasId := "aliasId_example" // string | configuration := onesignal.NewConfiguration() apiClient := onesignal.NewAPIClient(configuration) - appAuth := context.WithValue(context.Background(), onesignal.AppAuth, "REST_API_KEY") // App REST API key required for most endpoints - resp, r, err := apiClient.DefaultApi.DeleteSubscription(appAuth, appId, subscriptionId).Execute() + resp, r, err := apiClient.DefaultApi.DeleteUser(, appId, aliasLabel, aliasId).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.DeleteSubscription``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.DeleteUser``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } } @@ -938,11 +933,12 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. **appId** | **string** | | -**subscriptionId** | **string** | | +**aliasLabel** | **string** | | +**aliasId** | **string** | | ### Other Parameters -Other parameters are passed through a pointer to a apiDeleteSubscriptionRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiDeleteUserRequest struct via the builder pattern Name | Type | Description | Notes @@ -950,6 +946,7 @@ Name | Type | Description | Notes + ### Return type (empty response body) @@ -964,17 +961,17 @@ Name | Type | Description | Notes [[Back to README]](../README.md) -## DeleteUser - -> DeleteUser(ctx, appId, aliasLabel, aliasId).Execute() +## ExportEvents +> ExportEventsSuccessResponse ExportEvents(ctx, notificationId).AppId(appId).Execute() +Export CSV of Events ### Authorization -[app_key](../README.md#app_key) +[rest_api_key](../README.md#rest_api_key) ### Example @@ -990,21 +987,21 @@ import ( ) func main() { - appId := "appId_example" // string | - aliasLabel := "aliasLabel_example" // string | - aliasId := "aliasId_example" // string | + notificationId := "notificationId_example" // string | The ID of the notification to export events from. + appId := "appId_example" // string | The ID of the app that the notification belongs to. configuration := onesignal.NewConfiguration() apiClient := onesignal.NewAPIClient(configuration) - appAuth := context.WithValue(context.Background(), onesignal.AppAuth, "REST_API_KEY") // App REST API key required for most endpoints - resp, r, err := apiClient.DefaultApi.DeleteUser(appAuth, appId, aliasLabel, aliasId).Execute() + resp, r, err := apiClient.DefaultApi.ExportEvents(, notificationId).AppId(appId).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.DeleteUser``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.ExportEvents``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } + // response from `ExportEvents`: ExportEventsSuccessResponse + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.ExportEvents`: %v\n", resp) } ``` @@ -1014,24 +1011,21 @@ func main() { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**appId** | **string** | | -**aliasLabel** | **string** | | -**aliasId** | **string** | | +**notificationId** | **string** | The ID of the notification to export events from. | ### Other Parameters -Other parameters are passed through a pointer to a apiDeleteUserRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiExportEventsRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - - + **appId** | **string** | The ID of the app that the notification belongs to. | ### Return type - (empty response body) +[**ExportEventsSuccessResponse**](ExportEventsSuccessResponse.md) ### HTTP request headers @@ -1043,17 +1037,17 @@ Name | Type | Description | Notes [[Back to README]](../README.md) -## EndLiveActivity +## ExportSubscriptions -> EndLiveActivity(ctx, appId, activityId, subscriptionId).Execute() +> ExportSubscriptionsSuccessResponse ExportSubscriptions(ctx, appId).ExportSubscriptionsRequestBody(exportSubscriptionsRequestBody).Execute() -Stop Live Activity +Export CSV of Subscriptions ### Authorization -[app_key](../README.md#app_key) +[rest_api_key](../README.md#rest_api_key) ### Example @@ -1069,21 +1063,21 @@ import ( ) func main() { - appId := "appId_example" // string | The OneSignal App ID for your app. Available in Keys & IDs. - activityId := "activityId_example" // string | Live Activity record ID - subscriptionId := "subscriptionId_example" // string | Subscription ID + appId := "appId_example" // string | The app ID that you want to export devices from + exportSubscriptionsRequestBody := *onesignal.NewExportSubscriptionsRequestBody() // ExportSubscriptionsRequestBody | (optional) configuration := onesignal.NewConfiguration() apiClient := onesignal.NewAPIClient(configuration) - appAuth := context.WithValue(context.Background(), onesignal.AppAuth, "REST_API_KEY") // App REST API key required for most endpoints - resp, r, err := apiClient.DefaultApi.EndLiveActivity(appAuth, appId, activityId, subscriptionId).Execute() + resp, r, err := apiClient.DefaultApi.ExportSubscriptions(, appId).ExportSubscriptionsRequestBody(exportSubscriptionsRequestBody).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.EndLiveActivity``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.ExportSubscriptions``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } + // response from `ExportSubscriptions`: ExportSubscriptionsSuccessResponse + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.ExportSubscriptions`: %v\n", resp) } ``` @@ -1093,28 +1087,25 @@ func main() { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**appId** | **string** | The OneSignal App ID for your app. Available in Keys & IDs. | -**activityId** | **string** | Live Activity record ID | -**subscriptionId** | **string** | Subscription ID | +**appId** | **string** | The app ID that you want to export devices from | ### Other Parameters -Other parameters are passed through a pointer to a apiEndLiveActivityRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiExportSubscriptionsRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - - + **exportSubscriptionsRequestBody** | [**ExportSubscriptionsRequestBody**](ExportSubscriptionsRequestBody.md) | | ### Return type - (empty response body) +[**ExportSubscriptionsSuccessResponse**](ExportSubscriptionsSuccessResponse.md) ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) @@ -1122,17 +1113,17 @@ Name | Type | Description | Notes [[Back to README]](../README.md) -## ExportEvents +## GetAliases + +> UserIdentityBody GetAliases(ctx, appId, aliasLabel, aliasId).Execute() -> ExportEventsSuccessResponse ExportEvents(ctx, notificationId).AppId(appId).Execute() -Export CSV of Events ### Authorization -[app_key](../README.md#app_key) +[rest_api_key](../README.md#rest_api_key) ### Example @@ -1148,22 +1139,22 @@ import ( ) func main() { - notificationId := "notificationId_example" // string | The ID of the notification to export events from. - appId := "appId_example" // string | The ID of the app that the notification belongs to. + appId := "appId_example" // string | + aliasLabel := "aliasLabel_example" // string | + aliasId := "aliasId_example" // string | configuration := onesignal.NewConfiguration() apiClient := onesignal.NewAPIClient(configuration) - appAuth := context.WithValue(context.Background(), onesignal.AppAuth, "REST_API_KEY") // App REST API key required for most endpoints - resp, r, err := apiClient.DefaultApi.ExportEvents(appAuth, notificationId).AppId(appId).Execute() + resp, r, err := apiClient.DefaultApi.GetAliases(, appId, aliasLabel, aliasId).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.ExportEvents``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.GetAliases``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } - // response from `ExportEvents`: ExportEventsSuccessResponse - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.ExportEvents`: %v\n", resp) + // response from `GetAliases`: UserIdentityBody + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.GetAliases`: %v\n", resp) } ``` @@ -1173,21 +1164,24 @@ func main() { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**notificationId** | **string** | The ID of the notification to export events from. | +**appId** | **string** | | +**aliasLabel** | **string** | | +**aliasId** | **string** | | ### Other Parameters -Other parameters are passed through a pointer to a apiExportEventsRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiGetAliasesRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **appId** | **string** | The ID of the app that the notification belongs to. | + + ### Return type -[**ExportEventsSuccessResponse**](ExportEventsSuccessResponse.md) +[**UserIdentityBody**](UserIdentityBody.md) ### HTTP request headers @@ -1199,17 +1193,17 @@ Name | Type | Description | Notes [[Back to README]](../README.md) -## ExportPlayers +## GetAliasesBySubscription + +> UserIdentityBody GetAliasesBySubscription(ctx, appId, subscriptionId).Execute() -> ExportPlayersSuccessResponse ExportPlayers(ctx, appId).ExportPlayersRequestBody(exportPlayersRequestBody).Execute() -Export CSV of Players ### Authorization -[app_key](../README.md#app_key) +[rest_api_key](../README.md#rest_api_key) ### Example @@ -1225,22 +1219,21 @@ import ( ) func main() { - appId := "appId_example" // string | The app ID that you want to export devices from - exportPlayersRequestBody := *onesignal.NewExportPlayersRequestBody() // ExportPlayersRequestBody | (optional) + appId := "appId_example" // string | + subscriptionId := "subscriptionId_example" // string | configuration := onesignal.NewConfiguration() apiClient := onesignal.NewAPIClient(configuration) - appAuth := context.WithValue(context.Background(), onesignal.AppAuth, "REST_API_KEY") // App REST API key required for most endpoints - resp, r, err := apiClient.DefaultApi.ExportPlayers(appAuth, appId).ExportPlayersRequestBody(exportPlayersRequestBody).Execute() + resp, r, err := apiClient.DefaultApi.GetAliasesBySubscription(, appId, subscriptionId).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.ExportPlayers``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.GetAliasesBySubscription``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } - // response from `ExportPlayers`: ExportPlayersSuccessResponse - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.ExportPlayers`: %v\n", resp) + // response from `GetAliasesBySubscription`: UserIdentityBody + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.GetAliasesBySubscription`: %v\n", resp) } ``` @@ -1250,25 +1243,26 @@ func main() { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**appId** | **string** | The app ID that you want to export devices from | +**appId** | **string** | | +**subscriptionId** | **string** | | ### Other Parameters -Other parameters are passed through a pointer to a apiExportPlayersRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiGetAliasesBySubscriptionRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **exportPlayersRequestBody** | [**ExportPlayersRequestBody**](ExportPlayersRequestBody.md) | | + ### Return type -[**ExportPlayersSuccessResponse**](ExportPlayersSuccessResponse.md) +[**UserIdentityBody**](UserIdentityBody.md) ### HTTP request headers -- **Content-Type**: application/json +- **Content-Type**: Not defined - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) @@ -1276,17 +1270,17 @@ Name | Type | Description | Notes [[Back to README]](../README.md) -## FetchAliases - -> UserIdentityResponse FetchAliases(ctx, appId, subscriptionId).Execute() +## GetApp +> App GetApp(ctx, appId).Execute() +View an app ### Authorization -[app_key](../README.md#app_key) +[user_auth_key](../README.md#user_auth_key) ### Example @@ -1302,22 +1296,20 @@ import ( ) func main() { - appId := "appId_example" // string | - subscriptionId := "subscriptionId_example" // string | + appId := "appId_example" // string | An app id configuration := onesignal.NewConfiguration() apiClient := onesignal.NewAPIClient(configuration) - appAuth := context.WithValue(context.Background(), onesignal.AppAuth, "REST_API_KEY") // App REST API key required for most endpoints - resp, r, err := apiClient.DefaultApi.FetchAliases(appAuth, appId, subscriptionId).Execute() + resp, r, err := apiClient.DefaultApi.GetApp(, appId).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.FetchAliases``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.GetApp``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } - // response from `FetchAliases`: UserIdentityResponse - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.FetchAliases`: %v\n", resp) + // response from `GetApp`: App + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.GetApp`: %v\n", resp) } ``` @@ -1327,22 +1319,20 @@ func main() { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**appId** | **string** | | -**subscriptionId** | **string** | | +**appId** | **string** | An app id | ### Other Parameters -Other parameters are passed through a pointer to a apiFetchAliasesRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiGetAppRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - ### Return type -[**UserIdentityResponse**](UserIdentityResponse.md) +[**App**](App.md) ### HTTP request headers @@ -1354,17 +1344,17 @@ Name | Type | Description | Notes [[Back to README]](../README.md) -## FetchUser - -> User FetchUser(ctx, appId, aliasLabel, aliasId).Execute() +## GetApps +> []App GetApps(ctx).Execute() +View apps ### Authorization -[app_key](../README.md#app_key) +[user_auth_key](../README.md#user_auth_key) ### Example @@ -1380,50 +1370,34 @@ import ( ) func main() { - appId := "appId_example" // string | - aliasLabel := "aliasLabel_example" // string | - aliasId := "aliasId_example" // string | configuration := onesignal.NewConfiguration() apiClient := onesignal.NewAPIClient(configuration) - appAuth := context.WithValue(context.Background(), onesignal.AppAuth, "REST_API_KEY") // App REST API key required for most endpoints - resp, r, err := apiClient.DefaultApi.FetchUser(appAuth, appId, aliasLabel, aliasId).Execute() + resp, r, err := apiClient.DefaultApi.GetApps().Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.FetchUser``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.GetApps``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } - // response from `FetchUser`: User - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.FetchUser`: %v\n", resp) + // response from `GetApps`: []App + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.GetApps`: %v\n", resp) } ``` ### Path Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**appId** | **string** | | -**aliasLabel** | **string** | | -**aliasId** | **string** | | +This endpoint does not need any parameter. ### Other Parameters -Other parameters are passed through a pointer to a apiFetchUserRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - +Other parameters are passed through a pointer to a apiGetAppsRequest struct via the builder pattern ### Return type -[**User**](User.md) +[**[]App**](App.md) ### HTTP request headers @@ -1435,17 +1409,17 @@ Name | Type | Description | Notes [[Back to README]](../README.md) -## FetchUserIdentity - -> InlineResponse200 FetchUserIdentity(ctx, appId, aliasLabel, aliasId).Execute() +## GetNotification +> NotificationWithMeta GetNotification(ctx, notificationId).AppId(appId).Execute() +View notification ### Authorization -[app_key](../README.md#app_key) +[rest_api_key](../README.md#rest_api_key) ### Example @@ -1462,22 +1436,20 @@ import ( func main() { appId := "appId_example" // string | - aliasLabel := "aliasLabel_example" // string | - aliasId := "aliasId_example" // string | + notificationId := "notificationId_example" // string | configuration := onesignal.NewConfiguration() apiClient := onesignal.NewAPIClient(configuration) - appAuth := context.WithValue(context.Background(), onesignal.AppAuth, "REST_API_KEY") // App REST API key required for most endpoints - resp, r, err := apiClient.DefaultApi.FetchUserIdentity(appAuth, appId, aliasLabel, aliasId).Execute() + resp, r, err := apiClient.DefaultApi.GetNotification(, notificationId).AppId(appId).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.FetchUserIdentity``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.GetNotification``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } - // response from `FetchUserIdentity`: InlineResponse200 - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.FetchUserIdentity`: %v\n", resp) + // response from `GetNotification`: NotificationWithMeta + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.GetNotification`: %v\n", resp) } ``` @@ -1487,24 +1459,21 @@ func main() { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**appId** | **string** | | -**aliasLabel** | **string** | | -**aliasId** | **string** | | +**notificationId** | **string** | | ### Other Parameters -Other parameters are passed through a pointer to a apiFetchUserIdentityRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiGetNotificationRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - - + **appId** | **string** | | ### Return type -[**InlineResponse200**](InlineResponse200.md) +[**NotificationWithMeta**](NotificationWithMeta.md) ### HTTP request headers @@ -1516,17 +1485,17 @@ Name | Type | Description | Notes [[Back to README]](../README.md) -## GetApp +## GetNotificationHistory -> App GetApp(ctx, appId).Execute() +> NotificationHistorySuccessResponse GetNotificationHistory(ctx, notificationId).GetNotificationHistoryRequestBody(getNotificationHistoryRequestBody).Execute() -View an app +Notification History ### Authorization -[user_key](../README.md#user_key) +[rest_api_key](../README.md#rest_api_key) ### Example @@ -1542,311 +1511,14 @@ import ( ) func main() { - appId := "appId_example" // string | An app id + notificationId := "notificationId_example" // string | The \"id\" of the message found in the Notification object + getNotificationHistoryRequestBody := *onesignal.NewGetNotificationHistoryRequestBody() // GetNotificationHistoryRequestBody | configuration := onesignal.NewConfiguration() apiClient := onesignal.NewAPIClient(configuration) - userAuth := context.WithValue(context.Background(), onesignal.UserAuth, "ORGANIZATION_API_KEY") // Organization key is only required for creating new apps and other top-level endpoints - resp, r, err := apiClient.DefaultApi.GetApp(userAuth, appId).Execute() - - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.GetApp``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetApp`: App - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.GetApp`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**appId** | **string** | An app id | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetAppRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[**App**](App.md) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetApps - -> []App GetApps(ctx).Execute() - -View apps - - - -### Authorization - -[user_key](../README.md#user_key) - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - - "github.com/OneSignal/onesignal-go-api" -) - -func main() { - - configuration := onesignal.NewConfiguration() - apiClient := onesignal.NewAPIClient(configuration) - - userAuth := context.WithValue(context.Background(), onesignal.UserAuth, "ORGANIZATION_API_KEY") // Organization key is only required for creating new apps and other top-level endpoints - - resp, r, err := apiClient.DefaultApi.GetApps(userAuth).Execute() - - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.GetApps``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetApps`: []App - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.GetApps`: %v\n", resp) -} -``` - -### Path Parameters - -This endpoint does not need any parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetAppsRequest struct via the builder pattern - - -### Return type - -[**[]App**](App.md) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetEligibleIams - -> InlineResponse2003 GetEligibleIams(ctx, appId, subscriptionId).Execute() - - - - - -### Authorization - -[app_key](../README.md#app_key) - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - - "github.com/OneSignal/onesignal-go-api" -) - -func main() { - appId := "appId_example" // string | - subscriptionId := "subscriptionId_example" // string | - - configuration := onesignal.NewConfiguration() - apiClient := onesignal.NewAPIClient(configuration) - - appAuth := context.WithValue(context.Background(), onesignal.AppAuth, "REST_API_KEY") // App REST API key required for most endpoints - - resp, r, err := apiClient.DefaultApi.GetEligibleIams(appAuth, appId, subscriptionId).Execute() - - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.GetEligibleIams``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetEligibleIams`: InlineResponse2003 - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.GetEligibleIams`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**appId** | **string** | | -**subscriptionId** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetEligibleIamsRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - -### Return type - -[**InlineResponse2003**](InlineResponse2003.md) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetNotification - -> NotificationWithMeta GetNotification(ctx, notificationId).AppId(appId).Execute() - -View notification - - - -### Authorization - -[app_key](../README.md#app_key) - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - - "github.com/OneSignal/onesignal-go-api" -) - -func main() { - appId := "appId_example" // string | - notificationId := "notificationId_example" // string | - - configuration := onesignal.NewConfiguration() - apiClient := onesignal.NewAPIClient(configuration) - - appAuth := context.WithValue(context.Background(), onesignal.AppAuth, "REST_API_KEY") // App REST API key required for most endpoints - - resp, r, err := apiClient.DefaultApi.GetNotification(appAuth, notificationId).AppId(appId).Execute() - - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.GetNotification``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetNotification`: NotificationWithMeta - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.GetNotification`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**notificationId** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetNotificationRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **appId** | **string** | | - - -### Return type - -[**NotificationWithMeta**](NotificationWithMeta.md) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetNotificationHistory - -> NotificationHistorySuccessResponse GetNotificationHistory(ctx, notificationId).GetNotificationRequestBody(getNotificationRequestBody).Execute() - -Notification History - - - -### Authorization - -[app_key](../README.md#app_key) - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - - "github.com/OneSignal/onesignal-go-api" -) - -func main() { - notificationId := "notificationId_example" // string | The \"id\" of the message found in the Notification object - getNotificationRequestBody := *onesignal.NewGetNotificationRequestBody() // GetNotificationRequestBody | - - configuration := onesignal.NewConfiguration() - apiClient := onesignal.NewAPIClient(configuration) - - appAuth := context.WithValue(context.Background(), onesignal.AppAuth, "REST_API_KEY") // App REST API key required for most endpoints - - resp, r, err := apiClient.DefaultApi.GetNotificationHistory(appAuth, notificationId).GetNotificationRequestBody(getNotificationRequestBody).Execute() + resp, r, err := apiClient.DefaultApi.GetNotificationHistory(, notificationId).GetNotificationHistoryRequestBody(getNotificationHistoryRequestBody).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.GetNotificationHistory``: %v\n", err) @@ -1873,7 +1545,7 @@ Other parameters are passed through a pointer to a apiGetNotificationHistoryRequ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **getNotificationRequestBody** | [**GetNotificationRequestBody**](GetNotificationRequestBody.md) | | + **getNotificationHistoryRequestBody** | [**GetNotificationHistoryRequestBody**](GetNotificationHistoryRequestBody.md) | | ### Return type @@ -1899,7 +1571,7 @@ View notifications ### Authorization -[app_key](../README.md#app_key) +[rest_api_key](../README.md#rest_api_key) ### Example @@ -1923,9 +1595,8 @@ func main() { configuration := onesignal.NewConfiguration() apiClient := onesignal.NewAPIClient(configuration) - appAuth := context.WithValue(context.Background(), onesignal.AppAuth, "REST_API_KEY") // App REST API key required for most endpoints - resp, r, err := apiClient.DefaultApi.GetNotifications(appAuth).AppId(appId).Limit(limit).Offset(offset).Kind(kind).Execute() + resp, r, err := apiClient.DefaultApi.GetNotifications().AppId(appId).Limit(limit).Offset(offset).Kind(kind).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.GetNotifications``: %v\n", err) @@ -1976,7 +1647,7 @@ View Outcomes ### Authorization -[app_key](../README.md#app_key) +[rest_api_key](../README.md#rest_api_key) ### Example @@ -2002,9 +1673,8 @@ func main() { configuration := onesignal.NewConfiguration() apiClient := onesignal.NewAPIClient(configuration) - appAuth := context.WithValue(context.Background(), onesignal.AppAuth, "REST_API_KEY") // App REST API key required for most endpoints - resp, r, err := apiClient.DefaultApi.GetOutcomes(appAuth, appId).OutcomeNames(outcomeNames).OutcomeNames2(outcomeNames2).OutcomeTimeRange(outcomeTimeRange).OutcomePlatforms(outcomePlatforms).OutcomeAttribution(outcomeAttribution).Execute() + resp, r, err := apiClient.DefaultApi.GetOutcomes(, appId).OutcomeNames(outcomeNames).OutcomeNames2(outcomeNames2).OutcomeTimeRange(outcomeTimeRange).OutcomePlatforms(outcomePlatforms).OutcomeAttribution(outcomeAttribution).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.GetOutcomes``: %v\n", err) @@ -2051,17 +1721,17 @@ Name | Type | Description | Notes [[Back to README]](../README.md) -## GetPlayer +## GetSegments -> Player GetPlayer(ctx, playerId).AppId(appId).EmailAuthHash(emailAuthHash).Execute() +> GetSegmentsSuccessResponse GetSegments(ctx, appId).Offset(offset).Limit(limit).Execute() -View device +Get Segments ### Authorization -[app_key](../README.md#app_key) +[rest_api_key](../README.md#rest_api_key) ### Example @@ -2077,23 +1747,22 @@ import ( ) func main() { - appId := "appId_example" // string | Your app_id for this device - playerId := "playerId_example" // string | Player's OneSignal ID - emailAuthHash := "emailAuthHash_example" // string | Email - Only required if you have enabled Identity Verification and device_type is email (11). (optional) + appId := "appId_example" // string | The OneSignal App ID for your app. Available in Keys & IDs. + offset := int32(56) // int32 | 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) + limit := int32(56) // int32 | The amount of Segments in the response. Maximum 300. (optional) configuration := onesignal.NewConfiguration() apiClient := onesignal.NewAPIClient(configuration) - appAuth := context.WithValue(context.Background(), onesignal.AppAuth, "REST_API_KEY") // App REST API key required for most endpoints - resp, r, err := apiClient.DefaultApi.GetPlayer(appAuth, playerId).AppId(appId).EmailAuthHash(emailAuthHash).Execute() + resp, r, err := apiClient.DefaultApi.GetSegments(, appId).Offset(offset).Limit(limit).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.GetPlayer``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.GetSegments``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } - // response from `GetPlayer`: Player - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.GetPlayer`: %v\n", resp) + // response from `GetSegments`: GetSegmentsSuccessResponse + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.GetSegments`: %v\n", resp) } ``` @@ -2103,22 +1772,22 @@ func main() { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**playerId** | **string** | Player's OneSignal ID | +**appId** | **string** | The OneSignal App ID for your app. Available in Keys & IDs. | ### Other Parameters -Other parameters are passed through a pointer to a apiGetPlayerRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiGetSegmentsRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **appId** | **string** | Your app_id for this device | - **emailAuthHash** | **string** | Email - Only required if you have enabled Identity Verification and device_type is email (11). | + **offset** | **int32** | 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. | + **limit** | **int32** | The amount of Segments in the response. Maximum 300. | ### Return type -[**Player**](Player.md) +[**GetSegmentsSuccessResponse**](GetSegmentsSuccessResponse.md) ### HTTP request headers @@ -2130,84 +1799,9 @@ Name | Type | Description | Notes [[Back to README]](../README.md) -## GetPlayers - -> PlayerSlice GetPlayers(ctx).AppId(appId).Limit(limit).Offset(offset).Execute() - -View devices - - - -### Authorization - -[app_key](../README.md#app_key) - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" +## GetUser - "github.com/OneSignal/onesignal-go-api" -) - -func main() { - appId := "appId_example" // string | The app ID that you want to view players from - limit := int32(56) // int32 | How many devices to return. Max is 300. Default is 300 (optional) - offset := int32(56) // int32 | Result offset. Default is 0. Results are sorted by id; (optional) - - configuration := onesignal.NewConfiguration() - apiClient := onesignal.NewAPIClient(configuration) - - appAuth := context.WithValue(context.Background(), onesignal.AppAuth, "REST_API_KEY") // App REST API key required for most endpoints - - resp, r, err := apiClient.DefaultApi.GetPlayers(appAuth).AppId(appId).Limit(limit).Offset(offset).Execute() - - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.GetPlayers``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetPlayers`: PlayerSlice - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.GetPlayers`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetPlayersRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **appId** | **string** | The app ID that you want to view players from | - **limit** | **int32** | How many devices to return. Max is 300. Default is 300 | - **offset** | **int32** | Result offset. Default is 0. Results are sorted by id; | - -### Return type - -[**PlayerSlice**](PlayerSlice.md) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## IdentifyUserByAlias - -> InlineResponse200 IdentifyUserByAlias(ctx, appId, aliasLabel, aliasId).UserIdentityRequestBody(userIdentityRequestBody).Execute() +> User GetUser(ctx, appId, aliasLabel, aliasId).Execute() @@ -2215,7 +1809,7 @@ Name | Type | Description | Notes ### Authorization -[app_key](../README.md#app_key) +[rest_api_key](../README.md#rest_api_key) ### Example @@ -2234,21 +1828,19 @@ func main() { appId := "appId_example" // string | aliasLabel := "aliasLabel_example" // string | aliasId := "aliasId_example" // string | - userIdentityRequestBody := *onesignal.NewUserIdentityRequestBody() // UserIdentityRequestBody | configuration := onesignal.NewConfiguration() apiClient := onesignal.NewAPIClient(configuration) - appAuth := context.WithValue(context.Background(), onesignal.AppAuth, "REST_API_KEY") // App REST API key required for most endpoints - resp, r, err := apiClient.DefaultApi.IdentifyUserByAlias(appAuth, appId, aliasLabel, aliasId).UserIdentityRequestBody(userIdentityRequestBody).Execute() + resp, r, err := apiClient.DefaultApi.GetUser(, appId, aliasLabel, aliasId).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.IdentifyUserByAlias``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.GetUser``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } - // response from `IdentifyUserByAlias`: InlineResponse200 - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.IdentifyUserByAlias`: %v\n", resp) + // response from `GetUser`: User + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.GetUser`: %v\n", resp) } ``` @@ -2264,7 +1856,7 @@ Name | Type | Description | Notes ### Other Parameters -Other parameters are passed through a pointer to a apiIdentifyUserByAliasRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiGetUserRequest struct via the builder pattern Name | Type | Description | Notes @@ -2272,15 +1864,14 @@ Name | Type | Description | Notes - **userIdentityRequestBody** | [**UserIdentityRequestBody**](UserIdentityRequestBody.md) | | ### Return type -[**InlineResponse200**](InlineResponse200.md) +[**User**](User.md) ### HTTP request headers -- **Content-Type**: application/json +- **Content-Type**: Not defined - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) @@ -2288,9 +1879,9 @@ Name | Type | Description | Notes [[Back to README]](../README.md) -## IdentifyUserBySubscriptionId +## TransferSubscription -> UserIdentityResponse IdentifyUserBySubscriptionId(ctx, appId, subscriptionId).UserIdentityRequestBody(userIdentityRequestBody).Execute() +> UserIdentityBody TransferSubscription(ctx, appId, subscriptionId).TransferSubscriptionRequestBody(transferSubscriptionRequestBody).Execute() @@ -2298,7 +1889,7 @@ Name | Type | Description | Notes ### Authorization -[app_key](../README.md#app_key) +[rest_api_key](../README.md#rest_api_key) ### Example @@ -2316,21 +1907,20 @@ import ( func main() { appId := "appId_example" // string | subscriptionId := "subscriptionId_example" // string | - userIdentityRequestBody := *onesignal.NewUserIdentityRequestBody() // UserIdentityRequestBody | + transferSubscriptionRequestBody := *onesignal.NewTransferSubscriptionRequestBody() // TransferSubscriptionRequestBody | configuration := onesignal.NewConfiguration() apiClient := onesignal.NewAPIClient(configuration) - appAuth := context.WithValue(context.Background(), onesignal.AppAuth, "REST_API_KEY") // App REST API key required for most endpoints - resp, r, err := apiClient.DefaultApi.IdentifyUserBySubscriptionId(appAuth, appId, subscriptionId).UserIdentityRequestBody(userIdentityRequestBody).Execute() + resp, r, err := apiClient.DefaultApi.TransferSubscription(, appId, subscriptionId).TransferSubscriptionRequestBody(transferSubscriptionRequestBody).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.IdentifyUserBySubscriptionId``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.TransferSubscription``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } - // response from `IdentifyUserBySubscriptionId`: UserIdentityResponse - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.IdentifyUserBySubscriptionId`: %v\n", resp) + // response from `TransferSubscription`: UserIdentityBody + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.TransferSubscription`: %v\n", resp) } ``` @@ -2345,18 +1935,18 @@ Name | Type | Description | Notes ### Other Parameters -Other parameters are passed through a pointer to a apiIdentifyUserBySubscriptionIdRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiTransferSubscriptionRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **userIdentityRequestBody** | [**UserIdentityRequestBody**](UserIdentityRequestBody.md) | | + **transferSubscriptionRequestBody** | [**TransferSubscriptionRequestBody**](TransferSubscriptionRequestBody.md) | | ### Return type -[**UserIdentityResponse**](UserIdentityResponse.md) +[**UserIdentityBody**](UserIdentityBody.md) ### HTTP request headers @@ -2368,17 +1958,17 @@ Name | Type | Description | Notes [[Back to README]](../README.md) -## TransferSubscription - -> UserIdentityResponse TransferSubscription(ctx, appId, subscriptionId).TransferSubscriptionRequestBody(transferSubscriptionRequestBody).Execute() +## UnsubscribeEmailWithToken +> GenericSuccessBoolResponse UnsubscribeEmailWithToken(ctx, appId, notificationId).Token(token).Execute() +Unsubscribe with token ### Authorization -[app_key](../README.md#app_key) +[rest_api_key](../README.md#rest_api_key) ### Example @@ -2394,23 +1984,22 @@ import ( ) func main() { - appId := "appId_example" // string | - subscriptionId := "subscriptionId_example" // string | - transferSubscriptionRequestBody := *onesignal.NewTransferSubscriptionRequestBody() // TransferSubscriptionRequestBody | + appId := "appId_example" // string | The OneSignal App ID for your app. Available in Keys & IDs. + notificationId := "notificationId_example" // string | The id of the message found in the creation notification POST response, View Notifications GET response, or URL within the Message Report. + token := "token_example" // string | The unsubscribe token that is generated via liquid syntax in {{subscription.unsubscribe_token}} when personalizing an email. configuration := onesignal.NewConfiguration() apiClient := onesignal.NewAPIClient(configuration) - appAuth := context.WithValue(context.Background(), onesignal.AppAuth, "REST_API_KEY") // App REST API key required for most endpoints - resp, r, err := apiClient.DefaultApi.TransferSubscription(appAuth, appId, subscriptionId).TransferSubscriptionRequestBody(transferSubscriptionRequestBody).Execute() + resp, r, err := apiClient.DefaultApi.UnsubscribeEmailWithToken(, appId, notificationId).Token(token).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.TransferSubscription``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.UnsubscribeEmailWithToken``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } - // response from `TransferSubscription`: UserIdentityResponse - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.TransferSubscription`: %v\n", resp) + // response from `UnsubscribeEmailWithToken`: GenericSuccessBoolResponse + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.UnsubscribeEmailWithToken`: %v\n", resp) } ``` @@ -2420,27 +2009,27 @@ func main() { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**appId** | **string** | | -**subscriptionId** | **string** | | +**appId** | **string** | The OneSignal App ID for your app. Available in Keys & IDs. | +**notificationId** | **string** | The id of the message found in the creation notification POST response, View Notifications GET response, or URL within the Message Report. | ### Other Parameters -Other parameters are passed through a pointer to a apiTransferSubscriptionRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiUnsubscribeEmailWithTokenRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **transferSubscriptionRequestBody** | [**TransferSubscriptionRequestBody**](TransferSubscriptionRequestBody.md) | | + **token** | **string** | The unsubscribe token that is generated via liquid syntax in {{subscription.unsubscribe_token}} when personalizing an email. | ### Return type -[**UserIdentityResponse**](UserIdentityResponse.md) +[**GenericSuccessBoolResponse**](GenericSuccessBoolResponse.md) ### HTTP request headers -- **Content-Type**: application/json +- **Content-Type**: Not defined - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) @@ -2458,7 +2047,7 @@ Update an app ### Authorization -[user_key](../README.md#user_key) +[user_auth_key](../README.md#user_auth_key) ### Example @@ -2480,9 +2069,8 @@ func main() { configuration := onesignal.NewConfiguration() apiClient := onesignal.NewAPIClient(configuration) - userAuth := context.WithValue(context.Background(), onesignal.UserAuth, "ORGANIZATION_API_KEY") // Organization key is only required for creating new apps and other top-level endpoints - resp, r, err := apiClient.DefaultApi.UpdateApp(userAuth, appId).App(app).Execute() + resp, r, err := apiClient.DefaultApi.UpdateApp(, appId).App(app).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.UpdateApp``: %v\n", err) @@ -2535,7 +2123,7 @@ Update a Live Activity via Push ### Authorization -[app_key](../README.md#app_key) +[rest_api_key](../README.md#rest_api_key) ### Example @@ -2558,9 +2146,8 @@ func main() { configuration := onesignal.NewConfiguration() apiClient := onesignal.NewAPIClient(configuration) - appAuth := context.WithValue(context.Background(), onesignal.AppAuth, "REST_API_KEY") // App REST API key required for most endpoints - resp, r, err := apiClient.DefaultApi.UpdateLiveActivity(appAuth, appId, activityId).UpdateLiveActivityRequest(updateLiveActivityRequest).Execute() + resp, r, err := apiClient.DefaultApi.UpdateLiveActivity(, appId, activityId).UpdateLiveActivityRequest(updateLiveActivityRequest).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.UpdateLiveActivity``: %v\n", err) @@ -2605,166 +2192,9 @@ Name | Type | Description | Notes [[Back to README]](../README.md) -## UpdatePlayer - -> UpdatePlayerSuccessResponse UpdatePlayer(ctx, playerId).Player(player).Execute() - -Edit device - - - -### Authorization - -[app_key](../README.md#app_key) - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - - "github.com/OneSignal/onesignal-go-api" -) - -func main() { - playerId := "playerId_example" // string | Player's OneSignal ID - player := *onesignal.NewPlayer(int32(123)) // Player | - - configuration := onesignal.NewConfiguration() - apiClient := onesignal.NewAPIClient(configuration) - - appAuth := context.WithValue(context.Background(), onesignal.AppAuth, "REST_API_KEY") // App REST API key required for most endpoints - - resp, r, err := apiClient.DefaultApi.UpdatePlayer(appAuth, playerId).Player(player).Execute() - - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.UpdatePlayer``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `UpdatePlayer`: UpdatePlayerSuccessResponse - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.UpdatePlayer`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**playerId** | **string** | Player's OneSignal ID | - -### Other Parameters - -Other parameters are passed through a pointer to a apiUpdatePlayerRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **player** | [**Player**](Player.md) | | - -### Return type - -[**UpdatePlayerSuccessResponse**](UpdatePlayerSuccessResponse.md) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## UpdatePlayerTags - -> UpdatePlayerTagsSuccessResponse UpdatePlayerTags(ctx, appId, externalUserId).UpdatePlayerTagsRequestBody(updatePlayerTagsRequestBody).Execute() - -Edit tags with external user id - - - -### Authorization - -[app_key](../README.md#app_key) - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - - "github.com/OneSignal/onesignal-go-api" -) - -func main() { - appId := "appId_example" // string | The OneSignal App ID the user record is found under. - externalUserId := "externalUserId_example" // string | The External User ID mapped to teh device record in OneSignal. Must be actively set on the device to be updated. - updatePlayerTagsRequestBody := *onesignal.NewUpdatePlayerTagsRequestBody() // UpdatePlayerTagsRequestBody | (optional) - - configuration := onesignal.NewConfiguration() - apiClient := onesignal.NewAPIClient(configuration) - - appAuth := context.WithValue(context.Background(), onesignal.AppAuth, "REST_API_KEY") // App REST API key required for most endpoints - - resp, r, err := apiClient.DefaultApi.UpdatePlayerTags(appAuth, appId, externalUserId).UpdatePlayerTagsRequestBody(updatePlayerTagsRequestBody).Execute() - - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.UpdatePlayerTags``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `UpdatePlayerTags`: UpdatePlayerTagsSuccessResponse - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.UpdatePlayerTags`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**appId** | **string** | The OneSignal App ID the user record is found under. | -**externalUserId** | **string** | The External User ID mapped to teh device record in OneSignal. Must be actively set on the device to be updated. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiUpdatePlayerTagsRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - **updatePlayerTagsRequestBody** | [**UpdatePlayerTagsRequestBody**](UpdatePlayerTagsRequestBody.md) | | - -### Return type - -[**UpdatePlayerTagsSuccessResponse**](UpdatePlayerTagsSuccessResponse.md) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - ## UpdateSubscription -> UpdateSubscription(ctx, appId, subscriptionId).UpdateSubscriptionRequestBody(updateSubscriptionRequestBody).Execute() +> UpdateSubscription(ctx, appId, subscriptionId).SubscriptionBody(subscriptionBody).Execute() @@ -2772,7 +2202,7 @@ Name | Type | Description | Notes ### Authorization -[app_key](../README.md#app_key) +[rest_api_key](../README.md#rest_api_key) ### Example @@ -2790,14 +2220,13 @@ import ( func main() { appId := "appId_example" // string | subscriptionId := "subscriptionId_example" // string | - updateSubscriptionRequestBody := *onesignal.NewUpdateSubscriptionRequestBody() // UpdateSubscriptionRequestBody | + subscriptionBody := *onesignal.NewSubscriptionBody() // SubscriptionBody | configuration := onesignal.NewConfiguration() apiClient := onesignal.NewAPIClient(configuration) - appAuth := context.WithValue(context.Background(), onesignal.AppAuth, "REST_API_KEY") // App REST API key required for most endpoints - resp, r, err := apiClient.DefaultApi.UpdateSubscription(appAuth, appId, subscriptionId).UpdateSubscriptionRequestBody(updateSubscriptionRequestBody).Execute() + resp, r, err := apiClient.DefaultApi.UpdateSubscription(, appId, subscriptionId).SubscriptionBody(subscriptionBody).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.UpdateSubscription``: %v\n", err) @@ -2824,7 +2253,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **updateSubscriptionRequestBody** | [**UpdateSubscriptionRequestBody**](UpdateSubscriptionRequestBody.md) | | + **subscriptionBody** | [**SubscriptionBody**](SubscriptionBody.md) | | ### Return type @@ -2842,7 +2271,7 @@ Name | Type | Description | Notes ## UpdateUser -> InlineResponse202 UpdateUser(ctx, appId, aliasLabel, aliasId).UpdateUserRequest(updateUserRequest).Execute() +> PropertiesBody UpdateUser(ctx, appId, aliasLabel, aliasId).UpdateUserRequest(updateUserRequest).Execute() @@ -2850,7 +2279,7 @@ Name | Type | Description | Notes ### Authorization -[app_key](../README.md#app_key) +[rest_api_key](../README.md#rest_api_key) ### Example @@ -2874,15 +2303,14 @@ func main() { configuration := onesignal.NewConfiguration() apiClient := onesignal.NewAPIClient(configuration) - appAuth := context.WithValue(context.Background(), onesignal.AppAuth, "REST_API_KEY") // App REST API key required for most endpoints - resp, r, err := apiClient.DefaultApi.UpdateUser(appAuth, appId, aliasLabel, aliasId).UpdateUserRequest(updateUserRequest).Execute() + resp, r, err := apiClient.DefaultApi.UpdateUser(, appId, aliasLabel, aliasId).UpdateUserRequest(updateUserRequest).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.UpdateUser``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } - // response from `UpdateUser`: InlineResponse202 + // response from `UpdateUser`: PropertiesBody fmt.Fprintf(os.Stdout, "Response from `DefaultApi.UpdateUser`: %v\n", resp) } ``` @@ -2911,7 +2339,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse202**](InlineResponse202.md) +[**PropertiesBody**](PropertiesBody.md) ### HTTP request headers diff --git a/docs/DeletePlayerNotFoundResponse.md b/docs/DeletePlayerNotFoundResponse.md deleted file mode 100644 index 80e4930..0000000 --- a/docs/DeletePlayerNotFoundResponse.md +++ /dev/null @@ -1,56 +0,0 @@ -# DeletePlayerNotFoundResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Success** | Pointer to **bool** | | [optional] - -## Methods - -### NewDeletePlayerNotFoundResponse - -`func NewDeletePlayerNotFoundResponse() *DeletePlayerNotFoundResponse` - -NewDeletePlayerNotFoundResponse instantiates a new DeletePlayerNotFoundResponse object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewDeletePlayerNotFoundResponseWithDefaults - -`func NewDeletePlayerNotFoundResponseWithDefaults() *DeletePlayerNotFoundResponse` - -NewDeletePlayerNotFoundResponseWithDefaults instantiates a new DeletePlayerNotFoundResponse object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetSuccess - -`func (o *DeletePlayerNotFoundResponse) GetSuccess() bool` - -GetSuccess returns the Success field if non-nil, zero value otherwise. - -### GetSuccessOk - -`func (o *DeletePlayerNotFoundResponse) GetSuccessOk() (*bool, bool)` - -GetSuccessOk returns a tuple with the Success field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSuccess - -`func (o *DeletePlayerNotFoundResponse) SetSuccess(v bool)` - -SetSuccess sets Success field to given value. - -### HasSuccess - -`func (o *DeletePlayerNotFoundResponse) HasSuccess() bool` - -HasSuccess returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/DeleteSegmentNotFoundResponse.md b/docs/DeleteSegmentNotFoundResponse.md deleted file mode 100644 index cc73064..0000000 --- a/docs/DeleteSegmentNotFoundResponse.md +++ /dev/null @@ -1,56 +0,0 @@ -# DeleteSegmentNotFoundResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Success** | Pointer to **bool** | | [optional] - -## Methods - -### NewDeleteSegmentNotFoundResponse - -`func NewDeleteSegmentNotFoundResponse() *DeleteSegmentNotFoundResponse` - -NewDeleteSegmentNotFoundResponse instantiates a new DeleteSegmentNotFoundResponse object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewDeleteSegmentNotFoundResponseWithDefaults - -`func NewDeleteSegmentNotFoundResponseWithDefaults() *DeleteSegmentNotFoundResponse` - -NewDeleteSegmentNotFoundResponseWithDefaults instantiates a new DeleteSegmentNotFoundResponse object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetSuccess - -`func (o *DeleteSegmentNotFoundResponse) GetSuccess() bool` - -GetSuccess returns the Success field if non-nil, zero value otherwise. - -### GetSuccessOk - -`func (o *DeleteSegmentNotFoundResponse) GetSuccessOk() (*bool, bool)` - -GetSuccessOk returns a tuple with the Success field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSuccess - -`func (o *DeleteSegmentNotFoundResponse) SetSuccess(v bool)` - -SetSuccess sets Success field to given value. - -### HasSuccess - -`func (o *DeleteSegmentNotFoundResponse) HasSuccess() bool` - -HasSuccess returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/DeleteSegmentSuccessResponse.md b/docs/DeleteSegmentSuccessResponse.md deleted file mode 100644 index 75d7d2a..0000000 --- a/docs/DeleteSegmentSuccessResponse.md +++ /dev/null @@ -1,56 +0,0 @@ -# DeleteSegmentSuccessResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Success** | Pointer to **bool** | | [optional] - -## Methods - -### NewDeleteSegmentSuccessResponse - -`func NewDeleteSegmentSuccessResponse() *DeleteSegmentSuccessResponse` - -NewDeleteSegmentSuccessResponse instantiates a new DeleteSegmentSuccessResponse object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewDeleteSegmentSuccessResponseWithDefaults - -`func NewDeleteSegmentSuccessResponseWithDefaults() *DeleteSegmentSuccessResponse` - -NewDeleteSegmentSuccessResponseWithDefaults instantiates a new DeleteSegmentSuccessResponse object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetSuccess - -`func (o *DeleteSegmentSuccessResponse) GetSuccess() bool` - -GetSuccess returns the Success field if non-nil, zero value otherwise. - -### GetSuccessOk - -`func (o *DeleteSegmentSuccessResponse) GetSuccessOk() (*bool, bool)` - -GetSuccessOk returns a tuple with the Success field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSuccess - -`func (o *DeleteSegmentSuccessResponse) SetSuccess(v bool)` - -SetSuccess sets Success field to given value. - -### HasSuccess - -`func (o *DeleteSegmentSuccessResponse) HasSuccess() bool` - -HasSuccess returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ExportPlayersRequestBody.md b/docs/ExportSubscriptionsRequestBody.md similarity index 65% rename from docs/ExportPlayersRequestBody.md rename to docs/ExportSubscriptionsRequestBody.md index b9715ee..4283620 100644 --- a/docs/ExportPlayersRequestBody.md +++ b/docs/ExportSubscriptionsRequestBody.md @@ -1,4 +1,4 @@ -# ExportPlayersRequestBody +# ExportSubscriptionsRequestBody ## Properties @@ -10,95 +10,95 @@ Name | Type | Description | Notes ## Methods -### NewExportPlayersRequestBody +### NewExportSubscriptionsRequestBody -`func NewExportPlayersRequestBody() *ExportPlayersRequestBody` +`func NewExportSubscriptionsRequestBody() *ExportSubscriptionsRequestBody` -NewExportPlayersRequestBody instantiates a new ExportPlayersRequestBody object +NewExportSubscriptionsRequestBody instantiates a new ExportSubscriptionsRequestBody object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed -### NewExportPlayersRequestBodyWithDefaults +### NewExportSubscriptionsRequestBodyWithDefaults -`func NewExportPlayersRequestBodyWithDefaults() *ExportPlayersRequestBody` +`func NewExportSubscriptionsRequestBodyWithDefaults() *ExportSubscriptionsRequestBody` -NewExportPlayersRequestBodyWithDefaults instantiates a new ExportPlayersRequestBody object +NewExportSubscriptionsRequestBodyWithDefaults instantiates a new ExportSubscriptionsRequestBody object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetExtraFields -`func (o *ExportPlayersRequestBody) GetExtraFields() []string` +`func (o *ExportSubscriptionsRequestBody) GetExtraFields() []string` GetExtraFields returns the ExtraFields field if non-nil, zero value otherwise. ### GetExtraFieldsOk -`func (o *ExportPlayersRequestBody) GetExtraFieldsOk() (*[]string, bool)` +`func (o *ExportSubscriptionsRequestBody) GetExtraFieldsOk() (*[]string, bool)` GetExtraFieldsOk returns a tuple with the ExtraFields field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetExtraFields -`func (o *ExportPlayersRequestBody) SetExtraFields(v []string)` +`func (o *ExportSubscriptionsRequestBody) SetExtraFields(v []string)` SetExtraFields sets ExtraFields field to given value. ### HasExtraFields -`func (o *ExportPlayersRequestBody) HasExtraFields() bool` +`func (o *ExportSubscriptionsRequestBody) HasExtraFields() bool` HasExtraFields returns a boolean if a field has been set. ### GetLastActiveSince -`func (o *ExportPlayersRequestBody) GetLastActiveSince() string` +`func (o *ExportSubscriptionsRequestBody) GetLastActiveSince() string` GetLastActiveSince returns the LastActiveSince field if non-nil, zero value otherwise. ### GetLastActiveSinceOk -`func (o *ExportPlayersRequestBody) GetLastActiveSinceOk() (*string, bool)` +`func (o *ExportSubscriptionsRequestBody) GetLastActiveSinceOk() (*string, bool)` GetLastActiveSinceOk returns a tuple with the LastActiveSince field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLastActiveSince -`func (o *ExportPlayersRequestBody) SetLastActiveSince(v string)` +`func (o *ExportSubscriptionsRequestBody) SetLastActiveSince(v string)` SetLastActiveSince sets LastActiveSince field to given value. ### HasLastActiveSince -`func (o *ExportPlayersRequestBody) HasLastActiveSince() bool` +`func (o *ExportSubscriptionsRequestBody) HasLastActiveSince() bool` HasLastActiveSince returns a boolean if a field has been set. ### GetSegmentName -`func (o *ExportPlayersRequestBody) GetSegmentName() string` +`func (o *ExportSubscriptionsRequestBody) GetSegmentName() string` GetSegmentName returns the SegmentName field if non-nil, zero value otherwise. ### GetSegmentNameOk -`func (o *ExportPlayersRequestBody) GetSegmentNameOk() (*string, bool)` +`func (o *ExportSubscriptionsRequestBody) GetSegmentNameOk() (*string, bool)` GetSegmentNameOk returns a tuple with the SegmentName field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetSegmentName -`func (o *ExportPlayersRequestBody) SetSegmentName(v string)` +`func (o *ExportSubscriptionsRequestBody) SetSegmentName(v string)` SetSegmentName sets SegmentName field to given value. ### HasSegmentName -`func (o *ExportPlayersRequestBody) HasSegmentName() bool` +`func (o *ExportSubscriptionsRequestBody) HasSegmentName() bool` HasSegmentName returns a boolean if a field has been set. diff --git a/docs/ExportPlayersSuccessResponse.md b/docs/ExportSubscriptionsSuccessResponse.md similarity index 58% rename from docs/ExportPlayersSuccessResponse.md rename to docs/ExportSubscriptionsSuccessResponse.md index 2ddfcf7..d2d08da 100644 --- a/docs/ExportPlayersSuccessResponse.md +++ b/docs/ExportSubscriptionsSuccessResponse.md @@ -1,4 +1,4 @@ -# ExportPlayersSuccessResponse +# ExportSubscriptionsSuccessResponse ## Properties @@ -8,45 +8,45 @@ Name | Type | Description | Notes ## Methods -### NewExportPlayersSuccessResponse +### NewExportSubscriptionsSuccessResponse -`func NewExportPlayersSuccessResponse() *ExportPlayersSuccessResponse` +`func NewExportSubscriptionsSuccessResponse() *ExportSubscriptionsSuccessResponse` -NewExportPlayersSuccessResponse instantiates a new ExportPlayersSuccessResponse object +NewExportSubscriptionsSuccessResponse instantiates a new ExportSubscriptionsSuccessResponse object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed -### NewExportPlayersSuccessResponseWithDefaults +### NewExportSubscriptionsSuccessResponseWithDefaults -`func NewExportPlayersSuccessResponseWithDefaults() *ExportPlayersSuccessResponse` +`func NewExportSubscriptionsSuccessResponseWithDefaults() *ExportSubscriptionsSuccessResponse` -NewExportPlayersSuccessResponseWithDefaults instantiates a new ExportPlayersSuccessResponse object +NewExportSubscriptionsSuccessResponseWithDefaults instantiates a new ExportSubscriptionsSuccessResponse object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetCsvFileUrl -`func (o *ExportPlayersSuccessResponse) GetCsvFileUrl() string` +`func (o *ExportSubscriptionsSuccessResponse) GetCsvFileUrl() string` GetCsvFileUrl returns the CsvFileUrl field if non-nil, zero value otherwise. ### GetCsvFileUrlOk -`func (o *ExportPlayersSuccessResponse) GetCsvFileUrlOk() (*string, bool)` +`func (o *ExportSubscriptionsSuccessResponse) GetCsvFileUrlOk() (*string, bool)` GetCsvFileUrlOk returns a tuple with the CsvFileUrl field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetCsvFileUrl -`func (o *ExportPlayersSuccessResponse) SetCsvFileUrl(v string)` +`func (o *ExportSubscriptionsSuccessResponse) SetCsvFileUrl(v string)` SetCsvFileUrl sets CsvFileUrl field to given value. ### HasCsvFileUrl -`func (o *ExportPlayersSuccessResponse) HasCsvFileUrl() bool` +`func (o *ExportSubscriptionsSuccessResponse) HasCsvFileUrl() bool` HasCsvFileUrl returns a boolean if a field has been set. diff --git a/docs/Filter.md b/docs/Filter.md index fc1f4b8..dd01fef 100644 --- a/docs/Filter.md +++ b/docs/Filter.md @@ -4,16 +4,20 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Field** | **string** | Name of the field to use as the first operand in the filter expression. | +**Field** | Pointer to **string** | Required. Name of the field to use as the first operand in the filter expression. | [optional] **Key** | Pointer to **string** | If `field` is `tag`, this field is *required* to specify `key` inside the tags. | [optional] **Value** | Pointer to **string** | Constant value to use as the second operand in the filter expression. This value is *required* when the relation operator is a binary operator. | [optional] -**Relation** | **string** | Operator of a filter expression. | +**HoursAgo** | Pointer to **string** | If `field` is session-related, this is *required* to specify the number of hours before or after the user's session. | [optional] +**Radius** | Pointer to **float32** | If `field` is `location`, this will specify the radius in meters from a provided location point. Use with `lat` and `long`. | [optional] +**Lat** | Pointer to **float32** | If `field` is `location`, this is *required* to specify the user's latitude. | [optional] +**Long** | Pointer to **float32** | If `field` is `location`, this is *required* to specify the user's longitude. | [optional] +**Relation** | Pointer to **string** | Required. Operator of a filter expression. | [optional] ## Methods ### NewFilter -`func NewFilter(field string, relation string, ) *Filter` +`func NewFilter() *Filter` NewFilter instantiates a new Filter object This constructor will assign default values to properties that have it defined, @@ -47,6 +51,11 @@ and a boolean to check if the value has been set. SetField sets Field field to given value. +### HasField + +`func (o *Filter) HasField() bool` + +HasField returns a boolean if a field has been set. ### GetKey @@ -98,6 +107,106 @@ SetValue sets Value field to given value. HasValue returns a boolean if a field has been set. +### GetHoursAgo + +`func (o *Filter) GetHoursAgo() string` + +GetHoursAgo returns the HoursAgo field if non-nil, zero value otherwise. + +### GetHoursAgoOk + +`func (o *Filter) GetHoursAgoOk() (*string, bool)` + +GetHoursAgoOk returns a tuple with the HoursAgo field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHoursAgo + +`func (o *Filter) SetHoursAgo(v string)` + +SetHoursAgo sets HoursAgo field to given value. + +### HasHoursAgo + +`func (o *Filter) HasHoursAgo() bool` + +HasHoursAgo returns a boolean if a field has been set. + +### GetRadius + +`func (o *Filter) GetRadius() float32` + +GetRadius returns the Radius field if non-nil, zero value otherwise. + +### GetRadiusOk + +`func (o *Filter) GetRadiusOk() (*float32, bool)` + +GetRadiusOk returns a tuple with the Radius field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRadius + +`func (o *Filter) SetRadius(v float32)` + +SetRadius sets Radius field to given value. + +### HasRadius + +`func (o *Filter) HasRadius() bool` + +HasRadius returns a boolean if a field has been set. + +### GetLat + +`func (o *Filter) GetLat() float32` + +GetLat returns the Lat field if non-nil, zero value otherwise. + +### GetLatOk + +`func (o *Filter) GetLatOk() (*float32, bool)` + +GetLatOk returns a tuple with the Lat field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLat + +`func (o *Filter) SetLat(v float32)` + +SetLat sets Lat field to given value. + +### HasLat + +`func (o *Filter) HasLat() bool` + +HasLat returns a boolean if a field has been set. + +### GetLong + +`func (o *Filter) GetLong() float32` + +GetLong returns the Long field if non-nil, zero value otherwise. + +### GetLongOk + +`func (o *Filter) GetLongOk() (*float32, bool)` + +GetLongOk returns a tuple with the Long field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLong + +`func (o *Filter) SetLong(v float32)` + +SetLong sets Long field to given value. + +### HasLong + +`func (o *Filter) HasLong() bool` + +HasLong returns a boolean if a field has been set. + ### GetRelation `func (o *Filter) GetRelation() string` @@ -117,6 +226,11 @@ and a boolean to check if the value has been set. SetRelation sets Relation field to given value. +### HasRelation + +`func (o *Filter) HasRelation() bool` + +HasRelation returns a boolean if a field has been set. [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/FilterExpression.md b/docs/FilterExpression.md new file mode 100644 index 0000000..3911bd5 --- /dev/null +++ b/docs/FilterExpression.md @@ -0,0 +1,264 @@ +# FilterExpression + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Field** | Pointer to **string** | Required. Name of the field to use as the first operand in the filter expression. | [optional] +**Key** | Pointer to **string** | If `field` is `tag`, this field is *required* to specify `key` inside the tags. | [optional] +**Value** | Pointer to **string** | Constant value to use as the second operand in the filter expression. This value is *required* when the relation operator is a binary operator. | [optional] +**HoursAgo** | Pointer to **string** | If `field` is session-related, this is *required* to specify the number of hours before or after the user's session. | [optional] +**Radius** | Pointer to **float32** | If `field` is `location`, this will specify the radius in meters from a provided location point. Use with `lat` and `long`. | [optional] +**Lat** | Pointer to **float32** | If `field` is `location`, this is *required* to specify the user's latitude. | [optional] +**Long** | Pointer to **float32** | If `field` is `location`, this is *required* to specify the user's longitude. | [optional] +**Relation** | Pointer to **string** | Required. Operator of a filter expression. | [optional] +**Operator** | Pointer to **string** | Strictly, this must be either `\"OR\"`, or `\"AND\"`. It can be used to compose Filters as part of a Filters object. | [optional] + +## Methods + +### NewFilterExpression + +`func NewFilterExpression() *FilterExpression` + +NewFilterExpression instantiates a new FilterExpression object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFilterExpressionWithDefaults + +`func NewFilterExpressionWithDefaults() *FilterExpression` + +NewFilterExpressionWithDefaults instantiates a new FilterExpression object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetField + +`func (o *FilterExpression) GetField() string` + +GetField returns the Field field if non-nil, zero value otherwise. + +### GetFieldOk + +`func (o *FilterExpression) GetFieldOk() (*string, bool)` + +GetFieldOk returns a tuple with the Field field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetField + +`func (o *FilterExpression) SetField(v string)` + +SetField sets Field field to given value. + +### HasField + +`func (o *FilterExpression) HasField() bool` + +HasField returns a boolean if a field has been set. + +### GetKey + +`func (o *FilterExpression) GetKey() string` + +GetKey returns the Key field if non-nil, zero value otherwise. + +### GetKeyOk + +`func (o *FilterExpression) GetKeyOk() (*string, bool)` + +GetKeyOk returns a tuple with the Key field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKey + +`func (o *FilterExpression) SetKey(v string)` + +SetKey sets Key field to given value. + +### HasKey + +`func (o *FilterExpression) HasKey() bool` + +HasKey returns a boolean if a field has been set. + +### GetValue + +`func (o *FilterExpression) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *FilterExpression) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *FilterExpression) SetValue(v string)` + +SetValue sets Value field to given value. + +### HasValue + +`func (o *FilterExpression) HasValue() bool` + +HasValue returns a boolean if a field has been set. + +### GetHoursAgo + +`func (o *FilterExpression) GetHoursAgo() string` + +GetHoursAgo returns the HoursAgo field if non-nil, zero value otherwise. + +### GetHoursAgoOk + +`func (o *FilterExpression) GetHoursAgoOk() (*string, bool)` + +GetHoursAgoOk returns a tuple with the HoursAgo field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHoursAgo + +`func (o *FilterExpression) SetHoursAgo(v string)` + +SetHoursAgo sets HoursAgo field to given value. + +### HasHoursAgo + +`func (o *FilterExpression) HasHoursAgo() bool` + +HasHoursAgo returns a boolean if a field has been set. + +### GetRadius + +`func (o *FilterExpression) GetRadius() float32` + +GetRadius returns the Radius field if non-nil, zero value otherwise. + +### GetRadiusOk + +`func (o *FilterExpression) GetRadiusOk() (*float32, bool)` + +GetRadiusOk returns a tuple with the Radius field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRadius + +`func (o *FilterExpression) SetRadius(v float32)` + +SetRadius sets Radius field to given value. + +### HasRadius + +`func (o *FilterExpression) HasRadius() bool` + +HasRadius returns a boolean if a field has been set. + +### GetLat + +`func (o *FilterExpression) GetLat() float32` + +GetLat returns the Lat field if non-nil, zero value otherwise. + +### GetLatOk + +`func (o *FilterExpression) GetLatOk() (*float32, bool)` + +GetLatOk returns a tuple with the Lat field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLat + +`func (o *FilterExpression) SetLat(v float32)` + +SetLat sets Lat field to given value. + +### HasLat + +`func (o *FilterExpression) HasLat() bool` + +HasLat returns a boolean if a field has been set. + +### GetLong + +`func (o *FilterExpression) GetLong() float32` + +GetLong returns the Long field if non-nil, zero value otherwise. + +### GetLongOk + +`func (o *FilterExpression) GetLongOk() (*float32, bool)` + +GetLongOk returns a tuple with the Long field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLong + +`func (o *FilterExpression) SetLong(v float32)` + +SetLong sets Long field to given value. + +### HasLong + +`func (o *FilterExpression) HasLong() bool` + +HasLong returns a boolean if a field has been set. + +### GetRelation + +`func (o *FilterExpression) GetRelation() string` + +GetRelation returns the Relation field if non-nil, zero value otherwise. + +### GetRelationOk + +`func (o *FilterExpression) GetRelationOk() (*string, bool)` + +GetRelationOk returns a tuple with the Relation field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRelation + +`func (o *FilterExpression) SetRelation(v string)` + +SetRelation sets Relation field to given value. + +### HasRelation + +`func (o *FilterExpression) HasRelation() bool` + +HasRelation returns a boolean if a field has been set. + +### GetOperator + +`func (o *FilterExpression) GetOperator() string` + +GetOperator returns the Operator field if non-nil, zero value otherwise. + +### GetOperatorOk + +`func (o *FilterExpression) GetOperatorOk() (*string, bool)` + +GetOperatorOk returns a tuple with the Operator field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOperator + +`func (o *FilterExpression) SetOperator(v string)` + +SetOperator sets Operator field to given value. + +### HasOperator + +`func (o *FilterExpression) HasOperator() bool` + +HasOperator returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FilterExpressions.md b/docs/FilterExpressions.md deleted file mode 100644 index 4ad38fd..0000000 --- a/docs/FilterExpressions.md +++ /dev/null @@ -1,150 +0,0 @@ -# FilterExpressions - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Field** | **string** | Name of the field to use as the first operand in the filter expression. | -**Key** | Pointer to **string** | If `field` is `tag`, this field is *required* to specify `key` inside the tags. | [optional] -**Value** | Pointer to **string** | Constant value to use as the second operand in the filter expression. This value is *required* when the relation operator is a binary operator. | [optional] -**Relation** | **string** | Operator of a filter expression. | -**Operator** | Pointer to **string** | Strictly, this must be either `\"OR\"`, or `\"AND\"`. It can be used to compose Filters as part of a Filters object. | [optional] - -## Methods - -### NewFilterExpressions - -`func NewFilterExpressions(field string, relation string, ) *FilterExpressions` - -NewFilterExpressions instantiates a new FilterExpressions object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewFilterExpressionsWithDefaults - -`func NewFilterExpressionsWithDefaults() *FilterExpressions` - -NewFilterExpressionsWithDefaults instantiates a new FilterExpressions object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetField - -`func (o *FilterExpressions) GetField() string` - -GetField returns the Field field if non-nil, zero value otherwise. - -### GetFieldOk - -`func (o *FilterExpressions) GetFieldOk() (*string, bool)` - -GetFieldOk returns a tuple with the Field field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetField - -`func (o *FilterExpressions) SetField(v string)` - -SetField sets Field field to given value. - - -### GetKey - -`func (o *FilterExpressions) GetKey() string` - -GetKey returns the Key field if non-nil, zero value otherwise. - -### GetKeyOk - -`func (o *FilterExpressions) GetKeyOk() (*string, bool)` - -GetKeyOk returns a tuple with the Key field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetKey - -`func (o *FilterExpressions) SetKey(v string)` - -SetKey sets Key field to given value. - -### HasKey - -`func (o *FilterExpressions) HasKey() bool` - -HasKey returns a boolean if a field has been set. - -### GetValue - -`func (o *FilterExpressions) GetValue() string` - -GetValue returns the Value field if non-nil, zero value otherwise. - -### GetValueOk - -`func (o *FilterExpressions) GetValueOk() (*string, bool)` - -GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetValue - -`func (o *FilterExpressions) SetValue(v string)` - -SetValue sets Value field to given value. - -### HasValue - -`func (o *FilterExpressions) HasValue() bool` - -HasValue returns a boolean if a field has been set. - -### GetRelation - -`func (o *FilterExpressions) GetRelation() string` - -GetRelation returns the Relation field if non-nil, zero value otherwise. - -### GetRelationOk - -`func (o *FilterExpressions) GetRelationOk() (*string, bool)` - -GetRelationOk returns a tuple with the Relation field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRelation - -`func (o *FilterExpressions) SetRelation(v string)` - -SetRelation sets Relation field to given value. - - -### GetOperator - -`func (o *FilterExpressions) GetOperator() string` - -GetOperator returns the Operator field if non-nil, zero value otherwise. - -### GetOperatorOk - -`func (o *FilterExpressions) GetOperatorOk() (*string, bool)` - -GetOperatorOk returns a tuple with the Operator field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetOperator - -`func (o *FilterExpressions) SetOperator(v string)` - -SetOperator sets Operator field to given value. - -### HasOperator - -`func (o *FilterExpressions) HasOperator() bool` - -HasOperator returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/GenericError.md b/docs/GenericError.md index d6ea89c..c16fc89 100644 --- a/docs/GenericError.md +++ b/docs/GenericError.md @@ -4,7 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Errors** | Pointer to [**[]GenericErrorErrorsInner**](GenericErrorErrorsInner.md) | | [optional] +**Errors** | Pointer to **interface{}** | | [optional] +**Success** | Pointer to **bool** | | [optional] +**Reference** | Pointer to **interface{}** | | [optional] ## Methods @@ -27,20 +29,20 @@ but it doesn't guarantee that properties required by API are set ### GetErrors -`func (o *GenericError) GetErrors() []GenericErrorErrorsInner` +`func (o *GenericError) GetErrors() interface{}` GetErrors returns the Errors field if non-nil, zero value otherwise. ### GetErrorsOk -`func (o *GenericError) GetErrorsOk() (*[]GenericErrorErrorsInner, bool)` +`func (o *GenericError) GetErrorsOk() (*interface{}, bool)` GetErrorsOk returns a tuple with the Errors field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetErrors -`func (o *GenericError) SetErrors(v []GenericErrorErrorsInner)` +`func (o *GenericError) SetErrors(v interface{})` SetErrors sets Errors field to given value. @@ -50,6 +52,76 @@ SetErrors sets Errors field to given value. HasErrors returns a boolean if a field has been set. +### SetErrorsNil + +`func (o *GenericError) SetErrorsNil(b bool)` + + SetErrorsNil sets the value for Errors to be an explicit nil + +### UnsetErrors +`func (o *GenericError) UnsetErrors()` + +UnsetErrors ensures that no value is present for Errors, not even an explicit nil +### GetSuccess + +`func (o *GenericError) GetSuccess() bool` + +GetSuccess returns the Success field if non-nil, zero value otherwise. + +### GetSuccessOk + +`func (o *GenericError) GetSuccessOk() (*bool, bool)` + +GetSuccessOk returns a tuple with the Success field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSuccess + +`func (o *GenericError) SetSuccess(v bool)` + +SetSuccess sets Success field to given value. + +### HasSuccess + +`func (o *GenericError) HasSuccess() bool` + +HasSuccess returns a boolean if a field has been set. + +### GetReference + +`func (o *GenericError) GetReference() interface{}` + +GetReference returns the Reference field if non-nil, zero value otherwise. + +### GetReferenceOk + +`func (o *GenericError) GetReferenceOk() (*interface{}, bool)` + +GetReferenceOk returns a tuple with the Reference field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetReference + +`func (o *GenericError) SetReference(v interface{})` + +SetReference sets Reference field to given value. + +### HasReference + +`func (o *GenericError) HasReference() bool` + +HasReference returns a boolean if a field has been set. + +### SetReferenceNil + +`func (o *GenericError) SetReferenceNil(b bool)` + + SetReferenceNil sets the value for Reference to be an explicit nil + +### UnsetReference +`func (o *GenericError) UnsetReference()` + +UnsetReference ensures that no value is present for Reference, not even an explicit nil [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/DeletePlayerSuccessResponse.md b/docs/GenericSuccessBoolResponse.md similarity index 61% rename from docs/DeletePlayerSuccessResponse.md rename to docs/GenericSuccessBoolResponse.md index 306fa88..f1dc024 100644 --- a/docs/DeletePlayerSuccessResponse.md +++ b/docs/GenericSuccessBoolResponse.md @@ -1,4 +1,4 @@ -# DeletePlayerSuccessResponse +# GenericSuccessBoolResponse ## Properties @@ -8,45 +8,45 @@ Name | Type | Description | Notes ## Methods -### NewDeletePlayerSuccessResponse +### NewGenericSuccessBoolResponse -`func NewDeletePlayerSuccessResponse() *DeletePlayerSuccessResponse` +`func NewGenericSuccessBoolResponse() *GenericSuccessBoolResponse` -NewDeletePlayerSuccessResponse instantiates a new DeletePlayerSuccessResponse object +NewGenericSuccessBoolResponse instantiates a new GenericSuccessBoolResponse object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed -### NewDeletePlayerSuccessResponseWithDefaults +### NewGenericSuccessBoolResponseWithDefaults -`func NewDeletePlayerSuccessResponseWithDefaults() *DeletePlayerSuccessResponse` +`func NewGenericSuccessBoolResponseWithDefaults() *GenericSuccessBoolResponse` -NewDeletePlayerSuccessResponseWithDefaults instantiates a new DeletePlayerSuccessResponse object +NewGenericSuccessBoolResponseWithDefaults instantiates a new GenericSuccessBoolResponse object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetSuccess -`func (o *DeletePlayerSuccessResponse) GetSuccess() bool` +`func (o *GenericSuccessBoolResponse) GetSuccess() bool` GetSuccess returns the Success field if non-nil, zero value otherwise. ### GetSuccessOk -`func (o *DeletePlayerSuccessResponse) GetSuccessOk() (*bool, bool)` +`func (o *GenericSuccessBoolResponse) GetSuccessOk() (*bool, bool)` GetSuccessOk returns a tuple with the Success field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetSuccess -`func (o *DeletePlayerSuccessResponse) SetSuccess(v bool)` +`func (o *GenericSuccessBoolResponse) SetSuccess(v bool)` SetSuccess sets Success field to given value. ### HasSuccess -`func (o *DeletePlayerSuccessResponse) HasSuccess() bool` +`func (o *GenericSuccessBoolResponse) HasSuccess() bool` HasSuccess returns a boolean if a field has been set. diff --git a/docs/GetNotificationRequestBody.md b/docs/GetNotificationHistoryRequestBody.md similarity index 63% rename from docs/GetNotificationRequestBody.md rename to docs/GetNotificationHistoryRequestBody.md index a3ec42e..faecbd4 100644 --- a/docs/GetNotificationRequestBody.md +++ b/docs/GetNotificationHistoryRequestBody.md @@ -1,4 +1,4 @@ -# GetNotificationRequestBody +# GetNotificationHistoryRequestBody ## Properties @@ -10,95 +10,95 @@ Name | Type | Description | Notes ## Methods -### NewGetNotificationRequestBody +### NewGetNotificationHistoryRequestBody -`func NewGetNotificationRequestBody() *GetNotificationRequestBody` +`func NewGetNotificationHistoryRequestBody() *GetNotificationHistoryRequestBody` -NewGetNotificationRequestBody instantiates a new GetNotificationRequestBody object +NewGetNotificationHistoryRequestBody instantiates a new GetNotificationHistoryRequestBody object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed -### NewGetNotificationRequestBodyWithDefaults +### NewGetNotificationHistoryRequestBodyWithDefaults -`func NewGetNotificationRequestBodyWithDefaults() *GetNotificationRequestBody` +`func NewGetNotificationHistoryRequestBodyWithDefaults() *GetNotificationHistoryRequestBody` -NewGetNotificationRequestBodyWithDefaults instantiates a new GetNotificationRequestBody object +NewGetNotificationHistoryRequestBodyWithDefaults instantiates a new GetNotificationHistoryRequestBody object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetEvents -`func (o *GetNotificationRequestBody) GetEvents() string` +`func (o *GetNotificationHistoryRequestBody) GetEvents() string` GetEvents returns the Events field if non-nil, zero value otherwise. ### GetEventsOk -`func (o *GetNotificationRequestBody) GetEventsOk() (*string, bool)` +`func (o *GetNotificationHistoryRequestBody) GetEventsOk() (*string, bool)` GetEventsOk returns a tuple with the Events field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetEvents -`func (o *GetNotificationRequestBody) SetEvents(v string)` +`func (o *GetNotificationHistoryRequestBody) SetEvents(v string)` SetEvents sets Events field to given value. ### HasEvents -`func (o *GetNotificationRequestBody) HasEvents() bool` +`func (o *GetNotificationHistoryRequestBody) HasEvents() bool` HasEvents returns a boolean if a field has been set. ### GetEmail -`func (o *GetNotificationRequestBody) GetEmail() string` +`func (o *GetNotificationHistoryRequestBody) GetEmail() string` GetEmail returns the Email field if non-nil, zero value otherwise. ### GetEmailOk -`func (o *GetNotificationRequestBody) GetEmailOk() (*string, bool)` +`func (o *GetNotificationHistoryRequestBody) GetEmailOk() (*string, bool)` GetEmailOk returns a tuple with the Email field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetEmail -`func (o *GetNotificationRequestBody) SetEmail(v string)` +`func (o *GetNotificationHistoryRequestBody) SetEmail(v string)` SetEmail sets Email field to given value. ### HasEmail -`func (o *GetNotificationRequestBody) HasEmail() bool` +`func (o *GetNotificationHistoryRequestBody) HasEmail() bool` HasEmail returns a boolean if a field has been set. ### GetAppId -`func (o *GetNotificationRequestBody) GetAppId() string` +`func (o *GetNotificationHistoryRequestBody) GetAppId() string` GetAppId returns the AppId field if non-nil, zero value otherwise. ### GetAppIdOk -`func (o *GetNotificationRequestBody) GetAppIdOk() (*string, bool)` +`func (o *GetNotificationHistoryRequestBody) GetAppIdOk() (*string, bool)` GetAppIdOk returns a tuple with the AppId field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetAppId -`func (o *GetNotificationRequestBody) SetAppId(v string)` +`func (o *GetNotificationHistoryRequestBody) SetAppId(v string)` SetAppId sets AppId field to given value. ### HasAppId -`func (o *GetNotificationRequestBody) HasAppId() bool` +`func (o *GetNotificationHistoryRequestBody) HasAppId() bool` HasAppId returns a boolean if a field has been set. diff --git a/docs/GetSegmentsSuccessResponse.md b/docs/GetSegmentsSuccessResponse.md new file mode 100644 index 0000000..d0b9a5f --- /dev/null +++ b/docs/GetSegmentsSuccessResponse.md @@ -0,0 +1,134 @@ +# GetSegmentsSuccessResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**TotalCount** | Pointer to **int32** | The number of Segments in the response. | [optional] +**Offset** | Pointer to **int32** | Set with the offset query parameter. Default 0. | [optional] +**Limit** | Pointer to **int32** | Maximum number of Segments returned. Default 300. | [optional] +**Segments** | Pointer to [**[]SegmentData**](SegmentData.md) | An array containing the Segment information. | [optional] + +## Methods + +### NewGetSegmentsSuccessResponse + +`func NewGetSegmentsSuccessResponse() *GetSegmentsSuccessResponse` + +NewGetSegmentsSuccessResponse instantiates a new GetSegmentsSuccessResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewGetSegmentsSuccessResponseWithDefaults + +`func NewGetSegmentsSuccessResponseWithDefaults() *GetSegmentsSuccessResponse` + +NewGetSegmentsSuccessResponseWithDefaults instantiates a new GetSegmentsSuccessResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetTotalCount + +`func (o *GetSegmentsSuccessResponse) GetTotalCount() int32` + +GetTotalCount returns the TotalCount field if non-nil, zero value otherwise. + +### GetTotalCountOk + +`func (o *GetSegmentsSuccessResponse) GetTotalCountOk() (*int32, bool)` + +GetTotalCountOk returns a tuple with the TotalCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotalCount + +`func (o *GetSegmentsSuccessResponse) SetTotalCount(v int32)` + +SetTotalCount sets TotalCount field to given value. + +### HasTotalCount + +`func (o *GetSegmentsSuccessResponse) HasTotalCount() bool` + +HasTotalCount returns a boolean if a field has been set. + +### GetOffset + +`func (o *GetSegmentsSuccessResponse) GetOffset() int32` + +GetOffset returns the Offset field if non-nil, zero value otherwise. + +### GetOffsetOk + +`func (o *GetSegmentsSuccessResponse) GetOffsetOk() (*int32, bool)` + +GetOffsetOk returns a tuple with the Offset field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOffset + +`func (o *GetSegmentsSuccessResponse) SetOffset(v int32)` + +SetOffset sets Offset field to given value. + +### HasOffset + +`func (o *GetSegmentsSuccessResponse) HasOffset() bool` + +HasOffset returns a boolean if a field has been set. + +### GetLimit + +`func (o *GetSegmentsSuccessResponse) GetLimit() int32` + +GetLimit returns the Limit field if non-nil, zero value otherwise. + +### GetLimitOk + +`func (o *GetSegmentsSuccessResponse) GetLimitOk() (*int32, bool)` + +GetLimitOk returns a tuple with the Limit field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLimit + +`func (o *GetSegmentsSuccessResponse) SetLimit(v int32)` + +SetLimit sets Limit field to given value. + +### HasLimit + +`func (o *GetSegmentsSuccessResponse) HasLimit() bool` + +HasLimit returns a boolean if a field has been set. + +### GetSegments + +`func (o *GetSegmentsSuccessResponse) GetSegments() []SegmentData` + +GetSegments returns the Segments field if non-nil, zero value otherwise. + +### GetSegmentsOk + +`func (o *GetSegmentsSuccessResponse) GetSegmentsOk() (*[]SegmentData, bool)` + +GetSegmentsOk returns a tuple with the Segments field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSegments + +`func (o *GetSegmentsSuccessResponse) SetSegments(v []SegmentData)` + +SetSegments sets Segments field to given value. + +### HasSegments + +`func (o *GetSegmentsSuccessResponse) HasSegments() bool` + +HasSegments returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InlineResponse2003.md b/docs/InlineResponse2003.md deleted file mode 100644 index 99ff378..0000000 --- a/docs/InlineResponse2003.md +++ /dev/null @@ -1,56 +0,0 @@ -# InlineResponse2003 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**InAppMessages** | Pointer to **[]map[string]interface{}** | | [optional] - -## Methods - -### NewInlineResponse2003 - -`func NewInlineResponse2003() *InlineResponse2003` - -NewInlineResponse2003 instantiates a new InlineResponse2003 object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewInlineResponse2003WithDefaults - -`func NewInlineResponse2003WithDefaults() *InlineResponse2003` - -NewInlineResponse2003WithDefaults instantiates a new InlineResponse2003 object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetInAppMessages - -`func (o *InlineResponse2003) GetInAppMessages() []map[string]interface{}` - -GetInAppMessages returns the InAppMessages field if non-nil, zero value otherwise. - -### GetInAppMessagesOk - -`func (o *InlineResponse2003) GetInAppMessagesOk() (*[]map[string]interface{}, bool)` - -GetInAppMessagesOk returns a tuple with the InAppMessages field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetInAppMessages - -`func (o *InlineResponse2003) SetInAppMessages(v []map[string]interface{})` - -SetInAppMessages sets InAppMessages field to given value. - -### HasInAppMessages - -`func (o *InlineResponse2003) HasInAppMessages() bool` - -HasInAppMessages returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/InvalidIdentifierError.md b/docs/InvalidIdentifierError.md deleted file mode 100644 index b8c26f4..0000000 --- a/docs/InvalidIdentifierError.md +++ /dev/null @@ -1,82 +0,0 @@ -# InvalidIdentifierError - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**InvalidExternalUserIds** | Pointer to **[]string** | Returned if using include_external_user_ids | [optional] -**InvalidPlayerIds** | Pointer to **[]string** | Returned if using include_player_ids and some were valid and others were not. | [optional] - -## Methods - -### NewInvalidIdentifierError - -`func NewInvalidIdentifierError() *InvalidIdentifierError` - -NewInvalidIdentifierError instantiates a new InvalidIdentifierError object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewInvalidIdentifierErrorWithDefaults - -`func NewInvalidIdentifierErrorWithDefaults() *InvalidIdentifierError` - -NewInvalidIdentifierErrorWithDefaults instantiates a new InvalidIdentifierError object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetInvalidExternalUserIds - -`func (o *InvalidIdentifierError) GetInvalidExternalUserIds() []string` - -GetInvalidExternalUserIds returns the InvalidExternalUserIds field if non-nil, zero value otherwise. - -### GetInvalidExternalUserIdsOk - -`func (o *InvalidIdentifierError) GetInvalidExternalUserIdsOk() (*[]string, bool)` - -GetInvalidExternalUserIdsOk returns a tuple with the InvalidExternalUserIds field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetInvalidExternalUserIds - -`func (o *InvalidIdentifierError) SetInvalidExternalUserIds(v []string)` - -SetInvalidExternalUserIds sets InvalidExternalUserIds field to given value. - -### HasInvalidExternalUserIds - -`func (o *InvalidIdentifierError) HasInvalidExternalUserIds() bool` - -HasInvalidExternalUserIds returns a boolean if a field has been set. - -### GetInvalidPlayerIds - -`func (o *InvalidIdentifierError) GetInvalidPlayerIds() []string` - -GetInvalidPlayerIds returns the InvalidPlayerIds field if non-nil, zero value otherwise. - -### GetInvalidPlayerIdsOk - -`func (o *InvalidIdentifierError) GetInvalidPlayerIdsOk() (*[]string, bool)` - -GetInvalidPlayerIdsOk returns a tuple with the InvalidPlayerIds field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetInvalidPlayerIds - -`func (o *InvalidIdentifierError) SetInvalidPlayerIds(v []string)` - -SetInvalidPlayerIds sets InvalidPlayerIds field to given value. - -### HasInvalidPlayerIds - -`func (o *InvalidIdentifierError) HasInvalidPlayerIds() bool` - -HasInvalidPlayerIds returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/StringMap.md b/docs/LanguageStringMap.md similarity index 67% rename from docs/StringMap.md rename to docs/LanguageStringMap.md index cbea09b..33211da 100644 --- a/docs/StringMap.md +++ b/docs/LanguageStringMap.md @@ -1,4 +1,4 @@ -# StringMap +# LanguageStringMap ## Properties @@ -50,1095 +50,1095 @@ Name | Type | Description | Notes ## Methods -### NewStringMap +### NewLanguageStringMap -`func NewStringMap() *StringMap` +`func NewLanguageStringMap() *LanguageStringMap` -NewStringMap instantiates a new StringMap object +NewLanguageStringMap instantiates a new LanguageStringMap object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed -### NewStringMapWithDefaults +### NewLanguageStringMapWithDefaults -`func NewStringMapWithDefaults() *StringMap` +`func NewLanguageStringMapWithDefaults() *LanguageStringMap` -NewStringMapWithDefaults instantiates a new StringMap object +NewLanguageStringMapWithDefaults instantiates a new LanguageStringMap object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetEn -`func (o *StringMap) GetEn() string` +`func (o *LanguageStringMap) GetEn() string` GetEn returns the En field if non-nil, zero value otherwise. ### GetEnOk -`func (o *StringMap) GetEnOk() (*string, bool)` +`func (o *LanguageStringMap) GetEnOk() (*string, bool)` GetEnOk returns a tuple with the En field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetEn -`func (o *StringMap) SetEn(v string)` +`func (o *LanguageStringMap) SetEn(v string)` SetEn sets En field to given value. ### HasEn -`func (o *StringMap) HasEn() bool` +`func (o *LanguageStringMap) HasEn() bool` HasEn returns a boolean if a field has been set. ### GetAr -`func (o *StringMap) GetAr() string` +`func (o *LanguageStringMap) GetAr() string` GetAr returns the Ar field if non-nil, zero value otherwise. ### GetArOk -`func (o *StringMap) GetArOk() (*string, bool)` +`func (o *LanguageStringMap) GetArOk() (*string, bool)` GetArOk returns a tuple with the Ar field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetAr -`func (o *StringMap) SetAr(v string)` +`func (o *LanguageStringMap) SetAr(v string)` SetAr sets Ar field to given value. ### HasAr -`func (o *StringMap) HasAr() bool` +`func (o *LanguageStringMap) HasAr() bool` HasAr returns a boolean if a field has been set. ### GetBs -`func (o *StringMap) GetBs() string` +`func (o *LanguageStringMap) GetBs() string` GetBs returns the Bs field if non-nil, zero value otherwise. ### GetBsOk -`func (o *StringMap) GetBsOk() (*string, bool)` +`func (o *LanguageStringMap) GetBsOk() (*string, bool)` GetBsOk returns a tuple with the Bs field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetBs -`func (o *StringMap) SetBs(v string)` +`func (o *LanguageStringMap) SetBs(v string)` SetBs sets Bs field to given value. ### HasBs -`func (o *StringMap) HasBs() bool` +`func (o *LanguageStringMap) HasBs() bool` HasBs returns a boolean if a field has been set. ### GetBg -`func (o *StringMap) GetBg() string` +`func (o *LanguageStringMap) GetBg() string` GetBg returns the Bg field if non-nil, zero value otherwise. ### GetBgOk -`func (o *StringMap) GetBgOk() (*string, bool)` +`func (o *LanguageStringMap) GetBgOk() (*string, bool)` GetBgOk returns a tuple with the Bg field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetBg -`func (o *StringMap) SetBg(v string)` +`func (o *LanguageStringMap) SetBg(v string)` SetBg sets Bg field to given value. ### HasBg -`func (o *StringMap) HasBg() bool` +`func (o *LanguageStringMap) HasBg() bool` HasBg returns a boolean if a field has been set. ### GetCa -`func (o *StringMap) GetCa() string` +`func (o *LanguageStringMap) GetCa() string` GetCa returns the Ca field if non-nil, zero value otherwise. ### GetCaOk -`func (o *StringMap) GetCaOk() (*string, bool)` +`func (o *LanguageStringMap) GetCaOk() (*string, bool)` GetCaOk returns a tuple with the Ca field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetCa -`func (o *StringMap) SetCa(v string)` +`func (o *LanguageStringMap) SetCa(v string)` SetCa sets Ca field to given value. ### HasCa -`func (o *StringMap) HasCa() bool` +`func (o *LanguageStringMap) HasCa() bool` HasCa returns a boolean if a field has been set. ### GetZhHans -`func (o *StringMap) GetZhHans() string` +`func (o *LanguageStringMap) GetZhHans() string` GetZhHans returns the ZhHans field if non-nil, zero value otherwise. ### GetZhHansOk -`func (o *StringMap) GetZhHansOk() (*string, bool)` +`func (o *LanguageStringMap) GetZhHansOk() (*string, bool)` GetZhHansOk returns a tuple with the ZhHans field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetZhHans -`func (o *StringMap) SetZhHans(v string)` +`func (o *LanguageStringMap) SetZhHans(v string)` SetZhHans sets ZhHans field to given value. ### HasZhHans -`func (o *StringMap) HasZhHans() bool` +`func (o *LanguageStringMap) HasZhHans() bool` HasZhHans returns a boolean if a field has been set. ### GetZhHant -`func (o *StringMap) GetZhHant() string` +`func (o *LanguageStringMap) GetZhHant() string` GetZhHant returns the ZhHant field if non-nil, zero value otherwise. ### GetZhHantOk -`func (o *StringMap) GetZhHantOk() (*string, bool)` +`func (o *LanguageStringMap) GetZhHantOk() (*string, bool)` GetZhHantOk returns a tuple with the ZhHant field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetZhHant -`func (o *StringMap) SetZhHant(v string)` +`func (o *LanguageStringMap) SetZhHant(v string)` SetZhHant sets ZhHant field to given value. ### HasZhHant -`func (o *StringMap) HasZhHant() bool` +`func (o *LanguageStringMap) HasZhHant() bool` HasZhHant returns a boolean if a field has been set. ### GetZh -`func (o *StringMap) GetZh() string` +`func (o *LanguageStringMap) GetZh() string` GetZh returns the Zh field if non-nil, zero value otherwise. ### GetZhOk -`func (o *StringMap) GetZhOk() (*string, bool)` +`func (o *LanguageStringMap) GetZhOk() (*string, bool)` GetZhOk returns a tuple with the Zh field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetZh -`func (o *StringMap) SetZh(v string)` +`func (o *LanguageStringMap) SetZh(v string)` SetZh sets Zh field to given value. ### HasZh -`func (o *StringMap) HasZh() bool` +`func (o *LanguageStringMap) HasZh() bool` HasZh returns a boolean if a field has been set. ### GetHr -`func (o *StringMap) GetHr() string` +`func (o *LanguageStringMap) GetHr() string` GetHr returns the Hr field if non-nil, zero value otherwise. ### GetHrOk -`func (o *StringMap) GetHrOk() (*string, bool)` +`func (o *LanguageStringMap) GetHrOk() (*string, bool)` GetHrOk returns a tuple with the Hr field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHr -`func (o *StringMap) SetHr(v string)` +`func (o *LanguageStringMap) SetHr(v string)` SetHr sets Hr field to given value. ### HasHr -`func (o *StringMap) HasHr() bool` +`func (o *LanguageStringMap) HasHr() bool` HasHr returns a boolean if a field has been set. ### GetCs -`func (o *StringMap) GetCs() string` +`func (o *LanguageStringMap) GetCs() string` GetCs returns the Cs field if non-nil, zero value otherwise. ### GetCsOk -`func (o *StringMap) GetCsOk() (*string, bool)` +`func (o *LanguageStringMap) GetCsOk() (*string, bool)` GetCsOk returns a tuple with the Cs field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetCs -`func (o *StringMap) SetCs(v string)` +`func (o *LanguageStringMap) SetCs(v string)` SetCs sets Cs field to given value. ### HasCs -`func (o *StringMap) HasCs() bool` +`func (o *LanguageStringMap) HasCs() bool` HasCs returns a boolean if a field has been set. ### GetDa -`func (o *StringMap) GetDa() string` +`func (o *LanguageStringMap) GetDa() string` GetDa returns the Da field if non-nil, zero value otherwise. ### GetDaOk -`func (o *StringMap) GetDaOk() (*string, bool)` +`func (o *LanguageStringMap) GetDaOk() (*string, bool)` GetDaOk returns a tuple with the Da field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetDa -`func (o *StringMap) SetDa(v string)` +`func (o *LanguageStringMap) SetDa(v string)` SetDa sets Da field to given value. ### HasDa -`func (o *StringMap) HasDa() bool` +`func (o *LanguageStringMap) HasDa() bool` HasDa returns a boolean if a field has been set. ### GetNl -`func (o *StringMap) GetNl() string` +`func (o *LanguageStringMap) GetNl() string` GetNl returns the Nl field if non-nil, zero value otherwise. ### GetNlOk -`func (o *StringMap) GetNlOk() (*string, bool)` +`func (o *LanguageStringMap) GetNlOk() (*string, bool)` GetNlOk returns a tuple with the Nl field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetNl -`func (o *StringMap) SetNl(v string)` +`func (o *LanguageStringMap) SetNl(v string)` SetNl sets Nl field to given value. ### HasNl -`func (o *StringMap) HasNl() bool` +`func (o *LanguageStringMap) HasNl() bool` HasNl returns a boolean if a field has been set. ### GetEt -`func (o *StringMap) GetEt() string` +`func (o *LanguageStringMap) GetEt() string` GetEt returns the Et field if non-nil, zero value otherwise. ### GetEtOk -`func (o *StringMap) GetEtOk() (*string, bool)` +`func (o *LanguageStringMap) GetEtOk() (*string, bool)` GetEtOk returns a tuple with the Et field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetEt -`func (o *StringMap) SetEt(v string)` +`func (o *LanguageStringMap) SetEt(v string)` SetEt sets Et field to given value. ### HasEt -`func (o *StringMap) HasEt() bool` +`func (o *LanguageStringMap) HasEt() bool` HasEt returns a boolean if a field has been set. ### GetFi -`func (o *StringMap) GetFi() string` +`func (o *LanguageStringMap) GetFi() string` GetFi returns the Fi field if non-nil, zero value otherwise. ### GetFiOk -`func (o *StringMap) GetFiOk() (*string, bool)` +`func (o *LanguageStringMap) GetFiOk() (*string, bool)` GetFiOk returns a tuple with the Fi field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetFi -`func (o *StringMap) SetFi(v string)` +`func (o *LanguageStringMap) SetFi(v string)` SetFi sets Fi field to given value. ### HasFi -`func (o *StringMap) HasFi() bool` +`func (o *LanguageStringMap) HasFi() bool` HasFi returns a boolean if a field has been set. ### GetFr -`func (o *StringMap) GetFr() string` +`func (o *LanguageStringMap) GetFr() string` GetFr returns the Fr field if non-nil, zero value otherwise. ### GetFrOk -`func (o *StringMap) GetFrOk() (*string, bool)` +`func (o *LanguageStringMap) GetFrOk() (*string, bool)` GetFrOk returns a tuple with the Fr field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetFr -`func (o *StringMap) SetFr(v string)` +`func (o *LanguageStringMap) SetFr(v string)` SetFr sets Fr field to given value. ### HasFr -`func (o *StringMap) HasFr() bool` +`func (o *LanguageStringMap) HasFr() bool` HasFr returns a boolean if a field has been set. ### GetKa -`func (o *StringMap) GetKa() string` +`func (o *LanguageStringMap) GetKa() string` GetKa returns the Ka field if non-nil, zero value otherwise. ### GetKaOk -`func (o *StringMap) GetKaOk() (*string, bool)` +`func (o *LanguageStringMap) GetKaOk() (*string, bool)` GetKaOk returns a tuple with the Ka field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetKa -`func (o *StringMap) SetKa(v string)` +`func (o *LanguageStringMap) SetKa(v string)` SetKa sets Ka field to given value. ### HasKa -`func (o *StringMap) HasKa() bool` +`func (o *LanguageStringMap) HasKa() bool` HasKa returns a boolean if a field has been set. ### GetDe -`func (o *StringMap) GetDe() string` +`func (o *LanguageStringMap) GetDe() string` GetDe returns the De field if non-nil, zero value otherwise. ### GetDeOk -`func (o *StringMap) GetDeOk() (*string, bool)` +`func (o *LanguageStringMap) GetDeOk() (*string, bool)` GetDeOk returns a tuple with the De field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetDe -`func (o *StringMap) SetDe(v string)` +`func (o *LanguageStringMap) SetDe(v string)` SetDe sets De field to given value. ### HasDe -`func (o *StringMap) HasDe() bool` +`func (o *LanguageStringMap) HasDe() bool` HasDe returns a boolean if a field has been set. ### GetEl -`func (o *StringMap) GetEl() string` +`func (o *LanguageStringMap) GetEl() string` GetEl returns the El field if non-nil, zero value otherwise. ### GetElOk -`func (o *StringMap) GetElOk() (*string, bool)` +`func (o *LanguageStringMap) GetElOk() (*string, bool)` GetElOk returns a tuple with the El field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetEl -`func (o *StringMap) SetEl(v string)` +`func (o *LanguageStringMap) SetEl(v string)` SetEl sets El field to given value. ### HasEl -`func (o *StringMap) HasEl() bool` +`func (o *LanguageStringMap) HasEl() bool` HasEl returns a boolean if a field has been set. ### GetHi -`func (o *StringMap) GetHi() string` +`func (o *LanguageStringMap) GetHi() string` GetHi returns the Hi field if non-nil, zero value otherwise. ### GetHiOk -`func (o *StringMap) GetHiOk() (*string, bool)` +`func (o *LanguageStringMap) GetHiOk() (*string, bool)` GetHiOk returns a tuple with the Hi field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHi -`func (o *StringMap) SetHi(v string)` +`func (o *LanguageStringMap) SetHi(v string)` SetHi sets Hi field to given value. ### HasHi -`func (o *StringMap) HasHi() bool` +`func (o *LanguageStringMap) HasHi() bool` HasHi returns a boolean if a field has been set. ### GetHe -`func (o *StringMap) GetHe() string` +`func (o *LanguageStringMap) GetHe() string` GetHe returns the He field if non-nil, zero value otherwise. ### GetHeOk -`func (o *StringMap) GetHeOk() (*string, bool)` +`func (o *LanguageStringMap) GetHeOk() (*string, bool)` GetHeOk returns a tuple with the He field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHe -`func (o *StringMap) SetHe(v string)` +`func (o *LanguageStringMap) SetHe(v string)` SetHe sets He field to given value. ### HasHe -`func (o *StringMap) HasHe() bool` +`func (o *LanguageStringMap) HasHe() bool` HasHe returns a boolean if a field has been set. ### GetHu -`func (o *StringMap) GetHu() string` +`func (o *LanguageStringMap) GetHu() string` GetHu returns the Hu field if non-nil, zero value otherwise. ### GetHuOk -`func (o *StringMap) GetHuOk() (*string, bool)` +`func (o *LanguageStringMap) GetHuOk() (*string, bool)` GetHuOk returns a tuple with the Hu field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHu -`func (o *StringMap) SetHu(v string)` +`func (o *LanguageStringMap) SetHu(v string)` SetHu sets Hu field to given value. ### HasHu -`func (o *StringMap) HasHu() bool` +`func (o *LanguageStringMap) HasHu() bool` HasHu returns a boolean if a field has been set. ### GetId -`func (o *StringMap) GetId() string` +`func (o *LanguageStringMap) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk -`func (o *StringMap) GetIdOk() (*string, bool)` +`func (o *LanguageStringMap) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId -`func (o *StringMap) SetId(v string)` +`func (o *LanguageStringMap) SetId(v string)` SetId sets Id field to given value. ### HasId -`func (o *StringMap) HasId() bool` +`func (o *LanguageStringMap) HasId() bool` HasId returns a boolean if a field has been set. ### GetIt -`func (o *StringMap) GetIt() string` +`func (o *LanguageStringMap) GetIt() string` GetIt returns the It field if non-nil, zero value otherwise. ### GetItOk -`func (o *StringMap) GetItOk() (*string, bool)` +`func (o *LanguageStringMap) GetItOk() (*string, bool)` GetItOk returns a tuple with the It field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetIt -`func (o *StringMap) SetIt(v string)` +`func (o *LanguageStringMap) SetIt(v string)` SetIt sets It field to given value. ### HasIt -`func (o *StringMap) HasIt() bool` +`func (o *LanguageStringMap) HasIt() bool` HasIt returns a boolean if a field has been set. ### GetJa -`func (o *StringMap) GetJa() string` +`func (o *LanguageStringMap) GetJa() string` GetJa returns the Ja field if non-nil, zero value otherwise. ### GetJaOk -`func (o *StringMap) GetJaOk() (*string, bool)` +`func (o *LanguageStringMap) GetJaOk() (*string, bool)` GetJaOk returns a tuple with the Ja field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetJa -`func (o *StringMap) SetJa(v string)` +`func (o *LanguageStringMap) SetJa(v string)` SetJa sets Ja field to given value. ### HasJa -`func (o *StringMap) HasJa() bool` +`func (o *LanguageStringMap) HasJa() bool` HasJa returns a boolean if a field has been set. ### GetKo -`func (o *StringMap) GetKo() string` +`func (o *LanguageStringMap) GetKo() string` GetKo returns the Ko field if non-nil, zero value otherwise. ### GetKoOk -`func (o *StringMap) GetKoOk() (*string, bool)` +`func (o *LanguageStringMap) GetKoOk() (*string, bool)` GetKoOk returns a tuple with the Ko field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetKo -`func (o *StringMap) SetKo(v string)` +`func (o *LanguageStringMap) SetKo(v string)` SetKo sets Ko field to given value. ### HasKo -`func (o *StringMap) HasKo() bool` +`func (o *LanguageStringMap) HasKo() bool` HasKo returns a boolean if a field has been set. ### GetLv -`func (o *StringMap) GetLv() string` +`func (o *LanguageStringMap) GetLv() string` GetLv returns the Lv field if non-nil, zero value otherwise. ### GetLvOk -`func (o *StringMap) GetLvOk() (*string, bool)` +`func (o *LanguageStringMap) GetLvOk() (*string, bool)` GetLvOk returns a tuple with the Lv field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLv -`func (o *StringMap) SetLv(v string)` +`func (o *LanguageStringMap) SetLv(v string)` SetLv sets Lv field to given value. ### HasLv -`func (o *StringMap) HasLv() bool` +`func (o *LanguageStringMap) HasLv() bool` HasLv returns a boolean if a field has been set. ### GetLt -`func (o *StringMap) GetLt() string` +`func (o *LanguageStringMap) GetLt() string` GetLt returns the Lt field if non-nil, zero value otherwise. ### GetLtOk -`func (o *StringMap) GetLtOk() (*string, bool)` +`func (o *LanguageStringMap) GetLtOk() (*string, bool)` GetLtOk returns a tuple with the Lt field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLt -`func (o *StringMap) SetLt(v string)` +`func (o *LanguageStringMap) SetLt(v string)` SetLt sets Lt field to given value. ### HasLt -`func (o *StringMap) HasLt() bool` +`func (o *LanguageStringMap) HasLt() bool` HasLt returns a boolean if a field has been set. ### GetMs -`func (o *StringMap) GetMs() string` +`func (o *LanguageStringMap) GetMs() string` GetMs returns the Ms field if non-nil, zero value otherwise. ### GetMsOk -`func (o *StringMap) GetMsOk() (*string, bool)` +`func (o *LanguageStringMap) GetMsOk() (*string, bool)` GetMsOk returns a tuple with the Ms field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetMs -`func (o *StringMap) SetMs(v string)` +`func (o *LanguageStringMap) SetMs(v string)` SetMs sets Ms field to given value. ### HasMs -`func (o *StringMap) HasMs() bool` +`func (o *LanguageStringMap) HasMs() bool` HasMs returns a boolean if a field has been set. ### GetNb -`func (o *StringMap) GetNb() string` +`func (o *LanguageStringMap) GetNb() string` GetNb returns the Nb field if non-nil, zero value otherwise. ### GetNbOk -`func (o *StringMap) GetNbOk() (*string, bool)` +`func (o *LanguageStringMap) GetNbOk() (*string, bool)` GetNbOk returns a tuple with the Nb field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetNb -`func (o *StringMap) SetNb(v string)` +`func (o *LanguageStringMap) SetNb(v string)` SetNb sets Nb field to given value. ### HasNb -`func (o *StringMap) HasNb() bool` +`func (o *LanguageStringMap) HasNb() bool` HasNb returns a boolean if a field has been set. ### GetPl -`func (o *StringMap) GetPl() string` +`func (o *LanguageStringMap) GetPl() string` GetPl returns the Pl field if non-nil, zero value otherwise. ### GetPlOk -`func (o *StringMap) GetPlOk() (*string, bool)` +`func (o *LanguageStringMap) GetPlOk() (*string, bool)` GetPlOk returns a tuple with the Pl field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetPl -`func (o *StringMap) SetPl(v string)` +`func (o *LanguageStringMap) SetPl(v string)` SetPl sets Pl field to given value. ### HasPl -`func (o *StringMap) HasPl() bool` +`func (o *LanguageStringMap) HasPl() bool` HasPl returns a boolean if a field has been set. ### GetFa -`func (o *StringMap) GetFa() string` +`func (o *LanguageStringMap) GetFa() string` GetFa returns the Fa field if non-nil, zero value otherwise. ### GetFaOk -`func (o *StringMap) GetFaOk() (*string, bool)` +`func (o *LanguageStringMap) GetFaOk() (*string, bool)` GetFaOk returns a tuple with the Fa field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetFa -`func (o *StringMap) SetFa(v string)` +`func (o *LanguageStringMap) SetFa(v string)` SetFa sets Fa field to given value. ### HasFa -`func (o *StringMap) HasFa() bool` +`func (o *LanguageStringMap) HasFa() bool` HasFa returns a boolean if a field has been set. ### GetPt -`func (o *StringMap) GetPt() string` +`func (o *LanguageStringMap) GetPt() string` GetPt returns the Pt field if non-nil, zero value otherwise. ### GetPtOk -`func (o *StringMap) GetPtOk() (*string, bool)` +`func (o *LanguageStringMap) GetPtOk() (*string, bool)` GetPtOk returns a tuple with the Pt field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetPt -`func (o *StringMap) SetPt(v string)` +`func (o *LanguageStringMap) SetPt(v string)` SetPt sets Pt field to given value. ### HasPt -`func (o *StringMap) HasPt() bool` +`func (o *LanguageStringMap) HasPt() bool` HasPt returns a boolean if a field has been set. ### GetPa -`func (o *StringMap) GetPa() string` +`func (o *LanguageStringMap) GetPa() string` GetPa returns the Pa field if non-nil, zero value otherwise. ### GetPaOk -`func (o *StringMap) GetPaOk() (*string, bool)` +`func (o *LanguageStringMap) GetPaOk() (*string, bool)` GetPaOk returns a tuple with the Pa field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetPa -`func (o *StringMap) SetPa(v string)` +`func (o *LanguageStringMap) SetPa(v string)` SetPa sets Pa field to given value. ### HasPa -`func (o *StringMap) HasPa() bool` +`func (o *LanguageStringMap) HasPa() bool` HasPa returns a boolean if a field has been set. ### GetRo -`func (o *StringMap) GetRo() string` +`func (o *LanguageStringMap) GetRo() string` GetRo returns the Ro field if non-nil, zero value otherwise. ### GetRoOk -`func (o *StringMap) GetRoOk() (*string, bool)` +`func (o *LanguageStringMap) GetRoOk() (*string, bool)` GetRoOk returns a tuple with the Ro field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetRo -`func (o *StringMap) SetRo(v string)` +`func (o *LanguageStringMap) SetRo(v string)` SetRo sets Ro field to given value. ### HasRo -`func (o *StringMap) HasRo() bool` +`func (o *LanguageStringMap) HasRo() bool` HasRo returns a boolean if a field has been set. ### GetRu -`func (o *StringMap) GetRu() string` +`func (o *LanguageStringMap) GetRu() string` GetRu returns the Ru field if non-nil, zero value otherwise. ### GetRuOk -`func (o *StringMap) GetRuOk() (*string, bool)` +`func (o *LanguageStringMap) GetRuOk() (*string, bool)` GetRuOk returns a tuple with the Ru field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetRu -`func (o *StringMap) SetRu(v string)` +`func (o *LanguageStringMap) SetRu(v string)` SetRu sets Ru field to given value. ### HasRu -`func (o *StringMap) HasRu() bool` +`func (o *LanguageStringMap) HasRu() bool` HasRu returns a boolean if a field has been set. ### GetSr -`func (o *StringMap) GetSr() string` +`func (o *LanguageStringMap) GetSr() string` GetSr returns the Sr field if non-nil, zero value otherwise. ### GetSrOk -`func (o *StringMap) GetSrOk() (*string, bool)` +`func (o *LanguageStringMap) GetSrOk() (*string, bool)` GetSrOk returns a tuple with the Sr field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetSr -`func (o *StringMap) SetSr(v string)` +`func (o *LanguageStringMap) SetSr(v string)` SetSr sets Sr field to given value. ### HasSr -`func (o *StringMap) HasSr() bool` +`func (o *LanguageStringMap) HasSr() bool` HasSr returns a boolean if a field has been set. ### GetSk -`func (o *StringMap) GetSk() string` +`func (o *LanguageStringMap) GetSk() string` GetSk returns the Sk field if non-nil, zero value otherwise. ### GetSkOk -`func (o *StringMap) GetSkOk() (*string, bool)` +`func (o *LanguageStringMap) GetSkOk() (*string, bool)` GetSkOk returns a tuple with the Sk field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetSk -`func (o *StringMap) SetSk(v string)` +`func (o *LanguageStringMap) SetSk(v string)` SetSk sets Sk field to given value. ### HasSk -`func (o *StringMap) HasSk() bool` +`func (o *LanguageStringMap) HasSk() bool` HasSk returns a boolean if a field has been set. ### GetEs -`func (o *StringMap) GetEs() string` +`func (o *LanguageStringMap) GetEs() string` GetEs returns the Es field if non-nil, zero value otherwise. ### GetEsOk -`func (o *StringMap) GetEsOk() (*string, bool)` +`func (o *LanguageStringMap) GetEsOk() (*string, bool)` GetEsOk returns a tuple with the Es field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetEs -`func (o *StringMap) SetEs(v string)` +`func (o *LanguageStringMap) SetEs(v string)` SetEs sets Es field to given value. ### HasEs -`func (o *StringMap) HasEs() bool` +`func (o *LanguageStringMap) HasEs() bool` HasEs returns a boolean if a field has been set. ### GetSv -`func (o *StringMap) GetSv() string` +`func (o *LanguageStringMap) GetSv() string` GetSv returns the Sv field if non-nil, zero value otherwise. ### GetSvOk -`func (o *StringMap) GetSvOk() (*string, bool)` +`func (o *LanguageStringMap) GetSvOk() (*string, bool)` GetSvOk returns a tuple with the Sv field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetSv -`func (o *StringMap) SetSv(v string)` +`func (o *LanguageStringMap) SetSv(v string)` SetSv sets Sv field to given value. ### HasSv -`func (o *StringMap) HasSv() bool` +`func (o *LanguageStringMap) HasSv() bool` HasSv returns a boolean if a field has been set. ### GetTh -`func (o *StringMap) GetTh() string` +`func (o *LanguageStringMap) GetTh() string` GetTh returns the Th field if non-nil, zero value otherwise. ### GetThOk -`func (o *StringMap) GetThOk() (*string, bool)` +`func (o *LanguageStringMap) GetThOk() (*string, bool)` GetThOk returns a tuple with the Th field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetTh -`func (o *StringMap) SetTh(v string)` +`func (o *LanguageStringMap) SetTh(v string)` SetTh sets Th field to given value. ### HasTh -`func (o *StringMap) HasTh() bool` +`func (o *LanguageStringMap) HasTh() bool` HasTh returns a boolean if a field has been set. ### GetTr -`func (o *StringMap) GetTr() string` +`func (o *LanguageStringMap) GetTr() string` GetTr returns the Tr field if non-nil, zero value otherwise. ### GetTrOk -`func (o *StringMap) GetTrOk() (*string, bool)` +`func (o *LanguageStringMap) GetTrOk() (*string, bool)` GetTrOk returns a tuple with the Tr field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetTr -`func (o *StringMap) SetTr(v string)` +`func (o *LanguageStringMap) SetTr(v string)` SetTr sets Tr field to given value. ### HasTr -`func (o *StringMap) HasTr() bool` +`func (o *LanguageStringMap) HasTr() bool` HasTr returns a boolean if a field has been set. ### GetUk -`func (o *StringMap) GetUk() string` +`func (o *LanguageStringMap) GetUk() string` GetUk returns the Uk field if non-nil, zero value otherwise. ### GetUkOk -`func (o *StringMap) GetUkOk() (*string, bool)` +`func (o *LanguageStringMap) GetUkOk() (*string, bool)` GetUkOk returns a tuple with the Uk field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetUk -`func (o *StringMap) SetUk(v string)` +`func (o *LanguageStringMap) SetUk(v string)` SetUk sets Uk field to given value. ### HasUk -`func (o *StringMap) HasUk() bool` +`func (o *LanguageStringMap) HasUk() bool` HasUk returns a boolean if a field has been set. ### GetVi -`func (o *StringMap) GetVi() string` +`func (o *LanguageStringMap) GetVi() string` GetVi returns the Vi field if non-nil, zero value otherwise. ### GetViOk -`func (o *StringMap) GetViOk() (*string, bool)` +`func (o *LanguageStringMap) GetViOk() (*string, bool)` GetViOk returns a tuple with the Vi field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetVi -`func (o *StringMap) SetVi(v string)` +`func (o *LanguageStringMap) SetVi(v string)` SetVi sets Vi field to given value. ### HasVi -`func (o *StringMap) HasVi() bool` +`func (o *LanguageStringMap) HasVi() bool` HasVi returns a boolean if a field has been set. diff --git a/docs/Notification.md b/docs/Notification.md index a2bdcd7..469b018 100644 --- a/docs/Notification.md +++ b/docs/Notification.md @@ -6,17 +6,16 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **IncludedSegments** | Pointer to **[]string** | The segment names you want to target. Users in these segments will receive a notification. This targeting parameter is only compatible with excluded_segments. Example: [\"Active Users\", \"Inactive Users\"] | [optional] **ExcludedSegments** | Pointer to **[]string** | Segment that will be excluded when sending. Users in these segments will not receive a notification, even if they were included in included_segments. This targeting parameter is only compatible with included_segments. Example: [\"Active Users\", \"Inactive Users\"] | [optional] -**IncludePlayerIds** | Pointer to **[]string** | 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 | [optional] -**IncludeExternalUserIds** | Pointer to **[]string** | 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. | [optional] +**IncludeSubscriptionIds** | Pointer to **[]string** | 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 | [optional] **IncludeEmailTokens** | Pointer to **[]string** | 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 | [optional] **IncludePhoneNumbers** | Pointer to **[]string** | Recommended for Sending SMS - Target specific phone numbers. The phone number should be in the E.164 format. Phone number should be an existing subscriber on OneSignal. Refer our docs to learn how to add phone numbers to OneSignal. Example phone number: +1999999999 Limit of 2,000 entries per REST API call | [optional] -**IncludeIosTokens** | Pointer to **[]string** | 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 | [optional] -**IncludeWpWnsUris** | Pointer to **[]string** | 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 | [optional] -**IncludeAmazonRegIds** | Pointer to **[]string** | 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 | [optional] -**IncludeChromeRegIds** | Pointer to **[]string** | 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 | [optional] -**IncludeChromeWebRegIds** | Pointer to **[]string** | 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 | [optional] -**IncludeAndroidRegIds** | Pointer to **[]string** | 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 | [optional] -**IncludeAliases** | Pointer to [**NullablePlayerNotificationTargetIncludeAliases**](PlayerNotificationTargetIncludeAliases.md) | | [optional] +**IncludeIosTokens** | Pointer to **[]string** | 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 | [optional] +**IncludeWpWnsUris** | Pointer to **[]string** | 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 | [optional] +**IncludeAmazonRegIds** | Pointer to **[]string** | 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 | [optional] +**IncludeChromeRegIds** | Pointer to **[]string** | 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 | [optional] +**IncludeChromeWebRegIds** | Pointer to **[]string** | 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 | [optional] +**IncludeAndroidRegIds** | Pointer to **[]string** | 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 | [optional] +**IncludeAliases** | Pointer to **map[string][]string** | 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. | [optional] **TargetChannel** | Pointer to **string** | | [optional] **Id** | Pointer to **string** | | [optional] **Value** | Pointer to **int32** | | [optional] [readonly] @@ -32,13 +31,12 @@ Name | Type | Description | Notes **IsWPWNS** | Pointer to **NullableBool** | Indicates whether to send to all devices registered under your app's Windows platform. | [optional] **IsAdm** | Pointer to **NullableBool** | Indicates whether to send to all devices registered under your app's Amazon Fire platform. | [optional] **IsChrome** | Pointer to **NullableBool** | This flag is not used for web push Please see isChromeWeb for sending to web push users. This flag only applies to Google Chrome Apps & Extensions. Indicates whether to send to all devices registered under your app's Google Chrome Apps & Extension platform. | [optional] -**ChannelForExternalUserIds** | Pointer to **string** | Indicates if the message type when targeting with include_external_user_ids for cases where an email, sms, and/or push subscribers have the same external user id. Example: Use the string \"push\" to indicate you are sending a push notification or the string \"email\"for sending emails or \"sms\"for sending SMS. | [optional] **AppId** | **string** | Required: Your OneSignal Application ID, which can be found in Keys & IDs. It is a UUID and looks similar to 8250eaf6-1a58-489e-b136-7c74a864b434. | **ExternalId** | Pointer to **NullableString** | [DEPRECATED] Correlation and idempotency key. A request received with this parameter will first look for another notification with the same external_id. If one exists, a notification will not be sent, and result of the previous operation will instead be returned. Therefore, if you plan on using this feature, it's important to use a good source of randomness to generate the UUID passed here. This key is only idempotent for 30 days. After 30 days, the notification could be removed from our system and a notification with the same external_id will be sent again. See Idempotent Notification Requests for more details writeOnly: true | [optional] **IdempotencyKey** | Pointer to **NullableString** | Correlation and idempotency key. A request received with this parameter will first look for another notification with the same idempotency key. If one exists, a notification will not be sent, and result of the previous operation will instead be returned. Therefore, if you plan on using this feature, it's important to use a good source of randomness to generate the UUID passed here. This key is only idempotent for 30 days. After 30 days, the notification could be removed from our system and a notification with the same idempotency key will be sent again. See Idempotent Notification Requests for more details writeOnly: true | [optional] -**Contents** | Pointer to [**NullableStringMap**](StringMap.md) | | [optional] -**Headings** | Pointer to [**NullableStringMap**](StringMap.md) | | [optional] -**Subtitle** | Pointer to [**NullableStringMap**](StringMap.md) | | [optional] +**Contents** | Pointer to [**NullableLanguageStringMap**](LanguageStringMap.md) | | [optional] +**Headings** | Pointer to [**NullableLanguageStringMap**](LanguageStringMap.md) | | [optional] +**Subtitle** | Pointer to [**NullableLanguageStringMap**](LanguageStringMap.md) | | [optional] **Data** | Pointer to **map[string]interface{}** | 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} | [optional] **HuaweiMsgType** | Pointer to **NullableString** | Channel: Push Notifications Platform: Huawei Use \"data\" or \"message\" depending on the type of notification you are sending. More details in Data & Background Notifications. | [optional] **Url** | Pointer to **NullableString** | Channel: Push Notifications Platform: All The URL to open in the browser when a user clicks on the notification. Note: iOS needs https or updated NSAppTransportSecurity in plist This field supports inline substitutions. Omit if including web_url or app_url Example: https://onesignal.com | [optional] @@ -55,7 +53,7 @@ Name | Type | Description | Notes **ChromeBigPicture** | Pointer to **NullableString** | Channel: Push Notifications Platform: ChromeApp Large picture to display below the notification text. Must be a local URL. | [optional] **ChromeWebImage** | Pointer to **NullableString** | Channel: Push Notifications Platform: Chrome 56+ Sets the web push notification's large image to be shown below the notification's title and text. Please see Web Push Notification Icons. | [optional] **Buttons** | Pointer to [**[]Button**](Button.md) | Channel: Push Notifications Platform: iOS 8.0+, Android 4.1+, and derivatives like Amazon Buttons to add to the notification. Icon only works for Android. Buttons show in reverse order of array position i.e. Last item in array shows as first button on device. Example: [{\"id\": \"id2\", \"text\": \"second button\", \"icon\": \"ic_menu_share\"}, {\"id\": \"id1\", \"text\": \"first button\", \"icon\": \"ic_menu_send\"}] | [optional] -**WebButtons** | Pointer to [**[]Button**](Button.md) | 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\"}] | [optional] +**WebButtons** | Pointer to [**[]WebButton**](WebButton.md) | 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\"}] | [optional] **IosCategory** | Pointer to **NullableString** | 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. | [optional] **AndroidChannelId** | Pointer to **string** | Channel: Push Notifications Platform: Android The Android Oreo Notification Category to send the notification under. See the Category documentation on creating one and getting it's id. | [optional] **HuaweiChannelId** | Pointer to **NullableString** | Channel: Push Notifications Platform: Huawei The Android Oreo Notification Category to send the notification under. See the Category documentation on creating one and getting it's id. | [optional] @@ -101,6 +99,8 @@ Name | Type | Description | Notes **ThreadId** | Pointer to **NullableString** | Channel: Push Notifications Platform: iOS 12+ This parameter is supported in iOS 12 and above. It allows you to group related notifications together. If two notifications have the same thread-id, they will both be added to the same group. | [optional] **SummaryArg** | Pointer to **string** | Channel: Push Notifications Platform: iOS 12+ When using thread_id to create grouped notifications in iOS 12+, you can also control the summary. For example, a grouped notification can say \"12 more notifications from John Doe\". The summary_arg lets you set the name of the person/thing the notifications are coming from, and will show up as \"X more notifications from summary_arg\" | [optional] **SummaryArgCount** | Pointer to **int32** | Channel: Push Notifications Platform: iOS 12+ When using thread_id, you can also control the count of the number of notifications in the group. For example, if the group already has 12 notifications, and you send a new notification with summary_arg_count = 2, the new total will be 14 and the summary will be \"14 more notifications from summary_arg\" | [optional] +**IosRelevanceScore** | Pointer to **NullableFloat32** | 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. | [optional] +**IosInterruptionLevel** | Pointer to **NullableString** | 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. | [optional] **EmailSubject** | Pointer to **NullableString** | Channel: Email Required. The subject of the email. | [optional] **EmailBody** | Pointer to **string** | Channel: Email Required unless template_id is set. HTML suported The body of the email you wish to send. Typically, customers include their own HTML templates here. Must include [unsubscribe_url] in an <a> tag somewhere in the email. Note: any malformed HTML content will be sent to users. Please double-check your HTML is valid. | [optional] **EmailFromName** | Pointer to **NullableString** | Channel: Email The name the email is from. If not specified, will default to \"from name\" set in the OneSignal Dashboard Email Settings. | [optional] @@ -109,7 +109,7 @@ Name | Type | Description | Notes **IncludeUnsubscribed** | Pointer to **bool** | Channel: Email Default is `false`. This field is used to send transactional notifications. If set to `true`, this notification will also be sent to unsubscribed emails. If a `template_id` is provided, the `include_unsubscribed` value from the template will be inherited. If you are using a third-party ESP, this field requires the ESP's list of unsubscribed emails to be cleared. | [optional] **SmsFrom** | Pointer to **NullableString** | Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format. | [optional] **SmsMediaUrls** | Pointer to **[]string** | Channel: SMS URLs for the media files to be attached to the SMS content. Limit: 10 media urls with a total max. size of 5MBs. | [optional] -**Filters** | Pointer to [**[]Filter**](Filter.md) | | [optional] +**Filters** | Pointer to [**[]FilterExpression**](FilterExpression.md) | | [optional] **CustomData** | Pointer to **map[string]interface{}** | 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} | [optional] **SendAfter** | Pointer to **NullableTime** | Channel: All Schedule notification for future delivery. API defaults to UTC -1100 Examples: All examples are the exact same date & time. \"Thu Sep 24 2015 14:00:00 GMT-0700 (PDT)\" \"September 24th 2015, 2:00:00 pm UTC-07:00\" \"2015-09-24 14:00:00 GMT-0700\" \"Sept 24 2015 14:00:00 GMT-0700\" \"Thu Sep 24 2015 14:00:00 GMT-0700 (Pacific Daylight Time)\" Note: SMS currently only supports send_after parameter. | [optional] @@ -182,76 +182,41 @@ SetExcludedSegments sets ExcludedSegments field to given value. HasExcludedSegments returns a boolean if a field has been set. -### GetIncludePlayerIds +### GetIncludeSubscriptionIds -`func (o *Notification) GetIncludePlayerIds() []string` +`func (o *Notification) GetIncludeSubscriptionIds() []string` -GetIncludePlayerIds returns the IncludePlayerIds field if non-nil, zero value otherwise. +GetIncludeSubscriptionIds returns the IncludeSubscriptionIds field if non-nil, zero value otherwise. -### GetIncludePlayerIdsOk +### GetIncludeSubscriptionIdsOk -`func (o *Notification) GetIncludePlayerIdsOk() (*[]string, bool)` +`func (o *Notification) GetIncludeSubscriptionIdsOk() (*[]string, bool)` -GetIncludePlayerIdsOk returns a tuple with the IncludePlayerIds field if it's non-nil, zero value otherwise +GetIncludeSubscriptionIdsOk returns a tuple with the IncludeSubscriptionIds field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetIncludePlayerIds +### SetIncludeSubscriptionIds -`func (o *Notification) SetIncludePlayerIds(v []string)` +`func (o *Notification) SetIncludeSubscriptionIds(v []string)` -SetIncludePlayerIds sets IncludePlayerIds field to given value. +SetIncludeSubscriptionIds sets IncludeSubscriptionIds field to given value. -### HasIncludePlayerIds +### HasIncludeSubscriptionIds -`func (o *Notification) HasIncludePlayerIds() bool` +`func (o *Notification) HasIncludeSubscriptionIds() bool` -HasIncludePlayerIds returns a boolean if a field has been set. +HasIncludeSubscriptionIds returns a boolean if a field has been set. -### SetIncludePlayerIdsNil +### SetIncludeSubscriptionIdsNil -`func (o *Notification) SetIncludePlayerIdsNil(b bool)` +`func (o *Notification) SetIncludeSubscriptionIdsNil(b bool)` - SetIncludePlayerIdsNil sets the value for IncludePlayerIds to be an explicit nil + SetIncludeSubscriptionIdsNil sets the value for IncludeSubscriptionIds to be an explicit nil -### UnsetIncludePlayerIds -`func (o *Notification) UnsetIncludePlayerIds()` +### UnsetIncludeSubscriptionIds +`func (o *Notification) UnsetIncludeSubscriptionIds()` -UnsetIncludePlayerIds ensures that no value is present for IncludePlayerIds, not even an explicit nil -### GetIncludeExternalUserIds - -`func (o *Notification) GetIncludeExternalUserIds() []string` - -GetIncludeExternalUserIds returns the IncludeExternalUserIds field if non-nil, zero value otherwise. - -### GetIncludeExternalUserIdsOk - -`func (o *Notification) GetIncludeExternalUserIdsOk() (*[]string, bool)` - -GetIncludeExternalUserIdsOk returns a tuple with the IncludeExternalUserIds field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIncludeExternalUserIds - -`func (o *Notification) SetIncludeExternalUserIds(v []string)` - -SetIncludeExternalUserIds sets IncludeExternalUserIds field to given value. - -### HasIncludeExternalUserIds - -`func (o *Notification) HasIncludeExternalUserIds() bool` - -HasIncludeExternalUserIds returns a boolean if a field has been set. - -### SetIncludeExternalUserIdsNil - -`func (o *Notification) SetIncludeExternalUserIdsNil(b bool)` - - SetIncludeExternalUserIdsNil sets the value for IncludeExternalUserIds to be an explicit nil - -### UnsetIncludeExternalUserIds -`func (o *Notification) UnsetIncludeExternalUserIds()` - -UnsetIncludeExternalUserIds ensures that no value is present for IncludeExternalUserIds, not even an explicit nil +UnsetIncludeSubscriptionIds ensures that no value is present for IncludeSubscriptionIds, not even an explicit nil ### GetIncludeEmailTokens `func (o *Notification) GetIncludeEmailTokens() []string` @@ -454,20 +419,20 @@ HasIncludeAndroidRegIds returns a boolean if a field has been set. ### GetIncludeAliases -`func (o *Notification) GetIncludeAliases() PlayerNotificationTargetIncludeAliases` +`func (o *Notification) GetIncludeAliases() map[string][]string` GetIncludeAliases returns the IncludeAliases field if non-nil, zero value otherwise. ### GetIncludeAliasesOk -`func (o *Notification) GetIncludeAliasesOk() (*PlayerNotificationTargetIncludeAliases, bool)` +`func (o *Notification) GetIncludeAliasesOk() (*map[string][]string, bool)` GetIncludeAliasesOk returns a tuple with the IncludeAliases field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetIncludeAliases -`func (o *Notification) SetIncludeAliases(v PlayerNotificationTargetIncludeAliases)` +`func (o *Notification) SetIncludeAliases(v map[string][]string)` SetIncludeAliases sets IncludeAliases field to given value. @@ -972,31 +937,6 @@ HasIsChrome returns a boolean if a field has been set. `func (o *Notification) UnsetIsChrome()` UnsetIsChrome ensures that no value is present for IsChrome, not even an explicit nil -### GetChannelForExternalUserIds - -`func (o *Notification) GetChannelForExternalUserIds() string` - -GetChannelForExternalUserIds returns the ChannelForExternalUserIds field if non-nil, zero value otherwise. - -### GetChannelForExternalUserIdsOk - -`func (o *Notification) GetChannelForExternalUserIdsOk() (*string, bool)` - -GetChannelForExternalUserIdsOk returns a tuple with the ChannelForExternalUserIds field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetChannelForExternalUserIds - -`func (o *Notification) SetChannelForExternalUserIds(v string)` - -SetChannelForExternalUserIds sets ChannelForExternalUserIds field to given value. - -### HasChannelForExternalUserIds - -`func (o *Notification) HasChannelForExternalUserIds() bool` - -HasChannelForExternalUserIds returns a boolean if a field has been set. - ### GetAppId `func (o *Notification) GetAppId() string` @@ -1089,20 +1029,20 @@ HasIdempotencyKey returns a boolean if a field has been set. UnsetIdempotencyKey ensures that no value is present for IdempotencyKey, not even an explicit nil ### GetContents -`func (o *Notification) GetContents() StringMap` +`func (o *Notification) GetContents() LanguageStringMap` GetContents returns the Contents field if non-nil, zero value otherwise. ### GetContentsOk -`func (o *Notification) GetContentsOk() (*StringMap, bool)` +`func (o *Notification) GetContentsOk() (*LanguageStringMap, bool)` GetContentsOk returns a tuple with the Contents field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetContents -`func (o *Notification) SetContents(v StringMap)` +`func (o *Notification) SetContents(v LanguageStringMap)` SetContents sets Contents field to given value. @@ -1124,20 +1064,20 @@ HasContents returns a boolean if a field has been set. UnsetContents ensures that no value is present for Contents, not even an explicit nil ### GetHeadings -`func (o *Notification) GetHeadings() StringMap` +`func (o *Notification) GetHeadings() LanguageStringMap` GetHeadings returns the Headings field if non-nil, zero value otherwise. ### GetHeadingsOk -`func (o *Notification) GetHeadingsOk() (*StringMap, bool)` +`func (o *Notification) GetHeadingsOk() (*LanguageStringMap, bool)` GetHeadingsOk returns a tuple with the Headings field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHeadings -`func (o *Notification) SetHeadings(v StringMap)` +`func (o *Notification) SetHeadings(v LanguageStringMap)` SetHeadings sets Headings field to given value. @@ -1159,20 +1099,20 @@ HasHeadings returns a boolean if a field has been set. UnsetHeadings ensures that no value is present for Headings, not even an explicit nil ### GetSubtitle -`func (o *Notification) GetSubtitle() StringMap` +`func (o *Notification) GetSubtitle() LanguageStringMap` GetSubtitle returns the Subtitle field if non-nil, zero value otherwise. ### GetSubtitleOk -`func (o *Notification) GetSubtitleOk() (*StringMap, bool)` +`func (o *Notification) GetSubtitleOk() (*LanguageStringMap, bool)` GetSubtitleOk returns a tuple with the Subtitle field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetSubtitle -`func (o *Notification) SetSubtitle(v StringMap)` +`func (o *Notification) SetSubtitle(v LanguageStringMap)` SetSubtitle sets Subtitle field to given value. @@ -1744,20 +1684,20 @@ HasButtons returns a boolean if a field has been set. UnsetButtons ensures that no value is present for Buttons, not even an explicit nil ### GetWebButtons -`func (o *Notification) GetWebButtons() []Button` +`func (o *Notification) GetWebButtons() []WebButton` GetWebButtons returns the WebButtons field if non-nil, zero value otherwise. ### GetWebButtonsOk -`func (o *Notification) GetWebButtonsOk() (*[]Button, bool)` +`func (o *Notification) GetWebButtonsOk() (*[]WebButton, bool)` GetWebButtonsOk returns a tuple with the WebButtons field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetWebButtons -`func (o *Notification) SetWebButtons(v []Button)` +`func (o *Notification) SetWebButtons(v []WebButton)` SetWebButtons sets WebButtons field to given value. @@ -3282,6 +3222,76 @@ SetSummaryArgCount sets SummaryArgCount field to given value. HasSummaryArgCount returns a boolean if a field has been set. +### GetIosRelevanceScore + +`func (o *Notification) GetIosRelevanceScore() float32` + +GetIosRelevanceScore returns the IosRelevanceScore field if non-nil, zero value otherwise. + +### GetIosRelevanceScoreOk + +`func (o *Notification) GetIosRelevanceScoreOk() (*float32, bool)` + +GetIosRelevanceScoreOk returns a tuple with the IosRelevanceScore field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIosRelevanceScore + +`func (o *Notification) SetIosRelevanceScore(v float32)` + +SetIosRelevanceScore sets IosRelevanceScore field to given value. + +### HasIosRelevanceScore + +`func (o *Notification) HasIosRelevanceScore() bool` + +HasIosRelevanceScore returns a boolean if a field has been set. + +### SetIosRelevanceScoreNil + +`func (o *Notification) SetIosRelevanceScoreNil(b bool)` + + SetIosRelevanceScoreNil sets the value for IosRelevanceScore to be an explicit nil + +### UnsetIosRelevanceScore +`func (o *Notification) UnsetIosRelevanceScore()` + +UnsetIosRelevanceScore ensures that no value is present for IosRelevanceScore, not even an explicit nil +### GetIosInterruptionLevel + +`func (o *Notification) GetIosInterruptionLevel() string` + +GetIosInterruptionLevel returns the IosInterruptionLevel field if non-nil, zero value otherwise. + +### GetIosInterruptionLevelOk + +`func (o *Notification) GetIosInterruptionLevelOk() (*string, bool)` + +GetIosInterruptionLevelOk returns a tuple with the IosInterruptionLevel field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIosInterruptionLevel + +`func (o *Notification) SetIosInterruptionLevel(v string)` + +SetIosInterruptionLevel sets IosInterruptionLevel field to given value. + +### HasIosInterruptionLevel + +`func (o *Notification) HasIosInterruptionLevel() bool` + +HasIosInterruptionLevel returns a boolean if a field has been set. + +### SetIosInterruptionLevelNil + +`func (o *Notification) SetIosInterruptionLevelNil(b bool)` + + SetIosInterruptionLevelNil sets the value for IosInterruptionLevel to be an explicit nil + +### UnsetIosInterruptionLevel +`func (o *Notification) UnsetIosInterruptionLevel()` + +UnsetIosInterruptionLevel ensures that no value is present for IosInterruptionLevel, not even an explicit nil ### GetEmailSubject `func (o *Notification) GetEmailSubject() string` @@ -3544,20 +3554,20 @@ HasSmsMediaUrls returns a boolean if a field has been set. UnsetSmsMediaUrls ensures that no value is present for SmsMediaUrls, not even an explicit nil ### GetFilters -`func (o *Notification) GetFilters() []Filter` +`func (o *Notification) GetFilters() []FilterExpression` GetFilters returns the Filters field if non-nil, zero value otherwise. ### GetFiltersOk -`func (o *Notification) GetFiltersOk() (*[]Filter, bool)` +`func (o *Notification) GetFiltersOk() (*[]FilterExpression, bool)` GetFiltersOk returns a tuple with the Filters field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetFilters -`func (o *Notification) SetFilters(v []Filter)` +`func (o *Notification) SetFilters(v []FilterExpression)` SetFilters sets Filters field to given value. diff --git a/docs/Notification200Errors.md b/docs/Notification200Errors.md deleted file mode 100644 index b61bb12..0000000 --- a/docs/Notification200Errors.md +++ /dev/null @@ -1,82 +0,0 @@ -# Notification200Errors - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**InvalidExternalUserIds** | Pointer to **[]string** | Returned if using include_external_user_ids | [optional] -**InvalidPlayerIds** | Pointer to **[]string** | Returned if using include_player_ids and some were valid and others were not. | [optional] - -## Methods - -### NewNotification200Errors - -`func NewNotification200Errors() *Notification200Errors` - -NewNotification200Errors instantiates a new Notification200Errors object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewNotification200ErrorsWithDefaults - -`func NewNotification200ErrorsWithDefaults() *Notification200Errors` - -NewNotification200ErrorsWithDefaults instantiates a new Notification200Errors object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetInvalidExternalUserIds - -`func (o *Notification200Errors) GetInvalidExternalUserIds() []string` - -GetInvalidExternalUserIds returns the InvalidExternalUserIds field if non-nil, zero value otherwise. - -### GetInvalidExternalUserIdsOk - -`func (o *Notification200Errors) GetInvalidExternalUserIdsOk() (*[]string, bool)` - -GetInvalidExternalUserIdsOk returns a tuple with the InvalidExternalUserIds field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetInvalidExternalUserIds - -`func (o *Notification200Errors) SetInvalidExternalUserIds(v []string)` - -SetInvalidExternalUserIds sets InvalidExternalUserIds field to given value. - -### HasInvalidExternalUserIds - -`func (o *Notification200Errors) HasInvalidExternalUserIds() bool` - -HasInvalidExternalUserIds returns a boolean if a field has been set. - -### GetInvalidPlayerIds - -`func (o *Notification200Errors) GetInvalidPlayerIds() []string` - -GetInvalidPlayerIds returns the InvalidPlayerIds field if non-nil, zero value otherwise. - -### GetInvalidPlayerIdsOk - -`func (o *Notification200Errors) GetInvalidPlayerIdsOk() (*[]string, bool)` - -GetInvalidPlayerIdsOk returns a tuple with the InvalidPlayerIds field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetInvalidPlayerIds - -`func (o *Notification200Errors) SetInvalidPlayerIds(v []string)` - -SetInvalidPlayerIds sets InvalidPlayerIds field to given value. - -### HasInvalidPlayerIds - -`func (o *Notification200Errors) HasInvalidPlayerIds() bool` - -HasInvalidPlayerIds returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/NotificationTarget.md b/docs/NotificationTarget.md index 57b818b..a6edf81 100644 --- a/docs/NotificationTarget.md +++ b/docs/NotificationTarget.md @@ -6,17 +6,16 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **IncludedSegments** | Pointer to **[]string** | The segment names you want to target. Users in these segments will receive a notification. This targeting parameter is only compatible with excluded_segments. Example: [\"Active Users\", \"Inactive Users\"] | [optional] **ExcludedSegments** | Pointer to **[]string** | Segment that will be excluded when sending. Users in these segments will not receive a notification, even if they were included in included_segments. This targeting parameter is only compatible with included_segments. Example: [\"Active Users\", \"Inactive Users\"] | [optional] -**IncludePlayerIds** | Pointer to **[]string** | 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 | [optional] -**IncludeExternalUserIds** | Pointer to **[]string** | 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. | [optional] +**IncludeSubscriptionIds** | Pointer to **[]string** | 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 | [optional] **IncludeEmailTokens** | Pointer to **[]string** | 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 | [optional] **IncludePhoneNumbers** | Pointer to **[]string** | Recommended for Sending SMS - Target specific phone numbers. The phone number should be in the E.164 format. Phone number should be an existing subscriber on OneSignal. Refer our docs to learn how to add phone numbers to OneSignal. Example phone number: +1999999999 Limit of 2,000 entries per REST API call | [optional] -**IncludeIosTokens** | Pointer to **[]string** | 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 | [optional] -**IncludeWpWnsUris** | Pointer to **[]string** | 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 | [optional] -**IncludeAmazonRegIds** | Pointer to **[]string** | 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 | [optional] -**IncludeChromeRegIds** | Pointer to **[]string** | 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 | [optional] -**IncludeChromeWebRegIds** | Pointer to **[]string** | 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 | [optional] -**IncludeAndroidRegIds** | Pointer to **[]string** | 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 | [optional] -**IncludeAliases** | Pointer to [**NullablePlayerNotificationTargetIncludeAliases**](PlayerNotificationTargetIncludeAliases.md) | | [optional] +**IncludeIosTokens** | Pointer to **[]string** | 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 | [optional] +**IncludeWpWnsUris** | Pointer to **[]string** | 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 | [optional] +**IncludeAmazonRegIds** | Pointer to **[]string** | 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 | [optional] +**IncludeChromeRegIds** | Pointer to **[]string** | 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 | [optional] +**IncludeChromeWebRegIds** | Pointer to **[]string** | 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 | [optional] +**IncludeAndroidRegIds** | Pointer to **[]string** | 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 | [optional] +**IncludeAliases** | Pointer to **map[string][]string** | 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. | [optional] **TargetChannel** | Pointer to **string** | | [optional] ## Methods @@ -88,76 +87,41 @@ SetExcludedSegments sets ExcludedSegments field to given value. HasExcludedSegments returns a boolean if a field has been set. -### GetIncludePlayerIds +### GetIncludeSubscriptionIds -`func (o *NotificationTarget) GetIncludePlayerIds() []string` +`func (o *NotificationTarget) GetIncludeSubscriptionIds() []string` -GetIncludePlayerIds returns the IncludePlayerIds field if non-nil, zero value otherwise. +GetIncludeSubscriptionIds returns the IncludeSubscriptionIds field if non-nil, zero value otherwise. -### GetIncludePlayerIdsOk +### GetIncludeSubscriptionIdsOk -`func (o *NotificationTarget) GetIncludePlayerIdsOk() (*[]string, bool)` +`func (o *NotificationTarget) GetIncludeSubscriptionIdsOk() (*[]string, bool)` -GetIncludePlayerIdsOk returns a tuple with the IncludePlayerIds field if it's non-nil, zero value otherwise +GetIncludeSubscriptionIdsOk returns a tuple with the IncludeSubscriptionIds field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetIncludePlayerIds +### SetIncludeSubscriptionIds -`func (o *NotificationTarget) SetIncludePlayerIds(v []string)` +`func (o *NotificationTarget) SetIncludeSubscriptionIds(v []string)` -SetIncludePlayerIds sets IncludePlayerIds field to given value. +SetIncludeSubscriptionIds sets IncludeSubscriptionIds field to given value. -### HasIncludePlayerIds +### HasIncludeSubscriptionIds -`func (o *NotificationTarget) HasIncludePlayerIds() bool` +`func (o *NotificationTarget) HasIncludeSubscriptionIds() bool` -HasIncludePlayerIds returns a boolean if a field has been set. +HasIncludeSubscriptionIds returns a boolean if a field has been set. -### SetIncludePlayerIdsNil +### SetIncludeSubscriptionIdsNil -`func (o *NotificationTarget) SetIncludePlayerIdsNil(b bool)` +`func (o *NotificationTarget) SetIncludeSubscriptionIdsNil(b bool)` - SetIncludePlayerIdsNil sets the value for IncludePlayerIds to be an explicit nil + SetIncludeSubscriptionIdsNil sets the value for IncludeSubscriptionIds to be an explicit nil -### UnsetIncludePlayerIds -`func (o *NotificationTarget) UnsetIncludePlayerIds()` +### UnsetIncludeSubscriptionIds +`func (o *NotificationTarget) UnsetIncludeSubscriptionIds()` -UnsetIncludePlayerIds ensures that no value is present for IncludePlayerIds, not even an explicit nil -### GetIncludeExternalUserIds - -`func (o *NotificationTarget) GetIncludeExternalUserIds() []string` - -GetIncludeExternalUserIds returns the IncludeExternalUserIds field if non-nil, zero value otherwise. - -### GetIncludeExternalUserIdsOk - -`func (o *NotificationTarget) GetIncludeExternalUserIdsOk() (*[]string, bool)` - -GetIncludeExternalUserIdsOk returns a tuple with the IncludeExternalUserIds field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIncludeExternalUserIds - -`func (o *NotificationTarget) SetIncludeExternalUserIds(v []string)` - -SetIncludeExternalUserIds sets IncludeExternalUserIds field to given value. - -### HasIncludeExternalUserIds - -`func (o *NotificationTarget) HasIncludeExternalUserIds() bool` - -HasIncludeExternalUserIds returns a boolean if a field has been set. - -### SetIncludeExternalUserIdsNil - -`func (o *NotificationTarget) SetIncludeExternalUserIdsNil(b bool)` - - SetIncludeExternalUserIdsNil sets the value for IncludeExternalUserIds to be an explicit nil - -### UnsetIncludeExternalUserIds -`func (o *NotificationTarget) UnsetIncludeExternalUserIds()` - -UnsetIncludeExternalUserIds ensures that no value is present for IncludeExternalUserIds, not even an explicit nil +UnsetIncludeSubscriptionIds ensures that no value is present for IncludeSubscriptionIds, not even an explicit nil ### GetIncludeEmailTokens `func (o *NotificationTarget) GetIncludeEmailTokens() []string` @@ -360,20 +324,20 @@ HasIncludeAndroidRegIds returns a boolean if a field has been set. ### GetIncludeAliases -`func (o *NotificationTarget) GetIncludeAliases() PlayerNotificationTargetIncludeAliases` +`func (o *NotificationTarget) GetIncludeAliases() map[string][]string` GetIncludeAliases returns the IncludeAliases field if non-nil, zero value otherwise. ### GetIncludeAliasesOk -`func (o *NotificationTarget) GetIncludeAliasesOk() (*PlayerNotificationTargetIncludeAliases, bool)` +`func (o *NotificationTarget) GetIncludeAliasesOk() (*map[string][]string, bool)` GetIncludeAliasesOk returns a tuple with the IncludeAliases field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetIncludeAliases -`func (o *NotificationTarget) SetIncludeAliases(v PlayerNotificationTargetIncludeAliases)` +`func (o *NotificationTarget) SetIncludeAliases(v map[string][]string)` SetIncludeAliases sets IncludeAliases field to given value. diff --git a/docs/NotificationWithMeta.md b/docs/NotificationWithMeta.md index bc34306..ce3ba03 100644 --- a/docs/NotificationWithMeta.md +++ b/docs/NotificationWithMeta.md @@ -6,17 +6,16 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **IncludedSegments** | Pointer to **[]string** | The segment names you want to target. Users in these segments will receive a notification. This targeting parameter is only compatible with excluded_segments. Example: [\"Active Users\", \"Inactive Users\"] | [optional] **ExcludedSegments** | Pointer to **[]string** | Segment that will be excluded when sending. Users in these segments will not receive a notification, even if they were included in included_segments. This targeting parameter is only compatible with included_segments. Example: [\"Active Users\", \"Inactive Users\"] | [optional] -**IncludePlayerIds** | Pointer to **[]string** | 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 | [optional] -**IncludeExternalUserIds** | Pointer to **[]string** | 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. | [optional] +**IncludeSubscriptionIds** | Pointer to **[]string** | 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 | [optional] **IncludeEmailTokens** | Pointer to **[]string** | 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 | [optional] **IncludePhoneNumbers** | Pointer to **[]string** | Recommended for Sending SMS - Target specific phone numbers. The phone number should be in the E.164 format. Phone number should be an existing subscriber on OneSignal. Refer our docs to learn how to add phone numbers to OneSignal. Example phone number: +1999999999 Limit of 2,000 entries per REST API call | [optional] -**IncludeIosTokens** | Pointer to **[]string** | 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 | [optional] -**IncludeWpWnsUris** | Pointer to **[]string** | 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 | [optional] -**IncludeAmazonRegIds** | Pointer to **[]string** | 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 | [optional] -**IncludeChromeRegIds** | Pointer to **[]string** | 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 | [optional] -**IncludeChromeWebRegIds** | Pointer to **[]string** | 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 | [optional] -**IncludeAndroidRegIds** | Pointer to **[]string** | 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 | [optional] -**IncludeAliases** | Pointer to [**NullablePlayerNotificationTargetIncludeAliases**](PlayerNotificationTargetIncludeAliases.md) | | [optional] +**IncludeIosTokens** | Pointer to **[]string** | 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 | [optional] +**IncludeWpWnsUris** | Pointer to **[]string** | 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 | [optional] +**IncludeAmazonRegIds** | Pointer to **[]string** | 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 | [optional] +**IncludeChromeRegIds** | Pointer to **[]string** | 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 | [optional] +**IncludeChromeWebRegIds** | Pointer to **[]string** | 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 | [optional] +**IncludeAndroidRegIds** | Pointer to **[]string** | 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 | [optional] +**IncludeAliases** | Pointer to **map[string][]string** | 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. | [optional] **TargetChannel** | Pointer to **string** | | [optional] **Id** | Pointer to **string** | | [optional] **Value** | Pointer to **int32** | | [optional] [readonly] @@ -32,13 +31,12 @@ Name | Type | Description | Notes **IsWPWNS** | Pointer to **NullableBool** | Indicates whether to send to all devices registered under your app's Windows platform. | [optional] **IsAdm** | Pointer to **NullableBool** | Indicates whether to send to all devices registered under your app's Amazon Fire platform. | [optional] **IsChrome** | Pointer to **NullableBool** | This flag is not used for web push Please see isChromeWeb for sending to web push users. This flag only applies to Google Chrome Apps & Extensions. Indicates whether to send to all devices registered under your app's Google Chrome Apps & Extension platform. | [optional] -**ChannelForExternalUserIds** | Pointer to **string** | Indicates if the message type when targeting with include_external_user_ids for cases where an email, sms, and/or push subscribers have the same external user id. Example: Use the string \"push\" to indicate you are sending a push notification or the string \"email\"for sending emails or \"sms\"for sending SMS. | [optional] **AppId** | **string** | Required: Your OneSignal Application ID, which can be found in Keys & IDs. It is a UUID and looks similar to 8250eaf6-1a58-489e-b136-7c74a864b434. | **ExternalId** | Pointer to **NullableString** | [DEPRECATED] Correlation and idempotency key. A request received with this parameter will first look for another notification with the same external_id. If one exists, a notification will not be sent, and result of the previous operation will instead be returned. Therefore, if you plan on using this feature, it's important to use a good source of randomness to generate the UUID passed here. This key is only idempotent for 30 days. After 30 days, the notification could be removed from our system and a notification with the same external_id will be sent again. See Idempotent Notification Requests for more details writeOnly: true | [optional] **IdempotencyKey** | Pointer to **NullableString** | Correlation and idempotency key. A request received with this parameter will first look for another notification with the same idempotency key. If one exists, a notification will not be sent, and result of the previous operation will instead be returned. Therefore, if you plan on using this feature, it's important to use a good source of randomness to generate the UUID passed here. This key is only idempotent for 30 days. After 30 days, the notification could be removed from our system and a notification with the same idempotency key will be sent again. See Idempotent Notification Requests for more details writeOnly: true | [optional] -**Contents** | Pointer to [**NullableStringMap**](StringMap.md) | | [optional] -**Headings** | Pointer to [**NullableStringMap**](StringMap.md) | | [optional] -**Subtitle** | Pointer to [**NullableStringMap**](StringMap.md) | | [optional] +**Contents** | Pointer to [**NullableLanguageStringMap**](LanguageStringMap.md) | | [optional] +**Headings** | Pointer to [**NullableLanguageStringMap**](LanguageStringMap.md) | | [optional] +**Subtitle** | Pointer to [**NullableLanguageStringMap**](LanguageStringMap.md) | | [optional] **Data** | Pointer to **map[string]interface{}** | 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} | [optional] **HuaweiMsgType** | Pointer to **NullableString** | Channel: Push Notifications Platform: Huawei Use \"data\" or \"message\" depending on the type of notification you are sending. More details in Data & Background Notifications. | [optional] **Url** | Pointer to **NullableString** | Channel: Push Notifications Platform: All The URL to open in the browser when a user clicks on the notification. Note: iOS needs https or updated NSAppTransportSecurity in plist This field supports inline substitutions. Omit if including web_url or app_url Example: https://onesignal.com | [optional] @@ -55,7 +53,7 @@ Name | Type | Description | Notes **ChromeBigPicture** | Pointer to **NullableString** | Channel: Push Notifications Platform: ChromeApp Large picture to display below the notification text. Must be a local URL. | [optional] **ChromeWebImage** | Pointer to **NullableString** | Channel: Push Notifications Platform: Chrome 56+ Sets the web push notification's large image to be shown below the notification's title and text. Please see Web Push Notification Icons. | [optional] **Buttons** | Pointer to [**[]Button**](Button.md) | Channel: Push Notifications Platform: iOS 8.0+, Android 4.1+, and derivatives like Amazon Buttons to add to the notification. Icon only works for Android. Buttons show in reverse order of array position i.e. Last item in array shows as first button on device. Example: [{\"id\": \"id2\", \"text\": \"second button\", \"icon\": \"ic_menu_share\"}, {\"id\": \"id1\", \"text\": \"first button\", \"icon\": \"ic_menu_send\"}] | [optional] -**WebButtons** | Pointer to [**[]Button**](Button.md) | 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\"}] | [optional] +**WebButtons** | Pointer to [**[]WebButton**](WebButton.md) | 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\"}] | [optional] **IosCategory** | Pointer to **NullableString** | 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. | [optional] **AndroidChannelId** | Pointer to **string** | Channel: Push Notifications Platform: Android The Android Oreo Notification Category to send the notification under. See the Category documentation on creating one and getting it's id. | [optional] **HuaweiChannelId** | Pointer to **NullableString** | Channel: Push Notifications Platform: Huawei The Android Oreo Notification Category to send the notification under. See the Category documentation on creating one and getting it's id. | [optional] @@ -101,6 +99,8 @@ Name | Type | Description | Notes **ThreadId** | Pointer to **NullableString** | Channel: Push Notifications Platform: iOS 12+ This parameter is supported in iOS 12 and above. It allows you to group related notifications together. If two notifications have the same thread-id, they will both be added to the same group. | [optional] **SummaryArg** | Pointer to **string** | Channel: Push Notifications Platform: iOS 12+ When using thread_id to create grouped notifications in iOS 12+, you can also control the summary. For example, a grouped notification can say \"12 more notifications from John Doe\". The summary_arg lets you set the name of the person/thing the notifications are coming from, and will show up as \"X more notifications from summary_arg\" | [optional] **SummaryArgCount** | Pointer to **int32** | Channel: Push Notifications Platform: iOS 12+ When using thread_id, you can also control the count of the number of notifications in the group. For example, if the group already has 12 notifications, and you send a new notification with summary_arg_count = 2, the new total will be 14 and the summary will be \"14 more notifications from summary_arg\" | [optional] +**IosRelevanceScore** | Pointer to **NullableFloat32** | 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. | [optional] +**IosInterruptionLevel** | Pointer to **NullableString** | 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. | [optional] **EmailSubject** | Pointer to **NullableString** | Channel: Email Required. The subject of the email. | [optional] **EmailBody** | Pointer to **string** | Channel: Email Required unless template_id is set. HTML suported The body of the email you wish to send. Typically, customers include their own HTML templates here. Must include [unsubscribe_url] in an <a> tag somewhere in the email. Note: any malformed HTML content will be sent to users. Please double-check your HTML is valid. | [optional] **EmailFromName** | Pointer to **NullableString** | Channel: Email The name the email is from. If not specified, will default to \"from name\" set in the OneSignal Dashboard Email Settings. | [optional] @@ -109,7 +109,7 @@ Name | Type | Description | Notes **IncludeUnsubscribed** | Pointer to **bool** | Channel: Email Default is `false`. This field is used to send transactional notifications. If set to `true`, this notification will also be sent to unsubscribed emails. If a `template_id` is provided, the `include_unsubscribed` value from the template will be inherited. If you are using a third-party ESP, this field requires the ESP's list of unsubscribed emails to be cleared. | [optional] **SmsFrom** | Pointer to **NullableString** | Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format. | [optional] **SmsMediaUrls** | Pointer to **[]string** | Channel: SMS URLs for the media files to be attached to the SMS content. Limit: 10 media urls with a total max. size of 5MBs. | [optional] -**Filters** | Pointer to [**[]Filter**](Filter.md) | | [optional] +**Filters** | Pointer to [**[]FilterExpression**](FilterExpression.md) | | [optional] **CustomData** | Pointer to **map[string]interface{}** | 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} | [optional] **Successful** | Pointer to **int32** | Number of notifications that were successfully delivered. | [optional] **Failed** | Pointer to **int32** | Number of notifications that could not be delivered due to those devices being unsubscribed. | [optional] @@ -192,76 +192,41 @@ SetExcludedSegments sets ExcludedSegments field to given value. HasExcludedSegments returns a boolean if a field has been set. -### GetIncludePlayerIds +### GetIncludeSubscriptionIds -`func (o *NotificationWithMeta) GetIncludePlayerIds() []string` +`func (o *NotificationWithMeta) GetIncludeSubscriptionIds() []string` -GetIncludePlayerIds returns the IncludePlayerIds field if non-nil, zero value otherwise. +GetIncludeSubscriptionIds returns the IncludeSubscriptionIds field if non-nil, zero value otherwise. -### GetIncludePlayerIdsOk +### GetIncludeSubscriptionIdsOk -`func (o *NotificationWithMeta) GetIncludePlayerIdsOk() (*[]string, bool)` +`func (o *NotificationWithMeta) GetIncludeSubscriptionIdsOk() (*[]string, bool)` -GetIncludePlayerIdsOk returns a tuple with the IncludePlayerIds field if it's non-nil, zero value otherwise +GetIncludeSubscriptionIdsOk returns a tuple with the IncludeSubscriptionIds field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetIncludePlayerIds +### SetIncludeSubscriptionIds -`func (o *NotificationWithMeta) SetIncludePlayerIds(v []string)` +`func (o *NotificationWithMeta) SetIncludeSubscriptionIds(v []string)` -SetIncludePlayerIds sets IncludePlayerIds field to given value. +SetIncludeSubscriptionIds sets IncludeSubscriptionIds field to given value. -### HasIncludePlayerIds +### HasIncludeSubscriptionIds -`func (o *NotificationWithMeta) HasIncludePlayerIds() bool` +`func (o *NotificationWithMeta) HasIncludeSubscriptionIds() bool` -HasIncludePlayerIds returns a boolean if a field has been set. +HasIncludeSubscriptionIds returns a boolean if a field has been set. -### SetIncludePlayerIdsNil +### SetIncludeSubscriptionIdsNil -`func (o *NotificationWithMeta) SetIncludePlayerIdsNil(b bool)` +`func (o *NotificationWithMeta) SetIncludeSubscriptionIdsNil(b bool)` - SetIncludePlayerIdsNil sets the value for IncludePlayerIds to be an explicit nil + SetIncludeSubscriptionIdsNil sets the value for IncludeSubscriptionIds to be an explicit nil -### UnsetIncludePlayerIds -`func (o *NotificationWithMeta) UnsetIncludePlayerIds()` +### UnsetIncludeSubscriptionIds +`func (o *NotificationWithMeta) UnsetIncludeSubscriptionIds()` -UnsetIncludePlayerIds ensures that no value is present for IncludePlayerIds, not even an explicit nil -### GetIncludeExternalUserIds - -`func (o *NotificationWithMeta) GetIncludeExternalUserIds() []string` - -GetIncludeExternalUserIds returns the IncludeExternalUserIds field if non-nil, zero value otherwise. - -### GetIncludeExternalUserIdsOk - -`func (o *NotificationWithMeta) GetIncludeExternalUserIdsOk() (*[]string, bool)` - -GetIncludeExternalUserIdsOk returns a tuple with the IncludeExternalUserIds field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIncludeExternalUserIds - -`func (o *NotificationWithMeta) SetIncludeExternalUserIds(v []string)` - -SetIncludeExternalUserIds sets IncludeExternalUserIds field to given value. - -### HasIncludeExternalUserIds - -`func (o *NotificationWithMeta) HasIncludeExternalUserIds() bool` - -HasIncludeExternalUserIds returns a boolean if a field has been set. - -### SetIncludeExternalUserIdsNil - -`func (o *NotificationWithMeta) SetIncludeExternalUserIdsNil(b bool)` - - SetIncludeExternalUserIdsNil sets the value for IncludeExternalUserIds to be an explicit nil - -### UnsetIncludeExternalUserIds -`func (o *NotificationWithMeta) UnsetIncludeExternalUserIds()` - -UnsetIncludeExternalUserIds ensures that no value is present for IncludeExternalUserIds, not even an explicit nil +UnsetIncludeSubscriptionIds ensures that no value is present for IncludeSubscriptionIds, not even an explicit nil ### GetIncludeEmailTokens `func (o *NotificationWithMeta) GetIncludeEmailTokens() []string` @@ -464,20 +429,20 @@ HasIncludeAndroidRegIds returns a boolean if a field has been set. ### GetIncludeAliases -`func (o *NotificationWithMeta) GetIncludeAliases() PlayerNotificationTargetIncludeAliases` +`func (o *NotificationWithMeta) GetIncludeAliases() map[string][]string` GetIncludeAliases returns the IncludeAliases field if non-nil, zero value otherwise. ### GetIncludeAliasesOk -`func (o *NotificationWithMeta) GetIncludeAliasesOk() (*PlayerNotificationTargetIncludeAliases, bool)` +`func (o *NotificationWithMeta) GetIncludeAliasesOk() (*map[string][]string, bool)` GetIncludeAliasesOk returns a tuple with the IncludeAliases field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetIncludeAliases -`func (o *NotificationWithMeta) SetIncludeAliases(v PlayerNotificationTargetIncludeAliases)` +`func (o *NotificationWithMeta) SetIncludeAliases(v map[string][]string)` SetIncludeAliases sets IncludeAliases field to given value. @@ -982,31 +947,6 @@ HasIsChrome returns a boolean if a field has been set. `func (o *NotificationWithMeta) UnsetIsChrome()` UnsetIsChrome ensures that no value is present for IsChrome, not even an explicit nil -### GetChannelForExternalUserIds - -`func (o *NotificationWithMeta) GetChannelForExternalUserIds() string` - -GetChannelForExternalUserIds returns the ChannelForExternalUserIds field if non-nil, zero value otherwise. - -### GetChannelForExternalUserIdsOk - -`func (o *NotificationWithMeta) GetChannelForExternalUserIdsOk() (*string, bool)` - -GetChannelForExternalUserIdsOk returns a tuple with the ChannelForExternalUserIds field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetChannelForExternalUserIds - -`func (o *NotificationWithMeta) SetChannelForExternalUserIds(v string)` - -SetChannelForExternalUserIds sets ChannelForExternalUserIds field to given value. - -### HasChannelForExternalUserIds - -`func (o *NotificationWithMeta) HasChannelForExternalUserIds() bool` - -HasChannelForExternalUserIds returns a boolean if a field has been set. - ### GetAppId `func (o *NotificationWithMeta) GetAppId() string` @@ -1099,20 +1039,20 @@ HasIdempotencyKey returns a boolean if a field has been set. UnsetIdempotencyKey ensures that no value is present for IdempotencyKey, not even an explicit nil ### GetContents -`func (o *NotificationWithMeta) GetContents() StringMap` +`func (o *NotificationWithMeta) GetContents() LanguageStringMap` GetContents returns the Contents field if non-nil, zero value otherwise. ### GetContentsOk -`func (o *NotificationWithMeta) GetContentsOk() (*StringMap, bool)` +`func (o *NotificationWithMeta) GetContentsOk() (*LanguageStringMap, bool)` GetContentsOk returns a tuple with the Contents field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetContents -`func (o *NotificationWithMeta) SetContents(v StringMap)` +`func (o *NotificationWithMeta) SetContents(v LanguageStringMap)` SetContents sets Contents field to given value. @@ -1134,20 +1074,20 @@ HasContents returns a boolean if a field has been set. UnsetContents ensures that no value is present for Contents, not even an explicit nil ### GetHeadings -`func (o *NotificationWithMeta) GetHeadings() StringMap` +`func (o *NotificationWithMeta) GetHeadings() LanguageStringMap` GetHeadings returns the Headings field if non-nil, zero value otherwise. ### GetHeadingsOk -`func (o *NotificationWithMeta) GetHeadingsOk() (*StringMap, bool)` +`func (o *NotificationWithMeta) GetHeadingsOk() (*LanguageStringMap, bool)` GetHeadingsOk returns a tuple with the Headings field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHeadings -`func (o *NotificationWithMeta) SetHeadings(v StringMap)` +`func (o *NotificationWithMeta) SetHeadings(v LanguageStringMap)` SetHeadings sets Headings field to given value. @@ -1169,20 +1109,20 @@ HasHeadings returns a boolean if a field has been set. UnsetHeadings ensures that no value is present for Headings, not even an explicit nil ### GetSubtitle -`func (o *NotificationWithMeta) GetSubtitle() StringMap` +`func (o *NotificationWithMeta) GetSubtitle() LanguageStringMap` GetSubtitle returns the Subtitle field if non-nil, zero value otherwise. ### GetSubtitleOk -`func (o *NotificationWithMeta) GetSubtitleOk() (*StringMap, bool)` +`func (o *NotificationWithMeta) GetSubtitleOk() (*LanguageStringMap, bool)` GetSubtitleOk returns a tuple with the Subtitle field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetSubtitle -`func (o *NotificationWithMeta) SetSubtitle(v StringMap)` +`func (o *NotificationWithMeta) SetSubtitle(v LanguageStringMap)` SetSubtitle sets Subtitle field to given value. @@ -1754,20 +1694,20 @@ HasButtons returns a boolean if a field has been set. UnsetButtons ensures that no value is present for Buttons, not even an explicit nil ### GetWebButtons -`func (o *NotificationWithMeta) GetWebButtons() []Button` +`func (o *NotificationWithMeta) GetWebButtons() []WebButton` GetWebButtons returns the WebButtons field if non-nil, zero value otherwise. ### GetWebButtonsOk -`func (o *NotificationWithMeta) GetWebButtonsOk() (*[]Button, bool)` +`func (o *NotificationWithMeta) GetWebButtonsOk() (*[]WebButton, bool)` GetWebButtonsOk returns a tuple with the WebButtons field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetWebButtons -`func (o *NotificationWithMeta) SetWebButtons(v []Button)` +`func (o *NotificationWithMeta) SetWebButtons(v []WebButton)` SetWebButtons sets WebButtons field to given value. @@ -3292,6 +3232,76 @@ SetSummaryArgCount sets SummaryArgCount field to given value. HasSummaryArgCount returns a boolean if a field has been set. +### GetIosRelevanceScore + +`func (o *NotificationWithMeta) GetIosRelevanceScore() float32` + +GetIosRelevanceScore returns the IosRelevanceScore field if non-nil, zero value otherwise. + +### GetIosRelevanceScoreOk + +`func (o *NotificationWithMeta) GetIosRelevanceScoreOk() (*float32, bool)` + +GetIosRelevanceScoreOk returns a tuple with the IosRelevanceScore field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIosRelevanceScore + +`func (o *NotificationWithMeta) SetIosRelevanceScore(v float32)` + +SetIosRelevanceScore sets IosRelevanceScore field to given value. + +### HasIosRelevanceScore + +`func (o *NotificationWithMeta) HasIosRelevanceScore() bool` + +HasIosRelevanceScore returns a boolean if a field has been set. + +### SetIosRelevanceScoreNil + +`func (o *NotificationWithMeta) SetIosRelevanceScoreNil(b bool)` + + SetIosRelevanceScoreNil sets the value for IosRelevanceScore to be an explicit nil + +### UnsetIosRelevanceScore +`func (o *NotificationWithMeta) UnsetIosRelevanceScore()` + +UnsetIosRelevanceScore ensures that no value is present for IosRelevanceScore, not even an explicit nil +### GetIosInterruptionLevel + +`func (o *NotificationWithMeta) GetIosInterruptionLevel() string` + +GetIosInterruptionLevel returns the IosInterruptionLevel field if non-nil, zero value otherwise. + +### GetIosInterruptionLevelOk + +`func (o *NotificationWithMeta) GetIosInterruptionLevelOk() (*string, bool)` + +GetIosInterruptionLevelOk returns a tuple with the IosInterruptionLevel field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIosInterruptionLevel + +`func (o *NotificationWithMeta) SetIosInterruptionLevel(v string)` + +SetIosInterruptionLevel sets IosInterruptionLevel field to given value. + +### HasIosInterruptionLevel + +`func (o *NotificationWithMeta) HasIosInterruptionLevel() bool` + +HasIosInterruptionLevel returns a boolean if a field has been set. + +### SetIosInterruptionLevelNil + +`func (o *NotificationWithMeta) SetIosInterruptionLevelNil(b bool)` + + SetIosInterruptionLevelNil sets the value for IosInterruptionLevel to be an explicit nil + +### UnsetIosInterruptionLevel +`func (o *NotificationWithMeta) UnsetIosInterruptionLevel()` + +UnsetIosInterruptionLevel ensures that no value is present for IosInterruptionLevel, not even an explicit nil ### GetEmailSubject `func (o *NotificationWithMeta) GetEmailSubject() string` @@ -3554,20 +3564,20 @@ HasSmsMediaUrls returns a boolean if a field has been set. UnsetSmsMediaUrls ensures that no value is present for SmsMediaUrls, not even an explicit nil ### GetFilters -`func (o *NotificationWithMeta) GetFilters() []Filter` +`func (o *NotificationWithMeta) GetFilters() []FilterExpression` GetFilters returns the Filters field if non-nil, zero value otherwise. ### GetFiltersOk -`func (o *NotificationWithMeta) GetFiltersOk() (*[]Filter, bool)` +`func (o *NotificationWithMeta) GetFiltersOk() (*[]FilterExpression, bool)` GetFiltersOk returns a tuple with the Filters field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetFilters -`func (o *NotificationWithMeta) SetFilters(v []Filter)` +`func (o *NotificationWithMeta) SetFilters(v []FilterExpression)` SetFilters sets Filters field to given value. diff --git a/docs/Player.md b/docs/Player.md deleted file mode 100644 index d547483..0000000 --- a/docs/Player.md +++ /dev/null @@ -1,827 +0,0 @@ -# Player - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | Pointer to **string** | The device's OneSignal ID | [optional] [readonly] -**InvalidIdentifier** | Pointer to **bool** | If true, this is the equivalent of a user being Unsubscribed | [optional] [readonly] -**AppId** | Pointer to **string** | | [optional] -**DeviceType** | **int32** | 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 | -**ExternalUserId** | Pointer to **NullableString** | a custom user ID | [optional] -**ExternalUserIdAuthHash** | Pointer to **string** | Only required if you have enabled Identity Verification and device_type is NOT 11 email. | [optional] -**EmailAuthHash** | Pointer to **string** | Email - Only required if you have enabled Identity Verification and device_type is email (11). | [optional] -**Identifier** | Pointer to **NullableString** | 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. | [optional] -**Language** | Pointer to **string** | Language code. Typically lower case two letters, except for Chinese where it must be one of zh-Hans or zh-Hant. Example: en | [optional] -**Timezone** | Pointer to **NullableInt32** | Number of seconds away from UTC. Example: -28800 | [optional] -**GameVersion** | Pointer to **NullableString** | Version of your app. Example: 1.1 | [optional] -**DeviceModel** | Pointer to **NullableString** | Device make and model. Example: iPhone5,1 | [optional] -**DeviceOs** | Pointer to **NullableString** | Device operating system version. Example: 7.0.4 | [optional] -**AdId** | Pointer to **NullableString** | The ad id for the device's platform: Android = Advertising Id iOS = identifierForVendor WP8.0 = DeviceUniqueId WP8.1 = AdvertisingId | [optional] -**Sdk** | Pointer to **NullableString** | Name and version of the sdk/plugin that's calling this API method (if any) | [optional] -**SessionCount** | Pointer to **int32** | Number of times the user has played the game, defaults to 1 | [optional] -**Tags** | Pointer to **map[string]interface{}** | 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 | [optional] -**AmountSpent** | Pointer to **float32** | Amount the user has spent in USD, up to two decimal places | [optional] -**CreatedAt** | Pointer to **int64** | Unixtime when the player joined the game | [optional] -**Playtime** | Pointer to **int64** | Seconds player was running your app. | [optional] -**BadgeCount** | Pointer to **int32** | 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. | [optional] -**LastActive** | Pointer to **int32** | Unixtime when the player was last active | [optional] -**NotificationTypes** | Pointer to **int32** | 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. | [optional] -**TestType** | Pointer to **NullableInt32** | 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. | [optional] -**Long** | Pointer to **float32** | Longitude of the device, used for geotagging to segment on. | [optional] -**Lat** | Pointer to **float32** | Latitude of the device, used for geotagging to segment on. | [optional] -**Country** | Pointer to **string** | Country code in the ISO 3166-1 Alpha 2 format | [optional] - -## Methods - -### NewPlayer - -`func NewPlayer(deviceType int32, ) *Player` - -NewPlayer instantiates a new Player object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewPlayerWithDefaults - -`func NewPlayerWithDefaults() *Player` - -NewPlayerWithDefaults instantiates a new Player object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetId - -`func (o *Player) GetId() string` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *Player) GetIdOk() (*string, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *Player) SetId(v string)` - -SetId sets Id field to given value. - -### HasId - -`func (o *Player) HasId() bool` - -HasId returns a boolean if a field has been set. - -### GetInvalidIdentifier - -`func (o *Player) GetInvalidIdentifier() bool` - -GetInvalidIdentifier returns the InvalidIdentifier field if non-nil, zero value otherwise. - -### GetInvalidIdentifierOk - -`func (o *Player) GetInvalidIdentifierOk() (*bool, bool)` - -GetInvalidIdentifierOk returns a tuple with the InvalidIdentifier field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetInvalidIdentifier - -`func (o *Player) SetInvalidIdentifier(v bool)` - -SetInvalidIdentifier sets InvalidIdentifier field to given value. - -### HasInvalidIdentifier - -`func (o *Player) HasInvalidIdentifier() bool` - -HasInvalidIdentifier returns a boolean if a field has been set. - -### GetAppId - -`func (o *Player) GetAppId() string` - -GetAppId returns the AppId field if non-nil, zero value otherwise. - -### GetAppIdOk - -`func (o *Player) GetAppIdOk() (*string, bool)` - -GetAppIdOk returns a tuple with the AppId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAppId - -`func (o *Player) SetAppId(v string)` - -SetAppId sets AppId field to given value. - -### HasAppId - -`func (o *Player) HasAppId() bool` - -HasAppId returns a boolean if a field has been set. - -### GetDeviceType - -`func (o *Player) GetDeviceType() int32` - -GetDeviceType returns the DeviceType field if non-nil, zero value otherwise. - -### GetDeviceTypeOk - -`func (o *Player) GetDeviceTypeOk() (*int32, bool)` - -GetDeviceTypeOk returns a tuple with the DeviceType field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDeviceType - -`func (o *Player) SetDeviceType(v int32)` - -SetDeviceType sets DeviceType field to given value. - - -### GetExternalUserId - -`func (o *Player) GetExternalUserId() string` - -GetExternalUserId returns the ExternalUserId field if non-nil, zero value otherwise. - -### GetExternalUserIdOk - -`func (o *Player) GetExternalUserIdOk() (*string, bool)` - -GetExternalUserIdOk returns a tuple with the ExternalUserId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetExternalUserId - -`func (o *Player) SetExternalUserId(v string)` - -SetExternalUserId sets ExternalUserId field to given value. - -### HasExternalUserId - -`func (o *Player) HasExternalUserId() bool` - -HasExternalUserId returns a boolean if a field has been set. - -### SetExternalUserIdNil - -`func (o *Player) SetExternalUserIdNil(b bool)` - - SetExternalUserIdNil sets the value for ExternalUserId to be an explicit nil - -### UnsetExternalUserId -`func (o *Player) UnsetExternalUserId()` - -UnsetExternalUserId ensures that no value is present for ExternalUserId, not even an explicit nil -### GetExternalUserIdAuthHash - -`func (o *Player) GetExternalUserIdAuthHash() string` - -GetExternalUserIdAuthHash returns the ExternalUserIdAuthHash field if non-nil, zero value otherwise. - -### GetExternalUserIdAuthHashOk - -`func (o *Player) GetExternalUserIdAuthHashOk() (*string, bool)` - -GetExternalUserIdAuthHashOk returns a tuple with the ExternalUserIdAuthHash field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetExternalUserIdAuthHash - -`func (o *Player) SetExternalUserIdAuthHash(v string)` - -SetExternalUserIdAuthHash sets ExternalUserIdAuthHash field to given value. - -### HasExternalUserIdAuthHash - -`func (o *Player) HasExternalUserIdAuthHash() bool` - -HasExternalUserIdAuthHash returns a boolean if a field has been set. - -### GetEmailAuthHash - -`func (o *Player) GetEmailAuthHash() string` - -GetEmailAuthHash returns the EmailAuthHash field if non-nil, zero value otherwise. - -### GetEmailAuthHashOk - -`func (o *Player) GetEmailAuthHashOk() (*string, bool)` - -GetEmailAuthHashOk returns a tuple with the EmailAuthHash field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetEmailAuthHash - -`func (o *Player) SetEmailAuthHash(v string)` - -SetEmailAuthHash sets EmailAuthHash field to given value. - -### HasEmailAuthHash - -`func (o *Player) HasEmailAuthHash() bool` - -HasEmailAuthHash returns a boolean if a field has been set. - -### GetIdentifier - -`func (o *Player) GetIdentifier() string` - -GetIdentifier returns the Identifier field if non-nil, zero value otherwise. - -### GetIdentifierOk - -`func (o *Player) GetIdentifierOk() (*string, bool)` - -GetIdentifierOk returns a tuple with the Identifier field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIdentifier - -`func (o *Player) SetIdentifier(v string)` - -SetIdentifier sets Identifier field to given value. - -### HasIdentifier - -`func (o *Player) HasIdentifier() bool` - -HasIdentifier returns a boolean if a field has been set. - -### SetIdentifierNil - -`func (o *Player) SetIdentifierNil(b bool)` - - SetIdentifierNil sets the value for Identifier to be an explicit nil - -### UnsetIdentifier -`func (o *Player) UnsetIdentifier()` - -UnsetIdentifier ensures that no value is present for Identifier, not even an explicit nil -### GetLanguage - -`func (o *Player) GetLanguage() string` - -GetLanguage returns the Language field if non-nil, zero value otherwise. - -### GetLanguageOk - -`func (o *Player) GetLanguageOk() (*string, bool)` - -GetLanguageOk returns a tuple with the Language field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetLanguage - -`func (o *Player) SetLanguage(v string)` - -SetLanguage sets Language field to given value. - -### HasLanguage - -`func (o *Player) HasLanguage() bool` - -HasLanguage returns a boolean if a field has been set. - -### GetTimezone - -`func (o *Player) GetTimezone() int32` - -GetTimezone returns the Timezone field if non-nil, zero value otherwise. - -### GetTimezoneOk - -`func (o *Player) GetTimezoneOk() (*int32, bool)` - -GetTimezoneOk returns a tuple with the Timezone field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTimezone - -`func (o *Player) SetTimezone(v int32)` - -SetTimezone sets Timezone field to given value. - -### HasTimezone - -`func (o *Player) HasTimezone() bool` - -HasTimezone returns a boolean if a field has been set. - -### SetTimezoneNil - -`func (o *Player) SetTimezoneNil(b bool)` - - SetTimezoneNil sets the value for Timezone to be an explicit nil - -### UnsetTimezone -`func (o *Player) UnsetTimezone()` - -UnsetTimezone ensures that no value is present for Timezone, not even an explicit nil -### GetGameVersion - -`func (o *Player) GetGameVersion() string` - -GetGameVersion returns the GameVersion field if non-nil, zero value otherwise. - -### GetGameVersionOk - -`func (o *Player) GetGameVersionOk() (*string, bool)` - -GetGameVersionOk returns a tuple with the GameVersion field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetGameVersion - -`func (o *Player) SetGameVersion(v string)` - -SetGameVersion sets GameVersion field to given value. - -### HasGameVersion - -`func (o *Player) HasGameVersion() bool` - -HasGameVersion returns a boolean if a field has been set. - -### SetGameVersionNil - -`func (o *Player) SetGameVersionNil(b bool)` - - SetGameVersionNil sets the value for GameVersion to be an explicit nil - -### UnsetGameVersion -`func (o *Player) UnsetGameVersion()` - -UnsetGameVersion ensures that no value is present for GameVersion, not even an explicit nil -### GetDeviceModel - -`func (o *Player) GetDeviceModel() string` - -GetDeviceModel returns the DeviceModel field if non-nil, zero value otherwise. - -### GetDeviceModelOk - -`func (o *Player) GetDeviceModelOk() (*string, bool)` - -GetDeviceModelOk returns a tuple with the DeviceModel field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDeviceModel - -`func (o *Player) SetDeviceModel(v string)` - -SetDeviceModel sets DeviceModel field to given value. - -### HasDeviceModel - -`func (o *Player) HasDeviceModel() bool` - -HasDeviceModel returns a boolean if a field has been set. - -### SetDeviceModelNil - -`func (o *Player) SetDeviceModelNil(b bool)` - - SetDeviceModelNil sets the value for DeviceModel to be an explicit nil - -### UnsetDeviceModel -`func (o *Player) UnsetDeviceModel()` - -UnsetDeviceModel ensures that no value is present for DeviceModel, not even an explicit nil -### GetDeviceOs - -`func (o *Player) GetDeviceOs() string` - -GetDeviceOs returns the DeviceOs field if non-nil, zero value otherwise. - -### GetDeviceOsOk - -`func (o *Player) GetDeviceOsOk() (*string, bool)` - -GetDeviceOsOk returns a tuple with the DeviceOs field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDeviceOs - -`func (o *Player) SetDeviceOs(v string)` - -SetDeviceOs sets DeviceOs field to given value. - -### HasDeviceOs - -`func (o *Player) HasDeviceOs() bool` - -HasDeviceOs returns a boolean if a field has been set. - -### SetDeviceOsNil - -`func (o *Player) SetDeviceOsNil(b bool)` - - SetDeviceOsNil sets the value for DeviceOs to be an explicit nil - -### UnsetDeviceOs -`func (o *Player) UnsetDeviceOs()` - -UnsetDeviceOs ensures that no value is present for DeviceOs, not even an explicit nil -### GetAdId - -`func (o *Player) GetAdId() string` - -GetAdId returns the AdId field if non-nil, zero value otherwise. - -### GetAdIdOk - -`func (o *Player) GetAdIdOk() (*string, bool)` - -GetAdIdOk returns a tuple with the AdId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAdId - -`func (o *Player) SetAdId(v string)` - -SetAdId sets AdId field to given value. - -### HasAdId - -`func (o *Player) HasAdId() bool` - -HasAdId returns a boolean if a field has been set. - -### SetAdIdNil - -`func (o *Player) SetAdIdNil(b bool)` - - SetAdIdNil sets the value for AdId to be an explicit nil - -### UnsetAdId -`func (o *Player) UnsetAdId()` - -UnsetAdId ensures that no value is present for AdId, not even an explicit nil -### GetSdk - -`func (o *Player) GetSdk() string` - -GetSdk returns the Sdk field if non-nil, zero value otherwise. - -### GetSdkOk - -`func (o *Player) GetSdkOk() (*string, bool)` - -GetSdkOk returns a tuple with the Sdk field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSdk - -`func (o *Player) SetSdk(v string)` - -SetSdk sets Sdk field to given value. - -### HasSdk - -`func (o *Player) HasSdk() bool` - -HasSdk returns a boolean if a field has been set. - -### SetSdkNil - -`func (o *Player) SetSdkNil(b bool)` - - SetSdkNil sets the value for Sdk to be an explicit nil - -### UnsetSdk -`func (o *Player) UnsetSdk()` - -UnsetSdk ensures that no value is present for Sdk, not even an explicit nil -### GetSessionCount - -`func (o *Player) GetSessionCount() int32` - -GetSessionCount returns the SessionCount field if non-nil, zero value otherwise. - -### GetSessionCountOk - -`func (o *Player) GetSessionCountOk() (*int32, bool)` - -GetSessionCountOk returns a tuple with the SessionCount field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSessionCount - -`func (o *Player) SetSessionCount(v int32)` - -SetSessionCount sets SessionCount field to given value. - -### HasSessionCount - -`func (o *Player) HasSessionCount() bool` - -HasSessionCount returns a boolean if a field has been set. - -### GetTags - -`func (o *Player) GetTags() map[string]interface{}` - -GetTags returns the Tags field if non-nil, zero value otherwise. - -### GetTagsOk - -`func (o *Player) GetTagsOk() (*map[string]interface{}, bool)` - -GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTags - -`func (o *Player) SetTags(v map[string]interface{})` - -SetTags sets Tags field to given value. - -### HasTags - -`func (o *Player) HasTags() bool` - -HasTags returns a boolean if a field has been set. - -### SetTagsNil - -`func (o *Player) SetTagsNil(b bool)` - - SetTagsNil sets the value for Tags to be an explicit nil - -### UnsetTags -`func (o *Player) UnsetTags()` - -UnsetTags ensures that no value is present for Tags, not even an explicit nil -### GetAmountSpent - -`func (o *Player) GetAmountSpent() float32` - -GetAmountSpent returns the AmountSpent field if non-nil, zero value otherwise. - -### GetAmountSpentOk - -`func (o *Player) GetAmountSpentOk() (*float32, bool)` - -GetAmountSpentOk returns a tuple with the AmountSpent field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAmountSpent - -`func (o *Player) SetAmountSpent(v float32)` - -SetAmountSpent sets AmountSpent field to given value. - -### HasAmountSpent - -`func (o *Player) HasAmountSpent() bool` - -HasAmountSpent returns a boolean if a field has been set. - -### GetCreatedAt - -`func (o *Player) GetCreatedAt() int64` - -GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. - -### GetCreatedAtOk - -`func (o *Player) GetCreatedAtOk() (*int64, bool)` - -GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCreatedAt - -`func (o *Player) SetCreatedAt(v int64)` - -SetCreatedAt sets CreatedAt field to given value. - -### HasCreatedAt - -`func (o *Player) HasCreatedAt() bool` - -HasCreatedAt returns a boolean if a field has been set. - -### GetPlaytime - -`func (o *Player) GetPlaytime() int64` - -GetPlaytime returns the Playtime field if non-nil, zero value otherwise. - -### GetPlaytimeOk - -`func (o *Player) GetPlaytimeOk() (*int64, bool)` - -GetPlaytimeOk returns a tuple with the Playtime field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPlaytime - -`func (o *Player) SetPlaytime(v int64)` - -SetPlaytime sets Playtime field to given value. - -### HasPlaytime - -`func (o *Player) HasPlaytime() bool` - -HasPlaytime returns a boolean if a field has been set. - -### GetBadgeCount - -`func (o *Player) GetBadgeCount() int32` - -GetBadgeCount returns the BadgeCount field if non-nil, zero value otherwise. - -### GetBadgeCountOk - -`func (o *Player) GetBadgeCountOk() (*int32, bool)` - -GetBadgeCountOk returns a tuple with the BadgeCount field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetBadgeCount - -`func (o *Player) SetBadgeCount(v int32)` - -SetBadgeCount sets BadgeCount field to given value. - -### HasBadgeCount - -`func (o *Player) HasBadgeCount() bool` - -HasBadgeCount returns a boolean if a field has been set. - -### GetLastActive - -`func (o *Player) GetLastActive() int32` - -GetLastActive returns the LastActive field if non-nil, zero value otherwise. - -### GetLastActiveOk - -`func (o *Player) GetLastActiveOk() (*int32, bool)` - -GetLastActiveOk returns a tuple with the LastActive field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetLastActive - -`func (o *Player) SetLastActive(v int32)` - -SetLastActive sets LastActive field to given value. - -### HasLastActive - -`func (o *Player) HasLastActive() bool` - -HasLastActive returns a boolean if a field has been set. - -### GetNotificationTypes - -`func (o *Player) GetNotificationTypes() int32` - -GetNotificationTypes returns the NotificationTypes field if non-nil, zero value otherwise. - -### GetNotificationTypesOk - -`func (o *Player) GetNotificationTypesOk() (*int32, bool)` - -GetNotificationTypesOk returns a tuple with the NotificationTypes field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetNotificationTypes - -`func (o *Player) SetNotificationTypes(v int32)` - -SetNotificationTypes sets NotificationTypes field to given value. - -### HasNotificationTypes - -`func (o *Player) HasNotificationTypes() bool` - -HasNotificationTypes returns a boolean if a field has been set. - -### GetTestType - -`func (o *Player) GetTestType() int32` - -GetTestType returns the TestType field if non-nil, zero value otherwise. - -### GetTestTypeOk - -`func (o *Player) GetTestTypeOk() (*int32, bool)` - -GetTestTypeOk returns a tuple with the TestType field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTestType - -`func (o *Player) SetTestType(v int32)` - -SetTestType sets TestType field to given value. - -### HasTestType - -`func (o *Player) HasTestType() bool` - -HasTestType returns a boolean if a field has been set. - -### SetTestTypeNil - -`func (o *Player) SetTestTypeNil(b bool)` - - SetTestTypeNil sets the value for TestType to be an explicit nil - -### UnsetTestType -`func (o *Player) UnsetTestType()` - -UnsetTestType ensures that no value is present for TestType, not even an explicit nil -### GetLong - -`func (o *Player) GetLong() float32` - -GetLong returns the Long field if non-nil, zero value otherwise. - -### GetLongOk - -`func (o *Player) GetLongOk() (*float32, bool)` - -GetLongOk returns a tuple with the Long field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetLong - -`func (o *Player) SetLong(v float32)` - -SetLong sets Long field to given value. - -### HasLong - -`func (o *Player) HasLong() bool` - -HasLong returns a boolean if a field has been set. - -### GetLat - -`func (o *Player) GetLat() float32` - -GetLat returns the Lat field if non-nil, zero value otherwise. - -### GetLatOk - -`func (o *Player) GetLatOk() (*float32, bool)` - -GetLatOk returns a tuple with the Lat field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetLat - -`func (o *Player) SetLat(v float32)` - -SetLat sets Lat field to given value. - -### HasLat - -`func (o *Player) HasLat() bool` - -HasLat returns a boolean if a field has been set. - -### GetCountry - -`func (o *Player) GetCountry() string` - -GetCountry returns the Country field if non-nil, zero value otherwise. - -### GetCountryOk - -`func (o *Player) GetCountryOk() (*string, bool)` - -GetCountryOk returns a tuple with the Country field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCountry - -`func (o *Player) SetCountry(v string)` - -SetCountry sets Country field to given value. - -### HasCountry - -`func (o *Player) HasCountry() bool` - -HasCountry returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PlayerNotificationTarget.md b/docs/PlayerNotificationTarget.md deleted file mode 100644 index a0ac6a1..0000000 --- a/docs/PlayerNotificationTarget.md +++ /dev/null @@ -1,372 +0,0 @@ -# PlayerNotificationTarget - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**IncludePlayerIds** | Pointer to **[]string** | 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 | [optional] -**IncludeExternalUserIds** | Pointer to **[]string** | 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. | [optional] -**IncludeEmailTokens** | Pointer to **[]string** | 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 | [optional] -**IncludePhoneNumbers** | Pointer to **[]string** | Recommended for Sending SMS - Target specific phone numbers. The phone number should be in the E.164 format. Phone number should be an existing subscriber on OneSignal. Refer our docs to learn how to add phone numbers to OneSignal. Example phone number: +1999999999 Limit of 2,000 entries per REST API call | [optional] -**IncludeIosTokens** | Pointer to **[]string** | 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 | [optional] -**IncludeWpWnsUris** | Pointer to **[]string** | 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 | [optional] -**IncludeAmazonRegIds** | Pointer to **[]string** | 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 | [optional] -**IncludeChromeRegIds** | Pointer to **[]string** | 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 | [optional] -**IncludeChromeWebRegIds** | Pointer to **[]string** | 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 | [optional] -**IncludeAndroidRegIds** | Pointer to **[]string** | 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 | [optional] -**IncludeAliases** | Pointer to [**NullablePlayerNotificationTargetIncludeAliases**](PlayerNotificationTargetIncludeAliases.md) | | [optional] -**TargetChannel** | Pointer to **string** | | [optional] - -## Methods - -### NewPlayerNotificationTarget - -`func NewPlayerNotificationTarget() *PlayerNotificationTarget` - -NewPlayerNotificationTarget instantiates a new PlayerNotificationTarget object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewPlayerNotificationTargetWithDefaults - -`func NewPlayerNotificationTargetWithDefaults() *PlayerNotificationTarget` - -NewPlayerNotificationTargetWithDefaults instantiates a new PlayerNotificationTarget object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetIncludePlayerIds - -`func (o *PlayerNotificationTarget) GetIncludePlayerIds() []string` - -GetIncludePlayerIds returns the IncludePlayerIds field if non-nil, zero value otherwise. - -### GetIncludePlayerIdsOk - -`func (o *PlayerNotificationTarget) GetIncludePlayerIdsOk() (*[]string, bool)` - -GetIncludePlayerIdsOk returns a tuple with the IncludePlayerIds field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIncludePlayerIds - -`func (o *PlayerNotificationTarget) SetIncludePlayerIds(v []string)` - -SetIncludePlayerIds sets IncludePlayerIds field to given value. - -### HasIncludePlayerIds - -`func (o *PlayerNotificationTarget) HasIncludePlayerIds() bool` - -HasIncludePlayerIds returns a boolean if a field has been set. - -### SetIncludePlayerIdsNil - -`func (o *PlayerNotificationTarget) SetIncludePlayerIdsNil(b bool)` - - SetIncludePlayerIdsNil sets the value for IncludePlayerIds to be an explicit nil - -### UnsetIncludePlayerIds -`func (o *PlayerNotificationTarget) UnsetIncludePlayerIds()` - -UnsetIncludePlayerIds ensures that no value is present for IncludePlayerIds, not even an explicit nil -### GetIncludeExternalUserIds - -`func (o *PlayerNotificationTarget) GetIncludeExternalUserIds() []string` - -GetIncludeExternalUserIds returns the IncludeExternalUserIds field if non-nil, zero value otherwise. - -### GetIncludeExternalUserIdsOk - -`func (o *PlayerNotificationTarget) GetIncludeExternalUserIdsOk() (*[]string, bool)` - -GetIncludeExternalUserIdsOk returns a tuple with the IncludeExternalUserIds field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIncludeExternalUserIds - -`func (o *PlayerNotificationTarget) SetIncludeExternalUserIds(v []string)` - -SetIncludeExternalUserIds sets IncludeExternalUserIds field to given value. - -### HasIncludeExternalUserIds - -`func (o *PlayerNotificationTarget) HasIncludeExternalUserIds() bool` - -HasIncludeExternalUserIds returns a boolean if a field has been set. - -### SetIncludeExternalUserIdsNil - -`func (o *PlayerNotificationTarget) SetIncludeExternalUserIdsNil(b bool)` - - SetIncludeExternalUserIdsNil sets the value for IncludeExternalUserIds to be an explicit nil - -### UnsetIncludeExternalUserIds -`func (o *PlayerNotificationTarget) UnsetIncludeExternalUserIds()` - -UnsetIncludeExternalUserIds ensures that no value is present for IncludeExternalUserIds, not even an explicit nil -### GetIncludeEmailTokens - -`func (o *PlayerNotificationTarget) GetIncludeEmailTokens() []string` - -GetIncludeEmailTokens returns the IncludeEmailTokens field if non-nil, zero value otherwise. - -### GetIncludeEmailTokensOk - -`func (o *PlayerNotificationTarget) GetIncludeEmailTokensOk() (*[]string, bool)` - -GetIncludeEmailTokensOk returns a tuple with the IncludeEmailTokens field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIncludeEmailTokens - -`func (o *PlayerNotificationTarget) SetIncludeEmailTokens(v []string)` - -SetIncludeEmailTokens sets IncludeEmailTokens field to given value. - -### HasIncludeEmailTokens - -`func (o *PlayerNotificationTarget) HasIncludeEmailTokens() bool` - -HasIncludeEmailTokens returns a boolean if a field has been set. - -### GetIncludePhoneNumbers - -`func (o *PlayerNotificationTarget) GetIncludePhoneNumbers() []string` - -GetIncludePhoneNumbers returns the IncludePhoneNumbers field if non-nil, zero value otherwise. - -### GetIncludePhoneNumbersOk - -`func (o *PlayerNotificationTarget) GetIncludePhoneNumbersOk() (*[]string, bool)` - -GetIncludePhoneNumbersOk returns a tuple with the IncludePhoneNumbers field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIncludePhoneNumbers - -`func (o *PlayerNotificationTarget) SetIncludePhoneNumbers(v []string)` - -SetIncludePhoneNumbers sets IncludePhoneNumbers field to given value. - -### HasIncludePhoneNumbers - -`func (o *PlayerNotificationTarget) HasIncludePhoneNumbers() bool` - -HasIncludePhoneNumbers returns a boolean if a field has been set. - -### GetIncludeIosTokens - -`func (o *PlayerNotificationTarget) GetIncludeIosTokens() []string` - -GetIncludeIosTokens returns the IncludeIosTokens field if non-nil, zero value otherwise. - -### GetIncludeIosTokensOk - -`func (o *PlayerNotificationTarget) GetIncludeIosTokensOk() (*[]string, bool)` - -GetIncludeIosTokensOk returns a tuple with the IncludeIosTokens field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIncludeIosTokens - -`func (o *PlayerNotificationTarget) SetIncludeIosTokens(v []string)` - -SetIncludeIosTokens sets IncludeIosTokens field to given value. - -### HasIncludeIosTokens - -`func (o *PlayerNotificationTarget) HasIncludeIosTokens() bool` - -HasIncludeIosTokens returns a boolean if a field has been set. - -### GetIncludeWpWnsUris - -`func (o *PlayerNotificationTarget) GetIncludeWpWnsUris() []string` - -GetIncludeWpWnsUris returns the IncludeWpWnsUris field if non-nil, zero value otherwise. - -### GetIncludeWpWnsUrisOk - -`func (o *PlayerNotificationTarget) GetIncludeWpWnsUrisOk() (*[]string, bool)` - -GetIncludeWpWnsUrisOk returns a tuple with the IncludeWpWnsUris field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIncludeWpWnsUris - -`func (o *PlayerNotificationTarget) SetIncludeWpWnsUris(v []string)` - -SetIncludeWpWnsUris sets IncludeWpWnsUris field to given value. - -### HasIncludeWpWnsUris - -`func (o *PlayerNotificationTarget) HasIncludeWpWnsUris() bool` - -HasIncludeWpWnsUris returns a boolean if a field has been set. - -### GetIncludeAmazonRegIds - -`func (o *PlayerNotificationTarget) GetIncludeAmazonRegIds() []string` - -GetIncludeAmazonRegIds returns the IncludeAmazonRegIds field if non-nil, zero value otherwise. - -### GetIncludeAmazonRegIdsOk - -`func (o *PlayerNotificationTarget) GetIncludeAmazonRegIdsOk() (*[]string, bool)` - -GetIncludeAmazonRegIdsOk returns a tuple with the IncludeAmazonRegIds field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIncludeAmazonRegIds - -`func (o *PlayerNotificationTarget) SetIncludeAmazonRegIds(v []string)` - -SetIncludeAmazonRegIds sets IncludeAmazonRegIds field to given value. - -### HasIncludeAmazonRegIds - -`func (o *PlayerNotificationTarget) HasIncludeAmazonRegIds() bool` - -HasIncludeAmazonRegIds returns a boolean if a field has been set. - -### GetIncludeChromeRegIds - -`func (o *PlayerNotificationTarget) GetIncludeChromeRegIds() []string` - -GetIncludeChromeRegIds returns the IncludeChromeRegIds field if non-nil, zero value otherwise. - -### GetIncludeChromeRegIdsOk - -`func (o *PlayerNotificationTarget) GetIncludeChromeRegIdsOk() (*[]string, bool)` - -GetIncludeChromeRegIdsOk returns a tuple with the IncludeChromeRegIds field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIncludeChromeRegIds - -`func (o *PlayerNotificationTarget) SetIncludeChromeRegIds(v []string)` - -SetIncludeChromeRegIds sets IncludeChromeRegIds field to given value. - -### HasIncludeChromeRegIds - -`func (o *PlayerNotificationTarget) HasIncludeChromeRegIds() bool` - -HasIncludeChromeRegIds returns a boolean if a field has been set. - -### GetIncludeChromeWebRegIds - -`func (o *PlayerNotificationTarget) GetIncludeChromeWebRegIds() []string` - -GetIncludeChromeWebRegIds returns the IncludeChromeWebRegIds field if non-nil, zero value otherwise. - -### GetIncludeChromeWebRegIdsOk - -`func (o *PlayerNotificationTarget) GetIncludeChromeWebRegIdsOk() (*[]string, bool)` - -GetIncludeChromeWebRegIdsOk returns a tuple with the IncludeChromeWebRegIds field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIncludeChromeWebRegIds - -`func (o *PlayerNotificationTarget) SetIncludeChromeWebRegIds(v []string)` - -SetIncludeChromeWebRegIds sets IncludeChromeWebRegIds field to given value. - -### HasIncludeChromeWebRegIds - -`func (o *PlayerNotificationTarget) HasIncludeChromeWebRegIds() bool` - -HasIncludeChromeWebRegIds returns a boolean if a field has been set. - -### GetIncludeAndroidRegIds - -`func (o *PlayerNotificationTarget) GetIncludeAndroidRegIds() []string` - -GetIncludeAndroidRegIds returns the IncludeAndroidRegIds field if non-nil, zero value otherwise. - -### GetIncludeAndroidRegIdsOk - -`func (o *PlayerNotificationTarget) GetIncludeAndroidRegIdsOk() (*[]string, bool)` - -GetIncludeAndroidRegIdsOk returns a tuple with the IncludeAndroidRegIds field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIncludeAndroidRegIds - -`func (o *PlayerNotificationTarget) SetIncludeAndroidRegIds(v []string)` - -SetIncludeAndroidRegIds sets IncludeAndroidRegIds field to given value. - -### HasIncludeAndroidRegIds - -`func (o *PlayerNotificationTarget) HasIncludeAndroidRegIds() bool` - -HasIncludeAndroidRegIds returns a boolean if a field has been set. - -### GetIncludeAliases - -`func (o *PlayerNotificationTarget) GetIncludeAliases() PlayerNotificationTargetIncludeAliases` - -GetIncludeAliases returns the IncludeAliases field if non-nil, zero value otherwise. - -### GetIncludeAliasesOk - -`func (o *PlayerNotificationTarget) GetIncludeAliasesOk() (*PlayerNotificationTargetIncludeAliases, bool)` - -GetIncludeAliasesOk returns a tuple with the IncludeAliases field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIncludeAliases - -`func (o *PlayerNotificationTarget) SetIncludeAliases(v PlayerNotificationTargetIncludeAliases)` - -SetIncludeAliases sets IncludeAliases field to given value. - -### HasIncludeAliases - -`func (o *PlayerNotificationTarget) HasIncludeAliases() bool` - -HasIncludeAliases returns a boolean if a field has been set. - -### SetIncludeAliasesNil - -`func (o *PlayerNotificationTarget) SetIncludeAliasesNil(b bool)` - - SetIncludeAliasesNil sets the value for IncludeAliases to be an explicit nil - -### UnsetIncludeAliases -`func (o *PlayerNotificationTarget) UnsetIncludeAliases()` - -UnsetIncludeAliases ensures that no value is present for IncludeAliases, not even an explicit nil -### GetTargetChannel - -`func (o *PlayerNotificationTarget) GetTargetChannel() string` - -GetTargetChannel returns the TargetChannel field if non-nil, zero value otherwise. - -### GetTargetChannelOk - -`func (o *PlayerNotificationTarget) GetTargetChannelOk() (*string, bool)` - -GetTargetChannelOk returns a tuple with the TargetChannel field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTargetChannel - -`func (o *PlayerNotificationTarget) SetTargetChannel(v string)` - -SetTargetChannel sets TargetChannel field to given value. - -### HasTargetChannel - -`func (o *PlayerNotificationTarget) HasTargetChannel() bool` - -HasTargetChannel returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PlayerNotificationTargetIncludeAliases.md b/docs/PlayerNotificationTargetIncludeAliases.md deleted file mode 100644 index 40a77d3..0000000 --- a/docs/PlayerNotificationTargetIncludeAliases.md +++ /dev/null @@ -1,56 +0,0 @@ -# PlayerNotificationTargetIncludeAliases - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**AliasLabel** | Pointer to **[]string** | | [optional] - -## Methods - -### NewPlayerNotificationTargetIncludeAliases - -`func NewPlayerNotificationTargetIncludeAliases() *PlayerNotificationTargetIncludeAliases` - -NewPlayerNotificationTargetIncludeAliases instantiates a new PlayerNotificationTargetIncludeAliases object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewPlayerNotificationTargetIncludeAliasesWithDefaults - -`func NewPlayerNotificationTargetIncludeAliasesWithDefaults() *PlayerNotificationTargetIncludeAliases` - -NewPlayerNotificationTargetIncludeAliasesWithDefaults instantiates a new PlayerNotificationTargetIncludeAliases object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetAliasLabel - -`func (o *PlayerNotificationTargetIncludeAliases) GetAliasLabel() []string` - -GetAliasLabel returns the AliasLabel field if non-nil, zero value otherwise. - -### GetAliasLabelOk - -`func (o *PlayerNotificationTargetIncludeAliases) GetAliasLabelOk() (*[]string, bool)` - -GetAliasLabelOk returns a tuple with the AliasLabel field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAliasLabel - -`func (o *PlayerNotificationTargetIncludeAliases) SetAliasLabel(v []string)` - -SetAliasLabel sets AliasLabel field to given value. - -### HasAliasLabel - -`func (o *PlayerNotificationTargetIncludeAliases) HasAliasLabel() bool` - -HasAliasLabel returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PlayerSlice.md b/docs/PlayerSlice.md deleted file mode 100644 index 8451610..0000000 --- a/docs/PlayerSlice.md +++ /dev/null @@ -1,134 +0,0 @@ -# PlayerSlice - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**TotalCount** | Pointer to **int32** | | [optional] -**Offset** | Pointer to **int32** | | [optional] -**Limit** | Pointer to **int32** | | [optional] -**Players** | Pointer to [**[]Player**](Player.md) | | [optional] - -## Methods - -### NewPlayerSlice - -`func NewPlayerSlice() *PlayerSlice` - -NewPlayerSlice instantiates a new PlayerSlice object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewPlayerSliceWithDefaults - -`func NewPlayerSliceWithDefaults() *PlayerSlice` - -NewPlayerSliceWithDefaults instantiates a new PlayerSlice object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetTotalCount - -`func (o *PlayerSlice) GetTotalCount() int32` - -GetTotalCount returns the TotalCount field if non-nil, zero value otherwise. - -### GetTotalCountOk - -`func (o *PlayerSlice) GetTotalCountOk() (*int32, bool)` - -GetTotalCountOk returns a tuple with the TotalCount field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTotalCount - -`func (o *PlayerSlice) SetTotalCount(v int32)` - -SetTotalCount sets TotalCount field to given value. - -### HasTotalCount - -`func (o *PlayerSlice) HasTotalCount() bool` - -HasTotalCount returns a boolean if a field has been set. - -### GetOffset - -`func (o *PlayerSlice) GetOffset() int32` - -GetOffset returns the Offset field if non-nil, zero value otherwise. - -### GetOffsetOk - -`func (o *PlayerSlice) GetOffsetOk() (*int32, bool)` - -GetOffsetOk returns a tuple with the Offset field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetOffset - -`func (o *PlayerSlice) SetOffset(v int32)` - -SetOffset sets Offset field to given value. - -### HasOffset - -`func (o *PlayerSlice) HasOffset() bool` - -HasOffset returns a boolean if a field has been set. - -### GetLimit - -`func (o *PlayerSlice) GetLimit() int32` - -GetLimit returns the Limit field if non-nil, zero value otherwise. - -### GetLimitOk - -`func (o *PlayerSlice) GetLimitOk() (*int32, bool)` - -GetLimitOk returns a tuple with the Limit field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetLimit - -`func (o *PlayerSlice) SetLimit(v int32)` - -SetLimit sets Limit field to given value. - -### HasLimit - -`func (o *PlayerSlice) HasLimit() bool` - -HasLimit returns a boolean if a field has been set. - -### GetPlayers - -`func (o *PlayerSlice) GetPlayers() []Player` - -GetPlayers returns the Players field if non-nil, zero value otherwise. - -### GetPlayersOk - -`func (o *PlayerSlice) GetPlayersOk() (*[]Player, bool)` - -GetPlayersOk returns a tuple with the Players field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPlayers - -`func (o *PlayerSlice) SetPlayers(v []Player)` - -SetPlayers sets Players field to given value. - -### HasPlayers - -`func (o *PlayerSlice) HasPlayers() bool` - -HasPlayers returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/InlineResponse202.md b/docs/PropertiesBody.md similarity index 66% rename from docs/InlineResponse202.md rename to docs/PropertiesBody.md index 232d751..5b99c46 100644 --- a/docs/InlineResponse202.md +++ b/docs/PropertiesBody.md @@ -1,4 +1,4 @@ -# InlineResponse202 +# PropertiesBody ## Properties @@ -8,45 +8,45 @@ Name | Type | Description | Notes ## Methods -### NewInlineResponse202 +### NewPropertiesBody -`func NewInlineResponse202() *InlineResponse202` +`func NewPropertiesBody() *PropertiesBody` -NewInlineResponse202 instantiates a new InlineResponse202 object +NewPropertiesBody instantiates a new PropertiesBody object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed -### NewInlineResponse202WithDefaults +### NewPropertiesBodyWithDefaults -`func NewInlineResponse202WithDefaults() *InlineResponse202` +`func NewPropertiesBodyWithDefaults() *PropertiesBody` -NewInlineResponse202WithDefaults instantiates a new InlineResponse202 object +NewPropertiesBodyWithDefaults instantiates a new PropertiesBody object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetProperties -`func (o *InlineResponse202) GetProperties() PropertiesObject` +`func (o *PropertiesBody) GetProperties() PropertiesObject` GetProperties returns the Properties field if non-nil, zero value otherwise. ### GetPropertiesOk -`func (o *InlineResponse202) GetPropertiesOk() (*PropertiesObject, bool)` +`func (o *PropertiesBody) GetPropertiesOk() (*PropertiesObject, bool)` GetPropertiesOk returns a tuple with the Properties field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetProperties -`func (o *InlineResponse202) SetProperties(v PropertiesObject)` +`func (o *PropertiesBody) SetProperties(v PropertiesObject)` SetProperties sets Properties field to given value. ### HasProperties -`func (o *InlineResponse202) HasProperties() bool` +`func (o *PropertiesBody) HasProperties() bool` HasProperties returns a boolean if a field has been set. diff --git a/docs/PropertiesDeltas.md b/docs/PropertiesDeltas.md index 7552ace..f44c3d3 100644 --- a/docs/PropertiesDeltas.md +++ b/docs/PropertiesDeltas.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**SessionTime** | Pointer to **float32** | | [optional] -**SessionCount** | Pointer to **float32** | | [optional] +**SessionTime** | Pointer to **int32** | | [optional] +**SessionCount** | Pointer to **int32** | | [optional] **Purchases** | Pointer to [**[]Purchase**](Purchase.md) | | [optional] ## Methods @@ -29,20 +29,20 @@ but it doesn't guarantee that properties required by API are set ### GetSessionTime -`func (o *PropertiesDeltas) GetSessionTime() float32` +`func (o *PropertiesDeltas) GetSessionTime() int32` GetSessionTime returns the SessionTime field if non-nil, zero value otherwise. ### GetSessionTimeOk -`func (o *PropertiesDeltas) GetSessionTimeOk() (*float32, bool)` +`func (o *PropertiesDeltas) GetSessionTimeOk() (*int32, bool)` GetSessionTimeOk returns a tuple with the SessionTime field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetSessionTime -`func (o *PropertiesDeltas) SetSessionTime(v float32)` +`func (o *PropertiesDeltas) SetSessionTime(v int32)` SetSessionTime sets SessionTime field to given value. @@ -54,20 +54,20 @@ HasSessionTime returns a boolean if a field has been set. ### GetSessionCount -`func (o *PropertiesDeltas) GetSessionCount() float32` +`func (o *PropertiesDeltas) GetSessionCount() int32` GetSessionCount returns the SessionCount field if non-nil, zero value otherwise. ### GetSessionCountOk -`func (o *PropertiesDeltas) GetSessionCountOk() (*float32, bool)` +`func (o *PropertiesDeltas) GetSessionCountOk() (*int32, bool)` GetSessionCountOk returns a tuple with the SessionCount field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetSessionCount -`func (o *PropertiesDeltas) SetSessionCount(v float32)` +`func (o *PropertiesDeltas) SetSessionCount(v int32)` SetSessionCount sets SessionCount field to given value. diff --git a/docs/PropertiesObject.md b/docs/PropertiesObject.md index ee56ad3..77a3e31 100644 --- a/docs/PropertiesObject.md +++ b/docs/PropertiesObject.md @@ -10,8 +10,8 @@ Name | Type | Description | Notes **Lat** | Pointer to **float32** | | [optional] **Long** | Pointer to **float32** | | [optional] **Country** | Pointer to **string** | | [optional] -**FirstActive** | Pointer to **float32** | | [optional] -**LastActive** | Pointer to **float32** | | [optional] +**FirstActive** | Pointer to **int32** | | [optional] +**LastActive** | Pointer to **int32** | | [optional] **AmountSpent** | Pointer to **float32** | | [optional] **Purchases** | Pointer to [**[]Purchase**](Purchase.md) | | [optional] **Ip** | Pointer to **string** | | [optional] @@ -187,20 +187,20 @@ HasCountry returns a boolean if a field has been set. ### GetFirstActive -`func (o *PropertiesObject) GetFirstActive() float32` +`func (o *PropertiesObject) GetFirstActive() int32` GetFirstActive returns the FirstActive field if non-nil, zero value otherwise. ### GetFirstActiveOk -`func (o *PropertiesObject) GetFirstActiveOk() (*float32, bool)` +`func (o *PropertiesObject) GetFirstActiveOk() (*int32, bool)` GetFirstActiveOk returns a tuple with the FirstActive field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetFirstActive -`func (o *PropertiesObject) SetFirstActive(v float32)` +`func (o *PropertiesObject) SetFirstActive(v int32)` SetFirstActive sets FirstActive field to given value. @@ -212,20 +212,20 @@ HasFirstActive returns a boolean if a field has been set. ### GetLastActive -`func (o *PropertiesObject) GetLastActive() float32` +`func (o *PropertiesObject) GetLastActive() int32` GetLastActive returns the LastActive field if non-nil, zero value otherwise. ### GetLastActiveOk -`func (o *PropertiesObject) GetLastActiveOk() (*float32, bool)` +`func (o *PropertiesObject) GetLastActiveOk() (*int32, bool)` GetLastActiveOk returns a tuple with the LastActive field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLastActive -`func (o *PropertiesObject) SetLastActive(v float32)` +`func (o *PropertiesObject) SetLastActive(v int32)` SetLastActive sets LastActive field to given value. diff --git a/docs/Purchase.md b/docs/Purchase.md index 6a3b8dd..7965049 100644 --- a/docs/Purchase.md +++ b/docs/Purchase.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **Sku** | **string** | The unique identifier of the purchased item. | **Amount** | **string** | The amount, in USD, spent purchasing the item. | **Iso** | **string** | The 3-letter ISO 4217 currency code. Required for correct storage and conversion of amount. | -**Count** | Pointer to **float32** | | [optional] +**Count** | Pointer to **int32** | | [optional] ## Methods @@ -90,20 +90,20 @@ SetIso sets Iso field to given value. ### GetCount -`func (o *Purchase) GetCount() float32` +`func (o *Purchase) GetCount() int32` GetCount returns the Count field if non-nil, zero value otherwise. ### GetCountOk -`func (o *Purchase) GetCountOk() (*float32, bool)` +`func (o *Purchase) GetCountOk() (*int32, bool)` GetCountOk returns a tuple with the Count field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetCount -`func (o *Purchase) SetCount(v float32)` +`func (o *Purchase) SetCount(v int32)` SetCount sets Count field to given value. diff --git a/docs/RateLimitError.md b/docs/RateLimitError.md new file mode 100644 index 0000000..c63dbbd --- /dev/null +++ b/docs/RateLimitError.md @@ -0,0 +1,82 @@ +# RateLimitError + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | Pointer to **[]string** | | [optional] +**Limit** | Pointer to **string** | | [optional] + +## Methods + +### NewRateLimitError + +`func NewRateLimitError() *RateLimitError` + +NewRateLimitError instantiates a new RateLimitError object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRateLimitErrorWithDefaults + +`func NewRateLimitErrorWithDefaults() *RateLimitError` + +NewRateLimitErrorWithDefaults instantiates a new RateLimitError object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetErrors + +`func (o *RateLimitError) GetErrors() []string` + +GetErrors returns the Errors field if non-nil, zero value otherwise. + +### GetErrorsOk + +`func (o *RateLimitError) GetErrorsOk() (*[]string, bool)` + +GetErrorsOk returns a tuple with the Errors field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetErrors + +`func (o *RateLimitError) SetErrors(v []string)` + +SetErrors sets Errors field to given value. + +### HasErrors + +`func (o *RateLimitError) HasErrors() bool` + +HasErrors returns a boolean if a field has been set. + +### GetLimit + +`func (o *RateLimitError) GetLimit() string` + +GetLimit returns the Limit field if non-nil, zero value otherwise. + +### GetLimitOk + +`func (o *RateLimitError) GetLimitOk() (*string, bool)` + +GetLimitOk returns a tuple with the Limit field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLimit + +`func (o *RateLimitError) SetLimit(v string)` + +SetLimit sets Limit field to given value. + +### HasLimit + +`func (o *RateLimitError) HasLimit() bool` + +HasLimit returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Segment.md b/docs/Segment.md index dc6ddcb..6a7d1f3 100644 --- a/docs/Segment.md +++ b/docs/Segment.md @@ -6,13 +6,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Id** | Pointer to **string** | UUID of the segment. If left empty, it will be assigned automaticaly. | [optional] **Name** | **string** | Name of the segment. You'll see this name on the Web UI. | -**Filters** | [**[]FilterExpressions**](FilterExpressions.md) | Filter or operators the segment will have. For a list of available filters with details, please see Send to Users Based on Filters. | +**Filters** | [**[]FilterExpression**](FilterExpression.md) | Filter or operators the segment will have. For a list of available filters with details, please see Send to Users Based on Filters. | ## Methods ### NewSegment -`func NewSegment(name string, filters []FilterExpressions, ) *Segment` +`func NewSegment(name string, filters []FilterExpression, ) *Segment` NewSegment instantiates a new Segment object This constructor will assign default values to properties that have it defined, @@ -74,20 +74,20 @@ SetName sets Name field to given value. ### GetFilters -`func (o *Segment) GetFilters() []FilterExpressions` +`func (o *Segment) GetFilters() []FilterExpression` GetFilters returns the Filters field if non-nil, zero value otherwise. ### GetFiltersOk -`func (o *Segment) GetFiltersOk() (*[]FilterExpressions, bool)` +`func (o *Segment) GetFiltersOk() (*[]FilterExpression, bool)` GetFiltersOk returns a tuple with the Filters field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetFilters -`func (o *Segment) SetFilters(v []FilterExpressions)` +`func (o *Segment) SetFilters(v []FilterExpression)` SetFilters sets Filters field to given value. diff --git a/docs/SegmentData.md b/docs/SegmentData.md new file mode 100644 index 0000000..337ddba --- /dev/null +++ b/docs/SegmentData.md @@ -0,0 +1,212 @@ +# SegmentData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **string** | The segment ID | [optional] +**Name** | Pointer to **string** | The segment name | [optional] +**CreatedAt** | Pointer to **string** | Date segment created | [optional] +**UpdatedAt** | Pointer to **string** | Date segment last updated | [optional] +**AppId** | Pointer to **string** | The app id | [optional] +**ReadOnly** | Pointer to **bool** | Is the segment read only? | [optional] +**IsActive** | Pointer to **bool** | Is the segment active? | [optional] + +## Methods + +### NewSegmentData + +`func NewSegmentData() *SegmentData` + +NewSegmentData instantiates a new SegmentData object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewSegmentDataWithDefaults + +`func NewSegmentDataWithDefaults() *SegmentData` + +NewSegmentDataWithDefaults instantiates a new SegmentData object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *SegmentData) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *SegmentData) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *SegmentData) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *SegmentData) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetName + +`func (o *SegmentData) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *SegmentData) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *SegmentData) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *SegmentData) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetCreatedAt + +`func (o *SegmentData) GetCreatedAt() string` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *SegmentData) GetCreatedAtOk() (*string, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *SegmentData) SetCreatedAt(v string)` + +SetCreatedAt sets CreatedAt field to given value. + +### HasCreatedAt + +`func (o *SegmentData) HasCreatedAt() bool` + +HasCreatedAt returns a boolean if a field has been set. + +### GetUpdatedAt + +`func (o *SegmentData) GetUpdatedAt() string` + +GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. + +### GetUpdatedAtOk + +`func (o *SegmentData) GetUpdatedAtOk() (*string, bool)` + +GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedAt + +`func (o *SegmentData) SetUpdatedAt(v string)` + +SetUpdatedAt sets UpdatedAt field to given value. + +### HasUpdatedAt + +`func (o *SegmentData) HasUpdatedAt() bool` + +HasUpdatedAt returns a boolean if a field has been set. + +### GetAppId + +`func (o *SegmentData) GetAppId() string` + +GetAppId returns the AppId field if non-nil, zero value otherwise. + +### GetAppIdOk + +`func (o *SegmentData) GetAppIdOk() (*string, bool)` + +GetAppIdOk returns a tuple with the AppId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAppId + +`func (o *SegmentData) SetAppId(v string)` + +SetAppId sets AppId field to given value. + +### HasAppId + +`func (o *SegmentData) HasAppId() bool` + +HasAppId returns a boolean if a field has been set. + +### GetReadOnly + +`func (o *SegmentData) GetReadOnly() bool` + +GetReadOnly returns the ReadOnly field if non-nil, zero value otherwise. + +### GetReadOnlyOk + +`func (o *SegmentData) GetReadOnlyOk() (*bool, bool)` + +GetReadOnlyOk returns a tuple with the ReadOnly field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetReadOnly + +`func (o *SegmentData) SetReadOnly(v bool)` + +SetReadOnly sets ReadOnly field to given value. + +### HasReadOnly + +`func (o *SegmentData) HasReadOnly() bool` + +HasReadOnly returns a boolean if a field has been set. + +### GetIsActive + +`func (o *SegmentData) GetIsActive() bool` + +GetIsActive returns the IsActive field if non-nil, zero value otherwise. + +### GetIsActiveOk + +`func (o *SegmentData) GetIsActiveOk() (*bool, bool)` + +GetIsActiveOk returns a tuple with the IsActive field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsActive + +`func (o *SegmentData) SetIsActive(v bool)` + +SetIsActive sets IsActive field to given value. + +### HasIsActive + +`func (o *SegmentData) HasIsActive() bool` + +HasIsActive returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SubscriptionObject.md b/docs/Subscription.md similarity index 64% rename from docs/SubscriptionObject.md rename to docs/Subscription.md index a32bf51..016ec19 100644 --- a/docs/SubscriptionObject.md +++ b/docs/Subscription.md @@ -1,4 +1,4 @@ -# SubscriptionObject +# Subscription ## Properties @@ -8,461 +8,461 @@ Name | Type | Description | Notes **Type** | Pointer to **string** | | [optional] **Token** | Pointer to **string** | | [optional] **Enabled** | Pointer to **bool** | | [optional] -**NotificationTypes** | Pointer to **float32** | | [optional] -**SessionTime** | Pointer to **float32** | | [optional] -**SessionCount** | Pointer to **float32** | | [optional] +**NotificationTypes** | Pointer to **int32** | | [optional] +**SessionTime** | Pointer to **int32** | | [optional] +**SessionCount** | Pointer to **int32** | | [optional] **Sdk** | Pointer to **string** | | [optional] **DeviceModel** | Pointer to **string** | | [optional] **DeviceOs** | Pointer to **string** | | [optional] **Rooted** | Pointer to **bool** | | [optional] -**TestType** | Pointer to **float32** | | [optional] +**TestType** | Pointer to **int32** | | [optional] **AppVersion** | Pointer to **string** | | [optional] -**NetType** | Pointer to **float32** | | [optional] +**NetType** | Pointer to **int32** | | [optional] **Carrier** | Pointer to **string** | | [optional] **WebAuth** | Pointer to **string** | | [optional] **WebP256** | Pointer to **string** | | [optional] ## Methods -### NewSubscriptionObject +### NewSubscription -`func NewSubscriptionObject() *SubscriptionObject` +`func NewSubscription() *Subscription` -NewSubscriptionObject instantiates a new SubscriptionObject object +NewSubscription instantiates a new Subscription object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed -### NewSubscriptionObjectWithDefaults +### NewSubscriptionWithDefaults -`func NewSubscriptionObjectWithDefaults() *SubscriptionObject` +`func NewSubscriptionWithDefaults() *Subscription` -NewSubscriptionObjectWithDefaults instantiates a new SubscriptionObject object +NewSubscriptionWithDefaults instantiates a new Subscription object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId -`func (o *SubscriptionObject) GetId() string` +`func (o *Subscription) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk -`func (o *SubscriptionObject) GetIdOk() (*string, bool)` +`func (o *Subscription) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId -`func (o *SubscriptionObject) SetId(v string)` +`func (o *Subscription) SetId(v string)` SetId sets Id field to given value. ### HasId -`func (o *SubscriptionObject) HasId() bool` +`func (o *Subscription) HasId() bool` HasId returns a boolean if a field has been set. ### GetType -`func (o *SubscriptionObject) GetType() string` +`func (o *Subscription) GetType() string` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk -`func (o *SubscriptionObject) GetTypeOk() (*string, bool)` +`func (o *Subscription) GetTypeOk() (*string, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType -`func (o *SubscriptionObject) SetType(v string)` +`func (o *Subscription) SetType(v string)` SetType sets Type field to given value. ### HasType -`func (o *SubscriptionObject) HasType() bool` +`func (o *Subscription) HasType() bool` HasType returns a boolean if a field has been set. ### GetToken -`func (o *SubscriptionObject) GetToken() string` +`func (o *Subscription) GetToken() string` GetToken returns the Token field if non-nil, zero value otherwise. ### GetTokenOk -`func (o *SubscriptionObject) GetTokenOk() (*string, bool)` +`func (o *Subscription) GetTokenOk() (*string, bool)` GetTokenOk returns a tuple with the Token field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetToken -`func (o *SubscriptionObject) SetToken(v string)` +`func (o *Subscription) SetToken(v string)` SetToken sets Token field to given value. ### HasToken -`func (o *SubscriptionObject) HasToken() bool` +`func (o *Subscription) HasToken() bool` HasToken returns a boolean if a field has been set. ### GetEnabled -`func (o *SubscriptionObject) GetEnabled() bool` +`func (o *Subscription) GetEnabled() bool` GetEnabled returns the Enabled field if non-nil, zero value otherwise. ### GetEnabledOk -`func (o *SubscriptionObject) GetEnabledOk() (*bool, bool)` +`func (o *Subscription) GetEnabledOk() (*bool, bool)` GetEnabledOk returns a tuple with the Enabled field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetEnabled -`func (o *SubscriptionObject) SetEnabled(v bool)` +`func (o *Subscription) SetEnabled(v bool)` SetEnabled sets Enabled field to given value. ### HasEnabled -`func (o *SubscriptionObject) HasEnabled() bool` +`func (o *Subscription) HasEnabled() bool` HasEnabled returns a boolean if a field has been set. ### GetNotificationTypes -`func (o *SubscriptionObject) GetNotificationTypes() float32` +`func (o *Subscription) GetNotificationTypes() int32` GetNotificationTypes returns the NotificationTypes field if non-nil, zero value otherwise. ### GetNotificationTypesOk -`func (o *SubscriptionObject) GetNotificationTypesOk() (*float32, bool)` +`func (o *Subscription) GetNotificationTypesOk() (*int32, bool)` GetNotificationTypesOk returns a tuple with the NotificationTypes field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetNotificationTypes -`func (o *SubscriptionObject) SetNotificationTypes(v float32)` +`func (o *Subscription) SetNotificationTypes(v int32)` SetNotificationTypes sets NotificationTypes field to given value. ### HasNotificationTypes -`func (o *SubscriptionObject) HasNotificationTypes() bool` +`func (o *Subscription) HasNotificationTypes() bool` HasNotificationTypes returns a boolean if a field has been set. ### GetSessionTime -`func (o *SubscriptionObject) GetSessionTime() float32` +`func (o *Subscription) GetSessionTime() int32` GetSessionTime returns the SessionTime field if non-nil, zero value otherwise. ### GetSessionTimeOk -`func (o *SubscriptionObject) GetSessionTimeOk() (*float32, bool)` +`func (o *Subscription) GetSessionTimeOk() (*int32, bool)` GetSessionTimeOk returns a tuple with the SessionTime field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetSessionTime -`func (o *SubscriptionObject) SetSessionTime(v float32)` +`func (o *Subscription) SetSessionTime(v int32)` SetSessionTime sets SessionTime field to given value. ### HasSessionTime -`func (o *SubscriptionObject) HasSessionTime() bool` +`func (o *Subscription) HasSessionTime() bool` HasSessionTime returns a boolean if a field has been set. ### GetSessionCount -`func (o *SubscriptionObject) GetSessionCount() float32` +`func (o *Subscription) GetSessionCount() int32` GetSessionCount returns the SessionCount field if non-nil, zero value otherwise. ### GetSessionCountOk -`func (o *SubscriptionObject) GetSessionCountOk() (*float32, bool)` +`func (o *Subscription) GetSessionCountOk() (*int32, bool)` GetSessionCountOk returns a tuple with the SessionCount field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetSessionCount -`func (o *SubscriptionObject) SetSessionCount(v float32)` +`func (o *Subscription) SetSessionCount(v int32)` SetSessionCount sets SessionCount field to given value. ### HasSessionCount -`func (o *SubscriptionObject) HasSessionCount() bool` +`func (o *Subscription) HasSessionCount() bool` HasSessionCount returns a boolean if a field has been set. ### GetSdk -`func (o *SubscriptionObject) GetSdk() string` +`func (o *Subscription) GetSdk() string` GetSdk returns the Sdk field if non-nil, zero value otherwise. ### GetSdkOk -`func (o *SubscriptionObject) GetSdkOk() (*string, bool)` +`func (o *Subscription) GetSdkOk() (*string, bool)` GetSdkOk returns a tuple with the Sdk field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetSdk -`func (o *SubscriptionObject) SetSdk(v string)` +`func (o *Subscription) SetSdk(v string)` SetSdk sets Sdk field to given value. ### HasSdk -`func (o *SubscriptionObject) HasSdk() bool` +`func (o *Subscription) HasSdk() bool` HasSdk returns a boolean if a field has been set. ### GetDeviceModel -`func (o *SubscriptionObject) GetDeviceModel() string` +`func (o *Subscription) GetDeviceModel() string` GetDeviceModel returns the DeviceModel field if non-nil, zero value otherwise. ### GetDeviceModelOk -`func (o *SubscriptionObject) GetDeviceModelOk() (*string, bool)` +`func (o *Subscription) GetDeviceModelOk() (*string, bool)` GetDeviceModelOk returns a tuple with the DeviceModel field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetDeviceModel -`func (o *SubscriptionObject) SetDeviceModel(v string)` +`func (o *Subscription) SetDeviceModel(v string)` SetDeviceModel sets DeviceModel field to given value. ### HasDeviceModel -`func (o *SubscriptionObject) HasDeviceModel() bool` +`func (o *Subscription) HasDeviceModel() bool` HasDeviceModel returns a boolean if a field has been set. ### GetDeviceOs -`func (o *SubscriptionObject) GetDeviceOs() string` +`func (o *Subscription) GetDeviceOs() string` GetDeviceOs returns the DeviceOs field if non-nil, zero value otherwise. ### GetDeviceOsOk -`func (o *SubscriptionObject) GetDeviceOsOk() (*string, bool)` +`func (o *Subscription) GetDeviceOsOk() (*string, bool)` GetDeviceOsOk returns a tuple with the DeviceOs field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetDeviceOs -`func (o *SubscriptionObject) SetDeviceOs(v string)` +`func (o *Subscription) SetDeviceOs(v string)` SetDeviceOs sets DeviceOs field to given value. ### HasDeviceOs -`func (o *SubscriptionObject) HasDeviceOs() bool` +`func (o *Subscription) HasDeviceOs() bool` HasDeviceOs returns a boolean if a field has been set. ### GetRooted -`func (o *SubscriptionObject) GetRooted() bool` +`func (o *Subscription) GetRooted() bool` GetRooted returns the Rooted field if non-nil, zero value otherwise. ### GetRootedOk -`func (o *SubscriptionObject) GetRootedOk() (*bool, bool)` +`func (o *Subscription) GetRootedOk() (*bool, bool)` GetRootedOk returns a tuple with the Rooted field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetRooted -`func (o *SubscriptionObject) SetRooted(v bool)` +`func (o *Subscription) SetRooted(v bool)` SetRooted sets Rooted field to given value. ### HasRooted -`func (o *SubscriptionObject) HasRooted() bool` +`func (o *Subscription) HasRooted() bool` HasRooted returns a boolean if a field has been set. ### GetTestType -`func (o *SubscriptionObject) GetTestType() float32` +`func (o *Subscription) GetTestType() int32` GetTestType returns the TestType field if non-nil, zero value otherwise. ### GetTestTypeOk -`func (o *SubscriptionObject) GetTestTypeOk() (*float32, bool)` +`func (o *Subscription) GetTestTypeOk() (*int32, bool)` GetTestTypeOk returns a tuple with the TestType field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetTestType -`func (o *SubscriptionObject) SetTestType(v float32)` +`func (o *Subscription) SetTestType(v int32)` SetTestType sets TestType field to given value. ### HasTestType -`func (o *SubscriptionObject) HasTestType() bool` +`func (o *Subscription) HasTestType() bool` HasTestType returns a boolean if a field has been set. ### GetAppVersion -`func (o *SubscriptionObject) GetAppVersion() string` +`func (o *Subscription) GetAppVersion() string` GetAppVersion returns the AppVersion field if non-nil, zero value otherwise. ### GetAppVersionOk -`func (o *SubscriptionObject) GetAppVersionOk() (*string, bool)` +`func (o *Subscription) GetAppVersionOk() (*string, bool)` GetAppVersionOk returns a tuple with the AppVersion field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetAppVersion -`func (o *SubscriptionObject) SetAppVersion(v string)` +`func (o *Subscription) SetAppVersion(v string)` SetAppVersion sets AppVersion field to given value. ### HasAppVersion -`func (o *SubscriptionObject) HasAppVersion() bool` +`func (o *Subscription) HasAppVersion() bool` HasAppVersion returns a boolean if a field has been set. ### GetNetType -`func (o *SubscriptionObject) GetNetType() float32` +`func (o *Subscription) GetNetType() int32` GetNetType returns the NetType field if non-nil, zero value otherwise. ### GetNetTypeOk -`func (o *SubscriptionObject) GetNetTypeOk() (*float32, bool)` +`func (o *Subscription) GetNetTypeOk() (*int32, bool)` GetNetTypeOk returns a tuple with the NetType field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetNetType -`func (o *SubscriptionObject) SetNetType(v float32)` +`func (o *Subscription) SetNetType(v int32)` SetNetType sets NetType field to given value. ### HasNetType -`func (o *SubscriptionObject) HasNetType() bool` +`func (o *Subscription) HasNetType() bool` HasNetType returns a boolean if a field has been set. ### GetCarrier -`func (o *SubscriptionObject) GetCarrier() string` +`func (o *Subscription) GetCarrier() string` GetCarrier returns the Carrier field if non-nil, zero value otherwise. ### GetCarrierOk -`func (o *SubscriptionObject) GetCarrierOk() (*string, bool)` +`func (o *Subscription) GetCarrierOk() (*string, bool)` GetCarrierOk returns a tuple with the Carrier field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetCarrier -`func (o *SubscriptionObject) SetCarrier(v string)` +`func (o *Subscription) SetCarrier(v string)` SetCarrier sets Carrier field to given value. ### HasCarrier -`func (o *SubscriptionObject) HasCarrier() bool` +`func (o *Subscription) HasCarrier() bool` HasCarrier returns a boolean if a field has been set. ### GetWebAuth -`func (o *SubscriptionObject) GetWebAuth() string` +`func (o *Subscription) GetWebAuth() string` GetWebAuth returns the WebAuth field if non-nil, zero value otherwise. ### GetWebAuthOk -`func (o *SubscriptionObject) GetWebAuthOk() (*string, bool)` +`func (o *Subscription) GetWebAuthOk() (*string, bool)` GetWebAuthOk returns a tuple with the WebAuth field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetWebAuth -`func (o *SubscriptionObject) SetWebAuth(v string)` +`func (o *Subscription) SetWebAuth(v string)` SetWebAuth sets WebAuth field to given value. ### HasWebAuth -`func (o *SubscriptionObject) HasWebAuth() bool` +`func (o *Subscription) HasWebAuth() bool` HasWebAuth returns a boolean if a field has been set. ### GetWebP256 -`func (o *SubscriptionObject) GetWebP256() string` +`func (o *Subscription) GetWebP256() string` GetWebP256 returns the WebP256 field if non-nil, zero value otherwise. ### GetWebP256Ok -`func (o *SubscriptionObject) GetWebP256Ok() (*string, bool)` +`func (o *Subscription) GetWebP256Ok() (*string, bool)` GetWebP256Ok returns a tuple with the WebP256 field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetWebP256 -`func (o *SubscriptionObject) SetWebP256(v string)` +`func (o *Subscription) SetWebP256(v string)` SetWebP256 sets WebP256 field to given value. ### HasWebP256 -`func (o *SubscriptionObject) HasWebP256() bool` +`func (o *Subscription) HasWebP256() bool` HasWebP256 returns a boolean if a field has been set. diff --git a/docs/InlineResponse201.md b/docs/SubscriptionBody.md similarity index 61% rename from docs/InlineResponse201.md rename to docs/SubscriptionBody.md index 8180227..f8ce7a4 100644 --- a/docs/InlineResponse201.md +++ b/docs/SubscriptionBody.md @@ -1,52 +1,52 @@ -# InlineResponse201 +# SubscriptionBody ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Subscription** | Pointer to [**SubscriptionObject**](SubscriptionObject.md) | | [optional] +**Subscription** | Pointer to [**Subscription**](Subscription.md) | | [optional] ## Methods -### NewInlineResponse201 +### NewSubscriptionBody -`func NewInlineResponse201() *InlineResponse201` +`func NewSubscriptionBody() *SubscriptionBody` -NewInlineResponse201 instantiates a new InlineResponse201 object +NewSubscriptionBody instantiates a new SubscriptionBody object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed -### NewInlineResponse201WithDefaults +### NewSubscriptionBodyWithDefaults -`func NewInlineResponse201WithDefaults() *InlineResponse201` +`func NewSubscriptionBodyWithDefaults() *SubscriptionBody` -NewInlineResponse201WithDefaults instantiates a new InlineResponse201 object +NewSubscriptionBodyWithDefaults instantiates a new SubscriptionBody object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetSubscription -`func (o *InlineResponse201) GetSubscription() SubscriptionObject` +`func (o *SubscriptionBody) GetSubscription() Subscription` GetSubscription returns the Subscription field if non-nil, zero value otherwise. ### GetSubscriptionOk -`func (o *InlineResponse201) GetSubscriptionOk() (*SubscriptionObject, bool)` +`func (o *SubscriptionBody) GetSubscriptionOk() (*Subscription, bool)` GetSubscriptionOk returns a tuple with the Subscription field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetSubscription -`func (o *InlineResponse201) SetSubscription(v SubscriptionObject)` +`func (o *SubscriptionBody) SetSubscription(v Subscription)` SetSubscription sets Subscription field to given value. ### HasSubscription -`func (o *InlineResponse201) HasSubscription() bool` +`func (o *SubscriptionBody) HasSubscription() bool` HasSubscription returns a boolean if a field has been set. diff --git a/docs/SubscriptionNotificationTarget.md b/docs/SubscriptionNotificationTarget.md new file mode 100644 index 0000000..c90ec30 --- /dev/null +++ b/docs/SubscriptionNotificationTarget.md @@ -0,0 +1,336 @@ +# SubscriptionNotificationTarget + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**IncludeSubscriptionIds** | Pointer to **[]string** | 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 | [optional] +**IncludeEmailTokens** | Pointer to **[]string** | 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 | [optional] +**IncludePhoneNumbers** | Pointer to **[]string** | Recommended for Sending SMS - Target specific phone numbers. The phone number should be in the E.164 format. Phone number should be an existing subscriber on OneSignal. Refer our docs to learn how to add phone numbers to OneSignal. Example phone number: +1999999999 Limit of 2,000 entries per REST API call | [optional] +**IncludeIosTokens** | Pointer to **[]string** | 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 | [optional] +**IncludeWpWnsUris** | Pointer to **[]string** | 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 | [optional] +**IncludeAmazonRegIds** | Pointer to **[]string** | 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 | [optional] +**IncludeChromeRegIds** | Pointer to **[]string** | 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 | [optional] +**IncludeChromeWebRegIds** | Pointer to **[]string** | 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 | [optional] +**IncludeAndroidRegIds** | Pointer to **[]string** | 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 | [optional] +**IncludeAliases** | Pointer to **map[string][]string** | 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. | [optional] +**TargetChannel** | Pointer to **string** | | [optional] + +## Methods + +### NewSubscriptionNotificationTarget + +`func NewSubscriptionNotificationTarget() *SubscriptionNotificationTarget` + +NewSubscriptionNotificationTarget instantiates a new SubscriptionNotificationTarget object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewSubscriptionNotificationTargetWithDefaults + +`func NewSubscriptionNotificationTargetWithDefaults() *SubscriptionNotificationTarget` + +NewSubscriptionNotificationTargetWithDefaults instantiates a new SubscriptionNotificationTarget object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetIncludeSubscriptionIds + +`func (o *SubscriptionNotificationTarget) GetIncludeSubscriptionIds() []string` + +GetIncludeSubscriptionIds returns the IncludeSubscriptionIds field if non-nil, zero value otherwise. + +### GetIncludeSubscriptionIdsOk + +`func (o *SubscriptionNotificationTarget) GetIncludeSubscriptionIdsOk() (*[]string, bool)` + +GetIncludeSubscriptionIdsOk returns a tuple with the IncludeSubscriptionIds field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIncludeSubscriptionIds + +`func (o *SubscriptionNotificationTarget) SetIncludeSubscriptionIds(v []string)` + +SetIncludeSubscriptionIds sets IncludeSubscriptionIds field to given value. + +### HasIncludeSubscriptionIds + +`func (o *SubscriptionNotificationTarget) HasIncludeSubscriptionIds() bool` + +HasIncludeSubscriptionIds returns a boolean if a field has been set. + +### SetIncludeSubscriptionIdsNil + +`func (o *SubscriptionNotificationTarget) SetIncludeSubscriptionIdsNil(b bool)` + + SetIncludeSubscriptionIdsNil sets the value for IncludeSubscriptionIds to be an explicit nil + +### UnsetIncludeSubscriptionIds +`func (o *SubscriptionNotificationTarget) UnsetIncludeSubscriptionIds()` + +UnsetIncludeSubscriptionIds ensures that no value is present for IncludeSubscriptionIds, not even an explicit nil +### GetIncludeEmailTokens + +`func (o *SubscriptionNotificationTarget) GetIncludeEmailTokens() []string` + +GetIncludeEmailTokens returns the IncludeEmailTokens field if non-nil, zero value otherwise. + +### GetIncludeEmailTokensOk + +`func (o *SubscriptionNotificationTarget) GetIncludeEmailTokensOk() (*[]string, bool)` + +GetIncludeEmailTokensOk returns a tuple with the IncludeEmailTokens field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIncludeEmailTokens + +`func (o *SubscriptionNotificationTarget) SetIncludeEmailTokens(v []string)` + +SetIncludeEmailTokens sets IncludeEmailTokens field to given value. + +### HasIncludeEmailTokens + +`func (o *SubscriptionNotificationTarget) HasIncludeEmailTokens() bool` + +HasIncludeEmailTokens returns a boolean if a field has been set. + +### GetIncludePhoneNumbers + +`func (o *SubscriptionNotificationTarget) GetIncludePhoneNumbers() []string` + +GetIncludePhoneNumbers returns the IncludePhoneNumbers field if non-nil, zero value otherwise. + +### GetIncludePhoneNumbersOk + +`func (o *SubscriptionNotificationTarget) GetIncludePhoneNumbersOk() (*[]string, bool)` + +GetIncludePhoneNumbersOk returns a tuple with the IncludePhoneNumbers field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIncludePhoneNumbers + +`func (o *SubscriptionNotificationTarget) SetIncludePhoneNumbers(v []string)` + +SetIncludePhoneNumbers sets IncludePhoneNumbers field to given value. + +### HasIncludePhoneNumbers + +`func (o *SubscriptionNotificationTarget) HasIncludePhoneNumbers() bool` + +HasIncludePhoneNumbers returns a boolean if a field has been set. + +### GetIncludeIosTokens + +`func (o *SubscriptionNotificationTarget) GetIncludeIosTokens() []string` + +GetIncludeIosTokens returns the IncludeIosTokens field if non-nil, zero value otherwise. + +### GetIncludeIosTokensOk + +`func (o *SubscriptionNotificationTarget) GetIncludeIosTokensOk() (*[]string, bool)` + +GetIncludeIosTokensOk returns a tuple with the IncludeIosTokens field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIncludeIosTokens + +`func (o *SubscriptionNotificationTarget) SetIncludeIosTokens(v []string)` + +SetIncludeIosTokens sets IncludeIosTokens field to given value. + +### HasIncludeIosTokens + +`func (o *SubscriptionNotificationTarget) HasIncludeIosTokens() bool` + +HasIncludeIosTokens returns a boolean if a field has been set. + +### GetIncludeWpWnsUris + +`func (o *SubscriptionNotificationTarget) GetIncludeWpWnsUris() []string` + +GetIncludeWpWnsUris returns the IncludeWpWnsUris field if non-nil, zero value otherwise. + +### GetIncludeWpWnsUrisOk + +`func (o *SubscriptionNotificationTarget) GetIncludeWpWnsUrisOk() (*[]string, bool)` + +GetIncludeWpWnsUrisOk returns a tuple with the IncludeWpWnsUris field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIncludeWpWnsUris + +`func (o *SubscriptionNotificationTarget) SetIncludeWpWnsUris(v []string)` + +SetIncludeWpWnsUris sets IncludeWpWnsUris field to given value. + +### HasIncludeWpWnsUris + +`func (o *SubscriptionNotificationTarget) HasIncludeWpWnsUris() bool` + +HasIncludeWpWnsUris returns a boolean if a field has been set. + +### GetIncludeAmazonRegIds + +`func (o *SubscriptionNotificationTarget) GetIncludeAmazonRegIds() []string` + +GetIncludeAmazonRegIds returns the IncludeAmazonRegIds field if non-nil, zero value otherwise. + +### GetIncludeAmazonRegIdsOk + +`func (o *SubscriptionNotificationTarget) GetIncludeAmazonRegIdsOk() (*[]string, bool)` + +GetIncludeAmazonRegIdsOk returns a tuple with the IncludeAmazonRegIds field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIncludeAmazonRegIds + +`func (o *SubscriptionNotificationTarget) SetIncludeAmazonRegIds(v []string)` + +SetIncludeAmazonRegIds sets IncludeAmazonRegIds field to given value. + +### HasIncludeAmazonRegIds + +`func (o *SubscriptionNotificationTarget) HasIncludeAmazonRegIds() bool` + +HasIncludeAmazonRegIds returns a boolean if a field has been set. + +### GetIncludeChromeRegIds + +`func (o *SubscriptionNotificationTarget) GetIncludeChromeRegIds() []string` + +GetIncludeChromeRegIds returns the IncludeChromeRegIds field if non-nil, zero value otherwise. + +### GetIncludeChromeRegIdsOk + +`func (o *SubscriptionNotificationTarget) GetIncludeChromeRegIdsOk() (*[]string, bool)` + +GetIncludeChromeRegIdsOk returns a tuple with the IncludeChromeRegIds field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIncludeChromeRegIds + +`func (o *SubscriptionNotificationTarget) SetIncludeChromeRegIds(v []string)` + +SetIncludeChromeRegIds sets IncludeChromeRegIds field to given value. + +### HasIncludeChromeRegIds + +`func (o *SubscriptionNotificationTarget) HasIncludeChromeRegIds() bool` + +HasIncludeChromeRegIds returns a boolean if a field has been set. + +### GetIncludeChromeWebRegIds + +`func (o *SubscriptionNotificationTarget) GetIncludeChromeWebRegIds() []string` + +GetIncludeChromeWebRegIds returns the IncludeChromeWebRegIds field if non-nil, zero value otherwise. + +### GetIncludeChromeWebRegIdsOk + +`func (o *SubscriptionNotificationTarget) GetIncludeChromeWebRegIdsOk() (*[]string, bool)` + +GetIncludeChromeWebRegIdsOk returns a tuple with the IncludeChromeWebRegIds field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIncludeChromeWebRegIds + +`func (o *SubscriptionNotificationTarget) SetIncludeChromeWebRegIds(v []string)` + +SetIncludeChromeWebRegIds sets IncludeChromeWebRegIds field to given value. + +### HasIncludeChromeWebRegIds + +`func (o *SubscriptionNotificationTarget) HasIncludeChromeWebRegIds() bool` + +HasIncludeChromeWebRegIds returns a boolean if a field has been set. + +### GetIncludeAndroidRegIds + +`func (o *SubscriptionNotificationTarget) GetIncludeAndroidRegIds() []string` + +GetIncludeAndroidRegIds returns the IncludeAndroidRegIds field if non-nil, zero value otherwise. + +### GetIncludeAndroidRegIdsOk + +`func (o *SubscriptionNotificationTarget) GetIncludeAndroidRegIdsOk() (*[]string, bool)` + +GetIncludeAndroidRegIdsOk returns a tuple with the IncludeAndroidRegIds field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIncludeAndroidRegIds + +`func (o *SubscriptionNotificationTarget) SetIncludeAndroidRegIds(v []string)` + +SetIncludeAndroidRegIds sets IncludeAndroidRegIds field to given value. + +### HasIncludeAndroidRegIds + +`func (o *SubscriptionNotificationTarget) HasIncludeAndroidRegIds() bool` + +HasIncludeAndroidRegIds returns a boolean if a field has been set. + +### GetIncludeAliases + +`func (o *SubscriptionNotificationTarget) GetIncludeAliases() map[string][]string` + +GetIncludeAliases returns the IncludeAliases field if non-nil, zero value otherwise. + +### GetIncludeAliasesOk + +`func (o *SubscriptionNotificationTarget) GetIncludeAliasesOk() (*map[string][]string, bool)` + +GetIncludeAliasesOk returns a tuple with the IncludeAliases field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIncludeAliases + +`func (o *SubscriptionNotificationTarget) SetIncludeAliases(v map[string][]string)` + +SetIncludeAliases sets IncludeAliases field to given value. + +### HasIncludeAliases + +`func (o *SubscriptionNotificationTarget) HasIncludeAliases() bool` + +HasIncludeAliases returns a boolean if a field has been set. + +### SetIncludeAliasesNil + +`func (o *SubscriptionNotificationTarget) SetIncludeAliasesNil(b bool)` + + SetIncludeAliasesNil sets the value for IncludeAliases to be an explicit nil + +### UnsetIncludeAliases +`func (o *SubscriptionNotificationTarget) UnsetIncludeAliases()` + +UnsetIncludeAliases ensures that no value is present for IncludeAliases, not even an explicit nil +### GetTargetChannel + +`func (o *SubscriptionNotificationTarget) GetTargetChannel() string` + +GetTargetChannel returns the TargetChannel field if non-nil, zero value otherwise. + +### GetTargetChannelOk + +`func (o *SubscriptionNotificationTarget) GetTargetChannelOk() (*string, bool)` + +GetTargetChannelOk returns a tuple with the TargetChannel field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTargetChannel + +`func (o *SubscriptionNotificationTarget) SetTargetChannel(v string)` + +SetTargetChannel sets TargetChannel field to given value. + +### HasTargetChannel + +`func (o *SubscriptionNotificationTarget) HasTargetChannel() bool` + +HasTargetChannel returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TransferSubscriptionRequestBody.md b/docs/TransferSubscriptionRequestBody.md index e03c326..5eb1aea 100644 --- a/docs/TransferSubscriptionRequestBody.md +++ b/docs/TransferSubscriptionRequestBody.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Identity** | Pointer to **map[string]interface{}** | | [optional] +**Identity** | Pointer to **map[string]string** | | [optional] ## Methods @@ -27,20 +27,20 @@ but it doesn't guarantee that properties required by API are set ### GetIdentity -`func (o *TransferSubscriptionRequestBody) GetIdentity() map[string]interface{}` +`func (o *TransferSubscriptionRequestBody) GetIdentity() map[string]string` GetIdentity returns the Identity field if non-nil, zero value otherwise. ### GetIdentityOk -`func (o *TransferSubscriptionRequestBody) GetIdentityOk() (*map[string]interface{}, bool)` +`func (o *TransferSubscriptionRequestBody) GetIdentityOk() (*map[string]string, bool)` GetIdentityOk returns a tuple with the Identity field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetIdentity -`func (o *TransferSubscriptionRequestBody) SetIdentity(v map[string]interface{})` +`func (o *TransferSubscriptionRequestBody) SetIdentity(v map[string]string)` SetIdentity sets Identity field to given value. diff --git a/docs/UpdateLiveActivityRequest.md b/docs/UpdateLiveActivityRequest.md index e95cd43..440e005 100644 --- a/docs/UpdateLiveActivityRequest.md +++ b/docs/UpdateLiveActivityRequest.md @@ -4,10 +4,15 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Name** | **string** | Type of live activity | +**Name** | **string** | An internal name to assist with your campaign organization. This does not get displayed in the message itself. | **Event** | **string** | | -**EventUpdates** | **map[string]interface{}** | | -**DismissAt** | Pointer to **float32** | Timestamp; only allowed if event is \"end\" | [optional] +**EventUpdates** | **map[string]interface{}** | This must match the ContentState interface you have defined within your Live Activity in your app. | +**Contents** | Pointer to [**LanguageStringMap**](LanguageStringMap.md) | | [optional] +**Headings** | Pointer to [**LanguageStringMap**](LanguageStringMap.md) | | [optional] +**Sound** | Pointer to **string** | 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. | [optional] +**StaleDate** | Pointer to **int32** | 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. | [optional] +**DismissalDate** | Pointer to **int32** | Accepts Unix timestamp in seconds; only allowed if event is \"end\" | [optional] +**Priority** | Pointer to **int32** | 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. | [optional] ## Methods @@ -88,30 +93,155 @@ and a boolean to check if the value has been set. SetEventUpdates sets EventUpdates field to given value. -### GetDismissAt +### GetContents -`func (o *UpdateLiveActivityRequest) GetDismissAt() float32` +`func (o *UpdateLiveActivityRequest) GetContents() LanguageStringMap` -GetDismissAt returns the DismissAt field if non-nil, zero value otherwise. +GetContents returns the Contents field if non-nil, zero value otherwise. -### GetDismissAtOk +### GetContentsOk -`func (o *UpdateLiveActivityRequest) GetDismissAtOk() (*float32, bool)` +`func (o *UpdateLiveActivityRequest) GetContentsOk() (*LanguageStringMap, bool)` -GetDismissAtOk returns a tuple with the DismissAt field if it's non-nil, zero value otherwise +GetContentsOk returns a tuple with the Contents field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetDismissAt +### SetContents -`func (o *UpdateLiveActivityRequest) SetDismissAt(v float32)` +`func (o *UpdateLiveActivityRequest) SetContents(v LanguageStringMap)` -SetDismissAt sets DismissAt field to given value. +SetContents sets Contents field to given value. -### HasDismissAt +### HasContents -`func (o *UpdateLiveActivityRequest) HasDismissAt() bool` +`func (o *UpdateLiveActivityRequest) HasContents() bool` -HasDismissAt returns a boolean if a field has been set. +HasContents returns a boolean if a field has been set. + +### GetHeadings + +`func (o *UpdateLiveActivityRequest) GetHeadings() LanguageStringMap` + +GetHeadings returns the Headings field if non-nil, zero value otherwise. + +### GetHeadingsOk + +`func (o *UpdateLiveActivityRequest) GetHeadingsOk() (*LanguageStringMap, bool)` + +GetHeadingsOk returns a tuple with the Headings field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHeadings + +`func (o *UpdateLiveActivityRequest) SetHeadings(v LanguageStringMap)` + +SetHeadings sets Headings field to given value. + +### HasHeadings + +`func (o *UpdateLiveActivityRequest) HasHeadings() bool` + +HasHeadings returns a boolean if a field has been set. + +### GetSound + +`func (o *UpdateLiveActivityRequest) GetSound() string` + +GetSound returns the Sound field if non-nil, zero value otherwise. + +### GetSoundOk + +`func (o *UpdateLiveActivityRequest) GetSoundOk() (*string, bool)` + +GetSoundOk returns a tuple with the Sound field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSound + +`func (o *UpdateLiveActivityRequest) SetSound(v string)` + +SetSound sets Sound field to given value. + +### HasSound + +`func (o *UpdateLiveActivityRequest) HasSound() bool` + +HasSound returns a boolean if a field has been set. + +### GetStaleDate + +`func (o *UpdateLiveActivityRequest) GetStaleDate() int32` + +GetStaleDate returns the StaleDate field if non-nil, zero value otherwise. + +### GetStaleDateOk + +`func (o *UpdateLiveActivityRequest) GetStaleDateOk() (*int32, bool)` + +GetStaleDateOk returns a tuple with the StaleDate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStaleDate + +`func (o *UpdateLiveActivityRequest) SetStaleDate(v int32)` + +SetStaleDate sets StaleDate field to given value. + +### HasStaleDate + +`func (o *UpdateLiveActivityRequest) HasStaleDate() bool` + +HasStaleDate returns a boolean if a field has been set. + +### GetDismissalDate + +`func (o *UpdateLiveActivityRequest) GetDismissalDate() int32` + +GetDismissalDate returns the DismissalDate field if non-nil, zero value otherwise. + +### GetDismissalDateOk + +`func (o *UpdateLiveActivityRequest) GetDismissalDateOk() (*int32, bool)` + +GetDismissalDateOk returns a tuple with the DismissalDate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDismissalDate + +`func (o *UpdateLiveActivityRequest) SetDismissalDate(v int32)` + +SetDismissalDate sets DismissalDate field to given value. + +### HasDismissalDate + +`func (o *UpdateLiveActivityRequest) HasDismissalDate() bool` + +HasDismissalDate returns a boolean if a field has been set. + +### GetPriority + +`func (o *UpdateLiveActivityRequest) GetPriority() int32` + +GetPriority returns the Priority field if non-nil, zero value otherwise. + +### GetPriorityOk + +`func (o *UpdateLiveActivityRequest) GetPriorityOk() (*int32, bool)` + +GetPriorityOk returns a tuple with the Priority field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPriority + +`func (o *UpdateLiveActivityRequest) SetPriority(v int32)` + +SetPriority sets Priority field to given value. + +### HasPriority + +`func (o *UpdateLiveActivityRequest) HasPriority() bool` + +HasPriority returns a boolean if a field has been set. [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UpdateLiveActivitySuccessResponse.md b/docs/UpdateLiveActivitySuccessResponse.md index 302d179..f7abb5e 100644 --- a/docs/UpdateLiveActivitySuccessResponse.md +++ b/docs/UpdateLiveActivitySuccessResponse.md @@ -4,8 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**NotificationId** | Pointer to **string** | | [optional] -**Errors** | Pointer to [**Notification200Errors**](Notification200Errors.md) | | [optional] +**Id** | Pointer to **string** | | [optional] ## Methods @@ -26,55 +25,30 @@ NewUpdateLiveActivitySuccessResponseWithDefaults instantiates a new UpdateLiveAc This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set -### GetNotificationId +### GetId -`func (o *UpdateLiveActivitySuccessResponse) GetNotificationId() string` +`func (o *UpdateLiveActivitySuccessResponse) GetId() string` -GetNotificationId returns the NotificationId field if non-nil, zero value otherwise. +GetId returns the Id field if non-nil, zero value otherwise. -### GetNotificationIdOk +### GetIdOk -`func (o *UpdateLiveActivitySuccessResponse) GetNotificationIdOk() (*string, bool)` +`func (o *UpdateLiveActivitySuccessResponse) GetIdOk() (*string, bool)` -GetNotificationIdOk returns a tuple with the NotificationId field if it's non-nil, zero value otherwise +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetNotificationId +### SetId -`func (o *UpdateLiveActivitySuccessResponse) SetNotificationId(v string)` +`func (o *UpdateLiveActivitySuccessResponse) SetId(v string)` -SetNotificationId sets NotificationId field to given value. +SetId sets Id field to given value. -### HasNotificationId +### HasId -`func (o *UpdateLiveActivitySuccessResponse) HasNotificationId() bool` +`func (o *UpdateLiveActivitySuccessResponse) HasId() bool` -HasNotificationId returns a boolean if a field has been set. - -### GetErrors - -`func (o *UpdateLiveActivitySuccessResponse) GetErrors() Notification200Errors` - -GetErrors returns the Errors field if non-nil, zero value otherwise. - -### GetErrorsOk - -`func (o *UpdateLiveActivitySuccessResponse) GetErrorsOk() (*Notification200Errors, bool)` - -GetErrorsOk returns a tuple with the Errors field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetErrors - -`func (o *UpdateLiveActivitySuccessResponse) SetErrors(v Notification200Errors)` - -SetErrors sets Errors field to given value. - -### HasErrors - -`func (o *UpdateLiveActivitySuccessResponse) HasErrors() bool` - -HasErrors returns a boolean if a field has been set. +HasId returns a boolean if a field has been set. [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UpdatePlayerSuccessResponse.md b/docs/UpdatePlayerSuccessResponse.md deleted file mode 100644 index 2d1f5f3..0000000 --- a/docs/UpdatePlayerSuccessResponse.md +++ /dev/null @@ -1,56 +0,0 @@ -# UpdatePlayerSuccessResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Success** | Pointer to **bool** | | [optional] - -## Methods - -### NewUpdatePlayerSuccessResponse - -`func NewUpdatePlayerSuccessResponse() *UpdatePlayerSuccessResponse` - -NewUpdatePlayerSuccessResponse instantiates a new UpdatePlayerSuccessResponse object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewUpdatePlayerSuccessResponseWithDefaults - -`func NewUpdatePlayerSuccessResponseWithDefaults() *UpdatePlayerSuccessResponse` - -NewUpdatePlayerSuccessResponseWithDefaults instantiates a new UpdatePlayerSuccessResponse object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetSuccess - -`func (o *UpdatePlayerSuccessResponse) GetSuccess() bool` - -GetSuccess returns the Success field if non-nil, zero value otherwise. - -### GetSuccessOk - -`func (o *UpdatePlayerSuccessResponse) GetSuccessOk() (*bool, bool)` - -GetSuccessOk returns a tuple with the Success field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSuccess - -`func (o *UpdatePlayerSuccessResponse) SetSuccess(v bool)` - -SetSuccess sets Success field to given value. - -### HasSuccess - -`func (o *UpdatePlayerSuccessResponse) HasSuccess() bool` - -HasSuccess returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UpdatePlayerTagsRequestBody.md b/docs/UpdatePlayerTagsRequestBody.md deleted file mode 100644 index 41f7f62..0000000 --- a/docs/UpdatePlayerTagsRequestBody.md +++ /dev/null @@ -1,56 +0,0 @@ -# UpdatePlayerTagsRequestBody - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Tags** | Pointer to **map[string]interface{}** | 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 | [optional] - -## Methods - -### NewUpdatePlayerTagsRequestBody - -`func NewUpdatePlayerTagsRequestBody() *UpdatePlayerTagsRequestBody` - -NewUpdatePlayerTagsRequestBody instantiates a new UpdatePlayerTagsRequestBody object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewUpdatePlayerTagsRequestBodyWithDefaults - -`func NewUpdatePlayerTagsRequestBodyWithDefaults() *UpdatePlayerTagsRequestBody` - -NewUpdatePlayerTagsRequestBodyWithDefaults instantiates a new UpdatePlayerTagsRequestBody object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetTags - -`func (o *UpdatePlayerTagsRequestBody) GetTags() map[string]interface{}` - -GetTags returns the Tags field if non-nil, zero value otherwise. - -### GetTagsOk - -`func (o *UpdatePlayerTagsRequestBody) GetTagsOk() (*map[string]interface{}, bool)` - -GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTags - -`func (o *UpdatePlayerTagsRequestBody) SetTags(v map[string]interface{})` - -SetTags sets Tags field to given value. - -### HasTags - -`func (o *UpdatePlayerTagsRequestBody) HasTags() bool` - -HasTags returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UpdatePlayerTagsSuccessResponse.md b/docs/UpdatePlayerTagsSuccessResponse.md deleted file mode 100644 index 09405c7..0000000 --- a/docs/UpdatePlayerTagsSuccessResponse.md +++ /dev/null @@ -1,56 +0,0 @@ -# UpdatePlayerTagsSuccessResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Success** | Pointer to **bool** | | [optional] - -## Methods - -### NewUpdatePlayerTagsSuccessResponse - -`func NewUpdatePlayerTagsSuccessResponse() *UpdatePlayerTagsSuccessResponse` - -NewUpdatePlayerTagsSuccessResponse instantiates a new UpdatePlayerTagsSuccessResponse object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewUpdatePlayerTagsSuccessResponseWithDefaults - -`func NewUpdatePlayerTagsSuccessResponseWithDefaults() *UpdatePlayerTagsSuccessResponse` - -NewUpdatePlayerTagsSuccessResponseWithDefaults instantiates a new UpdatePlayerTagsSuccessResponse object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetSuccess - -`func (o *UpdatePlayerTagsSuccessResponse) GetSuccess() bool` - -GetSuccess returns the Success field if non-nil, zero value otherwise. - -### GetSuccessOk - -`func (o *UpdatePlayerTagsSuccessResponse) GetSuccessOk() (*bool, bool)` - -GetSuccessOk returns a tuple with the Success field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSuccess - -`func (o *UpdatePlayerTagsSuccessResponse) SetSuccess(v bool)` - -SetSuccess sets Success field to given value. - -### HasSuccess - -`func (o *UpdatePlayerTagsSuccessResponse) HasSuccess() bool` - -HasSuccess returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UpdateSubscriptionRequestBody.md b/docs/UpdateSubscriptionRequestBody.md deleted file mode 100644 index b1c452a..0000000 --- a/docs/UpdateSubscriptionRequestBody.md +++ /dev/null @@ -1,56 +0,0 @@ -# UpdateSubscriptionRequestBody - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Subscription** | Pointer to [**SubscriptionObject**](SubscriptionObject.md) | | [optional] - -## Methods - -### NewUpdateSubscriptionRequestBody - -`func NewUpdateSubscriptionRequestBody() *UpdateSubscriptionRequestBody` - -NewUpdateSubscriptionRequestBody instantiates a new UpdateSubscriptionRequestBody object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewUpdateSubscriptionRequestBodyWithDefaults - -`func NewUpdateSubscriptionRequestBodyWithDefaults() *UpdateSubscriptionRequestBody` - -NewUpdateSubscriptionRequestBodyWithDefaults instantiates a new UpdateSubscriptionRequestBody object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetSubscription - -`func (o *UpdateSubscriptionRequestBody) GetSubscription() SubscriptionObject` - -GetSubscription returns the Subscription field if non-nil, zero value otherwise. - -### GetSubscriptionOk - -`func (o *UpdateSubscriptionRequestBody) GetSubscriptionOk() (*SubscriptionObject, bool)` - -GetSubscriptionOk returns a tuple with the Subscription field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSubscription - -`func (o *UpdateSubscriptionRequestBody) SetSubscription(v SubscriptionObject)` - -SetSubscription sets Subscription field to given value. - -### HasSubscription - -`func (o *UpdateSubscriptionRequestBody) HasSubscription() bool` - -HasSubscription returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/User.md b/docs/User.md index 7149f71..d0b8e1e 100644 --- a/docs/User.md +++ b/docs/User.md @@ -5,9 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Properties** | Pointer to [**PropertiesObject**](PropertiesObject.md) | | [optional] -**Identity** | Pointer to **map[string]interface{}** | | [optional] -**Subscriptions** | Pointer to [**[]SubscriptionObject**](SubscriptionObject.md) | | [optional] -**SubscriptionOptions** | Pointer to [**UserSubscriptionOptions**](UserSubscriptionOptions.md) | | [optional] +**Identity** | Pointer to **map[string]string** | | [optional] +**Subscriptions** | Pointer to [**[]Subscription**](Subscription.md) | | [optional] ## Methods @@ -55,20 +54,20 @@ HasProperties returns a boolean if a field has been set. ### GetIdentity -`func (o *User) GetIdentity() map[string]interface{}` +`func (o *User) GetIdentity() map[string]string` GetIdentity returns the Identity field if non-nil, zero value otherwise. ### GetIdentityOk -`func (o *User) GetIdentityOk() (*map[string]interface{}, bool)` +`func (o *User) GetIdentityOk() (*map[string]string, bool)` GetIdentityOk returns a tuple with the Identity field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetIdentity -`func (o *User) SetIdentity(v map[string]interface{})` +`func (o *User) SetIdentity(v map[string]string)` SetIdentity sets Identity field to given value. @@ -80,20 +79,20 @@ HasIdentity returns a boolean if a field has been set. ### GetSubscriptions -`func (o *User) GetSubscriptions() []SubscriptionObject` +`func (o *User) GetSubscriptions() []Subscription` GetSubscriptions returns the Subscriptions field if non-nil, zero value otherwise. ### GetSubscriptionsOk -`func (o *User) GetSubscriptionsOk() (*[]SubscriptionObject, bool)` +`func (o *User) GetSubscriptionsOk() (*[]Subscription, bool)` GetSubscriptionsOk returns a tuple with the Subscriptions field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetSubscriptions -`func (o *User) SetSubscriptions(v []SubscriptionObject)` +`func (o *User) SetSubscriptions(v []Subscription)` SetSubscriptions sets Subscriptions field to given value. @@ -103,31 +102,6 @@ SetSubscriptions sets Subscriptions field to given value. HasSubscriptions returns a boolean if a field has been set. -### GetSubscriptionOptions - -`func (o *User) GetSubscriptionOptions() UserSubscriptionOptions` - -GetSubscriptionOptions returns the SubscriptionOptions field if non-nil, zero value otherwise. - -### GetSubscriptionOptionsOk - -`func (o *User) GetSubscriptionOptionsOk() (*UserSubscriptionOptions, bool)` - -GetSubscriptionOptionsOk returns a tuple with the SubscriptionOptions field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSubscriptionOptions - -`func (o *User) SetSubscriptionOptions(v UserSubscriptionOptions)` - -SetSubscriptionOptions sets SubscriptionOptions field to given value. - -### HasSubscriptionOptions - -`func (o *User) HasSubscriptionOptions() bool` - -HasSubscriptionOptions returns a boolean if a field has been set. - [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/InlineResponse200.md b/docs/UserIdentityBody.md similarity index 61% rename from docs/InlineResponse200.md rename to docs/UserIdentityBody.md index d36bf82..1c9113a 100644 --- a/docs/InlineResponse200.md +++ b/docs/UserIdentityBody.md @@ -1,52 +1,52 @@ -# InlineResponse200 +# UserIdentityBody ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Identity** | Pointer to **map[string]interface{}** | | [optional] +**Identity** | Pointer to **map[string]string** | | [optional] ## Methods -### NewInlineResponse200 +### NewUserIdentityBody -`func NewInlineResponse200() *InlineResponse200` +`func NewUserIdentityBody() *UserIdentityBody` -NewInlineResponse200 instantiates a new InlineResponse200 object +NewUserIdentityBody instantiates a new UserIdentityBody object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed -### NewInlineResponse200WithDefaults +### NewUserIdentityBodyWithDefaults -`func NewInlineResponse200WithDefaults() *InlineResponse200` +`func NewUserIdentityBodyWithDefaults() *UserIdentityBody` -NewInlineResponse200WithDefaults instantiates a new InlineResponse200 object +NewUserIdentityBodyWithDefaults instantiates a new UserIdentityBody object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetIdentity -`func (o *InlineResponse200) GetIdentity() map[string]interface{}` +`func (o *UserIdentityBody) GetIdentity() map[string]string` GetIdentity returns the Identity field if non-nil, zero value otherwise. ### GetIdentityOk -`func (o *InlineResponse200) GetIdentityOk() (*map[string]interface{}, bool)` +`func (o *UserIdentityBody) GetIdentityOk() (*map[string]string, bool)` GetIdentityOk returns a tuple with the Identity field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetIdentity -`func (o *InlineResponse200) SetIdentity(v map[string]interface{})` +`func (o *UserIdentityBody) SetIdentity(v map[string]string)` SetIdentity sets Identity field to given value. ### HasIdentity -`func (o *InlineResponse200) HasIdentity() bool` +`func (o *UserIdentityBody) HasIdentity() bool` HasIdentity returns a boolean if a field has been set. diff --git a/docs/UserIdentityRequestBody.md b/docs/UserIdentityRequestBody.md deleted file mode 100644 index 8a9a8d6..0000000 --- a/docs/UserIdentityRequestBody.md +++ /dev/null @@ -1,56 +0,0 @@ -# UserIdentityRequestBody - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Identity** | Pointer to **map[string]interface{}** | | [optional] - -## Methods - -### NewUserIdentityRequestBody - -`func NewUserIdentityRequestBody() *UserIdentityRequestBody` - -NewUserIdentityRequestBody instantiates a new UserIdentityRequestBody object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewUserIdentityRequestBodyWithDefaults - -`func NewUserIdentityRequestBodyWithDefaults() *UserIdentityRequestBody` - -NewUserIdentityRequestBodyWithDefaults instantiates a new UserIdentityRequestBody object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetIdentity - -`func (o *UserIdentityRequestBody) GetIdentity() map[string]interface{}` - -GetIdentity returns the Identity field if non-nil, zero value otherwise. - -### GetIdentityOk - -`func (o *UserIdentityRequestBody) GetIdentityOk() (*map[string]interface{}, bool)` - -GetIdentityOk returns a tuple with the Identity field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIdentity - -`func (o *UserIdentityRequestBody) SetIdentity(v map[string]interface{})` - -SetIdentity sets Identity field to given value. - -### HasIdentity - -`func (o *UserIdentityRequestBody) HasIdentity() bool` - -HasIdentity returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UserIdentityResponse.md b/docs/UserIdentityResponse.md deleted file mode 100644 index 54203fe..0000000 --- a/docs/UserIdentityResponse.md +++ /dev/null @@ -1,56 +0,0 @@ -# UserIdentityResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Identity** | Pointer to **map[string]interface{}** | | [optional] - -## Methods - -### NewUserIdentityResponse - -`func NewUserIdentityResponse() *UserIdentityResponse` - -NewUserIdentityResponse instantiates a new UserIdentityResponse object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewUserIdentityResponseWithDefaults - -`func NewUserIdentityResponseWithDefaults() *UserIdentityResponse` - -NewUserIdentityResponseWithDefaults instantiates a new UserIdentityResponse object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetIdentity - -`func (o *UserIdentityResponse) GetIdentity() map[string]interface{}` - -GetIdentity returns the Identity field if non-nil, zero value otherwise. - -### GetIdentityOk - -`func (o *UserIdentityResponse) GetIdentityOk() (*map[string]interface{}, bool)` - -GetIdentityOk returns a tuple with the Identity field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIdentity - -`func (o *UserIdentityResponse) SetIdentity(v map[string]interface{})` - -SetIdentity sets Identity field to given value. - -### HasIdentity - -`func (o *UserIdentityResponse) HasIdentity() bool` - -HasIdentity returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UserSubscriptionOptions.md b/docs/UserSubscriptionOptions.md deleted file mode 100644 index 453a153..0000000 --- a/docs/UserSubscriptionOptions.md +++ /dev/null @@ -1,56 +0,0 @@ -# UserSubscriptionOptions - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**RetainPreviousOwner** | Pointer to **bool** | | [optional] - -## Methods - -### NewUserSubscriptionOptions - -`func NewUserSubscriptionOptions() *UserSubscriptionOptions` - -NewUserSubscriptionOptions instantiates a new UserSubscriptionOptions object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewUserSubscriptionOptionsWithDefaults - -`func NewUserSubscriptionOptionsWithDefaults() *UserSubscriptionOptions` - -NewUserSubscriptionOptionsWithDefaults instantiates a new UserSubscriptionOptions object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetRetainPreviousOwner - -`func (o *UserSubscriptionOptions) GetRetainPreviousOwner() bool` - -GetRetainPreviousOwner returns the RetainPreviousOwner field if non-nil, zero value otherwise. - -### GetRetainPreviousOwnerOk - -`func (o *UserSubscriptionOptions) GetRetainPreviousOwnerOk() (*bool, bool)` - -GetRetainPreviousOwnerOk returns a tuple with the RetainPreviousOwner field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRetainPreviousOwner - -`func (o *UserSubscriptionOptions) SetRetainPreviousOwner(v bool)` - -SetRetainPreviousOwner sets RetainPreviousOwner field to given value. - -### HasRetainPreviousOwner - -`func (o *UserSubscriptionOptions) HasRetainPreviousOwner() bool` - -HasRetainPreviousOwner returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/WebButton.md b/docs/WebButton.md new file mode 100644 index 0000000..ce82f8d --- /dev/null +++ b/docs/WebButton.md @@ -0,0 +1,129 @@ +# WebButton + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | | +**Text** | Pointer to **string** | | [optional] +**Icon** | Pointer to **string** | | [optional] +**Url** | Pointer to **string** | | [optional] + +## Methods + +### NewWebButton + +`func NewWebButton(id string, ) *WebButton` + +NewWebButton instantiates a new WebButton object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewWebButtonWithDefaults + +`func NewWebButtonWithDefaults() *WebButton` + +NewWebButtonWithDefaults instantiates a new WebButton object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *WebButton) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *WebButton) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *WebButton) SetId(v string)` + +SetId sets Id field to given value. + + +### GetText + +`func (o *WebButton) GetText() string` + +GetText returns the Text field if non-nil, zero value otherwise. + +### GetTextOk + +`func (o *WebButton) GetTextOk() (*string, bool)` + +GetTextOk returns a tuple with the Text field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetText + +`func (o *WebButton) SetText(v string)` + +SetText sets Text field to given value. + +### HasText + +`func (o *WebButton) HasText() bool` + +HasText returns a boolean if a field has been set. + +### GetIcon + +`func (o *WebButton) GetIcon() string` + +GetIcon returns the Icon field if non-nil, zero value otherwise. + +### GetIconOk + +`func (o *WebButton) GetIconOk() (*string, bool)` + +GetIconOk returns a tuple with the Icon field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIcon + +`func (o *WebButton) SetIcon(v string)` + +SetIcon sets Icon field to given value. + +### HasIcon + +`func (o *WebButton) HasIcon() bool` + +HasIcon returns a boolean if a field has been set. + +### GetUrl + +`func (o *WebButton) GetUrl() string` + +GetUrl returns the Url field if non-nil, zero value otherwise. + +### GetUrlOk + +`func (o *WebButton) GetUrlOk() (*string, bool)` + +GetUrlOk returns a tuple with the Url field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUrl + +`func (o *WebButton) SetUrl(v string)` + +SetUrl sets Url field to given value. + +### HasUrl + +`func (o *WebButton) HasUrl() bool` + +HasUrl returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/go.mod b/go.mod index 5066a71..345e6c2 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/OneSignal/onesignal-go-api/v2 +module github.com/OneSignal/onesignal-go-api/v5 go 1.13 diff --git a/model_app.go b/model_app.go index 56df0d7..0733e39 100644 --- a/model_app.go +++ b/model_app.go @@ -3,7 +3,7 @@ OneSignal A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com -API version: 1.4.0 +API version: 5.0.1 Contact: devrel@onesignal.com */ diff --git a/model_basic_notification.go b/model_basic_notification.go index 1f08456..4ba49e3 100644 --- a/model_basic_notification.go +++ b/model_basic_notification.go @@ -3,7 +3,7 @@ OneSignal A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com -API version: 1.4.0 +API version: 5.0.1 Contact: devrel@onesignal.com */ @@ -21,29 +21,26 @@ type BasicNotification struct { IncludedSegments []string `json:"included_segments,omitempty"` // Segment that will be excluded when sending. Users in these segments will not receive a notification, even if they were included in included_segments. This targeting parameter is only compatible with included_segments. Example: [\"Active Users\", \"Inactive Users\"] ExcludedSegments []string `json:"excluded_segments,omitempty"` - // 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 - // Deprecated - IncludePlayerIds []string `json:"include_player_ids,omitempty"` - // 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. - // Deprecated - IncludeExternalUserIds []string `json:"include_external_user_ids,omitempty"` + // 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 + IncludeSubscriptionIds []string `json:"include_subscription_ids,omitempty"` // 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 IncludeEmailTokens []string `json:"include_email_tokens,omitempty"` // Recommended for Sending SMS - Target specific phone numbers. The phone number should be in the E.164 format. Phone number should be an existing subscriber on OneSignal. Refer our docs to learn how to add phone numbers to OneSignal. Example phone number: +1999999999 Limit of 2,000 entries per REST API call IncludePhoneNumbers []string `json:"include_phone_numbers,omitempty"` - // 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 IncludeIosTokens []string `json:"include_ios_tokens,omitempty"` - // 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 IncludeWpWnsUris []string `json:"include_wp_wns_uris,omitempty"` - // 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 IncludeAmazonRegIds []string `json:"include_amazon_reg_ids,omitempty"` - // 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 IncludeChromeRegIds []string `json:"include_chrome_reg_ids,omitempty"` - // 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 IncludeChromeWebRegIds []string `json:"include_chrome_web_reg_ids,omitempty"` - // 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 IncludeAndroidRegIds []string `json:"include_android_reg_ids,omitempty"` - IncludeAliases NullablePlayerNotificationTargetIncludeAliases `json:"include_aliases,omitempty"` + // 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. + IncludeAliases map[string][]string `json:"include_aliases,omitempty"` TargetChannel *string `json:"target_channel,omitempty"` Id *string `json:"id,omitempty"` Value *int32 `json:"value,omitempty"` @@ -70,8 +67,6 @@ type BasicNotification struct { IsAdm NullableBool `json:"isAdm,omitempty"` // This flag is not used for web push Please see isChromeWeb for sending to web push users. This flag only applies to Google Chrome Apps & Extensions. Indicates whether to send to all devices registered under your app's Google Chrome Apps & Extension platform. IsChrome NullableBool `json:"isChrome,omitempty"` - // 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. - ChannelForExternalUserIds *string `json:"channel_for_external_user_ids,omitempty"` // 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. AppId string `json:"app_id"` // [DEPRECATED] Correlation and idempotency key. A request received with this parameter will first look for another notification with the same external_id. If one exists, a notification will not be sent, and result of the previous operation will instead be returned. Therefore, if you plan on using this feature, it's important to use a good source of randomness to generate the UUID passed here. This key is only idempotent for 30 days. After 30 days, the notification could be removed from our system and a notification with the same external_id will be sent again. See Idempotent Notification Requests for more details writeOnly: true @@ -79,9 +74,9 @@ type BasicNotification struct { ExternalId NullableString `json:"external_id,omitempty"` // Correlation and idempotency key. A request received with this parameter will first look for another notification with the same idempotency key. If one exists, a notification will not be sent, and result of the previous operation will instead be returned. Therefore, if you plan on using this feature, it's important to use a good source of randomness to generate the UUID passed here. This key is only idempotent for 30 days. After 30 days, the notification could be removed from our system and a notification with the same idempotency key will be sent again. See Idempotent Notification Requests for more details writeOnly: true IdempotencyKey NullableString `json:"idempotency_key,omitempty"` - Contents NullableStringMap `json:"contents,omitempty"` - Headings NullableStringMap `json:"headings,omitempty"` - Subtitle NullableStringMap `json:"subtitle,omitempty"` + Contents NullableLanguageStringMap `json:"contents,omitempty"` + Headings NullableLanguageStringMap `json:"headings,omitempty"` + Subtitle NullableLanguageStringMap `json:"subtitle,omitempty"` // 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} Data map[string]interface{} `json:"data,omitempty"` // Channel: Push Notifications Platform: Huawei Use \"data\" or \"message\" depending on the type of notification you are sending. More details in Data & Background Notifications. @@ -115,7 +110,7 @@ type BasicNotification struct { // Channel: Push Notifications Platform: iOS 8.0+, Android 4.1+, and derivatives like Amazon Buttons to add to the notification. Icon only works for Android. Buttons show in reverse order of array position i.e. Last item in array shows as first button on device. Example: [{\"id\": \"id2\", \"text\": \"second button\", \"icon\": \"ic_menu_share\"}, {\"id\": \"id1\", \"text\": \"first button\", \"icon\": \"ic_menu_send\"}] Buttons []Button `json:"buttons,omitempty"` // 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\"}] - WebButtons []Button `json:"web_buttons,omitempty"` + WebButtons []WebButton `json:"web_buttons,omitempty"` // 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. IosCategory NullableString `json:"ios_category,omitempty"` // Channel: Push Notifications Platform: Android The Android Oreo Notification Category to send the notification under. See the Category documentation on creating one and getting it's id. @@ -205,6 +200,10 @@ type BasicNotification struct { SummaryArg *string `json:"summary_arg,omitempty"` // Channel: Push Notifications Platform: iOS 12+ When using thread_id, you can also control the count of the number of notifications in the group. For example, if the group already has 12 notifications, and you send a new notification with summary_arg_count = 2, the new total will be 14 and the summary will be \"14 more notifications from summary_arg\" SummaryArgCount *int32 `json:"summary_arg_count,omitempty"` + // 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. + IosRelevanceScore NullableFloat32 `json:"ios_relevance_score,omitempty"` + // 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. + IosInterruptionLevel NullableString `json:"ios_interruption_level,omitempty"` // Channel: Email Required. The subject of the email. EmailSubject NullableString `json:"email_subject,omitempty"` // Channel: Email Required unless template_id is set. HTML suported The body of the email you wish to send. Typically, customers include their own HTML templates here. Must include [unsubscribe_url] in an tag somewhere in the email. Note: any malformed HTML content will be sent to users. Please double-check your HTML is valid. @@ -221,7 +220,7 @@ type BasicNotification struct { SmsFrom NullableString `json:"sms_from,omitempty"` // Channel: SMS URLs for the media files to be attached to the SMS content. Limit: 10 media urls with a total max. size of 5MBs. SmsMediaUrls []string `json:"sms_media_urls,omitempty"` - Filters []Filter `json:"filters,omitempty"` + Filters []FilterExpression `json:"filters,omitempty"` // 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} CustomData map[string]interface{} `json:"custom_data,omitempty"` AdditionalProperties map[string]interface{} @@ -311,76 +310,37 @@ func (o *BasicNotification) SetExcludedSegments(v []string) { o.ExcludedSegments = v } -// GetIncludePlayerIds returns the IncludePlayerIds field value if set, zero value otherwise (both if not set or set to explicit null). -// Deprecated -func (o *BasicNotification) GetIncludePlayerIds() []string { +// GetIncludeSubscriptionIds returns the IncludeSubscriptionIds field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *BasicNotification) GetIncludeSubscriptionIds() []string { if o == nil { var ret []string return ret } - return o.IncludePlayerIds + return o.IncludeSubscriptionIds } -// GetIncludePlayerIdsOk returns a tuple with the IncludePlayerIds field value if set, nil otherwise +// GetIncludeSubscriptionIdsOk returns a tuple with the IncludeSubscriptionIds field value if set, nil otherwise // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -// Deprecated -func (o *BasicNotification) GetIncludePlayerIdsOk() ([]string, bool) { - if o == nil || o.IncludePlayerIds == nil { +func (o *BasicNotification) GetIncludeSubscriptionIdsOk() ([]string, bool) { + if o == nil || o.IncludeSubscriptionIds == nil { return nil, false } - return o.IncludePlayerIds, true + return o.IncludeSubscriptionIds, true } -// HasIncludePlayerIds returns a boolean if a field has been set. -func (o *BasicNotification) HasIncludePlayerIds() bool { - if o != nil && o.IncludePlayerIds != nil { +// HasIncludeSubscriptionIds returns a boolean if a field has been set. +func (o *BasicNotification) HasIncludeSubscriptionIds() bool { + if o != nil && o.IncludeSubscriptionIds != nil { return true } return false } -// SetIncludePlayerIds gets a reference to the given []string and assigns it to the IncludePlayerIds field. -// Deprecated -func (o *BasicNotification) SetIncludePlayerIds(v []string) { - o.IncludePlayerIds = v -} - -// GetIncludeExternalUserIds returns the IncludeExternalUserIds field value if set, zero value otherwise (both if not set or set to explicit null). -// Deprecated -func (o *BasicNotification) GetIncludeExternalUserIds() []string { - if o == nil { - var ret []string - return ret - } - return o.IncludeExternalUserIds -} - -// GetIncludeExternalUserIdsOk returns a tuple with the IncludeExternalUserIds field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -// Deprecated -func (o *BasicNotification) GetIncludeExternalUserIdsOk() ([]string, bool) { - if o == nil || o.IncludeExternalUserIds == nil { - return nil, false - } - return o.IncludeExternalUserIds, true -} - -// HasIncludeExternalUserIds returns a boolean if a field has been set. -func (o *BasicNotification) HasIncludeExternalUserIds() bool { - if o != nil && o.IncludeExternalUserIds != nil { - return true - } - - return false -} - -// SetIncludeExternalUserIds gets a reference to the given []string and assigns it to the IncludeExternalUserIds field. -// Deprecated -func (o *BasicNotification) SetIncludeExternalUserIds(v []string) { - o.IncludeExternalUserIds = v +// SetIncludeSubscriptionIds gets a reference to the given []string and assigns it to the IncludeSubscriptionIds field. +func (o *BasicNotification) SetIncludeSubscriptionIds(v []string) { + o.IncludeSubscriptionIds = v } // GetIncludeEmailTokens returns the IncludeEmailTokens field value if set, zero value otherwise. @@ -640,45 +600,36 @@ func (o *BasicNotification) SetIncludeAndroidRegIds(v []string) { } // GetIncludeAliases returns the IncludeAliases field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *BasicNotification) GetIncludeAliases() PlayerNotificationTargetIncludeAliases { - if o == nil || o.IncludeAliases.Get() == nil { - var ret PlayerNotificationTargetIncludeAliases +func (o *BasicNotification) GetIncludeAliases() map[string][]string { + if o == nil { + var ret map[string][]string return ret } - return *o.IncludeAliases.Get() + return o.IncludeAliases } // GetIncludeAliasesOk returns a tuple with the IncludeAliases field value if set, nil otherwise // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *BasicNotification) GetIncludeAliasesOk() (*PlayerNotificationTargetIncludeAliases, bool) { - if o == nil { +func (o *BasicNotification) GetIncludeAliasesOk() (*map[string][]string, bool) { + if o == nil || o.IncludeAliases == nil { return nil, false } - return o.IncludeAliases.Get(), o.IncludeAliases.IsSet() + return &o.IncludeAliases, true } // HasIncludeAliases returns a boolean if a field has been set. func (o *BasicNotification) HasIncludeAliases() bool { - if o != nil && o.IncludeAliases.IsSet() { + if o != nil && o.IncludeAliases != nil { return true } return false } -// SetIncludeAliases gets a reference to the given NullablePlayerNotificationTargetIncludeAliases and assigns it to the IncludeAliases field. -func (o *BasicNotification) SetIncludeAliases(v PlayerNotificationTargetIncludeAliases) { - o.IncludeAliases.Set(&v) -} -// SetIncludeAliasesNil sets the value for IncludeAliases to be an explicit nil -func (o *BasicNotification) SetIncludeAliasesNil() { - o.IncludeAliases.Set(nil) -} - -// UnsetIncludeAliases ensures that no value is present for IncludeAliases, not even an explicit nil -func (o *BasicNotification) UnsetIncludeAliases() { - o.IncludeAliases.Unset() +// SetIncludeAliases gets a reference to the given map[string][]string and assigns it to the IncludeAliases field. +func (o *BasicNotification) SetIncludeAliases(v map[string][]string) { + o.IncludeAliases = v } // GetTargetChannel returns the TargetChannel field value if set, zero value otherwise. @@ -1271,38 +1222,6 @@ func (o *BasicNotification) UnsetIsChrome() { o.IsChrome.Unset() } -// GetChannelForExternalUserIds returns the ChannelForExternalUserIds field value if set, zero value otherwise. -func (o *BasicNotification) GetChannelForExternalUserIds() string { - if o == nil || o.ChannelForExternalUserIds == nil { - var ret string - return ret - } - return *o.ChannelForExternalUserIds -} - -// GetChannelForExternalUserIdsOk returns a tuple with the ChannelForExternalUserIds field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BasicNotification) GetChannelForExternalUserIdsOk() (*string, bool) { - if o == nil || o.ChannelForExternalUserIds == nil { - return nil, false - } - return o.ChannelForExternalUserIds, true -} - -// HasChannelForExternalUserIds returns a boolean if a field has been set. -func (o *BasicNotification) HasChannelForExternalUserIds() bool { - if o != nil && o.ChannelForExternalUserIds != nil { - return true - } - - return false -} - -// SetChannelForExternalUserIds gets a reference to the given string and assigns it to the ChannelForExternalUserIds field. -func (o *BasicNotification) SetChannelForExternalUserIds(v string) { - o.ChannelForExternalUserIds = &v -} - // GetAppId returns the AppId field value func (o *BasicNotification) GetAppId() string { if o == nil { @@ -1415,9 +1334,9 @@ func (o *BasicNotification) UnsetIdempotencyKey() { } // GetContents returns the Contents field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *BasicNotification) GetContents() StringMap { +func (o *BasicNotification) GetContents() LanguageStringMap { if o == nil || o.Contents.Get() == nil { - var ret StringMap + var ret LanguageStringMap return ret } return *o.Contents.Get() @@ -1426,7 +1345,7 @@ func (o *BasicNotification) GetContents() StringMap { // GetContentsOk returns a tuple with the Contents field value if set, nil otherwise // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *BasicNotification) GetContentsOk() (*StringMap, bool) { +func (o *BasicNotification) GetContentsOk() (*LanguageStringMap, bool) { if o == nil { return nil, false } @@ -1442,8 +1361,8 @@ func (o *BasicNotification) HasContents() bool { return false } -// SetContents gets a reference to the given NullableStringMap and assigns it to the Contents field. -func (o *BasicNotification) SetContents(v StringMap) { +// SetContents gets a reference to the given NullableLanguageStringMap and assigns it to the Contents field. +func (o *BasicNotification) SetContents(v LanguageStringMap) { o.Contents.Set(&v) } // SetContentsNil sets the value for Contents to be an explicit nil @@ -1457,9 +1376,9 @@ func (o *BasicNotification) UnsetContents() { } // GetHeadings returns the Headings field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *BasicNotification) GetHeadings() StringMap { +func (o *BasicNotification) GetHeadings() LanguageStringMap { if o == nil || o.Headings.Get() == nil { - var ret StringMap + var ret LanguageStringMap return ret } return *o.Headings.Get() @@ -1468,7 +1387,7 @@ func (o *BasicNotification) GetHeadings() StringMap { // GetHeadingsOk returns a tuple with the Headings field value if set, nil otherwise // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *BasicNotification) GetHeadingsOk() (*StringMap, bool) { +func (o *BasicNotification) GetHeadingsOk() (*LanguageStringMap, bool) { if o == nil { return nil, false } @@ -1484,8 +1403,8 @@ func (o *BasicNotification) HasHeadings() bool { return false } -// SetHeadings gets a reference to the given NullableStringMap and assigns it to the Headings field. -func (o *BasicNotification) SetHeadings(v StringMap) { +// SetHeadings gets a reference to the given NullableLanguageStringMap and assigns it to the Headings field. +func (o *BasicNotification) SetHeadings(v LanguageStringMap) { o.Headings.Set(&v) } // SetHeadingsNil sets the value for Headings to be an explicit nil @@ -1499,9 +1418,9 @@ func (o *BasicNotification) UnsetHeadings() { } // GetSubtitle returns the Subtitle field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *BasicNotification) GetSubtitle() StringMap { +func (o *BasicNotification) GetSubtitle() LanguageStringMap { if o == nil || o.Subtitle.Get() == nil { - var ret StringMap + var ret LanguageStringMap return ret } return *o.Subtitle.Get() @@ -1510,7 +1429,7 @@ func (o *BasicNotification) GetSubtitle() StringMap { // GetSubtitleOk returns a tuple with the Subtitle field value if set, nil otherwise // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *BasicNotification) GetSubtitleOk() (*StringMap, bool) { +func (o *BasicNotification) GetSubtitleOk() (*LanguageStringMap, bool) { if o == nil { return nil, false } @@ -1526,8 +1445,8 @@ func (o *BasicNotification) HasSubtitle() bool { return false } -// SetSubtitle gets a reference to the given NullableStringMap and assigns it to the Subtitle field. -func (o *BasicNotification) SetSubtitle(v StringMap) { +// SetSubtitle gets a reference to the given NullableLanguageStringMap and assigns it to the Subtitle field. +func (o *BasicNotification) SetSubtitle(v LanguageStringMap) { o.Subtitle.Set(&v) } // SetSubtitleNil sets the value for Subtitle to be an explicit nil @@ -2176,9 +2095,9 @@ func (o *BasicNotification) SetButtons(v []Button) { } // GetWebButtons returns the WebButtons field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *BasicNotification) GetWebButtons() []Button { +func (o *BasicNotification) GetWebButtons() []WebButton { if o == nil { - var ret []Button + var ret []WebButton return ret } return o.WebButtons @@ -2187,7 +2106,7 @@ func (o *BasicNotification) GetWebButtons() []Button { // GetWebButtonsOk returns a tuple with the WebButtons field value if set, nil otherwise // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *BasicNotification) GetWebButtonsOk() ([]Button, bool) { +func (o *BasicNotification) GetWebButtonsOk() ([]WebButton, bool) { if o == nil || o.WebButtons == nil { return nil, false } @@ -2203,8 +2122,8 @@ func (o *BasicNotification) HasWebButtons() bool { return false } -// SetWebButtons gets a reference to the given []Button and assigns it to the WebButtons field. -func (o *BasicNotification) SetWebButtons(v []Button) { +// SetWebButtons gets a reference to the given []WebButton and assigns it to the WebButtons field. +func (o *BasicNotification) SetWebButtons(v []WebButton) { o.WebButtons = v } @@ -4010,6 +3929,90 @@ func (o *BasicNotification) SetSummaryArgCount(v int32) { o.SummaryArgCount = &v } +// GetIosRelevanceScore returns the IosRelevanceScore field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *BasicNotification) GetIosRelevanceScore() float32 { + if o == nil || o.IosRelevanceScore.Get() == nil { + var ret float32 + return ret + } + return *o.IosRelevanceScore.Get() +} + +// GetIosRelevanceScoreOk returns a tuple with the IosRelevanceScore field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *BasicNotification) GetIosRelevanceScoreOk() (*float32, bool) { + if o == nil { + return nil, false + } + return o.IosRelevanceScore.Get(), o.IosRelevanceScore.IsSet() +} + +// HasIosRelevanceScore returns a boolean if a field has been set. +func (o *BasicNotification) HasIosRelevanceScore() bool { + if o != nil && o.IosRelevanceScore.IsSet() { + return true + } + + return false +} + +// SetIosRelevanceScore gets a reference to the given NullableFloat32 and assigns it to the IosRelevanceScore field. +func (o *BasicNotification) SetIosRelevanceScore(v float32) { + o.IosRelevanceScore.Set(&v) +} +// SetIosRelevanceScoreNil sets the value for IosRelevanceScore to be an explicit nil +func (o *BasicNotification) SetIosRelevanceScoreNil() { + o.IosRelevanceScore.Set(nil) +} + +// UnsetIosRelevanceScore ensures that no value is present for IosRelevanceScore, not even an explicit nil +func (o *BasicNotification) UnsetIosRelevanceScore() { + o.IosRelevanceScore.Unset() +} + +// GetIosInterruptionLevel returns the IosInterruptionLevel field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *BasicNotification) GetIosInterruptionLevel() string { + if o == nil || o.IosInterruptionLevel.Get() == nil { + var ret string + return ret + } + return *o.IosInterruptionLevel.Get() +} + +// GetIosInterruptionLevelOk returns a tuple with the IosInterruptionLevel field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *BasicNotification) GetIosInterruptionLevelOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.IosInterruptionLevel.Get(), o.IosInterruptionLevel.IsSet() +} + +// HasIosInterruptionLevel returns a boolean if a field has been set. +func (o *BasicNotification) HasIosInterruptionLevel() bool { + if o != nil && o.IosInterruptionLevel.IsSet() { + return true + } + + return false +} + +// SetIosInterruptionLevel gets a reference to the given NullableString and assigns it to the IosInterruptionLevel field. +func (o *BasicNotification) SetIosInterruptionLevel(v string) { + o.IosInterruptionLevel.Set(&v) +} +// SetIosInterruptionLevelNil sets the value for IosInterruptionLevel to be an explicit nil +func (o *BasicNotification) SetIosInterruptionLevelNil() { + o.IosInterruptionLevel.Set(nil) +} + +// UnsetIosInterruptionLevel ensures that no value is present for IosInterruptionLevel, not even an explicit nil +func (o *BasicNotification) UnsetIosInterruptionLevel() { + o.IosInterruptionLevel.Unset() +} + // GetEmailSubject returns the EmailSubject field value if set, zero value otherwise (both if not set or set to explicit null). func (o *BasicNotification) GetEmailSubject() string { if o == nil || o.EmailSubject.Get() == nil { @@ -4318,9 +4321,9 @@ func (o *BasicNotification) SetSmsMediaUrls(v []string) { } // GetFilters returns the Filters field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *BasicNotification) GetFilters() []Filter { +func (o *BasicNotification) GetFilters() []FilterExpression { if o == nil { - var ret []Filter + var ret []FilterExpression return ret } return o.Filters @@ -4329,7 +4332,7 @@ func (o *BasicNotification) GetFilters() []Filter { // GetFiltersOk returns a tuple with the Filters field value if set, nil otherwise // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *BasicNotification) GetFiltersOk() ([]Filter, bool) { +func (o *BasicNotification) GetFiltersOk() ([]FilterExpression, bool) { if o == nil || o.Filters == nil { return nil, false } @@ -4345,8 +4348,8 @@ func (o *BasicNotification) HasFilters() bool { return false } -// SetFilters gets a reference to the given []Filter and assigns it to the Filters field. -func (o *BasicNotification) SetFilters(v []Filter) { +// SetFilters gets a reference to the given []FilterExpression and assigns it to the Filters field. +func (o *BasicNotification) SetFilters(v []FilterExpression) { o.Filters = v } @@ -4391,11 +4394,8 @@ func (o BasicNotification) MarshalJSON() ([]byte, error) { if o.ExcludedSegments != nil { toSerialize["excluded_segments"] = o.ExcludedSegments } - if o.IncludePlayerIds != nil { - toSerialize["include_player_ids"] = o.IncludePlayerIds - } - if o.IncludeExternalUserIds != nil { - toSerialize["include_external_user_ids"] = o.IncludeExternalUserIds + if o.IncludeSubscriptionIds != nil { + toSerialize["include_subscription_ids"] = o.IncludeSubscriptionIds } if o.IncludeEmailTokens != nil { toSerialize["include_email_tokens"] = o.IncludeEmailTokens @@ -4421,8 +4421,8 @@ func (o BasicNotification) MarshalJSON() ([]byte, error) { if o.IncludeAndroidRegIds != nil { toSerialize["include_android_reg_ids"] = o.IncludeAndroidRegIds } - if o.IncludeAliases.IsSet() { - toSerialize["include_aliases"] = o.IncludeAliases.Get() + if o.IncludeAliases != nil { + toSerialize["include_aliases"] = o.IncludeAliases } if o.TargetChannel != nil { toSerialize["target_channel"] = o.TargetChannel @@ -4469,9 +4469,6 @@ func (o BasicNotification) MarshalJSON() ([]byte, error) { if o.IsChrome.IsSet() { toSerialize["isChrome"] = o.IsChrome.Get() } - if o.ChannelForExternalUserIds != nil { - toSerialize["channel_for_external_user_ids"] = o.ChannelForExternalUserIds - } if true { toSerialize["app_id"] = o.AppId } @@ -4676,6 +4673,12 @@ func (o BasicNotification) MarshalJSON() ([]byte, error) { if o.SummaryArgCount != nil { toSerialize["summary_arg_count"] = o.SummaryArgCount } + if o.IosRelevanceScore.IsSet() { + toSerialize["ios_relevance_score"] = o.IosRelevanceScore.Get() + } + if o.IosInterruptionLevel.IsSet() { + toSerialize["ios_interruption_level"] = o.IosInterruptionLevel.Get() + } if o.EmailSubject.IsSet() { toSerialize["email_subject"] = o.EmailSubject.Get() } @@ -4726,8 +4729,7 @@ func (o *BasicNotification) UnmarshalJSON(bytes []byte) (err error) { if err = json.Unmarshal(bytes, &additionalProperties); err == nil { delete(additionalProperties, "included_segments") delete(additionalProperties, "excluded_segments") - delete(additionalProperties, "include_player_ids") - delete(additionalProperties, "include_external_user_ids") + delete(additionalProperties, "include_subscription_ids") delete(additionalProperties, "include_email_tokens") delete(additionalProperties, "include_phone_numbers") delete(additionalProperties, "include_ios_tokens") @@ -4752,7 +4754,6 @@ func (o *BasicNotification) UnmarshalJSON(bytes []byte) (err error) { delete(additionalProperties, "isWP_WNS") delete(additionalProperties, "isAdm") delete(additionalProperties, "isChrome") - delete(additionalProperties, "channel_for_external_user_ids") delete(additionalProperties, "app_id") delete(additionalProperties, "external_id") delete(additionalProperties, "idempotency_key") @@ -4821,6 +4822,8 @@ func (o *BasicNotification) UnmarshalJSON(bytes []byte) (err error) { delete(additionalProperties, "thread_id") delete(additionalProperties, "summary_arg") delete(additionalProperties, "summary_arg_count") + delete(additionalProperties, "ios_relevance_score") + delete(additionalProperties, "ios_interruption_level") delete(additionalProperties, "email_subject") delete(additionalProperties, "email_body") delete(additionalProperties, "email_from_name") diff --git a/model_basic_notification_all_of.go b/model_basic_notification_all_of.go index a4a6750..86a8678 100644 --- a/model_basic_notification_all_of.go +++ b/model_basic_notification_all_of.go @@ -3,7 +3,7 @@ OneSignal A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com -API version: 1.4.0 +API version: 5.0.1 Contact: devrel@onesignal.com */ @@ -42,8 +42,6 @@ type BasicNotificationAllOf struct { IsAdm NullableBool `json:"isAdm,omitempty"` // This flag is not used for web push Please see isChromeWeb for sending to web push users. This flag only applies to Google Chrome Apps & Extensions. Indicates whether to send to all devices registered under your app's Google Chrome Apps & Extension platform. IsChrome NullableBool `json:"isChrome,omitempty"` - // 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. - ChannelForExternalUserIds *string `json:"channel_for_external_user_ids,omitempty"` // 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. AppId *string `json:"app_id,omitempty"` // [DEPRECATED] Correlation and idempotency key. A request received with this parameter will first look for another notification with the same external_id. If one exists, a notification will not be sent, and result of the previous operation will instead be returned. Therefore, if you plan on using this feature, it's important to use a good source of randomness to generate the UUID passed here. This key is only idempotent for 30 days. After 30 days, the notification could be removed from our system and a notification with the same external_id will be sent again. See Idempotent Notification Requests for more details writeOnly: true @@ -51,9 +49,9 @@ type BasicNotificationAllOf struct { ExternalId NullableString `json:"external_id,omitempty"` // Correlation and idempotency key. A request received with this parameter will first look for another notification with the same idempotency key. If one exists, a notification will not be sent, and result of the previous operation will instead be returned. Therefore, if you plan on using this feature, it's important to use a good source of randomness to generate the UUID passed here. This key is only idempotent for 30 days. After 30 days, the notification could be removed from our system and a notification with the same idempotency key will be sent again. See Idempotent Notification Requests for more details writeOnly: true IdempotencyKey NullableString `json:"idempotency_key,omitempty"` - Contents NullableStringMap `json:"contents,omitempty"` - Headings NullableStringMap `json:"headings,omitempty"` - Subtitle NullableStringMap `json:"subtitle,omitempty"` + Contents NullableLanguageStringMap `json:"contents,omitempty"` + Headings NullableLanguageStringMap `json:"headings,omitempty"` + Subtitle NullableLanguageStringMap `json:"subtitle,omitempty"` // 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} Data map[string]interface{} `json:"data,omitempty"` // Channel: Push Notifications Platform: Huawei Use \"data\" or \"message\" depending on the type of notification you are sending. More details in Data & Background Notifications. @@ -87,7 +85,7 @@ type BasicNotificationAllOf struct { // Channel: Push Notifications Platform: iOS 8.0+, Android 4.1+, and derivatives like Amazon Buttons to add to the notification. Icon only works for Android. Buttons show in reverse order of array position i.e. Last item in array shows as first button on device. Example: [{\"id\": \"id2\", \"text\": \"second button\", \"icon\": \"ic_menu_share\"}, {\"id\": \"id1\", \"text\": \"first button\", \"icon\": \"ic_menu_send\"}] Buttons []Button `json:"buttons,omitempty"` // 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\"}] - WebButtons []Button `json:"web_buttons,omitempty"` + WebButtons []WebButton `json:"web_buttons,omitempty"` // 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. IosCategory NullableString `json:"ios_category,omitempty"` // Channel: Push Notifications Platform: Android The Android Oreo Notification Category to send the notification under. See the Category documentation on creating one and getting it's id. @@ -177,6 +175,10 @@ type BasicNotificationAllOf struct { SummaryArg *string `json:"summary_arg,omitempty"` // Channel: Push Notifications Platform: iOS 12+ When using thread_id, you can also control the count of the number of notifications in the group. For example, if the group already has 12 notifications, and you send a new notification with summary_arg_count = 2, the new total will be 14 and the summary will be \"14 more notifications from summary_arg\" SummaryArgCount *int32 `json:"summary_arg_count,omitempty"` + // 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. + IosRelevanceScore NullableFloat32 `json:"ios_relevance_score,omitempty"` + // 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. + IosInterruptionLevel NullableString `json:"ios_interruption_level,omitempty"` // Channel: Email Required. The subject of the email. EmailSubject NullableString `json:"email_subject,omitempty"` // Channel: Email Required unless template_id is set. HTML suported The body of the email you wish to send. Typically, customers include their own HTML templates here. Must include [unsubscribe_url] in an tag somewhere in the email. Note: any malformed HTML content will be sent to users. Please double-check your HTML is valid. @@ -193,7 +195,7 @@ type BasicNotificationAllOf struct { SmsFrom NullableString `json:"sms_from,omitempty"` // Channel: SMS URLs for the media files to be attached to the SMS content. Limit: 10 media urls with a total max. size of 5MBs. SmsMediaUrls []string `json:"sms_media_urls,omitempty"` - Filters []Filter `json:"filters,omitempty"` + Filters []FilterExpression `json:"filters,omitempty"` // 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} CustomData map[string]interface{} `json:"custom_data,omitempty"` AdditionalProperties map[string]interface{} @@ -776,38 +778,6 @@ func (o *BasicNotificationAllOf) UnsetIsChrome() { o.IsChrome.Unset() } -// GetChannelForExternalUserIds returns the ChannelForExternalUserIds field value if set, zero value otherwise. -func (o *BasicNotificationAllOf) GetChannelForExternalUserIds() string { - if o == nil || o.ChannelForExternalUserIds == nil { - var ret string - return ret - } - return *o.ChannelForExternalUserIds -} - -// GetChannelForExternalUserIdsOk returns a tuple with the ChannelForExternalUserIds field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BasicNotificationAllOf) GetChannelForExternalUserIdsOk() (*string, bool) { - if o == nil || o.ChannelForExternalUserIds == nil { - return nil, false - } - return o.ChannelForExternalUserIds, true -} - -// HasChannelForExternalUserIds returns a boolean if a field has been set. -func (o *BasicNotificationAllOf) HasChannelForExternalUserIds() bool { - if o != nil && o.ChannelForExternalUserIds != nil { - return true - } - - return false -} - -// SetChannelForExternalUserIds gets a reference to the given string and assigns it to the ChannelForExternalUserIds field. -func (o *BasicNotificationAllOf) SetChannelForExternalUserIds(v string) { - o.ChannelForExternalUserIds = &v -} - // GetAppId returns the AppId field value if set, zero value otherwise. func (o *BasicNotificationAllOf) GetAppId() string { if o == nil || o.AppId == nil { @@ -928,9 +898,9 @@ func (o *BasicNotificationAllOf) UnsetIdempotencyKey() { } // GetContents returns the Contents field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *BasicNotificationAllOf) GetContents() StringMap { +func (o *BasicNotificationAllOf) GetContents() LanguageStringMap { if o == nil || o.Contents.Get() == nil { - var ret StringMap + var ret LanguageStringMap return ret } return *o.Contents.Get() @@ -939,7 +909,7 @@ func (o *BasicNotificationAllOf) GetContents() StringMap { // GetContentsOk returns a tuple with the Contents field value if set, nil otherwise // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *BasicNotificationAllOf) GetContentsOk() (*StringMap, bool) { +func (o *BasicNotificationAllOf) GetContentsOk() (*LanguageStringMap, bool) { if o == nil { return nil, false } @@ -955,8 +925,8 @@ func (o *BasicNotificationAllOf) HasContents() bool { return false } -// SetContents gets a reference to the given NullableStringMap and assigns it to the Contents field. -func (o *BasicNotificationAllOf) SetContents(v StringMap) { +// SetContents gets a reference to the given NullableLanguageStringMap and assigns it to the Contents field. +func (o *BasicNotificationAllOf) SetContents(v LanguageStringMap) { o.Contents.Set(&v) } // SetContentsNil sets the value for Contents to be an explicit nil @@ -970,9 +940,9 @@ func (o *BasicNotificationAllOf) UnsetContents() { } // GetHeadings returns the Headings field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *BasicNotificationAllOf) GetHeadings() StringMap { +func (o *BasicNotificationAllOf) GetHeadings() LanguageStringMap { if o == nil || o.Headings.Get() == nil { - var ret StringMap + var ret LanguageStringMap return ret } return *o.Headings.Get() @@ -981,7 +951,7 @@ func (o *BasicNotificationAllOf) GetHeadings() StringMap { // GetHeadingsOk returns a tuple with the Headings field value if set, nil otherwise // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *BasicNotificationAllOf) GetHeadingsOk() (*StringMap, bool) { +func (o *BasicNotificationAllOf) GetHeadingsOk() (*LanguageStringMap, bool) { if o == nil { return nil, false } @@ -997,8 +967,8 @@ func (o *BasicNotificationAllOf) HasHeadings() bool { return false } -// SetHeadings gets a reference to the given NullableStringMap and assigns it to the Headings field. -func (o *BasicNotificationAllOf) SetHeadings(v StringMap) { +// SetHeadings gets a reference to the given NullableLanguageStringMap and assigns it to the Headings field. +func (o *BasicNotificationAllOf) SetHeadings(v LanguageStringMap) { o.Headings.Set(&v) } // SetHeadingsNil sets the value for Headings to be an explicit nil @@ -1012,9 +982,9 @@ func (o *BasicNotificationAllOf) UnsetHeadings() { } // GetSubtitle returns the Subtitle field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *BasicNotificationAllOf) GetSubtitle() StringMap { +func (o *BasicNotificationAllOf) GetSubtitle() LanguageStringMap { if o == nil || o.Subtitle.Get() == nil { - var ret StringMap + var ret LanguageStringMap return ret } return *o.Subtitle.Get() @@ -1023,7 +993,7 @@ func (o *BasicNotificationAllOf) GetSubtitle() StringMap { // GetSubtitleOk returns a tuple with the Subtitle field value if set, nil otherwise // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *BasicNotificationAllOf) GetSubtitleOk() (*StringMap, bool) { +func (o *BasicNotificationAllOf) GetSubtitleOk() (*LanguageStringMap, bool) { if o == nil { return nil, false } @@ -1039,8 +1009,8 @@ func (o *BasicNotificationAllOf) HasSubtitle() bool { return false } -// SetSubtitle gets a reference to the given NullableStringMap and assigns it to the Subtitle field. -func (o *BasicNotificationAllOf) SetSubtitle(v StringMap) { +// SetSubtitle gets a reference to the given NullableLanguageStringMap and assigns it to the Subtitle field. +func (o *BasicNotificationAllOf) SetSubtitle(v LanguageStringMap) { o.Subtitle.Set(&v) } // SetSubtitleNil sets the value for Subtitle to be an explicit nil @@ -1689,9 +1659,9 @@ func (o *BasicNotificationAllOf) SetButtons(v []Button) { } // GetWebButtons returns the WebButtons field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *BasicNotificationAllOf) GetWebButtons() []Button { +func (o *BasicNotificationAllOf) GetWebButtons() []WebButton { if o == nil { - var ret []Button + var ret []WebButton return ret } return o.WebButtons @@ -1700,7 +1670,7 @@ func (o *BasicNotificationAllOf) GetWebButtons() []Button { // GetWebButtonsOk returns a tuple with the WebButtons field value if set, nil otherwise // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *BasicNotificationAllOf) GetWebButtonsOk() ([]Button, bool) { +func (o *BasicNotificationAllOf) GetWebButtonsOk() ([]WebButton, bool) { if o == nil || o.WebButtons == nil { return nil, false } @@ -1716,8 +1686,8 @@ func (o *BasicNotificationAllOf) HasWebButtons() bool { return false } -// SetWebButtons gets a reference to the given []Button and assigns it to the WebButtons field. -func (o *BasicNotificationAllOf) SetWebButtons(v []Button) { +// SetWebButtons gets a reference to the given []WebButton and assigns it to the WebButtons field. +func (o *BasicNotificationAllOf) SetWebButtons(v []WebButton) { o.WebButtons = v } @@ -3523,6 +3493,90 @@ func (o *BasicNotificationAllOf) SetSummaryArgCount(v int32) { o.SummaryArgCount = &v } +// GetIosRelevanceScore returns the IosRelevanceScore field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *BasicNotificationAllOf) GetIosRelevanceScore() float32 { + if o == nil || o.IosRelevanceScore.Get() == nil { + var ret float32 + return ret + } + return *o.IosRelevanceScore.Get() +} + +// GetIosRelevanceScoreOk returns a tuple with the IosRelevanceScore field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *BasicNotificationAllOf) GetIosRelevanceScoreOk() (*float32, bool) { + if o == nil { + return nil, false + } + return o.IosRelevanceScore.Get(), o.IosRelevanceScore.IsSet() +} + +// HasIosRelevanceScore returns a boolean if a field has been set. +func (o *BasicNotificationAllOf) HasIosRelevanceScore() bool { + if o != nil && o.IosRelevanceScore.IsSet() { + return true + } + + return false +} + +// SetIosRelevanceScore gets a reference to the given NullableFloat32 and assigns it to the IosRelevanceScore field. +func (o *BasicNotificationAllOf) SetIosRelevanceScore(v float32) { + o.IosRelevanceScore.Set(&v) +} +// SetIosRelevanceScoreNil sets the value for IosRelevanceScore to be an explicit nil +func (o *BasicNotificationAllOf) SetIosRelevanceScoreNil() { + o.IosRelevanceScore.Set(nil) +} + +// UnsetIosRelevanceScore ensures that no value is present for IosRelevanceScore, not even an explicit nil +func (o *BasicNotificationAllOf) UnsetIosRelevanceScore() { + o.IosRelevanceScore.Unset() +} + +// GetIosInterruptionLevel returns the IosInterruptionLevel field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *BasicNotificationAllOf) GetIosInterruptionLevel() string { + if o == nil || o.IosInterruptionLevel.Get() == nil { + var ret string + return ret + } + return *o.IosInterruptionLevel.Get() +} + +// GetIosInterruptionLevelOk returns a tuple with the IosInterruptionLevel field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *BasicNotificationAllOf) GetIosInterruptionLevelOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.IosInterruptionLevel.Get(), o.IosInterruptionLevel.IsSet() +} + +// HasIosInterruptionLevel returns a boolean if a field has been set. +func (o *BasicNotificationAllOf) HasIosInterruptionLevel() bool { + if o != nil && o.IosInterruptionLevel.IsSet() { + return true + } + + return false +} + +// SetIosInterruptionLevel gets a reference to the given NullableString and assigns it to the IosInterruptionLevel field. +func (o *BasicNotificationAllOf) SetIosInterruptionLevel(v string) { + o.IosInterruptionLevel.Set(&v) +} +// SetIosInterruptionLevelNil sets the value for IosInterruptionLevel to be an explicit nil +func (o *BasicNotificationAllOf) SetIosInterruptionLevelNil() { + o.IosInterruptionLevel.Set(nil) +} + +// UnsetIosInterruptionLevel ensures that no value is present for IosInterruptionLevel, not even an explicit nil +func (o *BasicNotificationAllOf) UnsetIosInterruptionLevel() { + o.IosInterruptionLevel.Unset() +} + // GetEmailSubject returns the EmailSubject field value if set, zero value otherwise (both if not set or set to explicit null). func (o *BasicNotificationAllOf) GetEmailSubject() string { if o == nil || o.EmailSubject.Get() == nil { @@ -3831,9 +3885,9 @@ func (o *BasicNotificationAllOf) SetSmsMediaUrls(v []string) { } // GetFilters returns the Filters field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *BasicNotificationAllOf) GetFilters() []Filter { +func (o *BasicNotificationAllOf) GetFilters() []FilterExpression { if o == nil { - var ret []Filter + var ret []FilterExpression return ret } return o.Filters @@ -3842,7 +3896,7 @@ func (o *BasicNotificationAllOf) GetFilters() []Filter { // GetFiltersOk returns a tuple with the Filters field value if set, nil otherwise // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *BasicNotificationAllOf) GetFiltersOk() ([]Filter, bool) { +func (o *BasicNotificationAllOf) GetFiltersOk() ([]FilterExpression, bool) { if o == nil || o.Filters == nil { return nil, false } @@ -3858,8 +3912,8 @@ func (o *BasicNotificationAllOf) HasFilters() bool { return false } -// SetFilters gets a reference to the given []Filter and assigns it to the Filters field. -func (o *BasicNotificationAllOf) SetFilters(v []Filter) { +// SetFilters gets a reference to the given []FilterExpression and assigns it to the Filters field. +func (o *BasicNotificationAllOf) SetFilters(v []FilterExpression) { o.Filters = v } @@ -3940,9 +3994,6 @@ func (o BasicNotificationAllOf) MarshalJSON() ([]byte, error) { if o.IsChrome.IsSet() { toSerialize["isChrome"] = o.IsChrome.Get() } - if o.ChannelForExternalUserIds != nil { - toSerialize["channel_for_external_user_ids"] = o.ChannelForExternalUserIds - } if o.AppId != nil { toSerialize["app_id"] = o.AppId } @@ -4147,6 +4198,12 @@ func (o BasicNotificationAllOf) MarshalJSON() ([]byte, error) { if o.SummaryArgCount != nil { toSerialize["summary_arg_count"] = o.SummaryArgCount } + if o.IosRelevanceScore.IsSet() { + toSerialize["ios_relevance_score"] = o.IosRelevanceScore.Get() + } + if o.IosInterruptionLevel.IsSet() { + toSerialize["ios_interruption_level"] = o.IosInterruptionLevel.Get() + } if o.EmailSubject.IsSet() { toSerialize["email_subject"] = o.EmailSubject.Get() } @@ -4209,7 +4266,6 @@ func (o *BasicNotificationAllOf) UnmarshalJSON(bytes []byte) (err error) { delete(additionalProperties, "isWP_WNS") delete(additionalProperties, "isAdm") delete(additionalProperties, "isChrome") - delete(additionalProperties, "channel_for_external_user_ids") delete(additionalProperties, "app_id") delete(additionalProperties, "external_id") delete(additionalProperties, "idempotency_key") @@ -4278,6 +4334,8 @@ func (o *BasicNotificationAllOf) UnmarshalJSON(bytes []byte) (err error) { delete(additionalProperties, "thread_id") delete(additionalProperties, "summary_arg") delete(additionalProperties, "summary_arg_count") + delete(additionalProperties, "ios_relevance_score") + delete(additionalProperties, "ios_interruption_level") delete(additionalProperties, "email_subject") delete(additionalProperties, "email_body") delete(additionalProperties, "email_from_name") diff --git a/model_basic_notification_all_of_android_background_layout.go b/model_basic_notification_all_of_android_background_layout.go index 7d98c7d..5707e74 100644 --- a/model_basic_notification_all_of_android_background_layout.go +++ b/model_basic_notification_all_of_android_background_layout.go @@ -3,7 +3,7 @@ OneSignal A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com -API version: 1.4.0 +API version: 5.0.1 Contact: devrel@onesignal.com */ diff --git a/model_begin_live_activity_request.go b/model_begin_live_activity_request.go deleted file mode 100644 index cd5b89f..0000000 --- a/model_begin_live_activity_request.go +++ /dev/null @@ -1,164 +0,0 @@ -/* -OneSignal - -A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com - -API version: 1.4.0 -Contact: devrel@onesignal.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onesignal - -import ( - "encoding/json" -) - -// BeginLiveActivityRequest struct for BeginLiveActivityRequest -type BeginLiveActivityRequest struct { - PushToken string `json:"push_token"` - SubscriptionId string `json:"subscription_id"` - AdditionalProperties map[string]interface{} -} - -type _BeginLiveActivityRequest BeginLiveActivityRequest - -// NewBeginLiveActivityRequest instantiates a new BeginLiveActivityRequest object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewBeginLiveActivityRequest(pushToken string, subscriptionId string) *BeginLiveActivityRequest { - this := BeginLiveActivityRequest{} - this.PushToken = pushToken - this.SubscriptionId = subscriptionId - return &this -} - -// NewBeginLiveActivityRequestWithDefaults instantiates a new BeginLiveActivityRequest object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewBeginLiveActivityRequestWithDefaults() *BeginLiveActivityRequest { - this := BeginLiveActivityRequest{} - return &this -} - -// GetPushToken returns the PushToken field value -func (o *BeginLiveActivityRequest) GetPushToken() string { - if o == nil { - var ret string - return ret - } - - return o.PushToken -} - -// GetPushTokenOk returns a tuple with the PushToken field value -// and a boolean to check if the value has been set. -func (o *BeginLiveActivityRequest) GetPushTokenOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.PushToken, true -} - -// SetPushToken sets field value -func (o *BeginLiveActivityRequest) SetPushToken(v string) { - o.PushToken = v -} - -// GetSubscriptionId returns the SubscriptionId field value -func (o *BeginLiveActivityRequest) GetSubscriptionId() string { - if o == nil { - var ret string - return ret - } - - return o.SubscriptionId -} - -// GetSubscriptionIdOk returns a tuple with the SubscriptionId field value -// and a boolean to check if the value has been set. -func (o *BeginLiveActivityRequest) GetSubscriptionIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.SubscriptionId, true -} - -// SetSubscriptionId sets field value -func (o *BeginLiveActivityRequest) SetSubscriptionId(v string) { - o.SubscriptionId = v -} - -func (o BeginLiveActivityRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["push_token"] = o.PushToken - } - if true { - toSerialize["subscription_id"] = o.SubscriptionId - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return json.Marshal(toSerialize) -} - -func (o *BeginLiveActivityRequest) UnmarshalJSON(bytes []byte) (err error) { - varBeginLiveActivityRequest := _BeginLiveActivityRequest{} - - if err = json.Unmarshal(bytes, &varBeginLiveActivityRequest); err == nil { - *o = BeginLiveActivityRequest(varBeginLiveActivityRequest) - } - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { - delete(additionalProperties, "push_token") - delete(additionalProperties, "subscription_id") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableBeginLiveActivityRequest struct { - value *BeginLiveActivityRequest - isSet bool -} - -func (v NullableBeginLiveActivityRequest) Get() *BeginLiveActivityRequest { - return v.value -} - -func (v *NullableBeginLiveActivityRequest) Set(val *BeginLiveActivityRequest) { - v.value = val - v.isSet = true -} - -func (v NullableBeginLiveActivityRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableBeginLiveActivityRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableBeginLiveActivityRequest(val *BeginLiveActivityRequest) *NullableBeginLiveActivityRequest { - return &NullableBeginLiveActivityRequest{value: val, isSet: true} -} - -func (v NullableBeginLiveActivityRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableBeginLiveActivityRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_button.go b/model_button.go index 4327fc7..3358bd7 100644 --- a/model_button.go +++ b/model_button.go @@ -3,7 +3,7 @@ OneSignal A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com -API version: 1.4.0 +API version: 5.0.1 Contact: devrel@onesignal.com */ diff --git a/model_cancel_notification_success_response.go b/model_cancel_notification_success_response.go deleted file mode 100644 index fb3f5eb..0000000 --- a/model_cancel_notification_success_response.go +++ /dev/null @@ -1,141 +0,0 @@ -/* -OneSignal - -A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com - -API version: 1.4.0 -Contact: devrel@onesignal.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onesignal - -import ( - "encoding/json" -) - -// CancelNotificationSuccessResponse struct for CancelNotificationSuccessResponse -type CancelNotificationSuccessResponse struct { - Success *bool `json:"success,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _CancelNotificationSuccessResponse CancelNotificationSuccessResponse - -// NewCancelNotificationSuccessResponse instantiates a new CancelNotificationSuccessResponse object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewCancelNotificationSuccessResponse() *CancelNotificationSuccessResponse { - this := CancelNotificationSuccessResponse{} - return &this -} - -// NewCancelNotificationSuccessResponseWithDefaults instantiates a new CancelNotificationSuccessResponse object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewCancelNotificationSuccessResponseWithDefaults() *CancelNotificationSuccessResponse { - this := CancelNotificationSuccessResponse{} - return &this -} - -// GetSuccess returns the Success field value if set, zero value otherwise. -func (o *CancelNotificationSuccessResponse) GetSuccess() bool { - if o == nil || o.Success == nil { - var ret bool - return ret - } - return *o.Success -} - -// GetSuccessOk returns a tuple with the Success field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CancelNotificationSuccessResponse) GetSuccessOk() (*bool, bool) { - if o == nil || o.Success == nil { - return nil, false - } - return o.Success, true -} - -// HasSuccess returns a boolean if a field has been set. -func (o *CancelNotificationSuccessResponse) HasSuccess() bool { - if o != nil && o.Success != nil { - return true - } - - return false -} - -// SetSuccess gets a reference to the given bool and assigns it to the Success field. -func (o *CancelNotificationSuccessResponse) SetSuccess(v bool) { - o.Success = &v -} - -func (o CancelNotificationSuccessResponse) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Success != nil { - toSerialize["success"] = o.Success - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return json.Marshal(toSerialize) -} - -func (o *CancelNotificationSuccessResponse) UnmarshalJSON(bytes []byte) (err error) { - varCancelNotificationSuccessResponse := _CancelNotificationSuccessResponse{} - - if err = json.Unmarshal(bytes, &varCancelNotificationSuccessResponse); err == nil { - *o = CancelNotificationSuccessResponse(varCancelNotificationSuccessResponse) - } - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { - delete(additionalProperties, "success") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableCancelNotificationSuccessResponse struct { - value *CancelNotificationSuccessResponse - isSet bool -} - -func (v NullableCancelNotificationSuccessResponse) Get() *CancelNotificationSuccessResponse { - return v.value -} - -func (v *NullableCancelNotificationSuccessResponse) Set(val *CancelNotificationSuccessResponse) { - v.value = val - v.isSet = true -} - -func (v NullableCancelNotificationSuccessResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableCancelNotificationSuccessResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCancelNotificationSuccessResponse(val *CancelNotificationSuccessResponse) *NullableCancelNotificationSuccessResponse { - return &NullableCancelNotificationSuccessResponse{value: val, isSet: true} -} - -func (v NullableCancelNotificationSuccessResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCancelNotificationSuccessResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_create_notification_success_response.go b/model_create_notification_success_response.go index 139d7a6..682aeb5 100644 --- a/model_create_notification_success_response.go +++ b/model_create_notification_success_response.go @@ -3,7 +3,7 @@ OneSignal A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com -API version: 1.4.0 +API version: 5.0.1 Contact: devrel@onesignal.com */ @@ -18,10 +18,9 @@ import ( // CreateNotificationSuccessResponse struct for CreateNotificationSuccessResponse type CreateNotificationSuccessResponse struct { Id *string `json:"id,omitempty"` - // Estimated number of subscribers targetted by notification. - Recipients *int32 `json:"recipients,omitempty"` ExternalId NullableString `json:"external_id,omitempty"` - Errors *Notification200Errors `json:"errors,omitempty"` + // Errors include the identifiers that are invalid, or that there are no subscribers. + Errors interface{} `json:"errors,omitempty"` AdditionalProperties map[string]interface{} } @@ -76,38 +75,6 @@ func (o *CreateNotificationSuccessResponse) SetId(v string) { o.Id = &v } -// GetRecipients returns the Recipients field value if set, zero value otherwise. -func (o *CreateNotificationSuccessResponse) GetRecipients() int32 { - if o == nil || o.Recipients == nil { - var ret int32 - return ret - } - return *o.Recipients -} - -// GetRecipientsOk returns a tuple with the Recipients field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateNotificationSuccessResponse) GetRecipientsOk() (*int32, bool) { - if o == nil || o.Recipients == nil { - return nil, false - } - return o.Recipients, true -} - -// HasRecipients returns a boolean if a field has been set. -func (o *CreateNotificationSuccessResponse) HasRecipients() bool { - if o != nil && o.Recipients != nil { - return true - } - - return false -} - -// SetRecipients gets a reference to the given int32 and assigns it to the Recipients field. -func (o *CreateNotificationSuccessResponse) SetRecipients(v int32) { - o.Recipients = &v -} - // GetExternalId returns the ExternalId field value if set, zero value otherwise (both if not set or set to explicit null). func (o *CreateNotificationSuccessResponse) GetExternalId() string { if o == nil || o.ExternalId.Get() == nil { @@ -150,22 +117,23 @@ func (o *CreateNotificationSuccessResponse) UnsetExternalId() { o.ExternalId.Unset() } -// GetErrors returns the Errors field value if set, zero value otherwise. -func (o *CreateNotificationSuccessResponse) GetErrors() Notification200Errors { - if o == nil || o.Errors == nil { - var ret Notification200Errors +// GetErrors returns the Errors field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CreateNotificationSuccessResponse) GetErrors() interface{} { + if o == nil { + var ret interface{} return ret } - return *o.Errors + return o.Errors } // GetErrorsOk returns a tuple with the Errors field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CreateNotificationSuccessResponse) GetErrorsOk() (*Notification200Errors, bool) { +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CreateNotificationSuccessResponse) GetErrorsOk() (*interface{}, bool) { if o == nil || o.Errors == nil { return nil, false } - return o.Errors, true + return &o.Errors, true } // HasErrors returns a boolean if a field has been set. @@ -177,9 +145,9 @@ func (o *CreateNotificationSuccessResponse) HasErrors() bool { return false } -// SetErrors gets a reference to the given Notification200Errors and assigns it to the Errors field. -func (o *CreateNotificationSuccessResponse) SetErrors(v Notification200Errors) { - o.Errors = &v +// SetErrors gets a reference to the given interface{} and assigns it to the Errors field. +func (o *CreateNotificationSuccessResponse) SetErrors(v interface{}) { + o.Errors = v } func (o CreateNotificationSuccessResponse) MarshalJSON() ([]byte, error) { @@ -187,9 +155,6 @@ func (o CreateNotificationSuccessResponse) MarshalJSON() ([]byte, error) { if o.Id != nil { toSerialize["id"] = o.Id } - if o.Recipients != nil { - toSerialize["recipients"] = o.Recipients - } if o.ExternalId.IsSet() { toSerialize["external_id"] = o.ExternalId.Get() } @@ -215,7 +180,6 @@ func (o *CreateNotificationSuccessResponse) UnmarshalJSON(bytes []byte) (err err if err = json.Unmarshal(bytes, &additionalProperties); err == nil { delete(additionalProperties, "id") - delete(additionalProperties, "recipients") delete(additionalProperties, "external_id") delete(additionalProperties, "errors") o.AdditionalProperties = additionalProperties diff --git a/model_create_player_success_response.go b/model_create_player_success_response.go deleted file mode 100644 index 0d463c0..0000000 --- a/model_create_player_success_response.go +++ /dev/null @@ -1,178 +0,0 @@ -/* -OneSignal - -A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com - -API version: 1.4.0 -Contact: devrel@onesignal.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onesignal - -import ( - "encoding/json" -) - -// CreatePlayerSuccessResponse struct for CreatePlayerSuccessResponse -type CreatePlayerSuccessResponse struct { - Success *bool `json:"success,omitempty"` - Id *string `json:"id,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _CreatePlayerSuccessResponse CreatePlayerSuccessResponse - -// NewCreatePlayerSuccessResponse instantiates a new CreatePlayerSuccessResponse object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewCreatePlayerSuccessResponse() *CreatePlayerSuccessResponse { - this := CreatePlayerSuccessResponse{} - return &this -} - -// NewCreatePlayerSuccessResponseWithDefaults instantiates a new CreatePlayerSuccessResponse object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewCreatePlayerSuccessResponseWithDefaults() *CreatePlayerSuccessResponse { - this := CreatePlayerSuccessResponse{} - return &this -} - -// GetSuccess returns the Success field value if set, zero value otherwise. -func (o *CreatePlayerSuccessResponse) GetSuccess() bool { - if o == nil || o.Success == nil { - var ret bool - return ret - } - return *o.Success -} - -// GetSuccessOk returns a tuple with the Success field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreatePlayerSuccessResponse) GetSuccessOk() (*bool, bool) { - if o == nil || o.Success == nil { - return nil, false - } - return o.Success, true -} - -// HasSuccess returns a boolean if a field has been set. -func (o *CreatePlayerSuccessResponse) HasSuccess() bool { - if o != nil && o.Success != nil { - return true - } - - return false -} - -// SetSuccess gets a reference to the given bool and assigns it to the Success field. -func (o *CreatePlayerSuccessResponse) SetSuccess(v bool) { - o.Success = &v -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *CreatePlayerSuccessResponse) GetId() string { - if o == nil || o.Id == nil { - var ret string - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreatePlayerSuccessResponse) GetIdOk() (*string, bool) { - if o == nil || o.Id == nil { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *CreatePlayerSuccessResponse) HasId() bool { - if o != nil && o.Id != nil { - return true - } - - return false -} - -// SetId gets a reference to the given string and assigns it to the Id field. -func (o *CreatePlayerSuccessResponse) SetId(v string) { - o.Id = &v -} - -func (o CreatePlayerSuccessResponse) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Success != nil { - toSerialize["success"] = o.Success - } - if o.Id != nil { - toSerialize["id"] = o.Id - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return json.Marshal(toSerialize) -} - -func (o *CreatePlayerSuccessResponse) UnmarshalJSON(bytes []byte) (err error) { - varCreatePlayerSuccessResponse := _CreatePlayerSuccessResponse{} - - if err = json.Unmarshal(bytes, &varCreatePlayerSuccessResponse); err == nil { - *o = CreatePlayerSuccessResponse(varCreatePlayerSuccessResponse) - } - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { - delete(additionalProperties, "success") - delete(additionalProperties, "id") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableCreatePlayerSuccessResponse struct { - value *CreatePlayerSuccessResponse - isSet bool -} - -func (v NullableCreatePlayerSuccessResponse) Get() *CreatePlayerSuccessResponse { - return v.value -} - -func (v *NullableCreatePlayerSuccessResponse) Set(val *CreatePlayerSuccessResponse) { - v.value = val - v.isSet = true -} - -func (v NullableCreatePlayerSuccessResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableCreatePlayerSuccessResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCreatePlayerSuccessResponse(val *CreatePlayerSuccessResponse) *NullableCreatePlayerSuccessResponse { - return &NullableCreatePlayerSuccessResponse{value: val, isSet: true} -} - -func (v NullableCreatePlayerSuccessResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCreatePlayerSuccessResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_create_segment_conflict_response.go b/model_create_segment_conflict_response.go index 29a2b2c..7231b7a 100644 --- a/model_create_segment_conflict_response.go +++ b/model_create_segment_conflict_response.go @@ -3,7 +3,7 @@ OneSignal A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com -API version: 1.4.0 +API version: 5.0.1 Contact: devrel@onesignal.com */ diff --git a/model_create_segment_success_response.go b/model_create_segment_success_response.go index 12a5ba0..1330bef 100644 --- a/model_create_segment_success_response.go +++ b/model_create_segment_success_response.go @@ -3,7 +3,7 @@ OneSignal A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com -API version: 1.4.0 +API version: 5.0.1 Contact: devrel@onesignal.com */ diff --git a/model_create_subscription_request_body.go b/model_create_subscription_request_body.go deleted file mode 100644 index 680e870..0000000 --- a/model_create_subscription_request_body.go +++ /dev/null @@ -1,178 +0,0 @@ -/* -OneSignal - -A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com - -API version: 1.4.0 -Contact: devrel@onesignal.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onesignal - -import ( - "encoding/json" -) - -// CreateSubscriptionRequestBody struct for CreateSubscriptionRequestBody -type CreateSubscriptionRequestBody struct { - Subscription *SubscriptionObject `json:"subscription,omitempty"` - RetainPreviousOwner *bool `json:"retain_previous_owner,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _CreateSubscriptionRequestBody CreateSubscriptionRequestBody - -// NewCreateSubscriptionRequestBody instantiates a new CreateSubscriptionRequestBody object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewCreateSubscriptionRequestBody() *CreateSubscriptionRequestBody { - this := CreateSubscriptionRequestBody{} - return &this -} - -// NewCreateSubscriptionRequestBodyWithDefaults instantiates a new CreateSubscriptionRequestBody object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewCreateSubscriptionRequestBodyWithDefaults() *CreateSubscriptionRequestBody { - this := CreateSubscriptionRequestBody{} - return &this -} - -// GetSubscription returns the Subscription field value if set, zero value otherwise. -func (o *CreateSubscriptionRequestBody) GetSubscription() SubscriptionObject { - if o == nil || o.Subscription == nil { - var ret SubscriptionObject - return ret - } - return *o.Subscription -} - -// GetSubscriptionOk returns a tuple with the Subscription field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateSubscriptionRequestBody) GetSubscriptionOk() (*SubscriptionObject, bool) { - if o == nil || o.Subscription == nil { - return nil, false - } - return o.Subscription, true -} - -// HasSubscription returns a boolean if a field has been set. -func (o *CreateSubscriptionRequestBody) HasSubscription() bool { - if o != nil && o.Subscription != nil { - return true - } - - return false -} - -// SetSubscription gets a reference to the given SubscriptionObject and assigns it to the Subscription field. -func (o *CreateSubscriptionRequestBody) SetSubscription(v SubscriptionObject) { - o.Subscription = &v -} - -// GetRetainPreviousOwner returns the RetainPreviousOwner field value if set, zero value otherwise. -func (o *CreateSubscriptionRequestBody) GetRetainPreviousOwner() bool { - if o == nil || o.RetainPreviousOwner == nil { - var ret bool - return ret - } - return *o.RetainPreviousOwner -} - -// GetRetainPreviousOwnerOk returns a tuple with the RetainPreviousOwner field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateSubscriptionRequestBody) GetRetainPreviousOwnerOk() (*bool, bool) { - if o == nil || o.RetainPreviousOwner == nil { - return nil, false - } - return o.RetainPreviousOwner, true -} - -// HasRetainPreviousOwner returns a boolean if a field has been set. -func (o *CreateSubscriptionRequestBody) HasRetainPreviousOwner() bool { - if o != nil && o.RetainPreviousOwner != nil { - return true - } - - return false -} - -// SetRetainPreviousOwner gets a reference to the given bool and assigns it to the RetainPreviousOwner field. -func (o *CreateSubscriptionRequestBody) SetRetainPreviousOwner(v bool) { - o.RetainPreviousOwner = &v -} - -func (o CreateSubscriptionRequestBody) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Subscription != nil { - toSerialize["subscription"] = o.Subscription - } - if o.RetainPreviousOwner != nil { - toSerialize["retain_previous_owner"] = o.RetainPreviousOwner - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return json.Marshal(toSerialize) -} - -func (o *CreateSubscriptionRequestBody) UnmarshalJSON(bytes []byte) (err error) { - varCreateSubscriptionRequestBody := _CreateSubscriptionRequestBody{} - - if err = json.Unmarshal(bytes, &varCreateSubscriptionRequestBody); err == nil { - *o = CreateSubscriptionRequestBody(varCreateSubscriptionRequestBody) - } - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { - delete(additionalProperties, "subscription") - delete(additionalProperties, "retain_previous_owner") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableCreateSubscriptionRequestBody struct { - value *CreateSubscriptionRequestBody - isSet bool -} - -func (v NullableCreateSubscriptionRequestBody) Get() *CreateSubscriptionRequestBody { - return v.value -} - -func (v *NullableCreateSubscriptionRequestBody) Set(val *CreateSubscriptionRequestBody) { - v.value = val - v.isSet = true -} - -func (v NullableCreateSubscriptionRequestBody) IsSet() bool { - return v.isSet -} - -func (v *NullableCreateSubscriptionRequestBody) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCreateSubscriptionRequestBody(val *CreateSubscriptionRequestBody) *NullableCreateSubscriptionRequestBody { - return &NullableCreateSubscriptionRequestBody{value: val, isSet: true} -} - -func (v NullableCreateSubscriptionRequestBody) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCreateSubscriptionRequestBody) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_create_user_conflict_response.go b/model_create_user_conflict_response.go index dfa3006..d6d1928 100644 --- a/model_create_user_conflict_response.go +++ b/model_create_user_conflict_response.go @@ -3,7 +3,7 @@ OneSignal A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com -API version: 1.4.0 +API version: 5.0.1 Contact: devrel@onesignal.com */ diff --git a/model_create_user_conflict_response_errors_inner.go b/model_create_user_conflict_response_errors_inner.go index ecafd07..d580852 100644 --- a/model_create_user_conflict_response_errors_inner.go +++ b/model_create_user_conflict_response_errors_inner.go @@ -3,7 +3,7 @@ OneSignal A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com -API version: 1.4.0 +API version: 5.0.1 Contact: devrel@onesignal.com */ diff --git a/model_create_user_conflict_response_errors_items_meta.go b/model_create_user_conflict_response_errors_items_meta.go index 4af2d8c..82ee06b 100644 --- a/model_create_user_conflict_response_errors_items_meta.go +++ b/model_create_user_conflict_response_errors_items_meta.go @@ -3,7 +3,7 @@ OneSignal A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com -API version: 1.4.0 +API version: 5.0.1 Contact: devrel@onesignal.com */ diff --git a/model_delete_player_not_found_response.go b/model_delete_player_not_found_response.go deleted file mode 100644 index 6fd7864..0000000 --- a/model_delete_player_not_found_response.go +++ /dev/null @@ -1,141 +0,0 @@ -/* -OneSignal - -A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com - -API version: 1.4.0 -Contact: devrel@onesignal.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onesignal - -import ( - "encoding/json" -) - -// DeletePlayerNotFoundResponse struct for DeletePlayerNotFoundResponse -type DeletePlayerNotFoundResponse struct { - Success *bool `json:"success,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _DeletePlayerNotFoundResponse DeletePlayerNotFoundResponse - -// NewDeletePlayerNotFoundResponse instantiates a new DeletePlayerNotFoundResponse object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewDeletePlayerNotFoundResponse() *DeletePlayerNotFoundResponse { - this := DeletePlayerNotFoundResponse{} - return &this -} - -// NewDeletePlayerNotFoundResponseWithDefaults instantiates a new DeletePlayerNotFoundResponse object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewDeletePlayerNotFoundResponseWithDefaults() *DeletePlayerNotFoundResponse { - this := DeletePlayerNotFoundResponse{} - return &this -} - -// GetSuccess returns the Success field value if set, zero value otherwise. -func (o *DeletePlayerNotFoundResponse) GetSuccess() bool { - if o == nil || o.Success == nil { - var ret bool - return ret - } - return *o.Success -} - -// GetSuccessOk returns a tuple with the Success field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *DeletePlayerNotFoundResponse) GetSuccessOk() (*bool, bool) { - if o == nil || o.Success == nil { - return nil, false - } - return o.Success, true -} - -// HasSuccess returns a boolean if a field has been set. -func (o *DeletePlayerNotFoundResponse) HasSuccess() bool { - if o != nil && o.Success != nil { - return true - } - - return false -} - -// SetSuccess gets a reference to the given bool and assigns it to the Success field. -func (o *DeletePlayerNotFoundResponse) SetSuccess(v bool) { - o.Success = &v -} - -func (o DeletePlayerNotFoundResponse) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Success != nil { - toSerialize["success"] = o.Success - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return json.Marshal(toSerialize) -} - -func (o *DeletePlayerNotFoundResponse) UnmarshalJSON(bytes []byte) (err error) { - varDeletePlayerNotFoundResponse := _DeletePlayerNotFoundResponse{} - - if err = json.Unmarshal(bytes, &varDeletePlayerNotFoundResponse); err == nil { - *o = DeletePlayerNotFoundResponse(varDeletePlayerNotFoundResponse) - } - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { - delete(additionalProperties, "success") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableDeletePlayerNotFoundResponse struct { - value *DeletePlayerNotFoundResponse - isSet bool -} - -func (v NullableDeletePlayerNotFoundResponse) Get() *DeletePlayerNotFoundResponse { - return v.value -} - -func (v *NullableDeletePlayerNotFoundResponse) Set(val *DeletePlayerNotFoundResponse) { - v.value = val - v.isSet = true -} - -func (v NullableDeletePlayerNotFoundResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableDeletePlayerNotFoundResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableDeletePlayerNotFoundResponse(val *DeletePlayerNotFoundResponse) *NullableDeletePlayerNotFoundResponse { - return &NullableDeletePlayerNotFoundResponse{value: val, isSet: true} -} - -func (v NullableDeletePlayerNotFoundResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableDeletePlayerNotFoundResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_delete_segment_not_found_response.go b/model_delete_segment_not_found_response.go deleted file mode 100644 index d8a56b4..0000000 --- a/model_delete_segment_not_found_response.go +++ /dev/null @@ -1,141 +0,0 @@ -/* -OneSignal - -A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com - -API version: 1.4.0 -Contact: devrel@onesignal.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onesignal - -import ( - "encoding/json" -) - -// DeleteSegmentNotFoundResponse struct for DeleteSegmentNotFoundResponse -type DeleteSegmentNotFoundResponse struct { - Success *bool `json:"success,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _DeleteSegmentNotFoundResponse DeleteSegmentNotFoundResponse - -// NewDeleteSegmentNotFoundResponse instantiates a new DeleteSegmentNotFoundResponse object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewDeleteSegmentNotFoundResponse() *DeleteSegmentNotFoundResponse { - this := DeleteSegmentNotFoundResponse{} - return &this -} - -// NewDeleteSegmentNotFoundResponseWithDefaults instantiates a new DeleteSegmentNotFoundResponse object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewDeleteSegmentNotFoundResponseWithDefaults() *DeleteSegmentNotFoundResponse { - this := DeleteSegmentNotFoundResponse{} - return &this -} - -// GetSuccess returns the Success field value if set, zero value otherwise. -func (o *DeleteSegmentNotFoundResponse) GetSuccess() bool { - if o == nil || o.Success == nil { - var ret bool - return ret - } - return *o.Success -} - -// GetSuccessOk returns a tuple with the Success field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *DeleteSegmentNotFoundResponse) GetSuccessOk() (*bool, bool) { - if o == nil || o.Success == nil { - return nil, false - } - return o.Success, true -} - -// HasSuccess returns a boolean if a field has been set. -func (o *DeleteSegmentNotFoundResponse) HasSuccess() bool { - if o != nil && o.Success != nil { - return true - } - - return false -} - -// SetSuccess gets a reference to the given bool and assigns it to the Success field. -func (o *DeleteSegmentNotFoundResponse) SetSuccess(v bool) { - o.Success = &v -} - -func (o DeleteSegmentNotFoundResponse) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Success != nil { - toSerialize["success"] = o.Success - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return json.Marshal(toSerialize) -} - -func (o *DeleteSegmentNotFoundResponse) UnmarshalJSON(bytes []byte) (err error) { - varDeleteSegmentNotFoundResponse := _DeleteSegmentNotFoundResponse{} - - if err = json.Unmarshal(bytes, &varDeleteSegmentNotFoundResponse); err == nil { - *o = DeleteSegmentNotFoundResponse(varDeleteSegmentNotFoundResponse) - } - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { - delete(additionalProperties, "success") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableDeleteSegmentNotFoundResponse struct { - value *DeleteSegmentNotFoundResponse - isSet bool -} - -func (v NullableDeleteSegmentNotFoundResponse) Get() *DeleteSegmentNotFoundResponse { - return v.value -} - -func (v *NullableDeleteSegmentNotFoundResponse) Set(val *DeleteSegmentNotFoundResponse) { - v.value = val - v.isSet = true -} - -func (v NullableDeleteSegmentNotFoundResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableDeleteSegmentNotFoundResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableDeleteSegmentNotFoundResponse(val *DeleteSegmentNotFoundResponse) *NullableDeleteSegmentNotFoundResponse { - return &NullableDeleteSegmentNotFoundResponse{value: val, isSet: true} -} - -func (v NullableDeleteSegmentNotFoundResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableDeleteSegmentNotFoundResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_delete_segment_success_response.go b/model_delete_segment_success_response.go deleted file mode 100644 index 3df6fcd..0000000 --- a/model_delete_segment_success_response.go +++ /dev/null @@ -1,141 +0,0 @@ -/* -OneSignal - -A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com - -API version: 1.4.0 -Contact: devrel@onesignal.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onesignal - -import ( - "encoding/json" -) - -// DeleteSegmentSuccessResponse struct for DeleteSegmentSuccessResponse -type DeleteSegmentSuccessResponse struct { - Success *bool `json:"success,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _DeleteSegmentSuccessResponse DeleteSegmentSuccessResponse - -// NewDeleteSegmentSuccessResponse instantiates a new DeleteSegmentSuccessResponse object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewDeleteSegmentSuccessResponse() *DeleteSegmentSuccessResponse { - this := DeleteSegmentSuccessResponse{} - return &this -} - -// NewDeleteSegmentSuccessResponseWithDefaults instantiates a new DeleteSegmentSuccessResponse object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewDeleteSegmentSuccessResponseWithDefaults() *DeleteSegmentSuccessResponse { - this := DeleteSegmentSuccessResponse{} - return &this -} - -// GetSuccess returns the Success field value if set, zero value otherwise. -func (o *DeleteSegmentSuccessResponse) GetSuccess() bool { - if o == nil || o.Success == nil { - var ret bool - return ret - } - return *o.Success -} - -// GetSuccessOk returns a tuple with the Success field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *DeleteSegmentSuccessResponse) GetSuccessOk() (*bool, bool) { - if o == nil || o.Success == nil { - return nil, false - } - return o.Success, true -} - -// HasSuccess returns a boolean if a field has been set. -func (o *DeleteSegmentSuccessResponse) HasSuccess() bool { - if o != nil && o.Success != nil { - return true - } - - return false -} - -// SetSuccess gets a reference to the given bool and assigns it to the Success field. -func (o *DeleteSegmentSuccessResponse) SetSuccess(v bool) { - o.Success = &v -} - -func (o DeleteSegmentSuccessResponse) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Success != nil { - toSerialize["success"] = o.Success - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return json.Marshal(toSerialize) -} - -func (o *DeleteSegmentSuccessResponse) UnmarshalJSON(bytes []byte) (err error) { - varDeleteSegmentSuccessResponse := _DeleteSegmentSuccessResponse{} - - if err = json.Unmarshal(bytes, &varDeleteSegmentSuccessResponse); err == nil { - *o = DeleteSegmentSuccessResponse(varDeleteSegmentSuccessResponse) - } - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { - delete(additionalProperties, "success") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableDeleteSegmentSuccessResponse struct { - value *DeleteSegmentSuccessResponse - isSet bool -} - -func (v NullableDeleteSegmentSuccessResponse) Get() *DeleteSegmentSuccessResponse { - return v.value -} - -func (v *NullableDeleteSegmentSuccessResponse) Set(val *DeleteSegmentSuccessResponse) { - v.value = val - v.isSet = true -} - -func (v NullableDeleteSegmentSuccessResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableDeleteSegmentSuccessResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableDeleteSegmentSuccessResponse(val *DeleteSegmentSuccessResponse) *NullableDeleteSegmentSuccessResponse { - return &NullableDeleteSegmentSuccessResponse{value: val, isSet: true} -} - -func (v NullableDeleteSegmentSuccessResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableDeleteSegmentSuccessResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_delivery_data.go b/model_delivery_data.go index bebca3e..fdd1a9d 100644 --- a/model_delivery_data.go +++ b/model_delivery_data.go @@ -3,7 +3,7 @@ OneSignal A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com -API version: 1.4.0 +API version: 5.0.1 Contact: devrel@onesignal.com */ diff --git a/model_export_events_success_response.go b/model_export_events_success_response.go index 89cfa0b..394130b 100644 --- a/model_export_events_success_response.go +++ b/model_export_events_success_response.go @@ -3,7 +3,7 @@ OneSignal A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com -API version: 1.4.0 +API version: 5.0.1 Contact: devrel@onesignal.com */ diff --git a/model_export_players_success_response.go b/model_export_players_success_response.go deleted file mode 100644 index 9cc8029..0000000 --- a/model_export_players_success_response.go +++ /dev/null @@ -1,141 +0,0 @@ -/* -OneSignal - -A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com - -API version: 1.4.0 -Contact: devrel@onesignal.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onesignal - -import ( - "encoding/json" -) - -// ExportPlayersSuccessResponse struct for ExportPlayersSuccessResponse -type ExportPlayersSuccessResponse struct { - CsvFileUrl *string `json:"csv_file_url,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _ExportPlayersSuccessResponse ExportPlayersSuccessResponse - -// NewExportPlayersSuccessResponse instantiates a new ExportPlayersSuccessResponse object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewExportPlayersSuccessResponse() *ExportPlayersSuccessResponse { - this := ExportPlayersSuccessResponse{} - return &this -} - -// NewExportPlayersSuccessResponseWithDefaults instantiates a new ExportPlayersSuccessResponse object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewExportPlayersSuccessResponseWithDefaults() *ExportPlayersSuccessResponse { - this := ExportPlayersSuccessResponse{} - return &this -} - -// GetCsvFileUrl returns the CsvFileUrl field value if set, zero value otherwise. -func (o *ExportPlayersSuccessResponse) GetCsvFileUrl() string { - if o == nil || o.CsvFileUrl == nil { - var ret string - return ret - } - return *o.CsvFileUrl -} - -// GetCsvFileUrlOk returns a tuple with the CsvFileUrl field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ExportPlayersSuccessResponse) GetCsvFileUrlOk() (*string, bool) { - if o == nil || o.CsvFileUrl == nil { - return nil, false - } - return o.CsvFileUrl, true -} - -// HasCsvFileUrl returns a boolean if a field has been set. -func (o *ExportPlayersSuccessResponse) HasCsvFileUrl() bool { - if o != nil && o.CsvFileUrl != nil { - return true - } - - return false -} - -// SetCsvFileUrl gets a reference to the given string and assigns it to the CsvFileUrl field. -func (o *ExportPlayersSuccessResponse) SetCsvFileUrl(v string) { - o.CsvFileUrl = &v -} - -func (o ExportPlayersSuccessResponse) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.CsvFileUrl != nil { - toSerialize["csv_file_url"] = o.CsvFileUrl - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return json.Marshal(toSerialize) -} - -func (o *ExportPlayersSuccessResponse) UnmarshalJSON(bytes []byte) (err error) { - varExportPlayersSuccessResponse := _ExportPlayersSuccessResponse{} - - if err = json.Unmarshal(bytes, &varExportPlayersSuccessResponse); err == nil { - *o = ExportPlayersSuccessResponse(varExportPlayersSuccessResponse) - } - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { - delete(additionalProperties, "csv_file_url") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableExportPlayersSuccessResponse struct { - value *ExportPlayersSuccessResponse - isSet bool -} - -func (v NullableExportPlayersSuccessResponse) Get() *ExportPlayersSuccessResponse { - return v.value -} - -func (v *NullableExportPlayersSuccessResponse) Set(val *ExportPlayersSuccessResponse) { - v.value = val - v.isSet = true -} - -func (v NullableExportPlayersSuccessResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableExportPlayersSuccessResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableExportPlayersSuccessResponse(val *ExportPlayersSuccessResponse) *NullableExportPlayersSuccessResponse { - return &NullableExportPlayersSuccessResponse{value: val, isSet: true} -} - -func (v NullableExportPlayersSuccessResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableExportPlayersSuccessResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_export_players_request_body.go b/model_export_subscriptions_request_body.go similarity index 62% rename from model_export_players_request_body.go rename to model_export_subscriptions_request_body.go index 0d0dc80..fef290f 100644 --- a/model_export_players_request_body.go +++ b/model_export_subscriptions_request_body.go @@ -3,7 +3,7 @@ OneSignal A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com -API version: 1.4.0 +API version: 5.0.1 Contact: devrel@onesignal.com */ @@ -15,8 +15,8 @@ import ( "encoding/json" ) -// ExportPlayersRequestBody struct for ExportPlayersRequestBody -type ExportPlayersRequestBody struct { +// ExportSubscriptionsRequestBody struct for ExportSubscriptionsRequestBody +type ExportSubscriptionsRequestBody struct { // Additional fields that you wish to include. Currently supports location, country, rooted, notification_types, ip, external_user_id, web_auth, and web_p256. ExtraFields []string `json:"extra_fields,omitempty"` // Export all devices with a last_active timestamp greater than this time. Unixtime in seconds. @@ -26,27 +26,27 @@ type ExportPlayersRequestBody struct { AdditionalProperties map[string]interface{} } -type _ExportPlayersRequestBody ExportPlayersRequestBody +type _ExportSubscriptionsRequestBody ExportSubscriptionsRequestBody -// NewExportPlayersRequestBody instantiates a new ExportPlayersRequestBody object +// NewExportSubscriptionsRequestBody instantiates a new ExportSubscriptionsRequestBody object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewExportPlayersRequestBody() *ExportPlayersRequestBody { - this := ExportPlayersRequestBody{} +func NewExportSubscriptionsRequestBody() *ExportSubscriptionsRequestBody { + this := ExportSubscriptionsRequestBody{} return &this } -// NewExportPlayersRequestBodyWithDefaults instantiates a new ExportPlayersRequestBody object +// NewExportSubscriptionsRequestBodyWithDefaults instantiates a new ExportSubscriptionsRequestBody object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set -func NewExportPlayersRequestBodyWithDefaults() *ExportPlayersRequestBody { - this := ExportPlayersRequestBody{} +func NewExportSubscriptionsRequestBodyWithDefaults() *ExportSubscriptionsRequestBody { + this := ExportSubscriptionsRequestBody{} return &this } // GetExtraFields returns the ExtraFields field value if set, zero value otherwise. -func (o *ExportPlayersRequestBody) GetExtraFields() []string { +func (o *ExportSubscriptionsRequestBody) GetExtraFields() []string { if o == nil || o.ExtraFields == nil { var ret []string return ret @@ -56,7 +56,7 @@ func (o *ExportPlayersRequestBody) GetExtraFields() []string { // GetExtraFieldsOk returns a tuple with the ExtraFields field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ExportPlayersRequestBody) GetExtraFieldsOk() ([]string, bool) { +func (o *ExportSubscriptionsRequestBody) GetExtraFieldsOk() ([]string, bool) { if o == nil || o.ExtraFields == nil { return nil, false } @@ -64,7 +64,7 @@ func (o *ExportPlayersRequestBody) GetExtraFieldsOk() ([]string, bool) { } // HasExtraFields returns a boolean if a field has been set. -func (o *ExportPlayersRequestBody) HasExtraFields() bool { +func (o *ExportSubscriptionsRequestBody) HasExtraFields() bool { if o != nil && o.ExtraFields != nil { return true } @@ -73,12 +73,12 @@ func (o *ExportPlayersRequestBody) HasExtraFields() bool { } // SetExtraFields gets a reference to the given []string and assigns it to the ExtraFields field. -func (o *ExportPlayersRequestBody) SetExtraFields(v []string) { +func (o *ExportSubscriptionsRequestBody) SetExtraFields(v []string) { o.ExtraFields = v } // GetLastActiveSince returns the LastActiveSince field value if set, zero value otherwise. -func (o *ExportPlayersRequestBody) GetLastActiveSince() string { +func (o *ExportSubscriptionsRequestBody) GetLastActiveSince() string { if o == nil || o.LastActiveSince == nil { var ret string return ret @@ -88,7 +88,7 @@ func (o *ExportPlayersRequestBody) GetLastActiveSince() string { // GetLastActiveSinceOk returns a tuple with the LastActiveSince field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ExportPlayersRequestBody) GetLastActiveSinceOk() (*string, bool) { +func (o *ExportSubscriptionsRequestBody) GetLastActiveSinceOk() (*string, bool) { if o == nil || o.LastActiveSince == nil { return nil, false } @@ -96,7 +96,7 @@ func (o *ExportPlayersRequestBody) GetLastActiveSinceOk() (*string, bool) { } // HasLastActiveSince returns a boolean if a field has been set. -func (o *ExportPlayersRequestBody) HasLastActiveSince() bool { +func (o *ExportSubscriptionsRequestBody) HasLastActiveSince() bool { if o != nil && o.LastActiveSince != nil { return true } @@ -105,12 +105,12 @@ func (o *ExportPlayersRequestBody) HasLastActiveSince() bool { } // SetLastActiveSince gets a reference to the given string and assigns it to the LastActiveSince field. -func (o *ExportPlayersRequestBody) SetLastActiveSince(v string) { +func (o *ExportSubscriptionsRequestBody) SetLastActiveSince(v string) { o.LastActiveSince = &v } // GetSegmentName returns the SegmentName field value if set, zero value otherwise. -func (o *ExportPlayersRequestBody) GetSegmentName() string { +func (o *ExportSubscriptionsRequestBody) GetSegmentName() string { if o == nil || o.SegmentName == nil { var ret string return ret @@ -120,7 +120,7 @@ func (o *ExportPlayersRequestBody) GetSegmentName() string { // GetSegmentNameOk returns a tuple with the SegmentName field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ExportPlayersRequestBody) GetSegmentNameOk() (*string, bool) { +func (o *ExportSubscriptionsRequestBody) GetSegmentNameOk() (*string, bool) { if o == nil || o.SegmentName == nil { return nil, false } @@ -128,7 +128,7 @@ func (o *ExportPlayersRequestBody) GetSegmentNameOk() (*string, bool) { } // HasSegmentName returns a boolean if a field has been set. -func (o *ExportPlayersRequestBody) HasSegmentName() bool { +func (o *ExportSubscriptionsRequestBody) HasSegmentName() bool { if o != nil && o.SegmentName != nil { return true } @@ -137,11 +137,11 @@ func (o *ExportPlayersRequestBody) HasSegmentName() bool { } // SetSegmentName gets a reference to the given string and assigns it to the SegmentName field. -func (o *ExportPlayersRequestBody) SetSegmentName(v string) { +func (o *ExportSubscriptionsRequestBody) SetSegmentName(v string) { o.SegmentName = &v } -func (o ExportPlayersRequestBody) MarshalJSON() ([]byte, error) { +func (o ExportSubscriptionsRequestBody) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.ExtraFields != nil { toSerialize["extra_fields"] = o.ExtraFields @@ -160,11 +160,11 @@ func (o ExportPlayersRequestBody) MarshalJSON() ([]byte, error) { return json.Marshal(toSerialize) } -func (o *ExportPlayersRequestBody) UnmarshalJSON(bytes []byte) (err error) { - varExportPlayersRequestBody := _ExportPlayersRequestBody{} +func (o *ExportSubscriptionsRequestBody) UnmarshalJSON(bytes []byte) (err error) { + varExportSubscriptionsRequestBody := _ExportSubscriptionsRequestBody{} - if err = json.Unmarshal(bytes, &varExportPlayersRequestBody); err == nil { - *o = ExportPlayersRequestBody(varExportPlayersRequestBody) + if err = json.Unmarshal(bytes, &varExportSubscriptionsRequestBody); err == nil { + *o = ExportSubscriptionsRequestBody(varExportSubscriptionsRequestBody) } additionalProperties := make(map[string]interface{}) @@ -179,38 +179,38 @@ func (o *ExportPlayersRequestBody) UnmarshalJSON(bytes []byte) (err error) { return err } -type NullableExportPlayersRequestBody struct { - value *ExportPlayersRequestBody +type NullableExportSubscriptionsRequestBody struct { + value *ExportSubscriptionsRequestBody isSet bool } -func (v NullableExportPlayersRequestBody) Get() *ExportPlayersRequestBody { +func (v NullableExportSubscriptionsRequestBody) Get() *ExportSubscriptionsRequestBody { return v.value } -func (v *NullableExportPlayersRequestBody) Set(val *ExportPlayersRequestBody) { +func (v *NullableExportSubscriptionsRequestBody) Set(val *ExportSubscriptionsRequestBody) { v.value = val v.isSet = true } -func (v NullableExportPlayersRequestBody) IsSet() bool { +func (v NullableExportSubscriptionsRequestBody) IsSet() bool { return v.isSet } -func (v *NullableExportPlayersRequestBody) Unset() { +func (v *NullableExportSubscriptionsRequestBody) Unset() { v.value = nil v.isSet = false } -func NewNullableExportPlayersRequestBody(val *ExportPlayersRequestBody) *NullableExportPlayersRequestBody { - return &NullableExportPlayersRequestBody{value: val, isSet: true} +func NewNullableExportSubscriptionsRequestBody(val *ExportSubscriptionsRequestBody) *NullableExportSubscriptionsRequestBody { + return &NullableExportSubscriptionsRequestBody{value: val, isSet: true} } -func (v NullableExportPlayersRequestBody) MarshalJSON() ([]byte, error) { +func (v NullableExportSubscriptionsRequestBody) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } -func (v *NullableExportPlayersRequestBody) UnmarshalJSON(src []byte) error { +func (v *NullableExportSubscriptionsRequestBody) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } diff --git a/model_export_subscriptions_success_response.go b/model_export_subscriptions_success_response.go new file mode 100644 index 0000000..bf0c544 --- /dev/null +++ b/model_export_subscriptions_success_response.go @@ -0,0 +1,141 @@ +/* +OneSignal + +A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com + +API version: 5.0.1 +Contact: devrel@onesignal.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onesignal + +import ( + "encoding/json" +) + +// ExportSubscriptionsSuccessResponse struct for ExportSubscriptionsSuccessResponse +type ExportSubscriptionsSuccessResponse struct { + CsvFileUrl *string `json:"csv_file_url,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _ExportSubscriptionsSuccessResponse ExportSubscriptionsSuccessResponse + +// NewExportSubscriptionsSuccessResponse instantiates a new ExportSubscriptionsSuccessResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewExportSubscriptionsSuccessResponse() *ExportSubscriptionsSuccessResponse { + this := ExportSubscriptionsSuccessResponse{} + return &this +} + +// NewExportSubscriptionsSuccessResponseWithDefaults instantiates a new ExportSubscriptionsSuccessResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewExportSubscriptionsSuccessResponseWithDefaults() *ExportSubscriptionsSuccessResponse { + this := ExportSubscriptionsSuccessResponse{} + return &this +} + +// GetCsvFileUrl returns the CsvFileUrl field value if set, zero value otherwise. +func (o *ExportSubscriptionsSuccessResponse) GetCsvFileUrl() string { + if o == nil || o.CsvFileUrl == nil { + var ret string + return ret + } + return *o.CsvFileUrl +} + +// GetCsvFileUrlOk returns a tuple with the CsvFileUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExportSubscriptionsSuccessResponse) GetCsvFileUrlOk() (*string, bool) { + if o == nil || o.CsvFileUrl == nil { + return nil, false + } + return o.CsvFileUrl, true +} + +// HasCsvFileUrl returns a boolean if a field has been set. +func (o *ExportSubscriptionsSuccessResponse) HasCsvFileUrl() bool { + if o != nil && o.CsvFileUrl != nil { + return true + } + + return false +} + +// SetCsvFileUrl gets a reference to the given string and assigns it to the CsvFileUrl field. +func (o *ExportSubscriptionsSuccessResponse) SetCsvFileUrl(v string) { + o.CsvFileUrl = &v +} + +func (o ExportSubscriptionsSuccessResponse) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.CsvFileUrl != nil { + toSerialize["csv_file_url"] = o.CsvFileUrl + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return json.Marshal(toSerialize) +} + +func (o *ExportSubscriptionsSuccessResponse) UnmarshalJSON(bytes []byte) (err error) { + varExportSubscriptionsSuccessResponse := _ExportSubscriptionsSuccessResponse{} + + if err = json.Unmarshal(bytes, &varExportSubscriptionsSuccessResponse); err == nil { + *o = ExportSubscriptionsSuccessResponse(varExportSubscriptionsSuccessResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "csv_file_url") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableExportSubscriptionsSuccessResponse struct { + value *ExportSubscriptionsSuccessResponse + isSet bool +} + +func (v NullableExportSubscriptionsSuccessResponse) Get() *ExportSubscriptionsSuccessResponse { + return v.value +} + +func (v *NullableExportSubscriptionsSuccessResponse) Set(val *ExportSubscriptionsSuccessResponse) { + v.value = val + v.isSet = true +} + +func (v NullableExportSubscriptionsSuccessResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableExportSubscriptionsSuccessResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExportSubscriptionsSuccessResponse(val *ExportSubscriptionsSuccessResponse) *NullableExportSubscriptionsSuccessResponse { + return &NullableExportSubscriptionsSuccessResponse{value: val, isSet: true} +} + +func (v NullableExportSubscriptionsSuccessResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExportSubscriptionsSuccessResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_filter.go b/model_filter.go index ace4606..08f575a 100644 --- a/model_filter.go +++ b/model_filter.go @@ -3,7 +3,7 @@ OneSignal A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com -API version: 1.4.0 +API version: 5.0.1 Contact: devrel@onesignal.com */ @@ -17,14 +17,22 @@ import ( // Filter struct for Filter type Filter struct { - // Name of the field to use as the first operand in the filter expression. - Field string `json:"field"` + // Required. Name of the field to use as the first operand in the filter expression. + Field *string `json:"field,omitempty"` // If `field` is `tag`, this field is *required* to specify `key` inside the tags. Key *string `json:"key,omitempty"` // Constant value to use as the second operand in the filter expression. This value is *required* when the relation operator is a binary operator. Value *string `json:"value,omitempty"` - // Operator of a filter expression. - Relation string `json:"relation"` + // If `field` is session-related, this is *required* to specify the number of hours before or after the user's session. + HoursAgo *string `json:"hours_ago,omitempty"` + // If `field` is `location`, this will specify the radius in meters from a provided location point. Use with `lat` and `long`. + Radius *float32 `json:"radius,omitempty"` + // If `field` is `location`, this is *required* to specify the user's latitude. + Lat *float32 `json:"lat,omitempty"` + // If `field` is `location`, this is *required* to specify the user's longitude. + Long *float32 `json:"long,omitempty"` + // Required. Operator of a filter expression. + Relation *string `json:"relation,omitempty"` AdditionalProperties map[string]interface{} } @@ -34,10 +42,8 @@ type _Filter Filter // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewFilter(field string, relation string) *Filter { +func NewFilter() *Filter { this := Filter{} - this.Field = field - this.Relation = relation return &this } @@ -49,28 +55,36 @@ func NewFilterWithDefaults() *Filter { return &this } -// GetField returns the Field field value +// GetField returns the Field field value if set, zero value otherwise. func (o *Filter) GetField() string { - if o == nil { + if o == nil || o.Field == nil { var ret string return ret } - - return o.Field + return *o.Field } -// GetFieldOk returns a tuple with the Field field value +// GetFieldOk returns a tuple with the Field field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Filter) GetFieldOk() (*string, bool) { - if o == nil { + if o == nil || o.Field == nil { return nil, false } - return &o.Field, true + return o.Field, true } -// SetField sets field value +// HasField returns a boolean if a field has been set. +func (o *Filter) HasField() bool { + if o != nil && o.Field != nil { + return true + } + + return false +} + +// SetField gets a reference to the given string and assigns it to the Field field. func (o *Filter) SetField(v string) { - o.Field = v + o.Field = &v } // GetKey returns the Key field value if set, zero value otherwise. @@ -137,33 +151,169 @@ func (o *Filter) SetValue(v string) { o.Value = &v } -// GetRelation returns the Relation field value -func (o *Filter) GetRelation() string { - if o == nil { +// GetHoursAgo returns the HoursAgo field value if set, zero value otherwise. +func (o *Filter) GetHoursAgo() string { + if o == nil || o.HoursAgo == nil { var ret string return ret } + return *o.HoursAgo +} + +// GetHoursAgoOk returns a tuple with the HoursAgo field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Filter) GetHoursAgoOk() (*string, bool) { + if o == nil || o.HoursAgo == nil { + return nil, false + } + return o.HoursAgo, true +} + +// HasHoursAgo returns a boolean if a field has been set. +func (o *Filter) HasHoursAgo() bool { + if o != nil && o.HoursAgo != nil { + return true + } + + return false +} + +// SetHoursAgo gets a reference to the given string and assigns it to the HoursAgo field. +func (o *Filter) SetHoursAgo(v string) { + o.HoursAgo = &v +} + +// GetRadius returns the Radius field value if set, zero value otherwise. +func (o *Filter) GetRadius() float32 { + if o == nil || o.Radius == nil { + var ret float32 + return ret + } + return *o.Radius +} + +// GetRadiusOk returns a tuple with the Radius field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Filter) GetRadiusOk() (*float32, bool) { + if o == nil || o.Radius == nil { + return nil, false + } + return o.Radius, true +} + +// HasRadius returns a boolean if a field has been set. +func (o *Filter) HasRadius() bool { + if o != nil && o.Radius != nil { + return true + } + + return false +} - return o.Relation +// SetRadius gets a reference to the given float32 and assigns it to the Radius field. +func (o *Filter) SetRadius(v float32) { + o.Radius = &v } -// GetRelationOk returns a tuple with the Relation field value +// GetLat returns the Lat field value if set, zero value otherwise. +func (o *Filter) GetLat() float32 { + if o == nil || o.Lat == nil { + var ret float32 + return ret + } + return *o.Lat +} + +// GetLatOk returns a tuple with the Lat field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Filter) GetLatOk() (*float32, bool) { + if o == nil || o.Lat == nil { + return nil, false + } + return o.Lat, true +} + +// HasLat returns a boolean if a field has been set. +func (o *Filter) HasLat() bool { + if o != nil && o.Lat != nil { + return true + } + + return false +} + +// SetLat gets a reference to the given float32 and assigns it to the Lat field. +func (o *Filter) SetLat(v float32) { + o.Lat = &v +} + +// GetLong returns the Long field value if set, zero value otherwise. +func (o *Filter) GetLong() float32 { + if o == nil || o.Long == nil { + var ret float32 + return ret + } + return *o.Long +} + +// GetLongOk returns a tuple with the Long field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Filter) GetLongOk() (*float32, bool) { + if o == nil || o.Long == nil { + return nil, false + } + return o.Long, true +} + +// HasLong returns a boolean if a field has been set. +func (o *Filter) HasLong() bool { + if o != nil && o.Long != nil { + return true + } + + return false +} + +// SetLong gets a reference to the given float32 and assigns it to the Long field. +func (o *Filter) SetLong(v float32) { + o.Long = &v +} + +// GetRelation returns the Relation field value if set, zero value otherwise. +func (o *Filter) GetRelation() string { + if o == nil || o.Relation == nil { + var ret string + return ret + } + return *o.Relation +} + +// GetRelationOk returns a tuple with the Relation field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Filter) GetRelationOk() (*string, bool) { - if o == nil { + if o == nil || o.Relation == nil { return nil, false } - return &o.Relation, true + return o.Relation, true } -// SetRelation sets field value +// HasRelation returns a boolean if a field has been set. +func (o *Filter) HasRelation() bool { + if o != nil && o.Relation != nil { + return true + } + + return false +} + +// SetRelation gets a reference to the given string and assigns it to the Relation field. func (o *Filter) SetRelation(v string) { - o.Relation = v + o.Relation = &v } func (o Filter) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if true { + if o.Field != nil { toSerialize["field"] = o.Field } if o.Key != nil { @@ -172,7 +322,19 @@ func (o Filter) MarshalJSON() ([]byte, error) { if o.Value != nil { toSerialize["value"] = o.Value } - if true { + if o.HoursAgo != nil { + toSerialize["hours_ago"] = o.HoursAgo + } + if o.Radius != nil { + toSerialize["radius"] = o.Radius + } + if o.Lat != nil { + toSerialize["lat"] = o.Lat + } + if o.Long != nil { + toSerialize["long"] = o.Long + } + if o.Relation != nil { toSerialize["relation"] = o.Relation } @@ -196,6 +358,10 @@ func (o *Filter) UnmarshalJSON(bytes []byte) (err error) { delete(additionalProperties, "field") delete(additionalProperties, "key") delete(additionalProperties, "value") + delete(additionalProperties, "hours_ago") + delete(additionalProperties, "radius") + delete(additionalProperties, "lat") + delete(additionalProperties, "long") delete(additionalProperties, "relation") o.AdditionalProperties = additionalProperties } diff --git a/model_filter_expression.go b/model_filter_expression.go new file mode 100644 index 0000000..1914b90 --- /dev/null +++ b/model_filter_expression.go @@ -0,0 +1,149 @@ +/* +OneSignal + +A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com + +API version: 5.0.1 +Contact: devrel@onesignal.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onesignal + +import ( + "encoding/json" + "fmt" +) + +// FilterExpression - struct for FilterExpression +type FilterExpression struct { + Filter *Filter + Operator *Operator +} + +// FilterAsFilterExpression is a convenience function that returns Filter wrapped in FilterExpression +func FilterAsFilterExpression(v *Filter) FilterExpression { + return FilterExpression{ + Filter: v, + } +} + +// OperatorAsFilterExpression is a convenience function that returns Operator wrapped in FilterExpression +func OperatorAsFilterExpression(v *Operator) FilterExpression { + return FilterExpression{ + Operator: v, + } +} + + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *FilterExpression) UnmarshalJSON(data []byte) error { + var err error + match := 0 + // try to unmarshal data into Filter + err = newStrictDecoder(data).Decode(&dst.Filter) + if err == nil { + jsonFilter, _ := json.Marshal(dst.Filter) + if string(jsonFilter) == "{}" { // empty struct + dst.Filter = nil + } else { + match++ + } + } else { + dst.Filter = nil + } + + // try to unmarshal data into Operator + err = newStrictDecoder(data).Decode(&dst.Operator) + if err == nil { + jsonOperator, _ := json.Marshal(dst.Operator) + if string(jsonOperator) == "{}" { // empty struct + dst.Operator = nil + } else { + match++ + } + } else { + dst.Operator = nil + } + + if match > 1 { // more than 1 match + // reset to nil + dst.Filter = nil + dst.Operator = nil + + return fmt.Errorf("Data matches more than one schema in oneOf(FilterExpression)") + } else if match == 1 { + return nil // exactly one match + } else { // no match + return fmt.Errorf("Data failed to match schemas in oneOf(FilterExpression)") + } +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src FilterExpression) MarshalJSON() ([]byte, error) { + if src.Filter != nil { + return json.Marshal(&src.Filter) + } + + if src.Operator != nil { + return json.Marshal(&src.Operator) + } + + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *FilterExpression) GetActualInstance() (interface{}) { + if obj == nil { + return nil + } + if obj.Filter != nil { + return obj.Filter + } + + if obj.Operator != nil { + return obj.Operator + } + + // all schemas are nil + return nil +} + +type NullableFilterExpression struct { + value *FilterExpression + isSet bool +} + +func (v NullableFilterExpression) Get() *FilterExpression { + return v.value +} + +func (v *NullableFilterExpression) Set(val *FilterExpression) { + v.value = val + v.isSet = true +} + +func (v NullableFilterExpression) IsSet() bool { + return v.isSet +} + +func (v *NullableFilterExpression) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFilterExpression(val *FilterExpression) *NullableFilterExpression { + return &NullableFilterExpression{value: val, isSet: true} +} + +func (v NullableFilterExpression) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFilterExpression) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_filter_expressions.go b/model_filter_expressions.go deleted file mode 100644 index 06e26b1..0000000 --- a/model_filter_expressions.go +++ /dev/null @@ -1,106 +0,0 @@ -/* -OneSignal - -A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com - -API version: 1.4.0 -Contact: devrel@onesignal.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onesignal - -import ( - "encoding/json" - "fmt" -) - -// FilterExpressions struct for FilterExpressions -type FilterExpressions struct { - Filter *Filter - Operator *Operator -} - -// Unmarshal JSON data into any of the pointers in the struct -func (dst *FilterExpressions) UnmarshalJSON(data []byte) error { - var err error - // try to unmarshal JSON data into Filter - err = json.Unmarshal(data, &dst.Filter); - if err == nil { - jsonFilter, _ := json.Marshal(dst.Filter) - if string(jsonFilter) == "{}" { // empty struct - dst.Filter = nil - } else { - return nil // data stored in dst.Filter, return on the first match - } - } else { - dst.Filter = nil - } - - // try to unmarshal JSON data into Operator - err = json.Unmarshal(data, &dst.Operator); - if err == nil { - jsonOperator, _ := json.Marshal(dst.Operator) - if string(jsonOperator) == "{}" { // empty struct - dst.Operator = nil - } else { - return nil // data stored in dst.Operator, return on the first match - } - } else { - dst.Operator = nil - } - - return fmt.Errorf("Data failed to match schemas in anyOf(FilterExpressions)") -} - -// Marshal data from the first non-nil pointers in the struct to JSON -func (src *FilterExpressions) MarshalJSON() ([]byte, error) { - if src.Filter != nil { - return json.Marshal(&src.Filter) - } - - if src.Operator != nil { - return json.Marshal(&src.Operator) - } - - return nil, nil // no data in anyOf schemas -} - -type NullableFilterExpressions struct { - value *FilterExpressions - isSet bool -} - -func (v NullableFilterExpressions) Get() *FilterExpressions { - return v.value -} - -func (v *NullableFilterExpressions) Set(val *FilterExpressions) { - v.value = val - v.isSet = true -} - -func (v NullableFilterExpressions) IsSet() bool { - return v.isSet -} - -func (v *NullableFilterExpressions) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFilterExpressions(val *FilterExpressions) *NullableFilterExpressions { - return &NullableFilterExpressions{value: val, isSet: true} -} - -func (v NullableFilterExpressions) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFilterExpressions) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_generic_error.go b/model_generic_error.go index e20e8b3..734d621 100644 --- a/model_generic_error.go +++ b/model_generic_error.go @@ -3,7 +3,7 @@ OneSignal A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com -API version: 1.4.0 +API version: 5.0.1 Contact: devrel@onesignal.com */ @@ -17,7 +17,9 @@ import ( // GenericError struct for GenericError type GenericError struct { - Errors []GenericErrorErrorsInner `json:"errors,omitempty"` + Errors interface{} `json:"errors,omitempty"` + Success *bool `json:"success,omitempty"` + Reference interface{} `json:"reference,omitempty"` AdditionalProperties map[string]interface{} } @@ -40,10 +42,10 @@ func NewGenericErrorWithDefaults() *GenericError { return &this } -// GetErrors returns the Errors field value if set, zero value otherwise. -func (o *GenericError) GetErrors() []GenericErrorErrorsInner { - if o == nil || o.Errors == nil { - var ret []GenericErrorErrorsInner +// GetErrors returns the Errors field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GenericError) GetErrors() interface{} { + if o == nil { + var ret interface{} return ret } return o.Errors @@ -51,11 +53,12 @@ func (o *GenericError) GetErrors() []GenericErrorErrorsInner { // GetErrorsOk returns a tuple with the Errors field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *GenericError) GetErrorsOk() ([]GenericErrorErrorsInner, bool) { +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GenericError) GetErrorsOk() (*interface{}, bool) { if o == nil || o.Errors == nil { return nil, false } - return o.Errors, true + return &o.Errors, true } // HasErrors returns a boolean if a field has been set. @@ -67,16 +70,87 @@ func (o *GenericError) HasErrors() bool { return false } -// SetErrors gets a reference to the given []GenericErrorErrorsInner and assigns it to the Errors field. -func (o *GenericError) SetErrors(v []GenericErrorErrorsInner) { +// SetErrors gets a reference to the given interface{} and assigns it to the Errors field. +func (o *GenericError) SetErrors(v interface{}) { o.Errors = v } +// GetSuccess returns the Success field value if set, zero value otherwise. +func (o *GenericError) GetSuccess() bool { + if o == nil || o.Success == nil { + var ret bool + return ret + } + return *o.Success +} + +// GetSuccessOk returns a tuple with the Success field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GenericError) GetSuccessOk() (*bool, bool) { + if o == nil || o.Success == nil { + return nil, false + } + return o.Success, true +} + +// HasSuccess returns a boolean if a field has been set. +func (o *GenericError) HasSuccess() bool { + if o != nil && o.Success != nil { + return true + } + + return false +} + +// SetSuccess gets a reference to the given bool and assigns it to the Success field. +func (o *GenericError) SetSuccess(v bool) { + o.Success = &v +} + +// GetReference returns the Reference field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GenericError) GetReference() interface{} { + if o == nil { + var ret interface{} + return ret + } + return o.Reference +} + +// GetReferenceOk returns a tuple with the Reference field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GenericError) GetReferenceOk() (*interface{}, bool) { + if o == nil || o.Reference == nil { + return nil, false + } + return &o.Reference, true +} + +// HasReference returns a boolean if a field has been set. +func (o *GenericError) HasReference() bool { + if o != nil && o.Reference != nil { + return true + } + + return false +} + +// SetReference gets a reference to the given interface{} and assigns it to the Reference field. +func (o *GenericError) SetReference(v interface{}) { + o.Reference = v +} + func (o GenericError) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Errors != nil { toSerialize["errors"] = o.Errors } + if o.Success != nil { + toSerialize["success"] = o.Success + } + if o.Reference != nil { + toSerialize["reference"] = o.Reference + } for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -96,6 +170,8 @@ func (o *GenericError) UnmarshalJSON(bytes []byte) (err error) { if err = json.Unmarshal(bytes, &additionalProperties); err == nil { delete(additionalProperties, "errors") + delete(additionalProperties, "success") + delete(additionalProperties, "reference") o.AdditionalProperties = additionalProperties } diff --git a/model_generic_error_errors_inner.go b/model_generic_error_errors_inner.go deleted file mode 100644 index a8561c6..0000000 --- a/model_generic_error_errors_inner.go +++ /dev/null @@ -1,178 +0,0 @@ -/* -OneSignal - -A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com - -API version: 1.4.0 -Contact: devrel@onesignal.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onesignal - -import ( - "encoding/json" -) - -// GenericErrorErrorsInner struct for GenericErrorErrorsInner -type GenericErrorErrorsInner struct { - Code *string `json:"code,omitempty"` - Title *string `json:"title,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _GenericErrorErrorsInner GenericErrorErrorsInner - -// NewGenericErrorErrorsInner instantiates a new GenericErrorErrorsInner object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGenericErrorErrorsInner() *GenericErrorErrorsInner { - this := GenericErrorErrorsInner{} - return &this -} - -// NewGenericErrorErrorsInnerWithDefaults instantiates a new GenericErrorErrorsInner object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGenericErrorErrorsInnerWithDefaults() *GenericErrorErrorsInner { - this := GenericErrorErrorsInner{} - return &this -} - -// GetCode returns the Code field value if set, zero value otherwise. -func (o *GenericErrorErrorsInner) GetCode() string { - if o == nil || o.Code == nil { - var ret string - return ret - } - return *o.Code -} - -// GetCodeOk returns a tuple with the Code field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GenericErrorErrorsInner) GetCodeOk() (*string, bool) { - if o == nil || o.Code == nil { - return nil, false - } - return o.Code, true -} - -// HasCode returns a boolean if a field has been set. -func (o *GenericErrorErrorsInner) HasCode() bool { - if o != nil && o.Code != nil { - return true - } - - return false -} - -// SetCode gets a reference to the given string and assigns it to the Code field. -func (o *GenericErrorErrorsInner) SetCode(v string) { - o.Code = &v -} - -// GetTitle returns the Title field value if set, zero value otherwise. -func (o *GenericErrorErrorsInner) GetTitle() string { - if o == nil || o.Title == nil { - var ret string - return ret - } - return *o.Title -} - -// GetTitleOk returns a tuple with the Title field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GenericErrorErrorsInner) GetTitleOk() (*string, bool) { - if o == nil || o.Title == nil { - return nil, false - } - return o.Title, true -} - -// HasTitle returns a boolean if a field has been set. -func (o *GenericErrorErrorsInner) HasTitle() bool { - if o != nil && o.Title != nil { - return true - } - - return false -} - -// SetTitle gets a reference to the given string and assigns it to the Title field. -func (o *GenericErrorErrorsInner) SetTitle(v string) { - o.Title = &v -} - -func (o GenericErrorErrorsInner) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Code != nil { - toSerialize["code"] = o.Code - } - if o.Title != nil { - toSerialize["title"] = o.Title - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return json.Marshal(toSerialize) -} - -func (o *GenericErrorErrorsInner) UnmarshalJSON(bytes []byte) (err error) { - varGenericErrorErrorsInner := _GenericErrorErrorsInner{} - - if err = json.Unmarshal(bytes, &varGenericErrorErrorsInner); err == nil { - *o = GenericErrorErrorsInner(varGenericErrorErrorsInner) - } - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { - delete(additionalProperties, "code") - delete(additionalProperties, "title") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableGenericErrorErrorsInner struct { - value *GenericErrorErrorsInner - isSet bool -} - -func (v NullableGenericErrorErrorsInner) Get() *GenericErrorErrorsInner { - return v.value -} - -func (v *NullableGenericErrorErrorsInner) Set(val *GenericErrorErrorsInner) { - v.value = val - v.isSet = true -} - -func (v NullableGenericErrorErrorsInner) IsSet() bool { - return v.isSet -} - -func (v *NullableGenericErrorErrorsInner) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGenericErrorErrorsInner(val *GenericErrorErrorsInner) *NullableGenericErrorErrorsInner { - return &NullableGenericErrorErrorsInner{value: val, isSet: true} -} - -func (v NullableGenericErrorErrorsInner) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGenericErrorErrorsInner) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_delete_player_success_response.go b/model_generic_success_bool_response.go similarity index 52% rename from model_delete_player_success_response.go rename to model_generic_success_bool_response.go index 89f2a39..264c337 100644 --- a/model_delete_player_success_response.go +++ b/model_generic_success_bool_response.go @@ -3,7 +3,7 @@ OneSignal A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com -API version: 1.4.0 +API version: 5.0.1 Contact: devrel@onesignal.com */ @@ -15,33 +15,33 @@ import ( "encoding/json" ) -// DeletePlayerSuccessResponse struct for DeletePlayerSuccessResponse -type DeletePlayerSuccessResponse struct { +// GenericSuccessBoolResponse struct for GenericSuccessBoolResponse +type GenericSuccessBoolResponse struct { Success *bool `json:"success,omitempty"` AdditionalProperties map[string]interface{} } -type _DeletePlayerSuccessResponse DeletePlayerSuccessResponse +type _GenericSuccessBoolResponse GenericSuccessBoolResponse -// NewDeletePlayerSuccessResponse instantiates a new DeletePlayerSuccessResponse object +// NewGenericSuccessBoolResponse instantiates a new GenericSuccessBoolResponse object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewDeletePlayerSuccessResponse() *DeletePlayerSuccessResponse { - this := DeletePlayerSuccessResponse{} +func NewGenericSuccessBoolResponse() *GenericSuccessBoolResponse { + this := GenericSuccessBoolResponse{} return &this } -// NewDeletePlayerSuccessResponseWithDefaults instantiates a new DeletePlayerSuccessResponse object +// NewGenericSuccessBoolResponseWithDefaults instantiates a new GenericSuccessBoolResponse object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set -func NewDeletePlayerSuccessResponseWithDefaults() *DeletePlayerSuccessResponse { - this := DeletePlayerSuccessResponse{} +func NewGenericSuccessBoolResponseWithDefaults() *GenericSuccessBoolResponse { + this := GenericSuccessBoolResponse{} return &this } // GetSuccess returns the Success field value if set, zero value otherwise. -func (o *DeletePlayerSuccessResponse) GetSuccess() bool { +func (o *GenericSuccessBoolResponse) GetSuccess() bool { if o == nil || o.Success == nil { var ret bool return ret @@ -51,7 +51,7 @@ func (o *DeletePlayerSuccessResponse) GetSuccess() bool { // GetSuccessOk returns a tuple with the Success field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *DeletePlayerSuccessResponse) GetSuccessOk() (*bool, bool) { +func (o *GenericSuccessBoolResponse) GetSuccessOk() (*bool, bool) { if o == nil || o.Success == nil { return nil, false } @@ -59,7 +59,7 @@ func (o *DeletePlayerSuccessResponse) GetSuccessOk() (*bool, bool) { } // HasSuccess returns a boolean if a field has been set. -func (o *DeletePlayerSuccessResponse) HasSuccess() bool { +func (o *GenericSuccessBoolResponse) HasSuccess() bool { if o != nil && o.Success != nil { return true } @@ -68,11 +68,11 @@ func (o *DeletePlayerSuccessResponse) HasSuccess() bool { } // SetSuccess gets a reference to the given bool and assigns it to the Success field. -func (o *DeletePlayerSuccessResponse) SetSuccess(v bool) { +func (o *GenericSuccessBoolResponse) SetSuccess(v bool) { o.Success = &v } -func (o DeletePlayerSuccessResponse) MarshalJSON() ([]byte, error) { +func (o GenericSuccessBoolResponse) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Success != nil { toSerialize["success"] = o.Success @@ -85,11 +85,11 @@ func (o DeletePlayerSuccessResponse) MarshalJSON() ([]byte, error) { return json.Marshal(toSerialize) } -func (o *DeletePlayerSuccessResponse) UnmarshalJSON(bytes []byte) (err error) { - varDeletePlayerSuccessResponse := _DeletePlayerSuccessResponse{} +func (o *GenericSuccessBoolResponse) UnmarshalJSON(bytes []byte) (err error) { + varGenericSuccessBoolResponse := _GenericSuccessBoolResponse{} - if err = json.Unmarshal(bytes, &varDeletePlayerSuccessResponse); err == nil { - *o = DeletePlayerSuccessResponse(varDeletePlayerSuccessResponse) + if err = json.Unmarshal(bytes, &varGenericSuccessBoolResponse); err == nil { + *o = GenericSuccessBoolResponse(varGenericSuccessBoolResponse) } additionalProperties := make(map[string]interface{}) @@ -102,38 +102,38 @@ func (o *DeletePlayerSuccessResponse) UnmarshalJSON(bytes []byte) (err error) { return err } -type NullableDeletePlayerSuccessResponse struct { - value *DeletePlayerSuccessResponse +type NullableGenericSuccessBoolResponse struct { + value *GenericSuccessBoolResponse isSet bool } -func (v NullableDeletePlayerSuccessResponse) Get() *DeletePlayerSuccessResponse { +func (v NullableGenericSuccessBoolResponse) Get() *GenericSuccessBoolResponse { return v.value } -func (v *NullableDeletePlayerSuccessResponse) Set(val *DeletePlayerSuccessResponse) { +func (v *NullableGenericSuccessBoolResponse) Set(val *GenericSuccessBoolResponse) { v.value = val v.isSet = true } -func (v NullableDeletePlayerSuccessResponse) IsSet() bool { +func (v NullableGenericSuccessBoolResponse) IsSet() bool { return v.isSet } -func (v *NullableDeletePlayerSuccessResponse) Unset() { +func (v *NullableGenericSuccessBoolResponse) Unset() { v.value = nil v.isSet = false } -func NewNullableDeletePlayerSuccessResponse(val *DeletePlayerSuccessResponse) *NullableDeletePlayerSuccessResponse { - return &NullableDeletePlayerSuccessResponse{value: val, isSet: true} +func NewNullableGenericSuccessBoolResponse(val *GenericSuccessBoolResponse) *NullableGenericSuccessBoolResponse { + return &NullableGenericSuccessBoolResponse{value: val, isSet: true} } -func (v NullableDeletePlayerSuccessResponse) MarshalJSON() ([]byte, error) { +func (v NullableGenericSuccessBoolResponse) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } -func (v *NullableDeletePlayerSuccessResponse) UnmarshalJSON(src []byte) error { +func (v *NullableGenericSuccessBoolResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } diff --git a/model_get_notification_request_body.go b/model_get_notification_history_request_body.go similarity index 59% rename from model_get_notification_request_body.go rename to model_get_notification_history_request_body.go index ce4a22c..2649f0c 100644 --- a/model_get_notification_request_body.go +++ b/model_get_notification_history_request_body.go @@ -3,7 +3,7 @@ OneSignal A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com -API version: 1.4.0 +API version: 5.0.1 Contact: devrel@onesignal.com */ @@ -15,8 +15,8 @@ import ( "encoding/json" ) -// GetNotificationRequestBody struct for GetNotificationRequestBody -type GetNotificationRequestBody struct { +// GetNotificationHistoryRequestBody struct for GetNotificationHistoryRequestBody +type GetNotificationHistoryRequestBody struct { // -> \"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. Events *string `json:"events,omitempty"` // The email address you would like the report sent. @@ -25,27 +25,27 @@ type GetNotificationRequestBody struct { AdditionalProperties map[string]interface{} } -type _GetNotificationRequestBody GetNotificationRequestBody +type _GetNotificationHistoryRequestBody GetNotificationHistoryRequestBody -// NewGetNotificationRequestBody instantiates a new GetNotificationRequestBody object +// NewGetNotificationHistoryRequestBody instantiates a new GetNotificationHistoryRequestBody object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewGetNotificationRequestBody() *GetNotificationRequestBody { - this := GetNotificationRequestBody{} +func NewGetNotificationHistoryRequestBody() *GetNotificationHistoryRequestBody { + this := GetNotificationHistoryRequestBody{} return &this } -// NewGetNotificationRequestBodyWithDefaults instantiates a new GetNotificationRequestBody object +// NewGetNotificationHistoryRequestBodyWithDefaults instantiates a new GetNotificationHistoryRequestBody object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set -func NewGetNotificationRequestBodyWithDefaults() *GetNotificationRequestBody { - this := GetNotificationRequestBody{} +func NewGetNotificationHistoryRequestBodyWithDefaults() *GetNotificationHistoryRequestBody { + this := GetNotificationHistoryRequestBody{} return &this } // GetEvents returns the Events field value if set, zero value otherwise. -func (o *GetNotificationRequestBody) GetEvents() string { +func (o *GetNotificationHistoryRequestBody) GetEvents() string { if o == nil || o.Events == nil { var ret string return ret @@ -55,7 +55,7 @@ func (o *GetNotificationRequestBody) GetEvents() string { // GetEventsOk returns a tuple with the Events field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *GetNotificationRequestBody) GetEventsOk() (*string, bool) { +func (o *GetNotificationHistoryRequestBody) GetEventsOk() (*string, bool) { if o == nil || o.Events == nil { return nil, false } @@ -63,7 +63,7 @@ func (o *GetNotificationRequestBody) GetEventsOk() (*string, bool) { } // HasEvents returns a boolean if a field has been set. -func (o *GetNotificationRequestBody) HasEvents() bool { +func (o *GetNotificationHistoryRequestBody) HasEvents() bool { if o != nil && o.Events != nil { return true } @@ -72,12 +72,12 @@ func (o *GetNotificationRequestBody) HasEvents() bool { } // SetEvents gets a reference to the given string and assigns it to the Events field. -func (o *GetNotificationRequestBody) SetEvents(v string) { +func (o *GetNotificationHistoryRequestBody) SetEvents(v string) { o.Events = &v } // GetEmail returns the Email field value if set, zero value otherwise. -func (o *GetNotificationRequestBody) GetEmail() string { +func (o *GetNotificationHistoryRequestBody) GetEmail() string { if o == nil || o.Email == nil { var ret string return ret @@ -87,7 +87,7 @@ func (o *GetNotificationRequestBody) GetEmail() string { // GetEmailOk returns a tuple with the Email field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *GetNotificationRequestBody) GetEmailOk() (*string, bool) { +func (o *GetNotificationHistoryRequestBody) GetEmailOk() (*string, bool) { if o == nil || o.Email == nil { return nil, false } @@ -95,7 +95,7 @@ func (o *GetNotificationRequestBody) GetEmailOk() (*string, bool) { } // HasEmail returns a boolean if a field has been set. -func (o *GetNotificationRequestBody) HasEmail() bool { +func (o *GetNotificationHistoryRequestBody) HasEmail() bool { if o != nil && o.Email != nil { return true } @@ -104,12 +104,12 @@ func (o *GetNotificationRequestBody) HasEmail() bool { } // SetEmail gets a reference to the given string and assigns it to the Email field. -func (o *GetNotificationRequestBody) SetEmail(v string) { +func (o *GetNotificationHistoryRequestBody) SetEmail(v string) { o.Email = &v } // GetAppId returns the AppId field value if set, zero value otherwise. -func (o *GetNotificationRequestBody) GetAppId() string { +func (o *GetNotificationHistoryRequestBody) GetAppId() string { if o == nil || o.AppId == nil { var ret string return ret @@ -119,7 +119,7 @@ func (o *GetNotificationRequestBody) GetAppId() string { // GetAppIdOk returns a tuple with the AppId field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *GetNotificationRequestBody) GetAppIdOk() (*string, bool) { +func (o *GetNotificationHistoryRequestBody) GetAppIdOk() (*string, bool) { if o == nil || o.AppId == nil { return nil, false } @@ -127,7 +127,7 @@ func (o *GetNotificationRequestBody) GetAppIdOk() (*string, bool) { } // HasAppId returns a boolean if a field has been set. -func (o *GetNotificationRequestBody) HasAppId() bool { +func (o *GetNotificationHistoryRequestBody) HasAppId() bool { if o != nil && o.AppId != nil { return true } @@ -136,11 +136,11 @@ func (o *GetNotificationRequestBody) HasAppId() bool { } // SetAppId gets a reference to the given string and assigns it to the AppId field. -func (o *GetNotificationRequestBody) SetAppId(v string) { +func (o *GetNotificationHistoryRequestBody) SetAppId(v string) { o.AppId = &v } -func (o GetNotificationRequestBody) MarshalJSON() ([]byte, error) { +func (o GetNotificationHistoryRequestBody) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Events != nil { toSerialize["events"] = o.Events @@ -159,11 +159,11 @@ func (o GetNotificationRequestBody) MarshalJSON() ([]byte, error) { return json.Marshal(toSerialize) } -func (o *GetNotificationRequestBody) UnmarshalJSON(bytes []byte) (err error) { - varGetNotificationRequestBody := _GetNotificationRequestBody{} +func (o *GetNotificationHistoryRequestBody) UnmarshalJSON(bytes []byte) (err error) { + varGetNotificationHistoryRequestBody := _GetNotificationHistoryRequestBody{} - if err = json.Unmarshal(bytes, &varGetNotificationRequestBody); err == nil { - *o = GetNotificationRequestBody(varGetNotificationRequestBody) + if err = json.Unmarshal(bytes, &varGetNotificationHistoryRequestBody); err == nil { + *o = GetNotificationHistoryRequestBody(varGetNotificationHistoryRequestBody) } additionalProperties := make(map[string]interface{}) @@ -178,38 +178,38 @@ func (o *GetNotificationRequestBody) UnmarshalJSON(bytes []byte) (err error) { return err } -type NullableGetNotificationRequestBody struct { - value *GetNotificationRequestBody +type NullableGetNotificationHistoryRequestBody struct { + value *GetNotificationHistoryRequestBody isSet bool } -func (v NullableGetNotificationRequestBody) Get() *GetNotificationRequestBody { +func (v NullableGetNotificationHistoryRequestBody) Get() *GetNotificationHistoryRequestBody { return v.value } -func (v *NullableGetNotificationRequestBody) Set(val *GetNotificationRequestBody) { +func (v *NullableGetNotificationHistoryRequestBody) Set(val *GetNotificationHistoryRequestBody) { v.value = val v.isSet = true } -func (v NullableGetNotificationRequestBody) IsSet() bool { +func (v NullableGetNotificationHistoryRequestBody) IsSet() bool { return v.isSet } -func (v *NullableGetNotificationRequestBody) Unset() { +func (v *NullableGetNotificationHistoryRequestBody) Unset() { v.value = nil v.isSet = false } -func NewNullableGetNotificationRequestBody(val *GetNotificationRequestBody) *NullableGetNotificationRequestBody { - return &NullableGetNotificationRequestBody{value: val, isSet: true} +func NewNullableGetNotificationHistoryRequestBody(val *GetNotificationHistoryRequestBody) *NullableGetNotificationHistoryRequestBody { + return &NullableGetNotificationHistoryRequestBody{value: val, isSet: true} } -func (v NullableGetNotificationRequestBody) MarshalJSON() ([]byte, error) { +func (v NullableGetNotificationHistoryRequestBody) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } -func (v *NullableGetNotificationRequestBody) UnmarshalJSON(src []byte) error { +func (v *NullableGetNotificationHistoryRequestBody) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } diff --git a/model_player_slice.go b/model_get_segments_success_response.go similarity index 51% rename from model_player_slice.go rename to model_get_segments_success_response.go index 3250f2a..aef5383 100644 --- a/model_player_slice.go +++ b/model_get_segments_success_response.go @@ -3,7 +3,7 @@ OneSignal A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com -API version: 1.4.0 +API version: 5.0.1 Contact: devrel@onesignal.com */ @@ -15,36 +15,40 @@ import ( "encoding/json" ) -// PlayerSlice struct for PlayerSlice -type PlayerSlice struct { +// GetSegmentsSuccessResponse struct for GetSegmentsSuccessResponse +type GetSegmentsSuccessResponse struct { + // The number of Segments in the response. TotalCount *int32 `json:"total_count,omitempty"` + // Set with the offset query parameter. Default 0. Offset *int32 `json:"offset,omitempty"` + // Maximum number of Segments returned. Default 300. Limit *int32 `json:"limit,omitempty"` - Players []Player `json:"players,omitempty"` + // An array containing the Segment information. + Segments []SegmentData `json:"segments,omitempty"` AdditionalProperties map[string]interface{} } -type _PlayerSlice PlayerSlice +type _GetSegmentsSuccessResponse GetSegmentsSuccessResponse -// NewPlayerSlice instantiates a new PlayerSlice object +// NewGetSegmentsSuccessResponse instantiates a new GetSegmentsSuccessResponse object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewPlayerSlice() *PlayerSlice { - this := PlayerSlice{} +func NewGetSegmentsSuccessResponse() *GetSegmentsSuccessResponse { + this := GetSegmentsSuccessResponse{} return &this } -// NewPlayerSliceWithDefaults instantiates a new PlayerSlice object +// NewGetSegmentsSuccessResponseWithDefaults instantiates a new GetSegmentsSuccessResponse object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set -func NewPlayerSliceWithDefaults() *PlayerSlice { - this := PlayerSlice{} +func NewGetSegmentsSuccessResponseWithDefaults() *GetSegmentsSuccessResponse { + this := GetSegmentsSuccessResponse{} return &this } // GetTotalCount returns the TotalCount field value if set, zero value otherwise. -func (o *PlayerSlice) GetTotalCount() int32 { +func (o *GetSegmentsSuccessResponse) GetTotalCount() int32 { if o == nil || o.TotalCount == nil { var ret int32 return ret @@ -54,7 +58,7 @@ func (o *PlayerSlice) GetTotalCount() int32 { // GetTotalCountOk returns a tuple with the TotalCount field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PlayerSlice) GetTotalCountOk() (*int32, bool) { +func (o *GetSegmentsSuccessResponse) GetTotalCountOk() (*int32, bool) { if o == nil || o.TotalCount == nil { return nil, false } @@ -62,7 +66,7 @@ func (o *PlayerSlice) GetTotalCountOk() (*int32, bool) { } // HasTotalCount returns a boolean if a field has been set. -func (o *PlayerSlice) HasTotalCount() bool { +func (o *GetSegmentsSuccessResponse) HasTotalCount() bool { if o != nil && o.TotalCount != nil { return true } @@ -71,12 +75,12 @@ func (o *PlayerSlice) HasTotalCount() bool { } // SetTotalCount gets a reference to the given int32 and assigns it to the TotalCount field. -func (o *PlayerSlice) SetTotalCount(v int32) { +func (o *GetSegmentsSuccessResponse) SetTotalCount(v int32) { o.TotalCount = &v } // GetOffset returns the Offset field value if set, zero value otherwise. -func (o *PlayerSlice) GetOffset() int32 { +func (o *GetSegmentsSuccessResponse) GetOffset() int32 { if o == nil || o.Offset == nil { var ret int32 return ret @@ -86,7 +90,7 @@ func (o *PlayerSlice) GetOffset() int32 { // GetOffsetOk returns a tuple with the Offset field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PlayerSlice) GetOffsetOk() (*int32, bool) { +func (o *GetSegmentsSuccessResponse) GetOffsetOk() (*int32, bool) { if o == nil || o.Offset == nil { return nil, false } @@ -94,7 +98,7 @@ func (o *PlayerSlice) GetOffsetOk() (*int32, bool) { } // HasOffset returns a boolean if a field has been set. -func (o *PlayerSlice) HasOffset() bool { +func (o *GetSegmentsSuccessResponse) HasOffset() bool { if o != nil && o.Offset != nil { return true } @@ -103,12 +107,12 @@ func (o *PlayerSlice) HasOffset() bool { } // SetOffset gets a reference to the given int32 and assigns it to the Offset field. -func (o *PlayerSlice) SetOffset(v int32) { +func (o *GetSegmentsSuccessResponse) SetOffset(v int32) { o.Offset = &v } // GetLimit returns the Limit field value if set, zero value otherwise. -func (o *PlayerSlice) GetLimit() int32 { +func (o *GetSegmentsSuccessResponse) GetLimit() int32 { if o == nil || o.Limit == nil { var ret int32 return ret @@ -118,7 +122,7 @@ func (o *PlayerSlice) GetLimit() int32 { // GetLimitOk returns a tuple with the Limit field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PlayerSlice) GetLimitOk() (*int32, bool) { +func (o *GetSegmentsSuccessResponse) GetLimitOk() (*int32, bool) { if o == nil || o.Limit == nil { return nil, false } @@ -126,7 +130,7 @@ func (o *PlayerSlice) GetLimitOk() (*int32, bool) { } // HasLimit returns a boolean if a field has been set. -func (o *PlayerSlice) HasLimit() bool { +func (o *GetSegmentsSuccessResponse) HasLimit() bool { if o != nil && o.Limit != nil { return true } @@ -135,43 +139,43 @@ func (o *PlayerSlice) HasLimit() bool { } // SetLimit gets a reference to the given int32 and assigns it to the Limit field. -func (o *PlayerSlice) SetLimit(v int32) { +func (o *GetSegmentsSuccessResponse) SetLimit(v int32) { o.Limit = &v } -// GetPlayers returns the Players field value if set, zero value otherwise. -func (o *PlayerSlice) GetPlayers() []Player { - if o == nil || o.Players == nil { - var ret []Player +// GetSegments returns the Segments field value if set, zero value otherwise. +func (o *GetSegmentsSuccessResponse) GetSegments() []SegmentData { + if o == nil || o.Segments == nil { + var ret []SegmentData return ret } - return o.Players + return o.Segments } -// GetPlayersOk returns a tuple with the Players field value if set, nil otherwise +// GetSegmentsOk returns a tuple with the Segments field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PlayerSlice) GetPlayersOk() ([]Player, bool) { - if o == nil || o.Players == nil { +func (o *GetSegmentsSuccessResponse) GetSegmentsOk() ([]SegmentData, bool) { + if o == nil || o.Segments == nil { return nil, false } - return o.Players, true + return o.Segments, true } -// HasPlayers returns a boolean if a field has been set. -func (o *PlayerSlice) HasPlayers() bool { - if o != nil && o.Players != nil { +// HasSegments returns a boolean if a field has been set. +func (o *GetSegmentsSuccessResponse) HasSegments() bool { + if o != nil && o.Segments != nil { return true } return false } -// SetPlayers gets a reference to the given []Player and assigns it to the Players field. -func (o *PlayerSlice) SetPlayers(v []Player) { - o.Players = v +// SetSegments gets a reference to the given []SegmentData and assigns it to the Segments field. +func (o *GetSegmentsSuccessResponse) SetSegments(v []SegmentData) { + o.Segments = v } -func (o PlayerSlice) MarshalJSON() ([]byte, error) { +func (o GetSegmentsSuccessResponse) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.TotalCount != nil { toSerialize["total_count"] = o.TotalCount @@ -182,8 +186,8 @@ func (o PlayerSlice) MarshalJSON() ([]byte, error) { if o.Limit != nil { toSerialize["limit"] = o.Limit } - if o.Players != nil { - toSerialize["players"] = o.Players + if o.Segments != nil { + toSerialize["segments"] = o.Segments } for key, value := range o.AdditionalProperties { @@ -193,11 +197,11 @@ func (o PlayerSlice) MarshalJSON() ([]byte, error) { return json.Marshal(toSerialize) } -func (o *PlayerSlice) UnmarshalJSON(bytes []byte) (err error) { - varPlayerSlice := _PlayerSlice{} +func (o *GetSegmentsSuccessResponse) UnmarshalJSON(bytes []byte) (err error) { + varGetSegmentsSuccessResponse := _GetSegmentsSuccessResponse{} - if err = json.Unmarshal(bytes, &varPlayerSlice); err == nil { - *o = PlayerSlice(varPlayerSlice) + if err = json.Unmarshal(bytes, &varGetSegmentsSuccessResponse); err == nil { + *o = GetSegmentsSuccessResponse(varGetSegmentsSuccessResponse) } additionalProperties := make(map[string]interface{}) @@ -206,45 +210,45 @@ func (o *PlayerSlice) UnmarshalJSON(bytes []byte) (err error) { delete(additionalProperties, "total_count") delete(additionalProperties, "offset") delete(additionalProperties, "limit") - delete(additionalProperties, "players") + delete(additionalProperties, "segments") o.AdditionalProperties = additionalProperties } return err } -type NullablePlayerSlice struct { - value *PlayerSlice +type NullableGetSegmentsSuccessResponse struct { + value *GetSegmentsSuccessResponse isSet bool } -func (v NullablePlayerSlice) Get() *PlayerSlice { +func (v NullableGetSegmentsSuccessResponse) Get() *GetSegmentsSuccessResponse { return v.value } -func (v *NullablePlayerSlice) Set(val *PlayerSlice) { +func (v *NullableGetSegmentsSuccessResponse) Set(val *GetSegmentsSuccessResponse) { v.value = val v.isSet = true } -func (v NullablePlayerSlice) IsSet() bool { +func (v NullableGetSegmentsSuccessResponse) IsSet() bool { return v.isSet } -func (v *NullablePlayerSlice) Unset() { +func (v *NullableGetSegmentsSuccessResponse) Unset() { v.value = nil v.isSet = false } -func NewNullablePlayerSlice(val *PlayerSlice) *NullablePlayerSlice { - return &NullablePlayerSlice{value: val, isSet: true} +func NewNullableGetSegmentsSuccessResponse(val *GetSegmentsSuccessResponse) *NullableGetSegmentsSuccessResponse { + return &NullableGetSegmentsSuccessResponse{value: val, isSet: true} } -func (v NullablePlayerSlice) MarshalJSON() ([]byte, error) { +func (v NullableGetSegmentsSuccessResponse) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } -func (v *NullablePlayerSlice) UnmarshalJSON(src []byte) error { +func (v *NullableGetSegmentsSuccessResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } diff --git a/model_inline_response_200_3.go b/model_inline_response_200_3.go deleted file mode 100644 index 0a6628d..0000000 --- a/model_inline_response_200_3.go +++ /dev/null @@ -1,141 +0,0 @@ -/* -OneSignal - -A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com - -API version: 1.4.0 -Contact: devrel@onesignal.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onesignal - -import ( - "encoding/json" -) - -// InlineResponse2003 struct for InlineResponse2003 -type InlineResponse2003 struct { - InAppMessages []map[string]interface{} `json:"in_app_messages,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _InlineResponse2003 InlineResponse2003 - -// NewInlineResponse2003 instantiates a new InlineResponse2003 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewInlineResponse2003() *InlineResponse2003 { - this := InlineResponse2003{} - return &this -} - -// NewInlineResponse2003WithDefaults instantiates a new InlineResponse2003 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewInlineResponse2003WithDefaults() *InlineResponse2003 { - this := InlineResponse2003{} - return &this -} - -// GetInAppMessages returns the InAppMessages field value if set, zero value otherwise. -func (o *InlineResponse2003) GetInAppMessages() []map[string]interface{} { - if o == nil || o.InAppMessages == nil { - var ret []map[string]interface{} - return ret - } - return o.InAppMessages -} - -// GetInAppMessagesOk returns a tuple with the InAppMessages field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *InlineResponse2003) GetInAppMessagesOk() ([]map[string]interface{}, bool) { - if o == nil || o.InAppMessages == nil { - return nil, false - } - return o.InAppMessages, true -} - -// HasInAppMessages returns a boolean if a field has been set. -func (o *InlineResponse2003) HasInAppMessages() bool { - if o != nil && o.InAppMessages != nil { - return true - } - - return false -} - -// SetInAppMessages gets a reference to the given []map[string]interface{} and assigns it to the InAppMessages field. -func (o *InlineResponse2003) SetInAppMessages(v []map[string]interface{}) { - o.InAppMessages = v -} - -func (o InlineResponse2003) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.InAppMessages != nil { - toSerialize["in_app_messages"] = o.InAppMessages - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return json.Marshal(toSerialize) -} - -func (o *InlineResponse2003) UnmarshalJSON(bytes []byte) (err error) { - varInlineResponse2003 := _InlineResponse2003{} - - if err = json.Unmarshal(bytes, &varInlineResponse2003); err == nil { - *o = InlineResponse2003(varInlineResponse2003) - } - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { - delete(additionalProperties, "in_app_messages") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableInlineResponse2003 struct { - value *InlineResponse2003 - isSet bool -} - -func (v NullableInlineResponse2003) Get() *InlineResponse2003 { - return v.value -} - -func (v *NullableInlineResponse2003) Set(val *InlineResponse2003) { - v.value = val - v.isSet = true -} - -func (v NullableInlineResponse2003) IsSet() bool { - return v.isSet -} - -func (v *NullableInlineResponse2003) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInlineResponse2003(val *InlineResponse2003) *NullableInlineResponse2003 { - return &NullableInlineResponse2003{value: val, isSet: true} -} - -func (v NullableInlineResponse2003) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInlineResponse2003) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_invalid_identifier_error.go b/model_invalid_identifier_error.go deleted file mode 100644 index b395c00..0000000 --- a/model_invalid_identifier_error.go +++ /dev/null @@ -1,180 +0,0 @@ -/* -OneSignal - -A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com - -API version: 1.4.0 -Contact: devrel@onesignal.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onesignal - -import ( - "encoding/json" -) - -// InvalidIdentifierError struct for InvalidIdentifierError -type InvalidIdentifierError struct { - // Returned if using include_external_user_ids - InvalidExternalUserIds []string `json:"invalid_external_user_ids,omitempty"` - // Returned if using include_player_ids and some were valid and others were not. - InvalidPlayerIds []string `json:"invalid_player_ids,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _InvalidIdentifierError InvalidIdentifierError - -// NewInvalidIdentifierError instantiates a new InvalidIdentifierError object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewInvalidIdentifierError() *InvalidIdentifierError { - this := InvalidIdentifierError{} - return &this -} - -// NewInvalidIdentifierErrorWithDefaults instantiates a new InvalidIdentifierError object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewInvalidIdentifierErrorWithDefaults() *InvalidIdentifierError { - this := InvalidIdentifierError{} - return &this -} - -// GetInvalidExternalUserIds returns the InvalidExternalUserIds field value if set, zero value otherwise. -func (o *InvalidIdentifierError) GetInvalidExternalUserIds() []string { - if o == nil || o.InvalidExternalUserIds == nil { - var ret []string - return ret - } - return o.InvalidExternalUserIds -} - -// GetInvalidExternalUserIdsOk returns a tuple with the InvalidExternalUserIds field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *InvalidIdentifierError) GetInvalidExternalUserIdsOk() ([]string, bool) { - if o == nil || o.InvalidExternalUserIds == nil { - return nil, false - } - return o.InvalidExternalUserIds, true -} - -// HasInvalidExternalUserIds returns a boolean if a field has been set. -func (o *InvalidIdentifierError) HasInvalidExternalUserIds() bool { - if o != nil && o.InvalidExternalUserIds != nil { - return true - } - - return false -} - -// SetInvalidExternalUserIds gets a reference to the given []string and assigns it to the InvalidExternalUserIds field. -func (o *InvalidIdentifierError) SetInvalidExternalUserIds(v []string) { - o.InvalidExternalUserIds = v -} - -// GetInvalidPlayerIds returns the InvalidPlayerIds field value if set, zero value otherwise. -func (o *InvalidIdentifierError) GetInvalidPlayerIds() []string { - if o == nil || o.InvalidPlayerIds == nil { - var ret []string - return ret - } - return o.InvalidPlayerIds -} - -// GetInvalidPlayerIdsOk returns a tuple with the InvalidPlayerIds field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *InvalidIdentifierError) GetInvalidPlayerIdsOk() ([]string, bool) { - if o == nil || o.InvalidPlayerIds == nil { - return nil, false - } - return o.InvalidPlayerIds, true -} - -// HasInvalidPlayerIds returns a boolean if a field has been set. -func (o *InvalidIdentifierError) HasInvalidPlayerIds() bool { - if o != nil && o.InvalidPlayerIds != nil { - return true - } - - return false -} - -// SetInvalidPlayerIds gets a reference to the given []string and assigns it to the InvalidPlayerIds field. -func (o *InvalidIdentifierError) SetInvalidPlayerIds(v []string) { - o.InvalidPlayerIds = v -} - -func (o InvalidIdentifierError) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.InvalidExternalUserIds != nil { - toSerialize["invalid_external_user_ids"] = o.InvalidExternalUserIds - } - if o.InvalidPlayerIds != nil { - toSerialize["invalid_player_ids"] = o.InvalidPlayerIds - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return json.Marshal(toSerialize) -} - -func (o *InvalidIdentifierError) UnmarshalJSON(bytes []byte) (err error) { - varInvalidIdentifierError := _InvalidIdentifierError{} - - if err = json.Unmarshal(bytes, &varInvalidIdentifierError); err == nil { - *o = InvalidIdentifierError(varInvalidIdentifierError) - } - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { - delete(additionalProperties, "invalid_external_user_ids") - delete(additionalProperties, "invalid_player_ids") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableInvalidIdentifierError struct { - value *InvalidIdentifierError - isSet bool -} - -func (v NullableInvalidIdentifierError) Get() *InvalidIdentifierError { - return v.value -} - -func (v *NullableInvalidIdentifierError) Set(val *InvalidIdentifierError) { - v.value = val - v.isSet = true -} - -func (v NullableInvalidIdentifierError) IsSet() bool { - return v.isSet -} - -func (v *NullableInvalidIdentifierError) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInvalidIdentifierError(val *InvalidIdentifierError) *NullableInvalidIdentifierError { - return &NullableInvalidIdentifierError{value: val, isSet: true} -} - -func (v NullableInvalidIdentifierError) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInvalidIdentifierError) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_string_map.go b/model_language_string_map.go similarity index 76% rename from model_string_map.go rename to model_language_string_map.go index 93fa7d2..b52a65f 100644 --- a/model_string_map.go +++ b/model_language_string_map.go @@ -3,7 +3,7 @@ OneSignal A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com -API version: 1.4.0 +API version: 5.0.1 Contact: devrel@onesignal.com */ @@ -15,8 +15,8 @@ import ( "encoding/json" ) -// StringMap struct for StringMap -type StringMap struct { +// LanguageStringMap struct for LanguageStringMap +type LanguageStringMap struct { // Text in English. Will be used as a fallback En *string `json:"en,omitempty"` // Text in Arabic. @@ -106,27 +106,27 @@ type StringMap struct { AdditionalProperties map[string]interface{} } -type _StringMap StringMap +type _LanguageStringMap LanguageStringMap -// NewStringMap instantiates a new StringMap object +// NewLanguageStringMap instantiates a new LanguageStringMap object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewStringMap() *StringMap { - this := StringMap{} +func NewLanguageStringMap() *LanguageStringMap { + this := LanguageStringMap{} return &this } -// NewStringMapWithDefaults instantiates a new StringMap object +// NewLanguageStringMapWithDefaults instantiates a new LanguageStringMap object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set -func NewStringMapWithDefaults() *StringMap { - this := StringMap{} +func NewLanguageStringMapWithDefaults() *LanguageStringMap { + this := LanguageStringMap{} return &this } // GetEn returns the En field value if set, zero value otherwise. -func (o *StringMap) GetEn() string { +func (o *LanguageStringMap) GetEn() string { if o == nil || o.En == nil { var ret string return ret @@ -136,7 +136,7 @@ func (o *StringMap) GetEn() string { // GetEnOk returns a tuple with the En field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *StringMap) GetEnOk() (*string, bool) { +func (o *LanguageStringMap) GetEnOk() (*string, bool) { if o == nil || o.En == nil { return nil, false } @@ -144,7 +144,7 @@ func (o *StringMap) GetEnOk() (*string, bool) { } // HasEn returns a boolean if a field has been set. -func (o *StringMap) HasEn() bool { +func (o *LanguageStringMap) HasEn() bool { if o != nil && o.En != nil { return true } @@ -153,12 +153,12 @@ func (o *StringMap) HasEn() bool { } // SetEn gets a reference to the given string and assigns it to the En field. -func (o *StringMap) SetEn(v string) { +func (o *LanguageStringMap) SetEn(v string) { o.En = &v } // GetAr returns the Ar field value if set, zero value otherwise. -func (o *StringMap) GetAr() string { +func (o *LanguageStringMap) GetAr() string { if o == nil || o.Ar == nil { var ret string return ret @@ -168,7 +168,7 @@ func (o *StringMap) GetAr() string { // GetArOk returns a tuple with the Ar field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *StringMap) GetArOk() (*string, bool) { +func (o *LanguageStringMap) GetArOk() (*string, bool) { if o == nil || o.Ar == nil { return nil, false } @@ -176,7 +176,7 @@ func (o *StringMap) GetArOk() (*string, bool) { } // HasAr returns a boolean if a field has been set. -func (o *StringMap) HasAr() bool { +func (o *LanguageStringMap) HasAr() bool { if o != nil && o.Ar != nil { return true } @@ -185,12 +185,12 @@ func (o *StringMap) HasAr() bool { } // SetAr gets a reference to the given string and assigns it to the Ar field. -func (o *StringMap) SetAr(v string) { +func (o *LanguageStringMap) SetAr(v string) { o.Ar = &v } // GetBs returns the Bs field value if set, zero value otherwise. -func (o *StringMap) GetBs() string { +func (o *LanguageStringMap) GetBs() string { if o == nil || o.Bs == nil { var ret string return ret @@ -200,7 +200,7 @@ func (o *StringMap) GetBs() string { // GetBsOk returns a tuple with the Bs field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *StringMap) GetBsOk() (*string, bool) { +func (o *LanguageStringMap) GetBsOk() (*string, bool) { if o == nil || o.Bs == nil { return nil, false } @@ -208,7 +208,7 @@ func (o *StringMap) GetBsOk() (*string, bool) { } // HasBs returns a boolean if a field has been set. -func (o *StringMap) HasBs() bool { +func (o *LanguageStringMap) HasBs() bool { if o != nil && o.Bs != nil { return true } @@ -217,12 +217,12 @@ func (o *StringMap) HasBs() bool { } // SetBs gets a reference to the given string and assigns it to the Bs field. -func (o *StringMap) SetBs(v string) { +func (o *LanguageStringMap) SetBs(v string) { o.Bs = &v } // GetBg returns the Bg field value if set, zero value otherwise. -func (o *StringMap) GetBg() string { +func (o *LanguageStringMap) GetBg() string { if o == nil || o.Bg == nil { var ret string return ret @@ -232,7 +232,7 @@ func (o *StringMap) GetBg() string { // GetBgOk returns a tuple with the Bg field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *StringMap) GetBgOk() (*string, bool) { +func (o *LanguageStringMap) GetBgOk() (*string, bool) { if o == nil || o.Bg == nil { return nil, false } @@ -240,7 +240,7 @@ func (o *StringMap) GetBgOk() (*string, bool) { } // HasBg returns a boolean if a field has been set. -func (o *StringMap) HasBg() bool { +func (o *LanguageStringMap) HasBg() bool { if o != nil && o.Bg != nil { return true } @@ -249,12 +249,12 @@ func (o *StringMap) HasBg() bool { } // SetBg gets a reference to the given string and assigns it to the Bg field. -func (o *StringMap) SetBg(v string) { +func (o *LanguageStringMap) SetBg(v string) { o.Bg = &v } // GetCa returns the Ca field value if set, zero value otherwise. -func (o *StringMap) GetCa() string { +func (o *LanguageStringMap) GetCa() string { if o == nil || o.Ca == nil { var ret string return ret @@ -264,7 +264,7 @@ func (o *StringMap) GetCa() string { // GetCaOk returns a tuple with the Ca field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *StringMap) GetCaOk() (*string, bool) { +func (o *LanguageStringMap) GetCaOk() (*string, bool) { if o == nil || o.Ca == nil { return nil, false } @@ -272,7 +272,7 @@ func (o *StringMap) GetCaOk() (*string, bool) { } // HasCa returns a boolean if a field has been set. -func (o *StringMap) HasCa() bool { +func (o *LanguageStringMap) HasCa() bool { if o != nil && o.Ca != nil { return true } @@ -281,12 +281,12 @@ func (o *StringMap) HasCa() bool { } // SetCa gets a reference to the given string and assigns it to the Ca field. -func (o *StringMap) SetCa(v string) { +func (o *LanguageStringMap) SetCa(v string) { o.Ca = &v } // GetZhHans returns the ZhHans field value if set, zero value otherwise. -func (o *StringMap) GetZhHans() string { +func (o *LanguageStringMap) GetZhHans() string { if o == nil || o.ZhHans == nil { var ret string return ret @@ -296,7 +296,7 @@ func (o *StringMap) GetZhHans() string { // GetZhHansOk returns a tuple with the ZhHans field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *StringMap) GetZhHansOk() (*string, bool) { +func (o *LanguageStringMap) GetZhHansOk() (*string, bool) { if o == nil || o.ZhHans == nil { return nil, false } @@ -304,7 +304,7 @@ func (o *StringMap) GetZhHansOk() (*string, bool) { } // HasZhHans returns a boolean if a field has been set. -func (o *StringMap) HasZhHans() bool { +func (o *LanguageStringMap) HasZhHans() bool { if o != nil && o.ZhHans != nil { return true } @@ -313,12 +313,12 @@ func (o *StringMap) HasZhHans() bool { } // SetZhHans gets a reference to the given string and assigns it to the ZhHans field. -func (o *StringMap) SetZhHans(v string) { +func (o *LanguageStringMap) SetZhHans(v string) { o.ZhHans = &v } // GetZhHant returns the ZhHant field value if set, zero value otherwise. -func (o *StringMap) GetZhHant() string { +func (o *LanguageStringMap) GetZhHant() string { if o == nil || o.ZhHant == nil { var ret string return ret @@ -328,7 +328,7 @@ func (o *StringMap) GetZhHant() string { // GetZhHantOk returns a tuple with the ZhHant field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *StringMap) GetZhHantOk() (*string, bool) { +func (o *LanguageStringMap) GetZhHantOk() (*string, bool) { if o == nil || o.ZhHant == nil { return nil, false } @@ -336,7 +336,7 @@ func (o *StringMap) GetZhHantOk() (*string, bool) { } // HasZhHant returns a boolean if a field has been set. -func (o *StringMap) HasZhHant() bool { +func (o *LanguageStringMap) HasZhHant() bool { if o != nil && o.ZhHant != nil { return true } @@ -345,12 +345,12 @@ func (o *StringMap) HasZhHant() bool { } // SetZhHant gets a reference to the given string and assigns it to the ZhHant field. -func (o *StringMap) SetZhHant(v string) { +func (o *LanguageStringMap) SetZhHant(v string) { o.ZhHant = &v } // GetZh returns the Zh field value if set, zero value otherwise. -func (o *StringMap) GetZh() string { +func (o *LanguageStringMap) GetZh() string { if o == nil || o.Zh == nil { var ret string return ret @@ -360,7 +360,7 @@ func (o *StringMap) GetZh() string { // GetZhOk returns a tuple with the Zh field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *StringMap) GetZhOk() (*string, bool) { +func (o *LanguageStringMap) GetZhOk() (*string, bool) { if o == nil || o.Zh == nil { return nil, false } @@ -368,7 +368,7 @@ func (o *StringMap) GetZhOk() (*string, bool) { } // HasZh returns a boolean if a field has been set. -func (o *StringMap) HasZh() bool { +func (o *LanguageStringMap) HasZh() bool { if o != nil && o.Zh != nil { return true } @@ -377,12 +377,12 @@ func (o *StringMap) HasZh() bool { } // SetZh gets a reference to the given string and assigns it to the Zh field. -func (o *StringMap) SetZh(v string) { +func (o *LanguageStringMap) SetZh(v string) { o.Zh = &v } // GetHr returns the Hr field value if set, zero value otherwise. -func (o *StringMap) GetHr() string { +func (o *LanguageStringMap) GetHr() string { if o == nil || o.Hr == nil { var ret string return ret @@ -392,7 +392,7 @@ func (o *StringMap) GetHr() string { // GetHrOk returns a tuple with the Hr field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *StringMap) GetHrOk() (*string, bool) { +func (o *LanguageStringMap) GetHrOk() (*string, bool) { if o == nil || o.Hr == nil { return nil, false } @@ -400,7 +400,7 @@ func (o *StringMap) GetHrOk() (*string, bool) { } // HasHr returns a boolean if a field has been set. -func (o *StringMap) HasHr() bool { +func (o *LanguageStringMap) HasHr() bool { if o != nil && o.Hr != nil { return true } @@ -409,12 +409,12 @@ func (o *StringMap) HasHr() bool { } // SetHr gets a reference to the given string and assigns it to the Hr field. -func (o *StringMap) SetHr(v string) { +func (o *LanguageStringMap) SetHr(v string) { o.Hr = &v } // GetCs returns the Cs field value if set, zero value otherwise. -func (o *StringMap) GetCs() string { +func (o *LanguageStringMap) GetCs() string { if o == nil || o.Cs == nil { var ret string return ret @@ -424,7 +424,7 @@ func (o *StringMap) GetCs() string { // GetCsOk returns a tuple with the Cs field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *StringMap) GetCsOk() (*string, bool) { +func (o *LanguageStringMap) GetCsOk() (*string, bool) { if o == nil || o.Cs == nil { return nil, false } @@ -432,7 +432,7 @@ func (o *StringMap) GetCsOk() (*string, bool) { } // HasCs returns a boolean if a field has been set. -func (o *StringMap) HasCs() bool { +func (o *LanguageStringMap) HasCs() bool { if o != nil && o.Cs != nil { return true } @@ -441,12 +441,12 @@ func (o *StringMap) HasCs() bool { } // SetCs gets a reference to the given string and assigns it to the Cs field. -func (o *StringMap) SetCs(v string) { +func (o *LanguageStringMap) SetCs(v string) { o.Cs = &v } // GetDa returns the Da field value if set, zero value otherwise. -func (o *StringMap) GetDa() string { +func (o *LanguageStringMap) GetDa() string { if o == nil || o.Da == nil { var ret string return ret @@ -456,7 +456,7 @@ func (o *StringMap) GetDa() string { // GetDaOk returns a tuple with the Da field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *StringMap) GetDaOk() (*string, bool) { +func (o *LanguageStringMap) GetDaOk() (*string, bool) { if o == nil || o.Da == nil { return nil, false } @@ -464,7 +464,7 @@ func (o *StringMap) GetDaOk() (*string, bool) { } // HasDa returns a boolean if a field has been set. -func (o *StringMap) HasDa() bool { +func (o *LanguageStringMap) HasDa() bool { if o != nil && o.Da != nil { return true } @@ -473,12 +473,12 @@ func (o *StringMap) HasDa() bool { } // SetDa gets a reference to the given string and assigns it to the Da field. -func (o *StringMap) SetDa(v string) { +func (o *LanguageStringMap) SetDa(v string) { o.Da = &v } // GetNl returns the Nl field value if set, zero value otherwise. -func (o *StringMap) GetNl() string { +func (o *LanguageStringMap) GetNl() string { if o == nil || o.Nl == nil { var ret string return ret @@ -488,7 +488,7 @@ func (o *StringMap) GetNl() string { // GetNlOk returns a tuple with the Nl field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *StringMap) GetNlOk() (*string, bool) { +func (o *LanguageStringMap) GetNlOk() (*string, bool) { if o == nil || o.Nl == nil { return nil, false } @@ -496,7 +496,7 @@ func (o *StringMap) GetNlOk() (*string, bool) { } // HasNl returns a boolean if a field has been set. -func (o *StringMap) HasNl() bool { +func (o *LanguageStringMap) HasNl() bool { if o != nil && o.Nl != nil { return true } @@ -505,12 +505,12 @@ func (o *StringMap) HasNl() bool { } // SetNl gets a reference to the given string and assigns it to the Nl field. -func (o *StringMap) SetNl(v string) { +func (o *LanguageStringMap) SetNl(v string) { o.Nl = &v } // GetEt returns the Et field value if set, zero value otherwise. -func (o *StringMap) GetEt() string { +func (o *LanguageStringMap) GetEt() string { if o == nil || o.Et == nil { var ret string return ret @@ -520,7 +520,7 @@ func (o *StringMap) GetEt() string { // GetEtOk returns a tuple with the Et field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *StringMap) GetEtOk() (*string, bool) { +func (o *LanguageStringMap) GetEtOk() (*string, bool) { if o == nil || o.Et == nil { return nil, false } @@ -528,7 +528,7 @@ func (o *StringMap) GetEtOk() (*string, bool) { } // HasEt returns a boolean if a field has been set. -func (o *StringMap) HasEt() bool { +func (o *LanguageStringMap) HasEt() bool { if o != nil && o.Et != nil { return true } @@ -537,12 +537,12 @@ func (o *StringMap) HasEt() bool { } // SetEt gets a reference to the given string and assigns it to the Et field. -func (o *StringMap) SetEt(v string) { +func (o *LanguageStringMap) SetEt(v string) { o.Et = &v } // GetFi returns the Fi field value if set, zero value otherwise. -func (o *StringMap) GetFi() string { +func (o *LanguageStringMap) GetFi() string { if o == nil || o.Fi == nil { var ret string return ret @@ -552,7 +552,7 @@ func (o *StringMap) GetFi() string { // GetFiOk returns a tuple with the Fi field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *StringMap) GetFiOk() (*string, bool) { +func (o *LanguageStringMap) GetFiOk() (*string, bool) { if o == nil || o.Fi == nil { return nil, false } @@ -560,7 +560,7 @@ func (o *StringMap) GetFiOk() (*string, bool) { } // HasFi returns a boolean if a field has been set. -func (o *StringMap) HasFi() bool { +func (o *LanguageStringMap) HasFi() bool { if o != nil && o.Fi != nil { return true } @@ -569,12 +569,12 @@ func (o *StringMap) HasFi() bool { } // SetFi gets a reference to the given string and assigns it to the Fi field. -func (o *StringMap) SetFi(v string) { +func (o *LanguageStringMap) SetFi(v string) { o.Fi = &v } // GetFr returns the Fr field value if set, zero value otherwise. -func (o *StringMap) GetFr() string { +func (o *LanguageStringMap) GetFr() string { if o == nil || o.Fr == nil { var ret string return ret @@ -584,7 +584,7 @@ func (o *StringMap) GetFr() string { // GetFrOk returns a tuple with the Fr field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *StringMap) GetFrOk() (*string, bool) { +func (o *LanguageStringMap) GetFrOk() (*string, bool) { if o == nil || o.Fr == nil { return nil, false } @@ -592,7 +592,7 @@ func (o *StringMap) GetFrOk() (*string, bool) { } // HasFr returns a boolean if a field has been set. -func (o *StringMap) HasFr() bool { +func (o *LanguageStringMap) HasFr() bool { if o != nil && o.Fr != nil { return true } @@ -601,12 +601,12 @@ func (o *StringMap) HasFr() bool { } // SetFr gets a reference to the given string and assigns it to the Fr field. -func (o *StringMap) SetFr(v string) { +func (o *LanguageStringMap) SetFr(v string) { o.Fr = &v } // GetKa returns the Ka field value if set, zero value otherwise. -func (o *StringMap) GetKa() string { +func (o *LanguageStringMap) GetKa() string { if o == nil || o.Ka == nil { var ret string return ret @@ -616,7 +616,7 @@ func (o *StringMap) GetKa() string { // GetKaOk returns a tuple with the Ka field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *StringMap) GetKaOk() (*string, bool) { +func (o *LanguageStringMap) GetKaOk() (*string, bool) { if o == nil || o.Ka == nil { return nil, false } @@ -624,7 +624,7 @@ func (o *StringMap) GetKaOk() (*string, bool) { } // HasKa returns a boolean if a field has been set. -func (o *StringMap) HasKa() bool { +func (o *LanguageStringMap) HasKa() bool { if o != nil && o.Ka != nil { return true } @@ -633,12 +633,12 @@ func (o *StringMap) HasKa() bool { } // SetKa gets a reference to the given string and assigns it to the Ka field. -func (o *StringMap) SetKa(v string) { +func (o *LanguageStringMap) SetKa(v string) { o.Ka = &v } // GetDe returns the De field value if set, zero value otherwise. -func (o *StringMap) GetDe() string { +func (o *LanguageStringMap) GetDe() string { if o == nil || o.De == nil { var ret string return ret @@ -648,7 +648,7 @@ func (o *StringMap) GetDe() string { // GetDeOk returns a tuple with the De field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *StringMap) GetDeOk() (*string, bool) { +func (o *LanguageStringMap) GetDeOk() (*string, bool) { if o == nil || o.De == nil { return nil, false } @@ -656,7 +656,7 @@ func (o *StringMap) GetDeOk() (*string, bool) { } // HasDe returns a boolean if a field has been set. -func (o *StringMap) HasDe() bool { +func (o *LanguageStringMap) HasDe() bool { if o != nil && o.De != nil { return true } @@ -665,12 +665,12 @@ func (o *StringMap) HasDe() bool { } // SetDe gets a reference to the given string and assigns it to the De field. -func (o *StringMap) SetDe(v string) { +func (o *LanguageStringMap) SetDe(v string) { o.De = &v } // GetEl returns the El field value if set, zero value otherwise. -func (o *StringMap) GetEl() string { +func (o *LanguageStringMap) GetEl() string { if o == nil || o.El == nil { var ret string return ret @@ -680,7 +680,7 @@ func (o *StringMap) GetEl() string { // GetElOk returns a tuple with the El field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *StringMap) GetElOk() (*string, bool) { +func (o *LanguageStringMap) GetElOk() (*string, bool) { if o == nil || o.El == nil { return nil, false } @@ -688,7 +688,7 @@ func (o *StringMap) GetElOk() (*string, bool) { } // HasEl returns a boolean if a field has been set. -func (o *StringMap) HasEl() bool { +func (o *LanguageStringMap) HasEl() bool { if o != nil && o.El != nil { return true } @@ -697,12 +697,12 @@ func (o *StringMap) HasEl() bool { } // SetEl gets a reference to the given string and assigns it to the El field. -func (o *StringMap) SetEl(v string) { +func (o *LanguageStringMap) SetEl(v string) { o.El = &v } // GetHi returns the Hi field value if set, zero value otherwise. -func (o *StringMap) GetHi() string { +func (o *LanguageStringMap) GetHi() string { if o == nil || o.Hi == nil { var ret string return ret @@ -712,7 +712,7 @@ func (o *StringMap) GetHi() string { // GetHiOk returns a tuple with the Hi field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *StringMap) GetHiOk() (*string, bool) { +func (o *LanguageStringMap) GetHiOk() (*string, bool) { if o == nil || o.Hi == nil { return nil, false } @@ -720,7 +720,7 @@ func (o *StringMap) GetHiOk() (*string, bool) { } // HasHi returns a boolean if a field has been set. -func (o *StringMap) HasHi() bool { +func (o *LanguageStringMap) HasHi() bool { if o != nil && o.Hi != nil { return true } @@ -729,12 +729,12 @@ func (o *StringMap) HasHi() bool { } // SetHi gets a reference to the given string and assigns it to the Hi field. -func (o *StringMap) SetHi(v string) { +func (o *LanguageStringMap) SetHi(v string) { o.Hi = &v } // GetHe returns the He field value if set, zero value otherwise. -func (o *StringMap) GetHe() string { +func (o *LanguageStringMap) GetHe() string { if o == nil || o.He == nil { var ret string return ret @@ -744,7 +744,7 @@ func (o *StringMap) GetHe() string { // GetHeOk returns a tuple with the He field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *StringMap) GetHeOk() (*string, bool) { +func (o *LanguageStringMap) GetHeOk() (*string, bool) { if o == nil || o.He == nil { return nil, false } @@ -752,7 +752,7 @@ func (o *StringMap) GetHeOk() (*string, bool) { } // HasHe returns a boolean if a field has been set. -func (o *StringMap) HasHe() bool { +func (o *LanguageStringMap) HasHe() bool { if o != nil && o.He != nil { return true } @@ -761,12 +761,12 @@ func (o *StringMap) HasHe() bool { } // SetHe gets a reference to the given string and assigns it to the He field. -func (o *StringMap) SetHe(v string) { +func (o *LanguageStringMap) SetHe(v string) { o.He = &v } // GetHu returns the Hu field value if set, zero value otherwise. -func (o *StringMap) GetHu() string { +func (o *LanguageStringMap) GetHu() string { if o == nil || o.Hu == nil { var ret string return ret @@ -776,7 +776,7 @@ func (o *StringMap) GetHu() string { // GetHuOk returns a tuple with the Hu field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *StringMap) GetHuOk() (*string, bool) { +func (o *LanguageStringMap) GetHuOk() (*string, bool) { if o == nil || o.Hu == nil { return nil, false } @@ -784,7 +784,7 @@ func (o *StringMap) GetHuOk() (*string, bool) { } // HasHu returns a boolean if a field has been set. -func (o *StringMap) HasHu() bool { +func (o *LanguageStringMap) HasHu() bool { if o != nil && o.Hu != nil { return true } @@ -793,12 +793,12 @@ func (o *StringMap) HasHu() bool { } // SetHu gets a reference to the given string and assigns it to the Hu field. -func (o *StringMap) SetHu(v string) { +func (o *LanguageStringMap) SetHu(v string) { o.Hu = &v } // GetId returns the Id field value if set, zero value otherwise. -func (o *StringMap) GetId() string { +func (o *LanguageStringMap) GetId() string { if o == nil || o.Id == nil { var ret string return ret @@ -808,7 +808,7 @@ func (o *StringMap) GetId() string { // GetIdOk returns a tuple with the Id field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *StringMap) GetIdOk() (*string, bool) { +func (o *LanguageStringMap) GetIdOk() (*string, bool) { if o == nil || o.Id == nil { return nil, false } @@ -816,7 +816,7 @@ func (o *StringMap) GetIdOk() (*string, bool) { } // HasId returns a boolean if a field has been set. -func (o *StringMap) HasId() bool { +func (o *LanguageStringMap) HasId() bool { if o != nil && o.Id != nil { return true } @@ -825,12 +825,12 @@ func (o *StringMap) HasId() bool { } // SetId gets a reference to the given string and assigns it to the Id field. -func (o *StringMap) SetId(v string) { +func (o *LanguageStringMap) SetId(v string) { o.Id = &v } // GetIt returns the It field value if set, zero value otherwise. -func (o *StringMap) GetIt() string { +func (o *LanguageStringMap) GetIt() string { if o == nil || o.It == nil { var ret string return ret @@ -840,7 +840,7 @@ func (o *StringMap) GetIt() string { // GetItOk returns a tuple with the It field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *StringMap) GetItOk() (*string, bool) { +func (o *LanguageStringMap) GetItOk() (*string, bool) { if o == nil || o.It == nil { return nil, false } @@ -848,7 +848,7 @@ func (o *StringMap) GetItOk() (*string, bool) { } // HasIt returns a boolean if a field has been set. -func (o *StringMap) HasIt() bool { +func (o *LanguageStringMap) HasIt() bool { if o != nil && o.It != nil { return true } @@ -857,12 +857,12 @@ func (o *StringMap) HasIt() bool { } // SetIt gets a reference to the given string and assigns it to the It field. -func (o *StringMap) SetIt(v string) { +func (o *LanguageStringMap) SetIt(v string) { o.It = &v } // GetJa returns the Ja field value if set, zero value otherwise. -func (o *StringMap) GetJa() string { +func (o *LanguageStringMap) GetJa() string { if o == nil || o.Ja == nil { var ret string return ret @@ -872,7 +872,7 @@ func (o *StringMap) GetJa() string { // GetJaOk returns a tuple with the Ja field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *StringMap) GetJaOk() (*string, bool) { +func (o *LanguageStringMap) GetJaOk() (*string, bool) { if o == nil || o.Ja == nil { return nil, false } @@ -880,7 +880,7 @@ func (o *StringMap) GetJaOk() (*string, bool) { } // HasJa returns a boolean if a field has been set. -func (o *StringMap) HasJa() bool { +func (o *LanguageStringMap) HasJa() bool { if o != nil && o.Ja != nil { return true } @@ -889,12 +889,12 @@ func (o *StringMap) HasJa() bool { } // SetJa gets a reference to the given string and assigns it to the Ja field. -func (o *StringMap) SetJa(v string) { +func (o *LanguageStringMap) SetJa(v string) { o.Ja = &v } // GetKo returns the Ko field value if set, zero value otherwise. -func (o *StringMap) GetKo() string { +func (o *LanguageStringMap) GetKo() string { if o == nil || o.Ko == nil { var ret string return ret @@ -904,7 +904,7 @@ func (o *StringMap) GetKo() string { // GetKoOk returns a tuple with the Ko field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *StringMap) GetKoOk() (*string, bool) { +func (o *LanguageStringMap) GetKoOk() (*string, bool) { if o == nil || o.Ko == nil { return nil, false } @@ -912,7 +912,7 @@ func (o *StringMap) GetKoOk() (*string, bool) { } // HasKo returns a boolean if a field has been set. -func (o *StringMap) HasKo() bool { +func (o *LanguageStringMap) HasKo() bool { if o != nil && o.Ko != nil { return true } @@ -921,12 +921,12 @@ func (o *StringMap) HasKo() bool { } // SetKo gets a reference to the given string and assigns it to the Ko field. -func (o *StringMap) SetKo(v string) { +func (o *LanguageStringMap) SetKo(v string) { o.Ko = &v } // GetLv returns the Lv field value if set, zero value otherwise. -func (o *StringMap) GetLv() string { +func (o *LanguageStringMap) GetLv() string { if o == nil || o.Lv == nil { var ret string return ret @@ -936,7 +936,7 @@ func (o *StringMap) GetLv() string { // GetLvOk returns a tuple with the Lv field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *StringMap) GetLvOk() (*string, bool) { +func (o *LanguageStringMap) GetLvOk() (*string, bool) { if o == nil || o.Lv == nil { return nil, false } @@ -944,7 +944,7 @@ func (o *StringMap) GetLvOk() (*string, bool) { } // HasLv returns a boolean if a field has been set. -func (o *StringMap) HasLv() bool { +func (o *LanguageStringMap) HasLv() bool { if o != nil && o.Lv != nil { return true } @@ -953,12 +953,12 @@ func (o *StringMap) HasLv() bool { } // SetLv gets a reference to the given string and assigns it to the Lv field. -func (o *StringMap) SetLv(v string) { +func (o *LanguageStringMap) SetLv(v string) { o.Lv = &v } // GetLt returns the Lt field value if set, zero value otherwise. -func (o *StringMap) GetLt() string { +func (o *LanguageStringMap) GetLt() string { if o == nil || o.Lt == nil { var ret string return ret @@ -968,7 +968,7 @@ func (o *StringMap) GetLt() string { // GetLtOk returns a tuple with the Lt field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *StringMap) GetLtOk() (*string, bool) { +func (o *LanguageStringMap) GetLtOk() (*string, bool) { if o == nil || o.Lt == nil { return nil, false } @@ -976,7 +976,7 @@ func (o *StringMap) GetLtOk() (*string, bool) { } // HasLt returns a boolean if a field has been set. -func (o *StringMap) HasLt() bool { +func (o *LanguageStringMap) HasLt() bool { if o != nil && o.Lt != nil { return true } @@ -985,12 +985,12 @@ func (o *StringMap) HasLt() bool { } // SetLt gets a reference to the given string and assigns it to the Lt field. -func (o *StringMap) SetLt(v string) { +func (o *LanguageStringMap) SetLt(v string) { o.Lt = &v } // GetMs returns the Ms field value if set, zero value otherwise. -func (o *StringMap) GetMs() string { +func (o *LanguageStringMap) GetMs() string { if o == nil || o.Ms == nil { var ret string return ret @@ -1000,7 +1000,7 @@ func (o *StringMap) GetMs() string { // GetMsOk returns a tuple with the Ms field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *StringMap) GetMsOk() (*string, bool) { +func (o *LanguageStringMap) GetMsOk() (*string, bool) { if o == nil || o.Ms == nil { return nil, false } @@ -1008,7 +1008,7 @@ func (o *StringMap) GetMsOk() (*string, bool) { } // HasMs returns a boolean if a field has been set. -func (o *StringMap) HasMs() bool { +func (o *LanguageStringMap) HasMs() bool { if o != nil && o.Ms != nil { return true } @@ -1017,12 +1017,12 @@ func (o *StringMap) HasMs() bool { } // SetMs gets a reference to the given string and assigns it to the Ms field. -func (o *StringMap) SetMs(v string) { +func (o *LanguageStringMap) SetMs(v string) { o.Ms = &v } // GetNb returns the Nb field value if set, zero value otherwise. -func (o *StringMap) GetNb() string { +func (o *LanguageStringMap) GetNb() string { if o == nil || o.Nb == nil { var ret string return ret @@ -1032,7 +1032,7 @@ func (o *StringMap) GetNb() string { // GetNbOk returns a tuple with the Nb field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *StringMap) GetNbOk() (*string, bool) { +func (o *LanguageStringMap) GetNbOk() (*string, bool) { if o == nil || o.Nb == nil { return nil, false } @@ -1040,7 +1040,7 @@ func (o *StringMap) GetNbOk() (*string, bool) { } // HasNb returns a boolean if a field has been set. -func (o *StringMap) HasNb() bool { +func (o *LanguageStringMap) HasNb() bool { if o != nil && o.Nb != nil { return true } @@ -1049,12 +1049,12 @@ func (o *StringMap) HasNb() bool { } // SetNb gets a reference to the given string and assigns it to the Nb field. -func (o *StringMap) SetNb(v string) { +func (o *LanguageStringMap) SetNb(v string) { o.Nb = &v } // GetPl returns the Pl field value if set, zero value otherwise. -func (o *StringMap) GetPl() string { +func (o *LanguageStringMap) GetPl() string { if o == nil || o.Pl == nil { var ret string return ret @@ -1064,7 +1064,7 @@ func (o *StringMap) GetPl() string { // GetPlOk returns a tuple with the Pl field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *StringMap) GetPlOk() (*string, bool) { +func (o *LanguageStringMap) GetPlOk() (*string, bool) { if o == nil || o.Pl == nil { return nil, false } @@ -1072,7 +1072,7 @@ func (o *StringMap) GetPlOk() (*string, bool) { } // HasPl returns a boolean if a field has been set. -func (o *StringMap) HasPl() bool { +func (o *LanguageStringMap) HasPl() bool { if o != nil && o.Pl != nil { return true } @@ -1081,12 +1081,12 @@ func (o *StringMap) HasPl() bool { } // SetPl gets a reference to the given string and assigns it to the Pl field. -func (o *StringMap) SetPl(v string) { +func (o *LanguageStringMap) SetPl(v string) { o.Pl = &v } // GetFa returns the Fa field value if set, zero value otherwise. -func (o *StringMap) GetFa() string { +func (o *LanguageStringMap) GetFa() string { if o == nil || o.Fa == nil { var ret string return ret @@ -1096,7 +1096,7 @@ func (o *StringMap) GetFa() string { // GetFaOk returns a tuple with the Fa field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *StringMap) GetFaOk() (*string, bool) { +func (o *LanguageStringMap) GetFaOk() (*string, bool) { if o == nil || o.Fa == nil { return nil, false } @@ -1104,7 +1104,7 @@ func (o *StringMap) GetFaOk() (*string, bool) { } // HasFa returns a boolean if a field has been set. -func (o *StringMap) HasFa() bool { +func (o *LanguageStringMap) HasFa() bool { if o != nil && o.Fa != nil { return true } @@ -1113,12 +1113,12 @@ func (o *StringMap) HasFa() bool { } // SetFa gets a reference to the given string and assigns it to the Fa field. -func (o *StringMap) SetFa(v string) { +func (o *LanguageStringMap) SetFa(v string) { o.Fa = &v } // GetPt returns the Pt field value if set, zero value otherwise. -func (o *StringMap) GetPt() string { +func (o *LanguageStringMap) GetPt() string { if o == nil || o.Pt == nil { var ret string return ret @@ -1128,7 +1128,7 @@ func (o *StringMap) GetPt() string { // GetPtOk returns a tuple with the Pt field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *StringMap) GetPtOk() (*string, bool) { +func (o *LanguageStringMap) GetPtOk() (*string, bool) { if o == nil || o.Pt == nil { return nil, false } @@ -1136,7 +1136,7 @@ func (o *StringMap) GetPtOk() (*string, bool) { } // HasPt returns a boolean if a field has been set. -func (o *StringMap) HasPt() bool { +func (o *LanguageStringMap) HasPt() bool { if o != nil && o.Pt != nil { return true } @@ -1145,12 +1145,12 @@ func (o *StringMap) HasPt() bool { } // SetPt gets a reference to the given string and assigns it to the Pt field. -func (o *StringMap) SetPt(v string) { +func (o *LanguageStringMap) SetPt(v string) { o.Pt = &v } // GetPa returns the Pa field value if set, zero value otherwise. -func (o *StringMap) GetPa() string { +func (o *LanguageStringMap) GetPa() string { if o == nil || o.Pa == nil { var ret string return ret @@ -1160,7 +1160,7 @@ func (o *StringMap) GetPa() string { // GetPaOk returns a tuple with the Pa field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *StringMap) GetPaOk() (*string, bool) { +func (o *LanguageStringMap) GetPaOk() (*string, bool) { if o == nil || o.Pa == nil { return nil, false } @@ -1168,7 +1168,7 @@ func (o *StringMap) GetPaOk() (*string, bool) { } // HasPa returns a boolean if a field has been set. -func (o *StringMap) HasPa() bool { +func (o *LanguageStringMap) HasPa() bool { if o != nil && o.Pa != nil { return true } @@ -1177,12 +1177,12 @@ func (o *StringMap) HasPa() bool { } // SetPa gets a reference to the given string and assigns it to the Pa field. -func (o *StringMap) SetPa(v string) { +func (o *LanguageStringMap) SetPa(v string) { o.Pa = &v } // GetRo returns the Ro field value if set, zero value otherwise. -func (o *StringMap) GetRo() string { +func (o *LanguageStringMap) GetRo() string { if o == nil || o.Ro == nil { var ret string return ret @@ -1192,7 +1192,7 @@ func (o *StringMap) GetRo() string { // GetRoOk returns a tuple with the Ro field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *StringMap) GetRoOk() (*string, bool) { +func (o *LanguageStringMap) GetRoOk() (*string, bool) { if o == nil || o.Ro == nil { return nil, false } @@ -1200,7 +1200,7 @@ func (o *StringMap) GetRoOk() (*string, bool) { } // HasRo returns a boolean if a field has been set. -func (o *StringMap) HasRo() bool { +func (o *LanguageStringMap) HasRo() bool { if o != nil && o.Ro != nil { return true } @@ -1209,12 +1209,12 @@ func (o *StringMap) HasRo() bool { } // SetRo gets a reference to the given string and assigns it to the Ro field. -func (o *StringMap) SetRo(v string) { +func (o *LanguageStringMap) SetRo(v string) { o.Ro = &v } // GetRu returns the Ru field value if set, zero value otherwise. -func (o *StringMap) GetRu() string { +func (o *LanguageStringMap) GetRu() string { if o == nil || o.Ru == nil { var ret string return ret @@ -1224,7 +1224,7 @@ func (o *StringMap) GetRu() string { // GetRuOk returns a tuple with the Ru field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *StringMap) GetRuOk() (*string, bool) { +func (o *LanguageStringMap) GetRuOk() (*string, bool) { if o == nil || o.Ru == nil { return nil, false } @@ -1232,7 +1232,7 @@ func (o *StringMap) GetRuOk() (*string, bool) { } // HasRu returns a boolean if a field has been set. -func (o *StringMap) HasRu() bool { +func (o *LanguageStringMap) HasRu() bool { if o != nil && o.Ru != nil { return true } @@ -1241,12 +1241,12 @@ func (o *StringMap) HasRu() bool { } // SetRu gets a reference to the given string and assigns it to the Ru field. -func (o *StringMap) SetRu(v string) { +func (o *LanguageStringMap) SetRu(v string) { o.Ru = &v } // GetSr returns the Sr field value if set, zero value otherwise. -func (o *StringMap) GetSr() string { +func (o *LanguageStringMap) GetSr() string { if o == nil || o.Sr == nil { var ret string return ret @@ -1256,7 +1256,7 @@ func (o *StringMap) GetSr() string { // GetSrOk returns a tuple with the Sr field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *StringMap) GetSrOk() (*string, bool) { +func (o *LanguageStringMap) GetSrOk() (*string, bool) { if o == nil || o.Sr == nil { return nil, false } @@ -1264,7 +1264,7 @@ func (o *StringMap) GetSrOk() (*string, bool) { } // HasSr returns a boolean if a field has been set. -func (o *StringMap) HasSr() bool { +func (o *LanguageStringMap) HasSr() bool { if o != nil && o.Sr != nil { return true } @@ -1273,12 +1273,12 @@ func (o *StringMap) HasSr() bool { } // SetSr gets a reference to the given string and assigns it to the Sr field. -func (o *StringMap) SetSr(v string) { +func (o *LanguageStringMap) SetSr(v string) { o.Sr = &v } // GetSk returns the Sk field value if set, zero value otherwise. -func (o *StringMap) GetSk() string { +func (o *LanguageStringMap) GetSk() string { if o == nil || o.Sk == nil { var ret string return ret @@ -1288,7 +1288,7 @@ func (o *StringMap) GetSk() string { // GetSkOk returns a tuple with the Sk field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *StringMap) GetSkOk() (*string, bool) { +func (o *LanguageStringMap) GetSkOk() (*string, bool) { if o == nil || o.Sk == nil { return nil, false } @@ -1296,7 +1296,7 @@ func (o *StringMap) GetSkOk() (*string, bool) { } // HasSk returns a boolean if a field has been set. -func (o *StringMap) HasSk() bool { +func (o *LanguageStringMap) HasSk() bool { if o != nil && o.Sk != nil { return true } @@ -1305,12 +1305,12 @@ func (o *StringMap) HasSk() bool { } // SetSk gets a reference to the given string and assigns it to the Sk field. -func (o *StringMap) SetSk(v string) { +func (o *LanguageStringMap) SetSk(v string) { o.Sk = &v } // GetEs returns the Es field value if set, zero value otherwise. -func (o *StringMap) GetEs() string { +func (o *LanguageStringMap) GetEs() string { if o == nil || o.Es == nil { var ret string return ret @@ -1320,7 +1320,7 @@ func (o *StringMap) GetEs() string { // GetEsOk returns a tuple with the Es field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *StringMap) GetEsOk() (*string, bool) { +func (o *LanguageStringMap) GetEsOk() (*string, bool) { if o == nil || o.Es == nil { return nil, false } @@ -1328,7 +1328,7 @@ func (o *StringMap) GetEsOk() (*string, bool) { } // HasEs returns a boolean if a field has been set. -func (o *StringMap) HasEs() bool { +func (o *LanguageStringMap) HasEs() bool { if o != nil && o.Es != nil { return true } @@ -1337,12 +1337,12 @@ func (o *StringMap) HasEs() bool { } // SetEs gets a reference to the given string and assigns it to the Es field. -func (o *StringMap) SetEs(v string) { +func (o *LanguageStringMap) SetEs(v string) { o.Es = &v } // GetSv returns the Sv field value if set, zero value otherwise. -func (o *StringMap) GetSv() string { +func (o *LanguageStringMap) GetSv() string { if o == nil || o.Sv == nil { var ret string return ret @@ -1352,7 +1352,7 @@ func (o *StringMap) GetSv() string { // GetSvOk returns a tuple with the Sv field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *StringMap) GetSvOk() (*string, bool) { +func (o *LanguageStringMap) GetSvOk() (*string, bool) { if o == nil || o.Sv == nil { return nil, false } @@ -1360,7 +1360,7 @@ func (o *StringMap) GetSvOk() (*string, bool) { } // HasSv returns a boolean if a field has been set. -func (o *StringMap) HasSv() bool { +func (o *LanguageStringMap) HasSv() bool { if o != nil && o.Sv != nil { return true } @@ -1369,12 +1369,12 @@ func (o *StringMap) HasSv() bool { } // SetSv gets a reference to the given string and assigns it to the Sv field. -func (o *StringMap) SetSv(v string) { +func (o *LanguageStringMap) SetSv(v string) { o.Sv = &v } // GetTh returns the Th field value if set, zero value otherwise. -func (o *StringMap) GetTh() string { +func (o *LanguageStringMap) GetTh() string { if o == nil || o.Th == nil { var ret string return ret @@ -1384,7 +1384,7 @@ func (o *StringMap) GetTh() string { // GetThOk returns a tuple with the Th field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *StringMap) GetThOk() (*string, bool) { +func (o *LanguageStringMap) GetThOk() (*string, bool) { if o == nil || o.Th == nil { return nil, false } @@ -1392,7 +1392,7 @@ func (o *StringMap) GetThOk() (*string, bool) { } // HasTh returns a boolean if a field has been set. -func (o *StringMap) HasTh() bool { +func (o *LanguageStringMap) HasTh() bool { if o != nil && o.Th != nil { return true } @@ -1401,12 +1401,12 @@ func (o *StringMap) HasTh() bool { } // SetTh gets a reference to the given string and assigns it to the Th field. -func (o *StringMap) SetTh(v string) { +func (o *LanguageStringMap) SetTh(v string) { o.Th = &v } // GetTr returns the Tr field value if set, zero value otherwise. -func (o *StringMap) GetTr() string { +func (o *LanguageStringMap) GetTr() string { if o == nil || o.Tr == nil { var ret string return ret @@ -1416,7 +1416,7 @@ func (o *StringMap) GetTr() string { // GetTrOk returns a tuple with the Tr field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *StringMap) GetTrOk() (*string, bool) { +func (o *LanguageStringMap) GetTrOk() (*string, bool) { if o == nil || o.Tr == nil { return nil, false } @@ -1424,7 +1424,7 @@ func (o *StringMap) GetTrOk() (*string, bool) { } // HasTr returns a boolean if a field has been set. -func (o *StringMap) HasTr() bool { +func (o *LanguageStringMap) HasTr() bool { if o != nil && o.Tr != nil { return true } @@ -1433,12 +1433,12 @@ func (o *StringMap) HasTr() bool { } // SetTr gets a reference to the given string and assigns it to the Tr field. -func (o *StringMap) SetTr(v string) { +func (o *LanguageStringMap) SetTr(v string) { o.Tr = &v } // GetUk returns the Uk field value if set, zero value otherwise. -func (o *StringMap) GetUk() string { +func (o *LanguageStringMap) GetUk() string { if o == nil || o.Uk == nil { var ret string return ret @@ -1448,7 +1448,7 @@ func (o *StringMap) GetUk() string { // GetUkOk returns a tuple with the Uk field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *StringMap) GetUkOk() (*string, bool) { +func (o *LanguageStringMap) GetUkOk() (*string, bool) { if o == nil || o.Uk == nil { return nil, false } @@ -1456,7 +1456,7 @@ func (o *StringMap) GetUkOk() (*string, bool) { } // HasUk returns a boolean if a field has been set. -func (o *StringMap) HasUk() bool { +func (o *LanguageStringMap) HasUk() bool { if o != nil && o.Uk != nil { return true } @@ -1465,12 +1465,12 @@ func (o *StringMap) HasUk() bool { } // SetUk gets a reference to the given string and assigns it to the Uk field. -func (o *StringMap) SetUk(v string) { +func (o *LanguageStringMap) SetUk(v string) { o.Uk = &v } // GetVi returns the Vi field value if set, zero value otherwise. -func (o *StringMap) GetVi() string { +func (o *LanguageStringMap) GetVi() string { if o == nil || o.Vi == nil { var ret string return ret @@ -1480,7 +1480,7 @@ func (o *StringMap) GetVi() string { // GetViOk returns a tuple with the Vi field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *StringMap) GetViOk() (*string, bool) { +func (o *LanguageStringMap) GetViOk() (*string, bool) { if o == nil || o.Vi == nil { return nil, false } @@ -1488,7 +1488,7 @@ func (o *StringMap) GetViOk() (*string, bool) { } // HasVi returns a boolean if a field has been set. -func (o *StringMap) HasVi() bool { +func (o *LanguageStringMap) HasVi() bool { if o != nil && o.Vi != nil { return true } @@ -1497,11 +1497,11 @@ func (o *StringMap) HasVi() bool { } // SetVi gets a reference to the given string and assigns it to the Vi field. -func (o *StringMap) SetVi(v string) { +func (o *LanguageStringMap) SetVi(v string) { o.Vi = &v } -func (o StringMap) MarshalJSON() ([]byte, error) { +func (o LanguageStringMap) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.En != nil { toSerialize["en"] = o.En @@ -1640,11 +1640,11 @@ func (o StringMap) MarshalJSON() ([]byte, error) { return json.Marshal(toSerialize) } -func (o *StringMap) UnmarshalJSON(bytes []byte) (err error) { - varStringMap := _StringMap{} +func (o *LanguageStringMap) UnmarshalJSON(bytes []byte) (err error) { + varLanguageStringMap := _LanguageStringMap{} - if err = json.Unmarshal(bytes, &varStringMap); err == nil { - *o = StringMap(varStringMap) + if err = json.Unmarshal(bytes, &varLanguageStringMap); err == nil { + *o = LanguageStringMap(varLanguageStringMap) } additionalProperties := make(map[string]interface{}) @@ -1699,38 +1699,38 @@ func (o *StringMap) UnmarshalJSON(bytes []byte) (err error) { return err } -type NullableStringMap struct { - value *StringMap +type NullableLanguageStringMap struct { + value *LanguageStringMap isSet bool } -func (v NullableStringMap) Get() *StringMap { +func (v NullableLanguageStringMap) Get() *LanguageStringMap { return v.value } -func (v *NullableStringMap) Set(val *StringMap) { +func (v *NullableLanguageStringMap) Set(val *LanguageStringMap) { v.value = val v.isSet = true } -func (v NullableStringMap) IsSet() bool { +func (v NullableLanguageStringMap) IsSet() bool { return v.isSet } -func (v *NullableStringMap) Unset() { +func (v *NullableLanguageStringMap) Unset() { v.value = nil v.isSet = false } -func NewNullableStringMap(val *StringMap) *NullableStringMap { - return &NullableStringMap{value: val, isSet: true} +func NewNullableLanguageStringMap(val *LanguageStringMap) *NullableLanguageStringMap { + return &NullableLanguageStringMap{value: val, isSet: true} } -func (v NullableStringMap) MarshalJSON() ([]byte, error) { +func (v NullableLanguageStringMap) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } -func (v *NullableStringMap) UnmarshalJSON(src []byte) error { +func (v *NullableLanguageStringMap) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } diff --git a/model_notification.go b/model_notification.go index 77b2f1f..ab10463 100644 --- a/model_notification.go +++ b/model_notification.go @@ -3,7 +3,7 @@ OneSignal A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com -API version: 1.4.0 +API version: 5.0.1 Contact: devrel@onesignal.com */ @@ -22,29 +22,26 @@ type Notification struct { IncludedSegments []string `json:"included_segments,omitempty"` // Segment that will be excluded when sending. Users in these segments will not receive a notification, even if they were included in included_segments. This targeting parameter is only compatible with included_segments. Example: [\"Active Users\", \"Inactive Users\"] ExcludedSegments []string `json:"excluded_segments,omitempty"` - // 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 - // Deprecated - IncludePlayerIds []string `json:"include_player_ids,omitempty"` - // 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. - // Deprecated - IncludeExternalUserIds []string `json:"include_external_user_ids,omitempty"` + // 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 + IncludeSubscriptionIds []string `json:"include_subscription_ids,omitempty"` // 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 IncludeEmailTokens []string `json:"include_email_tokens,omitempty"` // Recommended for Sending SMS - Target specific phone numbers. The phone number should be in the E.164 format. Phone number should be an existing subscriber on OneSignal. Refer our docs to learn how to add phone numbers to OneSignal. Example phone number: +1999999999 Limit of 2,000 entries per REST API call IncludePhoneNumbers []string `json:"include_phone_numbers,omitempty"` - // 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 IncludeIosTokens []string `json:"include_ios_tokens,omitempty"` - // 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 IncludeWpWnsUris []string `json:"include_wp_wns_uris,omitempty"` - // 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 IncludeAmazonRegIds []string `json:"include_amazon_reg_ids,omitempty"` - // 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 IncludeChromeRegIds []string `json:"include_chrome_reg_ids,omitempty"` - // 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 IncludeChromeWebRegIds []string `json:"include_chrome_web_reg_ids,omitempty"` - // 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 IncludeAndroidRegIds []string `json:"include_android_reg_ids,omitempty"` - IncludeAliases NullablePlayerNotificationTargetIncludeAliases `json:"include_aliases,omitempty"` + // 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. + IncludeAliases map[string][]string `json:"include_aliases,omitempty"` TargetChannel *string `json:"target_channel,omitempty"` Id *string `json:"id,omitempty"` Value *int32 `json:"value,omitempty"` @@ -71,8 +68,6 @@ type Notification struct { IsAdm NullableBool `json:"isAdm,omitempty"` // This flag is not used for web push Please see isChromeWeb for sending to web push users. This flag only applies to Google Chrome Apps & Extensions. Indicates whether to send to all devices registered under your app's Google Chrome Apps & Extension platform. IsChrome NullableBool `json:"isChrome,omitempty"` - // 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. - ChannelForExternalUserIds *string `json:"channel_for_external_user_ids,omitempty"` // 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. AppId string `json:"app_id"` // [DEPRECATED] Correlation and idempotency key. A request received with this parameter will first look for another notification with the same external_id. If one exists, a notification will not be sent, and result of the previous operation will instead be returned. Therefore, if you plan on using this feature, it's important to use a good source of randomness to generate the UUID passed here. This key is only idempotent for 30 days. After 30 days, the notification could be removed from our system and a notification with the same external_id will be sent again. See Idempotent Notification Requests for more details writeOnly: true @@ -80,9 +75,9 @@ type Notification struct { ExternalId NullableString `json:"external_id,omitempty"` // Correlation and idempotency key. A request received with this parameter will first look for another notification with the same idempotency key. If one exists, a notification will not be sent, and result of the previous operation will instead be returned. Therefore, if you plan on using this feature, it's important to use a good source of randomness to generate the UUID passed here. This key is only idempotent for 30 days. After 30 days, the notification could be removed from our system and a notification with the same idempotency key will be sent again. See Idempotent Notification Requests for more details writeOnly: true IdempotencyKey NullableString `json:"idempotency_key,omitempty"` - Contents NullableStringMap `json:"contents,omitempty"` - Headings NullableStringMap `json:"headings,omitempty"` - Subtitle NullableStringMap `json:"subtitle,omitempty"` + Contents NullableLanguageStringMap `json:"contents,omitempty"` + Headings NullableLanguageStringMap `json:"headings,omitempty"` + Subtitle NullableLanguageStringMap `json:"subtitle,omitempty"` // 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} Data map[string]interface{} `json:"data,omitempty"` // Channel: Push Notifications Platform: Huawei Use \"data\" or \"message\" depending on the type of notification you are sending. More details in Data & Background Notifications. @@ -116,7 +111,7 @@ type Notification struct { // Channel: Push Notifications Platform: iOS 8.0+, Android 4.1+, and derivatives like Amazon Buttons to add to the notification. Icon only works for Android. Buttons show in reverse order of array position i.e. Last item in array shows as first button on device. Example: [{\"id\": \"id2\", \"text\": \"second button\", \"icon\": \"ic_menu_share\"}, {\"id\": \"id1\", \"text\": \"first button\", \"icon\": \"ic_menu_send\"}] Buttons []Button `json:"buttons,omitempty"` // 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\"}] - WebButtons []Button `json:"web_buttons,omitempty"` + WebButtons []WebButton `json:"web_buttons,omitempty"` // 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. IosCategory NullableString `json:"ios_category,omitempty"` // Channel: Push Notifications Platform: Android The Android Oreo Notification Category to send the notification under. See the Category documentation on creating one and getting it's id. @@ -206,6 +201,10 @@ type Notification struct { SummaryArg *string `json:"summary_arg,omitempty"` // Channel: Push Notifications Platform: iOS 12+ When using thread_id, you can also control the count of the number of notifications in the group. For example, if the group already has 12 notifications, and you send a new notification with summary_arg_count = 2, the new total will be 14 and the summary will be \"14 more notifications from summary_arg\" SummaryArgCount *int32 `json:"summary_arg_count,omitempty"` + // 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. + IosRelevanceScore NullableFloat32 `json:"ios_relevance_score,omitempty"` + // 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. + IosInterruptionLevel NullableString `json:"ios_interruption_level,omitempty"` // Channel: Email Required. The subject of the email. EmailSubject NullableString `json:"email_subject,omitempty"` // Channel: Email Required unless template_id is set. HTML suported The body of the email you wish to send. Typically, customers include their own HTML templates here. Must include [unsubscribe_url] in an tag somewhere in the email. Note: any malformed HTML content will be sent to users. Please double-check your HTML is valid. @@ -222,7 +221,7 @@ type Notification struct { SmsFrom NullableString `json:"sms_from,omitempty"` // Channel: SMS URLs for the media files to be attached to the SMS content. Limit: 10 media urls with a total max. size of 5MBs. SmsMediaUrls []string `json:"sms_media_urls,omitempty"` - Filters []Filter `json:"filters,omitempty"` + Filters []FilterExpression `json:"filters,omitempty"` // 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} CustomData map[string]interface{} `json:"custom_data,omitempty"` // Channel: All Schedule notification for future delivery. API defaults to UTC -1100 Examples: All examples are the exact same date & time. \"Thu Sep 24 2015 14:00:00 GMT-0700 (PDT)\" \"September 24th 2015, 2:00:00 pm UTC-07:00\" \"2015-09-24 14:00:00 GMT-0700\" \"Sept 24 2015 14:00:00 GMT-0700\" \"Thu Sep 24 2015 14:00:00 GMT-0700 (Pacific Daylight Time)\" Note: SMS currently only supports send_after parameter. @@ -314,76 +313,37 @@ func (o *Notification) SetExcludedSegments(v []string) { o.ExcludedSegments = v } -// GetIncludePlayerIds returns the IncludePlayerIds field value if set, zero value otherwise (both if not set or set to explicit null). -// Deprecated -func (o *Notification) GetIncludePlayerIds() []string { +// GetIncludeSubscriptionIds returns the IncludeSubscriptionIds field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Notification) GetIncludeSubscriptionIds() []string { if o == nil { var ret []string return ret } - return o.IncludePlayerIds + return o.IncludeSubscriptionIds } -// GetIncludePlayerIdsOk returns a tuple with the IncludePlayerIds field value if set, nil otherwise +// GetIncludeSubscriptionIdsOk returns a tuple with the IncludeSubscriptionIds field value if set, nil otherwise // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -// Deprecated -func (o *Notification) GetIncludePlayerIdsOk() ([]string, bool) { - if o == nil || o.IncludePlayerIds == nil { +func (o *Notification) GetIncludeSubscriptionIdsOk() ([]string, bool) { + if o == nil || o.IncludeSubscriptionIds == nil { return nil, false } - return o.IncludePlayerIds, true + return o.IncludeSubscriptionIds, true } -// HasIncludePlayerIds returns a boolean if a field has been set. -func (o *Notification) HasIncludePlayerIds() bool { - if o != nil && o.IncludePlayerIds != nil { +// HasIncludeSubscriptionIds returns a boolean if a field has been set. +func (o *Notification) HasIncludeSubscriptionIds() bool { + if o != nil && o.IncludeSubscriptionIds != nil { return true } return false } -// SetIncludePlayerIds gets a reference to the given []string and assigns it to the IncludePlayerIds field. -// Deprecated -func (o *Notification) SetIncludePlayerIds(v []string) { - o.IncludePlayerIds = v -} - -// GetIncludeExternalUserIds returns the IncludeExternalUserIds field value if set, zero value otherwise (both if not set or set to explicit null). -// Deprecated -func (o *Notification) GetIncludeExternalUserIds() []string { - if o == nil { - var ret []string - return ret - } - return o.IncludeExternalUserIds -} - -// GetIncludeExternalUserIdsOk returns a tuple with the IncludeExternalUserIds field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -// Deprecated -func (o *Notification) GetIncludeExternalUserIdsOk() ([]string, bool) { - if o == nil || o.IncludeExternalUserIds == nil { - return nil, false - } - return o.IncludeExternalUserIds, true -} - -// HasIncludeExternalUserIds returns a boolean if a field has been set. -func (o *Notification) HasIncludeExternalUserIds() bool { - if o != nil && o.IncludeExternalUserIds != nil { - return true - } - - return false -} - -// SetIncludeExternalUserIds gets a reference to the given []string and assigns it to the IncludeExternalUserIds field. -// Deprecated -func (o *Notification) SetIncludeExternalUserIds(v []string) { - o.IncludeExternalUserIds = v +// SetIncludeSubscriptionIds gets a reference to the given []string and assigns it to the IncludeSubscriptionIds field. +func (o *Notification) SetIncludeSubscriptionIds(v []string) { + o.IncludeSubscriptionIds = v } // GetIncludeEmailTokens returns the IncludeEmailTokens field value if set, zero value otherwise. @@ -643,45 +603,36 @@ func (o *Notification) SetIncludeAndroidRegIds(v []string) { } // GetIncludeAliases returns the IncludeAliases field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *Notification) GetIncludeAliases() PlayerNotificationTargetIncludeAliases { - if o == nil || o.IncludeAliases.Get() == nil { - var ret PlayerNotificationTargetIncludeAliases +func (o *Notification) GetIncludeAliases() map[string][]string { + if o == nil { + var ret map[string][]string return ret } - return *o.IncludeAliases.Get() + return o.IncludeAliases } // GetIncludeAliasesOk returns a tuple with the IncludeAliases field value if set, nil otherwise // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Notification) GetIncludeAliasesOk() (*PlayerNotificationTargetIncludeAliases, bool) { - if o == nil { +func (o *Notification) GetIncludeAliasesOk() (*map[string][]string, bool) { + if o == nil || o.IncludeAliases == nil { return nil, false } - return o.IncludeAliases.Get(), o.IncludeAliases.IsSet() + return &o.IncludeAliases, true } // HasIncludeAliases returns a boolean if a field has been set. func (o *Notification) HasIncludeAliases() bool { - if o != nil && o.IncludeAliases.IsSet() { + if o != nil && o.IncludeAliases != nil { return true } return false } -// SetIncludeAliases gets a reference to the given NullablePlayerNotificationTargetIncludeAliases and assigns it to the IncludeAliases field. -func (o *Notification) SetIncludeAliases(v PlayerNotificationTargetIncludeAliases) { - o.IncludeAliases.Set(&v) -} -// SetIncludeAliasesNil sets the value for IncludeAliases to be an explicit nil -func (o *Notification) SetIncludeAliasesNil() { - o.IncludeAliases.Set(nil) -} - -// UnsetIncludeAliases ensures that no value is present for IncludeAliases, not even an explicit nil -func (o *Notification) UnsetIncludeAliases() { - o.IncludeAliases.Unset() +// SetIncludeAliases gets a reference to the given map[string][]string and assigns it to the IncludeAliases field. +func (o *Notification) SetIncludeAliases(v map[string][]string) { + o.IncludeAliases = v } // GetTargetChannel returns the TargetChannel field value if set, zero value otherwise. @@ -1274,38 +1225,6 @@ func (o *Notification) UnsetIsChrome() { o.IsChrome.Unset() } -// GetChannelForExternalUserIds returns the ChannelForExternalUserIds field value if set, zero value otherwise. -func (o *Notification) GetChannelForExternalUserIds() string { - if o == nil || o.ChannelForExternalUserIds == nil { - var ret string - return ret - } - return *o.ChannelForExternalUserIds -} - -// GetChannelForExternalUserIdsOk returns a tuple with the ChannelForExternalUserIds field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Notification) GetChannelForExternalUserIdsOk() (*string, bool) { - if o == nil || o.ChannelForExternalUserIds == nil { - return nil, false - } - return o.ChannelForExternalUserIds, true -} - -// HasChannelForExternalUserIds returns a boolean if a field has been set. -func (o *Notification) HasChannelForExternalUserIds() bool { - if o != nil && o.ChannelForExternalUserIds != nil { - return true - } - - return false -} - -// SetChannelForExternalUserIds gets a reference to the given string and assigns it to the ChannelForExternalUserIds field. -func (o *Notification) SetChannelForExternalUserIds(v string) { - o.ChannelForExternalUserIds = &v -} - // GetAppId returns the AppId field value func (o *Notification) GetAppId() string { if o == nil { @@ -1418,9 +1337,9 @@ func (o *Notification) UnsetIdempotencyKey() { } // GetContents returns the Contents field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *Notification) GetContents() StringMap { +func (o *Notification) GetContents() LanguageStringMap { if o == nil || o.Contents.Get() == nil { - var ret StringMap + var ret LanguageStringMap return ret } return *o.Contents.Get() @@ -1429,7 +1348,7 @@ func (o *Notification) GetContents() StringMap { // GetContentsOk returns a tuple with the Contents field value if set, nil otherwise // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Notification) GetContentsOk() (*StringMap, bool) { +func (o *Notification) GetContentsOk() (*LanguageStringMap, bool) { if o == nil { return nil, false } @@ -1445,8 +1364,8 @@ func (o *Notification) HasContents() bool { return false } -// SetContents gets a reference to the given NullableStringMap and assigns it to the Contents field. -func (o *Notification) SetContents(v StringMap) { +// SetContents gets a reference to the given NullableLanguageStringMap and assigns it to the Contents field. +func (o *Notification) SetContents(v LanguageStringMap) { o.Contents.Set(&v) } // SetContentsNil sets the value for Contents to be an explicit nil @@ -1460,9 +1379,9 @@ func (o *Notification) UnsetContents() { } // GetHeadings returns the Headings field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *Notification) GetHeadings() StringMap { +func (o *Notification) GetHeadings() LanguageStringMap { if o == nil || o.Headings.Get() == nil { - var ret StringMap + var ret LanguageStringMap return ret } return *o.Headings.Get() @@ -1471,7 +1390,7 @@ func (o *Notification) GetHeadings() StringMap { // GetHeadingsOk returns a tuple with the Headings field value if set, nil otherwise // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Notification) GetHeadingsOk() (*StringMap, bool) { +func (o *Notification) GetHeadingsOk() (*LanguageStringMap, bool) { if o == nil { return nil, false } @@ -1487,8 +1406,8 @@ func (o *Notification) HasHeadings() bool { return false } -// SetHeadings gets a reference to the given NullableStringMap and assigns it to the Headings field. -func (o *Notification) SetHeadings(v StringMap) { +// SetHeadings gets a reference to the given NullableLanguageStringMap and assigns it to the Headings field. +func (o *Notification) SetHeadings(v LanguageStringMap) { o.Headings.Set(&v) } // SetHeadingsNil sets the value for Headings to be an explicit nil @@ -1502,9 +1421,9 @@ func (o *Notification) UnsetHeadings() { } // GetSubtitle returns the Subtitle field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *Notification) GetSubtitle() StringMap { +func (o *Notification) GetSubtitle() LanguageStringMap { if o == nil || o.Subtitle.Get() == nil { - var ret StringMap + var ret LanguageStringMap return ret } return *o.Subtitle.Get() @@ -1513,7 +1432,7 @@ func (o *Notification) GetSubtitle() StringMap { // GetSubtitleOk returns a tuple with the Subtitle field value if set, nil otherwise // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Notification) GetSubtitleOk() (*StringMap, bool) { +func (o *Notification) GetSubtitleOk() (*LanguageStringMap, bool) { if o == nil { return nil, false } @@ -1529,8 +1448,8 @@ func (o *Notification) HasSubtitle() bool { return false } -// SetSubtitle gets a reference to the given NullableStringMap and assigns it to the Subtitle field. -func (o *Notification) SetSubtitle(v StringMap) { +// SetSubtitle gets a reference to the given NullableLanguageStringMap and assigns it to the Subtitle field. +func (o *Notification) SetSubtitle(v LanguageStringMap) { o.Subtitle.Set(&v) } // SetSubtitleNil sets the value for Subtitle to be an explicit nil @@ -2179,9 +2098,9 @@ func (o *Notification) SetButtons(v []Button) { } // GetWebButtons returns the WebButtons field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *Notification) GetWebButtons() []Button { +func (o *Notification) GetWebButtons() []WebButton { if o == nil { - var ret []Button + var ret []WebButton return ret } return o.WebButtons @@ -2190,7 +2109,7 @@ func (o *Notification) GetWebButtons() []Button { // GetWebButtonsOk returns a tuple with the WebButtons field value if set, nil otherwise // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Notification) GetWebButtonsOk() ([]Button, bool) { +func (o *Notification) GetWebButtonsOk() ([]WebButton, bool) { if o == nil || o.WebButtons == nil { return nil, false } @@ -2206,8 +2125,8 @@ func (o *Notification) HasWebButtons() bool { return false } -// SetWebButtons gets a reference to the given []Button and assigns it to the WebButtons field. -func (o *Notification) SetWebButtons(v []Button) { +// SetWebButtons gets a reference to the given []WebButton and assigns it to the WebButtons field. +func (o *Notification) SetWebButtons(v []WebButton) { o.WebButtons = v } @@ -4013,6 +3932,90 @@ func (o *Notification) SetSummaryArgCount(v int32) { o.SummaryArgCount = &v } +// GetIosRelevanceScore returns the IosRelevanceScore field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Notification) GetIosRelevanceScore() float32 { + if o == nil || o.IosRelevanceScore.Get() == nil { + var ret float32 + return ret + } + return *o.IosRelevanceScore.Get() +} + +// GetIosRelevanceScoreOk returns a tuple with the IosRelevanceScore field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Notification) GetIosRelevanceScoreOk() (*float32, bool) { + if o == nil { + return nil, false + } + return o.IosRelevanceScore.Get(), o.IosRelevanceScore.IsSet() +} + +// HasIosRelevanceScore returns a boolean if a field has been set. +func (o *Notification) HasIosRelevanceScore() bool { + if o != nil && o.IosRelevanceScore.IsSet() { + return true + } + + return false +} + +// SetIosRelevanceScore gets a reference to the given NullableFloat32 and assigns it to the IosRelevanceScore field. +func (o *Notification) SetIosRelevanceScore(v float32) { + o.IosRelevanceScore.Set(&v) +} +// SetIosRelevanceScoreNil sets the value for IosRelevanceScore to be an explicit nil +func (o *Notification) SetIosRelevanceScoreNil() { + o.IosRelevanceScore.Set(nil) +} + +// UnsetIosRelevanceScore ensures that no value is present for IosRelevanceScore, not even an explicit nil +func (o *Notification) UnsetIosRelevanceScore() { + o.IosRelevanceScore.Unset() +} + +// GetIosInterruptionLevel returns the IosInterruptionLevel field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Notification) GetIosInterruptionLevel() string { + if o == nil || o.IosInterruptionLevel.Get() == nil { + var ret string + return ret + } + return *o.IosInterruptionLevel.Get() +} + +// GetIosInterruptionLevelOk returns a tuple with the IosInterruptionLevel field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Notification) GetIosInterruptionLevelOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.IosInterruptionLevel.Get(), o.IosInterruptionLevel.IsSet() +} + +// HasIosInterruptionLevel returns a boolean if a field has been set. +func (o *Notification) HasIosInterruptionLevel() bool { + if o != nil && o.IosInterruptionLevel.IsSet() { + return true + } + + return false +} + +// SetIosInterruptionLevel gets a reference to the given NullableString and assigns it to the IosInterruptionLevel field. +func (o *Notification) SetIosInterruptionLevel(v string) { + o.IosInterruptionLevel.Set(&v) +} +// SetIosInterruptionLevelNil sets the value for IosInterruptionLevel to be an explicit nil +func (o *Notification) SetIosInterruptionLevelNil() { + o.IosInterruptionLevel.Set(nil) +} + +// UnsetIosInterruptionLevel ensures that no value is present for IosInterruptionLevel, not even an explicit nil +func (o *Notification) UnsetIosInterruptionLevel() { + o.IosInterruptionLevel.Unset() +} + // GetEmailSubject returns the EmailSubject field value if set, zero value otherwise (both if not set or set to explicit null). func (o *Notification) GetEmailSubject() string { if o == nil || o.EmailSubject.Get() == nil { @@ -4321,9 +4324,9 @@ func (o *Notification) SetSmsMediaUrls(v []string) { } // GetFilters returns the Filters field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *Notification) GetFilters() []Filter { +func (o *Notification) GetFilters() []FilterExpression { if o == nil { - var ret []Filter + var ret []FilterExpression return ret } return o.Filters @@ -4332,7 +4335,7 @@ func (o *Notification) GetFilters() []Filter { // GetFiltersOk returns a tuple with the Filters field value if set, nil otherwise // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Notification) GetFiltersOk() ([]Filter, bool) { +func (o *Notification) GetFiltersOk() ([]FilterExpression, bool) { if o == nil || o.Filters == nil { return nil, false } @@ -4348,8 +4351,8 @@ func (o *Notification) HasFilters() bool { return false } -// SetFilters gets a reference to the given []Filter and assigns it to the Filters field. -func (o *Notification) SetFilters(v []Filter) { +// SetFilters gets a reference to the given []FilterExpression and assigns it to the Filters field. +func (o *Notification) SetFilters(v []FilterExpression) { o.Filters = v } @@ -4436,11 +4439,8 @@ func (o Notification) MarshalJSON() ([]byte, error) { if o.ExcludedSegments != nil { toSerialize["excluded_segments"] = o.ExcludedSegments } - if o.IncludePlayerIds != nil { - toSerialize["include_player_ids"] = o.IncludePlayerIds - } - if o.IncludeExternalUserIds != nil { - toSerialize["include_external_user_ids"] = o.IncludeExternalUserIds + if o.IncludeSubscriptionIds != nil { + toSerialize["include_subscription_ids"] = o.IncludeSubscriptionIds } if o.IncludeEmailTokens != nil { toSerialize["include_email_tokens"] = o.IncludeEmailTokens @@ -4466,8 +4466,8 @@ func (o Notification) MarshalJSON() ([]byte, error) { if o.IncludeAndroidRegIds != nil { toSerialize["include_android_reg_ids"] = o.IncludeAndroidRegIds } - if o.IncludeAliases.IsSet() { - toSerialize["include_aliases"] = o.IncludeAliases.Get() + if o.IncludeAliases != nil { + toSerialize["include_aliases"] = o.IncludeAliases } if o.TargetChannel != nil { toSerialize["target_channel"] = o.TargetChannel @@ -4514,9 +4514,6 @@ func (o Notification) MarshalJSON() ([]byte, error) { if o.IsChrome.IsSet() { toSerialize["isChrome"] = o.IsChrome.Get() } - if o.ChannelForExternalUserIds != nil { - toSerialize["channel_for_external_user_ids"] = o.ChannelForExternalUserIds - } if true { toSerialize["app_id"] = o.AppId } @@ -4721,6 +4718,12 @@ func (o Notification) MarshalJSON() ([]byte, error) { if o.SummaryArgCount != nil { toSerialize["summary_arg_count"] = o.SummaryArgCount } + if o.IosRelevanceScore.IsSet() { + toSerialize["ios_relevance_score"] = o.IosRelevanceScore.Get() + } + if o.IosInterruptionLevel.IsSet() { + toSerialize["ios_interruption_level"] = o.IosInterruptionLevel.Get() + } if o.EmailSubject.IsSet() { toSerialize["email_subject"] = o.EmailSubject.Get() } @@ -4774,8 +4777,7 @@ func (o *Notification) UnmarshalJSON(bytes []byte) (err error) { if err = json.Unmarshal(bytes, &additionalProperties); err == nil { delete(additionalProperties, "included_segments") delete(additionalProperties, "excluded_segments") - delete(additionalProperties, "include_player_ids") - delete(additionalProperties, "include_external_user_ids") + delete(additionalProperties, "include_subscription_ids") delete(additionalProperties, "include_email_tokens") delete(additionalProperties, "include_phone_numbers") delete(additionalProperties, "include_ios_tokens") @@ -4800,7 +4802,6 @@ func (o *Notification) UnmarshalJSON(bytes []byte) (err error) { delete(additionalProperties, "isWP_WNS") delete(additionalProperties, "isAdm") delete(additionalProperties, "isChrome") - delete(additionalProperties, "channel_for_external_user_ids") delete(additionalProperties, "app_id") delete(additionalProperties, "external_id") delete(additionalProperties, "idempotency_key") @@ -4869,6 +4870,8 @@ func (o *Notification) UnmarshalJSON(bytes []byte) (err error) { delete(additionalProperties, "thread_id") delete(additionalProperties, "summary_arg") delete(additionalProperties, "summary_arg_count") + delete(additionalProperties, "ios_relevance_score") + delete(additionalProperties, "ios_interruption_level") delete(additionalProperties, "email_subject") delete(additionalProperties, "email_body") delete(additionalProperties, "email_from_name") diff --git a/model_notification200_errors.go b/model_notification200_errors.go deleted file mode 100644 index dd6ab87..0000000 --- a/model_notification200_errors.go +++ /dev/null @@ -1,149 +0,0 @@ -/* -OneSignal - -A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com - -API version: 1.4.0 -Contact: devrel@onesignal.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onesignal - -import ( - "encoding/json" - "fmt" -) - -// Notification200Errors - struct for Notification200Errors -type Notification200Errors struct { - InvalidIdentifierError *InvalidIdentifierError - ArrayOfString *[]string -} - -// InvalidIdentifierErrorAsNotification200Errors is a convenience function that returns InvalidIdentifierError wrapped in Notification200Errors -func InvalidIdentifierErrorAsNotification200Errors(v *InvalidIdentifierError) Notification200Errors { - return Notification200Errors{ - InvalidIdentifierError: v, - } -} - -// []stringAsNotification200Errors is a convenience function that returns []string wrapped in Notification200Errors -func ArrayOfStringAsNotification200Errors(v *[]string) Notification200Errors { - return Notification200Errors{ - ArrayOfString: v, - } -} - - -// Unmarshal JSON data into one of the pointers in the struct -func (dst *Notification200Errors) UnmarshalJSON(data []byte) error { - var err error - match := 0 - // try to unmarshal data into InvalidIdentifierError - err = newStrictDecoder(data).Decode(&dst.InvalidIdentifierError) - if err == nil { - jsonInvalidIdentifierError, _ := json.Marshal(dst.InvalidIdentifierError) - if string(jsonInvalidIdentifierError) == "{}" { // empty struct - dst.InvalidIdentifierError = nil - } else { - match++ - } - } else { - dst.InvalidIdentifierError = nil - } - - // try to unmarshal data into ArrayOfString - err = newStrictDecoder(data).Decode(&dst.ArrayOfString) - if err == nil { - jsonArrayOfString, _ := json.Marshal(dst.ArrayOfString) - if string(jsonArrayOfString) == "{}" { // empty struct - dst.ArrayOfString = nil - } else { - match++ - } - } else { - dst.ArrayOfString = nil - } - - if match > 1 { // more than 1 match - // reset to nil - dst.InvalidIdentifierError = nil - dst.ArrayOfString = nil - - return fmt.Errorf("Data matches more than one schema in oneOf(Notification200Errors)") - } else if match == 1 { - return nil // exactly one match - } else { // no match - return fmt.Errorf("Data failed to match schemas in oneOf(Notification200Errors)") - } -} - -// Marshal data from the first non-nil pointers in the struct to JSON -func (src Notification200Errors) MarshalJSON() ([]byte, error) { - if src.InvalidIdentifierError != nil { - return json.Marshal(&src.InvalidIdentifierError) - } - - if src.ArrayOfString != nil { - return json.Marshal(&src.ArrayOfString) - } - - return nil, nil // no data in oneOf schemas -} - -// Get the actual instance -func (obj *Notification200Errors) GetActualInstance() (interface{}) { - if obj == nil { - return nil - } - if obj.InvalidIdentifierError != nil { - return obj.InvalidIdentifierError - } - - if obj.ArrayOfString != nil { - return obj.ArrayOfString - } - - // all schemas are nil - return nil -} - -type NullableNotification200Errors struct { - value *Notification200Errors - isSet bool -} - -func (v NullableNotification200Errors) Get() *Notification200Errors { - return v.value -} - -func (v *NullableNotification200Errors) Set(val *Notification200Errors) { - v.value = val - v.isSet = true -} - -func (v NullableNotification200Errors) IsSet() bool { - return v.isSet -} - -func (v *NullableNotification200Errors) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableNotification200Errors(val *Notification200Errors) *NullableNotification200Errors { - return &NullableNotification200Errors{value: val, isSet: true} -} - -func (v NullableNotification200Errors) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableNotification200Errors) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_notification_all_of.go b/model_notification_all_of.go index 77c552e..6c22338 100644 --- a/model_notification_all_of.go +++ b/model_notification_all_of.go @@ -3,7 +3,7 @@ OneSignal A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com -API version: 1.4.0 +API version: 5.0.1 Contact: devrel@onesignal.com */ diff --git a/model_notification_history_success_response.go b/model_notification_history_success_response.go index ca207c7..ccbfd2b 100644 --- a/model_notification_history_success_response.go +++ b/model_notification_history_success_response.go @@ -3,7 +3,7 @@ OneSignal A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com -API version: 1.4.0 +API version: 5.0.1 Contact: devrel@onesignal.com */ diff --git a/model_notification_slice.go b/model_notification_slice.go index 3ea37a1..194714c 100644 --- a/model_notification_slice.go +++ b/model_notification_slice.go @@ -3,7 +3,7 @@ OneSignal A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com -API version: 1.4.0 +API version: 5.0.1 Contact: devrel@onesignal.com */ diff --git a/model_notification_target.go b/model_notification_target.go index 5f376ee..0654e5f 100644 --- a/model_notification_target.go +++ b/model_notification_target.go @@ -3,7 +3,7 @@ OneSignal A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com -API version: 1.4.0 +API version: 5.0.1 Contact: devrel@onesignal.com */ @@ -18,26 +18,13 @@ import ( // NotificationTarget struct for NotificationTarget type NotificationTarget struct { - PlayerNotificationTarget *PlayerNotificationTarget SegmentNotificationTarget *SegmentNotificationTarget + SubscriptionNotificationTarget *SubscriptionNotificationTarget } // Unmarshal JSON data into any of the pointers in the struct func (dst *NotificationTarget) UnmarshalJSON(data []byte) error { var err error - // try to unmarshal JSON data into PlayerNotificationTarget - err = json.Unmarshal(data, &dst.PlayerNotificationTarget); - if err == nil { - jsonPlayerNotificationTarget, _ := json.Marshal(dst.PlayerNotificationTarget) - if string(jsonPlayerNotificationTarget) == "{}" { // empty struct - dst.PlayerNotificationTarget = nil - } else { - return nil // data stored in dst.PlayerNotificationTarget, return on the first match - } - } else { - dst.PlayerNotificationTarget = nil - } - // try to unmarshal JSON data into SegmentNotificationTarget err = json.Unmarshal(data, &dst.SegmentNotificationTarget); if err == nil { @@ -51,19 +38,32 @@ func (dst *NotificationTarget) UnmarshalJSON(data []byte) error { dst.SegmentNotificationTarget = nil } + // try to unmarshal JSON data into SubscriptionNotificationTarget + err = json.Unmarshal(data, &dst.SubscriptionNotificationTarget); + if err == nil { + jsonSubscriptionNotificationTarget, _ := json.Marshal(dst.SubscriptionNotificationTarget) + if string(jsonSubscriptionNotificationTarget) == "{}" { // empty struct + dst.SubscriptionNotificationTarget = nil + } else { + return nil // data stored in dst.SubscriptionNotificationTarget, return on the first match + } + } else { + dst.SubscriptionNotificationTarget = nil + } + return fmt.Errorf("Data failed to match schemas in anyOf(NotificationTarget)") } // Marshal data from the first non-nil pointers in the struct to JSON func (src *NotificationTarget) MarshalJSON() ([]byte, error) { - if src.PlayerNotificationTarget != nil { - return json.Marshal(&src.PlayerNotificationTarget) - } - if src.SegmentNotificationTarget != nil { return json.Marshal(&src.SegmentNotificationTarget) } + if src.SubscriptionNotificationTarget != nil { + return json.Marshal(&src.SubscriptionNotificationTarget) + } + return nil, nil // no data in anyOf schemas } diff --git a/model_notification_with_meta.go b/model_notification_with_meta.go index 3bc0f22..22888b4 100644 --- a/model_notification_with_meta.go +++ b/model_notification_with_meta.go @@ -3,7 +3,7 @@ OneSignal A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com -API version: 1.4.0 +API version: 5.0.1 Contact: devrel@onesignal.com */ @@ -21,29 +21,26 @@ type NotificationWithMeta struct { IncludedSegments []string `json:"included_segments,omitempty"` // Segment that will be excluded when sending. Users in these segments will not receive a notification, even if they were included in included_segments. This targeting parameter is only compatible with included_segments. Example: [\"Active Users\", \"Inactive Users\"] ExcludedSegments []string `json:"excluded_segments,omitempty"` - // 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 - // Deprecated - IncludePlayerIds []string `json:"include_player_ids,omitempty"` - // 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. - // Deprecated - IncludeExternalUserIds []string `json:"include_external_user_ids,omitempty"` + // 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 + IncludeSubscriptionIds []string `json:"include_subscription_ids,omitempty"` // 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 IncludeEmailTokens []string `json:"include_email_tokens,omitempty"` // Recommended for Sending SMS - Target specific phone numbers. The phone number should be in the E.164 format. Phone number should be an existing subscriber on OneSignal. Refer our docs to learn how to add phone numbers to OneSignal. Example phone number: +1999999999 Limit of 2,000 entries per REST API call IncludePhoneNumbers []string `json:"include_phone_numbers,omitempty"` - // 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 IncludeIosTokens []string `json:"include_ios_tokens,omitempty"` - // 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 IncludeWpWnsUris []string `json:"include_wp_wns_uris,omitempty"` - // 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 IncludeAmazonRegIds []string `json:"include_amazon_reg_ids,omitempty"` - // 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 IncludeChromeRegIds []string `json:"include_chrome_reg_ids,omitempty"` - // 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 IncludeChromeWebRegIds []string `json:"include_chrome_web_reg_ids,omitempty"` - // 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 IncludeAndroidRegIds []string `json:"include_android_reg_ids,omitempty"` - IncludeAliases NullablePlayerNotificationTargetIncludeAliases `json:"include_aliases,omitempty"` + // 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. + IncludeAliases map[string][]string `json:"include_aliases,omitempty"` TargetChannel *string `json:"target_channel,omitempty"` Id *string `json:"id,omitempty"` Value *int32 `json:"value,omitempty"` @@ -70,8 +67,6 @@ type NotificationWithMeta struct { IsAdm NullableBool `json:"isAdm,omitempty"` // This flag is not used for web push Please see isChromeWeb for sending to web push users. This flag only applies to Google Chrome Apps & Extensions. Indicates whether to send to all devices registered under your app's Google Chrome Apps & Extension platform. IsChrome NullableBool `json:"isChrome,omitempty"` - // 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. - ChannelForExternalUserIds *string `json:"channel_for_external_user_ids,omitempty"` // 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. AppId string `json:"app_id"` // [DEPRECATED] Correlation and idempotency key. A request received with this parameter will first look for another notification with the same external_id. If one exists, a notification will not be sent, and result of the previous operation will instead be returned. Therefore, if you plan on using this feature, it's important to use a good source of randomness to generate the UUID passed here. This key is only idempotent for 30 days. After 30 days, the notification could be removed from our system and a notification with the same external_id will be sent again. See Idempotent Notification Requests for more details writeOnly: true @@ -79,9 +74,9 @@ type NotificationWithMeta struct { ExternalId NullableString `json:"external_id,omitempty"` // Correlation and idempotency key. A request received with this parameter will first look for another notification with the same idempotency key. If one exists, a notification will not be sent, and result of the previous operation will instead be returned. Therefore, if you plan on using this feature, it's important to use a good source of randomness to generate the UUID passed here. This key is only idempotent for 30 days. After 30 days, the notification could be removed from our system and a notification with the same idempotency key will be sent again. See Idempotent Notification Requests for more details writeOnly: true IdempotencyKey NullableString `json:"idempotency_key,omitempty"` - Contents NullableStringMap `json:"contents,omitempty"` - Headings NullableStringMap `json:"headings,omitempty"` - Subtitle NullableStringMap `json:"subtitle,omitempty"` + Contents NullableLanguageStringMap `json:"contents,omitempty"` + Headings NullableLanguageStringMap `json:"headings,omitempty"` + Subtitle NullableLanguageStringMap `json:"subtitle,omitempty"` // 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} Data map[string]interface{} `json:"data,omitempty"` // Channel: Push Notifications Platform: Huawei Use \"data\" or \"message\" depending on the type of notification you are sending. More details in Data & Background Notifications. @@ -115,7 +110,7 @@ type NotificationWithMeta struct { // Channel: Push Notifications Platform: iOS 8.0+, Android 4.1+, and derivatives like Amazon Buttons to add to the notification. Icon only works for Android. Buttons show in reverse order of array position i.e. Last item in array shows as first button on device. Example: [{\"id\": \"id2\", \"text\": \"second button\", \"icon\": \"ic_menu_share\"}, {\"id\": \"id1\", \"text\": \"first button\", \"icon\": \"ic_menu_send\"}] Buttons []Button `json:"buttons,omitempty"` // 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\"}] - WebButtons []Button `json:"web_buttons,omitempty"` + WebButtons []WebButton `json:"web_buttons,omitempty"` // 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. IosCategory NullableString `json:"ios_category,omitempty"` // Channel: Push Notifications Platform: Android The Android Oreo Notification Category to send the notification under. See the Category documentation on creating one and getting it's id. @@ -205,6 +200,10 @@ type NotificationWithMeta struct { SummaryArg *string `json:"summary_arg,omitempty"` // Channel: Push Notifications Platform: iOS 12+ When using thread_id, you can also control the count of the number of notifications in the group. For example, if the group already has 12 notifications, and you send a new notification with summary_arg_count = 2, the new total will be 14 and the summary will be \"14 more notifications from summary_arg\" SummaryArgCount *int32 `json:"summary_arg_count,omitempty"` + // 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. + IosRelevanceScore NullableFloat32 `json:"ios_relevance_score,omitempty"` + // 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. + IosInterruptionLevel NullableString `json:"ios_interruption_level,omitempty"` // Channel: Email Required. The subject of the email. EmailSubject NullableString `json:"email_subject,omitempty"` // Channel: Email Required unless template_id is set. HTML suported The body of the email you wish to send. Typically, customers include their own HTML templates here. Must include [unsubscribe_url] in an tag somewhere in the email. Note: any malformed HTML content will be sent to users. Please double-check your HTML is valid. @@ -221,7 +220,7 @@ type NotificationWithMeta struct { SmsFrom NullableString `json:"sms_from,omitempty"` // Channel: SMS URLs for the media files to be attached to the SMS content. Limit: 10 media urls with a total max. size of 5MBs. SmsMediaUrls []string `json:"sms_media_urls,omitempty"` - Filters []Filter `json:"filters,omitempty"` + Filters []FilterExpression `json:"filters,omitempty"` // 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} CustomData map[string]interface{} `json:"custom_data,omitempty"` // Number of notifications that were successfully delivered. @@ -331,76 +330,37 @@ func (o *NotificationWithMeta) SetExcludedSegments(v []string) { o.ExcludedSegments = v } -// GetIncludePlayerIds returns the IncludePlayerIds field value if set, zero value otherwise (both if not set or set to explicit null). -// Deprecated -func (o *NotificationWithMeta) GetIncludePlayerIds() []string { +// GetIncludeSubscriptionIds returns the IncludeSubscriptionIds field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *NotificationWithMeta) GetIncludeSubscriptionIds() []string { if o == nil { var ret []string return ret } - return o.IncludePlayerIds + return o.IncludeSubscriptionIds } -// GetIncludePlayerIdsOk returns a tuple with the IncludePlayerIds field value if set, nil otherwise +// GetIncludeSubscriptionIdsOk returns a tuple with the IncludeSubscriptionIds field value if set, nil otherwise // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -// Deprecated -func (o *NotificationWithMeta) GetIncludePlayerIdsOk() ([]string, bool) { - if o == nil || o.IncludePlayerIds == nil { +func (o *NotificationWithMeta) GetIncludeSubscriptionIdsOk() ([]string, bool) { + if o == nil || o.IncludeSubscriptionIds == nil { return nil, false } - return o.IncludePlayerIds, true + return o.IncludeSubscriptionIds, true } -// HasIncludePlayerIds returns a boolean if a field has been set. -func (o *NotificationWithMeta) HasIncludePlayerIds() bool { - if o != nil && o.IncludePlayerIds != nil { +// HasIncludeSubscriptionIds returns a boolean if a field has been set. +func (o *NotificationWithMeta) HasIncludeSubscriptionIds() bool { + if o != nil && o.IncludeSubscriptionIds != nil { return true } return false } -// SetIncludePlayerIds gets a reference to the given []string and assigns it to the IncludePlayerIds field. -// Deprecated -func (o *NotificationWithMeta) SetIncludePlayerIds(v []string) { - o.IncludePlayerIds = v -} - -// GetIncludeExternalUserIds returns the IncludeExternalUserIds field value if set, zero value otherwise (both if not set or set to explicit null). -// Deprecated -func (o *NotificationWithMeta) GetIncludeExternalUserIds() []string { - if o == nil { - var ret []string - return ret - } - return o.IncludeExternalUserIds -} - -// GetIncludeExternalUserIdsOk returns a tuple with the IncludeExternalUserIds field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -// Deprecated -func (o *NotificationWithMeta) GetIncludeExternalUserIdsOk() ([]string, bool) { - if o == nil || o.IncludeExternalUserIds == nil { - return nil, false - } - return o.IncludeExternalUserIds, true -} - -// HasIncludeExternalUserIds returns a boolean if a field has been set. -func (o *NotificationWithMeta) HasIncludeExternalUserIds() bool { - if o != nil && o.IncludeExternalUserIds != nil { - return true - } - - return false -} - -// SetIncludeExternalUserIds gets a reference to the given []string and assigns it to the IncludeExternalUserIds field. -// Deprecated -func (o *NotificationWithMeta) SetIncludeExternalUserIds(v []string) { - o.IncludeExternalUserIds = v +// SetIncludeSubscriptionIds gets a reference to the given []string and assigns it to the IncludeSubscriptionIds field. +func (o *NotificationWithMeta) SetIncludeSubscriptionIds(v []string) { + o.IncludeSubscriptionIds = v } // GetIncludeEmailTokens returns the IncludeEmailTokens field value if set, zero value otherwise. @@ -660,45 +620,36 @@ func (o *NotificationWithMeta) SetIncludeAndroidRegIds(v []string) { } // GetIncludeAliases returns the IncludeAliases field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *NotificationWithMeta) GetIncludeAliases() PlayerNotificationTargetIncludeAliases { - if o == nil || o.IncludeAliases.Get() == nil { - var ret PlayerNotificationTargetIncludeAliases +func (o *NotificationWithMeta) GetIncludeAliases() map[string][]string { + if o == nil { + var ret map[string][]string return ret } - return *o.IncludeAliases.Get() + return o.IncludeAliases } // GetIncludeAliasesOk returns a tuple with the IncludeAliases field value if set, nil otherwise // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NotificationWithMeta) GetIncludeAliasesOk() (*PlayerNotificationTargetIncludeAliases, bool) { - if o == nil { +func (o *NotificationWithMeta) GetIncludeAliasesOk() (*map[string][]string, bool) { + if o == nil || o.IncludeAliases == nil { return nil, false } - return o.IncludeAliases.Get(), o.IncludeAliases.IsSet() + return &o.IncludeAliases, true } // HasIncludeAliases returns a boolean if a field has been set. func (o *NotificationWithMeta) HasIncludeAliases() bool { - if o != nil && o.IncludeAliases.IsSet() { + if o != nil && o.IncludeAliases != nil { return true } return false } -// SetIncludeAliases gets a reference to the given NullablePlayerNotificationTargetIncludeAliases and assigns it to the IncludeAliases field. -func (o *NotificationWithMeta) SetIncludeAliases(v PlayerNotificationTargetIncludeAliases) { - o.IncludeAliases.Set(&v) -} -// SetIncludeAliasesNil sets the value for IncludeAliases to be an explicit nil -func (o *NotificationWithMeta) SetIncludeAliasesNil() { - o.IncludeAliases.Set(nil) -} - -// UnsetIncludeAliases ensures that no value is present for IncludeAliases, not even an explicit nil -func (o *NotificationWithMeta) UnsetIncludeAliases() { - o.IncludeAliases.Unset() +// SetIncludeAliases gets a reference to the given map[string][]string and assigns it to the IncludeAliases field. +func (o *NotificationWithMeta) SetIncludeAliases(v map[string][]string) { + o.IncludeAliases = v } // GetTargetChannel returns the TargetChannel field value if set, zero value otherwise. @@ -1291,38 +1242,6 @@ func (o *NotificationWithMeta) UnsetIsChrome() { o.IsChrome.Unset() } -// GetChannelForExternalUserIds returns the ChannelForExternalUserIds field value if set, zero value otherwise. -func (o *NotificationWithMeta) GetChannelForExternalUserIds() string { - if o == nil || o.ChannelForExternalUserIds == nil { - var ret string - return ret - } - return *o.ChannelForExternalUserIds -} - -// GetChannelForExternalUserIdsOk returns a tuple with the ChannelForExternalUserIds field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *NotificationWithMeta) GetChannelForExternalUserIdsOk() (*string, bool) { - if o == nil || o.ChannelForExternalUserIds == nil { - return nil, false - } - return o.ChannelForExternalUserIds, true -} - -// HasChannelForExternalUserIds returns a boolean if a field has been set. -func (o *NotificationWithMeta) HasChannelForExternalUserIds() bool { - if o != nil && o.ChannelForExternalUserIds != nil { - return true - } - - return false -} - -// SetChannelForExternalUserIds gets a reference to the given string and assigns it to the ChannelForExternalUserIds field. -func (o *NotificationWithMeta) SetChannelForExternalUserIds(v string) { - o.ChannelForExternalUserIds = &v -} - // GetAppId returns the AppId field value func (o *NotificationWithMeta) GetAppId() string { if o == nil { @@ -1435,9 +1354,9 @@ func (o *NotificationWithMeta) UnsetIdempotencyKey() { } // GetContents returns the Contents field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *NotificationWithMeta) GetContents() StringMap { +func (o *NotificationWithMeta) GetContents() LanguageStringMap { if o == nil || o.Contents.Get() == nil { - var ret StringMap + var ret LanguageStringMap return ret } return *o.Contents.Get() @@ -1446,7 +1365,7 @@ func (o *NotificationWithMeta) GetContents() StringMap { // GetContentsOk returns a tuple with the Contents field value if set, nil otherwise // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NotificationWithMeta) GetContentsOk() (*StringMap, bool) { +func (o *NotificationWithMeta) GetContentsOk() (*LanguageStringMap, bool) { if o == nil { return nil, false } @@ -1462,8 +1381,8 @@ func (o *NotificationWithMeta) HasContents() bool { return false } -// SetContents gets a reference to the given NullableStringMap and assigns it to the Contents field. -func (o *NotificationWithMeta) SetContents(v StringMap) { +// SetContents gets a reference to the given NullableLanguageStringMap and assigns it to the Contents field. +func (o *NotificationWithMeta) SetContents(v LanguageStringMap) { o.Contents.Set(&v) } // SetContentsNil sets the value for Contents to be an explicit nil @@ -1477,9 +1396,9 @@ func (o *NotificationWithMeta) UnsetContents() { } // GetHeadings returns the Headings field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *NotificationWithMeta) GetHeadings() StringMap { +func (o *NotificationWithMeta) GetHeadings() LanguageStringMap { if o == nil || o.Headings.Get() == nil { - var ret StringMap + var ret LanguageStringMap return ret } return *o.Headings.Get() @@ -1488,7 +1407,7 @@ func (o *NotificationWithMeta) GetHeadings() StringMap { // GetHeadingsOk returns a tuple with the Headings field value if set, nil otherwise // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NotificationWithMeta) GetHeadingsOk() (*StringMap, bool) { +func (o *NotificationWithMeta) GetHeadingsOk() (*LanguageStringMap, bool) { if o == nil { return nil, false } @@ -1504,8 +1423,8 @@ func (o *NotificationWithMeta) HasHeadings() bool { return false } -// SetHeadings gets a reference to the given NullableStringMap and assigns it to the Headings field. -func (o *NotificationWithMeta) SetHeadings(v StringMap) { +// SetHeadings gets a reference to the given NullableLanguageStringMap and assigns it to the Headings field. +func (o *NotificationWithMeta) SetHeadings(v LanguageStringMap) { o.Headings.Set(&v) } // SetHeadingsNil sets the value for Headings to be an explicit nil @@ -1519,9 +1438,9 @@ func (o *NotificationWithMeta) UnsetHeadings() { } // GetSubtitle returns the Subtitle field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *NotificationWithMeta) GetSubtitle() StringMap { +func (o *NotificationWithMeta) GetSubtitle() LanguageStringMap { if o == nil || o.Subtitle.Get() == nil { - var ret StringMap + var ret LanguageStringMap return ret } return *o.Subtitle.Get() @@ -1530,7 +1449,7 @@ func (o *NotificationWithMeta) GetSubtitle() StringMap { // GetSubtitleOk returns a tuple with the Subtitle field value if set, nil otherwise // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NotificationWithMeta) GetSubtitleOk() (*StringMap, bool) { +func (o *NotificationWithMeta) GetSubtitleOk() (*LanguageStringMap, bool) { if o == nil { return nil, false } @@ -1546,8 +1465,8 @@ func (o *NotificationWithMeta) HasSubtitle() bool { return false } -// SetSubtitle gets a reference to the given NullableStringMap and assigns it to the Subtitle field. -func (o *NotificationWithMeta) SetSubtitle(v StringMap) { +// SetSubtitle gets a reference to the given NullableLanguageStringMap and assigns it to the Subtitle field. +func (o *NotificationWithMeta) SetSubtitle(v LanguageStringMap) { o.Subtitle.Set(&v) } // SetSubtitleNil sets the value for Subtitle to be an explicit nil @@ -2196,9 +2115,9 @@ func (o *NotificationWithMeta) SetButtons(v []Button) { } // GetWebButtons returns the WebButtons field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *NotificationWithMeta) GetWebButtons() []Button { +func (o *NotificationWithMeta) GetWebButtons() []WebButton { if o == nil { - var ret []Button + var ret []WebButton return ret } return o.WebButtons @@ -2207,7 +2126,7 @@ func (o *NotificationWithMeta) GetWebButtons() []Button { // GetWebButtonsOk returns a tuple with the WebButtons field value if set, nil otherwise // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NotificationWithMeta) GetWebButtonsOk() ([]Button, bool) { +func (o *NotificationWithMeta) GetWebButtonsOk() ([]WebButton, bool) { if o == nil || o.WebButtons == nil { return nil, false } @@ -2223,8 +2142,8 @@ func (o *NotificationWithMeta) HasWebButtons() bool { return false } -// SetWebButtons gets a reference to the given []Button and assigns it to the WebButtons field. -func (o *NotificationWithMeta) SetWebButtons(v []Button) { +// SetWebButtons gets a reference to the given []WebButton and assigns it to the WebButtons field. +func (o *NotificationWithMeta) SetWebButtons(v []WebButton) { o.WebButtons = v } @@ -4030,6 +3949,90 @@ func (o *NotificationWithMeta) SetSummaryArgCount(v int32) { o.SummaryArgCount = &v } +// GetIosRelevanceScore returns the IosRelevanceScore field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *NotificationWithMeta) GetIosRelevanceScore() float32 { + if o == nil || o.IosRelevanceScore.Get() == nil { + var ret float32 + return ret + } + return *o.IosRelevanceScore.Get() +} + +// GetIosRelevanceScoreOk returns a tuple with the IosRelevanceScore field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *NotificationWithMeta) GetIosRelevanceScoreOk() (*float32, bool) { + if o == nil { + return nil, false + } + return o.IosRelevanceScore.Get(), o.IosRelevanceScore.IsSet() +} + +// HasIosRelevanceScore returns a boolean if a field has been set. +func (o *NotificationWithMeta) HasIosRelevanceScore() bool { + if o != nil && o.IosRelevanceScore.IsSet() { + return true + } + + return false +} + +// SetIosRelevanceScore gets a reference to the given NullableFloat32 and assigns it to the IosRelevanceScore field. +func (o *NotificationWithMeta) SetIosRelevanceScore(v float32) { + o.IosRelevanceScore.Set(&v) +} +// SetIosRelevanceScoreNil sets the value for IosRelevanceScore to be an explicit nil +func (o *NotificationWithMeta) SetIosRelevanceScoreNil() { + o.IosRelevanceScore.Set(nil) +} + +// UnsetIosRelevanceScore ensures that no value is present for IosRelevanceScore, not even an explicit nil +func (o *NotificationWithMeta) UnsetIosRelevanceScore() { + o.IosRelevanceScore.Unset() +} + +// GetIosInterruptionLevel returns the IosInterruptionLevel field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *NotificationWithMeta) GetIosInterruptionLevel() string { + if o == nil || o.IosInterruptionLevel.Get() == nil { + var ret string + return ret + } + return *o.IosInterruptionLevel.Get() +} + +// GetIosInterruptionLevelOk returns a tuple with the IosInterruptionLevel field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *NotificationWithMeta) GetIosInterruptionLevelOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.IosInterruptionLevel.Get(), o.IosInterruptionLevel.IsSet() +} + +// HasIosInterruptionLevel returns a boolean if a field has been set. +func (o *NotificationWithMeta) HasIosInterruptionLevel() bool { + if o != nil && o.IosInterruptionLevel.IsSet() { + return true + } + + return false +} + +// SetIosInterruptionLevel gets a reference to the given NullableString and assigns it to the IosInterruptionLevel field. +func (o *NotificationWithMeta) SetIosInterruptionLevel(v string) { + o.IosInterruptionLevel.Set(&v) +} +// SetIosInterruptionLevelNil sets the value for IosInterruptionLevel to be an explicit nil +func (o *NotificationWithMeta) SetIosInterruptionLevelNil() { + o.IosInterruptionLevel.Set(nil) +} + +// UnsetIosInterruptionLevel ensures that no value is present for IosInterruptionLevel, not even an explicit nil +func (o *NotificationWithMeta) UnsetIosInterruptionLevel() { + o.IosInterruptionLevel.Unset() +} + // GetEmailSubject returns the EmailSubject field value if set, zero value otherwise (both if not set or set to explicit null). func (o *NotificationWithMeta) GetEmailSubject() string { if o == nil || o.EmailSubject.Get() == nil { @@ -4338,9 +4341,9 @@ func (o *NotificationWithMeta) SetSmsMediaUrls(v []string) { } // GetFilters returns the Filters field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *NotificationWithMeta) GetFilters() []Filter { +func (o *NotificationWithMeta) GetFilters() []FilterExpression { if o == nil { - var ret []Filter + var ret []FilterExpression return ret } return o.Filters @@ -4349,7 +4352,7 @@ func (o *NotificationWithMeta) GetFilters() []Filter { // GetFiltersOk returns a tuple with the Filters field value if set, nil otherwise // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NotificationWithMeta) GetFiltersOk() ([]Filter, bool) { +func (o *NotificationWithMeta) GetFiltersOk() ([]FilterExpression, bool) { if o == nil || o.Filters == nil { return nil, false } @@ -4365,8 +4368,8 @@ func (o *NotificationWithMeta) HasFilters() bool { return false } -// SetFilters gets a reference to the given []Filter and assigns it to the Filters field. -func (o *NotificationWithMeta) SetFilters(v []Filter) { +// SetFilters gets a reference to the given []FilterExpression and assigns it to the Filters field. +func (o *NotificationWithMeta) SetFilters(v []FilterExpression) { o.Filters = v } @@ -4793,11 +4796,8 @@ func (o NotificationWithMeta) MarshalJSON() ([]byte, error) { if o.ExcludedSegments != nil { toSerialize["excluded_segments"] = o.ExcludedSegments } - if o.IncludePlayerIds != nil { - toSerialize["include_player_ids"] = o.IncludePlayerIds - } - if o.IncludeExternalUserIds != nil { - toSerialize["include_external_user_ids"] = o.IncludeExternalUserIds + if o.IncludeSubscriptionIds != nil { + toSerialize["include_subscription_ids"] = o.IncludeSubscriptionIds } if o.IncludeEmailTokens != nil { toSerialize["include_email_tokens"] = o.IncludeEmailTokens @@ -4823,8 +4823,8 @@ func (o NotificationWithMeta) MarshalJSON() ([]byte, error) { if o.IncludeAndroidRegIds != nil { toSerialize["include_android_reg_ids"] = o.IncludeAndroidRegIds } - if o.IncludeAliases.IsSet() { - toSerialize["include_aliases"] = o.IncludeAliases.Get() + if o.IncludeAliases != nil { + toSerialize["include_aliases"] = o.IncludeAliases } if o.TargetChannel != nil { toSerialize["target_channel"] = o.TargetChannel @@ -4871,9 +4871,6 @@ func (o NotificationWithMeta) MarshalJSON() ([]byte, error) { if o.IsChrome.IsSet() { toSerialize["isChrome"] = o.IsChrome.Get() } - if o.ChannelForExternalUserIds != nil { - toSerialize["channel_for_external_user_ids"] = o.ChannelForExternalUserIds - } if true { toSerialize["app_id"] = o.AppId } @@ -5078,6 +5075,12 @@ func (o NotificationWithMeta) MarshalJSON() ([]byte, error) { if o.SummaryArgCount != nil { toSerialize["summary_arg_count"] = o.SummaryArgCount } + if o.IosRelevanceScore.IsSet() { + toSerialize["ios_relevance_score"] = o.IosRelevanceScore.Get() + } + if o.IosInterruptionLevel.IsSet() { + toSerialize["ios_interruption_level"] = o.IosInterruptionLevel.Get() + } if o.EmailSubject.IsSet() { toSerialize["email_subject"] = o.EmailSubject.Get() } @@ -5161,8 +5164,7 @@ func (o *NotificationWithMeta) UnmarshalJSON(bytes []byte) (err error) { if err = json.Unmarshal(bytes, &additionalProperties); err == nil { delete(additionalProperties, "included_segments") delete(additionalProperties, "excluded_segments") - delete(additionalProperties, "include_player_ids") - delete(additionalProperties, "include_external_user_ids") + delete(additionalProperties, "include_subscription_ids") delete(additionalProperties, "include_email_tokens") delete(additionalProperties, "include_phone_numbers") delete(additionalProperties, "include_ios_tokens") @@ -5187,7 +5189,6 @@ func (o *NotificationWithMeta) UnmarshalJSON(bytes []byte) (err error) { delete(additionalProperties, "isWP_WNS") delete(additionalProperties, "isAdm") delete(additionalProperties, "isChrome") - delete(additionalProperties, "channel_for_external_user_ids") delete(additionalProperties, "app_id") delete(additionalProperties, "external_id") delete(additionalProperties, "idempotency_key") @@ -5256,6 +5257,8 @@ func (o *NotificationWithMeta) UnmarshalJSON(bytes []byte) (err error) { delete(additionalProperties, "thread_id") delete(additionalProperties, "summary_arg") delete(additionalProperties, "summary_arg_count") + delete(additionalProperties, "ios_relevance_score") + delete(additionalProperties, "ios_interruption_level") delete(additionalProperties, "email_subject") delete(additionalProperties, "email_body") delete(additionalProperties, "email_from_name") diff --git a/model_notification_with_meta_all_of.go b/model_notification_with_meta_all_of.go index ed8eb70..800b4d6 100644 --- a/model_notification_with_meta_all_of.go +++ b/model_notification_with_meta_all_of.go @@ -3,7 +3,7 @@ OneSignal A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com -API version: 1.4.0 +API version: 5.0.1 Contact: devrel@onesignal.com */ diff --git a/model_operator.go b/model_operator.go index 8bf1217..6235ec6 100644 --- a/model_operator.go +++ b/model_operator.go @@ -3,7 +3,7 @@ OneSignal A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com -API version: 1.4.0 +API version: 5.0.1 Contact: devrel@onesignal.com */ diff --git a/model_outcome_data.go b/model_outcome_data.go index 814f7ba..766dd9a 100644 --- a/model_outcome_data.go +++ b/model_outcome_data.go @@ -3,7 +3,7 @@ OneSignal A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com -API version: 1.4.0 +API version: 5.0.1 Contact: devrel@onesignal.com */ diff --git a/model_outcomes_data.go b/model_outcomes_data.go index 9a8e3c4..2ae7d65 100644 --- a/model_outcomes_data.go +++ b/model_outcomes_data.go @@ -3,7 +3,7 @@ OneSignal A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com -API version: 1.4.0 +API version: 5.0.1 Contact: devrel@onesignal.com */ diff --git a/model_platform_delivery_data.go b/model_platform_delivery_data.go index 4b53e35..f1358c2 100644 --- a/model_platform_delivery_data.go +++ b/model_platform_delivery_data.go @@ -3,7 +3,7 @@ OneSignal A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com -API version: 1.4.0 +API version: 5.0.1 Contact: devrel@onesignal.com */ diff --git a/model_platform_delivery_data_email_all_of.go b/model_platform_delivery_data_email_all_of.go index ba40405..d9cf3d0 100644 --- a/model_platform_delivery_data_email_all_of.go +++ b/model_platform_delivery_data_email_all_of.go @@ -3,7 +3,7 @@ OneSignal A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com -API version: 1.4.0 +API version: 5.0.1 Contact: devrel@onesignal.com */ diff --git a/model_platform_delivery_data_sms_all_of.go b/model_platform_delivery_data_sms_all_of.go index 6c7732d..230a8fb 100644 --- a/model_platform_delivery_data_sms_all_of.go +++ b/model_platform_delivery_data_sms_all_of.go @@ -3,7 +3,7 @@ OneSignal A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com -API version: 1.4.0 +API version: 5.0.1 Contact: devrel@onesignal.com */ diff --git a/model_player.go b/model_player.go deleted file mode 100644 index 225b67f..0000000 --- a/model_player.go +++ /dev/null @@ -1,1213 +0,0 @@ -/* -OneSignal - -A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com - -API version: 1.4.0 -Contact: devrel@onesignal.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onesignal - -import ( - "encoding/json" -) - -// Player struct for Player -type Player struct { - // The device's OneSignal ID - Id *string `json:"id,omitempty"` - // If true, this is the equivalent of a user being Unsubscribed - InvalidIdentifier *bool `json:"invalid_identifier,omitempty"` - AppId *string `json:"app_id,omitempty"` - // 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 - DeviceType int32 `json:"device_type"` - // a custom user ID - ExternalUserId NullableString `json:"external_user_id,omitempty"` - // Only required if you have enabled Identity Verification and device_type is NOT 11 email. - ExternalUserIdAuthHash *string `json:"external_user_id_auth_hash,omitempty"` - // Email - Only required if you have enabled Identity Verification and device_type is email (11). - EmailAuthHash *string `json:"email_auth_hash,omitempty"` - // 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. - Identifier NullableString `json:"identifier,omitempty"` - // Language code. Typically lower case two letters, except for Chinese where it must be one of zh-Hans or zh-Hant. Example: en - Language *string `json:"language,omitempty"` - // Number of seconds away from UTC. Example: -28800 - Timezone NullableInt32 `json:"timezone,omitempty"` - // Version of your app. Example: 1.1 - GameVersion NullableString `json:"game_version,omitempty"` - // Device make and model. Example: iPhone5,1 - DeviceModel NullableString `json:"device_model,omitempty"` - // Device operating system version. Example: 7.0.4 - DeviceOs NullableString `json:"device_os,omitempty"` - // The ad id for the device's platform: Android = Advertising Id iOS = identifierForVendor WP8.0 = DeviceUniqueId WP8.1 = AdvertisingId - AdId NullableString `json:"ad_id,omitempty"` - // Name and version of the sdk/plugin that's calling this API method (if any) - Sdk NullableString `json:"sdk,omitempty"` - // Number of times the user has played the game, defaults to 1 - SessionCount *int32 `json:"session_count,omitempty"` - // 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 - Tags map[string]interface{} `json:"tags,omitempty"` - // Amount the user has spent in USD, up to two decimal places - AmountSpent *float32 `json:"amount_spent,omitempty"` - // Unixtime when the player joined the game - CreatedAt *int64 `json:"created_at,omitempty"` - // Seconds player was running your app. - Playtime *int64 `json:"playtime,omitempty"` - // 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. - BadgeCount *int32 `json:"badge_count,omitempty"` - // Unixtime when the player was last active - LastActive *int32 `json:"last_active,omitempty"` - // 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. - NotificationTypes *int32 `json:"notification_types,omitempty"` - // 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. - TestType NullableInt32 `json:"test_type,omitempty"` - // Longitude of the device, used for geotagging to segment on. - Long *float32 `json:"long,omitempty"` - // Latitude of the device, used for geotagging to segment on. - Lat *float32 `json:"lat,omitempty"` - // Country code in the ISO 3166-1 Alpha 2 format - Country *string `json:"country,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _Player Player - -// NewPlayer instantiates a new Player object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewPlayer(deviceType int32) *Player { - this := Player{} - this.DeviceType = deviceType - return &this -} - -// NewPlayerWithDefaults instantiates a new Player object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewPlayerWithDefaults() *Player { - this := Player{} - return &this -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *Player) GetId() string { - if o == nil || o.Id == nil { - var ret string - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Player) GetIdOk() (*string, bool) { - if o == nil || o.Id == nil { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *Player) HasId() bool { - if o != nil && o.Id != nil { - return true - } - - return false -} - -// SetId gets a reference to the given string and assigns it to the Id field. -func (o *Player) SetId(v string) { - o.Id = &v -} - -// GetInvalidIdentifier returns the InvalidIdentifier field value if set, zero value otherwise. -func (o *Player) GetInvalidIdentifier() bool { - if o == nil || o.InvalidIdentifier == nil { - var ret bool - return ret - } - return *o.InvalidIdentifier -} - -// GetInvalidIdentifierOk returns a tuple with the InvalidIdentifier field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Player) GetInvalidIdentifierOk() (*bool, bool) { - if o == nil || o.InvalidIdentifier == nil { - return nil, false - } - return o.InvalidIdentifier, true -} - -// HasInvalidIdentifier returns a boolean if a field has been set. -func (o *Player) HasInvalidIdentifier() bool { - if o != nil && o.InvalidIdentifier != nil { - return true - } - - return false -} - -// SetInvalidIdentifier gets a reference to the given bool and assigns it to the InvalidIdentifier field. -func (o *Player) SetInvalidIdentifier(v bool) { - o.InvalidIdentifier = &v -} - -// GetAppId returns the AppId field value if set, zero value otherwise. -func (o *Player) GetAppId() string { - if o == nil || o.AppId == nil { - var ret string - return ret - } - return *o.AppId -} - -// GetAppIdOk returns a tuple with the AppId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Player) GetAppIdOk() (*string, bool) { - if o == nil || o.AppId == nil { - return nil, false - } - return o.AppId, true -} - -// HasAppId returns a boolean if a field has been set. -func (o *Player) HasAppId() bool { - if o != nil && o.AppId != nil { - return true - } - - return false -} - -// SetAppId gets a reference to the given string and assigns it to the AppId field. -func (o *Player) SetAppId(v string) { - o.AppId = &v -} - -// GetDeviceType returns the DeviceType field value -func (o *Player) GetDeviceType() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.DeviceType -} - -// GetDeviceTypeOk returns a tuple with the DeviceType field value -// and a boolean to check if the value has been set. -func (o *Player) GetDeviceTypeOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.DeviceType, true -} - -// SetDeviceType sets field value -func (o *Player) SetDeviceType(v int32) { - o.DeviceType = v -} - -// GetExternalUserId returns the ExternalUserId field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *Player) GetExternalUserId() string { - if o == nil || o.ExternalUserId.Get() == nil { - var ret string - return ret - } - return *o.ExternalUserId.Get() -} - -// GetExternalUserIdOk returns a tuple with the ExternalUserId field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Player) GetExternalUserIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.ExternalUserId.Get(), o.ExternalUserId.IsSet() -} - -// HasExternalUserId returns a boolean if a field has been set. -func (o *Player) HasExternalUserId() bool { - if o != nil && o.ExternalUserId.IsSet() { - return true - } - - return false -} - -// SetExternalUserId gets a reference to the given NullableString and assigns it to the ExternalUserId field. -func (o *Player) SetExternalUserId(v string) { - o.ExternalUserId.Set(&v) -} -// SetExternalUserIdNil sets the value for ExternalUserId to be an explicit nil -func (o *Player) SetExternalUserIdNil() { - o.ExternalUserId.Set(nil) -} - -// UnsetExternalUserId ensures that no value is present for ExternalUserId, not even an explicit nil -func (o *Player) UnsetExternalUserId() { - o.ExternalUserId.Unset() -} - -// GetExternalUserIdAuthHash returns the ExternalUserIdAuthHash field value if set, zero value otherwise. -func (o *Player) GetExternalUserIdAuthHash() string { - if o == nil || o.ExternalUserIdAuthHash == nil { - var ret string - return ret - } - return *o.ExternalUserIdAuthHash -} - -// GetExternalUserIdAuthHashOk returns a tuple with the ExternalUserIdAuthHash field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Player) GetExternalUserIdAuthHashOk() (*string, bool) { - if o == nil || o.ExternalUserIdAuthHash == nil { - return nil, false - } - return o.ExternalUserIdAuthHash, true -} - -// HasExternalUserIdAuthHash returns a boolean if a field has been set. -func (o *Player) HasExternalUserIdAuthHash() bool { - if o != nil && o.ExternalUserIdAuthHash != nil { - return true - } - - return false -} - -// SetExternalUserIdAuthHash gets a reference to the given string and assigns it to the ExternalUserIdAuthHash field. -func (o *Player) SetExternalUserIdAuthHash(v string) { - o.ExternalUserIdAuthHash = &v -} - -// GetEmailAuthHash returns the EmailAuthHash field value if set, zero value otherwise. -func (o *Player) GetEmailAuthHash() string { - if o == nil || o.EmailAuthHash == nil { - var ret string - return ret - } - return *o.EmailAuthHash -} - -// GetEmailAuthHashOk returns a tuple with the EmailAuthHash field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Player) GetEmailAuthHashOk() (*string, bool) { - if o == nil || o.EmailAuthHash == nil { - return nil, false - } - return o.EmailAuthHash, true -} - -// HasEmailAuthHash returns a boolean if a field has been set. -func (o *Player) HasEmailAuthHash() bool { - if o != nil && o.EmailAuthHash != nil { - return true - } - - return false -} - -// SetEmailAuthHash gets a reference to the given string and assigns it to the EmailAuthHash field. -func (o *Player) SetEmailAuthHash(v string) { - o.EmailAuthHash = &v -} - -// GetIdentifier returns the Identifier field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *Player) GetIdentifier() string { - if o == nil || o.Identifier.Get() == nil { - var ret string - return ret - } - return *o.Identifier.Get() -} - -// GetIdentifierOk returns a tuple with the Identifier field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Player) GetIdentifierOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Identifier.Get(), o.Identifier.IsSet() -} - -// HasIdentifier returns a boolean if a field has been set. -func (o *Player) HasIdentifier() bool { - if o != nil && o.Identifier.IsSet() { - return true - } - - return false -} - -// SetIdentifier gets a reference to the given NullableString and assigns it to the Identifier field. -func (o *Player) SetIdentifier(v string) { - o.Identifier.Set(&v) -} -// SetIdentifierNil sets the value for Identifier to be an explicit nil -func (o *Player) SetIdentifierNil() { - o.Identifier.Set(nil) -} - -// UnsetIdentifier ensures that no value is present for Identifier, not even an explicit nil -func (o *Player) UnsetIdentifier() { - o.Identifier.Unset() -} - -// GetLanguage returns the Language field value if set, zero value otherwise. -func (o *Player) GetLanguage() string { - if o == nil || o.Language == nil { - var ret string - return ret - } - return *o.Language -} - -// GetLanguageOk returns a tuple with the Language field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Player) GetLanguageOk() (*string, bool) { - if o == nil || o.Language == nil { - return nil, false - } - return o.Language, true -} - -// HasLanguage returns a boolean if a field has been set. -func (o *Player) HasLanguage() bool { - if o != nil && o.Language != nil { - return true - } - - return false -} - -// SetLanguage gets a reference to the given string and assigns it to the Language field. -func (o *Player) SetLanguage(v string) { - o.Language = &v -} - -// GetTimezone returns the Timezone field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *Player) GetTimezone() int32 { - if o == nil || o.Timezone.Get() == nil { - var ret int32 - return ret - } - return *o.Timezone.Get() -} - -// GetTimezoneOk returns a tuple with the Timezone field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Player) GetTimezoneOk() (*int32, bool) { - if o == nil { - return nil, false - } - return o.Timezone.Get(), o.Timezone.IsSet() -} - -// HasTimezone returns a boolean if a field has been set. -func (o *Player) HasTimezone() bool { - if o != nil && o.Timezone.IsSet() { - return true - } - - return false -} - -// SetTimezone gets a reference to the given NullableInt32 and assigns it to the Timezone field. -func (o *Player) SetTimezone(v int32) { - o.Timezone.Set(&v) -} -// SetTimezoneNil sets the value for Timezone to be an explicit nil -func (o *Player) SetTimezoneNil() { - o.Timezone.Set(nil) -} - -// UnsetTimezone ensures that no value is present for Timezone, not even an explicit nil -func (o *Player) UnsetTimezone() { - o.Timezone.Unset() -} - -// GetGameVersion returns the GameVersion field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *Player) GetGameVersion() string { - if o == nil || o.GameVersion.Get() == nil { - var ret string - return ret - } - return *o.GameVersion.Get() -} - -// GetGameVersionOk returns a tuple with the GameVersion field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Player) GetGameVersionOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.GameVersion.Get(), o.GameVersion.IsSet() -} - -// HasGameVersion returns a boolean if a field has been set. -func (o *Player) HasGameVersion() bool { - if o != nil && o.GameVersion.IsSet() { - return true - } - - return false -} - -// SetGameVersion gets a reference to the given NullableString and assigns it to the GameVersion field. -func (o *Player) SetGameVersion(v string) { - o.GameVersion.Set(&v) -} -// SetGameVersionNil sets the value for GameVersion to be an explicit nil -func (o *Player) SetGameVersionNil() { - o.GameVersion.Set(nil) -} - -// UnsetGameVersion ensures that no value is present for GameVersion, not even an explicit nil -func (o *Player) UnsetGameVersion() { - o.GameVersion.Unset() -} - -// GetDeviceModel returns the DeviceModel field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *Player) GetDeviceModel() string { - if o == nil || o.DeviceModel.Get() == nil { - var ret string - return ret - } - return *o.DeviceModel.Get() -} - -// GetDeviceModelOk returns a tuple with the DeviceModel field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Player) GetDeviceModelOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.DeviceModel.Get(), o.DeviceModel.IsSet() -} - -// HasDeviceModel returns a boolean if a field has been set. -func (o *Player) HasDeviceModel() bool { - if o != nil && o.DeviceModel.IsSet() { - return true - } - - return false -} - -// SetDeviceModel gets a reference to the given NullableString and assigns it to the DeviceModel field. -func (o *Player) SetDeviceModel(v string) { - o.DeviceModel.Set(&v) -} -// SetDeviceModelNil sets the value for DeviceModel to be an explicit nil -func (o *Player) SetDeviceModelNil() { - o.DeviceModel.Set(nil) -} - -// UnsetDeviceModel ensures that no value is present for DeviceModel, not even an explicit nil -func (o *Player) UnsetDeviceModel() { - o.DeviceModel.Unset() -} - -// GetDeviceOs returns the DeviceOs field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *Player) GetDeviceOs() string { - if o == nil || o.DeviceOs.Get() == nil { - var ret string - return ret - } - return *o.DeviceOs.Get() -} - -// GetDeviceOsOk returns a tuple with the DeviceOs field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Player) GetDeviceOsOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.DeviceOs.Get(), o.DeviceOs.IsSet() -} - -// HasDeviceOs returns a boolean if a field has been set. -func (o *Player) HasDeviceOs() bool { - if o != nil && o.DeviceOs.IsSet() { - return true - } - - return false -} - -// SetDeviceOs gets a reference to the given NullableString and assigns it to the DeviceOs field. -func (o *Player) SetDeviceOs(v string) { - o.DeviceOs.Set(&v) -} -// SetDeviceOsNil sets the value for DeviceOs to be an explicit nil -func (o *Player) SetDeviceOsNil() { - o.DeviceOs.Set(nil) -} - -// UnsetDeviceOs ensures that no value is present for DeviceOs, not even an explicit nil -func (o *Player) UnsetDeviceOs() { - o.DeviceOs.Unset() -} - -// GetAdId returns the AdId field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *Player) GetAdId() string { - if o == nil || o.AdId.Get() == nil { - var ret string - return ret - } - return *o.AdId.Get() -} - -// GetAdIdOk returns a tuple with the AdId field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Player) GetAdIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.AdId.Get(), o.AdId.IsSet() -} - -// HasAdId returns a boolean if a field has been set. -func (o *Player) HasAdId() bool { - if o != nil && o.AdId.IsSet() { - return true - } - - return false -} - -// SetAdId gets a reference to the given NullableString and assigns it to the AdId field. -func (o *Player) SetAdId(v string) { - o.AdId.Set(&v) -} -// SetAdIdNil sets the value for AdId to be an explicit nil -func (o *Player) SetAdIdNil() { - o.AdId.Set(nil) -} - -// UnsetAdId ensures that no value is present for AdId, not even an explicit nil -func (o *Player) UnsetAdId() { - o.AdId.Unset() -} - -// GetSdk returns the Sdk field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *Player) GetSdk() string { - if o == nil || o.Sdk.Get() == nil { - var ret string - return ret - } - return *o.Sdk.Get() -} - -// GetSdkOk returns a tuple with the Sdk field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Player) GetSdkOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Sdk.Get(), o.Sdk.IsSet() -} - -// HasSdk returns a boolean if a field has been set. -func (o *Player) HasSdk() bool { - if o != nil && o.Sdk.IsSet() { - return true - } - - return false -} - -// SetSdk gets a reference to the given NullableString and assigns it to the Sdk field. -func (o *Player) SetSdk(v string) { - o.Sdk.Set(&v) -} -// SetSdkNil sets the value for Sdk to be an explicit nil -func (o *Player) SetSdkNil() { - o.Sdk.Set(nil) -} - -// UnsetSdk ensures that no value is present for Sdk, not even an explicit nil -func (o *Player) UnsetSdk() { - o.Sdk.Unset() -} - -// GetSessionCount returns the SessionCount field value if set, zero value otherwise. -func (o *Player) GetSessionCount() int32 { - if o == nil || o.SessionCount == nil { - var ret int32 - return ret - } - return *o.SessionCount -} - -// GetSessionCountOk returns a tuple with the SessionCount field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Player) GetSessionCountOk() (*int32, bool) { - if o == nil || o.SessionCount == nil { - return nil, false - } - return o.SessionCount, true -} - -// HasSessionCount returns a boolean if a field has been set. -func (o *Player) HasSessionCount() bool { - if o != nil && o.SessionCount != nil { - return true - } - - return false -} - -// SetSessionCount gets a reference to the given int32 and assigns it to the SessionCount field. -func (o *Player) SetSessionCount(v int32) { - o.SessionCount = &v -} - -// GetTags returns the Tags field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *Player) GetTags() map[string]interface{} { - if o == nil { - var ret map[string]interface{} - return ret - } - return o.Tags -} - -// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Player) GetTagsOk() (map[string]interface{}, bool) { - if o == nil || o.Tags == nil { - return nil, false - } - return o.Tags, true -} - -// HasTags returns a boolean if a field has been set. -func (o *Player) HasTags() bool { - if o != nil && o.Tags != nil { - return true - } - - return false -} - -// SetTags gets a reference to the given map[string]interface{} and assigns it to the Tags field. -func (o *Player) SetTags(v map[string]interface{}) { - o.Tags = v -} - -// GetAmountSpent returns the AmountSpent field value if set, zero value otherwise. -func (o *Player) GetAmountSpent() float32 { - if o == nil || o.AmountSpent == nil { - var ret float32 - return ret - } - return *o.AmountSpent -} - -// GetAmountSpentOk returns a tuple with the AmountSpent field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Player) GetAmountSpentOk() (*float32, bool) { - if o == nil || o.AmountSpent == nil { - return nil, false - } - return o.AmountSpent, true -} - -// HasAmountSpent returns a boolean if a field has been set. -func (o *Player) HasAmountSpent() bool { - if o != nil && o.AmountSpent != nil { - return true - } - - return false -} - -// SetAmountSpent gets a reference to the given float32 and assigns it to the AmountSpent field. -func (o *Player) SetAmountSpent(v float32) { - o.AmountSpent = &v -} - -// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. -func (o *Player) GetCreatedAt() int64 { - if o == nil || o.CreatedAt == nil { - var ret int64 - return ret - } - return *o.CreatedAt -} - -// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Player) GetCreatedAtOk() (*int64, bool) { - if o == nil || o.CreatedAt == nil { - return nil, false - } - return o.CreatedAt, true -} - -// HasCreatedAt returns a boolean if a field has been set. -func (o *Player) HasCreatedAt() bool { - if o != nil && o.CreatedAt != nil { - return true - } - - return false -} - -// SetCreatedAt gets a reference to the given int64 and assigns it to the CreatedAt field. -func (o *Player) SetCreatedAt(v int64) { - o.CreatedAt = &v -} - -// GetPlaytime returns the Playtime field value if set, zero value otherwise. -func (o *Player) GetPlaytime() int64 { - if o == nil || o.Playtime == nil { - var ret int64 - return ret - } - return *o.Playtime -} - -// GetPlaytimeOk returns a tuple with the Playtime field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Player) GetPlaytimeOk() (*int64, bool) { - if o == nil || o.Playtime == nil { - return nil, false - } - return o.Playtime, true -} - -// HasPlaytime returns a boolean if a field has been set. -func (o *Player) HasPlaytime() bool { - if o != nil && o.Playtime != nil { - return true - } - - return false -} - -// SetPlaytime gets a reference to the given int64 and assigns it to the Playtime field. -func (o *Player) SetPlaytime(v int64) { - o.Playtime = &v -} - -// GetBadgeCount returns the BadgeCount field value if set, zero value otherwise. -func (o *Player) GetBadgeCount() int32 { - if o == nil || o.BadgeCount == nil { - var ret int32 - return ret - } - return *o.BadgeCount -} - -// GetBadgeCountOk returns a tuple with the BadgeCount field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Player) GetBadgeCountOk() (*int32, bool) { - if o == nil || o.BadgeCount == nil { - return nil, false - } - return o.BadgeCount, true -} - -// HasBadgeCount returns a boolean if a field has been set. -func (o *Player) HasBadgeCount() bool { - if o != nil && o.BadgeCount != nil { - return true - } - - return false -} - -// SetBadgeCount gets a reference to the given int32 and assigns it to the BadgeCount field. -func (o *Player) SetBadgeCount(v int32) { - o.BadgeCount = &v -} - -// GetLastActive returns the LastActive field value if set, zero value otherwise. -func (o *Player) GetLastActive() int32 { - if o == nil || o.LastActive == nil { - var ret int32 - return ret - } - return *o.LastActive -} - -// GetLastActiveOk returns a tuple with the LastActive field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Player) GetLastActiveOk() (*int32, bool) { - if o == nil || o.LastActive == nil { - return nil, false - } - return o.LastActive, true -} - -// HasLastActive returns a boolean if a field has been set. -func (o *Player) HasLastActive() bool { - if o != nil && o.LastActive != nil { - return true - } - - return false -} - -// SetLastActive gets a reference to the given int32 and assigns it to the LastActive field. -func (o *Player) SetLastActive(v int32) { - o.LastActive = &v -} - -// GetNotificationTypes returns the NotificationTypes field value if set, zero value otherwise. -func (o *Player) GetNotificationTypes() int32 { - if o == nil || o.NotificationTypes == nil { - var ret int32 - return ret - } - return *o.NotificationTypes -} - -// GetNotificationTypesOk returns a tuple with the NotificationTypes field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Player) GetNotificationTypesOk() (*int32, bool) { - if o == nil || o.NotificationTypes == nil { - return nil, false - } - return o.NotificationTypes, true -} - -// HasNotificationTypes returns a boolean if a field has been set. -func (o *Player) HasNotificationTypes() bool { - if o != nil && o.NotificationTypes != nil { - return true - } - - return false -} - -// SetNotificationTypes gets a reference to the given int32 and assigns it to the NotificationTypes field. -func (o *Player) SetNotificationTypes(v int32) { - o.NotificationTypes = &v -} - -// GetTestType returns the TestType field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *Player) GetTestType() int32 { - if o == nil || o.TestType.Get() == nil { - var ret int32 - return ret - } - return *o.TestType.Get() -} - -// GetTestTypeOk returns a tuple with the TestType field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Player) GetTestTypeOk() (*int32, bool) { - if o == nil { - return nil, false - } - return o.TestType.Get(), o.TestType.IsSet() -} - -// HasTestType returns a boolean if a field has been set. -func (o *Player) HasTestType() bool { - if o != nil && o.TestType.IsSet() { - return true - } - - return false -} - -// SetTestType gets a reference to the given NullableInt32 and assigns it to the TestType field. -func (o *Player) SetTestType(v int32) { - o.TestType.Set(&v) -} -// SetTestTypeNil sets the value for TestType to be an explicit nil -func (o *Player) SetTestTypeNil() { - o.TestType.Set(nil) -} - -// UnsetTestType ensures that no value is present for TestType, not even an explicit nil -func (o *Player) UnsetTestType() { - o.TestType.Unset() -} - -// GetLong returns the Long field value if set, zero value otherwise. -func (o *Player) GetLong() float32 { - if o == nil || o.Long == nil { - var ret float32 - return ret - } - return *o.Long -} - -// GetLongOk returns a tuple with the Long field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Player) GetLongOk() (*float32, bool) { - if o == nil || o.Long == nil { - return nil, false - } - return o.Long, true -} - -// HasLong returns a boolean if a field has been set. -func (o *Player) HasLong() bool { - if o != nil && o.Long != nil { - return true - } - - return false -} - -// SetLong gets a reference to the given float32 and assigns it to the Long field. -func (o *Player) SetLong(v float32) { - o.Long = &v -} - -// GetLat returns the Lat field value if set, zero value otherwise. -func (o *Player) GetLat() float32 { - if o == nil || o.Lat == nil { - var ret float32 - return ret - } - return *o.Lat -} - -// GetLatOk returns a tuple with the Lat field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Player) GetLatOk() (*float32, bool) { - if o == nil || o.Lat == nil { - return nil, false - } - return o.Lat, true -} - -// HasLat returns a boolean if a field has been set. -func (o *Player) HasLat() bool { - if o != nil && o.Lat != nil { - return true - } - - return false -} - -// SetLat gets a reference to the given float32 and assigns it to the Lat field. -func (o *Player) SetLat(v float32) { - o.Lat = &v -} - -// GetCountry returns the Country field value if set, zero value otherwise. -func (o *Player) GetCountry() string { - if o == nil || o.Country == nil { - var ret string - return ret - } - return *o.Country -} - -// GetCountryOk returns a tuple with the Country field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Player) GetCountryOk() (*string, bool) { - if o == nil || o.Country == nil { - return nil, false - } - return o.Country, true -} - -// HasCountry returns a boolean if a field has been set. -func (o *Player) HasCountry() bool { - if o != nil && o.Country != nil { - return true - } - - return false -} - -// SetCountry gets a reference to the given string and assigns it to the Country field. -func (o *Player) SetCountry(v string) { - o.Country = &v -} - -func (o Player) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.InvalidIdentifier != nil { - toSerialize["invalid_identifier"] = o.InvalidIdentifier - } - if o.AppId != nil { - toSerialize["app_id"] = o.AppId - } - if true { - toSerialize["device_type"] = o.DeviceType - } - if o.ExternalUserId.IsSet() { - toSerialize["external_user_id"] = o.ExternalUserId.Get() - } - if o.ExternalUserIdAuthHash != nil { - toSerialize["external_user_id_auth_hash"] = o.ExternalUserIdAuthHash - } - if o.EmailAuthHash != nil { - toSerialize["email_auth_hash"] = o.EmailAuthHash - } - if o.Identifier.IsSet() { - toSerialize["identifier"] = o.Identifier.Get() - } - if o.Language != nil { - toSerialize["language"] = o.Language - } - if o.Timezone.IsSet() { - toSerialize["timezone"] = o.Timezone.Get() - } - if o.GameVersion.IsSet() { - toSerialize["game_version"] = o.GameVersion.Get() - } - if o.DeviceModel.IsSet() { - toSerialize["device_model"] = o.DeviceModel.Get() - } - if o.DeviceOs.IsSet() { - toSerialize["device_os"] = o.DeviceOs.Get() - } - if o.AdId.IsSet() { - toSerialize["ad_id"] = o.AdId.Get() - } - if o.Sdk.IsSet() { - toSerialize["sdk"] = o.Sdk.Get() - } - if o.SessionCount != nil { - toSerialize["session_count"] = o.SessionCount - } - if o.Tags != nil { - toSerialize["tags"] = o.Tags - } - if o.AmountSpent != nil { - toSerialize["amount_spent"] = o.AmountSpent - } - if o.CreatedAt != nil { - toSerialize["created_at"] = o.CreatedAt - } - if o.Playtime != nil { - toSerialize["playtime"] = o.Playtime - } - if o.BadgeCount != nil { - toSerialize["badge_count"] = o.BadgeCount - } - if o.LastActive != nil { - toSerialize["last_active"] = o.LastActive - } - if o.NotificationTypes != nil { - toSerialize["notification_types"] = o.NotificationTypes - } - if o.TestType.IsSet() { - toSerialize["test_type"] = o.TestType.Get() - } - if o.Long != nil { - toSerialize["long"] = o.Long - } - if o.Lat != nil { - toSerialize["lat"] = o.Lat - } - if o.Country != nil { - toSerialize["country"] = o.Country - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return json.Marshal(toSerialize) -} - -func (o *Player) UnmarshalJSON(bytes []byte) (err error) { - varPlayer := _Player{} - - if err = json.Unmarshal(bytes, &varPlayer); err == nil { - *o = Player(varPlayer) - } - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { - delete(additionalProperties, "id") - delete(additionalProperties, "invalid_identifier") - delete(additionalProperties, "app_id") - delete(additionalProperties, "device_type") - delete(additionalProperties, "external_user_id") - delete(additionalProperties, "external_user_id_auth_hash") - delete(additionalProperties, "email_auth_hash") - delete(additionalProperties, "identifier") - delete(additionalProperties, "language") - delete(additionalProperties, "timezone") - delete(additionalProperties, "game_version") - delete(additionalProperties, "device_model") - delete(additionalProperties, "device_os") - delete(additionalProperties, "ad_id") - delete(additionalProperties, "sdk") - delete(additionalProperties, "session_count") - delete(additionalProperties, "tags") - delete(additionalProperties, "amount_spent") - delete(additionalProperties, "created_at") - delete(additionalProperties, "playtime") - delete(additionalProperties, "badge_count") - delete(additionalProperties, "last_active") - delete(additionalProperties, "notification_types") - delete(additionalProperties, "test_type") - delete(additionalProperties, "long") - delete(additionalProperties, "lat") - delete(additionalProperties, "country") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullablePlayer struct { - value *Player - isSet bool -} - -func (v NullablePlayer) Get() *Player { - return v.value -} - -func (v *NullablePlayer) Set(val *Player) { - v.value = val - v.isSet = true -} - -func (v NullablePlayer) IsSet() bool { - return v.isSet -} - -func (v *NullablePlayer) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullablePlayer(val *Player) *NullablePlayer { - return &NullablePlayer{value: val, isSet: true} -} - -func (v NullablePlayer) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullablePlayer) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_player_notification_target_include_aliases.go b/model_player_notification_target_include_aliases.go deleted file mode 100644 index f068939..0000000 --- a/model_player_notification_target_include_aliases.go +++ /dev/null @@ -1,141 +0,0 @@ -/* -OneSignal - -A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com - -API version: 1.4.0 -Contact: devrel@onesignal.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onesignal - -import ( - "encoding/json" -) - -// PlayerNotificationTargetIncludeAliases struct for PlayerNotificationTargetIncludeAliases -type PlayerNotificationTargetIncludeAliases struct { - AliasLabel []string `json:"alias_label,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _PlayerNotificationTargetIncludeAliases PlayerNotificationTargetIncludeAliases - -// NewPlayerNotificationTargetIncludeAliases instantiates a new PlayerNotificationTargetIncludeAliases object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewPlayerNotificationTargetIncludeAliases() *PlayerNotificationTargetIncludeAliases { - this := PlayerNotificationTargetIncludeAliases{} - return &this -} - -// NewPlayerNotificationTargetIncludeAliasesWithDefaults instantiates a new PlayerNotificationTargetIncludeAliases object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewPlayerNotificationTargetIncludeAliasesWithDefaults() *PlayerNotificationTargetIncludeAliases { - this := PlayerNotificationTargetIncludeAliases{} - return &this -} - -// GetAliasLabel returns the AliasLabel field value if set, zero value otherwise. -func (o *PlayerNotificationTargetIncludeAliases) GetAliasLabel() []string { - if o == nil || o.AliasLabel == nil { - var ret []string - return ret - } - return o.AliasLabel -} - -// GetAliasLabelOk returns a tuple with the AliasLabel field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PlayerNotificationTargetIncludeAliases) GetAliasLabelOk() ([]string, bool) { - if o == nil || o.AliasLabel == nil { - return nil, false - } - return o.AliasLabel, true -} - -// HasAliasLabel returns a boolean if a field has been set. -func (o *PlayerNotificationTargetIncludeAliases) HasAliasLabel() bool { - if o != nil && o.AliasLabel != nil { - return true - } - - return false -} - -// SetAliasLabel gets a reference to the given []string and assigns it to the AliasLabel field. -func (o *PlayerNotificationTargetIncludeAliases) SetAliasLabel(v []string) { - o.AliasLabel = v -} - -func (o PlayerNotificationTargetIncludeAliases) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.AliasLabel != nil { - toSerialize["alias_label"] = o.AliasLabel - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return json.Marshal(toSerialize) -} - -func (o *PlayerNotificationTargetIncludeAliases) UnmarshalJSON(bytes []byte) (err error) { - varPlayerNotificationTargetIncludeAliases := _PlayerNotificationTargetIncludeAliases{} - - if err = json.Unmarshal(bytes, &varPlayerNotificationTargetIncludeAliases); err == nil { - *o = PlayerNotificationTargetIncludeAliases(varPlayerNotificationTargetIncludeAliases) - } - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { - delete(additionalProperties, "alias_label") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullablePlayerNotificationTargetIncludeAliases struct { - value *PlayerNotificationTargetIncludeAliases - isSet bool -} - -func (v NullablePlayerNotificationTargetIncludeAliases) Get() *PlayerNotificationTargetIncludeAliases { - return v.value -} - -func (v *NullablePlayerNotificationTargetIncludeAliases) Set(val *PlayerNotificationTargetIncludeAliases) { - v.value = val - v.isSet = true -} - -func (v NullablePlayerNotificationTargetIncludeAliases) IsSet() bool { - return v.isSet -} - -func (v *NullablePlayerNotificationTargetIncludeAliases) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullablePlayerNotificationTargetIncludeAliases(val *PlayerNotificationTargetIncludeAliases) *NullablePlayerNotificationTargetIncludeAliases { - return &NullablePlayerNotificationTargetIncludeAliases{value: val, isSet: true} -} - -func (v NullablePlayerNotificationTargetIncludeAliases) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullablePlayerNotificationTargetIncludeAliases) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_inline_response_202.go b/model_properties_body.go similarity index 58% rename from model_inline_response_202.go rename to model_properties_body.go index 98a9b54..325f8ce 100644 --- a/model_inline_response_202.go +++ b/model_properties_body.go @@ -3,7 +3,7 @@ OneSignal A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com -API version: 1.4.0 +API version: 5.0.1 Contact: devrel@onesignal.com */ @@ -15,33 +15,33 @@ import ( "encoding/json" ) -// InlineResponse202 struct for InlineResponse202 -type InlineResponse202 struct { +// PropertiesBody struct for PropertiesBody +type PropertiesBody struct { Properties *PropertiesObject `json:"properties,omitempty"` AdditionalProperties map[string]interface{} } -type _InlineResponse202 InlineResponse202 +type _PropertiesBody PropertiesBody -// NewInlineResponse202 instantiates a new InlineResponse202 object +// NewPropertiesBody instantiates a new PropertiesBody object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewInlineResponse202() *InlineResponse202 { - this := InlineResponse202{} +func NewPropertiesBody() *PropertiesBody { + this := PropertiesBody{} return &this } -// NewInlineResponse202WithDefaults instantiates a new InlineResponse202 object +// NewPropertiesBodyWithDefaults instantiates a new PropertiesBody object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set -func NewInlineResponse202WithDefaults() *InlineResponse202 { - this := InlineResponse202{} +func NewPropertiesBodyWithDefaults() *PropertiesBody { + this := PropertiesBody{} return &this } // GetProperties returns the Properties field value if set, zero value otherwise. -func (o *InlineResponse202) GetProperties() PropertiesObject { +func (o *PropertiesBody) GetProperties() PropertiesObject { if o == nil || o.Properties == nil { var ret PropertiesObject return ret @@ -51,7 +51,7 @@ func (o *InlineResponse202) GetProperties() PropertiesObject { // GetPropertiesOk returns a tuple with the Properties field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *InlineResponse202) GetPropertiesOk() (*PropertiesObject, bool) { +func (o *PropertiesBody) GetPropertiesOk() (*PropertiesObject, bool) { if o == nil || o.Properties == nil { return nil, false } @@ -59,7 +59,7 @@ func (o *InlineResponse202) GetPropertiesOk() (*PropertiesObject, bool) { } // HasProperties returns a boolean if a field has been set. -func (o *InlineResponse202) HasProperties() bool { +func (o *PropertiesBody) HasProperties() bool { if o != nil && o.Properties != nil { return true } @@ -68,11 +68,11 @@ func (o *InlineResponse202) HasProperties() bool { } // SetProperties gets a reference to the given PropertiesObject and assigns it to the Properties field. -func (o *InlineResponse202) SetProperties(v PropertiesObject) { +func (o *PropertiesBody) SetProperties(v PropertiesObject) { o.Properties = &v } -func (o InlineResponse202) MarshalJSON() ([]byte, error) { +func (o PropertiesBody) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Properties != nil { toSerialize["properties"] = o.Properties @@ -85,11 +85,11 @@ func (o InlineResponse202) MarshalJSON() ([]byte, error) { return json.Marshal(toSerialize) } -func (o *InlineResponse202) UnmarshalJSON(bytes []byte) (err error) { - varInlineResponse202 := _InlineResponse202{} +func (o *PropertiesBody) UnmarshalJSON(bytes []byte) (err error) { + varPropertiesBody := _PropertiesBody{} - if err = json.Unmarshal(bytes, &varInlineResponse202); err == nil { - *o = InlineResponse202(varInlineResponse202) + if err = json.Unmarshal(bytes, &varPropertiesBody); err == nil { + *o = PropertiesBody(varPropertiesBody) } additionalProperties := make(map[string]interface{}) @@ -102,38 +102,38 @@ func (o *InlineResponse202) UnmarshalJSON(bytes []byte) (err error) { return err } -type NullableInlineResponse202 struct { - value *InlineResponse202 +type NullablePropertiesBody struct { + value *PropertiesBody isSet bool } -func (v NullableInlineResponse202) Get() *InlineResponse202 { +func (v NullablePropertiesBody) Get() *PropertiesBody { return v.value } -func (v *NullableInlineResponse202) Set(val *InlineResponse202) { +func (v *NullablePropertiesBody) Set(val *PropertiesBody) { v.value = val v.isSet = true } -func (v NullableInlineResponse202) IsSet() bool { +func (v NullablePropertiesBody) IsSet() bool { return v.isSet } -func (v *NullableInlineResponse202) Unset() { +func (v *NullablePropertiesBody) Unset() { v.value = nil v.isSet = false } -func NewNullableInlineResponse202(val *InlineResponse202) *NullableInlineResponse202 { - return &NullableInlineResponse202{value: val, isSet: true} +func NewNullablePropertiesBody(val *PropertiesBody) *NullablePropertiesBody { + return &NullablePropertiesBody{value: val, isSet: true} } -func (v NullableInlineResponse202) MarshalJSON() ([]byte, error) { +func (v NullablePropertiesBody) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } -func (v *NullableInlineResponse202) UnmarshalJSON(src []byte) error { +func (v *NullablePropertiesBody) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } diff --git a/model_properties_deltas.go b/model_properties_deltas.go index 5e1873f..ed0ae74 100644 --- a/model_properties_deltas.go +++ b/model_properties_deltas.go @@ -3,7 +3,7 @@ OneSignal A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com -API version: 1.4.0 +API version: 5.0.1 Contact: devrel@onesignal.com */ @@ -17,8 +17,8 @@ import ( // PropertiesDeltas struct for PropertiesDeltas type PropertiesDeltas struct { - SessionTime *float32 `json:"session_time,omitempty"` - SessionCount *float32 `json:"session_count,omitempty"` + SessionTime *int32 `json:"session_time,omitempty"` + SessionCount *int32 `json:"session_count,omitempty"` Purchases []Purchase `json:"purchases,omitempty"` AdditionalProperties map[string]interface{} } @@ -43,9 +43,9 @@ func NewPropertiesDeltasWithDefaults() *PropertiesDeltas { } // GetSessionTime returns the SessionTime field value if set, zero value otherwise. -func (o *PropertiesDeltas) GetSessionTime() float32 { +func (o *PropertiesDeltas) GetSessionTime() int32 { if o == nil || o.SessionTime == nil { - var ret float32 + var ret int32 return ret } return *o.SessionTime @@ -53,7 +53,7 @@ func (o *PropertiesDeltas) GetSessionTime() float32 { // GetSessionTimeOk returns a tuple with the SessionTime field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PropertiesDeltas) GetSessionTimeOk() (*float32, bool) { +func (o *PropertiesDeltas) GetSessionTimeOk() (*int32, bool) { if o == nil || o.SessionTime == nil { return nil, false } @@ -69,15 +69,15 @@ func (o *PropertiesDeltas) HasSessionTime() bool { return false } -// SetSessionTime gets a reference to the given float32 and assigns it to the SessionTime field. -func (o *PropertiesDeltas) SetSessionTime(v float32) { +// SetSessionTime gets a reference to the given int32 and assigns it to the SessionTime field. +func (o *PropertiesDeltas) SetSessionTime(v int32) { o.SessionTime = &v } // GetSessionCount returns the SessionCount field value if set, zero value otherwise. -func (o *PropertiesDeltas) GetSessionCount() float32 { +func (o *PropertiesDeltas) GetSessionCount() int32 { if o == nil || o.SessionCount == nil { - var ret float32 + var ret int32 return ret } return *o.SessionCount @@ -85,7 +85,7 @@ func (o *PropertiesDeltas) GetSessionCount() float32 { // GetSessionCountOk returns a tuple with the SessionCount field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PropertiesDeltas) GetSessionCountOk() (*float32, bool) { +func (o *PropertiesDeltas) GetSessionCountOk() (*int32, bool) { if o == nil || o.SessionCount == nil { return nil, false } @@ -101,8 +101,8 @@ func (o *PropertiesDeltas) HasSessionCount() bool { return false } -// SetSessionCount gets a reference to the given float32 and assigns it to the SessionCount field. -func (o *PropertiesDeltas) SetSessionCount(v float32) { +// SetSessionCount gets a reference to the given int32 and assigns it to the SessionCount field. +func (o *PropertiesDeltas) SetSessionCount(v int32) { o.SessionCount = &v } diff --git a/model_properties_object.go b/model_properties_object.go index ba60e8b..879e75c 100644 --- a/model_properties_object.go +++ b/model_properties_object.go @@ -3,7 +3,7 @@ OneSignal A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com -API version: 1.4.0 +API version: 5.0.1 Contact: devrel@onesignal.com */ @@ -23,8 +23,8 @@ type PropertiesObject struct { Lat *float32 `json:"lat,omitempty"` Long *float32 `json:"long,omitempty"` Country *string `json:"country,omitempty"` - FirstActive *float32 `json:"first_active,omitempty"` - LastActive *float32 `json:"last_active,omitempty"` + FirstActive *int32 `json:"first_active,omitempty"` + LastActive *int32 `json:"last_active,omitempty"` AmountSpent *float32 `json:"amount_spent,omitempty"` Purchases []Purchase `json:"purchases,omitempty"` Ip *string `json:"ip,omitempty"` @@ -243,9 +243,9 @@ func (o *PropertiesObject) SetCountry(v string) { } // GetFirstActive returns the FirstActive field value if set, zero value otherwise. -func (o *PropertiesObject) GetFirstActive() float32 { +func (o *PropertiesObject) GetFirstActive() int32 { if o == nil || o.FirstActive == nil { - var ret float32 + var ret int32 return ret } return *o.FirstActive @@ -253,7 +253,7 @@ func (o *PropertiesObject) GetFirstActive() float32 { // GetFirstActiveOk returns a tuple with the FirstActive field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PropertiesObject) GetFirstActiveOk() (*float32, bool) { +func (o *PropertiesObject) GetFirstActiveOk() (*int32, bool) { if o == nil || o.FirstActive == nil { return nil, false } @@ -269,15 +269,15 @@ func (o *PropertiesObject) HasFirstActive() bool { return false } -// SetFirstActive gets a reference to the given float32 and assigns it to the FirstActive field. -func (o *PropertiesObject) SetFirstActive(v float32) { +// SetFirstActive gets a reference to the given int32 and assigns it to the FirstActive field. +func (o *PropertiesObject) SetFirstActive(v int32) { o.FirstActive = &v } // GetLastActive returns the LastActive field value if set, zero value otherwise. -func (o *PropertiesObject) GetLastActive() float32 { +func (o *PropertiesObject) GetLastActive() int32 { if o == nil || o.LastActive == nil { - var ret float32 + var ret int32 return ret } return *o.LastActive @@ -285,7 +285,7 @@ func (o *PropertiesObject) GetLastActive() float32 { // GetLastActiveOk returns a tuple with the LastActive field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PropertiesObject) GetLastActiveOk() (*float32, bool) { +func (o *PropertiesObject) GetLastActiveOk() (*int32, bool) { if o == nil || o.LastActive == nil { return nil, false } @@ -301,8 +301,8 @@ func (o *PropertiesObject) HasLastActive() bool { return false } -// SetLastActive gets a reference to the given float32 and assigns it to the LastActive field. -func (o *PropertiesObject) SetLastActive(v float32) { +// SetLastActive gets a reference to the given int32 and assigns it to the LastActive field. +func (o *PropertiesObject) SetLastActive(v int32) { o.LastActive = &v } diff --git a/model_purchase.go b/model_purchase.go index 071d49e..b467271 100644 --- a/model_purchase.go +++ b/model_purchase.go @@ -3,7 +3,7 @@ OneSignal A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com -API version: 1.4.0 +API version: 5.0.1 Contact: devrel@onesignal.com */ @@ -23,7 +23,7 @@ type Purchase struct { Amount string `json:"amount"` // The 3-letter ISO 4217 currency code. Required for correct storage and conversion of amount. Iso string `json:"iso"` - Count *float32 `json:"count,omitempty"` + Count *int32 `json:"count,omitempty"` AdditionalProperties map[string]interface{} } @@ -122,9 +122,9 @@ func (o *Purchase) SetIso(v string) { } // GetCount returns the Count field value if set, zero value otherwise. -func (o *Purchase) GetCount() float32 { +func (o *Purchase) GetCount() int32 { if o == nil || o.Count == nil { - var ret float32 + var ret int32 return ret } return *o.Count @@ -132,7 +132,7 @@ func (o *Purchase) GetCount() float32 { // GetCountOk returns a tuple with the Count field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Purchase) GetCountOk() (*float32, bool) { +func (o *Purchase) GetCountOk() (*int32, bool) { if o == nil || o.Count == nil { return nil, false } @@ -148,8 +148,8 @@ func (o *Purchase) HasCount() bool { return false } -// SetCount gets a reference to the given float32 and assigns it to the Count field. -func (o *Purchase) SetCount(v float32) { +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *Purchase) SetCount(v int32) { o.Count = &v } diff --git a/model_rate_limit_error.go b/model_rate_limit_error.go new file mode 100644 index 0000000..1c7448d --- /dev/null +++ b/model_rate_limit_error.go @@ -0,0 +1,178 @@ +/* +OneSignal + +A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com + +API version: 5.0.1 +Contact: devrel@onesignal.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onesignal + +import ( + "encoding/json" +) + +// RateLimitError struct for RateLimitError +type RateLimitError struct { + Errors []string `json:"errors,omitempty"` + Limit *string `json:"limit,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _RateLimitError RateLimitError + +// NewRateLimitError instantiates a new RateLimitError object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRateLimitError() *RateLimitError { + this := RateLimitError{} + return &this +} + +// NewRateLimitErrorWithDefaults instantiates a new RateLimitError object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRateLimitErrorWithDefaults() *RateLimitError { + this := RateLimitError{} + return &this +} + +// GetErrors returns the Errors field value if set, zero value otherwise. +func (o *RateLimitError) GetErrors() []string { + if o == nil || o.Errors == nil { + var ret []string + return ret + } + return o.Errors +} + +// GetErrorsOk returns a tuple with the Errors field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RateLimitError) GetErrorsOk() ([]string, bool) { + if o == nil || o.Errors == nil { + return nil, false + } + return o.Errors, true +} + +// HasErrors returns a boolean if a field has been set. +func (o *RateLimitError) HasErrors() bool { + if o != nil && o.Errors != nil { + return true + } + + return false +} + +// SetErrors gets a reference to the given []string and assigns it to the Errors field. +func (o *RateLimitError) SetErrors(v []string) { + o.Errors = v +} + +// GetLimit returns the Limit field value if set, zero value otherwise. +func (o *RateLimitError) GetLimit() string { + if o == nil || o.Limit == nil { + var ret string + return ret + } + return *o.Limit +} + +// GetLimitOk returns a tuple with the Limit field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RateLimitError) GetLimitOk() (*string, bool) { + if o == nil || o.Limit == nil { + return nil, false + } + return o.Limit, true +} + +// HasLimit returns a boolean if a field has been set. +func (o *RateLimitError) HasLimit() bool { + if o != nil && o.Limit != nil { + return true + } + + return false +} + +// SetLimit gets a reference to the given string and assigns it to the Limit field. +func (o *RateLimitError) SetLimit(v string) { + o.Limit = &v +} + +func (o RateLimitError) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Errors != nil { + toSerialize["errors"] = o.Errors + } + if o.Limit != nil { + toSerialize["limit"] = o.Limit + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return json.Marshal(toSerialize) +} + +func (o *RateLimitError) UnmarshalJSON(bytes []byte) (err error) { + varRateLimitError := _RateLimitError{} + + if err = json.Unmarshal(bytes, &varRateLimitError); err == nil { + *o = RateLimitError(varRateLimitError) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "errors") + delete(additionalProperties, "limit") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableRateLimitError struct { + value *RateLimitError + isSet bool +} + +func (v NullableRateLimitError) Get() *RateLimitError { + return v.value +} + +func (v *NullableRateLimitError) Set(val *RateLimitError) { + v.value = val + v.isSet = true +} + +func (v NullableRateLimitError) IsSet() bool { + return v.isSet +} + +func (v *NullableRateLimitError) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRateLimitError(val *RateLimitError) *NullableRateLimitError { + return &NullableRateLimitError{value: val, isSet: true} +} + +func (v NullableRateLimitError) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRateLimitError) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_rate_limiter_error.go b/model_rate_limiter_error.go deleted file mode 100644 index f9a554c..0000000 --- a/model_rate_limiter_error.go +++ /dev/null @@ -1,141 +0,0 @@ -/* -OneSignal - -A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com - -API version: 1.4.0 -Contact: devrel@onesignal.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onesignal - -import ( - "encoding/json" -) - -// RateLimiterError struct for RateLimiterError -type RateLimiterError struct { - Errors []GenericErrorErrorsInner `json:"errors,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _RateLimiterError RateLimiterError - -// NewRateLimiterError instantiates a new RateLimiterError object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewRateLimiterError() *RateLimiterError { - this := RateLimiterError{} - return &this -} - -// NewRateLimiterErrorWithDefaults instantiates a new RateLimiterError object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewRateLimiterErrorWithDefaults() *RateLimiterError { - this := RateLimiterError{} - return &this -} - -// GetErrors returns the Errors field value if set, zero value otherwise. -func (o *RateLimiterError) GetErrors() []GenericErrorErrorsInner { - if o == nil || o.Errors == nil { - var ret []GenericErrorErrorsInner - return ret - } - return o.Errors -} - -// GetErrorsOk returns a tuple with the Errors field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RateLimiterError) GetErrorsOk() ([]GenericErrorErrorsInner, bool) { - if o == nil || o.Errors == nil { - return nil, false - } - return o.Errors, true -} - -// HasErrors returns a boolean if a field has been set. -func (o *RateLimiterError) HasErrors() bool { - if o != nil && o.Errors != nil { - return true - } - - return false -} - -// SetErrors gets a reference to the given []GenericErrorErrorsInner and assigns it to the Errors field. -func (o *RateLimiterError) SetErrors(v []GenericErrorErrorsInner) { - o.Errors = v -} - -func (o RateLimiterError) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Errors != nil { - toSerialize["errors"] = o.Errors - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return json.Marshal(toSerialize) -} - -func (o *RateLimiterError) UnmarshalJSON(bytes []byte) (err error) { - varRateLimiterError := _RateLimiterError{} - - if err = json.Unmarshal(bytes, &varRateLimiterError); err == nil { - *o = RateLimiterError(varRateLimiterError) - } - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { - delete(additionalProperties, "errors") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableRateLimiterError struct { - value *RateLimiterError - isSet bool -} - -func (v NullableRateLimiterError) Get() *RateLimiterError { - return v.value -} - -func (v *NullableRateLimiterError) Set(val *RateLimiterError) { - v.value = val - v.isSet = true -} - -func (v NullableRateLimiterError) IsSet() bool { - return v.isSet -} - -func (v *NullableRateLimiterError) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRateLimiterError(val *RateLimiterError) *NullableRateLimiterError { - return &NullableRateLimiterError{value: val, isSet: true} -} - -func (v NullableRateLimiterError) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRateLimiterError) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_segment.go b/model_segment.go index 2c32670..e571385 100644 --- a/model_segment.go +++ b/model_segment.go @@ -3,7 +3,7 @@ OneSignal A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com -API version: 1.4.0 +API version: 5.0.1 Contact: devrel@onesignal.com */ @@ -22,7 +22,7 @@ type Segment struct { // Name of the segment. You'll see this name on the Web UI. Name string `json:"name"` // Filter or operators the segment will have. For a list of available filters with details, please see Send to Users Based on Filters. - Filters []FilterExpressions `json:"filters"` + Filters []FilterExpression `json:"filters"` AdditionalProperties map[string]interface{} } @@ -32,7 +32,7 @@ type _Segment Segment // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewSegment(name string, filters []FilterExpressions) *Segment { +func NewSegment(name string, filters []FilterExpression) *Segment { this := Segment{} this.Name = name this.Filters = filters @@ -104,9 +104,9 @@ func (o *Segment) SetName(v string) { } // GetFilters returns the Filters field value -func (o *Segment) GetFilters() []FilterExpressions { +func (o *Segment) GetFilters() []FilterExpression { if o == nil { - var ret []FilterExpressions + var ret []FilterExpression return ret } @@ -115,7 +115,7 @@ func (o *Segment) GetFilters() []FilterExpressions { // GetFiltersOk returns a tuple with the Filters field value // and a boolean to check if the value has been set. -func (o *Segment) GetFiltersOk() ([]FilterExpressions, bool) { +func (o *Segment) GetFiltersOk() ([]FilterExpression, bool) { if o == nil { return nil, false } @@ -123,7 +123,7 @@ func (o *Segment) GetFiltersOk() ([]FilterExpressions, bool) { } // SetFilters sets field value -func (o *Segment) SetFilters(v []FilterExpressions) { +func (o *Segment) SetFilters(v []FilterExpression) { o.Filters = v } diff --git a/model_segment_data.go b/model_segment_data.go new file mode 100644 index 0000000..9ce64b8 --- /dev/null +++ b/model_segment_data.go @@ -0,0 +1,370 @@ +/* +OneSignal + +A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com + +API version: 5.0.1 +Contact: devrel@onesignal.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onesignal + +import ( + "encoding/json" +) + +// SegmentData struct for SegmentData +type SegmentData struct { + // The segment ID + Id *string `json:"id,omitempty"` + // The segment name + Name *string `json:"name,omitempty"` + // Date segment created + CreatedAt *string `json:"created_at,omitempty"` + // Date segment last updated + UpdatedAt *string `json:"updated_at,omitempty"` + // The app id + AppId *string `json:"app_id,omitempty"` + // Is the segment read only? + ReadOnly *bool `json:"read_only,omitempty"` + // Is the segment active? + IsActive *bool `json:"is_active,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _SegmentData SegmentData + +// NewSegmentData instantiates a new SegmentData object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSegmentData() *SegmentData { + this := SegmentData{} + return &this +} + +// NewSegmentDataWithDefaults instantiates a new SegmentData object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSegmentDataWithDefaults() *SegmentData { + this := SegmentData{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *SegmentData) GetId() string { + if o == nil || o.Id == nil { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SegmentData) GetIdOk() (*string, bool) { + if o == nil || o.Id == nil { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *SegmentData) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *SegmentData) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *SegmentData) GetName() string { + if o == nil || o.Name == nil { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SegmentData) GetNameOk() (*string, bool) { + if o == nil || o.Name == nil { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *SegmentData) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *SegmentData) SetName(v string) { + o.Name = &v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *SegmentData) GetCreatedAt() string { + if o == nil || o.CreatedAt == nil { + var ret string + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SegmentData) GetCreatedAtOk() (*string, bool) { + if o == nil || o.CreatedAt == nil { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *SegmentData) HasCreatedAt() bool { + if o != nil && o.CreatedAt != nil { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given string and assigns it to the CreatedAt field. +func (o *SegmentData) SetCreatedAt(v string) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *SegmentData) GetUpdatedAt() string { + if o == nil || o.UpdatedAt == nil { + var ret string + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SegmentData) GetUpdatedAtOk() (*string, bool) { + if o == nil || o.UpdatedAt == nil { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *SegmentData) HasUpdatedAt() bool { + if o != nil && o.UpdatedAt != nil { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given string and assigns it to the UpdatedAt field. +func (o *SegmentData) SetUpdatedAt(v string) { + o.UpdatedAt = &v +} + +// GetAppId returns the AppId field value if set, zero value otherwise. +func (o *SegmentData) GetAppId() string { + if o == nil || o.AppId == nil { + var ret string + return ret + } + return *o.AppId +} + +// GetAppIdOk returns a tuple with the AppId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SegmentData) GetAppIdOk() (*string, bool) { + if o == nil || o.AppId == nil { + return nil, false + } + return o.AppId, true +} + +// HasAppId returns a boolean if a field has been set. +func (o *SegmentData) HasAppId() bool { + if o != nil && o.AppId != nil { + return true + } + + return false +} + +// SetAppId gets a reference to the given string and assigns it to the AppId field. +func (o *SegmentData) SetAppId(v string) { + o.AppId = &v +} + +// GetReadOnly returns the ReadOnly field value if set, zero value otherwise. +func (o *SegmentData) GetReadOnly() bool { + if o == nil || o.ReadOnly == nil { + var ret bool + return ret + } + return *o.ReadOnly +} + +// GetReadOnlyOk returns a tuple with the ReadOnly field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SegmentData) GetReadOnlyOk() (*bool, bool) { + if o == nil || o.ReadOnly == nil { + return nil, false + } + return o.ReadOnly, true +} + +// HasReadOnly returns a boolean if a field has been set. +func (o *SegmentData) HasReadOnly() bool { + if o != nil && o.ReadOnly != nil { + return true + } + + return false +} + +// SetReadOnly gets a reference to the given bool and assigns it to the ReadOnly field. +func (o *SegmentData) SetReadOnly(v bool) { + o.ReadOnly = &v +} + +// GetIsActive returns the IsActive field value if set, zero value otherwise. +func (o *SegmentData) GetIsActive() bool { + if o == nil || o.IsActive == nil { + var ret bool + return ret + } + return *o.IsActive +} + +// GetIsActiveOk returns a tuple with the IsActive field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SegmentData) GetIsActiveOk() (*bool, bool) { + if o == nil || o.IsActive == nil { + return nil, false + } + return o.IsActive, true +} + +// HasIsActive returns a boolean if a field has been set. +func (o *SegmentData) HasIsActive() bool { + if o != nil && o.IsActive != nil { + return true + } + + return false +} + +// SetIsActive gets a reference to the given bool and assigns it to the IsActive field. +func (o *SegmentData) SetIsActive(v bool) { + o.IsActive = &v +} + +func (o SegmentData) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Name != nil { + toSerialize["name"] = o.Name + } + if o.CreatedAt != nil { + toSerialize["created_at"] = o.CreatedAt + } + if o.UpdatedAt != nil { + toSerialize["updated_at"] = o.UpdatedAt + } + if o.AppId != nil { + toSerialize["app_id"] = o.AppId + } + if o.ReadOnly != nil { + toSerialize["read_only"] = o.ReadOnly + } + if o.IsActive != nil { + toSerialize["is_active"] = o.IsActive + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return json.Marshal(toSerialize) +} + +func (o *SegmentData) UnmarshalJSON(bytes []byte) (err error) { + varSegmentData := _SegmentData{} + + if err = json.Unmarshal(bytes, &varSegmentData); err == nil { + *o = SegmentData(varSegmentData) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "id") + delete(additionalProperties, "name") + delete(additionalProperties, "created_at") + delete(additionalProperties, "updated_at") + delete(additionalProperties, "app_id") + delete(additionalProperties, "read_only") + delete(additionalProperties, "is_active") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableSegmentData struct { + value *SegmentData + isSet bool +} + +func (v NullableSegmentData) Get() *SegmentData { + return v.value +} + +func (v *NullableSegmentData) Set(val *SegmentData) { + v.value = val + v.isSet = true +} + +func (v NullableSegmentData) IsSet() bool { + return v.isSet +} + +func (v *NullableSegmentData) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSegmentData(val *SegmentData) *NullableSegmentData { + return &NullableSegmentData{value: val, isSet: true} +} + +func (v NullableSegmentData) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSegmentData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_segment_notification_target.go b/model_segment_notification_target.go index 4566517..d70e995 100644 --- a/model_segment_notification_target.go +++ b/model_segment_notification_target.go @@ -3,7 +3,7 @@ OneSignal A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com -API version: 1.4.0 +API version: 5.0.1 Contact: devrel@onesignal.com */ diff --git a/model_subscription_object.go b/model_subscription.go similarity index 70% rename from model_subscription_object.go rename to model_subscription.go index b708e23..1b414ea 100644 --- a/model_subscription_object.go +++ b/model_subscription.go @@ -3,7 +3,7 @@ OneSignal A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com -API version: 1.4.0 +API version: 5.0.1 Contact: devrel@onesignal.com */ @@ -15,49 +15,49 @@ import ( "encoding/json" ) -// SubscriptionObject struct for SubscriptionObject -type SubscriptionObject struct { +// Subscription struct for Subscription +type Subscription struct { Id *string `json:"id,omitempty"` Type *string `json:"type,omitempty"` Token *string `json:"token,omitempty"` Enabled *bool `json:"enabled,omitempty"` - NotificationTypes *float32 `json:"notification_types,omitempty"` - SessionTime *float32 `json:"session_time,omitempty"` - SessionCount *float32 `json:"session_count,omitempty"` + NotificationTypes *int32 `json:"notification_types,omitempty"` + SessionTime *int32 `json:"session_time,omitempty"` + SessionCount *int32 `json:"session_count,omitempty"` Sdk *string `json:"sdk,omitempty"` DeviceModel *string `json:"device_model,omitempty"` DeviceOs *string `json:"device_os,omitempty"` Rooted *bool `json:"rooted,omitempty"` - TestType *float32 `json:"test_type,omitempty"` + TestType *int32 `json:"test_type,omitempty"` AppVersion *string `json:"app_version,omitempty"` - NetType *float32 `json:"net_type,omitempty"` + NetType *int32 `json:"net_type,omitempty"` Carrier *string `json:"carrier,omitempty"` WebAuth *string `json:"web_auth,omitempty"` WebP256 *string `json:"web_p256,omitempty"` AdditionalProperties map[string]interface{} } -type _SubscriptionObject SubscriptionObject +type _Subscription Subscription -// NewSubscriptionObject instantiates a new SubscriptionObject object +// NewSubscription instantiates a new Subscription object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewSubscriptionObject() *SubscriptionObject { - this := SubscriptionObject{} +func NewSubscription() *Subscription { + this := Subscription{} return &this } -// NewSubscriptionObjectWithDefaults instantiates a new SubscriptionObject object +// NewSubscriptionWithDefaults instantiates a new Subscription object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set -func NewSubscriptionObjectWithDefaults() *SubscriptionObject { - this := SubscriptionObject{} +func NewSubscriptionWithDefaults() *Subscription { + this := Subscription{} return &this } // GetId returns the Id field value if set, zero value otherwise. -func (o *SubscriptionObject) GetId() string { +func (o *Subscription) GetId() string { if o == nil || o.Id == nil { var ret string return ret @@ -67,7 +67,7 @@ func (o *SubscriptionObject) GetId() string { // GetIdOk returns a tuple with the Id field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *SubscriptionObject) GetIdOk() (*string, bool) { +func (o *Subscription) GetIdOk() (*string, bool) { if o == nil || o.Id == nil { return nil, false } @@ -75,7 +75,7 @@ func (o *SubscriptionObject) GetIdOk() (*string, bool) { } // HasId returns a boolean if a field has been set. -func (o *SubscriptionObject) HasId() bool { +func (o *Subscription) HasId() bool { if o != nil && o.Id != nil { return true } @@ -84,12 +84,12 @@ func (o *SubscriptionObject) HasId() bool { } // SetId gets a reference to the given string and assigns it to the Id field. -func (o *SubscriptionObject) SetId(v string) { +func (o *Subscription) SetId(v string) { o.Id = &v } // GetType returns the Type field value if set, zero value otherwise. -func (o *SubscriptionObject) GetType() string { +func (o *Subscription) GetType() string { if o == nil || o.Type == nil { var ret string return ret @@ -99,7 +99,7 @@ func (o *SubscriptionObject) GetType() string { // GetTypeOk returns a tuple with the Type field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *SubscriptionObject) GetTypeOk() (*string, bool) { +func (o *Subscription) GetTypeOk() (*string, bool) { if o == nil || o.Type == nil { return nil, false } @@ -107,7 +107,7 @@ func (o *SubscriptionObject) GetTypeOk() (*string, bool) { } // HasType returns a boolean if a field has been set. -func (o *SubscriptionObject) HasType() bool { +func (o *Subscription) HasType() bool { if o != nil && o.Type != nil { return true } @@ -116,12 +116,12 @@ func (o *SubscriptionObject) HasType() bool { } // SetType gets a reference to the given string and assigns it to the Type field. -func (o *SubscriptionObject) SetType(v string) { +func (o *Subscription) SetType(v string) { o.Type = &v } // GetToken returns the Token field value if set, zero value otherwise. -func (o *SubscriptionObject) GetToken() string { +func (o *Subscription) GetToken() string { if o == nil || o.Token == nil { var ret string return ret @@ -131,7 +131,7 @@ func (o *SubscriptionObject) GetToken() string { // GetTokenOk returns a tuple with the Token field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *SubscriptionObject) GetTokenOk() (*string, bool) { +func (o *Subscription) GetTokenOk() (*string, bool) { if o == nil || o.Token == nil { return nil, false } @@ -139,7 +139,7 @@ func (o *SubscriptionObject) GetTokenOk() (*string, bool) { } // HasToken returns a boolean if a field has been set. -func (o *SubscriptionObject) HasToken() bool { +func (o *Subscription) HasToken() bool { if o != nil && o.Token != nil { return true } @@ -148,12 +148,12 @@ func (o *SubscriptionObject) HasToken() bool { } // SetToken gets a reference to the given string and assigns it to the Token field. -func (o *SubscriptionObject) SetToken(v string) { +func (o *Subscription) SetToken(v string) { o.Token = &v } // GetEnabled returns the Enabled field value if set, zero value otherwise. -func (o *SubscriptionObject) GetEnabled() bool { +func (o *Subscription) GetEnabled() bool { if o == nil || o.Enabled == nil { var ret bool return ret @@ -163,7 +163,7 @@ func (o *SubscriptionObject) GetEnabled() bool { // GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *SubscriptionObject) GetEnabledOk() (*bool, bool) { +func (o *Subscription) GetEnabledOk() (*bool, bool) { if o == nil || o.Enabled == nil { return nil, false } @@ -171,7 +171,7 @@ func (o *SubscriptionObject) GetEnabledOk() (*bool, bool) { } // HasEnabled returns a boolean if a field has been set. -func (o *SubscriptionObject) HasEnabled() bool { +func (o *Subscription) HasEnabled() bool { if o != nil && o.Enabled != nil { return true } @@ -180,14 +180,14 @@ func (o *SubscriptionObject) HasEnabled() bool { } // SetEnabled gets a reference to the given bool and assigns it to the Enabled field. -func (o *SubscriptionObject) SetEnabled(v bool) { +func (o *Subscription) SetEnabled(v bool) { o.Enabled = &v } // GetNotificationTypes returns the NotificationTypes field value if set, zero value otherwise. -func (o *SubscriptionObject) GetNotificationTypes() float32 { +func (o *Subscription) GetNotificationTypes() int32 { if o == nil || o.NotificationTypes == nil { - var ret float32 + var ret int32 return ret } return *o.NotificationTypes @@ -195,7 +195,7 @@ func (o *SubscriptionObject) GetNotificationTypes() float32 { // GetNotificationTypesOk returns a tuple with the NotificationTypes field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *SubscriptionObject) GetNotificationTypesOk() (*float32, bool) { +func (o *Subscription) GetNotificationTypesOk() (*int32, bool) { if o == nil || o.NotificationTypes == nil { return nil, false } @@ -203,7 +203,7 @@ func (o *SubscriptionObject) GetNotificationTypesOk() (*float32, bool) { } // HasNotificationTypes returns a boolean if a field has been set. -func (o *SubscriptionObject) HasNotificationTypes() bool { +func (o *Subscription) HasNotificationTypes() bool { if o != nil && o.NotificationTypes != nil { return true } @@ -211,15 +211,15 @@ func (o *SubscriptionObject) HasNotificationTypes() bool { return false } -// SetNotificationTypes gets a reference to the given float32 and assigns it to the NotificationTypes field. -func (o *SubscriptionObject) SetNotificationTypes(v float32) { +// SetNotificationTypes gets a reference to the given int32 and assigns it to the NotificationTypes field. +func (o *Subscription) SetNotificationTypes(v int32) { o.NotificationTypes = &v } // GetSessionTime returns the SessionTime field value if set, zero value otherwise. -func (o *SubscriptionObject) GetSessionTime() float32 { +func (o *Subscription) GetSessionTime() int32 { if o == nil || o.SessionTime == nil { - var ret float32 + var ret int32 return ret } return *o.SessionTime @@ -227,7 +227,7 @@ func (o *SubscriptionObject) GetSessionTime() float32 { // GetSessionTimeOk returns a tuple with the SessionTime field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *SubscriptionObject) GetSessionTimeOk() (*float32, bool) { +func (o *Subscription) GetSessionTimeOk() (*int32, bool) { if o == nil || o.SessionTime == nil { return nil, false } @@ -235,7 +235,7 @@ func (o *SubscriptionObject) GetSessionTimeOk() (*float32, bool) { } // HasSessionTime returns a boolean if a field has been set. -func (o *SubscriptionObject) HasSessionTime() bool { +func (o *Subscription) HasSessionTime() bool { if o != nil && o.SessionTime != nil { return true } @@ -243,15 +243,15 @@ func (o *SubscriptionObject) HasSessionTime() bool { return false } -// SetSessionTime gets a reference to the given float32 and assigns it to the SessionTime field. -func (o *SubscriptionObject) SetSessionTime(v float32) { +// SetSessionTime gets a reference to the given int32 and assigns it to the SessionTime field. +func (o *Subscription) SetSessionTime(v int32) { o.SessionTime = &v } // GetSessionCount returns the SessionCount field value if set, zero value otherwise. -func (o *SubscriptionObject) GetSessionCount() float32 { +func (o *Subscription) GetSessionCount() int32 { if o == nil || o.SessionCount == nil { - var ret float32 + var ret int32 return ret } return *o.SessionCount @@ -259,7 +259,7 @@ func (o *SubscriptionObject) GetSessionCount() float32 { // GetSessionCountOk returns a tuple with the SessionCount field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *SubscriptionObject) GetSessionCountOk() (*float32, bool) { +func (o *Subscription) GetSessionCountOk() (*int32, bool) { if o == nil || o.SessionCount == nil { return nil, false } @@ -267,7 +267,7 @@ func (o *SubscriptionObject) GetSessionCountOk() (*float32, bool) { } // HasSessionCount returns a boolean if a field has been set. -func (o *SubscriptionObject) HasSessionCount() bool { +func (o *Subscription) HasSessionCount() bool { if o != nil && o.SessionCount != nil { return true } @@ -275,13 +275,13 @@ func (o *SubscriptionObject) HasSessionCount() bool { return false } -// SetSessionCount gets a reference to the given float32 and assigns it to the SessionCount field. -func (o *SubscriptionObject) SetSessionCount(v float32) { +// SetSessionCount gets a reference to the given int32 and assigns it to the SessionCount field. +func (o *Subscription) SetSessionCount(v int32) { o.SessionCount = &v } // GetSdk returns the Sdk field value if set, zero value otherwise. -func (o *SubscriptionObject) GetSdk() string { +func (o *Subscription) GetSdk() string { if o == nil || o.Sdk == nil { var ret string return ret @@ -291,7 +291,7 @@ func (o *SubscriptionObject) GetSdk() string { // GetSdkOk returns a tuple with the Sdk field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *SubscriptionObject) GetSdkOk() (*string, bool) { +func (o *Subscription) GetSdkOk() (*string, bool) { if o == nil || o.Sdk == nil { return nil, false } @@ -299,7 +299,7 @@ func (o *SubscriptionObject) GetSdkOk() (*string, bool) { } // HasSdk returns a boolean if a field has been set. -func (o *SubscriptionObject) HasSdk() bool { +func (o *Subscription) HasSdk() bool { if o != nil && o.Sdk != nil { return true } @@ -308,12 +308,12 @@ func (o *SubscriptionObject) HasSdk() bool { } // SetSdk gets a reference to the given string and assigns it to the Sdk field. -func (o *SubscriptionObject) SetSdk(v string) { +func (o *Subscription) SetSdk(v string) { o.Sdk = &v } // GetDeviceModel returns the DeviceModel field value if set, zero value otherwise. -func (o *SubscriptionObject) GetDeviceModel() string { +func (o *Subscription) GetDeviceModel() string { if o == nil || o.DeviceModel == nil { var ret string return ret @@ -323,7 +323,7 @@ func (o *SubscriptionObject) GetDeviceModel() string { // GetDeviceModelOk returns a tuple with the DeviceModel field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *SubscriptionObject) GetDeviceModelOk() (*string, bool) { +func (o *Subscription) GetDeviceModelOk() (*string, bool) { if o == nil || o.DeviceModel == nil { return nil, false } @@ -331,7 +331,7 @@ func (o *SubscriptionObject) GetDeviceModelOk() (*string, bool) { } // HasDeviceModel returns a boolean if a field has been set. -func (o *SubscriptionObject) HasDeviceModel() bool { +func (o *Subscription) HasDeviceModel() bool { if o != nil && o.DeviceModel != nil { return true } @@ -340,12 +340,12 @@ func (o *SubscriptionObject) HasDeviceModel() bool { } // SetDeviceModel gets a reference to the given string and assigns it to the DeviceModel field. -func (o *SubscriptionObject) SetDeviceModel(v string) { +func (o *Subscription) SetDeviceModel(v string) { o.DeviceModel = &v } // GetDeviceOs returns the DeviceOs field value if set, zero value otherwise. -func (o *SubscriptionObject) GetDeviceOs() string { +func (o *Subscription) GetDeviceOs() string { if o == nil || o.DeviceOs == nil { var ret string return ret @@ -355,7 +355,7 @@ func (o *SubscriptionObject) GetDeviceOs() string { // GetDeviceOsOk returns a tuple with the DeviceOs field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *SubscriptionObject) GetDeviceOsOk() (*string, bool) { +func (o *Subscription) GetDeviceOsOk() (*string, bool) { if o == nil || o.DeviceOs == nil { return nil, false } @@ -363,7 +363,7 @@ func (o *SubscriptionObject) GetDeviceOsOk() (*string, bool) { } // HasDeviceOs returns a boolean if a field has been set. -func (o *SubscriptionObject) HasDeviceOs() bool { +func (o *Subscription) HasDeviceOs() bool { if o != nil && o.DeviceOs != nil { return true } @@ -372,12 +372,12 @@ func (o *SubscriptionObject) HasDeviceOs() bool { } // SetDeviceOs gets a reference to the given string and assigns it to the DeviceOs field. -func (o *SubscriptionObject) SetDeviceOs(v string) { +func (o *Subscription) SetDeviceOs(v string) { o.DeviceOs = &v } // GetRooted returns the Rooted field value if set, zero value otherwise. -func (o *SubscriptionObject) GetRooted() bool { +func (o *Subscription) GetRooted() bool { if o == nil || o.Rooted == nil { var ret bool return ret @@ -387,7 +387,7 @@ func (o *SubscriptionObject) GetRooted() bool { // GetRootedOk returns a tuple with the Rooted field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *SubscriptionObject) GetRootedOk() (*bool, bool) { +func (o *Subscription) GetRootedOk() (*bool, bool) { if o == nil || o.Rooted == nil { return nil, false } @@ -395,7 +395,7 @@ func (o *SubscriptionObject) GetRootedOk() (*bool, bool) { } // HasRooted returns a boolean if a field has been set. -func (o *SubscriptionObject) HasRooted() bool { +func (o *Subscription) HasRooted() bool { if o != nil && o.Rooted != nil { return true } @@ -404,14 +404,14 @@ func (o *SubscriptionObject) HasRooted() bool { } // SetRooted gets a reference to the given bool and assigns it to the Rooted field. -func (o *SubscriptionObject) SetRooted(v bool) { +func (o *Subscription) SetRooted(v bool) { o.Rooted = &v } // GetTestType returns the TestType field value if set, zero value otherwise. -func (o *SubscriptionObject) GetTestType() float32 { +func (o *Subscription) GetTestType() int32 { if o == nil || o.TestType == nil { - var ret float32 + var ret int32 return ret } return *o.TestType @@ -419,7 +419,7 @@ func (o *SubscriptionObject) GetTestType() float32 { // GetTestTypeOk returns a tuple with the TestType field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *SubscriptionObject) GetTestTypeOk() (*float32, bool) { +func (o *Subscription) GetTestTypeOk() (*int32, bool) { if o == nil || o.TestType == nil { return nil, false } @@ -427,7 +427,7 @@ func (o *SubscriptionObject) GetTestTypeOk() (*float32, bool) { } // HasTestType returns a boolean if a field has been set. -func (o *SubscriptionObject) HasTestType() bool { +func (o *Subscription) HasTestType() bool { if o != nil && o.TestType != nil { return true } @@ -435,13 +435,13 @@ func (o *SubscriptionObject) HasTestType() bool { return false } -// SetTestType gets a reference to the given float32 and assigns it to the TestType field. -func (o *SubscriptionObject) SetTestType(v float32) { +// SetTestType gets a reference to the given int32 and assigns it to the TestType field. +func (o *Subscription) SetTestType(v int32) { o.TestType = &v } // GetAppVersion returns the AppVersion field value if set, zero value otherwise. -func (o *SubscriptionObject) GetAppVersion() string { +func (o *Subscription) GetAppVersion() string { if o == nil || o.AppVersion == nil { var ret string return ret @@ -451,7 +451,7 @@ func (o *SubscriptionObject) GetAppVersion() string { // GetAppVersionOk returns a tuple with the AppVersion field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *SubscriptionObject) GetAppVersionOk() (*string, bool) { +func (o *Subscription) GetAppVersionOk() (*string, bool) { if o == nil || o.AppVersion == nil { return nil, false } @@ -459,7 +459,7 @@ func (o *SubscriptionObject) GetAppVersionOk() (*string, bool) { } // HasAppVersion returns a boolean if a field has been set. -func (o *SubscriptionObject) HasAppVersion() bool { +func (o *Subscription) HasAppVersion() bool { if o != nil && o.AppVersion != nil { return true } @@ -468,14 +468,14 @@ func (o *SubscriptionObject) HasAppVersion() bool { } // SetAppVersion gets a reference to the given string and assigns it to the AppVersion field. -func (o *SubscriptionObject) SetAppVersion(v string) { +func (o *Subscription) SetAppVersion(v string) { o.AppVersion = &v } // GetNetType returns the NetType field value if set, zero value otherwise. -func (o *SubscriptionObject) GetNetType() float32 { +func (o *Subscription) GetNetType() int32 { if o == nil || o.NetType == nil { - var ret float32 + var ret int32 return ret } return *o.NetType @@ -483,7 +483,7 @@ func (o *SubscriptionObject) GetNetType() float32 { // GetNetTypeOk returns a tuple with the NetType field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *SubscriptionObject) GetNetTypeOk() (*float32, bool) { +func (o *Subscription) GetNetTypeOk() (*int32, bool) { if o == nil || o.NetType == nil { return nil, false } @@ -491,7 +491,7 @@ func (o *SubscriptionObject) GetNetTypeOk() (*float32, bool) { } // HasNetType returns a boolean if a field has been set. -func (o *SubscriptionObject) HasNetType() bool { +func (o *Subscription) HasNetType() bool { if o != nil && o.NetType != nil { return true } @@ -499,13 +499,13 @@ func (o *SubscriptionObject) HasNetType() bool { return false } -// SetNetType gets a reference to the given float32 and assigns it to the NetType field. -func (o *SubscriptionObject) SetNetType(v float32) { +// SetNetType gets a reference to the given int32 and assigns it to the NetType field. +func (o *Subscription) SetNetType(v int32) { o.NetType = &v } // GetCarrier returns the Carrier field value if set, zero value otherwise. -func (o *SubscriptionObject) GetCarrier() string { +func (o *Subscription) GetCarrier() string { if o == nil || o.Carrier == nil { var ret string return ret @@ -515,7 +515,7 @@ func (o *SubscriptionObject) GetCarrier() string { // GetCarrierOk returns a tuple with the Carrier field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *SubscriptionObject) GetCarrierOk() (*string, bool) { +func (o *Subscription) GetCarrierOk() (*string, bool) { if o == nil || o.Carrier == nil { return nil, false } @@ -523,7 +523,7 @@ func (o *SubscriptionObject) GetCarrierOk() (*string, bool) { } // HasCarrier returns a boolean if a field has been set. -func (o *SubscriptionObject) HasCarrier() bool { +func (o *Subscription) HasCarrier() bool { if o != nil && o.Carrier != nil { return true } @@ -532,12 +532,12 @@ func (o *SubscriptionObject) HasCarrier() bool { } // SetCarrier gets a reference to the given string and assigns it to the Carrier field. -func (o *SubscriptionObject) SetCarrier(v string) { +func (o *Subscription) SetCarrier(v string) { o.Carrier = &v } // GetWebAuth returns the WebAuth field value if set, zero value otherwise. -func (o *SubscriptionObject) GetWebAuth() string { +func (o *Subscription) GetWebAuth() string { if o == nil || o.WebAuth == nil { var ret string return ret @@ -547,7 +547,7 @@ func (o *SubscriptionObject) GetWebAuth() string { // GetWebAuthOk returns a tuple with the WebAuth field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *SubscriptionObject) GetWebAuthOk() (*string, bool) { +func (o *Subscription) GetWebAuthOk() (*string, bool) { if o == nil || o.WebAuth == nil { return nil, false } @@ -555,7 +555,7 @@ func (o *SubscriptionObject) GetWebAuthOk() (*string, bool) { } // HasWebAuth returns a boolean if a field has been set. -func (o *SubscriptionObject) HasWebAuth() bool { +func (o *Subscription) HasWebAuth() bool { if o != nil && o.WebAuth != nil { return true } @@ -564,12 +564,12 @@ func (o *SubscriptionObject) HasWebAuth() bool { } // SetWebAuth gets a reference to the given string and assigns it to the WebAuth field. -func (o *SubscriptionObject) SetWebAuth(v string) { +func (o *Subscription) SetWebAuth(v string) { o.WebAuth = &v } // GetWebP256 returns the WebP256 field value if set, zero value otherwise. -func (o *SubscriptionObject) GetWebP256() string { +func (o *Subscription) GetWebP256() string { if o == nil || o.WebP256 == nil { var ret string return ret @@ -579,7 +579,7 @@ func (o *SubscriptionObject) GetWebP256() string { // GetWebP256Ok returns a tuple with the WebP256 field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *SubscriptionObject) GetWebP256Ok() (*string, bool) { +func (o *Subscription) GetWebP256Ok() (*string, bool) { if o == nil || o.WebP256 == nil { return nil, false } @@ -587,7 +587,7 @@ func (o *SubscriptionObject) GetWebP256Ok() (*string, bool) { } // HasWebP256 returns a boolean if a field has been set. -func (o *SubscriptionObject) HasWebP256() bool { +func (o *Subscription) HasWebP256() bool { if o != nil && o.WebP256 != nil { return true } @@ -596,11 +596,11 @@ func (o *SubscriptionObject) HasWebP256() bool { } // SetWebP256 gets a reference to the given string and assigns it to the WebP256 field. -func (o *SubscriptionObject) SetWebP256(v string) { +func (o *Subscription) SetWebP256(v string) { o.WebP256 = &v } -func (o SubscriptionObject) MarshalJSON() ([]byte, error) { +func (o Subscription) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id @@ -661,11 +661,11 @@ func (o SubscriptionObject) MarshalJSON() ([]byte, error) { return json.Marshal(toSerialize) } -func (o *SubscriptionObject) UnmarshalJSON(bytes []byte) (err error) { - varSubscriptionObject := _SubscriptionObject{} +func (o *Subscription) UnmarshalJSON(bytes []byte) (err error) { + varSubscription := _Subscription{} - if err = json.Unmarshal(bytes, &varSubscriptionObject); err == nil { - *o = SubscriptionObject(varSubscriptionObject) + if err = json.Unmarshal(bytes, &varSubscription); err == nil { + *o = Subscription(varSubscription) } additionalProperties := make(map[string]interface{}) @@ -694,38 +694,38 @@ func (o *SubscriptionObject) UnmarshalJSON(bytes []byte) (err error) { return err } -type NullableSubscriptionObject struct { - value *SubscriptionObject +type NullableSubscription struct { + value *Subscription isSet bool } -func (v NullableSubscriptionObject) Get() *SubscriptionObject { +func (v NullableSubscription) Get() *Subscription { return v.value } -func (v *NullableSubscriptionObject) Set(val *SubscriptionObject) { +func (v *NullableSubscription) Set(val *Subscription) { v.value = val v.isSet = true } -func (v NullableSubscriptionObject) IsSet() bool { +func (v NullableSubscription) IsSet() bool { return v.isSet } -func (v *NullableSubscriptionObject) Unset() { +func (v *NullableSubscription) Unset() { v.value = nil v.isSet = false } -func NewNullableSubscriptionObject(val *SubscriptionObject) *NullableSubscriptionObject { - return &NullableSubscriptionObject{value: val, isSet: true} +func NewNullableSubscription(val *Subscription) *NullableSubscription { + return &NullableSubscription{value: val, isSet: true} } -func (v NullableSubscriptionObject) MarshalJSON() ([]byte, error) { +func (v NullableSubscription) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } -func (v *NullableSubscriptionObject) UnmarshalJSON(src []byte) error { +func (v *NullableSubscription) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } diff --git a/model_inline_response_201.go b/model_subscription_body.go similarity index 53% rename from model_inline_response_201.go rename to model_subscription_body.go index 650a2fd..5e870ad 100644 --- a/model_inline_response_201.go +++ b/model_subscription_body.go @@ -3,7 +3,7 @@ OneSignal A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com -API version: 1.4.0 +API version: 5.0.1 Contact: devrel@onesignal.com */ @@ -15,35 +15,35 @@ import ( "encoding/json" ) -// InlineResponse201 struct for InlineResponse201 -type InlineResponse201 struct { - Subscription *SubscriptionObject `json:"subscription,omitempty"` +// SubscriptionBody struct for SubscriptionBody +type SubscriptionBody struct { + Subscription *Subscription `json:"subscription,omitempty"` AdditionalProperties map[string]interface{} } -type _InlineResponse201 InlineResponse201 +type _SubscriptionBody SubscriptionBody -// NewInlineResponse201 instantiates a new InlineResponse201 object +// NewSubscriptionBody instantiates a new SubscriptionBody object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewInlineResponse201() *InlineResponse201 { - this := InlineResponse201{} +func NewSubscriptionBody() *SubscriptionBody { + this := SubscriptionBody{} return &this } -// NewInlineResponse201WithDefaults instantiates a new InlineResponse201 object +// NewSubscriptionBodyWithDefaults instantiates a new SubscriptionBody object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set -func NewInlineResponse201WithDefaults() *InlineResponse201 { - this := InlineResponse201{} +func NewSubscriptionBodyWithDefaults() *SubscriptionBody { + this := SubscriptionBody{} return &this } // GetSubscription returns the Subscription field value if set, zero value otherwise. -func (o *InlineResponse201) GetSubscription() SubscriptionObject { +func (o *SubscriptionBody) GetSubscription() Subscription { if o == nil || o.Subscription == nil { - var ret SubscriptionObject + var ret Subscription return ret } return *o.Subscription @@ -51,7 +51,7 @@ func (o *InlineResponse201) GetSubscription() SubscriptionObject { // GetSubscriptionOk returns a tuple with the Subscription field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *InlineResponse201) GetSubscriptionOk() (*SubscriptionObject, bool) { +func (o *SubscriptionBody) GetSubscriptionOk() (*Subscription, bool) { if o == nil || o.Subscription == nil { return nil, false } @@ -59,7 +59,7 @@ func (o *InlineResponse201) GetSubscriptionOk() (*SubscriptionObject, bool) { } // HasSubscription returns a boolean if a field has been set. -func (o *InlineResponse201) HasSubscription() bool { +func (o *SubscriptionBody) HasSubscription() bool { if o != nil && o.Subscription != nil { return true } @@ -67,12 +67,12 @@ func (o *InlineResponse201) HasSubscription() bool { return false } -// SetSubscription gets a reference to the given SubscriptionObject and assigns it to the Subscription field. -func (o *InlineResponse201) SetSubscription(v SubscriptionObject) { +// SetSubscription gets a reference to the given Subscription and assigns it to the Subscription field. +func (o *SubscriptionBody) SetSubscription(v Subscription) { o.Subscription = &v } -func (o InlineResponse201) MarshalJSON() ([]byte, error) { +func (o SubscriptionBody) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Subscription != nil { toSerialize["subscription"] = o.Subscription @@ -85,11 +85,11 @@ func (o InlineResponse201) MarshalJSON() ([]byte, error) { return json.Marshal(toSerialize) } -func (o *InlineResponse201) UnmarshalJSON(bytes []byte) (err error) { - varInlineResponse201 := _InlineResponse201{} +func (o *SubscriptionBody) UnmarshalJSON(bytes []byte) (err error) { + varSubscriptionBody := _SubscriptionBody{} - if err = json.Unmarshal(bytes, &varInlineResponse201); err == nil { - *o = InlineResponse201(varInlineResponse201) + if err = json.Unmarshal(bytes, &varSubscriptionBody); err == nil { + *o = SubscriptionBody(varSubscriptionBody) } additionalProperties := make(map[string]interface{}) @@ -102,38 +102,38 @@ func (o *InlineResponse201) UnmarshalJSON(bytes []byte) (err error) { return err } -type NullableInlineResponse201 struct { - value *InlineResponse201 +type NullableSubscriptionBody struct { + value *SubscriptionBody isSet bool } -func (v NullableInlineResponse201) Get() *InlineResponse201 { +func (v NullableSubscriptionBody) Get() *SubscriptionBody { return v.value } -func (v *NullableInlineResponse201) Set(val *InlineResponse201) { +func (v *NullableSubscriptionBody) Set(val *SubscriptionBody) { v.value = val v.isSet = true } -func (v NullableInlineResponse201) IsSet() bool { +func (v NullableSubscriptionBody) IsSet() bool { return v.isSet } -func (v *NullableInlineResponse201) Unset() { +func (v *NullableSubscriptionBody) Unset() { v.value = nil v.isSet = false } -func NewNullableInlineResponse201(val *InlineResponse201) *NullableInlineResponse201 { - return &NullableInlineResponse201{value: val, isSet: true} +func NewNullableSubscriptionBody(val *SubscriptionBody) *NullableSubscriptionBody { + return &NullableSubscriptionBody{value: val, isSet: true} } -func (v NullableInlineResponse201) MarshalJSON() ([]byte, error) { +func (v NullableSubscriptionBody) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } -func (v *NullableInlineResponse201) UnmarshalJSON(src []byte) error { +func (v *NullableSubscriptionBody) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } diff --git a/model_player_notification_target.go b/model_subscription_notification_target.go similarity index 53% rename from model_player_notification_target.go rename to model_subscription_notification_target.go index 80c128e..4241c76 100644 --- a/model_player_notification_target.go +++ b/model_subscription_notification_target.go @@ -3,7 +3,7 @@ OneSignal A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com -API version: 1.4.0 +API version: 5.0.1 Contact: devrel@onesignal.com */ @@ -15,128 +15,86 @@ import ( "encoding/json" ) -// PlayerNotificationTarget struct for PlayerNotificationTarget -type PlayerNotificationTarget struct { - // 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 - // Deprecated - IncludePlayerIds []string `json:"include_player_ids,omitempty"` - // 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. - // Deprecated - IncludeExternalUserIds []string `json:"include_external_user_ids,omitempty"` +// SubscriptionNotificationTarget struct for SubscriptionNotificationTarget +type SubscriptionNotificationTarget struct { + // 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 + IncludeSubscriptionIds []string `json:"include_subscription_ids,omitempty"` // 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 IncludeEmailTokens []string `json:"include_email_tokens,omitempty"` // Recommended for Sending SMS - Target specific phone numbers. The phone number should be in the E.164 format. Phone number should be an existing subscriber on OneSignal. Refer our docs to learn how to add phone numbers to OneSignal. Example phone number: +1999999999 Limit of 2,000 entries per REST API call IncludePhoneNumbers []string `json:"include_phone_numbers,omitempty"` - // 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 IncludeIosTokens []string `json:"include_ios_tokens,omitempty"` - // 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 IncludeWpWnsUris []string `json:"include_wp_wns_uris,omitempty"` - // 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 IncludeAmazonRegIds []string `json:"include_amazon_reg_ids,omitempty"` - // 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 IncludeChromeRegIds []string `json:"include_chrome_reg_ids,omitempty"` - // 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 IncludeChromeWebRegIds []string `json:"include_chrome_web_reg_ids,omitempty"` - // 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 IncludeAndroidRegIds []string `json:"include_android_reg_ids,omitempty"` - IncludeAliases NullablePlayerNotificationTargetIncludeAliases `json:"include_aliases,omitempty"` + // 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. + IncludeAliases map[string][]string `json:"include_aliases,omitempty"` TargetChannel *string `json:"target_channel,omitempty"` AdditionalProperties map[string]interface{} } -type _PlayerNotificationTarget PlayerNotificationTarget +type _SubscriptionNotificationTarget SubscriptionNotificationTarget -// NewPlayerNotificationTarget instantiates a new PlayerNotificationTarget object +// NewSubscriptionNotificationTarget instantiates a new SubscriptionNotificationTarget object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewPlayerNotificationTarget() *PlayerNotificationTarget { - this := PlayerNotificationTarget{} +func NewSubscriptionNotificationTarget() *SubscriptionNotificationTarget { + this := SubscriptionNotificationTarget{} return &this } -// NewPlayerNotificationTargetWithDefaults instantiates a new PlayerNotificationTarget object +// NewSubscriptionNotificationTargetWithDefaults instantiates a new SubscriptionNotificationTarget object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set -func NewPlayerNotificationTargetWithDefaults() *PlayerNotificationTarget { - this := PlayerNotificationTarget{} +func NewSubscriptionNotificationTargetWithDefaults() *SubscriptionNotificationTarget { + this := SubscriptionNotificationTarget{} return &this } -// GetIncludePlayerIds returns the IncludePlayerIds field value if set, zero value otherwise (both if not set or set to explicit null). -// Deprecated -func (o *PlayerNotificationTarget) GetIncludePlayerIds() []string { +// GetIncludeSubscriptionIds returns the IncludeSubscriptionIds field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SubscriptionNotificationTarget) GetIncludeSubscriptionIds() []string { if o == nil { var ret []string return ret } - return o.IncludePlayerIds + return o.IncludeSubscriptionIds } -// GetIncludePlayerIdsOk returns a tuple with the IncludePlayerIds field value if set, nil otherwise +// GetIncludeSubscriptionIdsOk returns a tuple with the IncludeSubscriptionIds field value if set, nil otherwise // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -// Deprecated -func (o *PlayerNotificationTarget) GetIncludePlayerIdsOk() ([]string, bool) { - if o == nil || o.IncludePlayerIds == nil { +func (o *SubscriptionNotificationTarget) GetIncludeSubscriptionIdsOk() ([]string, bool) { + if o == nil || o.IncludeSubscriptionIds == nil { return nil, false } - return o.IncludePlayerIds, true + return o.IncludeSubscriptionIds, true } -// HasIncludePlayerIds returns a boolean if a field has been set. -func (o *PlayerNotificationTarget) HasIncludePlayerIds() bool { - if o != nil && o.IncludePlayerIds != nil { +// HasIncludeSubscriptionIds returns a boolean if a field has been set. +func (o *SubscriptionNotificationTarget) HasIncludeSubscriptionIds() bool { + if o != nil && o.IncludeSubscriptionIds != nil { return true } return false } -// SetIncludePlayerIds gets a reference to the given []string and assigns it to the IncludePlayerIds field. -// Deprecated -func (o *PlayerNotificationTarget) SetIncludePlayerIds(v []string) { - o.IncludePlayerIds = v -} - -// GetIncludeExternalUserIds returns the IncludeExternalUserIds field value if set, zero value otherwise (both if not set or set to explicit null). -// Deprecated -func (o *PlayerNotificationTarget) GetIncludeExternalUserIds() []string { - if o == nil { - var ret []string - return ret - } - return o.IncludeExternalUserIds -} - -// GetIncludeExternalUserIdsOk returns a tuple with the IncludeExternalUserIds field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -// Deprecated -func (o *PlayerNotificationTarget) GetIncludeExternalUserIdsOk() ([]string, bool) { - if o == nil || o.IncludeExternalUserIds == nil { - return nil, false - } - return o.IncludeExternalUserIds, true -} - -// HasIncludeExternalUserIds returns a boolean if a field has been set. -func (o *PlayerNotificationTarget) HasIncludeExternalUserIds() bool { - if o != nil && o.IncludeExternalUserIds != nil { - return true - } - - return false -} - -// SetIncludeExternalUserIds gets a reference to the given []string and assigns it to the IncludeExternalUserIds field. -// Deprecated -func (o *PlayerNotificationTarget) SetIncludeExternalUserIds(v []string) { - o.IncludeExternalUserIds = v +// SetIncludeSubscriptionIds gets a reference to the given []string and assigns it to the IncludeSubscriptionIds field. +func (o *SubscriptionNotificationTarget) SetIncludeSubscriptionIds(v []string) { + o.IncludeSubscriptionIds = v } // GetIncludeEmailTokens returns the IncludeEmailTokens field value if set, zero value otherwise. -func (o *PlayerNotificationTarget) GetIncludeEmailTokens() []string { +func (o *SubscriptionNotificationTarget) GetIncludeEmailTokens() []string { if o == nil || o.IncludeEmailTokens == nil { var ret []string return ret @@ -146,7 +104,7 @@ func (o *PlayerNotificationTarget) GetIncludeEmailTokens() []string { // GetIncludeEmailTokensOk returns a tuple with the IncludeEmailTokens field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PlayerNotificationTarget) GetIncludeEmailTokensOk() ([]string, bool) { +func (o *SubscriptionNotificationTarget) GetIncludeEmailTokensOk() ([]string, bool) { if o == nil || o.IncludeEmailTokens == nil { return nil, false } @@ -154,7 +112,7 @@ func (o *PlayerNotificationTarget) GetIncludeEmailTokensOk() ([]string, bool) { } // HasIncludeEmailTokens returns a boolean if a field has been set. -func (o *PlayerNotificationTarget) HasIncludeEmailTokens() bool { +func (o *SubscriptionNotificationTarget) HasIncludeEmailTokens() bool { if o != nil && o.IncludeEmailTokens != nil { return true } @@ -163,12 +121,12 @@ func (o *PlayerNotificationTarget) HasIncludeEmailTokens() bool { } // SetIncludeEmailTokens gets a reference to the given []string and assigns it to the IncludeEmailTokens field. -func (o *PlayerNotificationTarget) SetIncludeEmailTokens(v []string) { +func (o *SubscriptionNotificationTarget) SetIncludeEmailTokens(v []string) { o.IncludeEmailTokens = v } // GetIncludePhoneNumbers returns the IncludePhoneNumbers field value if set, zero value otherwise. -func (o *PlayerNotificationTarget) GetIncludePhoneNumbers() []string { +func (o *SubscriptionNotificationTarget) GetIncludePhoneNumbers() []string { if o == nil || o.IncludePhoneNumbers == nil { var ret []string return ret @@ -178,7 +136,7 @@ func (o *PlayerNotificationTarget) GetIncludePhoneNumbers() []string { // GetIncludePhoneNumbersOk returns a tuple with the IncludePhoneNumbers field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PlayerNotificationTarget) GetIncludePhoneNumbersOk() ([]string, bool) { +func (o *SubscriptionNotificationTarget) GetIncludePhoneNumbersOk() ([]string, bool) { if o == nil || o.IncludePhoneNumbers == nil { return nil, false } @@ -186,7 +144,7 @@ func (o *PlayerNotificationTarget) GetIncludePhoneNumbersOk() ([]string, bool) { } // HasIncludePhoneNumbers returns a boolean if a field has been set. -func (o *PlayerNotificationTarget) HasIncludePhoneNumbers() bool { +func (o *SubscriptionNotificationTarget) HasIncludePhoneNumbers() bool { if o != nil && o.IncludePhoneNumbers != nil { return true } @@ -195,12 +153,12 @@ func (o *PlayerNotificationTarget) HasIncludePhoneNumbers() bool { } // SetIncludePhoneNumbers gets a reference to the given []string and assigns it to the IncludePhoneNumbers field. -func (o *PlayerNotificationTarget) SetIncludePhoneNumbers(v []string) { +func (o *SubscriptionNotificationTarget) SetIncludePhoneNumbers(v []string) { o.IncludePhoneNumbers = v } // GetIncludeIosTokens returns the IncludeIosTokens field value if set, zero value otherwise. -func (o *PlayerNotificationTarget) GetIncludeIosTokens() []string { +func (o *SubscriptionNotificationTarget) GetIncludeIosTokens() []string { if o == nil || o.IncludeIosTokens == nil { var ret []string return ret @@ -210,7 +168,7 @@ func (o *PlayerNotificationTarget) GetIncludeIosTokens() []string { // GetIncludeIosTokensOk returns a tuple with the IncludeIosTokens field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PlayerNotificationTarget) GetIncludeIosTokensOk() ([]string, bool) { +func (o *SubscriptionNotificationTarget) GetIncludeIosTokensOk() ([]string, bool) { if o == nil || o.IncludeIosTokens == nil { return nil, false } @@ -218,7 +176,7 @@ func (o *PlayerNotificationTarget) GetIncludeIosTokensOk() ([]string, bool) { } // HasIncludeIosTokens returns a boolean if a field has been set. -func (o *PlayerNotificationTarget) HasIncludeIosTokens() bool { +func (o *SubscriptionNotificationTarget) HasIncludeIosTokens() bool { if o != nil && o.IncludeIosTokens != nil { return true } @@ -227,12 +185,12 @@ func (o *PlayerNotificationTarget) HasIncludeIosTokens() bool { } // SetIncludeIosTokens gets a reference to the given []string and assigns it to the IncludeIosTokens field. -func (o *PlayerNotificationTarget) SetIncludeIosTokens(v []string) { +func (o *SubscriptionNotificationTarget) SetIncludeIosTokens(v []string) { o.IncludeIosTokens = v } // GetIncludeWpWnsUris returns the IncludeWpWnsUris field value if set, zero value otherwise. -func (o *PlayerNotificationTarget) GetIncludeWpWnsUris() []string { +func (o *SubscriptionNotificationTarget) GetIncludeWpWnsUris() []string { if o == nil || o.IncludeWpWnsUris == nil { var ret []string return ret @@ -242,7 +200,7 @@ func (o *PlayerNotificationTarget) GetIncludeWpWnsUris() []string { // GetIncludeWpWnsUrisOk returns a tuple with the IncludeWpWnsUris field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PlayerNotificationTarget) GetIncludeWpWnsUrisOk() ([]string, bool) { +func (o *SubscriptionNotificationTarget) GetIncludeWpWnsUrisOk() ([]string, bool) { if o == nil || o.IncludeWpWnsUris == nil { return nil, false } @@ -250,7 +208,7 @@ func (o *PlayerNotificationTarget) GetIncludeWpWnsUrisOk() ([]string, bool) { } // HasIncludeWpWnsUris returns a boolean if a field has been set. -func (o *PlayerNotificationTarget) HasIncludeWpWnsUris() bool { +func (o *SubscriptionNotificationTarget) HasIncludeWpWnsUris() bool { if o != nil && o.IncludeWpWnsUris != nil { return true } @@ -259,12 +217,12 @@ func (o *PlayerNotificationTarget) HasIncludeWpWnsUris() bool { } // SetIncludeWpWnsUris gets a reference to the given []string and assigns it to the IncludeWpWnsUris field. -func (o *PlayerNotificationTarget) SetIncludeWpWnsUris(v []string) { +func (o *SubscriptionNotificationTarget) SetIncludeWpWnsUris(v []string) { o.IncludeWpWnsUris = v } // GetIncludeAmazonRegIds returns the IncludeAmazonRegIds field value if set, zero value otherwise. -func (o *PlayerNotificationTarget) GetIncludeAmazonRegIds() []string { +func (o *SubscriptionNotificationTarget) GetIncludeAmazonRegIds() []string { if o == nil || o.IncludeAmazonRegIds == nil { var ret []string return ret @@ -274,7 +232,7 @@ func (o *PlayerNotificationTarget) GetIncludeAmazonRegIds() []string { // GetIncludeAmazonRegIdsOk returns a tuple with the IncludeAmazonRegIds field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PlayerNotificationTarget) GetIncludeAmazonRegIdsOk() ([]string, bool) { +func (o *SubscriptionNotificationTarget) GetIncludeAmazonRegIdsOk() ([]string, bool) { if o == nil || o.IncludeAmazonRegIds == nil { return nil, false } @@ -282,7 +240,7 @@ func (o *PlayerNotificationTarget) GetIncludeAmazonRegIdsOk() ([]string, bool) { } // HasIncludeAmazonRegIds returns a boolean if a field has been set. -func (o *PlayerNotificationTarget) HasIncludeAmazonRegIds() bool { +func (o *SubscriptionNotificationTarget) HasIncludeAmazonRegIds() bool { if o != nil && o.IncludeAmazonRegIds != nil { return true } @@ -291,12 +249,12 @@ func (o *PlayerNotificationTarget) HasIncludeAmazonRegIds() bool { } // SetIncludeAmazonRegIds gets a reference to the given []string and assigns it to the IncludeAmazonRegIds field. -func (o *PlayerNotificationTarget) SetIncludeAmazonRegIds(v []string) { +func (o *SubscriptionNotificationTarget) SetIncludeAmazonRegIds(v []string) { o.IncludeAmazonRegIds = v } // GetIncludeChromeRegIds returns the IncludeChromeRegIds field value if set, zero value otherwise. -func (o *PlayerNotificationTarget) GetIncludeChromeRegIds() []string { +func (o *SubscriptionNotificationTarget) GetIncludeChromeRegIds() []string { if o == nil || o.IncludeChromeRegIds == nil { var ret []string return ret @@ -306,7 +264,7 @@ func (o *PlayerNotificationTarget) GetIncludeChromeRegIds() []string { // GetIncludeChromeRegIdsOk returns a tuple with the IncludeChromeRegIds field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PlayerNotificationTarget) GetIncludeChromeRegIdsOk() ([]string, bool) { +func (o *SubscriptionNotificationTarget) GetIncludeChromeRegIdsOk() ([]string, bool) { if o == nil || o.IncludeChromeRegIds == nil { return nil, false } @@ -314,7 +272,7 @@ func (o *PlayerNotificationTarget) GetIncludeChromeRegIdsOk() ([]string, bool) { } // HasIncludeChromeRegIds returns a boolean if a field has been set. -func (o *PlayerNotificationTarget) HasIncludeChromeRegIds() bool { +func (o *SubscriptionNotificationTarget) HasIncludeChromeRegIds() bool { if o != nil && o.IncludeChromeRegIds != nil { return true } @@ -323,12 +281,12 @@ func (o *PlayerNotificationTarget) HasIncludeChromeRegIds() bool { } // SetIncludeChromeRegIds gets a reference to the given []string and assigns it to the IncludeChromeRegIds field. -func (o *PlayerNotificationTarget) SetIncludeChromeRegIds(v []string) { +func (o *SubscriptionNotificationTarget) SetIncludeChromeRegIds(v []string) { o.IncludeChromeRegIds = v } // GetIncludeChromeWebRegIds returns the IncludeChromeWebRegIds field value if set, zero value otherwise. -func (o *PlayerNotificationTarget) GetIncludeChromeWebRegIds() []string { +func (o *SubscriptionNotificationTarget) GetIncludeChromeWebRegIds() []string { if o == nil || o.IncludeChromeWebRegIds == nil { var ret []string return ret @@ -338,7 +296,7 @@ func (o *PlayerNotificationTarget) GetIncludeChromeWebRegIds() []string { // GetIncludeChromeWebRegIdsOk returns a tuple with the IncludeChromeWebRegIds field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PlayerNotificationTarget) GetIncludeChromeWebRegIdsOk() ([]string, bool) { +func (o *SubscriptionNotificationTarget) GetIncludeChromeWebRegIdsOk() ([]string, bool) { if o == nil || o.IncludeChromeWebRegIds == nil { return nil, false } @@ -346,7 +304,7 @@ func (o *PlayerNotificationTarget) GetIncludeChromeWebRegIdsOk() ([]string, bool } // HasIncludeChromeWebRegIds returns a boolean if a field has been set. -func (o *PlayerNotificationTarget) HasIncludeChromeWebRegIds() bool { +func (o *SubscriptionNotificationTarget) HasIncludeChromeWebRegIds() bool { if o != nil && o.IncludeChromeWebRegIds != nil { return true } @@ -355,12 +313,12 @@ func (o *PlayerNotificationTarget) HasIncludeChromeWebRegIds() bool { } // SetIncludeChromeWebRegIds gets a reference to the given []string and assigns it to the IncludeChromeWebRegIds field. -func (o *PlayerNotificationTarget) SetIncludeChromeWebRegIds(v []string) { +func (o *SubscriptionNotificationTarget) SetIncludeChromeWebRegIds(v []string) { o.IncludeChromeWebRegIds = v } // GetIncludeAndroidRegIds returns the IncludeAndroidRegIds field value if set, zero value otherwise. -func (o *PlayerNotificationTarget) GetIncludeAndroidRegIds() []string { +func (o *SubscriptionNotificationTarget) GetIncludeAndroidRegIds() []string { if o == nil || o.IncludeAndroidRegIds == nil { var ret []string return ret @@ -370,7 +328,7 @@ func (o *PlayerNotificationTarget) GetIncludeAndroidRegIds() []string { // GetIncludeAndroidRegIdsOk returns a tuple with the IncludeAndroidRegIds field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PlayerNotificationTarget) GetIncludeAndroidRegIdsOk() ([]string, bool) { +func (o *SubscriptionNotificationTarget) GetIncludeAndroidRegIdsOk() ([]string, bool) { if o == nil || o.IncludeAndroidRegIds == nil { return nil, false } @@ -378,7 +336,7 @@ func (o *PlayerNotificationTarget) GetIncludeAndroidRegIdsOk() ([]string, bool) } // HasIncludeAndroidRegIds returns a boolean if a field has been set. -func (o *PlayerNotificationTarget) HasIncludeAndroidRegIds() bool { +func (o *SubscriptionNotificationTarget) HasIncludeAndroidRegIds() bool { if o != nil && o.IncludeAndroidRegIds != nil { return true } @@ -387,54 +345,45 @@ func (o *PlayerNotificationTarget) HasIncludeAndroidRegIds() bool { } // SetIncludeAndroidRegIds gets a reference to the given []string and assigns it to the IncludeAndroidRegIds field. -func (o *PlayerNotificationTarget) SetIncludeAndroidRegIds(v []string) { +func (o *SubscriptionNotificationTarget) SetIncludeAndroidRegIds(v []string) { o.IncludeAndroidRegIds = v } // GetIncludeAliases returns the IncludeAliases field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *PlayerNotificationTarget) GetIncludeAliases() PlayerNotificationTargetIncludeAliases { - if o == nil || o.IncludeAliases.Get() == nil { - var ret PlayerNotificationTargetIncludeAliases +func (o *SubscriptionNotificationTarget) GetIncludeAliases() map[string][]string { + if o == nil { + var ret map[string][]string return ret } - return *o.IncludeAliases.Get() + return o.IncludeAliases } // GetIncludeAliasesOk returns a tuple with the IncludeAliases field value if set, nil otherwise // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *PlayerNotificationTarget) GetIncludeAliasesOk() (*PlayerNotificationTargetIncludeAliases, bool) { - if o == nil { +func (o *SubscriptionNotificationTarget) GetIncludeAliasesOk() (*map[string][]string, bool) { + if o == nil || o.IncludeAliases == nil { return nil, false } - return o.IncludeAliases.Get(), o.IncludeAliases.IsSet() + return &o.IncludeAliases, true } // HasIncludeAliases returns a boolean if a field has been set. -func (o *PlayerNotificationTarget) HasIncludeAliases() bool { - if o != nil && o.IncludeAliases.IsSet() { +func (o *SubscriptionNotificationTarget) HasIncludeAliases() bool { + if o != nil && o.IncludeAliases != nil { return true } return false } -// SetIncludeAliases gets a reference to the given NullablePlayerNotificationTargetIncludeAliases and assigns it to the IncludeAliases field. -func (o *PlayerNotificationTarget) SetIncludeAliases(v PlayerNotificationTargetIncludeAliases) { - o.IncludeAliases.Set(&v) -} -// SetIncludeAliasesNil sets the value for IncludeAliases to be an explicit nil -func (o *PlayerNotificationTarget) SetIncludeAliasesNil() { - o.IncludeAliases.Set(nil) -} - -// UnsetIncludeAliases ensures that no value is present for IncludeAliases, not even an explicit nil -func (o *PlayerNotificationTarget) UnsetIncludeAliases() { - o.IncludeAliases.Unset() +// SetIncludeAliases gets a reference to the given map[string][]string and assigns it to the IncludeAliases field. +func (o *SubscriptionNotificationTarget) SetIncludeAliases(v map[string][]string) { + o.IncludeAliases = v } // GetTargetChannel returns the TargetChannel field value if set, zero value otherwise. -func (o *PlayerNotificationTarget) GetTargetChannel() string { +func (o *SubscriptionNotificationTarget) GetTargetChannel() string { if o == nil || o.TargetChannel == nil { var ret string return ret @@ -444,7 +393,7 @@ func (o *PlayerNotificationTarget) GetTargetChannel() string { // GetTargetChannelOk returns a tuple with the TargetChannel field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PlayerNotificationTarget) GetTargetChannelOk() (*string, bool) { +func (o *SubscriptionNotificationTarget) GetTargetChannelOk() (*string, bool) { if o == nil || o.TargetChannel == nil { return nil, false } @@ -452,7 +401,7 @@ func (o *PlayerNotificationTarget) GetTargetChannelOk() (*string, bool) { } // HasTargetChannel returns a boolean if a field has been set. -func (o *PlayerNotificationTarget) HasTargetChannel() bool { +func (o *SubscriptionNotificationTarget) HasTargetChannel() bool { if o != nil && o.TargetChannel != nil { return true } @@ -461,17 +410,14 @@ func (o *PlayerNotificationTarget) HasTargetChannel() bool { } // SetTargetChannel gets a reference to the given string and assigns it to the TargetChannel field. -func (o *PlayerNotificationTarget) SetTargetChannel(v string) { +func (o *SubscriptionNotificationTarget) SetTargetChannel(v string) { o.TargetChannel = &v } -func (o PlayerNotificationTarget) MarshalJSON() ([]byte, error) { +func (o SubscriptionNotificationTarget) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.IncludePlayerIds != nil { - toSerialize["include_player_ids"] = o.IncludePlayerIds - } - if o.IncludeExternalUserIds != nil { - toSerialize["include_external_user_ids"] = o.IncludeExternalUserIds + if o.IncludeSubscriptionIds != nil { + toSerialize["include_subscription_ids"] = o.IncludeSubscriptionIds } if o.IncludeEmailTokens != nil { toSerialize["include_email_tokens"] = o.IncludeEmailTokens @@ -497,8 +443,8 @@ func (o PlayerNotificationTarget) MarshalJSON() ([]byte, error) { if o.IncludeAndroidRegIds != nil { toSerialize["include_android_reg_ids"] = o.IncludeAndroidRegIds } - if o.IncludeAliases.IsSet() { - toSerialize["include_aliases"] = o.IncludeAliases.Get() + if o.IncludeAliases != nil { + toSerialize["include_aliases"] = o.IncludeAliases } if o.TargetChannel != nil { toSerialize["target_channel"] = o.TargetChannel @@ -511,18 +457,17 @@ func (o PlayerNotificationTarget) MarshalJSON() ([]byte, error) { return json.Marshal(toSerialize) } -func (o *PlayerNotificationTarget) UnmarshalJSON(bytes []byte) (err error) { - varPlayerNotificationTarget := _PlayerNotificationTarget{} +func (o *SubscriptionNotificationTarget) UnmarshalJSON(bytes []byte) (err error) { + varSubscriptionNotificationTarget := _SubscriptionNotificationTarget{} - if err = json.Unmarshal(bytes, &varPlayerNotificationTarget); err == nil { - *o = PlayerNotificationTarget(varPlayerNotificationTarget) + if err = json.Unmarshal(bytes, &varSubscriptionNotificationTarget); err == nil { + *o = SubscriptionNotificationTarget(varSubscriptionNotificationTarget) } additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(bytes, &additionalProperties); err == nil { - delete(additionalProperties, "include_player_ids") - delete(additionalProperties, "include_external_user_ids") + delete(additionalProperties, "include_subscription_ids") delete(additionalProperties, "include_email_tokens") delete(additionalProperties, "include_phone_numbers") delete(additionalProperties, "include_ios_tokens") @@ -539,38 +484,38 @@ func (o *PlayerNotificationTarget) UnmarshalJSON(bytes []byte) (err error) { return err } -type NullablePlayerNotificationTarget struct { - value *PlayerNotificationTarget +type NullableSubscriptionNotificationTarget struct { + value *SubscriptionNotificationTarget isSet bool } -func (v NullablePlayerNotificationTarget) Get() *PlayerNotificationTarget { +func (v NullableSubscriptionNotificationTarget) Get() *SubscriptionNotificationTarget { return v.value } -func (v *NullablePlayerNotificationTarget) Set(val *PlayerNotificationTarget) { +func (v *NullableSubscriptionNotificationTarget) Set(val *SubscriptionNotificationTarget) { v.value = val v.isSet = true } -func (v NullablePlayerNotificationTarget) IsSet() bool { +func (v NullableSubscriptionNotificationTarget) IsSet() bool { return v.isSet } -func (v *NullablePlayerNotificationTarget) Unset() { +func (v *NullableSubscriptionNotificationTarget) Unset() { v.value = nil v.isSet = false } -func NewNullablePlayerNotificationTarget(val *PlayerNotificationTarget) *NullablePlayerNotificationTarget { - return &NullablePlayerNotificationTarget{value: val, isSet: true} +func NewNullableSubscriptionNotificationTarget(val *SubscriptionNotificationTarget) *NullableSubscriptionNotificationTarget { + return &NullableSubscriptionNotificationTarget{value: val, isSet: true} } -func (v NullablePlayerNotificationTarget) MarshalJSON() ([]byte, error) { +func (v NullableSubscriptionNotificationTarget) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } -func (v *NullablePlayerNotificationTarget) UnmarshalJSON(src []byte) error { +func (v *NullableSubscriptionNotificationTarget) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } diff --git a/model_transfer_subscription_request_body.go b/model_transfer_subscription_request_body.go index b31e32c..55392e1 100644 --- a/model_transfer_subscription_request_body.go +++ b/model_transfer_subscription_request_body.go @@ -3,7 +3,7 @@ OneSignal A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com -API version: 1.4.0 +API version: 5.0.1 Contact: devrel@onesignal.com */ @@ -17,7 +17,7 @@ import ( // TransferSubscriptionRequestBody struct for TransferSubscriptionRequestBody type TransferSubscriptionRequestBody struct { - Identity map[string]interface{} `json:"identity,omitempty"` + Identity *map[string]string `json:"identity,omitempty"` AdditionalProperties map[string]interface{} } @@ -41,17 +41,17 @@ func NewTransferSubscriptionRequestBodyWithDefaults() *TransferSubscriptionReque } // GetIdentity returns the Identity field value if set, zero value otherwise. -func (o *TransferSubscriptionRequestBody) GetIdentity() map[string]interface{} { +func (o *TransferSubscriptionRequestBody) GetIdentity() map[string]string { if o == nil || o.Identity == nil { - var ret map[string]interface{} + var ret map[string]string return ret } - return o.Identity + return *o.Identity } // GetIdentityOk returns a tuple with the Identity field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *TransferSubscriptionRequestBody) GetIdentityOk() (map[string]interface{}, bool) { +func (o *TransferSubscriptionRequestBody) GetIdentityOk() (*map[string]string, bool) { if o == nil || o.Identity == nil { return nil, false } @@ -67,9 +67,9 @@ func (o *TransferSubscriptionRequestBody) HasIdentity() bool { return false } -// SetIdentity gets a reference to the given map[string]interface{} and assigns it to the Identity field. -func (o *TransferSubscriptionRequestBody) SetIdentity(v map[string]interface{}) { - o.Identity = v +// SetIdentity gets a reference to the given map[string]string and assigns it to the Identity field. +func (o *TransferSubscriptionRequestBody) SetIdentity(v map[string]string) { + o.Identity = &v } func (o TransferSubscriptionRequestBody) MarshalJSON() ([]byte, error) { diff --git a/model_update_live_activity_request.go b/model_update_live_activity_request.go index edea0de..8f517b0 100644 --- a/model_update_live_activity_request.go +++ b/model_update_live_activity_request.go @@ -3,7 +3,7 @@ OneSignal A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com -API version: 1.4.0 +API version: 5.0.1 Contact: devrel@onesignal.com */ @@ -17,12 +17,21 @@ import ( // UpdateLiveActivityRequest struct for UpdateLiveActivityRequest type UpdateLiveActivityRequest struct { - // Type of live activity + // An internal name to assist with your campaign organization. This does not get displayed in the message itself. Name string `json:"name"` Event string `json:"event"` + // This must match the ContentState interface you have defined within your Live Activity in your app. EventUpdates map[string]interface{} `json:"event_updates"` - // Timestamp; only allowed if event is \"end\" - DismissAt *float32 `json:"dismiss_at,omitempty"` + Contents *LanguageStringMap `json:"contents,omitempty"` + Headings *LanguageStringMap `json:"headings,omitempty"` + // 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. + Sound *string `json:"sound,omitempty"` + // 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. + StaleDate *int32 `json:"stale_date,omitempty"` + // Accepts Unix timestamp in seconds; only allowed if event is \"end\" + DismissalDate *int32 `json:"dismissal_date,omitempty"` + // 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. + Priority *int32 `json:"priority,omitempty"` AdditionalProperties map[string]interface{} } @@ -120,36 +129,196 @@ func (o *UpdateLiveActivityRequest) SetEventUpdates(v map[string]interface{}) { o.EventUpdates = v } -// GetDismissAt returns the DismissAt field value if set, zero value otherwise. -func (o *UpdateLiveActivityRequest) GetDismissAt() float32 { - if o == nil || o.DismissAt == nil { - var ret float32 +// GetContents returns the Contents field value if set, zero value otherwise. +func (o *UpdateLiveActivityRequest) GetContents() LanguageStringMap { + if o == nil || o.Contents == nil { + var ret LanguageStringMap return ret } - return *o.DismissAt + return *o.Contents } -// GetDismissAtOk returns a tuple with the DismissAt field value if set, nil otherwise +// GetContentsOk returns a tuple with the Contents field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *UpdateLiveActivityRequest) GetDismissAtOk() (*float32, bool) { - if o == nil || o.DismissAt == nil { +func (o *UpdateLiveActivityRequest) GetContentsOk() (*LanguageStringMap, bool) { + if o == nil || o.Contents == nil { return nil, false } - return o.DismissAt, true + return o.Contents, true } -// HasDismissAt returns a boolean if a field has been set. -func (o *UpdateLiveActivityRequest) HasDismissAt() bool { - if o != nil && o.DismissAt != nil { +// HasContents returns a boolean if a field has been set. +func (o *UpdateLiveActivityRequest) HasContents() bool { + if o != nil && o.Contents != nil { return true } return false } -// SetDismissAt gets a reference to the given float32 and assigns it to the DismissAt field. -func (o *UpdateLiveActivityRequest) SetDismissAt(v float32) { - o.DismissAt = &v +// SetContents gets a reference to the given LanguageStringMap and assigns it to the Contents field. +func (o *UpdateLiveActivityRequest) SetContents(v LanguageStringMap) { + o.Contents = &v +} + +// GetHeadings returns the Headings field value if set, zero value otherwise. +func (o *UpdateLiveActivityRequest) GetHeadings() LanguageStringMap { + if o == nil || o.Headings == nil { + var ret LanguageStringMap + return ret + } + return *o.Headings +} + +// GetHeadingsOk returns a tuple with the Headings field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateLiveActivityRequest) GetHeadingsOk() (*LanguageStringMap, bool) { + if o == nil || o.Headings == nil { + return nil, false + } + return o.Headings, true +} + +// HasHeadings returns a boolean if a field has been set. +func (o *UpdateLiveActivityRequest) HasHeadings() bool { + if o != nil && o.Headings != nil { + return true + } + + return false +} + +// SetHeadings gets a reference to the given LanguageStringMap and assigns it to the Headings field. +func (o *UpdateLiveActivityRequest) SetHeadings(v LanguageStringMap) { + o.Headings = &v +} + +// GetSound returns the Sound field value if set, zero value otherwise. +func (o *UpdateLiveActivityRequest) GetSound() string { + if o == nil || o.Sound == nil { + var ret string + return ret + } + return *o.Sound +} + +// GetSoundOk returns a tuple with the Sound field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateLiveActivityRequest) GetSoundOk() (*string, bool) { + if o == nil || o.Sound == nil { + return nil, false + } + return o.Sound, true +} + +// HasSound returns a boolean if a field has been set. +func (o *UpdateLiveActivityRequest) HasSound() bool { + if o != nil && o.Sound != nil { + return true + } + + return false +} + +// SetSound gets a reference to the given string and assigns it to the Sound field. +func (o *UpdateLiveActivityRequest) SetSound(v string) { + o.Sound = &v +} + +// GetStaleDate returns the StaleDate field value if set, zero value otherwise. +func (o *UpdateLiveActivityRequest) GetStaleDate() int32 { + if o == nil || o.StaleDate == nil { + var ret int32 + return ret + } + return *o.StaleDate +} + +// GetStaleDateOk returns a tuple with the StaleDate field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateLiveActivityRequest) GetStaleDateOk() (*int32, bool) { + if o == nil || o.StaleDate == nil { + return nil, false + } + return o.StaleDate, true +} + +// HasStaleDate returns a boolean if a field has been set. +func (o *UpdateLiveActivityRequest) HasStaleDate() bool { + if o != nil && o.StaleDate != nil { + return true + } + + return false +} + +// SetStaleDate gets a reference to the given int32 and assigns it to the StaleDate field. +func (o *UpdateLiveActivityRequest) SetStaleDate(v int32) { + o.StaleDate = &v +} + +// GetDismissalDate returns the DismissalDate field value if set, zero value otherwise. +func (o *UpdateLiveActivityRequest) GetDismissalDate() int32 { + if o == nil || o.DismissalDate == nil { + var ret int32 + return ret + } + return *o.DismissalDate +} + +// GetDismissalDateOk returns a tuple with the DismissalDate field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateLiveActivityRequest) GetDismissalDateOk() (*int32, bool) { + if o == nil || o.DismissalDate == nil { + return nil, false + } + return o.DismissalDate, true +} + +// HasDismissalDate returns a boolean if a field has been set. +func (o *UpdateLiveActivityRequest) HasDismissalDate() bool { + if o != nil && o.DismissalDate != nil { + return true + } + + return false +} + +// SetDismissalDate gets a reference to the given int32 and assigns it to the DismissalDate field. +func (o *UpdateLiveActivityRequest) SetDismissalDate(v int32) { + o.DismissalDate = &v +} + +// GetPriority returns the Priority field value if set, zero value otherwise. +func (o *UpdateLiveActivityRequest) GetPriority() int32 { + if o == nil || o.Priority == nil { + var ret int32 + return ret + } + return *o.Priority +} + +// GetPriorityOk returns a tuple with the Priority field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateLiveActivityRequest) GetPriorityOk() (*int32, bool) { + if o == nil || o.Priority == nil { + return nil, false + } + return o.Priority, true +} + +// HasPriority returns a boolean if a field has been set. +func (o *UpdateLiveActivityRequest) HasPriority() bool { + if o != nil && o.Priority != nil { + return true + } + + return false +} + +// SetPriority gets a reference to the given int32 and assigns it to the Priority field. +func (o *UpdateLiveActivityRequest) SetPriority(v int32) { + o.Priority = &v } func (o UpdateLiveActivityRequest) MarshalJSON() ([]byte, error) { @@ -163,8 +332,23 @@ func (o UpdateLiveActivityRequest) MarshalJSON() ([]byte, error) { if true { toSerialize["event_updates"] = o.EventUpdates } - if o.DismissAt != nil { - toSerialize["dismiss_at"] = o.DismissAt + if o.Contents != nil { + toSerialize["contents"] = o.Contents + } + if o.Headings != nil { + toSerialize["headings"] = o.Headings + } + if o.Sound != nil { + toSerialize["sound"] = o.Sound + } + if o.StaleDate != nil { + toSerialize["stale_date"] = o.StaleDate + } + if o.DismissalDate != nil { + toSerialize["dismissal_date"] = o.DismissalDate + } + if o.Priority != nil { + toSerialize["priority"] = o.Priority } for key, value := range o.AdditionalProperties { @@ -187,7 +371,12 @@ func (o *UpdateLiveActivityRequest) UnmarshalJSON(bytes []byte) (err error) { delete(additionalProperties, "name") delete(additionalProperties, "event") delete(additionalProperties, "event_updates") - delete(additionalProperties, "dismiss_at") + delete(additionalProperties, "contents") + delete(additionalProperties, "headings") + delete(additionalProperties, "sound") + delete(additionalProperties, "stale_date") + delete(additionalProperties, "dismissal_date") + delete(additionalProperties, "priority") o.AdditionalProperties = additionalProperties } diff --git a/model_update_live_activity_success_response.go b/model_update_live_activity_success_response.go index 05a709c..2d61eee 100644 --- a/model_update_live_activity_success_response.go +++ b/model_update_live_activity_success_response.go @@ -3,7 +3,7 @@ OneSignal A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com -API version: 1.4.0 +API version: 5.0.1 Contact: devrel@onesignal.com */ @@ -17,8 +17,7 @@ import ( // UpdateLiveActivitySuccessResponse struct for UpdateLiveActivitySuccessResponse type UpdateLiveActivitySuccessResponse struct { - NotificationId *string `json:"notification_id,omitempty"` - Errors *Notification200Errors `json:"errors,omitempty"` + Id *string `json:"id,omitempty"` AdditionalProperties map[string]interface{} } @@ -41,77 +40,42 @@ func NewUpdateLiveActivitySuccessResponseWithDefaults() *UpdateLiveActivitySucce return &this } -// GetNotificationId returns the NotificationId field value if set, zero value otherwise. -func (o *UpdateLiveActivitySuccessResponse) GetNotificationId() string { - if o == nil || o.NotificationId == nil { +// GetId returns the Id field value if set, zero value otherwise. +func (o *UpdateLiveActivitySuccessResponse) GetId() string { + if o == nil || o.Id == nil { var ret string return ret } - return *o.NotificationId + return *o.Id } -// GetNotificationIdOk returns a tuple with the NotificationId field value if set, nil otherwise +// GetIdOk returns a tuple with the Id field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *UpdateLiveActivitySuccessResponse) GetNotificationIdOk() (*string, bool) { - if o == nil || o.NotificationId == nil { +func (o *UpdateLiveActivitySuccessResponse) GetIdOk() (*string, bool) { + if o == nil || o.Id == nil { return nil, false } - return o.NotificationId, true + return o.Id, true } -// HasNotificationId returns a boolean if a field has been set. -func (o *UpdateLiveActivitySuccessResponse) HasNotificationId() bool { - if o != nil && o.NotificationId != nil { +// HasId returns a boolean if a field has been set. +func (o *UpdateLiveActivitySuccessResponse) HasId() bool { + if o != nil && o.Id != nil { return true } return false } -// SetNotificationId gets a reference to the given string and assigns it to the NotificationId field. -func (o *UpdateLiveActivitySuccessResponse) SetNotificationId(v string) { - o.NotificationId = &v -} - -// GetErrors returns the Errors field value if set, zero value otherwise. -func (o *UpdateLiveActivitySuccessResponse) GetErrors() Notification200Errors { - if o == nil || o.Errors == nil { - var ret Notification200Errors - return ret - } - return *o.Errors -} - -// GetErrorsOk returns a tuple with the Errors field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateLiveActivitySuccessResponse) GetErrorsOk() (*Notification200Errors, bool) { - if o == nil || o.Errors == nil { - return nil, false - } - return o.Errors, true -} - -// HasErrors returns a boolean if a field has been set. -func (o *UpdateLiveActivitySuccessResponse) HasErrors() bool { - if o != nil && o.Errors != nil { - return true - } - - return false -} - -// SetErrors gets a reference to the given Notification200Errors and assigns it to the Errors field. -func (o *UpdateLiveActivitySuccessResponse) SetErrors(v Notification200Errors) { - o.Errors = &v +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *UpdateLiveActivitySuccessResponse) SetId(v string) { + o.Id = &v } func (o UpdateLiveActivitySuccessResponse) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.NotificationId != nil { - toSerialize["notification_id"] = o.NotificationId - } - if o.Errors != nil { - toSerialize["errors"] = o.Errors + if o.Id != nil { + toSerialize["id"] = o.Id } for key, value := range o.AdditionalProperties { @@ -131,8 +95,7 @@ func (o *UpdateLiveActivitySuccessResponse) UnmarshalJSON(bytes []byte) (err err additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(bytes, &additionalProperties); err == nil { - delete(additionalProperties, "notification_id") - delete(additionalProperties, "errors") + delete(additionalProperties, "id") o.AdditionalProperties = additionalProperties } diff --git a/model_update_player_success_response.go b/model_update_player_success_response.go deleted file mode 100644 index 956b154..0000000 --- a/model_update_player_success_response.go +++ /dev/null @@ -1,141 +0,0 @@ -/* -OneSignal - -A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com - -API version: 1.4.0 -Contact: devrel@onesignal.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onesignal - -import ( - "encoding/json" -) - -// UpdatePlayerSuccessResponse struct for UpdatePlayerSuccessResponse -type UpdatePlayerSuccessResponse struct { - Success *bool `json:"success,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _UpdatePlayerSuccessResponse UpdatePlayerSuccessResponse - -// NewUpdatePlayerSuccessResponse instantiates a new UpdatePlayerSuccessResponse object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewUpdatePlayerSuccessResponse() *UpdatePlayerSuccessResponse { - this := UpdatePlayerSuccessResponse{} - return &this -} - -// NewUpdatePlayerSuccessResponseWithDefaults instantiates a new UpdatePlayerSuccessResponse object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewUpdatePlayerSuccessResponseWithDefaults() *UpdatePlayerSuccessResponse { - this := UpdatePlayerSuccessResponse{} - return &this -} - -// GetSuccess returns the Success field value if set, zero value otherwise. -func (o *UpdatePlayerSuccessResponse) GetSuccess() bool { - if o == nil || o.Success == nil { - var ret bool - return ret - } - return *o.Success -} - -// GetSuccessOk returns a tuple with the Success field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdatePlayerSuccessResponse) GetSuccessOk() (*bool, bool) { - if o == nil || o.Success == nil { - return nil, false - } - return o.Success, true -} - -// HasSuccess returns a boolean if a field has been set. -func (o *UpdatePlayerSuccessResponse) HasSuccess() bool { - if o != nil && o.Success != nil { - return true - } - - return false -} - -// SetSuccess gets a reference to the given bool and assigns it to the Success field. -func (o *UpdatePlayerSuccessResponse) SetSuccess(v bool) { - o.Success = &v -} - -func (o UpdatePlayerSuccessResponse) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Success != nil { - toSerialize["success"] = o.Success - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return json.Marshal(toSerialize) -} - -func (o *UpdatePlayerSuccessResponse) UnmarshalJSON(bytes []byte) (err error) { - varUpdatePlayerSuccessResponse := _UpdatePlayerSuccessResponse{} - - if err = json.Unmarshal(bytes, &varUpdatePlayerSuccessResponse); err == nil { - *o = UpdatePlayerSuccessResponse(varUpdatePlayerSuccessResponse) - } - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { - delete(additionalProperties, "success") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableUpdatePlayerSuccessResponse struct { - value *UpdatePlayerSuccessResponse - isSet bool -} - -func (v NullableUpdatePlayerSuccessResponse) Get() *UpdatePlayerSuccessResponse { - return v.value -} - -func (v *NullableUpdatePlayerSuccessResponse) Set(val *UpdatePlayerSuccessResponse) { - v.value = val - v.isSet = true -} - -func (v NullableUpdatePlayerSuccessResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableUpdatePlayerSuccessResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableUpdatePlayerSuccessResponse(val *UpdatePlayerSuccessResponse) *NullableUpdatePlayerSuccessResponse { - return &NullableUpdatePlayerSuccessResponse{value: val, isSet: true} -} - -func (v NullableUpdatePlayerSuccessResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableUpdatePlayerSuccessResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_update_player_tags_request_body.go b/model_update_player_tags_request_body.go deleted file mode 100644 index bd7a48e..0000000 --- a/model_update_player_tags_request_body.go +++ /dev/null @@ -1,142 +0,0 @@ -/* -OneSignal - -A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com - -API version: 1.4.0 -Contact: devrel@onesignal.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onesignal - -import ( - "encoding/json" -) - -// UpdatePlayerTagsRequestBody struct for UpdatePlayerTagsRequestBody -type UpdatePlayerTagsRequestBody struct { - // 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 - Tags map[string]interface{} `json:"tags,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _UpdatePlayerTagsRequestBody UpdatePlayerTagsRequestBody - -// NewUpdatePlayerTagsRequestBody instantiates a new UpdatePlayerTagsRequestBody object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewUpdatePlayerTagsRequestBody() *UpdatePlayerTagsRequestBody { - this := UpdatePlayerTagsRequestBody{} - return &this -} - -// NewUpdatePlayerTagsRequestBodyWithDefaults instantiates a new UpdatePlayerTagsRequestBody object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewUpdatePlayerTagsRequestBodyWithDefaults() *UpdatePlayerTagsRequestBody { - this := UpdatePlayerTagsRequestBody{} - return &this -} - -// GetTags returns the Tags field value if set, zero value otherwise. -func (o *UpdatePlayerTagsRequestBody) GetTags() map[string]interface{} { - if o == nil || o.Tags == nil { - var ret map[string]interface{} - return ret - } - return o.Tags -} - -// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdatePlayerTagsRequestBody) GetTagsOk() (map[string]interface{}, bool) { - if o == nil || o.Tags == nil { - return nil, false - } - return o.Tags, true -} - -// HasTags returns a boolean if a field has been set. -func (o *UpdatePlayerTagsRequestBody) HasTags() bool { - if o != nil && o.Tags != nil { - return true - } - - return false -} - -// SetTags gets a reference to the given map[string]interface{} and assigns it to the Tags field. -func (o *UpdatePlayerTagsRequestBody) SetTags(v map[string]interface{}) { - o.Tags = v -} - -func (o UpdatePlayerTagsRequestBody) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Tags != nil { - toSerialize["tags"] = o.Tags - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return json.Marshal(toSerialize) -} - -func (o *UpdatePlayerTagsRequestBody) UnmarshalJSON(bytes []byte) (err error) { - varUpdatePlayerTagsRequestBody := _UpdatePlayerTagsRequestBody{} - - if err = json.Unmarshal(bytes, &varUpdatePlayerTagsRequestBody); err == nil { - *o = UpdatePlayerTagsRequestBody(varUpdatePlayerTagsRequestBody) - } - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { - delete(additionalProperties, "tags") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableUpdatePlayerTagsRequestBody struct { - value *UpdatePlayerTagsRequestBody - isSet bool -} - -func (v NullableUpdatePlayerTagsRequestBody) Get() *UpdatePlayerTagsRequestBody { - return v.value -} - -func (v *NullableUpdatePlayerTagsRequestBody) Set(val *UpdatePlayerTagsRequestBody) { - v.value = val - v.isSet = true -} - -func (v NullableUpdatePlayerTagsRequestBody) IsSet() bool { - return v.isSet -} - -func (v *NullableUpdatePlayerTagsRequestBody) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableUpdatePlayerTagsRequestBody(val *UpdatePlayerTagsRequestBody) *NullableUpdatePlayerTagsRequestBody { - return &NullableUpdatePlayerTagsRequestBody{value: val, isSet: true} -} - -func (v NullableUpdatePlayerTagsRequestBody) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableUpdatePlayerTagsRequestBody) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_update_player_tags_success_response.go b/model_update_player_tags_success_response.go deleted file mode 100644 index 3b380fe..0000000 --- a/model_update_player_tags_success_response.go +++ /dev/null @@ -1,141 +0,0 @@ -/* -OneSignal - -A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com - -API version: 1.4.0 -Contact: devrel@onesignal.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onesignal - -import ( - "encoding/json" -) - -// UpdatePlayerTagsSuccessResponse struct for UpdatePlayerTagsSuccessResponse -type UpdatePlayerTagsSuccessResponse struct { - Success *bool `json:"success,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _UpdatePlayerTagsSuccessResponse UpdatePlayerTagsSuccessResponse - -// NewUpdatePlayerTagsSuccessResponse instantiates a new UpdatePlayerTagsSuccessResponse object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewUpdatePlayerTagsSuccessResponse() *UpdatePlayerTagsSuccessResponse { - this := UpdatePlayerTagsSuccessResponse{} - return &this -} - -// NewUpdatePlayerTagsSuccessResponseWithDefaults instantiates a new UpdatePlayerTagsSuccessResponse object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewUpdatePlayerTagsSuccessResponseWithDefaults() *UpdatePlayerTagsSuccessResponse { - this := UpdatePlayerTagsSuccessResponse{} - return &this -} - -// GetSuccess returns the Success field value if set, zero value otherwise. -func (o *UpdatePlayerTagsSuccessResponse) GetSuccess() bool { - if o == nil || o.Success == nil { - var ret bool - return ret - } - return *o.Success -} - -// GetSuccessOk returns a tuple with the Success field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdatePlayerTagsSuccessResponse) GetSuccessOk() (*bool, bool) { - if o == nil || o.Success == nil { - return nil, false - } - return o.Success, true -} - -// HasSuccess returns a boolean if a field has been set. -func (o *UpdatePlayerTagsSuccessResponse) HasSuccess() bool { - if o != nil && o.Success != nil { - return true - } - - return false -} - -// SetSuccess gets a reference to the given bool and assigns it to the Success field. -func (o *UpdatePlayerTagsSuccessResponse) SetSuccess(v bool) { - o.Success = &v -} - -func (o UpdatePlayerTagsSuccessResponse) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Success != nil { - toSerialize["success"] = o.Success - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return json.Marshal(toSerialize) -} - -func (o *UpdatePlayerTagsSuccessResponse) UnmarshalJSON(bytes []byte) (err error) { - varUpdatePlayerTagsSuccessResponse := _UpdatePlayerTagsSuccessResponse{} - - if err = json.Unmarshal(bytes, &varUpdatePlayerTagsSuccessResponse); err == nil { - *o = UpdatePlayerTagsSuccessResponse(varUpdatePlayerTagsSuccessResponse) - } - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { - delete(additionalProperties, "success") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableUpdatePlayerTagsSuccessResponse struct { - value *UpdatePlayerTagsSuccessResponse - isSet bool -} - -func (v NullableUpdatePlayerTagsSuccessResponse) Get() *UpdatePlayerTagsSuccessResponse { - return v.value -} - -func (v *NullableUpdatePlayerTagsSuccessResponse) Set(val *UpdatePlayerTagsSuccessResponse) { - v.value = val - v.isSet = true -} - -func (v NullableUpdatePlayerTagsSuccessResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableUpdatePlayerTagsSuccessResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableUpdatePlayerTagsSuccessResponse(val *UpdatePlayerTagsSuccessResponse) *NullableUpdatePlayerTagsSuccessResponse { - return &NullableUpdatePlayerTagsSuccessResponse{value: val, isSet: true} -} - -func (v NullableUpdatePlayerTagsSuccessResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableUpdatePlayerTagsSuccessResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_update_subscription_request_body.go b/model_update_subscription_request_body.go deleted file mode 100644 index 065464b..0000000 --- a/model_update_subscription_request_body.go +++ /dev/null @@ -1,141 +0,0 @@ -/* -OneSignal - -A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com - -API version: 1.4.0 -Contact: devrel@onesignal.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onesignal - -import ( - "encoding/json" -) - -// UpdateSubscriptionRequestBody struct for UpdateSubscriptionRequestBody -type UpdateSubscriptionRequestBody struct { - Subscription *SubscriptionObject `json:"subscription,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _UpdateSubscriptionRequestBody UpdateSubscriptionRequestBody - -// NewUpdateSubscriptionRequestBody instantiates a new UpdateSubscriptionRequestBody object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewUpdateSubscriptionRequestBody() *UpdateSubscriptionRequestBody { - this := UpdateSubscriptionRequestBody{} - return &this -} - -// NewUpdateSubscriptionRequestBodyWithDefaults instantiates a new UpdateSubscriptionRequestBody object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewUpdateSubscriptionRequestBodyWithDefaults() *UpdateSubscriptionRequestBody { - this := UpdateSubscriptionRequestBody{} - return &this -} - -// GetSubscription returns the Subscription field value if set, zero value otherwise. -func (o *UpdateSubscriptionRequestBody) GetSubscription() SubscriptionObject { - if o == nil || o.Subscription == nil { - var ret SubscriptionObject - return ret - } - return *o.Subscription -} - -// GetSubscriptionOk returns a tuple with the Subscription field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateSubscriptionRequestBody) GetSubscriptionOk() (*SubscriptionObject, bool) { - if o == nil || o.Subscription == nil { - return nil, false - } - return o.Subscription, true -} - -// HasSubscription returns a boolean if a field has been set. -func (o *UpdateSubscriptionRequestBody) HasSubscription() bool { - if o != nil && o.Subscription != nil { - return true - } - - return false -} - -// SetSubscription gets a reference to the given SubscriptionObject and assigns it to the Subscription field. -func (o *UpdateSubscriptionRequestBody) SetSubscription(v SubscriptionObject) { - o.Subscription = &v -} - -func (o UpdateSubscriptionRequestBody) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Subscription != nil { - toSerialize["subscription"] = o.Subscription - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return json.Marshal(toSerialize) -} - -func (o *UpdateSubscriptionRequestBody) UnmarshalJSON(bytes []byte) (err error) { - varUpdateSubscriptionRequestBody := _UpdateSubscriptionRequestBody{} - - if err = json.Unmarshal(bytes, &varUpdateSubscriptionRequestBody); err == nil { - *o = UpdateSubscriptionRequestBody(varUpdateSubscriptionRequestBody) - } - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { - delete(additionalProperties, "subscription") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableUpdateSubscriptionRequestBody struct { - value *UpdateSubscriptionRequestBody - isSet bool -} - -func (v NullableUpdateSubscriptionRequestBody) Get() *UpdateSubscriptionRequestBody { - return v.value -} - -func (v *NullableUpdateSubscriptionRequestBody) Set(val *UpdateSubscriptionRequestBody) { - v.value = val - v.isSet = true -} - -func (v NullableUpdateSubscriptionRequestBody) IsSet() bool { - return v.isSet -} - -func (v *NullableUpdateSubscriptionRequestBody) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableUpdateSubscriptionRequestBody(val *UpdateSubscriptionRequestBody) *NullableUpdateSubscriptionRequestBody { - return &NullableUpdateSubscriptionRequestBody{value: val, isSet: true} -} - -func (v NullableUpdateSubscriptionRequestBody) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableUpdateSubscriptionRequestBody) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_update_user_request.go b/model_update_user_request.go index 993a08b..613fa21 100644 --- a/model_update_user_request.go +++ b/model_update_user_request.go @@ -3,7 +3,7 @@ OneSignal A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com -API version: 1.4.0 +API version: 5.0.1 Contact: devrel@onesignal.com */ diff --git a/model_user.go b/model_user.go index 230b825..80c5ae0 100644 --- a/model_user.go +++ b/model_user.go @@ -3,7 +3,7 @@ OneSignal A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com -API version: 1.4.0 +API version: 5.0.1 Contact: devrel@onesignal.com */ @@ -18,9 +18,8 @@ import ( // User struct for User type User struct { Properties *PropertiesObject `json:"properties,omitempty"` - Identity map[string]interface{} `json:"identity,omitempty"` - Subscriptions []SubscriptionObject `json:"subscriptions,omitempty"` - SubscriptionOptions *UserSubscriptionOptions `json:"subscription_options,omitempty"` + Identity *map[string]string `json:"identity,omitempty"` + Subscriptions []Subscription `json:"subscriptions,omitempty"` AdditionalProperties map[string]interface{} } @@ -76,17 +75,17 @@ func (o *User) SetProperties(v PropertiesObject) { } // GetIdentity returns the Identity field value if set, zero value otherwise. -func (o *User) GetIdentity() map[string]interface{} { +func (o *User) GetIdentity() map[string]string { if o == nil || o.Identity == nil { - var ret map[string]interface{} + var ret map[string]string return ret } - return o.Identity + return *o.Identity } // GetIdentityOk returns a tuple with the Identity field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *User) GetIdentityOk() (map[string]interface{}, bool) { +func (o *User) GetIdentityOk() (*map[string]string, bool) { if o == nil || o.Identity == nil { return nil, false } @@ -102,15 +101,15 @@ func (o *User) HasIdentity() bool { return false } -// SetIdentity gets a reference to the given map[string]interface{} and assigns it to the Identity field. -func (o *User) SetIdentity(v map[string]interface{}) { - o.Identity = v +// SetIdentity gets a reference to the given map[string]string and assigns it to the Identity field. +func (o *User) SetIdentity(v map[string]string) { + o.Identity = &v } // GetSubscriptions returns the Subscriptions field value if set, zero value otherwise. -func (o *User) GetSubscriptions() []SubscriptionObject { +func (o *User) GetSubscriptions() []Subscription { if o == nil || o.Subscriptions == nil { - var ret []SubscriptionObject + var ret []Subscription return ret } return o.Subscriptions @@ -118,7 +117,7 @@ func (o *User) GetSubscriptions() []SubscriptionObject { // GetSubscriptionsOk returns a tuple with the Subscriptions field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *User) GetSubscriptionsOk() ([]SubscriptionObject, bool) { +func (o *User) GetSubscriptionsOk() ([]Subscription, bool) { if o == nil || o.Subscriptions == nil { return nil, false } @@ -134,43 +133,11 @@ func (o *User) HasSubscriptions() bool { return false } -// SetSubscriptions gets a reference to the given []SubscriptionObject and assigns it to the Subscriptions field. -func (o *User) SetSubscriptions(v []SubscriptionObject) { +// SetSubscriptions gets a reference to the given []Subscription and assigns it to the Subscriptions field. +func (o *User) SetSubscriptions(v []Subscription) { o.Subscriptions = v } -// GetSubscriptionOptions returns the SubscriptionOptions field value if set, zero value otherwise. -func (o *User) GetSubscriptionOptions() UserSubscriptionOptions { - if o == nil || o.SubscriptionOptions == nil { - var ret UserSubscriptionOptions - return ret - } - return *o.SubscriptionOptions -} - -// GetSubscriptionOptionsOk returns a tuple with the SubscriptionOptions field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *User) GetSubscriptionOptionsOk() (*UserSubscriptionOptions, bool) { - if o == nil || o.SubscriptionOptions == nil { - return nil, false - } - return o.SubscriptionOptions, true -} - -// HasSubscriptionOptions returns a boolean if a field has been set. -func (o *User) HasSubscriptionOptions() bool { - if o != nil && o.SubscriptionOptions != nil { - return true - } - - return false -} - -// SetSubscriptionOptions gets a reference to the given UserSubscriptionOptions and assigns it to the SubscriptionOptions field. -func (o *User) SetSubscriptionOptions(v UserSubscriptionOptions) { - o.SubscriptionOptions = &v -} - func (o User) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Properties != nil { @@ -182,9 +149,6 @@ func (o User) MarshalJSON() ([]byte, error) { if o.Subscriptions != nil { toSerialize["subscriptions"] = o.Subscriptions } - if o.SubscriptionOptions != nil { - toSerialize["subscription_options"] = o.SubscriptionOptions - } for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -206,7 +170,6 @@ func (o *User) UnmarshalJSON(bytes []byte) (err error) { delete(additionalProperties, "properties") delete(additionalProperties, "identity") delete(additionalProperties, "subscriptions") - delete(additionalProperties, "subscription_options") o.AdditionalProperties = additionalProperties } diff --git a/model_inline_response_200.go b/model_user_identity_body.go similarity index 51% rename from model_inline_response_200.go rename to model_user_identity_body.go index a039108..2aa8585 100644 --- a/model_inline_response_200.go +++ b/model_user_identity_body.go @@ -3,7 +3,7 @@ OneSignal A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com -API version: 1.4.0 +API version: 5.0.1 Contact: devrel@onesignal.com */ @@ -15,43 +15,43 @@ import ( "encoding/json" ) -// InlineResponse200 struct for InlineResponse200 -type InlineResponse200 struct { - Identity map[string]interface{} `json:"identity,omitempty"` +// UserIdentityBody struct for UserIdentityBody +type UserIdentityBody struct { + Identity *map[string]string `json:"identity,omitempty"` AdditionalProperties map[string]interface{} } -type _InlineResponse200 InlineResponse200 +type _UserIdentityBody UserIdentityBody -// NewInlineResponse200 instantiates a new InlineResponse200 object +// NewUserIdentityBody instantiates a new UserIdentityBody object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewInlineResponse200() *InlineResponse200 { - this := InlineResponse200{} +func NewUserIdentityBody() *UserIdentityBody { + this := UserIdentityBody{} return &this } -// NewInlineResponse200WithDefaults instantiates a new InlineResponse200 object +// NewUserIdentityBodyWithDefaults instantiates a new UserIdentityBody object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set -func NewInlineResponse200WithDefaults() *InlineResponse200 { - this := InlineResponse200{} +func NewUserIdentityBodyWithDefaults() *UserIdentityBody { + this := UserIdentityBody{} return &this } // GetIdentity returns the Identity field value if set, zero value otherwise. -func (o *InlineResponse200) GetIdentity() map[string]interface{} { +func (o *UserIdentityBody) GetIdentity() map[string]string { if o == nil || o.Identity == nil { - var ret map[string]interface{} + var ret map[string]string return ret } - return o.Identity + return *o.Identity } // GetIdentityOk returns a tuple with the Identity field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *InlineResponse200) GetIdentityOk() (map[string]interface{}, bool) { +func (o *UserIdentityBody) GetIdentityOk() (*map[string]string, bool) { if o == nil || o.Identity == nil { return nil, false } @@ -59,7 +59,7 @@ func (o *InlineResponse200) GetIdentityOk() (map[string]interface{}, bool) { } // HasIdentity returns a boolean if a field has been set. -func (o *InlineResponse200) HasIdentity() bool { +func (o *UserIdentityBody) HasIdentity() bool { if o != nil && o.Identity != nil { return true } @@ -67,12 +67,12 @@ func (o *InlineResponse200) HasIdentity() bool { return false } -// SetIdentity gets a reference to the given map[string]interface{} and assigns it to the Identity field. -func (o *InlineResponse200) SetIdentity(v map[string]interface{}) { - o.Identity = v +// SetIdentity gets a reference to the given map[string]string and assigns it to the Identity field. +func (o *UserIdentityBody) SetIdentity(v map[string]string) { + o.Identity = &v } -func (o InlineResponse200) MarshalJSON() ([]byte, error) { +func (o UserIdentityBody) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Identity != nil { toSerialize["identity"] = o.Identity @@ -85,11 +85,11 @@ func (o InlineResponse200) MarshalJSON() ([]byte, error) { return json.Marshal(toSerialize) } -func (o *InlineResponse200) UnmarshalJSON(bytes []byte) (err error) { - varInlineResponse200 := _InlineResponse200{} +func (o *UserIdentityBody) UnmarshalJSON(bytes []byte) (err error) { + varUserIdentityBody := _UserIdentityBody{} - if err = json.Unmarshal(bytes, &varInlineResponse200); err == nil { - *o = InlineResponse200(varInlineResponse200) + if err = json.Unmarshal(bytes, &varUserIdentityBody); err == nil { + *o = UserIdentityBody(varUserIdentityBody) } additionalProperties := make(map[string]interface{}) @@ -102,38 +102,38 @@ func (o *InlineResponse200) UnmarshalJSON(bytes []byte) (err error) { return err } -type NullableInlineResponse200 struct { - value *InlineResponse200 +type NullableUserIdentityBody struct { + value *UserIdentityBody isSet bool } -func (v NullableInlineResponse200) Get() *InlineResponse200 { +func (v NullableUserIdentityBody) Get() *UserIdentityBody { return v.value } -func (v *NullableInlineResponse200) Set(val *InlineResponse200) { +func (v *NullableUserIdentityBody) Set(val *UserIdentityBody) { v.value = val v.isSet = true } -func (v NullableInlineResponse200) IsSet() bool { +func (v NullableUserIdentityBody) IsSet() bool { return v.isSet } -func (v *NullableInlineResponse200) Unset() { +func (v *NullableUserIdentityBody) Unset() { v.value = nil v.isSet = false } -func NewNullableInlineResponse200(val *InlineResponse200) *NullableInlineResponse200 { - return &NullableInlineResponse200{value: val, isSet: true} +func NewNullableUserIdentityBody(val *UserIdentityBody) *NullableUserIdentityBody { + return &NullableUserIdentityBody{value: val, isSet: true} } -func (v NullableInlineResponse200) MarshalJSON() ([]byte, error) { +func (v NullableUserIdentityBody) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } -func (v *NullableInlineResponse200) UnmarshalJSON(src []byte) error { +func (v *NullableUserIdentityBody) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } diff --git a/model_user_identity_request_body.go b/model_user_identity_request_body.go deleted file mode 100644 index f558323..0000000 --- a/model_user_identity_request_body.go +++ /dev/null @@ -1,141 +0,0 @@ -/* -OneSignal - -A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com - -API version: 1.4.0 -Contact: devrel@onesignal.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onesignal - -import ( - "encoding/json" -) - -// UserIdentityRequestBody struct for UserIdentityRequestBody -type UserIdentityRequestBody struct { - Identity map[string]interface{} `json:"identity,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _UserIdentityRequestBody UserIdentityRequestBody - -// NewUserIdentityRequestBody instantiates a new UserIdentityRequestBody object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewUserIdentityRequestBody() *UserIdentityRequestBody { - this := UserIdentityRequestBody{} - return &this -} - -// NewUserIdentityRequestBodyWithDefaults instantiates a new UserIdentityRequestBody object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewUserIdentityRequestBodyWithDefaults() *UserIdentityRequestBody { - this := UserIdentityRequestBody{} - return &this -} - -// GetIdentity returns the Identity field value if set, zero value otherwise. -func (o *UserIdentityRequestBody) GetIdentity() map[string]interface{} { - if o == nil || o.Identity == nil { - var ret map[string]interface{} - return ret - } - return o.Identity -} - -// GetIdentityOk returns a tuple with the Identity field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UserIdentityRequestBody) GetIdentityOk() (map[string]interface{}, bool) { - if o == nil || o.Identity == nil { - return nil, false - } - return o.Identity, true -} - -// HasIdentity returns a boolean if a field has been set. -func (o *UserIdentityRequestBody) HasIdentity() bool { - if o != nil && o.Identity != nil { - return true - } - - return false -} - -// SetIdentity gets a reference to the given map[string]interface{} and assigns it to the Identity field. -func (o *UserIdentityRequestBody) SetIdentity(v map[string]interface{}) { - o.Identity = v -} - -func (o UserIdentityRequestBody) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Identity != nil { - toSerialize["identity"] = o.Identity - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return json.Marshal(toSerialize) -} - -func (o *UserIdentityRequestBody) UnmarshalJSON(bytes []byte) (err error) { - varUserIdentityRequestBody := _UserIdentityRequestBody{} - - if err = json.Unmarshal(bytes, &varUserIdentityRequestBody); err == nil { - *o = UserIdentityRequestBody(varUserIdentityRequestBody) - } - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { - delete(additionalProperties, "identity") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableUserIdentityRequestBody struct { - value *UserIdentityRequestBody - isSet bool -} - -func (v NullableUserIdentityRequestBody) Get() *UserIdentityRequestBody { - return v.value -} - -func (v *NullableUserIdentityRequestBody) Set(val *UserIdentityRequestBody) { - v.value = val - v.isSet = true -} - -func (v NullableUserIdentityRequestBody) IsSet() bool { - return v.isSet -} - -func (v *NullableUserIdentityRequestBody) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableUserIdentityRequestBody(val *UserIdentityRequestBody) *NullableUserIdentityRequestBody { - return &NullableUserIdentityRequestBody{value: val, isSet: true} -} - -func (v NullableUserIdentityRequestBody) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableUserIdentityRequestBody) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_user_identity_response.go b/model_user_identity_response.go deleted file mode 100644 index f811b63..0000000 --- a/model_user_identity_response.go +++ /dev/null @@ -1,141 +0,0 @@ -/* -OneSignal - -A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com - -API version: 1.4.0 -Contact: devrel@onesignal.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onesignal - -import ( - "encoding/json" -) - -// UserIdentityResponse struct for UserIdentityResponse -type UserIdentityResponse struct { - Identity map[string]interface{} `json:"identity,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _UserIdentityResponse UserIdentityResponse - -// NewUserIdentityResponse instantiates a new UserIdentityResponse object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewUserIdentityResponse() *UserIdentityResponse { - this := UserIdentityResponse{} - return &this -} - -// NewUserIdentityResponseWithDefaults instantiates a new UserIdentityResponse object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewUserIdentityResponseWithDefaults() *UserIdentityResponse { - this := UserIdentityResponse{} - return &this -} - -// GetIdentity returns the Identity field value if set, zero value otherwise. -func (o *UserIdentityResponse) GetIdentity() map[string]interface{} { - if o == nil || o.Identity == nil { - var ret map[string]interface{} - return ret - } - return o.Identity -} - -// GetIdentityOk returns a tuple with the Identity field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UserIdentityResponse) GetIdentityOk() (map[string]interface{}, bool) { - if o == nil || o.Identity == nil { - return nil, false - } - return o.Identity, true -} - -// HasIdentity returns a boolean if a field has been set. -func (o *UserIdentityResponse) HasIdentity() bool { - if o != nil && o.Identity != nil { - return true - } - - return false -} - -// SetIdentity gets a reference to the given map[string]interface{} and assigns it to the Identity field. -func (o *UserIdentityResponse) SetIdentity(v map[string]interface{}) { - o.Identity = v -} - -func (o UserIdentityResponse) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Identity != nil { - toSerialize["identity"] = o.Identity - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return json.Marshal(toSerialize) -} - -func (o *UserIdentityResponse) UnmarshalJSON(bytes []byte) (err error) { - varUserIdentityResponse := _UserIdentityResponse{} - - if err = json.Unmarshal(bytes, &varUserIdentityResponse); err == nil { - *o = UserIdentityResponse(varUserIdentityResponse) - } - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { - delete(additionalProperties, "identity") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableUserIdentityResponse struct { - value *UserIdentityResponse - isSet bool -} - -func (v NullableUserIdentityResponse) Get() *UserIdentityResponse { - return v.value -} - -func (v *NullableUserIdentityResponse) Set(val *UserIdentityResponse) { - v.value = val - v.isSet = true -} - -func (v NullableUserIdentityResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableUserIdentityResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableUserIdentityResponse(val *UserIdentityResponse) *NullableUserIdentityResponse { - return &NullableUserIdentityResponse{value: val, isSet: true} -} - -func (v NullableUserIdentityResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableUserIdentityResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_user_subscription_options.go b/model_user_subscription_options.go deleted file mode 100644 index 12db284..0000000 --- a/model_user_subscription_options.go +++ /dev/null @@ -1,141 +0,0 @@ -/* -OneSignal - -A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com - -API version: 1.4.0 -Contact: devrel@onesignal.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onesignal - -import ( - "encoding/json" -) - -// UserSubscriptionOptions struct for UserSubscriptionOptions -type UserSubscriptionOptions struct { - RetainPreviousOwner *bool `json:"retain_previous_owner,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _UserSubscriptionOptions UserSubscriptionOptions - -// NewUserSubscriptionOptions instantiates a new UserSubscriptionOptions object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewUserSubscriptionOptions() *UserSubscriptionOptions { - this := UserSubscriptionOptions{} - return &this -} - -// NewUserSubscriptionOptionsWithDefaults instantiates a new UserSubscriptionOptions object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewUserSubscriptionOptionsWithDefaults() *UserSubscriptionOptions { - this := UserSubscriptionOptions{} - return &this -} - -// GetRetainPreviousOwner returns the RetainPreviousOwner field value if set, zero value otherwise. -func (o *UserSubscriptionOptions) GetRetainPreviousOwner() bool { - if o == nil || o.RetainPreviousOwner == nil { - var ret bool - return ret - } - return *o.RetainPreviousOwner -} - -// GetRetainPreviousOwnerOk returns a tuple with the RetainPreviousOwner field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UserSubscriptionOptions) GetRetainPreviousOwnerOk() (*bool, bool) { - if o == nil || o.RetainPreviousOwner == nil { - return nil, false - } - return o.RetainPreviousOwner, true -} - -// HasRetainPreviousOwner returns a boolean if a field has been set. -func (o *UserSubscriptionOptions) HasRetainPreviousOwner() bool { - if o != nil && o.RetainPreviousOwner != nil { - return true - } - - return false -} - -// SetRetainPreviousOwner gets a reference to the given bool and assigns it to the RetainPreviousOwner field. -func (o *UserSubscriptionOptions) SetRetainPreviousOwner(v bool) { - o.RetainPreviousOwner = &v -} - -func (o UserSubscriptionOptions) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.RetainPreviousOwner != nil { - toSerialize["retain_previous_owner"] = o.RetainPreviousOwner - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return json.Marshal(toSerialize) -} - -func (o *UserSubscriptionOptions) UnmarshalJSON(bytes []byte) (err error) { - varUserSubscriptionOptions := _UserSubscriptionOptions{} - - if err = json.Unmarshal(bytes, &varUserSubscriptionOptions); err == nil { - *o = UserSubscriptionOptions(varUserSubscriptionOptions) - } - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { - delete(additionalProperties, "retain_previous_owner") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableUserSubscriptionOptions struct { - value *UserSubscriptionOptions - isSet bool -} - -func (v NullableUserSubscriptionOptions) Get() *UserSubscriptionOptions { - return v.value -} - -func (v *NullableUserSubscriptionOptions) Set(val *UserSubscriptionOptions) { - v.value = val - v.isSet = true -} - -func (v NullableUserSubscriptionOptions) IsSet() bool { - return v.isSet -} - -func (v *NullableUserSubscriptionOptions) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableUserSubscriptionOptions(val *UserSubscriptionOptions) *NullableUserSubscriptionOptions { - return &NullableUserSubscriptionOptions{value: val, isSet: true} -} - -func (v NullableUserSubscriptionOptions) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableUserSubscriptionOptions) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_web_button.go b/model_web_button.go new file mode 100644 index 0000000..cbd2ae5 --- /dev/null +++ b/model_web_button.go @@ -0,0 +1,245 @@ +/* +OneSignal + +A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com + +API version: 5.0.1 +Contact: devrel@onesignal.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onesignal + +import ( + "encoding/json" +) + +// WebButton struct for WebButton +type WebButton struct { + Id string `json:"id"` + Text *string `json:"text,omitempty"` + Icon *string `json:"icon,omitempty"` + Url *string `json:"url,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _WebButton WebButton + +// NewWebButton instantiates a new WebButton object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewWebButton(id string) *WebButton { + this := WebButton{} + this.Id = id + return &this +} + +// NewWebButtonWithDefaults instantiates a new WebButton object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewWebButtonWithDefaults() *WebButton { + this := WebButton{} + return &this +} + +// GetId returns the Id field value +func (o *WebButton) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *WebButton) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *WebButton) SetId(v string) { + o.Id = v +} + +// GetText returns the Text field value if set, zero value otherwise. +func (o *WebButton) GetText() string { + if o == nil || o.Text == nil { + var ret string + return ret + } + return *o.Text +} + +// GetTextOk returns a tuple with the Text field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WebButton) GetTextOk() (*string, bool) { + if o == nil || o.Text == nil { + return nil, false + } + return o.Text, true +} + +// HasText returns a boolean if a field has been set. +func (o *WebButton) HasText() bool { + if o != nil && o.Text != nil { + return true + } + + return false +} + +// SetText gets a reference to the given string and assigns it to the Text field. +func (o *WebButton) SetText(v string) { + o.Text = &v +} + +// GetIcon returns the Icon field value if set, zero value otherwise. +func (o *WebButton) GetIcon() string { + if o == nil || o.Icon == nil { + var ret string + return ret + } + return *o.Icon +} + +// GetIconOk returns a tuple with the Icon field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WebButton) GetIconOk() (*string, bool) { + if o == nil || o.Icon == nil { + return nil, false + } + return o.Icon, true +} + +// HasIcon returns a boolean if a field has been set. +func (o *WebButton) HasIcon() bool { + if o != nil && o.Icon != nil { + return true + } + + return false +} + +// SetIcon gets a reference to the given string and assigns it to the Icon field. +func (o *WebButton) SetIcon(v string) { + o.Icon = &v +} + +// GetUrl returns the Url field value if set, zero value otherwise. +func (o *WebButton) GetUrl() string { + if o == nil || o.Url == nil { + var ret string + return ret + } + return *o.Url +} + +// GetUrlOk returns a tuple with the Url field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WebButton) GetUrlOk() (*string, bool) { + if o == nil || o.Url == nil { + return nil, false + } + return o.Url, true +} + +// HasUrl returns a boolean if a field has been set. +func (o *WebButton) HasUrl() bool { + if o != nil && o.Url != nil { + return true + } + + return false +} + +// SetUrl gets a reference to the given string and assigns it to the Url field. +func (o *WebButton) SetUrl(v string) { + o.Url = &v +} + +func (o WebButton) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["id"] = o.Id + } + if o.Text != nil { + toSerialize["text"] = o.Text + } + if o.Icon != nil { + toSerialize["icon"] = o.Icon + } + if o.Url != nil { + toSerialize["url"] = o.Url + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return json.Marshal(toSerialize) +} + +func (o *WebButton) UnmarshalJSON(bytes []byte) (err error) { + varWebButton := _WebButton{} + + if err = json.Unmarshal(bytes, &varWebButton); err == nil { + *o = WebButton(varWebButton) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "id") + delete(additionalProperties, "text") + delete(additionalProperties, "icon") + delete(additionalProperties, "url") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableWebButton struct { + value *WebButton + isSet bool +} + +func (v NullableWebButton) Get() *WebButton { + return v.value +} + +func (v *NullableWebButton) Set(val *WebButton) { + v.value = val + v.isSet = true +} + +func (v NullableWebButton) IsSet() bool { + return v.isSet +} + +func (v *NullableWebButton) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWebButton(val *WebButton) *NullableWebButton { + return &NullableWebButton{value: val, isSet: true} +} + +func (v NullableWebButton) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWebButton) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/response.go b/response.go index d932184..7392fd2 100644 --- a/response.go +++ b/response.go @@ -3,7 +3,7 @@ OneSignal A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com -API version: 1.4.0 +API version: 5.0.1 Contact: devrel@onesignal.com */ diff --git a/utils.go b/utils.go index 353d27e..058de20 100644 --- a/utils.go +++ b/utils.go @@ -3,7 +3,7 @@ OneSignal A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com -API version: 1.4.0 +API version: 5.0.1 Contact: devrel@onesignal.com */