From cb05ab727b25e82b28fd8abea64d63e474fc6a26 Mon Sep 17 00:00:00 2001 From: github-actions Date: Tue, 29 Oct 2024 16:09:53 +0000 Subject: [PATCH 1/3] feat: Update OpenAPI file replicated from Notehub commit b6b7f65 --- openapi.yaml | 477 +++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 347 insertions(+), 130 deletions(-) diff --git a/openapi.yaml b/openapi.yaml index b65aa9d..5df06b9 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -3,7 +3,7 @@ openapi: "3.0.3" info: title: Notehub API - version: 1.1.0 + version: 1.2.0 description: | The OpenAPI definition for the Notehub.io API. contact: @@ -155,7 +155,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Route" + $ref: "#/components/schemas/NotehubRoute" example: > { "label": "Route Label", @@ -172,7 +172,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Route" + $ref: "#/components/schemas/NotehubRoute" example: { "uid": "route:8d65a087d5d290ce5bdf03aeff2becc0", @@ -211,7 +211,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Route" + $ref: "#/components/schemas/NotehubRoute" example: { "uid": "route:8d65a087d5d290ce5bdf03aeff2becc0", @@ -248,7 +248,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Route" + $ref: "#/components/schemas/NotehubRoute" example: > { "http" { @@ -268,7 +268,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Route" + $ref: "#/components/schemas/NotehubRoute" example: > { "uid": "route:8d65a087d5d290ce5bdf03aeff2becc0", @@ -1182,6 +1182,7 @@ paths: - $ref: "#/components/parameters/sortOrderParam" - $ref: "#/components/parameters/startDateParam" - $ref: "#/components/parameters/endDateParam" + - $ref: "#/components/parameters/dateTypeParam" - $ref: "#/components/parameters/systemFilesOnlyParam" - $ref: "#/components/parameters/filesQueryParam" - $ref: "#/components/parameters/formatParam" @@ -1275,11 +1276,11 @@ paths: - $ref: "#/components/parameters/sortOrderParam" - $ref: "#/components/parameters/startDateParam" - $ref: "#/components/parameters/endDateParam" + - $ref: "#/components/parameters/dateTypeParam" - $ref: "#/components/parameters/systemFilesOnlyParam" - $ref: "#/components/parameters/filesQueryParam" - $ref: "#/components/parameters/formatParam" - $ref: "#/components/parameters/serialNumberFilterParam" - - $ref: "#/components/parameters/fleetUIDFilterQueryParam" - $ref: "#/components/parameters/sessionUIDFilterParam" - $ref: "#/components/parameters/eventUIDFilterQueryParam" - $ref: "#/components/parameters/selectFieldsParam" @@ -2083,59 +2084,144 @@ paths: default: $ref: "#/components/responses/ErrorResponse" - /v1/projects/{projectUID}/ota/status: + /v1/projects/{projectUID}/devices/{deviceUID}/dfu/{firmwareType}/history: get: tags: ["project"] - operationId: getProjectOTAStatus - description: Get Project OTA Status + operationId: getDeviceDfuHistory + description: Get device DFU history for host or Notecard firmware security: - api_key: [] parameters: - $ref: "#/components/parameters/projectUIDParam" - - $ref: "#/components/parameters/deviceUIDsParamQuery" - - $ref: "#/components/parameters/fleetUIDsParam" - - $ref: "#/components/parameters/deviceTagsParam" + - $ref: "#/components/parameters/deviceUIDParam" + - $ref: "#/components/parameters/firmwareTypeParam" + responses: + 200: + description: Success + content: + application/json: + schema: + $ref: "#/components/schemas/DeviceDfuHistory" + default: + $ref: "#/components/responses/ErrorResponse" + + /v1/projects/{projectUID}/devices/{deviceUID}/dfu/{firmwareType}/status: + get: + tags: ["project"] + operationId: getDeviceDfuStatus + description: Get device DFU history for host or Notecard firmware + security: + - api_key: [] + parameters: + - $ref: "#/components/parameters/projectUIDParam" + - $ref: "#/components/parameters/deviceUIDParam" + - $ref: "#/components/parameters/firmwareTypeParam" + responses: + 200: + description: Success + content: + application/json: + schema: + $ref: "#/components/schemas/DeviceDfuStatus" + default: + $ref: "#/components/responses/ErrorResponse" + + /v1/projects/{projectUID}/dfu/{firmwareType}/history: + get: + tags: ["project"] + operationId: getDevicesDfuHistory + description: Get host or Notecard DFU history for all devices that match the filter criteria + security: + - api_key: [] + parameters: + - $ref: "#/components/parameters/projectUIDParam" + - $ref: "#/components/parameters/firmwareTypeParam" - $ref: "#/components/parameters/pageSizeParam" - $ref: "#/components/parameters/pageNumParam" + - $ref: "#/components/parameters/sortByParam" + - $ref: "#/components/parameters/sortOrderParam" + - $ref: "#/components/parameters/deviceUIDParamQuery" + - $ref: "#/components/parameters/tagParam" + - $ref: "#/components/parameters/serialNumberParam" + - $ref: "#/components/parameters/fleetUIDQueryParam" + - $ref: "#/components/parameters/notecardFirmwareParam" + - $ref: "#/components/parameters/locationParam" + - $ref: "#/components/parameters/hostFirmwareParam" + - $ref: "#/components/parameters/productUIDQueryParam" + - $ref: "#/components/parameters/skuParam" + responses: + 200: + description: Success + content: + application/json: + schema: + $ref: "#/components/schemas/DeviceDfuHistoryPage" + default: + $ref: "#/components/responses/ErrorResponse" + /v1/projects/{projectUID}/dfu/{firmwareType}/status: + get: + tags: ["project"] + operationId: getDevicesDfuStatus + description: Get host or Notecard DFU history for all devices that match the filter criteria + security: + - api_key: [] + parameters: + - $ref: "#/components/parameters/projectUIDParam" + - $ref: "#/components/parameters/firmwareTypeParam" + - $ref: "#/components/parameters/pageSizeParam" + - $ref: "#/components/parameters/pageNumParam" + - $ref: "#/components/parameters/sortByParam" + - $ref: "#/components/parameters/sortOrderParam" + - $ref: "#/components/parameters/deviceUIDParamQuery" + - $ref: "#/components/parameters/tagParam" + - $ref: "#/components/parameters/serialNumberParam" + - $ref: "#/components/parameters/fleetUIDQueryParam" + - $ref: "#/components/parameters/notecardFirmwareParam" + - $ref: "#/components/parameters/locationParam" + - $ref: "#/components/parameters/hostFirmwareParam" + - $ref: "#/components/parameters/productUIDQueryParam" + - $ref: "#/components/parameters/skuParam" responses: 200: description: Success content: application/json: schema: - type: array - items: - $ref: "#/components/schemas/OTAStatusList" + $ref: "#/components/schemas/DeviceDfuStatusPage" default: $ref: "#/components/responses/ErrorResponse" - /v1/projects/{projectUID}/ota/update: + /v1/projects/{projectUID}/dfu/{firmwareType}/{action}: post: tags: ["project"] - operationId: updateProjectFirmware - description: Update Project Firmware + operationId: dfuAction + description: Update/cancel host or notecard firmware updates security: - api_key: [] parameters: - $ref: "#/components/parameters/projectUIDParam" + - $ref: "#/components/parameters/firmwareTypeParam" + - $ref: "#/components/parameters/dfuActionParam" + - $ref: "#/components/parameters/deviceUIDParamQuery" + - $ref: "#/components/parameters/tagParam" + - $ref: "#/components/parameters/serialNumberParam" + - $ref: "#/components/parameters/fleetUIDQueryParam" + - $ref: "#/components/parameters/notecardFirmwareParam" + - $ref: "#/components/parameters/locationParam" + - $ref: "#/components/parameters/hostFirmwareParam" + - $ref: "#/components/parameters/productUIDQueryParam" + - $ref: "#/components/parameters/skuParam" requestBody: - description: Body or payload of firmware update - required: true + description: Which firmware in the case of an update action + required: false content: application/json: schema: - $ref: "#/components/schemas/OTAUpdateRequest" - + $ref: "#/components/schemas/DfuActionRequest" responses: 200: description: Success - content: - application/json: - schema: - type: array - items: - $ref: "#/components/schemas/OTAUpdateStatus" default: $ref: "#/components/responses/ErrorResponse" @@ -2214,6 +2300,26 @@ components: schema: type: string example: dev:000000000000000 + + firmwareTypeParam: + name: firmwareType + in: path + required: true + schema: + type: string + enum: + - host + - notecard + + dfuActionParam: + name: action + in: path + required: true + schema: + type: string + enum: + - update + - cancel notefileIDParam: name: notefileID @@ -2294,6 +2400,7 @@ components: schema: type: string enum: + - best_id - device_serial - device_uid - captured @@ -2301,6 +2408,7 @@ components: - device_location - tower_location - triangulated_location + - best_location default: captured sortOrderParam: @@ -2336,6 +2444,19 @@ components: # July 15th, 2022 example: 1657894210 + dateTypeParam: + name: dateType + in: query + required: false + description: Which date to filter on, either 'captured' or 'uploaded'. This will apply to the startDate and endDate parameters + schema: + type: string + default: captured + enum: + - captured + - uploaded + example: uploaded + cursorParam: name: cursor in: query @@ -2514,9 +2635,7 @@ components: style: form explode: true schema: - type: array - items: - type: string + type: string tagParam: name: tag @@ -3655,7 +3774,7 @@ components: note_sent: type: number - Route: + NotehubRoute: type: object properties: uid: @@ -4551,6 +4670,13 @@ components: source: type: string description: The UID of the source of the alert + monitor_type: + type: string + enum: [event, device] + description: The type of monitor that triggered the alert + field_name: + type: string + description: The field name that triggered the alert data: type: array items: @@ -4591,78 +4717,109 @@ components: recipients: type: string description: The recipients of the notification - OTAStatus: + + UserFirmwareInfo: type: object properties: - device_uid: + current_firmware: + $ref: '#/components/schemas/CurrentFirmware' + firmware_update: + $ref: '#/components/schemas/UserDfuStateMachine' + nullable: true + + UserDfuStateMachine: + type: object + properties: + status: + $ref: '#/components/schemas/UserDfuStateMachineStatus' + created: type: string - description: The device UID - tags: + format: date-time + nullable: true + from_version: type: string - description: The tags associated with the device - notecard_current_firmware: - $ref: "#/components/schemas/FirmwareStatus" - notecard_dfu_began_at: + metadata: + $ref: '#/components/schemas/UploadMetadata' + + + UserDfuStateMachineStatus: + type: object + properties: + phase: type: string - description: The time the Notecard DFU began - notecard_dfu_status: + phase_description: type: string - description: The status of the Notecard DFU - notecard_requested_firmware: - $ref: "#/components/schemas/FirmwareStatus" - notecard_requested_at: + date: type: string - description: The time the Notecard firmware was requested - notecard_requested_scope: + format: date-time + nullable: true + status: type: string - description: The scope of the Notecard firmware request - notecard_requested_show_details: - type: boolean - description: Whether to show details of the Notecard firmware request - notecard_requested_status: + + CurrentFirmware: + type: object + properties: + version: type: string - description: The status of the Notecard firmware request - host_current_firmware: - $ref: "#/components/schemas/FirmwareStatus" - host_dfu_began_at: + metadata: + $ref: '#/components/schemas/Firmware' + + UploadMetadata: + type: object + properties: + name: type: string - description: The time the host DFU began - host_dfu_status: + length: + type: integer + md5: type: string - description: The status of the host DFU - host_requested_firmware: - $ref: "#/components/schemas/FirmwareStatus" - host_requested_at: + crc32: + type: integer + created: + type: integer + modified: + type: integer + source: type: string - description: The time the host firmware was requested - host_requested_scope: + contains: type: string - description: The scope of the host firmware request - host_requested_show_details: - type: boolean - description: Whether to show details of the host firmware request - host_requested_status: + found: + type: string + type: type: string - description: The status of the host firmware request + tags: + type: string + notes: + type: string + firmware: + $ref: '#/components/schemas/Firmware' - FirmwareStatus: + Firmware: type: object properties: - version: + org: type: string - description: The version of the firmware - organization: + product: type: string - description: The organization that owns the firmware - description: + firmware: type: string - description: A description of the firmware - product: + version: + type: string + target: type: string - description: The product that the firmware is for + ver_major: + type: integer + ver_minor: + type: integer + ver_patch: + type: integer + ver_build: + type: integer built: type: string - description: The date the firmware was built + builder: + type: string + nullable: true SlackBearerNotification: type: object @@ -4707,73 +4864,133 @@ components: description: Email Address example: "example@blues.com" - OTAUpdateRequest: + DfuActionRequest: type: object properties: filename: type: string description: The name of the firmware file - device_uids: - type: array - items: - type: string - description: The device UIDs to update - fleet_uids: - type: array - items: - type: string - description: The fleet UIDs to update - device_tags: - type: array - items: - type: string - description: The device tags to update - version: - type: string - description: The version of the firmware - MD5: - type: string - description: The MD5 hash of the firmware file - type: - type: string - description: The type of firmware - product: - type: string - description: The product that the firmware is for - target: + + DeviceDfuStatus: + type: object + properties: + device_uid: type: string - description: The target device for the firmware - unpublished: - type: boolean - description: If true, the firmware is unpublished - cancel_dfu: + description: Device UID + dfu_in_progress: type: boolean - description: If true, the DFU is canceled + description: true if there is a DFU currently in progress + current: + type: object + description: Description of the current firmware + properties: + version: + type: string + description: Firmware version + organization: + type: string + description: Firmware organization + description: + type: string + description: Firmware description + product: + type: string + description: Firmware product + built: + type: string + description: Firmware build date + builder: + type: string + description: Firmware author + status: + $ref: "#/components/schemas/DeviceDfuStateMachine" - OTAUpdateStatus: + DeviceDfuStatusPage: type: object properties: - status: - type: string - description: The status of the OTA request - successful: + devices: type: array items: - type: string - description: The successful device UIDs - failed: + $ref: "#/components/schemas/DeviceDfuStatus" + has_more: + type: boolean + default: false + + DeviceDfuHistory: + type: object + properties: + device_uid: + type: string + description: Device UID + current: + type: object + description: Description of the current firmware + properties: + version: + type: string + description: Firmware version + organization: + type: string + description: Firmware organization + description: + type: string + description: Firmware description + product: + type: string + description: Firmware product + built: + type: string + description: Firmware build date + builder: + type: string + description: Firmware author + history: type: array items: - type: string - description: The failed device UIDs + $ref: "#/components/schemas/DeviceDfuStateMachine" - OTAStatusList: + DeviceDfuHistoryPage: type: object properties: devices: type: array items: - $ref: "#/components/schemas/OTAStatus" + $ref: "#/components/schemas/DeviceDfuHistory" has_more: type: boolean - description: Indicates whether more items are available + default: false + + DeviceDfuStateMachine: + type: object + description: Represents a single request to update the host or Notecard firmware + properties: + requested_version: + type: string + description: Version of the firmware that was requested to be installed + current_version: + type: string + description: Version of the firmware that was installed prior to this request + initiated: + type: string + description: RFC3339 datetime of when this update was requested + updates: + type: array + items: + $ref: "#/components/schemas/DeviceDfuStateMachineNode" + + DeviceDfuStateMachineNode: + type: object + description: Represents a single request to update the host or Notecard firmware + properties: + status: + type: string + description: Status for this step in the firmware update process + phase: + type: string + description: Phase for this step in the firmware update process + datetime: + type: string + description: RFC3339 compatible datetime of when this status update happened + description: + type: string + description: Additional information From 2424bce88e2f6403502a73f338e493df30634651 Mon Sep 17 00:00:00 2001 From: Paige Niedringhaus Date: Wed, 30 Oct 2024 16:08:11 -0400 Subject: [PATCH 2/3] deps: rebuild sdk library --- src/.openapi-generator/FILES | 151 +- src/README.md | 34 +- src/docs/Alert.md | 2 + src/docs/AlertApi.md | 4 +- src/docs/CurrentFirmware.md | 30 + src/docs/DeviceDfuHistory.md | 31 + src/docs/DeviceDfuHistoryPage.md | 30 + src/docs/DeviceDfuStateMachine.md | 33 + src/docs/DeviceDfuStateMachineNode.md | 33 + src/docs/DeviceDfuStatus.md | 32 + src/docs/DeviceDfuStatusCurrent.md | 35 + src/docs/DeviceDfuStatusPage.md | 30 + src/docs/DfuActionRequest.md | 29 + src/docs/EventApi.md | 16 +- src/docs/Firmware.md | 39 + src/docs/FirmwareStatus.md | 33 - src/docs/{Route.md => NotehubRoute.md} | 18 +- .../{RouteSchema.md => NotehubRouteSchema.md} | 16 +- src/docs/OTAStatus.md | 46 - src/docs/OTAStatusList.md | 30 - src/docs/OTAUpdateRequest.md | 39 - src/docs/OTAUpdateStatus.md | 31 - src/docs/ProjectApi.md | 705 ++-- src/docs/RouteApi.md | 34 +- src/docs/UploadMetadata.md | 41 + src/docs/UserDfuStateMachine.md | 32 + src/docs/UserDfuStateMachineStatus.md | 32 + src/docs/UserFirmwareInfo.md | 30 + src/notehub_py/__init__.py | 25 +- src/notehub_py/api/alert_api.py | 17 +- src/notehub_py/api/authorization_api.py | 2 +- src/notehub_py/api/billing_account_api.py | 2 +- src/notehub_py/api/device_api.py | 2 +- src/notehub_py/api/event_api.py | 61 +- src/notehub_py/api/monitor_api.py | 2 +- src/notehub_py/api/project_api.py | 2927 ++++++++++++----- src/notehub_py/api/route_api.py | 94 +- src/notehub_py/api_client.py | 2 +- src/notehub_py/configuration.py | 4 +- src/notehub_py/exceptions.py | 2 +- src/notehub_py/models/__init__.py | 25 +- src/notehub_py/models/alert.py | 18 +- src/notehub_py/models/alert_data_inner.py | 2 +- .../models/alert_notifications_inner.py | 2 +- src/notehub_py/models/aws.py | 2 +- src/notehub_py/models/azure.py | 2 +- src/notehub_py/models/billing_account.py | 2 +- src/notehub_py/models/billing_account_role.py | 2 +- src/notehub_py/models/body.py | 2 +- .../models/clone_project_request.py | 2 +- src/notehub_py/models/contact.py | 2 +- src/notehub_py/models/create_fleet_request.py | 2 +- src/notehub_py/models/create_monitor.py | 2 +- .../models/create_product_request.py | 2 +- .../models/create_project_request.py | 2 +- src/notehub_py/models/current_firmware.py | 99 + .../models/delete_device_fleets_request.py | 2 +- src/notehub_py/models/device.py | 2 +- src/notehub_py/models/device_dfu_history.py | 104 + .../models/device_dfu_history_page.py | 98 + .../models/device_dfu_state_machine.py | 102 + .../models/device_dfu_state_machine_node.py | 94 + src/notehub_py/models/device_dfu_status.py | 102 + ...status.py => device_dfu_status_current.py} | 26 +- ...atus_list.py => device_dfu_status_page.py} | 22 +- src/notehub_py/models/device_session.py | 2 +- src/notehub_py/models/device_tower_info.py | 2 +- src/notehub_py/models/device_usage.py | 2 +- ...update_status.py => dfu_action_request.py} | 20 +- src/notehub_py/models/dfu_env.py | 2 +- src/notehub_py/models/dfu_state.py | 2 +- src/notehub_py/models/email_notification.py | 2 +- .../models/environment_variables.py | 2 +- src/notehub_py/models/error.py | 2 +- src/notehub_py/models/event.py | 2 +- .../{ota_update_request.py => firmware.py} | 54 +- src/notehub_py/models/firmware_info.py | 2 +- src/notehub_py/models/fleet.py | 2 +- .../models/get_alerts200_response.py | 2 +- .../get_billing_accounts200_response.py | 2 +- ...evice_environment_variables200_response.py | 2 +- .../get_device_health_log200_response.py | 2 +- ...health_log200_response_health_log_inner.py | 2 +- .../models/get_device_latest200_response.py | 2 +- .../get_device_public_key200_response.py | 2 +- .../models/get_device_sessions200_response.py | 2 +- ..._project_device_public_keys200_response.py | 2 +- ...ys200_response_device_public_keys_inner.py | 2 +- .../models/get_project_devices200_response.py | 2 +- .../models/get_project_events200_response.py | 2 +- ...et_project_events_by_cursor200_response.py | 2 +- .../models/get_project_fleets200_response.py | 2 +- .../models/get_project_members200_response.py | 2 +- .../get_project_products200_response.py | 2 +- .../models/get_projects200_response.py | 2 +- ...t_route_logs_by_route200_response_inner.py | 2 +- src/notehub_py/models/google.py | 2 +- .../models/handle_note_changes200_response.py | 2 +- .../models/handle_note_get200_response.py | 2 +- .../models/handle_note_signal200_response.py | 2 +- .../handle_notefile_changes200_response.py | 2 +- ...le_notefile_changes_pending200_response.py | 2 +- .../models/handle_notefile_delete_request.py | 2 +- src/notehub_py/models/http.py | 2 +- src/notehub_py/models/http_filter.py | 2 +- src/notehub_py/models/http_transform.py | 2 +- src/notehub_py/models/location.py | 2 +- src/notehub_py/models/login200_response.py | 2 +- src/notehub_py/models/login_request.py | 2 +- src/notehub_py/models/monitor.py | 2 +- .../models/monitor_alert_routes_inner.py | 2 +- src/notehub_py/models/mqtt.py | 2 +- src/notehub_py/models/note.py | 2 +- .../models/{route.py => notehub_route.py} | 16 +- ...oute_schema.py => notehub_route_schema.py} | 18 +- src/notehub_py/models/ota_status.py | 135 - .../post_provision_project_device_request.py | 2 +- src/notehub_py/models/product.py | 2 +- src/notehub_py/models/project.py | 2 +- src/notehub_py/models/project_member.py | 2 +- src/notehub_py/models/proxy.py | 2 +- .../models/put_device_fleets_request.py | 2 +- src/notehub_py/models/radresponder.py | 2 +- src/notehub_py/models/role.py | 2 +- src/notehub_py/models/slack.py | 2 +- .../models/slack_bearer_notification.py | 2 +- .../models/slack_web_hook_notification.py | 2 +- src/notehub_py/models/snowflake.py | 2 +- src/notehub_py/models/snowflake_transform.py | 2 +- src/notehub_py/models/thingworx.py | 2 +- src/notehub_py/models/tower_location.py | 2 +- src/notehub_py/models/twilio.py | 2 +- src/notehub_py/models/update_fleet_request.py | 2 +- src/notehub_py/models/upload_metadata.py | 121 + src/notehub_py/models/user_db_route.py | 2 +- .../models/user_dfu_state_machine.py | 108 + .../models/user_dfu_state_machine_status.py | 100 + src/notehub_py/models/user_firmware_info.py | 98 + src/notehub_py/rest.py | 2 +- src/setup.py | 2 +- src/test/test_alert.py | 4 +- src/test/test_alert_api.py | 2 +- src/test/test_alert_data_inner.py | 2 +- src/test/test_alert_notifications_inner.py | 2 +- src/test/test_authorization_api.py | 2 +- src/test/test_aws.py | 2 +- src/test/test_azure.py | 2 +- src/test/test_billing_account.py | 2 +- src/test/test_billing_account_api.py | 2 +- src/test/test_billing_account_role.py | 2 +- src/test/test_body.py | 2 +- src/test/test_clone_project_request.py | 2 +- src/test/test_contact.py | 2 +- src/test/test_create_fleet_request.py | 2 +- src/test/test_create_monitor.py | 2 +- src/test/test_create_product_request.py | 2 +- src/test/test_create_project_request.py | 2 +- src/test/test_current_firmware.py | 64 + src/test/test_delete_device_fleets_request.py | 2 +- src/test/test_device.py | 2 +- src/test/test_device_api.py | 2 +- src/test/test_device_dfu_history.py | 72 + src/test/test_device_dfu_history_page.py | 76 + src/test/test_device_dfu_state_machine.py | 61 + .../test_device_dfu_state_machine_node.py | 55 + src/test/test_device_dfu_status.py | 71 + ...s.py => test_device_dfu_status_current.py} | 27 +- src/test/test_device_dfu_status_page.py | 74 + src/test/test_device_session.py | 2 +- src/test/test_device_tower_info.py | 2 +- src/test/test_device_usage.py | 2 +- ...e_status.py => test_dfu_action_request.py} | 32 +- src/test/test_dfu_env.py | 2 +- src/test/test_dfu_state.py | 2 +- src/test/test_email_notification.py | 2 +- src/test/test_environment_variables.py | 2 +- src/test/test_error.py | 2 +- src/test/test_event.py | 2 +- src/test/test_event_api.py | 2 +- src/test/test_firmware.py | 62 + src/test/test_firmware_info.py | 2 +- src/test/test_fleet.py | 2 +- src/test/test_get_alerts200_response.py | 6 +- .../test_get_billing_accounts200_response.py | 2 +- ...evice_environment_variables200_response.py | 2 +- .../test_get_device_health_log200_response.py | 2 +- ...health_log200_response_health_log_inner.py | 2 +- .../test_get_device_latest200_response.py | 2 +- .../test_get_device_public_key200_response.py | 2 +- .../test_get_device_sessions200_response.py | 2 +- ..._project_device_public_keys200_response.py | 2 +- ...ys200_response_device_public_keys_inner.py | 2 +- .../test_get_project_devices200_response.py | 2 +- .../test_get_project_events200_response.py | 2 +- ...et_project_events_by_cursor200_response.py | 2 +- .../test_get_project_fleets200_response.py | 2 +- .../test_get_project_members200_response.py | 2 +- .../test_get_project_products200_response.py | 2 +- src/test/test_get_projects200_response.py | 2 +- ...t_route_logs_by_route200_response_inner.py | 2 +- src/test/test_google.py | 2 +- .../test_handle_note_changes200_response.py | 2 +- src/test/test_handle_note_get200_response.py | 2 +- .../test_handle_note_signal200_response.py | 2 +- ...est_handle_notefile_changes200_response.py | 2 +- ...le_notefile_changes_pending200_response.py | 2 +- .../test_handle_notefile_delete_request.py | 2 +- src/test/test_http.py | 2 +- src/test/test_http_filter.py | 2 +- src/test/test_http_transform.py | 2 +- src/test/test_location.py | 2 +- src/test/test_login200_response.py | 2 +- src/test/test_login_request.py | 2 +- src/test/test_monitor.py | 2 +- src/test/test_monitor_alert_routes_inner.py | 2 +- src/test/test_monitor_api.py | 2 +- src/test/test_mqtt.py | 2 +- src/test/test_note.py | 2 +- .../{test_route.py => test_notehub_route.py} | 24 +- ...schema.py => test_notehub_route_schema.py} | 24 +- src/test/test_ota_status.py | 89 - src/test/test_ota_status_list.py | 83 - src/test/test_ota_update_request.py | 68 - ...t_post_provision_project_device_request.py | 2 +- src/test/test_product.py | 2 +- src/test/test_project.py | 2 +- src/test/test_project_api.py | 44 +- src/test/test_project_member.py | 2 +- src/test/test_proxy.py | 2 +- src/test/test_put_device_fleets_request.py | 2 +- src/test/test_radresponder.py | 2 +- src/test/test_role.py | 2 +- src/test/test_route_api.py | 2 +- src/test/test_slack.py | 2 +- src/test/test_slack_bearer_notification.py | 2 +- src/test/test_slack_web_hook_notification.py | 2 +- src/test/test_snowflake.py | 2 +- src/test/test_snowflake_transform.py | 2 +- src/test/test_thingworx.py | 2 +- src/test/test_tower_location.py | 2 +- src/test/test_twilio.py | 2 +- src/test/test_update_fleet_request.py | 2 +- src/test/test_upload_metadata.py | 74 + src/test/test_user_db_route.py | 2 +- src/test/test_user_dfu_state_machine.py | 81 + .../test_user_dfu_state_machine_status.py | 55 + src/test/test_user_firmware_info.py | 96 + 247 files changed, 5710 insertions(+), 1980 deletions(-) create mode 100644 src/docs/CurrentFirmware.md create mode 100644 src/docs/DeviceDfuHistory.md create mode 100644 src/docs/DeviceDfuHistoryPage.md create mode 100644 src/docs/DeviceDfuStateMachine.md create mode 100644 src/docs/DeviceDfuStateMachineNode.md create mode 100644 src/docs/DeviceDfuStatus.md create mode 100644 src/docs/DeviceDfuStatusCurrent.md create mode 100644 src/docs/DeviceDfuStatusPage.md create mode 100644 src/docs/DfuActionRequest.md create mode 100644 src/docs/Firmware.md delete mode 100644 src/docs/FirmwareStatus.md rename src/docs/{Route.md => NotehubRoute.md} (61%) rename src/docs/{RouteSchema.md => NotehubRouteSchema.md} (90%) delete mode 100644 src/docs/OTAStatus.md delete mode 100644 src/docs/OTAStatusList.md delete mode 100644 src/docs/OTAUpdateRequest.md delete mode 100644 src/docs/OTAUpdateStatus.md create mode 100644 src/docs/UploadMetadata.md create mode 100644 src/docs/UserDfuStateMachine.md create mode 100644 src/docs/UserDfuStateMachineStatus.md create mode 100644 src/docs/UserFirmwareInfo.md create mode 100644 src/notehub_py/models/current_firmware.py create mode 100644 src/notehub_py/models/device_dfu_history.py create mode 100644 src/notehub_py/models/device_dfu_history_page.py create mode 100644 src/notehub_py/models/device_dfu_state_machine.py create mode 100644 src/notehub_py/models/device_dfu_state_machine_node.py create mode 100644 src/notehub_py/models/device_dfu_status.py rename src/notehub_py/models/{firmware_status.py => device_dfu_status_current.py} (81%) rename src/notehub_py/models/{ota_status_list.py => device_dfu_status_page.py} (78%) rename src/notehub_py/models/{ota_update_status.py => dfu_action_request.py} (74%) rename src/notehub_py/models/{ota_update_request.py => firmware.py} (52%) rename src/notehub_py/models/{route.py => notehub_route.py} (89%) rename src/notehub_py/models/{route_schema.py => notehub_route_schema.py} (89%) delete mode 100644 src/notehub_py/models/ota_status.py create mode 100644 src/notehub_py/models/upload_metadata.py create mode 100644 src/notehub_py/models/user_dfu_state_machine.py create mode 100644 src/notehub_py/models/user_dfu_state_machine_status.py create mode 100644 src/notehub_py/models/user_firmware_info.py create mode 100644 src/test/test_current_firmware.py create mode 100644 src/test/test_device_dfu_history.py create mode 100644 src/test/test_device_dfu_history_page.py create mode 100644 src/test/test_device_dfu_state_machine.py create mode 100644 src/test/test_device_dfu_state_machine_node.py create mode 100644 src/test/test_device_dfu_status.py rename src/test/{test_firmware_status.py => test_device_dfu_status_current.py} (57%) create mode 100644 src/test/test_device_dfu_status_page.py rename src/test/{test_ota_update_status.py => test_dfu_action_request.py} (52%) create mode 100644 src/test/test_firmware.py rename src/test/{test_route.py => test_notehub_route.py} (66%) rename src/test/{test_route_schema.py => test_notehub_route_schema.py} (83%) delete mode 100644 src/test/test_ota_status.py delete mode 100644 src/test/test_ota_status_list.py delete mode 100644 src/test/test_ota_update_request.py create mode 100644 src/test/test_upload_metadata.py create mode 100644 src/test/test_user_dfu_state_machine.py create mode 100644 src/test/test_user_dfu_state_machine_status.py create mode 100644 src/test/test_user_firmware_info.py diff --git a/src/.openapi-generator/FILES b/src/.openapi-generator/FILES index 2340727..5b296fb 100644 --- a/src/.openapi-generator/FILES +++ b/src/.openapi-generator/FILES @@ -1,6 +1,7 @@ .github/workflows/python.yml .gitignore .gitlab-ci.yml +.openapi-generator-ignore .travis.yml README.md docs/Alert.md @@ -20,21 +21,30 @@ docs/CreateFleetRequest.md docs/CreateMonitor.md docs/CreateProductRequest.md docs/CreateProjectRequest.md +docs/CurrentFirmware.md docs/DFUEnv.md docs/DFUState.md docs/DeleteDeviceFleetsRequest.md docs/Device.md docs/DeviceApi.md +docs/DeviceDfuHistory.md +docs/DeviceDfuHistoryPage.md +docs/DeviceDfuStateMachine.md +docs/DeviceDfuStateMachineNode.md +docs/DeviceDfuStatus.md +docs/DeviceDfuStatusCurrent.md +docs/DeviceDfuStatusPage.md docs/DeviceSession.md docs/DeviceTowerInfo.md docs/DeviceUsage.md +docs/DfuActionRequest.md docs/EmailNotification.md docs/EnvironmentVariables.md docs/Error.md docs/Event.md docs/EventApi.md +docs/Firmware.md docs/FirmwareInfo.md -docs/FirmwareStatus.md docs/Fleet.md docs/GetAlerts200Response.md docs/GetBillingAccounts200Response.md @@ -72,10 +82,8 @@ docs/MonitorAlertRoutesInner.md docs/MonitorApi.md docs/Mqtt.md docs/Note.md -docs/OTAStatus.md -docs/OTAStatusList.md -docs/OTAUpdateRequest.md -docs/OTAUpdateStatus.md +docs/NotehubRoute.md +docs/NotehubRouteSchema.md docs/PostProvisionProjectDeviceRequest.md docs/Product.md docs/Project.md @@ -85,9 +93,7 @@ docs/Proxy.md docs/PutDeviceFleetsRequest.md docs/Radresponder.md docs/Role.md -docs/Route.md docs/RouteApi.md -docs/RouteSchema.md docs/Slack.md docs/SlackBearerNotification.md docs/SlackWebHookNotification.md @@ -97,7 +103,11 @@ docs/Thingworx.md docs/TowerLocation.md docs/Twilio.md docs/UpdateFleetRequest.md +docs/UploadMetadata.md docs/UserDbRoute.md +docs/UserDfuStateMachine.md +docs/UserDfuStateMachineStatus.md +docs/UserFirmwareInfo.md git_push.sh notehub_py/__init__.py notehub_py/api/__init__.py @@ -128,19 +138,28 @@ notehub_py/models/create_fleet_request.py notehub_py/models/create_monitor.py notehub_py/models/create_product_request.py notehub_py/models/create_project_request.py +notehub_py/models/current_firmware.py notehub_py/models/delete_device_fleets_request.py notehub_py/models/device.py +notehub_py/models/device_dfu_history.py +notehub_py/models/device_dfu_history_page.py +notehub_py/models/device_dfu_state_machine.py +notehub_py/models/device_dfu_state_machine_node.py +notehub_py/models/device_dfu_status.py +notehub_py/models/device_dfu_status_current.py +notehub_py/models/device_dfu_status_page.py notehub_py/models/device_session.py notehub_py/models/device_tower_info.py notehub_py/models/device_usage.py +notehub_py/models/dfu_action_request.py notehub_py/models/dfu_env.py notehub_py/models/dfu_state.py notehub_py/models/email_notification.py notehub_py/models/environment_variables.py notehub_py/models/error.py notehub_py/models/event.py +notehub_py/models/firmware.py notehub_py/models/firmware_info.py -notehub_py/models/firmware_status.py notehub_py/models/fleet.py notehub_py/models/get_alerts200_response.py notehub_py/models/get_billing_accounts200_response.py @@ -177,10 +196,8 @@ notehub_py/models/monitor.py notehub_py/models/monitor_alert_routes_inner.py notehub_py/models/mqtt.py notehub_py/models/note.py -notehub_py/models/ota_status.py -notehub_py/models/ota_status_list.py -notehub_py/models/ota_update_request.py -notehub_py/models/ota_update_status.py +notehub_py/models/notehub_route.py +notehub_py/models/notehub_route_schema.py notehub_py/models/post_provision_project_device_request.py notehub_py/models/product.py notehub_py/models/project.py @@ -189,8 +206,6 @@ notehub_py/models/proxy.py notehub_py/models/put_device_fleets_request.py notehub_py/models/radresponder.py notehub_py/models/role.py -notehub_py/models/route.py -notehub_py/models/route_schema.py notehub_py/models/slack.py notehub_py/models/slack_bearer_notification.py notehub_py/models/slack_web_hook_notification.py @@ -200,7 +215,11 @@ notehub_py/models/thingworx.py notehub_py/models/tower_location.py notehub_py/models/twilio.py notehub_py/models/update_fleet_request.py +notehub_py/models/upload_metadata.py notehub_py/models/user_db_route.py +notehub_py/models/user_dfu_state_machine.py +notehub_py/models/user_dfu_state_machine_status.py +notehub_py/models/user_firmware_info.py notehub_py/py.typed notehub_py/rest.py pyproject.toml @@ -209,4 +228,108 @@ setup.cfg setup.py test-requirements.txt test/__init__.py +test/test_alert.py +test/test_alert_api.py +test/test_alert_data_inner.py +test/test_alert_notifications_inner.py +test/test_authorization_api.py +test/test_aws.py +test/test_azure.py +test/test_billing_account.py +test/test_billing_account_api.py +test/test_billing_account_role.py +test/test_body.py +test/test_clone_project_request.py +test/test_contact.py +test/test_create_fleet_request.py +test/test_create_monitor.py +test/test_create_product_request.py +test/test_create_project_request.py +test/test_current_firmware.py +test/test_delete_device_fleets_request.py +test/test_device.py +test/test_device_api.py +test/test_device_dfu_history.py +test/test_device_dfu_history_page.py +test/test_device_dfu_state_machine.py +test/test_device_dfu_state_machine_node.py +test/test_device_dfu_status.py +test/test_device_dfu_status_current.py +test/test_device_dfu_status_page.py +test/test_device_session.py +test/test_device_tower_info.py +test/test_device_usage.py +test/test_dfu_action_request.py +test/test_dfu_env.py +test/test_dfu_state.py +test/test_email_notification.py +test/test_environment_variables.py +test/test_error.py +test/test_event.py +test/test_event_api.py +test/test_firmware.py +test/test_firmware_info.py +test/test_fleet.py +test/test_get_alerts200_response.py +test/test_get_billing_accounts200_response.py +test/test_get_device_environment_variables200_response.py +test/test_get_device_health_log200_response.py +test/test_get_device_health_log200_response_health_log_inner.py +test/test_get_device_latest200_response.py +test/test_get_device_public_key200_response.py +test/test_get_device_sessions200_response.py +test/test_get_project_device_public_keys200_response.py +test/test_get_project_device_public_keys200_response_device_public_keys_inner.py +test/test_get_project_devices200_response.py +test/test_get_project_events200_response.py +test/test_get_project_events_by_cursor200_response.py +test/test_get_project_fleets200_response.py +test/test_get_project_members200_response.py +test/test_get_project_products200_response.py +test/test_get_projects200_response.py +test/test_get_route_logs_by_route200_response_inner.py +test/test_google.py +test/test_handle_note_changes200_response.py +test/test_handle_note_get200_response.py +test/test_handle_note_signal200_response.py +test/test_handle_notefile_changes200_response.py +test/test_handle_notefile_changes_pending200_response.py +test/test_handle_notefile_delete_request.py +test/test_http.py +test/test_http_filter.py +test/test_http_transform.py +test/test_location.py +test/test_login200_response.py +test/test_login_request.py +test/test_monitor.py +test/test_monitor_alert_routes_inner.py +test/test_monitor_api.py +test/test_mqtt.py +test/test_note.py +test/test_notehub_route.py +test/test_notehub_route_schema.py +test/test_post_provision_project_device_request.py +test/test_product.py +test/test_project.py +test/test_project_api.py +test/test_project_member.py +test/test_proxy.py +test/test_put_device_fleets_request.py +test/test_radresponder.py +test/test_role.py +test/test_route_api.py +test/test_slack.py +test/test_slack_bearer_notification.py +test/test_slack_web_hook_notification.py +test/test_snowflake.py +test/test_snowflake_transform.py +test/test_thingworx.py +test/test_tower_location.py +test/test_twilio.py +test/test_update_fleet_request.py +test/test_upload_metadata.py +test/test_user_db_route.py +test/test_user_dfu_state_machine.py +test/test_user_dfu_state_machine_status.py +test/test_user_firmware_info.py tox.ini diff --git a/src/README.md b/src/README.md index eaf671f..2b4884b 100644 --- a/src/README.md +++ b/src/README.md @@ -4,7 +4,7 @@ The OpenAPI definition for the Notehub.io API. This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 1.1.0 +- API version: 1.2.0 - Package version: 1.0.2 - Generator version: 7.5.0 - Build package: org.openapitools.codegen.languages.PythonClientCodegen @@ -89,7 +89,7 @@ with notehub_py.ApiClient(configuration) as api_client: project_uid = 'app:2606f411-dea6-44a0-9743-1130f57d77d8' # str | page_size = 50 # int | (optional) (default to 50) page_num = 1 # int | (optional) (default to 1) - monitor_uid = ['monitor_uid_example'] # List[str] | (optional) + monitor_uid = 'monitor_uid_example' # str | (optional) try: api_response = api_instance.get_alerts(project_uid, page_size=page_size, page_num=page_num, monitor_uid=monitor_uid) @@ -157,9 +157,14 @@ Class | Method | HTTP request | Description *ProjectApi* | [**delete_fleet_environment_variable**](docs/ProjectApi.md#delete_fleet_environment_variable) | **DELETE** /v1/projects/{projectUID}/fleets/{fleetUID}/environment_variables/{key} | *ProjectApi* | [**delete_project**](docs/ProjectApi.md#delete_project) | **DELETE** /v1/projects/{projectUID} | *ProjectApi* | [**delete_project_environment_variable**](docs/ProjectApi.md#delete_project_environment_variable) | **DELETE** /v1/projects/{projectUID}/environment_variables/{key} | +*ProjectApi* | [**dfu_action**](docs/ProjectApi.md#dfu_action) | **POST** /v1/projects/{projectUID}/dfu/{firmwareType}/{action} | *ProjectApi* | [**disable_global_transformation**](docs/ProjectApi.md#disable_global_transformation) | **POST** /v1/projects/{projectUID}/global-transformation/disable | *ProjectApi* | [**enable_global_transformation**](docs/ProjectApi.md#enable_global_transformation) | **POST** /v1/projects/{projectUID}/global-transformation/enable | +*ProjectApi* | [**get_device_dfu_history**](docs/ProjectApi.md#get_device_dfu_history) | **GET** /v1/projects/{projectUID}/devices/{deviceUID}/dfu/{firmwareType}/history | +*ProjectApi* | [**get_device_dfu_status**](docs/ProjectApi.md#get_device_dfu_status) | **GET** /v1/projects/{projectUID}/devices/{deviceUID}/dfu/{firmwareType}/status | *ProjectApi* | [**get_device_fleets**](docs/ProjectApi.md#get_device_fleets) | **GET** /v1/projects/{projectUID}/devices/{deviceUID}/fleets | +*ProjectApi* | [**get_devices_dfu_history**](docs/ProjectApi.md#get_devices_dfu_history) | **GET** /v1/projects/{projectUID}/dfu/{firmwareType}/history | +*ProjectApi* | [**get_devices_dfu_status**](docs/ProjectApi.md#get_devices_dfu_status) | **GET** /v1/projects/{projectUID}/dfu/{firmwareType}/status | *ProjectApi* | [**get_firmware_info**](docs/ProjectApi.md#get_firmware_info) | **GET** /v1/projects/{projectUID}/firmware | *ProjectApi* | [**get_fleet_environment_variables**](docs/ProjectApi.md#get_fleet_environment_variables) | **GET** /v1/projects/{projectUID}/fleets/{fleetUID}/environment_variables | *ProjectApi* | [**get_project**](docs/ProjectApi.md#get_project) | **GET** /v1/projects/{projectUID} | @@ -167,7 +172,6 @@ Class | Method | HTTP request | Description *ProjectApi* | [**get_project_environment_variables**](docs/ProjectApi.md#get_project_environment_variables) | **GET** /v1/projects/{projectUID}/environment_variables | *ProjectApi* | [**get_project_fleets**](docs/ProjectApi.md#get_project_fleets) | **GET** /v1/projects/{projectUID}/fleets | *ProjectApi* | [**get_project_members**](docs/ProjectApi.md#get_project_members) | **GET** /v1/projects/{projectUID}/members | -*ProjectApi* | [**get_project_ota_status**](docs/ProjectApi.md#get_project_ota_status) | **GET** /v1/projects/{projectUID}/ota/status | *ProjectApi* | [**get_project_products**](docs/ProjectApi.md#get_project_products) | **GET** /v1/projects/{projectUID}/products | *ProjectApi* | [**get_projects**](docs/ProjectApi.md#get_projects) | **GET** /v1/projects | *ProjectApi* | [**put_device_fleets**](docs/ProjectApi.md#put_device_fleets) | **PUT** /v1/projects/{projectUID}/devices/{deviceUID}/fleets | @@ -175,7 +179,6 @@ Class | Method | HTTP request | Description *ProjectApi* | [**put_project_environment_variables**](docs/ProjectApi.md#put_project_environment_variables) | **PUT** /v1/projects/{projectUID}/environment_variables | *ProjectApi* | [**set_global_transformation**](docs/ProjectApi.md#set_global_transformation) | **POST** /v1/projects/{projectUID}/global-transformation | *ProjectApi* | [**update_fleet**](docs/ProjectApi.md#update_fleet) | **PUT** /v1/projects/{projectUID}/fleets/{fleetUID} | -*ProjectApi* | [**update_project_firmware**](docs/ProjectApi.md#update_project_firmware) | **POST** /v1/projects/{projectUID}/ota/update | *RouteApi* | [**create_route**](docs/RouteApi.md#create_route) | **POST** /v1/projects/{projectUID}/routes | *RouteApi* | [**delete_route**](docs/RouteApi.md#delete_route) | **DELETE** /v1/projects/{projectUID}/routes/{routeUID} | *RouteApi* | [**get_route**](docs/RouteApi.md#get_route) | **GET** /v1/projects/{projectUID}/routes/{routeUID} | @@ -200,19 +203,28 @@ Class | Method | HTTP request | Description - [CreateMonitor](docs/CreateMonitor.md) - [CreateProductRequest](docs/CreateProductRequest.md) - [CreateProjectRequest](docs/CreateProjectRequest.md) + - [CurrentFirmware](docs/CurrentFirmware.md) - [DFUEnv](docs/DFUEnv.md) - [DFUState](docs/DFUState.md) - [DeleteDeviceFleetsRequest](docs/DeleteDeviceFleetsRequest.md) - [Device](docs/Device.md) + - [DeviceDfuHistory](docs/DeviceDfuHistory.md) + - [DeviceDfuHistoryPage](docs/DeviceDfuHistoryPage.md) + - [DeviceDfuStateMachine](docs/DeviceDfuStateMachine.md) + - [DeviceDfuStateMachineNode](docs/DeviceDfuStateMachineNode.md) + - [DeviceDfuStatus](docs/DeviceDfuStatus.md) + - [DeviceDfuStatusCurrent](docs/DeviceDfuStatusCurrent.md) + - [DeviceDfuStatusPage](docs/DeviceDfuStatusPage.md) - [DeviceSession](docs/DeviceSession.md) - [DeviceTowerInfo](docs/DeviceTowerInfo.md) - [DeviceUsage](docs/DeviceUsage.md) + - [DfuActionRequest](docs/DfuActionRequest.md) - [EmailNotification](docs/EmailNotification.md) - [EnvironmentVariables](docs/EnvironmentVariables.md) - [Error](docs/Error.md) - [Event](docs/Event.md) + - [Firmware](docs/Firmware.md) - [FirmwareInfo](docs/FirmwareInfo.md) - - [FirmwareStatus](docs/FirmwareStatus.md) - [Fleet](docs/Fleet.md) - [GetAlerts200Response](docs/GetAlerts200Response.md) - [GetBillingAccounts200Response](docs/GetBillingAccounts200Response.md) @@ -249,10 +261,8 @@ Class | Method | HTTP request | Description - [MonitorAlertRoutesInner](docs/MonitorAlertRoutesInner.md) - [Mqtt](docs/Mqtt.md) - [Note](docs/Note.md) - - [OTAStatus](docs/OTAStatus.md) - - [OTAStatusList](docs/OTAStatusList.md) - - [OTAUpdateRequest](docs/OTAUpdateRequest.md) - - [OTAUpdateStatus](docs/OTAUpdateStatus.md) + - [NotehubRoute](docs/NotehubRoute.md) + - [NotehubRouteSchema](docs/NotehubRouteSchema.md) - [PostProvisionProjectDeviceRequest](docs/PostProvisionProjectDeviceRequest.md) - [Product](docs/Product.md) - [Project](docs/Project.md) @@ -261,8 +271,6 @@ Class | Method | HTTP request | Description - [PutDeviceFleetsRequest](docs/PutDeviceFleetsRequest.md) - [Radresponder](docs/Radresponder.md) - [Role](docs/Role.md) - - [Route](docs/Route.md) - - [RouteSchema](docs/RouteSchema.md) - [Slack](docs/Slack.md) - [SlackBearerNotification](docs/SlackBearerNotification.md) - [SlackWebHookNotification](docs/SlackWebHookNotification.md) @@ -272,7 +280,11 @@ Class | Method | HTTP request | Description - [TowerLocation](docs/TowerLocation.md) - [Twilio](docs/Twilio.md) - [UpdateFleetRequest](docs/UpdateFleetRequest.md) + - [UploadMetadata](docs/UploadMetadata.md) - [UserDbRoute](docs/UserDbRoute.md) + - [UserDfuStateMachine](docs/UserDfuStateMachine.md) + - [UserDfuStateMachineStatus](docs/UserDfuStateMachineStatus.md) + - [UserFirmwareInfo](docs/UserFirmwareInfo.md) diff --git a/src/docs/Alert.md b/src/docs/Alert.md index 26118f0..82fb307 100644 --- a/src/docs/Alert.md +++ b/src/docs/Alert.md @@ -15,6 +15,8 @@ Name | Type | Description | Notes **version** | **int** | The version of the alert | [optional] **alert_source** | **str** | The source of the alert | [optional] **source** | **str** | The UID of the source of the alert | [optional] +**monitor_type** | **str** | The type of monitor that triggered the alert | [optional] +**field_name** | **str** | The field name that triggered the alert | [optional] **data** | [**List[AlertDataInner]**](AlertDataInner.md) | | [optional] **notifications** | [**List[AlertNotificationsInner]**](AlertNotificationsInner.md) | | [optional] diff --git a/src/docs/AlertApi.md b/src/docs/AlertApi.md index 02524d0..686cafc 100644 --- a/src/docs/AlertApi.md +++ b/src/docs/AlertApi.md @@ -48,7 +48,7 @@ with notehub_py.ApiClient(configuration) as api_client: project_uid = 'app:2606f411-dea6-44a0-9743-1130f57d77d8' # str | page_size = 50 # int | (optional) (default to 50) page_num = 1 # int | (optional) (default to 1) - monitor_uid = ['monitor_uid_example'] # List[str] | (optional) + monitor_uid = 'monitor_uid_example' # str | (optional) try: api_response = api_instance.get_alerts(project_uid, page_size=page_size, page_num=page_num, monitor_uid=monitor_uid) @@ -68,7 +68,7 @@ Name | Type | Description | Notes **project_uid** | **str**| | **page_size** | **int**| | [optional] [default to 50] **page_num** | **int**| | [optional] [default to 1] - **monitor_uid** | [**List[str]**](str.md)| | [optional] + **monitor_uid** | **str**| | [optional] ### Return type diff --git a/src/docs/CurrentFirmware.md b/src/docs/CurrentFirmware.md new file mode 100644 index 0000000..2800d10 --- /dev/null +++ b/src/docs/CurrentFirmware.md @@ -0,0 +1,30 @@ +# CurrentFirmware + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**version** | **str** | | [optional] +**metadata** | [**Firmware**](Firmware.md) | | [optional] + +## Example + +```python +from notehub_py.models.current_firmware import CurrentFirmware + +# TODO update the JSON string below +json = "{}" +# create an instance of CurrentFirmware from a JSON string +current_firmware_instance = CurrentFirmware.from_json(json) +# print the JSON string representation of the object +print(CurrentFirmware.to_json()) + +# convert the object into a dict +current_firmware_dict = current_firmware_instance.to_dict() +# create an instance of CurrentFirmware from a dict +current_firmware_from_dict = CurrentFirmware.from_dict(current_firmware_dict) +``` +[[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/src/docs/DeviceDfuHistory.md b/src/docs/DeviceDfuHistory.md new file mode 100644 index 0000000..dbb8990 --- /dev/null +++ b/src/docs/DeviceDfuHistory.md @@ -0,0 +1,31 @@ +# DeviceDfuHistory + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**device_uid** | **str** | Device UID | [optional] +**current** | [**DeviceDfuStatusCurrent**](DeviceDfuStatusCurrent.md) | | [optional] +**history** | [**List[DeviceDfuStateMachine]**](DeviceDfuStateMachine.md) | | [optional] + +## Example + +```python +from notehub_py.models.device_dfu_history import DeviceDfuHistory + +# TODO update the JSON string below +json = "{}" +# create an instance of DeviceDfuHistory from a JSON string +device_dfu_history_instance = DeviceDfuHistory.from_json(json) +# print the JSON string representation of the object +print(DeviceDfuHistory.to_json()) + +# convert the object into a dict +device_dfu_history_dict = device_dfu_history_instance.to_dict() +# create an instance of DeviceDfuHistory from a dict +device_dfu_history_from_dict = DeviceDfuHistory.from_dict(device_dfu_history_dict) +``` +[[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/src/docs/DeviceDfuHistoryPage.md b/src/docs/DeviceDfuHistoryPage.md new file mode 100644 index 0000000..2a6120f --- /dev/null +++ b/src/docs/DeviceDfuHistoryPage.md @@ -0,0 +1,30 @@ +# DeviceDfuHistoryPage + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**devices** | [**List[DeviceDfuHistory]**](DeviceDfuHistory.md) | | [optional] +**has_more** | **bool** | | [optional] [default to False] + +## Example + +```python +from notehub_py.models.device_dfu_history_page import DeviceDfuHistoryPage + +# TODO update the JSON string below +json = "{}" +# create an instance of DeviceDfuHistoryPage from a JSON string +device_dfu_history_page_instance = DeviceDfuHistoryPage.from_json(json) +# print the JSON string representation of the object +print(DeviceDfuHistoryPage.to_json()) + +# convert the object into a dict +device_dfu_history_page_dict = device_dfu_history_page_instance.to_dict() +# create an instance of DeviceDfuHistoryPage from a dict +device_dfu_history_page_from_dict = DeviceDfuHistoryPage.from_dict(device_dfu_history_page_dict) +``` +[[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/src/docs/DeviceDfuStateMachine.md b/src/docs/DeviceDfuStateMachine.md new file mode 100644 index 0000000..a206e59 --- /dev/null +++ b/src/docs/DeviceDfuStateMachine.md @@ -0,0 +1,33 @@ +# DeviceDfuStateMachine + +Represents a single request to update the host or Notecard firmware + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**requested_version** | **str** | Version of the firmware that was requested to be installed | [optional] +**current_version** | **str** | Version of the firmware that was installed prior to this request | [optional] +**initiated** | **str** | RFC3339 datetime of when this update was requested | [optional] +**updates** | [**List[DeviceDfuStateMachineNode]**](DeviceDfuStateMachineNode.md) | | [optional] + +## Example + +```python +from notehub_py.models.device_dfu_state_machine import DeviceDfuStateMachine + +# TODO update the JSON string below +json = "{}" +# create an instance of DeviceDfuStateMachine from a JSON string +device_dfu_state_machine_instance = DeviceDfuStateMachine.from_json(json) +# print the JSON string representation of the object +print(DeviceDfuStateMachine.to_json()) + +# convert the object into a dict +device_dfu_state_machine_dict = device_dfu_state_machine_instance.to_dict() +# create an instance of DeviceDfuStateMachine from a dict +device_dfu_state_machine_from_dict = DeviceDfuStateMachine.from_dict(device_dfu_state_machine_dict) +``` +[[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/src/docs/DeviceDfuStateMachineNode.md b/src/docs/DeviceDfuStateMachineNode.md new file mode 100644 index 0000000..b6c38a5 --- /dev/null +++ b/src/docs/DeviceDfuStateMachineNode.md @@ -0,0 +1,33 @@ +# DeviceDfuStateMachineNode + +Represents a single request to update the host or Notecard firmware + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **str** | Status for this step in the firmware update process | [optional] +**phase** | **str** | Phase for this step in the firmware update process | [optional] +**datetime** | **str** | RFC3339 compatible datetime of when this status update happened | [optional] +**description** | **str** | Additional information | [optional] + +## Example + +```python +from notehub_py.models.device_dfu_state_machine_node import DeviceDfuStateMachineNode + +# TODO update the JSON string below +json = "{}" +# create an instance of DeviceDfuStateMachineNode from a JSON string +device_dfu_state_machine_node_instance = DeviceDfuStateMachineNode.from_json(json) +# print the JSON string representation of the object +print(DeviceDfuStateMachineNode.to_json()) + +# convert the object into a dict +device_dfu_state_machine_node_dict = device_dfu_state_machine_node_instance.to_dict() +# create an instance of DeviceDfuStateMachineNode from a dict +device_dfu_state_machine_node_from_dict = DeviceDfuStateMachineNode.from_dict(device_dfu_state_machine_node_dict) +``` +[[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/src/docs/DeviceDfuStatus.md b/src/docs/DeviceDfuStatus.md new file mode 100644 index 0000000..b4f4c4c --- /dev/null +++ b/src/docs/DeviceDfuStatus.md @@ -0,0 +1,32 @@ +# DeviceDfuStatus + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**device_uid** | **str** | Device UID | [optional] +**dfu_in_progress** | **bool** | true if there is a DFU currently in progress | [optional] +**current** | [**DeviceDfuStatusCurrent**](DeviceDfuStatusCurrent.md) | | [optional] +**status** | [**DeviceDfuStateMachine**](DeviceDfuStateMachine.md) | | [optional] + +## Example + +```python +from notehub_py.models.device_dfu_status import DeviceDfuStatus + +# TODO update the JSON string below +json = "{}" +# create an instance of DeviceDfuStatus from a JSON string +device_dfu_status_instance = DeviceDfuStatus.from_json(json) +# print the JSON string representation of the object +print(DeviceDfuStatus.to_json()) + +# convert the object into a dict +device_dfu_status_dict = device_dfu_status_instance.to_dict() +# create an instance of DeviceDfuStatus from a dict +device_dfu_status_from_dict = DeviceDfuStatus.from_dict(device_dfu_status_dict) +``` +[[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/src/docs/DeviceDfuStatusCurrent.md b/src/docs/DeviceDfuStatusCurrent.md new file mode 100644 index 0000000..9582f47 --- /dev/null +++ b/src/docs/DeviceDfuStatusCurrent.md @@ -0,0 +1,35 @@ +# DeviceDfuStatusCurrent + +Description of the current firmware + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**version** | **str** | Firmware version | [optional] +**organization** | **str** | Firmware organization | [optional] +**description** | **str** | Firmware description | [optional] +**product** | **str** | Firmware product | [optional] +**built** | **str** | Firmware build date | [optional] +**builder** | **str** | Firmware author | [optional] + +## Example + +```python +from notehub_py.models.device_dfu_status_current import DeviceDfuStatusCurrent + +# TODO update the JSON string below +json = "{}" +# create an instance of DeviceDfuStatusCurrent from a JSON string +device_dfu_status_current_instance = DeviceDfuStatusCurrent.from_json(json) +# print the JSON string representation of the object +print(DeviceDfuStatusCurrent.to_json()) + +# convert the object into a dict +device_dfu_status_current_dict = device_dfu_status_current_instance.to_dict() +# create an instance of DeviceDfuStatusCurrent from a dict +device_dfu_status_current_from_dict = DeviceDfuStatusCurrent.from_dict(device_dfu_status_current_dict) +``` +[[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/src/docs/DeviceDfuStatusPage.md b/src/docs/DeviceDfuStatusPage.md new file mode 100644 index 0000000..b787973 --- /dev/null +++ b/src/docs/DeviceDfuStatusPage.md @@ -0,0 +1,30 @@ +# DeviceDfuStatusPage + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**devices** | [**List[DeviceDfuStatus]**](DeviceDfuStatus.md) | | [optional] +**has_more** | **bool** | | [optional] [default to False] + +## Example + +```python +from notehub_py.models.device_dfu_status_page import DeviceDfuStatusPage + +# TODO update the JSON string below +json = "{}" +# create an instance of DeviceDfuStatusPage from a JSON string +device_dfu_status_page_instance = DeviceDfuStatusPage.from_json(json) +# print the JSON string representation of the object +print(DeviceDfuStatusPage.to_json()) + +# convert the object into a dict +device_dfu_status_page_dict = device_dfu_status_page_instance.to_dict() +# create an instance of DeviceDfuStatusPage from a dict +device_dfu_status_page_from_dict = DeviceDfuStatusPage.from_dict(device_dfu_status_page_dict) +``` +[[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/src/docs/DfuActionRequest.md b/src/docs/DfuActionRequest.md new file mode 100644 index 0000000..1f254ff --- /dev/null +++ b/src/docs/DfuActionRequest.md @@ -0,0 +1,29 @@ +# DfuActionRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**filename** | **str** | The name of the firmware file | [optional] + +## Example + +```python +from notehub_py.models.dfu_action_request import DfuActionRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of DfuActionRequest from a JSON string +dfu_action_request_instance = DfuActionRequest.from_json(json) +# print the JSON string representation of the object +print(DfuActionRequest.to_json()) + +# convert the object into a dict +dfu_action_request_dict = dfu_action_request_instance.to_dict() +# create an instance of DfuActionRequest from a dict +dfu_action_request_from_dict = DfuActionRequest.from_dict(dfu_action_request_dict) +``` +[[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/src/docs/EventApi.md b/src/docs/EventApi.md index b13b678..c2a7a1e 100644 --- a/src/docs/EventApi.md +++ b/src/docs/EventApi.md @@ -12,7 +12,7 @@ Method | HTTP request | Description # **get_fleet_events** -> GetProjectEvents200Response get_fleet_events(project_uid, fleet_uid=fleet_uid, page_size=page_size, page_num=page_num, device_uid=device_uid, sort_by=sort_by, sort_order=sort_order, start_date=start_date, end_date=end_date, system_files_only=system_files_only, files=files, format=format, serial_number=serial_number, session_uid=session_uid, event_uid=event_uid, select_fields=select_fields, device_uids=device_uids, since=since) +> GetProjectEvents200Response get_fleet_events(project_uid, fleet_uid, page_size=page_size, page_num=page_num, device_uid=device_uid, sort_by=sort_by, sort_order=sort_order, start_date=start_date, end_date=end_date, date_type=date_type, system_files_only=system_files_only, files=files, format=format, serial_number=serial_number, session_uid=session_uid, event_uid=event_uid, select_fields=select_fields, device_uids=device_uids, since=since) @@ -50,7 +50,7 @@ with notehub_py.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = notehub_py.EventApi(api_client) project_uid = 'app:2606f411-dea6-44a0-9743-1130f57d77d8' # str | - fleet_uid = ['fleet_uid_example'] # List[str] | Filter by Fleet UID (optional) + fleet_uid = 'fleet_uid_example' # str | page_size = 50 # int | (optional) (default to 50) page_num = 1 # int | (optional) (default to 1) device_uid = ['device_uid_example'] # List[str] | A Device UID. (optional) @@ -58,6 +58,7 @@ with notehub_py.ApiClient(configuration) as api_client: sort_order = 'asc' # str | (optional) (default to 'asc') start_date = 1628631763 # int | Unix timestamp (optional) end_date = 1657894210 # int | Unix timestamp (optional) + date_type = 'captured' # str | Which date to filter on, either 'captured' or 'uploaded'. This will apply to the startDate and endDate parameters (optional) (default to 'captured') system_files_only = True # bool | (optional) files = '_health.qo, data.qo' # str | (optional) format = 'json' # str | Response format (JSON or CSV) (optional) (default to 'json') @@ -69,7 +70,7 @@ with notehub_py.ApiClient(configuration) as api_client: since = 'since_example' # str | Deprecated. (optional) try: - api_response = api_instance.get_fleet_events(project_uid, fleet_uid=fleet_uid, page_size=page_size, page_num=page_num, device_uid=device_uid, sort_by=sort_by, sort_order=sort_order, start_date=start_date, end_date=end_date, system_files_only=system_files_only, files=files, format=format, serial_number=serial_number, session_uid=session_uid, event_uid=event_uid, select_fields=select_fields, device_uids=device_uids, since=since) + api_response = api_instance.get_fleet_events(project_uid, fleet_uid, page_size=page_size, page_num=page_num, device_uid=device_uid, sort_by=sort_by, sort_order=sort_order, start_date=start_date, end_date=end_date, date_type=date_type, system_files_only=system_files_only, files=files, format=format, serial_number=serial_number, session_uid=session_uid, event_uid=event_uid, select_fields=select_fields, device_uids=device_uids, since=since) print("The response of EventApi->get_fleet_events:\n") pprint(api_response) except Exception as e: @@ -84,7 +85,7 @@ with notehub_py.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **project_uid** | **str**| | - **fleet_uid** | [**List[str]**](str.md)| Filter by Fleet UID | [optional] + **fleet_uid** | **str**| | **page_size** | **int**| | [optional] [default to 50] **page_num** | **int**| | [optional] [default to 1] **device_uid** | [**List[str]**](str.md)| A Device UID. | [optional] @@ -92,6 +93,7 @@ Name | Type | Description | Notes **sort_order** | **str**| | [optional] [default to 'asc'] **start_date** | **int**| Unix timestamp | [optional] **end_date** | **int**| Unix timestamp | [optional] + **date_type** | **str**| Which date to filter on, either 'captured' or 'uploaded'. This will apply to the startDate and endDate parameters | [optional] [default to 'captured'] **system_files_only** | **bool**| | [optional] **files** | **str**| | [optional] **format** | **str**| Response format (JSON or CSV) | [optional] [default to 'json'] @@ -222,7 +224,7 @@ Name | Type | Description | Notes [[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) # **get_project_events** -> GetProjectEvents200Response get_project_events(project_uid, page_size=page_size, page_num=page_num, device_uid=device_uid, sort_by=sort_by, sort_order=sort_order, start_date=start_date, end_date=end_date, system_files_only=system_files_only, files=files, format=format, serial_number=serial_number, fleet_uid=fleet_uid, session_uid=session_uid, event_uid=event_uid, select_fields=select_fields, device_uids=device_uids, since=since) +> GetProjectEvents200Response get_project_events(project_uid, page_size=page_size, page_num=page_num, device_uid=device_uid, sort_by=sort_by, sort_order=sort_order, start_date=start_date, end_date=end_date, date_type=date_type, system_files_only=system_files_only, files=files, format=format, serial_number=serial_number, fleet_uid=fleet_uid, session_uid=session_uid, event_uid=event_uid, select_fields=select_fields, device_uids=device_uids, since=since) @@ -267,6 +269,7 @@ with notehub_py.ApiClient(configuration) as api_client: sort_order = 'asc' # str | (optional) (default to 'asc') start_date = 1628631763 # int | Unix timestamp (optional) end_date = 1657894210 # int | Unix timestamp (optional) + date_type = 'captured' # str | Which date to filter on, either 'captured' or 'uploaded'. This will apply to the startDate and endDate parameters (optional) (default to 'captured') system_files_only = True # bool | (optional) files = '_health.qo, data.qo' # str | (optional) format = 'json' # str | Response format (JSON or CSV) (optional) (default to 'json') @@ -279,7 +282,7 @@ with notehub_py.ApiClient(configuration) as api_client: since = 'since_example' # str | Deprecated. (optional) try: - api_response = api_instance.get_project_events(project_uid, page_size=page_size, page_num=page_num, device_uid=device_uid, sort_by=sort_by, sort_order=sort_order, start_date=start_date, end_date=end_date, system_files_only=system_files_only, files=files, format=format, serial_number=serial_number, fleet_uid=fleet_uid, session_uid=session_uid, event_uid=event_uid, select_fields=select_fields, device_uids=device_uids, since=since) + api_response = api_instance.get_project_events(project_uid, page_size=page_size, page_num=page_num, device_uid=device_uid, sort_by=sort_by, sort_order=sort_order, start_date=start_date, end_date=end_date, date_type=date_type, system_files_only=system_files_only, files=files, format=format, serial_number=serial_number, fleet_uid=fleet_uid, session_uid=session_uid, event_uid=event_uid, select_fields=select_fields, device_uids=device_uids, since=since) print("The response of EventApi->get_project_events:\n") pprint(api_response) except Exception as e: @@ -301,6 +304,7 @@ Name | Type | Description | Notes **sort_order** | **str**| | [optional] [default to 'asc'] **start_date** | **int**| Unix timestamp | [optional] **end_date** | **int**| Unix timestamp | [optional] + **date_type** | **str**| Which date to filter on, either 'captured' or 'uploaded'. This will apply to the startDate and endDate parameters | [optional] [default to 'captured'] **system_files_only** | **bool**| | [optional] **files** | **str**| | [optional] **format** | **str**| Response format (JSON or CSV) | [optional] [default to 'json'] diff --git a/src/docs/Firmware.md b/src/docs/Firmware.md new file mode 100644 index 0000000..0dae716 --- /dev/null +++ b/src/docs/Firmware.md @@ -0,0 +1,39 @@ +# Firmware + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**org** | **str** | | [optional] +**product** | **str** | | [optional] +**firmware** | **str** | | [optional] +**version** | **str** | | [optional] +**target** | **str** | | [optional] +**ver_major** | **int** | | [optional] +**ver_minor** | **int** | | [optional] +**ver_patch** | **int** | | [optional] +**ver_build** | **int** | | [optional] +**built** | **str** | | [optional] +**builder** | **str** | | [optional] + +## Example + +```python +from notehub_py.models.firmware import Firmware + +# TODO update the JSON string below +json = "{}" +# create an instance of Firmware from a JSON string +firmware_instance = Firmware.from_json(json) +# print the JSON string representation of the object +print(Firmware.to_json()) + +# convert the object into a dict +firmware_dict = firmware_instance.to_dict() +# create an instance of Firmware from a dict +firmware_from_dict = Firmware.from_dict(firmware_dict) +``` +[[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/src/docs/FirmwareStatus.md b/src/docs/FirmwareStatus.md deleted file mode 100644 index 211e832..0000000 --- a/src/docs/FirmwareStatus.md +++ /dev/null @@ -1,33 +0,0 @@ -# FirmwareStatus - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**version** | **str** | The version of the firmware | [optional] -**organization** | **str** | The organization that owns the firmware | [optional] -**description** | **str** | A description of the firmware | [optional] -**product** | **str** | The product that the firmware is for | [optional] -**built** | **str** | The date the firmware was built | [optional] - -## Example - -```python -from notehub_py.models.firmware_status import FirmwareStatus - -# TODO update the JSON string below -json = "{}" -# create an instance of FirmwareStatus from a JSON string -firmware_status_instance = FirmwareStatus.from_json(json) -# print the JSON string representation of the object -print(FirmwareStatus.to_json()) - -# convert the object into a dict -firmware_status_dict = firmware_status_instance.to_dict() -# create an instance of FirmwareStatus from a dict -firmware_status_from_dict = FirmwareStatus.from_dict(firmware_status_dict) -``` -[[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/src/docs/Route.md b/src/docs/NotehubRoute.md similarity index 61% rename from src/docs/Route.md rename to src/docs/NotehubRoute.md index 3404229..fa9164d 100644 --- a/src/docs/Route.md +++ b/src/docs/NotehubRoute.md @@ -1,4 +1,4 @@ -# Route +# NotehubRoute ## Properties @@ -10,24 +10,24 @@ Name | Type | Description | Notes **route_type** | **str** | Type of route. | [optional] [default to 'http'] **modified** | **str** | Last Modified | [optional] **disabled** | **bool** | Is route disabled? | [optional] [default to False] -**var_schema** | [**RouteSchema**](RouteSchema.md) | | [optional] +**var_schema** | [**NotehubRouteSchema**](NotehubRouteSchema.md) | | [optional] ## Example ```python -from notehub_py.models.route import Route +from notehub_py.models.notehub_route import NotehubRoute # TODO update the JSON string below json = "{}" -# create an instance of Route from a JSON string -route_instance = Route.from_json(json) +# create an instance of NotehubRoute from a JSON string +notehub_route_instance = NotehubRoute.from_json(json) # print the JSON string representation of the object -print(Route.to_json()) +print(NotehubRoute.to_json()) # convert the object into a dict -route_dict = route_instance.to_dict() -# create an instance of Route from a dict -route_from_dict = Route.from_dict(route_dict) +notehub_route_dict = notehub_route_instance.to_dict() +# create an instance of NotehubRoute from a dict +notehub_route_from_dict = NotehubRoute.from_dict(notehub_route_dict) ``` [[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/src/docs/RouteSchema.md b/src/docs/NotehubRouteSchema.md similarity index 90% rename from src/docs/RouteSchema.md rename to src/docs/NotehubRouteSchema.md index ba2940b..689570d 100644 --- a/src/docs/RouteSchema.md +++ b/src/docs/NotehubRouteSchema.md @@ -1,4 +1,4 @@ -# RouteSchema +# NotehubRouteSchema ## Properties @@ -51,19 +51,19 @@ Name | Type | Description | Notes ## Example ```python -from notehub_py.models.route_schema import RouteSchema +from notehub_py.models.notehub_route_schema import NotehubRouteSchema # TODO update the JSON string below json = "{}" -# create an instance of RouteSchema from a JSON string -route_schema_instance = RouteSchema.from_json(json) +# create an instance of NotehubRouteSchema from a JSON string +notehub_route_schema_instance = NotehubRouteSchema.from_json(json) # print the JSON string representation of the object -print(RouteSchema.to_json()) +print(NotehubRouteSchema.to_json()) # convert the object into a dict -route_schema_dict = route_schema_instance.to_dict() -# create an instance of RouteSchema from a dict -route_schema_from_dict = RouteSchema.from_dict(route_schema_dict) +notehub_route_schema_dict = notehub_route_schema_instance.to_dict() +# create an instance of NotehubRouteSchema from a dict +notehub_route_schema_from_dict = NotehubRouteSchema.from_dict(notehub_route_schema_dict) ``` [[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/src/docs/OTAStatus.md b/src/docs/OTAStatus.md deleted file mode 100644 index 20bcb95..0000000 --- a/src/docs/OTAStatus.md +++ /dev/null @@ -1,46 +0,0 @@ -# OTAStatus - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**device_uid** | **str** | The device UID | [optional] -**tags** | **str** | The tags associated with the device | [optional] -**notecard_current_firmware** | [**FirmwareStatus**](FirmwareStatus.md) | | [optional] -**notecard_dfu_began_at** | **str** | The time the Notecard DFU began | [optional] -**notecard_dfu_status** | **str** | The status of the Notecard DFU | [optional] -**notecard_requested_firmware** | [**FirmwareStatus**](FirmwareStatus.md) | | [optional] -**notecard_requested_at** | **str** | The time the Notecard firmware was requested | [optional] -**notecard_requested_scope** | **str** | The scope of the Notecard firmware request | [optional] -**notecard_requested_show_details** | **bool** | Whether to show details of the Notecard firmware request | [optional] -**notecard_requested_status** | **str** | The status of the Notecard firmware request | [optional] -**host_current_firmware** | [**FirmwareStatus**](FirmwareStatus.md) | | [optional] -**host_dfu_began_at** | **str** | The time the host DFU began | [optional] -**host_dfu_status** | **str** | The status of the host DFU | [optional] -**host_requested_firmware** | [**FirmwareStatus**](FirmwareStatus.md) | | [optional] -**host_requested_at** | **str** | The time the host firmware was requested | [optional] -**host_requested_scope** | **str** | The scope of the host firmware request | [optional] -**host_requested_show_details** | **bool** | Whether to show details of the host firmware request | [optional] -**host_requested_status** | **str** | The status of the host firmware request | [optional] - -## Example - -```python -from notehub_py.models.ota_status import OTAStatus - -# TODO update the JSON string below -json = "{}" -# create an instance of OTAStatus from a JSON string -ota_status_instance = OTAStatus.from_json(json) -# print the JSON string representation of the object -print(OTAStatus.to_json()) - -# convert the object into a dict -ota_status_dict = ota_status_instance.to_dict() -# create an instance of OTAStatus from a dict -ota_status_from_dict = OTAStatus.from_dict(ota_status_dict) -``` -[[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/src/docs/OTAStatusList.md b/src/docs/OTAStatusList.md deleted file mode 100644 index 0e74c6a..0000000 --- a/src/docs/OTAStatusList.md +++ /dev/null @@ -1,30 +0,0 @@ -# OTAStatusList - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**devices** | [**List[OTAStatus]**](OTAStatus.md) | | [optional] -**has_more** | **bool** | Indicates whether more items are available | [optional] - -## Example - -```python -from notehub_py.models.ota_status_list import OTAStatusList - -# TODO update the JSON string below -json = "{}" -# create an instance of OTAStatusList from a JSON string -ota_status_list_instance = OTAStatusList.from_json(json) -# print the JSON string representation of the object -print(OTAStatusList.to_json()) - -# convert the object into a dict -ota_status_list_dict = ota_status_list_instance.to_dict() -# create an instance of OTAStatusList from a dict -ota_status_list_from_dict = OTAStatusList.from_dict(ota_status_list_dict) -``` -[[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/src/docs/OTAUpdateRequest.md b/src/docs/OTAUpdateRequest.md deleted file mode 100644 index 9d562bd..0000000 --- a/src/docs/OTAUpdateRequest.md +++ /dev/null @@ -1,39 +0,0 @@ -# OTAUpdateRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**filename** | **str** | The name of the firmware file | [optional] -**device_uids** | **List[str]** | The device UIDs to update | [optional] -**fleet_uids** | **List[str]** | The fleet UIDs to update | [optional] -**device_tags** | **List[str]** | The device tags to update | [optional] -**version** | **str** | The version of the firmware | [optional] -**md5** | **str** | The MD5 hash of the firmware file | [optional] -**type** | **str** | The type of firmware | [optional] -**product** | **str** | The product that the firmware is for | [optional] -**target** | **str** | The target device for the firmware | [optional] -**unpublished** | **bool** | If true, the firmware is unpublished | [optional] -**cancel_dfu** | **bool** | If true, the DFU is canceled | [optional] - -## Example - -```python -from notehub_py.models.ota_update_request import OTAUpdateRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of OTAUpdateRequest from a JSON string -ota_update_request_instance = OTAUpdateRequest.from_json(json) -# print the JSON string representation of the object -print(OTAUpdateRequest.to_json()) - -# convert the object into a dict -ota_update_request_dict = ota_update_request_instance.to_dict() -# create an instance of OTAUpdateRequest from a dict -ota_update_request_from_dict = OTAUpdateRequest.from_dict(ota_update_request_dict) -``` -[[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/src/docs/OTAUpdateStatus.md b/src/docs/OTAUpdateStatus.md deleted file mode 100644 index 186dbd6..0000000 --- a/src/docs/OTAUpdateStatus.md +++ /dev/null @@ -1,31 +0,0 @@ -# OTAUpdateStatus - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**status** | **str** | The status of the OTA request | [optional] -**successful** | **List[str]** | The successful device UIDs | [optional] -**failed** | **List[str]** | The failed device UIDs | [optional] - -## Example - -```python -from notehub_py.models.ota_update_status import OTAUpdateStatus - -# TODO update the JSON string below -json = "{}" -# create an instance of OTAUpdateStatus from a JSON string -ota_update_status_instance = OTAUpdateStatus.from_json(json) -# print the JSON string representation of the object -print(OTAUpdateStatus.to_json()) - -# convert the object into a dict -ota_update_status_dict = ota_update_status_instance.to_dict() -# create an instance of OTAUpdateStatus from a dict -ota_update_status_from_dict = OTAUpdateStatus.from_dict(ota_update_status_dict) -``` -[[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/src/docs/ProjectApi.md b/src/docs/ProjectApi.md index 43e2aa8..e2be1aa 100644 --- a/src/docs/ProjectApi.md +++ b/src/docs/ProjectApi.md @@ -13,9 +13,14 @@ Method | HTTP request | Description [**delete_fleet_environment_variable**](ProjectApi.md#delete_fleet_environment_variable) | **DELETE** /v1/projects/{projectUID}/fleets/{fleetUID}/environment_variables/{key} | [**delete_project**](ProjectApi.md#delete_project) | **DELETE** /v1/projects/{projectUID} | [**delete_project_environment_variable**](ProjectApi.md#delete_project_environment_variable) | **DELETE** /v1/projects/{projectUID}/environment_variables/{key} | +[**dfu_action**](ProjectApi.md#dfu_action) | **POST** /v1/projects/{projectUID}/dfu/{firmwareType}/{action} | [**disable_global_transformation**](ProjectApi.md#disable_global_transformation) | **POST** /v1/projects/{projectUID}/global-transformation/disable | [**enable_global_transformation**](ProjectApi.md#enable_global_transformation) | **POST** /v1/projects/{projectUID}/global-transformation/enable | +[**get_device_dfu_history**](ProjectApi.md#get_device_dfu_history) | **GET** /v1/projects/{projectUID}/devices/{deviceUID}/dfu/{firmwareType}/history | +[**get_device_dfu_status**](ProjectApi.md#get_device_dfu_status) | **GET** /v1/projects/{projectUID}/devices/{deviceUID}/dfu/{firmwareType}/status | [**get_device_fleets**](ProjectApi.md#get_device_fleets) | **GET** /v1/projects/{projectUID}/devices/{deviceUID}/fleets | +[**get_devices_dfu_history**](ProjectApi.md#get_devices_dfu_history) | **GET** /v1/projects/{projectUID}/dfu/{firmwareType}/history | +[**get_devices_dfu_status**](ProjectApi.md#get_devices_dfu_status) | **GET** /v1/projects/{projectUID}/dfu/{firmwareType}/status | [**get_firmware_info**](ProjectApi.md#get_firmware_info) | **GET** /v1/projects/{projectUID}/firmware | [**get_fleet_environment_variables**](ProjectApi.md#get_fleet_environment_variables) | **GET** /v1/projects/{projectUID}/fleets/{fleetUID}/environment_variables | [**get_project**](ProjectApi.md#get_project) | **GET** /v1/projects/{projectUID} | @@ -23,7 +28,6 @@ Method | HTTP request | Description [**get_project_environment_variables**](ProjectApi.md#get_project_environment_variables) | **GET** /v1/projects/{projectUID}/environment_variables | [**get_project_fleets**](ProjectApi.md#get_project_fleets) | **GET** /v1/projects/{projectUID}/fleets | [**get_project_members**](ProjectApi.md#get_project_members) | **GET** /v1/projects/{projectUID}/members | -[**get_project_ota_status**](ProjectApi.md#get_project_ota_status) | **GET** /v1/projects/{projectUID}/ota/status | [**get_project_products**](ProjectApi.md#get_project_products) | **GET** /v1/projects/{projectUID}/products | [**get_projects**](ProjectApi.md#get_projects) | **GET** /v1/projects | [**put_device_fleets**](ProjectApi.md#put_device_fleets) | **PUT** /v1/projects/{projectUID}/devices/{deviceUID}/fleets | @@ -31,7 +35,6 @@ Method | HTTP request | Description [**put_project_environment_variables**](ProjectApi.md#put_project_environment_variables) | **PUT** /v1/projects/{projectUID}/environment_variables | [**set_global_transformation**](ProjectApi.md#set_global_transformation) | **POST** /v1/projects/{projectUID}/global-transformation | [**update_fleet**](ProjectApi.md#update_fleet) | **PUT** /v1/projects/{projectUID}/fleets/{fleetUID} | -[**update_project_firmware**](ProjectApi.md#update_project_firmware) | **POST** /v1/projects/{projectUID}/ota/update | # **clone_project** @@ -762,12 +765,431 @@ Name | Type | Description | Notes [[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) +# **dfu_action** +> dfu_action(project_uid, firmware_type, action, device_uid=device_uid, tag=tag, serial_number=serial_number, fleet_uid=fleet_uid, notecard_firmware=notecard_firmware, location=location, host_firmware=host_firmware, product_uid=product_uid, sku=sku, dfu_action_request=dfu_action_request) + + + +Update/cancel host or notecard firmware updates + +### Example + +* Api Key Authentication (api_key): + +```python +import notehub_py +from notehub_py.models.dfu_action_request import DfuActionRequest +from notehub_py.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.notefile.net +# See configuration.py for a list of all supported configuration parameters. +configuration = notehub_py.Configuration( + host = "https://api.notefile.net" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: api_key +configuration.api_key['api_key'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['api_key'] = 'Bearer' + +# Enter a context with an instance of the API client +with notehub_py.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = notehub_py.ProjectApi(api_client) + project_uid = 'app:2606f411-dea6-44a0-9743-1130f57d77d8' # str | + firmware_type = 'firmware_type_example' # str | + action = 'action_example' # str | + device_uid = ['device_uid_example'] # List[str] | A Device UID. (optional) + tag = ['tag_example'] # List[str] | Tag filter (optional) + serial_number = ['serial_number_example'] # List[str] | Serial number filter (optional) + fleet_uid = 'fleet_uid_example' # str | (optional) + notecard_firmware = ['notecard_firmware_example'] # List[str] | Firmware version filter (optional) + location = ['location_example'] # List[str] | Location filter (optional) + host_firmware = ['host_firmware_example'] # List[str] | Host firmware filter (optional) + product_uid = ['product_uid_example'] # List[str] | (optional) + sku = ['sku_example'] # List[str] | SKU filter (optional) + dfu_action_request = notehub_py.DfuActionRequest() # DfuActionRequest | Which firmware in the case of an update action (optional) + + try: + api_instance.dfu_action(project_uid, firmware_type, action, device_uid=device_uid, tag=tag, serial_number=serial_number, fleet_uid=fleet_uid, notecard_firmware=notecard_firmware, location=location, host_firmware=host_firmware, product_uid=product_uid, sku=sku, dfu_action_request=dfu_action_request) + except Exception as e: + print("Exception when calling ProjectApi->dfu_action: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_uid** | **str**| | + **firmware_type** | **str**| | + **action** | **str**| | + **device_uid** | [**List[str]**](str.md)| A Device UID. | [optional] + **tag** | [**List[str]**](str.md)| Tag filter | [optional] + **serial_number** | [**List[str]**](str.md)| Serial number filter | [optional] + **fleet_uid** | **str**| | [optional] + **notecard_firmware** | [**List[str]**](str.md)| Firmware version filter | [optional] + **location** | [**List[str]**](str.md)| Location filter | [optional] + **host_firmware** | [**List[str]**](str.md)| Host firmware filter | [optional] + **product_uid** | [**List[str]**](str.md)| | [optional] + **sku** | [**List[str]**](str.md)| SKU filter | [optional] + **dfu_action_request** | [**DfuActionRequest**](DfuActionRequest.md)| Which firmware in the case of an update action | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**0** | The response body in case of an API error. | - | + +[[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) + # **disable_global_transformation** > disable_global_transformation(project_uid) -Disable the project-level event JSONata transformation +Disable the project-level event JSONata transformation + +### Example + +* Api Key Authentication (api_key): + +```python +import notehub_py +from notehub_py.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.notefile.net +# See configuration.py for a list of all supported configuration parameters. +configuration = notehub_py.Configuration( + host = "https://api.notefile.net" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: api_key +configuration.api_key['api_key'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['api_key'] = 'Bearer' + +# Enter a context with an instance of the API client +with notehub_py.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = notehub_py.ProjectApi(api_client) + project_uid = 'app:2606f411-dea6-44a0-9743-1130f57d77d8' # str | + + try: + api_instance.disable_global_transformation(project_uid) + except Exception as e: + print("Exception when calling ProjectApi->disable_global_transformation: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_uid** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful operation | - | +**0** | The response body in case of an API error. | - | + +[[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) + +# **enable_global_transformation** +> enable_global_transformation(project_uid) + + + +Enable the project-level event JSONata transformation + +### Example + +* Api Key Authentication (api_key): + +```python +import notehub_py +from notehub_py.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.notefile.net +# See configuration.py for a list of all supported configuration parameters. +configuration = notehub_py.Configuration( + host = "https://api.notefile.net" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: api_key +configuration.api_key['api_key'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['api_key'] = 'Bearer' + +# Enter a context with an instance of the API client +with notehub_py.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = notehub_py.ProjectApi(api_client) + project_uid = 'app:2606f411-dea6-44a0-9743-1130f57d77d8' # str | + + try: + api_instance.enable_global_transformation(project_uid) + except Exception as e: + print("Exception when calling ProjectApi->enable_global_transformation: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_uid** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful operation | - | +**0** | The response body in case of an API error. | - | + +[[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) + +# **get_device_dfu_history** +> DeviceDfuHistory get_device_dfu_history(project_uid, device_uid, firmware_type) + + + +Get device DFU history for host or Notecard firmware + +### Example + +* Api Key Authentication (api_key): + +```python +import notehub_py +from notehub_py.models.device_dfu_history import DeviceDfuHistory +from notehub_py.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.notefile.net +# See configuration.py for a list of all supported configuration parameters. +configuration = notehub_py.Configuration( + host = "https://api.notefile.net" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: api_key +configuration.api_key['api_key'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['api_key'] = 'Bearer' + +# Enter a context with an instance of the API client +with notehub_py.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = notehub_py.ProjectApi(api_client) + project_uid = 'app:2606f411-dea6-44a0-9743-1130f57d77d8' # str | + device_uid = 'dev:000000000000000' # str | + firmware_type = 'firmware_type_example' # str | + + try: + api_response = api_instance.get_device_dfu_history(project_uid, device_uid, firmware_type) + print("The response of ProjectApi->get_device_dfu_history:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ProjectApi->get_device_dfu_history: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_uid** | **str**| | + **device_uid** | **str**| | + **firmware_type** | **str**| | + +### Return type + +[**DeviceDfuHistory**](DeviceDfuHistory.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**0** | The response body in case of an API error. | - | + +[[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) + +# **get_device_dfu_status** +> DeviceDfuStatus get_device_dfu_status(project_uid, device_uid, firmware_type) + + + +Get device DFU history for host or Notecard firmware + +### Example + +* Api Key Authentication (api_key): + +```python +import notehub_py +from notehub_py.models.device_dfu_status import DeviceDfuStatus +from notehub_py.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.notefile.net +# See configuration.py for a list of all supported configuration parameters. +configuration = notehub_py.Configuration( + host = "https://api.notefile.net" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: api_key +configuration.api_key['api_key'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['api_key'] = 'Bearer' + +# Enter a context with an instance of the API client +with notehub_py.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = notehub_py.ProjectApi(api_client) + project_uid = 'app:2606f411-dea6-44a0-9743-1130f57d77d8' # str | + device_uid = 'dev:000000000000000' # str | + firmware_type = 'firmware_type_example' # str | + + try: + api_response = api_instance.get_device_dfu_status(project_uid, device_uid, firmware_type) + print("The response of ProjectApi->get_device_dfu_status:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ProjectApi->get_device_dfu_status: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_uid** | **str**| | + **device_uid** | **str**| | + **firmware_type** | **str**| | + +### Return type + +[**DeviceDfuStatus**](DeviceDfuStatus.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**0** | The response body in case of an API error. | - | + +[[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) + +# **get_device_fleets** +> GetProjectFleets200Response get_device_fleets(project_uid, device_uid) + + + +Get Device Fleets ### Example @@ -775,6 +1197,7 @@ Disable the project-level event JSONata transformation ```python import notehub_py +from notehub_py.models.get_project_fleets200_response import GetProjectFleets200Response from notehub_py.rest import ApiException from pprint import pprint @@ -800,11 +1223,14 @@ with notehub_py.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = notehub_py.ProjectApi(api_client) project_uid = 'app:2606f411-dea6-44a0-9743-1130f57d77d8' # str | + device_uid = 'dev:000000000000000' # str | try: - api_instance.disable_global_transformation(project_uid) + api_response = api_instance.get_device_fleets(project_uid, device_uid) + print("The response of ProjectApi->get_device_fleets:\n") + pprint(api_response) except Exception as e: - print("Exception when calling ProjectApi->disable_global_transformation: %s\n" % e) + print("Exception when calling ProjectApi->get_device_fleets: %s\n" % e) ``` @@ -815,10 +1241,11 @@ with notehub_py.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **project_uid** | **str**| | + **device_uid** | **str**| | ### Return type -void (empty response body) +[**GetProjectFleets200Response**](GetProjectFleets200Response.md) ### Authorization @@ -833,17 +1260,17 @@ void (empty response body) | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successful operation | - | +**200** | The response body from a fleets endpoint. | - | **0** | The response body in case of an API error. | - | [[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) -# **enable_global_transformation** -> enable_global_transformation(project_uid) +# **get_devices_dfu_history** +> DeviceDfuHistoryPage get_devices_dfu_history(project_uid, firmware_type, page_size=page_size, page_num=page_num, sort_by=sort_by, sort_order=sort_order, device_uid=device_uid, tag=tag, serial_number=serial_number, fleet_uid=fleet_uid, notecard_firmware=notecard_firmware, location=location, host_firmware=host_firmware, product_uid=product_uid, sku=sku) -Enable the project-level event JSONata transformation +Get host or Notecard DFU history for all devices that match the filter criteria ### Example @@ -851,6 +1278,7 @@ Enable the project-level event JSONata transformation ```python import notehub_py +from notehub_py.models.device_dfu_history_page import DeviceDfuHistoryPage from notehub_py.rest import ApiException from pprint import pprint @@ -876,11 +1304,27 @@ with notehub_py.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = notehub_py.ProjectApi(api_client) project_uid = 'app:2606f411-dea6-44a0-9743-1130f57d77d8' # str | + firmware_type = 'firmware_type_example' # str | + page_size = 50 # int | (optional) (default to 50) + page_num = 1 # int | (optional) (default to 1) + sort_by = 'captured' # str | (optional) (default to 'captured') + sort_order = 'asc' # str | (optional) (default to 'asc') + device_uid = ['device_uid_example'] # List[str] | A Device UID. (optional) + tag = ['tag_example'] # List[str] | Tag filter (optional) + serial_number = ['serial_number_example'] # List[str] | Serial number filter (optional) + fleet_uid = 'fleet_uid_example' # str | (optional) + notecard_firmware = ['notecard_firmware_example'] # List[str] | Firmware version filter (optional) + location = ['location_example'] # List[str] | Location filter (optional) + host_firmware = ['host_firmware_example'] # List[str] | Host firmware filter (optional) + product_uid = ['product_uid_example'] # List[str] | (optional) + sku = ['sku_example'] # List[str] | SKU filter (optional) try: - api_instance.enable_global_transformation(project_uid) + api_response = api_instance.get_devices_dfu_history(project_uid, firmware_type, page_size=page_size, page_num=page_num, sort_by=sort_by, sort_order=sort_order, device_uid=device_uid, tag=tag, serial_number=serial_number, fleet_uid=fleet_uid, notecard_firmware=notecard_firmware, location=location, host_firmware=host_firmware, product_uid=product_uid, sku=sku) + print("The response of ProjectApi->get_devices_dfu_history:\n") + pprint(api_response) except Exception as e: - print("Exception when calling ProjectApi->enable_global_transformation: %s\n" % e) + print("Exception when calling ProjectApi->get_devices_dfu_history: %s\n" % e) ``` @@ -891,10 +1335,24 @@ with notehub_py.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **project_uid** | **str**| | + **firmware_type** | **str**| | + **page_size** | **int**| | [optional] [default to 50] + **page_num** | **int**| | [optional] [default to 1] + **sort_by** | **str**| | [optional] [default to 'captured'] + **sort_order** | **str**| | [optional] [default to 'asc'] + **device_uid** | [**List[str]**](str.md)| A Device UID. | [optional] + **tag** | [**List[str]**](str.md)| Tag filter | [optional] + **serial_number** | [**List[str]**](str.md)| Serial number filter | [optional] + **fleet_uid** | **str**| | [optional] + **notecard_firmware** | [**List[str]**](str.md)| Firmware version filter | [optional] + **location** | [**List[str]**](str.md)| Location filter | [optional] + **host_firmware** | [**List[str]**](str.md)| Host firmware filter | [optional] + **product_uid** | [**List[str]**](str.md)| | [optional] + **sku** | [**List[str]**](str.md)| SKU filter | [optional] ### Return type -void (empty response body) +[**DeviceDfuHistoryPage**](DeviceDfuHistoryPage.md) ### Authorization @@ -909,17 +1367,17 @@ void (empty response body) | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successful operation | - | +**200** | Success | - | **0** | The response body in case of an API error. | - | [[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) -# **get_device_fleets** -> GetProjectFleets200Response get_device_fleets(project_uid, device_uid) +# **get_devices_dfu_status** +> DeviceDfuStatusPage get_devices_dfu_status(project_uid, firmware_type, page_size=page_size, page_num=page_num, sort_by=sort_by, sort_order=sort_order, device_uid=device_uid, tag=tag, serial_number=serial_number, fleet_uid=fleet_uid, notecard_firmware=notecard_firmware, location=location, host_firmware=host_firmware, product_uid=product_uid, sku=sku) -Get Device Fleets +Get host or Notecard DFU history for all devices that match the filter criteria ### Example @@ -927,7 +1385,7 @@ Get Device Fleets ```python import notehub_py -from notehub_py.models.get_project_fleets200_response import GetProjectFleets200Response +from notehub_py.models.device_dfu_status_page import DeviceDfuStatusPage from notehub_py.rest import ApiException from pprint import pprint @@ -953,14 +1411,27 @@ with notehub_py.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = notehub_py.ProjectApi(api_client) project_uid = 'app:2606f411-dea6-44a0-9743-1130f57d77d8' # str | - device_uid = 'dev:000000000000000' # str | + firmware_type = 'firmware_type_example' # str | + page_size = 50 # int | (optional) (default to 50) + page_num = 1 # int | (optional) (default to 1) + sort_by = 'captured' # str | (optional) (default to 'captured') + sort_order = 'asc' # str | (optional) (default to 'asc') + device_uid = ['device_uid_example'] # List[str] | A Device UID. (optional) + tag = ['tag_example'] # List[str] | Tag filter (optional) + serial_number = ['serial_number_example'] # List[str] | Serial number filter (optional) + fleet_uid = 'fleet_uid_example' # str | (optional) + notecard_firmware = ['notecard_firmware_example'] # List[str] | Firmware version filter (optional) + location = ['location_example'] # List[str] | Location filter (optional) + host_firmware = ['host_firmware_example'] # List[str] | Host firmware filter (optional) + product_uid = ['product_uid_example'] # List[str] | (optional) + sku = ['sku_example'] # List[str] | SKU filter (optional) try: - api_response = api_instance.get_device_fleets(project_uid, device_uid) - print("The response of ProjectApi->get_device_fleets:\n") + api_response = api_instance.get_devices_dfu_status(project_uid, firmware_type, page_size=page_size, page_num=page_num, sort_by=sort_by, sort_order=sort_order, device_uid=device_uid, tag=tag, serial_number=serial_number, fleet_uid=fleet_uid, notecard_firmware=notecard_firmware, location=location, host_firmware=host_firmware, product_uid=product_uid, sku=sku) + print("The response of ProjectApi->get_devices_dfu_status:\n") pprint(api_response) except Exception as e: - print("Exception when calling ProjectApi->get_device_fleets: %s\n" % e) + print("Exception when calling ProjectApi->get_devices_dfu_status: %s\n" % e) ``` @@ -971,11 +1442,24 @@ with notehub_py.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **project_uid** | **str**| | - **device_uid** | **str**| | + **firmware_type** | **str**| | + **page_size** | **int**| | [optional] [default to 50] + **page_num** | **int**| | [optional] [default to 1] + **sort_by** | **str**| | [optional] [default to 'captured'] + **sort_order** | **str**| | [optional] [default to 'asc'] + **device_uid** | [**List[str]**](str.md)| A Device UID. | [optional] + **tag** | [**List[str]**](str.md)| Tag filter | [optional] + **serial_number** | [**List[str]**](str.md)| Serial number filter | [optional] + **fleet_uid** | **str**| | [optional] + **notecard_firmware** | [**List[str]**](str.md)| Firmware version filter | [optional] + **location** | [**List[str]**](str.md)| Location filter | [optional] + **host_firmware** | [**List[str]**](str.md)| Host firmware filter | [optional] + **product_uid** | [**List[str]**](str.md)| | [optional] + **sku** | [**List[str]**](str.md)| SKU filter | [optional] ### Return type -[**GetProjectFleets200Response**](GetProjectFleets200Response.md) +[**DeviceDfuStatusPage**](DeviceDfuStatusPage.md) ### Authorization @@ -990,7 +1474,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | The response body from a fleets endpoint. | - | +**200** | Success | - | **0** | The response body in case of an API error. | - | [[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) @@ -1564,95 +2048,6 @@ Name | Type | Description | Notes [[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) -# **get_project_ota_status** -> List[OTAStatusList] get_project_ota_status(project_uid, device_uids=device_uids, fleet_uids=fleet_uids, device_tags=device_tags, page_size=page_size, page_num=page_num) - - - -Get Project OTA Status - -### Example - -* Api Key Authentication (api_key): - -```python -import notehub_py -from notehub_py.models.ota_status_list import OTAStatusList -from notehub_py.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.notefile.net -# See configuration.py for a list of all supported configuration parameters. -configuration = notehub_py.Configuration( - host = "https://api.notefile.net" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: api_key -configuration.api_key['api_key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['api_key'] = 'Bearer' - -# Enter a context with an instance of the API client -with notehub_py.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = notehub_py.ProjectApi(api_client) - project_uid = 'app:2606f411-dea6-44a0-9743-1130f57d77d8' # str | - device_uids = ['device_uids_example'] # List[str] | An array of Device UIDs. (optional) - fleet_uids = ['fleet_uids_example'] # List[str] | (optional) - device_tags = ['device_tags_example'] # List[str] | (optional) - page_size = 50 # int | (optional) (default to 50) - page_num = 1 # int | (optional) (default to 1) - - try: - api_response = api_instance.get_project_ota_status(project_uid, device_uids=device_uids, fleet_uids=fleet_uids, device_tags=device_tags, page_size=page_size, page_num=page_num) - print("The response of ProjectApi->get_project_ota_status:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ProjectApi->get_project_ota_status: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **project_uid** | **str**| | - **device_uids** | [**List[str]**](str.md)| An array of Device UIDs. | [optional] - **fleet_uids** | [**List[str]**](str.md)| | [optional] - **device_tags** | [**List[str]**](str.md)| | [optional] - **page_size** | **int**| | [optional] [default to 50] - **page_num** | **int**| | [optional] [default to 1] - -### Return type - -[**List[OTAStatusList]**](OTAStatusList.md) - -### Authorization - -[api_key](../README.md#api_key) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Success | - | -**0** | The response body in case of an API error. | - | - -[[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) - # **get_project_products** > GetProjectProducts200Response get_project_products(project_uid) @@ -2217,85 +2612,3 @@ Name | Type | Description | Notes [[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) -# **update_project_firmware** -> List[OTAUpdateStatus] update_project_firmware(project_uid, ota_update_request) - - - -Update Project Firmware - -### Example - -* Api Key Authentication (api_key): - -```python -import notehub_py -from notehub_py.models.ota_update_request import OTAUpdateRequest -from notehub_py.models.ota_update_status import OTAUpdateStatus -from notehub_py.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.notefile.net -# See configuration.py for a list of all supported configuration parameters. -configuration = notehub_py.Configuration( - host = "https://api.notefile.net" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: api_key -configuration.api_key['api_key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['api_key'] = 'Bearer' - -# Enter a context with an instance of the API client -with notehub_py.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = notehub_py.ProjectApi(api_client) - project_uid = 'app:2606f411-dea6-44a0-9743-1130f57d77d8' # str | - ota_update_request = notehub_py.OTAUpdateRequest() # OTAUpdateRequest | Body or payload of firmware update - - try: - api_response = api_instance.update_project_firmware(project_uid, ota_update_request) - print("The response of ProjectApi->update_project_firmware:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ProjectApi->update_project_firmware: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **project_uid** | **str**| | - **ota_update_request** | [**OTAUpdateRequest**](OTAUpdateRequest.md)| Body or payload of firmware update | - -### Return type - -[**List[OTAUpdateStatus]**](OTAUpdateStatus.md) - -### Authorization - -[api_key](../README.md#api_key) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Success | - | -**0** | The response body in case of an API error. | - | - -[[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) - diff --git a/src/docs/RouteApi.md b/src/docs/RouteApi.md index de13c83..e57c69d 100644 --- a/src/docs/RouteApi.md +++ b/src/docs/RouteApi.md @@ -13,7 +13,7 @@ Method | HTTP request | Description # **create_route** -> Route create_route(project_uid, route) +> NotehubRoute create_route(project_uid, notehub_route) @@ -25,7 +25,7 @@ Create Route within a Project ```python import notehub_py -from notehub_py.models.route import Route +from notehub_py.models.notehub_route import NotehubRoute from notehub_py.rest import ApiException from pprint import pprint @@ -51,7 +51,7 @@ with notehub_py.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = notehub_py.RouteApi(api_client) project_uid = 'app:2606f411-dea6-44a0-9743-1130f57d77d8' # str | - route = { + notehub_route = { "label": "Route Label", "type":"http", "http": { @@ -60,10 +60,10 @@ with notehub_py.ApiClient(configuration) as api_client: "url": "http://route.url" } } - # Route | Route to be Created + # NotehubRoute | Route to be Created try: - api_response = api_instance.create_route(project_uid, route) + api_response = api_instance.create_route(project_uid, notehub_route) print("The response of RouteApi->create_route:\n") pprint(api_response) except Exception as e: @@ -78,11 +78,11 @@ with notehub_py.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **project_uid** | **str**| | - **route** | [**Route**](Route.md)| Route to be Created | + **notehub_route** | [**NotehubRoute**](NotehubRoute.md)| Route to be Created | ### Return type -[**Route**](Route.md) +[**NotehubRoute**](NotehubRoute.md) ### Authorization @@ -183,7 +183,7 @@ Name | Type | Description | Notes [[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) # **get_route** -> Route get_route(project_uid, route_uid) +> NotehubRoute get_route(project_uid, route_uid) @@ -195,7 +195,7 @@ Get single route within a project ```python import notehub_py -from notehub_py.models.route import Route +from notehub_py.models.notehub_route import NotehubRoute from notehub_py.rest import ApiException from pprint import pprint @@ -243,7 +243,7 @@ Name | Type | Description | Notes ### Return type -[**Route**](Route.md) +[**NotehubRoute**](NotehubRoute.md) ### Authorization @@ -442,7 +442,7 @@ Name | Type | Description | Notes [[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) # **update_route** -> Route update_route(project_uid, route_uid, route) +> NotehubRoute update_route(project_uid, route_uid, notehub_route) @@ -454,7 +454,7 @@ Update route by UID ```python import notehub_py -from notehub_py.models.route import Route +from notehub_py.models.notehub_route import NotehubRoute from notehub_py.rest import ApiException from pprint import pprint @@ -481,7 +481,7 @@ with notehub_py.ApiClient(configuration) as api_client: api_instance = notehub_py.RouteApi(api_client) project_uid = 'app:2606f411-dea6-44a0-9743-1130f57d77d8' # str | route_uid = 'route:cbd20093cba58392c9f9bbdd0cdeb1a0' # str | - route = { + notehub_route = { "http" { "filter": { "type": "include", @@ -492,10 +492,10 @@ with notehub_py.ApiClient(configuration) as api_client: "url": "http://new-route.url", }, } - # Route | Route settings to be updated + # NotehubRoute | Route settings to be updated try: - api_response = api_instance.update_route(project_uid, route_uid, route) + api_response = api_instance.update_route(project_uid, route_uid, notehub_route) print("The response of RouteApi->update_route:\n") pprint(api_response) except Exception as e: @@ -511,11 +511,11 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **project_uid** | **str**| | **route_uid** | **str**| | - **route** | [**Route**](Route.md)| Route settings to be updated | + **notehub_route** | [**NotehubRoute**](NotehubRoute.md)| Route settings to be updated | ### Return type -[**Route**](Route.md) +[**NotehubRoute**](NotehubRoute.md) ### Authorization diff --git a/src/docs/UploadMetadata.md b/src/docs/UploadMetadata.md new file mode 100644 index 0000000..56dc667 --- /dev/null +++ b/src/docs/UploadMetadata.md @@ -0,0 +1,41 @@ +# UploadMetadata + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | [optional] +**length** | **int** | | [optional] +**md5** | **str** | | [optional] +**crc32** | **int** | | [optional] +**created** | **int** | | [optional] +**modified** | **int** | | [optional] +**source** | **str** | | [optional] +**contains** | **str** | | [optional] +**found** | **str** | | [optional] +**type** | **str** | | [optional] +**tags** | **str** | | [optional] +**notes** | **str** | | [optional] +**firmware** | [**Firmware**](Firmware.md) | | [optional] + +## Example + +```python +from notehub_py.models.upload_metadata import UploadMetadata + +# TODO update the JSON string below +json = "{}" +# create an instance of UploadMetadata from a JSON string +upload_metadata_instance = UploadMetadata.from_json(json) +# print the JSON string representation of the object +print(UploadMetadata.to_json()) + +# convert the object into a dict +upload_metadata_dict = upload_metadata_instance.to_dict() +# create an instance of UploadMetadata from a dict +upload_metadata_from_dict = UploadMetadata.from_dict(upload_metadata_dict) +``` +[[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/src/docs/UserDfuStateMachine.md b/src/docs/UserDfuStateMachine.md new file mode 100644 index 0000000..721454b --- /dev/null +++ b/src/docs/UserDfuStateMachine.md @@ -0,0 +1,32 @@ +# UserDfuStateMachine + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | [**UserDfuStateMachineStatus**](UserDfuStateMachineStatus.md) | | [optional] +**created** | **datetime** | | [optional] +**from_version** | **str** | | [optional] +**metadata** | [**UploadMetadata**](UploadMetadata.md) | | [optional] + +## Example + +```python +from notehub_py.models.user_dfu_state_machine import UserDfuStateMachine + +# TODO update the JSON string below +json = "{}" +# create an instance of UserDfuStateMachine from a JSON string +user_dfu_state_machine_instance = UserDfuStateMachine.from_json(json) +# print the JSON string representation of the object +print(UserDfuStateMachine.to_json()) + +# convert the object into a dict +user_dfu_state_machine_dict = user_dfu_state_machine_instance.to_dict() +# create an instance of UserDfuStateMachine from a dict +user_dfu_state_machine_from_dict = UserDfuStateMachine.from_dict(user_dfu_state_machine_dict) +``` +[[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/src/docs/UserDfuStateMachineStatus.md b/src/docs/UserDfuStateMachineStatus.md new file mode 100644 index 0000000..5a1b2ce --- /dev/null +++ b/src/docs/UserDfuStateMachineStatus.md @@ -0,0 +1,32 @@ +# UserDfuStateMachineStatus + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**phase** | **str** | | [optional] +**phase_description** | **str** | | [optional] +**var_date** | **datetime** | | [optional] +**status** | **str** | | [optional] + +## Example + +```python +from notehub_py.models.user_dfu_state_machine_status import UserDfuStateMachineStatus + +# TODO update the JSON string below +json = "{}" +# create an instance of UserDfuStateMachineStatus from a JSON string +user_dfu_state_machine_status_instance = UserDfuStateMachineStatus.from_json(json) +# print the JSON string representation of the object +print(UserDfuStateMachineStatus.to_json()) + +# convert the object into a dict +user_dfu_state_machine_status_dict = user_dfu_state_machine_status_instance.to_dict() +# create an instance of UserDfuStateMachineStatus from a dict +user_dfu_state_machine_status_from_dict = UserDfuStateMachineStatus.from_dict(user_dfu_state_machine_status_dict) +``` +[[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/src/docs/UserFirmwareInfo.md b/src/docs/UserFirmwareInfo.md new file mode 100644 index 0000000..8c54e15 --- /dev/null +++ b/src/docs/UserFirmwareInfo.md @@ -0,0 +1,30 @@ +# UserFirmwareInfo + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**current_firmware** | [**CurrentFirmware**](CurrentFirmware.md) | | [optional] +**firmware_update** | [**UserDfuStateMachine**](UserDfuStateMachine.md) | | [optional] + +## Example + +```python +from notehub_py.models.user_firmware_info import UserFirmwareInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of UserFirmwareInfo from a JSON string +user_firmware_info_instance = UserFirmwareInfo.from_json(json) +# print the JSON string representation of the object +print(UserFirmwareInfo.to_json()) + +# convert the object into a dict +user_firmware_info_dict = user_firmware_info_instance.to_dict() +# create an instance of UserFirmwareInfo from a dict +user_firmware_info_from_dict = UserFirmwareInfo.from_dict(user_firmware_info_dict) +``` +[[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/src/notehub_py/__init__.py b/src/notehub_py/__init__.py index 286daa2..0a3a390 100644 --- a/src/notehub_py/__init__.py +++ b/src/notehub_py/__init__.py @@ -7,7 +7,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -53,19 +53,28 @@ from notehub_py.models.create_monitor import CreateMonitor from notehub_py.models.create_product_request import CreateProductRequest from notehub_py.models.create_project_request import CreateProjectRequest +from notehub_py.models.current_firmware import CurrentFirmware from notehub_py.models.dfu_env import DFUEnv from notehub_py.models.dfu_state import DFUState from notehub_py.models.delete_device_fleets_request import DeleteDeviceFleetsRequest from notehub_py.models.device import Device +from notehub_py.models.device_dfu_history import DeviceDfuHistory +from notehub_py.models.device_dfu_history_page import DeviceDfuHistoryPage +from notehub_py.models.device_dfu_state_machine import DeviceDfuStateMachine +from notehub_py.models.device_dfu_state_machine_node import DeviceDfuStateMachineNode +from notehub_py.models.device_dfu_status import DeviceDfuStatus +from notehub_py.models.device_dfu_status_current import DeviceDfuStatusCurrent +from notehub_py.models.device_dfu_status_page import DeviceDfuStatusPage from notehub_py.models.device_session import DeviceSession from notehub_py.models.device_tower_info import DeviceTowerInfo from notehub_py.models.device_usage import DeviceUsage +from notehub_py.models.dfu_action_request import DfuActionRequest from notehub_py.models.email_notification import EmailNotification from notehub_py.models.environment_variables import EnvironmentVariables from notehub_py.models.error import Error from notehub_py.models.event import Event +from notehub_py.models.firmware import Firmware from notehub_py.models.firmware_info import FirmwareInfo -from notehub_py.models.firmware_status import FirmwareStatus from notehub_py.models.fleet import Fleet from notehub_py.models.get_alerts200_response import GetAlerts200Response from notehub_py.models.get_billing_accounts200_response import GetBillingAccounts200Response @@ -102,10 +111,8 @@ from notehub_py.models.monitor_alert_routes_inner import MonitorAlertRoutesInner from notehub_py.models.mqtt import Mqtt from notehub_py.models.note import Note -from notehub_py.models.ota_status import OTAStatus -from notehub_py.models.ota_status_list import OTAStatusList -from notehub_py.models.ota_update_request import OTAUpdateRequest -from notehub_py.models.ota_update_status import OTAUpdateStatus +from notehub_py.models.notehub_route import NotehubRoute +from notehub_py.models.notehub_route_schema import NotehubRouteSchema from notehub_py.models.post_provision_project_device_request import PostProvisionProjectDeviceRequest from notehub_py.models.product import Product from notehub_py.models.project import Project @@ -114,8 +121,6 @@ from notehub_py.models.put_device_fleets_request import PutDeviceFleetsRequest from notehub_py.models.radresponder import Radresponder from notehub_py.models.role import Role -from notehub_py.models.route import Route -from notehub_py.models.route_schema import RouteSchema from notehub_py.models.slack import Slack from notehub_py.models.slack_bearer_notification import SlackBearerNotification from notehub_py.models.slack_web_hook_notification import SlackWebHookNotification @@ -125,4 +130,8 @@ from notehub_py.models.tower_location import TowerLocation from notehub_py.models.twilio import Twilio from notehub_py.models.update_fleet_request import UpdateFleetRequest +from notehub_py.models.upload_metadata import UploadMetadata from notehub_py.models.user_db_route import UserDbRoute +from notehub_py.models.user_dfu_state_machine import UserDfuStateMachine +from notehub_py.models.user_dfu_state_machine_status import UserDfuStateMachineStatus +from notehub_py.models.user_firmware_info import UserFirmwareInfo diff --git a/src/notehub_py/api/alert_api.py b/src/notehub_py/api/alert_api.py index b9db5e3..d72749e 100644 --- a/src/notehub_py/api/alert_api.py +++ b/src/notehub_py/api/alert_api.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,7 +18,7 @@ from typing_extensions import Annotated from pydantic import Field, StrictStr -from typing import List, Optional +from typing import Optional from typing_extensions import Annotated from notehub_py.models.get_alerts200_response import GetAlerts200Response @@ -46,7 +46,7 @@ def get_alerts( project_uid: StrictStr, page_size: Optional[Annotated[int, Field(le=10000, strict=True, ge=1)]] = None, page_num: Optional[Annotated[int, Field(strict=True, ge=1)]] = None, - monitor_uid: Optional[List[StrictStr]] = None, + monitor_uid: Optional[StrictStr] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -71,7 +71,7 @@ def get_alerts( :param page_num: :type page_num: int :param monitor_uid: - :type monitor_uid: List[str] + :type monitor_uid: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -125,7 +125,7 @@ def get_alerts_with_http_info( project_uid: StrictStr, page_size: Optional[Annotated[int, Field(le=10000, strict=True, ge=1)]] = None, page_num: Optional[Annotated[int, Field(strict=True, ge=1)]] = None, - monitor_uid: Optional[List[StrictStr]] = None, + monitor_uid: Optional[StrictStr] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -150,7 +150,7 @@ def get_alerts_with_http_info( :param page_num: :type page_num: int :param monitor_uid: - :type monitor_uid: List[str] + :type monitor_uid: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -204,7 +204,7 @@ def get_alerts_without_preload_content( project_uid: StrictStr, page_size: Optional[Annotated[int, Field(le=10000, strict=True, ge=1)]] = None, page_num: Optional[Annotated[int, Field(strict=True, ge=1)]] = None, - monitor_uid: Optional[List[StrictStr]] = None, + monitor_uid: Optional[StrictStr] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -229,7 +229,7 @@ def get_alerts_without_preload_content( :param page_num: :type page_num: int :param monitor_uid: - :type monitor_uid: List[str] + :type monitor_uid: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -288,7 +288,6 @@ def _get_alerts_serialize( _host = None _collection_formats: Dict[str, str] = { - 'monitorUID': 'multi', } _path_params: Dict[str, str] = {} diff --git a/src/notehub_py/api/authorization_api.py b/src/notehub_py/api/authorization_api.py index d89c68e..dddc298 100644 --- a/src/notehub_py/api/authorization_api.py +++ b/src/notehub_py/api/authorization_api.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/notehub_py/api/billing_account_api.py b/src/notehub_py/api/billing_account_api.py index 7eba369..21c60ed 100644 --- a/src/notehub_py/api/billing_account_api.py +++ b/src/notehub_py/api/billing_account_api.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/notehub_py/api/device_api.py b/src/notehub_py/api/device_api.py index 196e325..4c6a368 100644 --- a/src/notehub_py/api/device_api.py +++ b/src/notehub_py/api/device_api.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/notehub_py/api/event_api.py b/src/notehub_py/api/event_api.py index c523b55..962830b 100644 --- a/src/notehub_py/api/event_api.py +++ b/src/notehub_py/api/event_api.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -46,7 +46,7 @@ def __init__(self, api_client=None) -> None: def get_fleet_events( self, project_uid: StrictStr, - fleet_uid: Annotated[Optional[List[StrictStr]], Field(description="Filter by Fleet UID")] = None, + fleet_uid: StrictStr, page_size: Optional[Annotated[int, Field(le=10000, strict=True, ge=1)]] = None, page_num: Optional[Annotated[int, Field(strict=True, ge=1)]] = None, device_uid: Annotated[Optional[List[StrictStr]], Field(description="A Device UID.")] = None, @@ -54,6 +54,7 @@ def get_fleet_events( sort_order: Optional[StrictStr] = None, start_date: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Unix timestamp")] = None, end_date: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Unix timestamp")] = None, + date_type: Annotated[Optional[StrictStr], Field(description="Which date to filter on, either 'captured' or 'uploaded'. This will apply to the startDate and endDate parameters")] = None, system_files_only: Optional[StrictBool] = None, files: Optional[StrictStr] = None, format: Annotated[Optional[StrictStr], Field(description="Response format (JSON or CSV)")] = None, @@ -82,8 +83,8 @@ def get_fleet_events( :param project_uid: (required) :type project_uid: str - :param fleet_uid: Filter by Fleet UID - :type fleet_uid: List[str] + :param fleet_uid: (required) + :type fleet_uid: str :param page_size: :type page_size: int :param page_num: @@ -98,6 +99,8 @@ def get_fleet_events( :type start_date: int :param end_date: Unix timestamp :type end_date: int + :param date_type: Which date to filter on, either 'captured' or 'uploaded'. This will apply to the startDate and endDate parameters + :type date_type: str :param system_files_only: :type system_files_only: bool :param files: @@ -148,6 +151,7 @@ def get_fleet_events( sort_order=sort_order, start_date=start_date, end_date=end_date, + date_type=date_type, system_files_only=system_files_only, files=files, format=format, @@ -181,7 +185,7 @@ def get_fleet_events( def get_fleet_events_with_http_info( self, project_uid: StrictStr, - fleet_uid: Annotated[Optional[List[StrictStr]], Field(description="Filter by Fleet UID")] = None, + fleet_uid: StrictStr, page_size: Optional[Annotated[int, Field(le=10000, strict=True, ge=1)]] = None, page_num: Optional[Annotated[int, Field(strict=True, ge=1)]] = None, device_uid: Annotated[Optional[List[StrictStr]], Field(description="A Device UID.")] = None, @@ -189,6 +193,7 @@ def get_fleet_events_with_http_info( sort_order: Optional[StrictStr] = None, start_date: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Unix timestamp")] = None, end_date: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Unix timestamp")] = None, + date_type: Annotated[Optional[StrictStr], Field(description="Which date to filter on, either 'captured' or 'uploaded'. This will apply to the startDate and endDate parameters")] = None, system_files_only: Optional[StrictBool] = None, files: Optional[StrictStr] = None, format: Annotated[Optional[StrictStr], Field(description="Response format (JSON or CSV)")] = None, @@ -217,8 +222,8 @@ def get_fleet_events_with_http_info( :param project_uid: (required) :type project_uid: str - :param fleet_uid: Filter by Fleet UID - :type fleet_uid: List[str] + :param fleet_uid: (required) + :type fleet_uid: str :param page_size: :type page_size: int :param page_num: @@ -233,6 +238,8 @@ def get_fleet_events_with_http_info( :type start_date: int :param end_date: Unix timestamp :type end_date: int + :param date_type: Which date to filter on, either 'captured' or 'uploaded'. This will apply to the startDate and endDate parameters + :type date_type: str :param system_files_only: :type system_files_only: bool :param files: @@ -283,6 +290,7 @@ def get_fleet_events_with_http_info( sort_order=sort_order, start_date=start_date, end_date=end_date, + date_type=date_type, system_files_only=system_files_only, files=files, format=format, @@ -316,7 +324,7 @@ def get_fleet_events_with_http_info( def get_fleet_events_without_preload_content( self, project_uid: StrictStr, - fleet_uid: Annotated[Optional[List[StrictStr]], Field(description="Filter by Fleet UID")] = None, + fleet_uid: StrictStr, page_size: Optional[Annotated[int, Field(le=10000, strict=True, ge=1)]] = None, page_num: Optional[Annotated[int, Field(strict=True, ge=1)]] = None, device_uid: Annotated[Optional[List[StrictStr]], Field(description="A Device UID.")] = None, @@ -324,6 +332,7 @@ def get_fleet_events_without_preload_content( sort_order: Optional[StrictStr] = None, start_date: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Unix timestamp")] = None, end_date: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Unix timestamp")] = None, + date_type: Annotated[Optional[StrictStr], Field(description="Which date to filter on, either 'captured' or 'uploaded'. This will apply to the startDate and endDate parameters")] = None, system_files_only: Optional[StrictBool] = None, files: Optional[StrictStr] = None, format: Annotated[Optional[StrictStr], Field(description="Response format (JSON or CSV)")] = None, @@ -352,8 +361,8 @@ def get_fleet_events_without_preload_content( :param project_uid: (required) :type project_uid: str - :param fleet_uid: Filter by Fleet UID - :type fleet_uid: List[str] + :param fleet_uid: (required) + :type fleet_uid: str :param page_size: :type page_size: int :param page_num: @@ -368,6 +377,8 @@ def get_fleet_events_without_preload_content( :type start_date: int :param end_date: Unix timestamp :type end_date: int + :param date_type: Which date to filter on, either 'captured' or 'uploaded'. This will apply to the startDate and endDate parameters + :type date_type: str :param system_files_only: :type system_files_only: bool :param files: @@ -418,6 +429,7 @@ def get_fleet_events_without_preload_content( sort_order=sort_order, start_date=start_date, end_date=end_date, + date_type=date_type, system_files_only=system_files_only, files=files, format=format, @@ -454,6 +466,7 @@ def _get_fleet_events_serialize( sort_order, start_date, end_date, + date_type, system_files_only, files, format, @@ -472,7 +485,6 @@ def _get_fleet_events_serialize( _host = None _collection_formats: Dict[str, str] = { - 'fleetUID': 'multi', 'deviceUID': 'multi', 'serialNumber': 'multi', 'sessionUID': 'multi', @@ -490,11 +502,9 @@ def _get_fleet_events_serialize( # process the path parameters if project_uid is not None: _path_params['projectUID'] = project_uid - # process the query parameters if fleet_uid is not None: - - _query_params.append(('fleetUID', fleet_uid)) - + _path_params['fleetUID'] = fleet_uid + # process the query parameters if page_size is not None: _query_params.append(('pageSize', page_size)) @@ -523,6 +533,10 @@ def _get_fleet_events_serialize( _query_params.append(('endDate', end_date)) + if date_type is not None: + + _query_params.append(('dateType', date_type)) + if system_files_only is not None: _query_params.append(('systemFilesOnly', system_files_only)) @@ -1017,6 +1031,7 @@ def get_project_events( sort_order: Optional[StrictStr] = None, start_date: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Unix timestamp")] = None, end_date: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Unix timestamp")] = None, + date_type: Annotated[Optional[StrictStr], Field(description="Which date to filter on, either 'captured' or 'uploaded'. This will apply to the startDate and endDate parameters")] = None, system_files_only: Optional[StrictBool] = None, files: Optional[StrictStr] = None, format: Annotated[Optional[StrictStr], Field(description="Response format (JSON or CSV)")] = None, @@ -1060,6 +1075,8 @@ def get_project_events( :type start_date: int :param end_date: Unix timestamp :type end_date: int + :param date_type: Which date to filter on, either 'captured' or 'uploaded'. This will apply to the startDate and endDate parameters + :type date_type: str :param system_files_only: :type system_files_only: bool :param files: @@ -1111,6 +1128,7 @@ def get_project_events( sort_order=sort_order, start_date=start_date, end_date=end_date, + date_type=date_type, system_files_only=system_files_only, files=files, format=format, @@ -1152,6 +1170,7 @@ def get_project_events_with_http_info( sort_order: Optional[StrictStr] = None, start_date: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Unix timestamp")] = None, end_date: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Unix timestamp")] = None, + date_type: Annotated[Optional[StrictStr], Field(description="Which date to filter on, either 'captured' or 'uploaded'. This will apply to the startDate and endDate parameters")] = None, system_files_only: Optional[StrictBool] = None, files: Optional[StrictStr] = None, format: Annotated[Optional[StrictStr], Field(description="Response format (JSON or CSV)")] = None, @@ -1195,6 +1214,8 @@ def get_project_events_with_http_info( :type start_date: int :param end_date: Unix timestamp :type end_date: int + :param date_type: Which date to filter on, either 'captured' or 'uploaded'. This will apply to the startDate and endDate parameters + :type date_type: str :param system_files_only: :type system_files_only: bool :param files: @@ -1246,6 +1267,7 @@ def get_project_events_with_http_info( sort_order=sort_order, start_date=start_date, end_date=end_date, + date_type=date_type, system_files_only=system_files_only, files=files, format=format, @@ -1287,6 +1309,7 @@ def get_project_events_without_preload_content( sort_order: Optional[StrictStr] = None, start_date: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Unix timestamp")] = None, end_date: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Unix timestamp")] = None, + date_type: Annotated[Optional[StrictStr], Field(description="Which date to filter on, either 'captured' or 'uploaded'. This will apply to the startDate and endDate parameters")] = None, system_files_only: Optional[StrictBool] = None, files: Optional[StrictStr] = None, format: Annotated[Optional[StrictStr], Field(description="Response format (JSON or CSV)")] = None, @@ -1330,6 +1353,8 @@ def get_project_events_without_preload_content( :type start_date: int :param end_date: Unix timestamp :type end_date: int + :param date_type: Which date to filter on, either 'captured' or 'uploaded'. This will apply to the startDate and endDate parameters + :type date_type: str :param system_files_only: :type system_files_only: bool :param files: @@ -1381,6 +1406,7 @@ def get_project_events_without_preload_content( sort_order=sort_order, start_date=start_date, end_date=end_date, + date_type=date_type, system_files_only=system_files_only, files=files, format=format, @@ -1417,6 +1443,7 @@ def _get_project_events_serialize( sort_order, start_date, end_date, + date_type, system_files_only, files, format, @@ -1483,6 +1510,10 @@ def _get_project_events_serialize( _query_params.append(('endDate', end_date)) + if date_type is not None: + + _query_params.append(('dateType', date_type)) + if system_files_only is not None: _query_params.append(('systemFilesOnly', system_files_only)) diff --git a/src/notehub_py/api/monitor_api.py b/src/notehub_py/api/monitor_api.py index eed8581..d31fed9 100644 --- a/src/notehub_py/api/monitor_api.py +++ b/src/notehub_py/api/monitor_api.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/notehub_py/api/project_api.py b/src/notehub_py/api/project_api.py index 340ff8c..b7f5a2f 100644 --- a/src/notehub_py/api/project_api.py +++ b/src/notehub_py/api/project_api.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -17,7 +17,7 @@ from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import Field, StrictBool, StrictStr +from pydantic import Field, StrictBool, StrictStr, field_validator from typing import Any, Dict, List, Optional from typing_extensions import Annotated from notehub_py.models.clone_project_request import CloneProjectRequest @@ -25,6 +25,11 @@ from notehub_py.models.create_product_request import CreateProductRequest from notehub_py.models.create_project_request import CreateProjectRequest from notehub_py.models.delete_device_fleets_request import DeleteDeviceFleetsRequest +from notehub_py.models.device_dfu_history import DeviceDfuHistory +from notehub_py.models.device_dfu_history_page import DeviceDfuHistoryPage +from notehub_py.models.device_dfu_status import DeviceDfuStatus +from notehub_py.models.device_dfu_status_page import DeviceDfuStatusPage +from notehub_py.models.dfu_action_request import DfuActionRequest from notehub_py.models.environment_variables import EnvironmentVariables from notehub_py.models.firmware_info import FirmwareInfo from notehub_py.models.fleet import Fleet @@ -32,9 +37,6 @@ from notehub_py.models.get_project_members200_response import GetProjectMembers200Response from notehub_py.models.get_project_products200_response import GetProjectProducts200Response from notehub_py.models.get_projects200_response import GetProjects200Response -from notehub_py.models.ota_status_list import OTAStatusList -from notehub_py.models.ota_update_request import OTAUpdateRequest -from notehub_py.models.ota_update_status import OTAUpdateStatus from notehub_py.models.product import Product from notehub_py.models.project import Project from notehub_py.models.put_device_fleets_request import PutDeviceFleetsRequest @@ -2581,9 +2583,21 @@ def _delete_project_environment_variable_serialize( @validate_call - def disable_global_transformation( + def dfu_action( self, project_uid: StrictStr, + firmware_type: StrictStr, + action: StrictStr, + device_uid: Annotated[Optional[List[StrictStr]], Field(description="A Device UID.")] = None, + tag: Annotated[Optional[List[StrictStr]], Field(description="Tag filter")] = None, + serial_number: Annotated[Optional[List[StrictStr]], Field(description="Serial number filter")] = None, + fleet_uid: Optional[StrictStr] = None, + notecard_firmware: Annotated[Optional[List[StrictStr]], Field(description="Firmware version filter")] = None, + location: Annotated[Optional[List[StrictStr]], Field(description="Location filter")] = None, + host_firmware: Annotated[Optional[List[StrictStr]], Field(description="Host firmware filter")] = None, + product_uid: Optional[List[StrictStr]] = None, + sku: Annotated[Optional[List[StrictStr]], Field(description="SKU filter")] = None, + dfu_action_request: Annotated[Optional[DfuActionRequest], Field(description="Which firmware in the case of an update action")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2597,12 +2611,36 @@ def disable_global_transformation( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> None: - """disable_global_transformation + """dfu_action - Disable the project-level event JSONata transformation + Update/cancel host or notecard firmware updates :param project_uid: (required) :type project_uid: str + :param firmware_type: (required) + :type firmware_type: str + :param action: (required) + :type action: str + :param device_uid: A Device UID. + :type device_uid: List[str] + :param tag: Tag filter + :type tag: List[str] + :param serial_number: Serial number filter + :type serial_number: List[str] + :param fleet_uid: + :type fleet_uid: str + :param notecard_firmware: Firmware version filter + :type notecard_firmware: List[str] + :param location: Location filter + :type location: List[str] + :param host_firmware: Host firmware filter + :type host_firmware: List[str] + :param product_uid: + :type product_uid: List[str] + :param sku: SKU filter + :type sku: List[str] + :param dfu_action_request: Which firmware in the case of an update action + :type dfu_action_request: DfuActionRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2625,8 +2663,20 @@ def disable_global_transformation( :return: Returns the result object. """ # noqa: E501 - _param = self._disable_global_transformation_serialize( + _param = self._dfu_action_serialize( project_uid=project_uid, + firmware_type=firmware_type, + action=action, + device_uid=device_uid, + tag=tag, + serial_number=serial_number, + fleet_uid=fleet_uid, + notecard_firmware=notecard_firmware, + location=location, + host_firmware=host_firmware, + product_uid=product_uid, + sku=sku, + dfu_action_request=dfu_action_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2648,9 +2698,21 @@ def disable_global_transformation( @validate_call - def disable_global_transformation_with_http_info( + def dfu_action_with_http_info( self, project_uid: StrictStr, + firmware_type: StrictStr, + action: StrictStr, + device_uid: Annotated[Optional[List[StrictStr]], Field(description="A Device UID.")] = None, + tag: Annotated[Optional[List[StrictStr]], Field(description="Tag filter")] = None, + serial_number: Annotated[Optional[List[StrictStr]], Field(description="Serial number filter")] = None, + fleet_uid: Optional[StrictStr] = None, + notecard_firmware: Annotated[Optional[List[StrictStr]], Field(description="Firmware version filter")] = None, + location: Annotated[Optional[List[StrictStr]], Field(description="Location filter")] = None, + host_firmware: Annotated[Optional[List[StrictStr]], Field(description="Host firmware filter")] = None, + product_uid: Optional[List[StrictStr]] = None, + sku: Annotated[Optional[List[StrictStr]], Field(description="SKU filter")] = None, + dfu_action_request: Annotated[Optional[DfuActionRequest], Field(description="Which firmware in the case of an update action")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2664,12 +2726,36 @@ def disable_global_transformation_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: - """disable_global_transformation + """dfu_action - Disable the project-level event JSONata transformation + Update/cancel host or notecard firmware updates :param project_uid: (required) :type project_uid: str + :param firmware_type: (required) + :type firmware_type: str + :param action: (required) + :type action: str + :param device_uid: A Device UID. + :type device_uid: List[str] + :param tag: Tag filter + :type tag: List[str] + :param serial_number: Serial number filter + :type serial_number: List[str] + :param fleet_uid: + :type fleet_uid: str + :param notecard_firmware: Firmware version filter + :type notecard_firmware: List[str] + :param location: Location filter + :type location: List[str] + :param host_firmware: Host firmware filter + :type host_firmware: List[str] + :param product_uid: + :type product_uid: List[str] + :param sku: SKU filter + :type sku: List[str] + :param dfu_action_request: Which firmware in the case of an update action + :type dfu_action_request: DfuActionRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2692,8 +2778,20 @@ def disable_global_transformation_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._disable_global_transformation_serialize( + _param = self._dfu_action_serialize( project_uid=project_uid, + firmware_type=firmware_type, + action=action, + device_uid=device_uid, + tag=tag, + serial_number=serial_number, + fleet_uid=fleet_uid, + notecard_firmware=notecard_firmware, + location=location, + host_firmware=host_firmware, + product_uid=product_uid, + sku=sku, + dfu_action_request=dfu_action_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2715,9 +2813,21 @@ def disable_global_transformation_with_http_info( @validate_call - def disable_global_transformation_without_preload_content( + def dfu_action_without_preload_content( self, project_uid: StrictStr, + firmware_type: StrictStr, + action: StrictStr, + device_uid: Annotated[Optional[List[StrictStr]], Field(description="A Device UID.")] = None, + tag: Annotated[Optional[List[StrictStr]], Field(description="Tag filter")] = None, + serial_number: Annotated[Optional[List[StrictStr]], Field(description="Serial number filter")] = None, + fleet_uid: Optional[StrictStr] = None, + notecard_firmware: Annotated[Optional[List[StrictStr]], Field(description="Firmware version filter")] = None, + location: Annotated[Optional[List[StrictStr]], Field(description="Location filter")] = None, + host_firmware: Annotated[Optional[List[StrictStr]], Field(description="Host firmware filter")] = None, + product_uid: Optional[List[StrictStr]] = None, + sku: Annotated[Optional[List[StrictStr]], Field(description="SKU filter")] = None, + dfu_action_request: Annotated[Optional[DfuActionRequest], Field(description="Which firmware in the case of an update action")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2731,12 +2841,36 @@ def disable_global_transformation_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """disable_global_transformation + """dfu_action - Disable the project-level event JSONata transformation + Update/cancel host or notecard firmware updates :param project_uid: (required) :type project_uid: str + :param firmware_type: (required) + :type firmware_type: str + :param action: (required) + :type action: str + :param device_uid: A Device UID. + :type device_uid: List[str] + :param tag: Tag filter + :type tag: List[str] + :param serial_number: Serial number filter + :type serial_number: List[str] + :param fleet_uid: + :type fleet_uid: str + :param notecard_firmware: Firmware version filter + :type notecard_firmware: List[str] + :param location: Location filter + :type location: List[str] + :param host_firmware: Host firmware filter + :type host_firmware: List[str] + :param product_uid: + :type product_uid: List[str] + :param sku: SKU filter + :type sku: List[str] + :param dfu_action_request: Which firmware in the case of an update action + :type dfu_action_request: DfuActionRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2759,8 +2893,20 @@ def disable_global_transformation_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._disable_global_transformation_serialize( + _param = self._dfu_action_serialize( project_uid=project_uid, + firmware_type=firmware_type, + action=action, + device_uid=device_uid, + tag=tag, + serial_number=serial_number, + fleet_uid=fleet_uid, + notecard_firmware=notecard_firmware, + location=location, + host_firmware=host_firmware, + product_uid=product_uid, + sku=sku, + dfu_action_request=dfu_action_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2777,9 +2923,21 @@ def disable_global_transformation_without_preload_content( return response_data.response - def _disable_global_transformation_serialize( + def _dfu_action_serialize( self, project_uid, + firmware_type, + action, + device_uid, + tag, + serial_number, + fleet_uid, + notecard_firmware, + location, + host_firmware, + product_uid, + sku, + dfu_action_request, _request_auth, _content_type, _headers, @@ -2789,6 +2947,14 @@ def _disable_global_transformation_serialize( _host = None _collection_formats: Dict[str, str] = { + 'deviceUID': 'multi', + 'tag': 'multi', + 'serialNumber': 'multi', + 'notecardFirmware': 'multi', + 'location': 'multi', + 'hostFirmware': 'multi', + 'productUID': 'multi', + 'sku': 'multi', } _path_params: Dict[str, str] = {} @@ -2801,10 +2967,52 @@ def _disable_global_transformation_serialize( # process the path parameters if project_uid is not None: _path_params['projectUID'] = project_uid + if firmware_type is not None: + _path_params['firmwareType'] = firmware_type + if action is not None: + _path_params['action'] = action # process the query parameters + if device_uid is not None: + + _query_params.append(('deviceUID', device_uid)) + + if tag is not None: + + _query_params.append(('tag', tag)) + + if serial_number is not None: + + _query_params.append(('serialNumber', serial_number)) + + if fleet_uid is not None: + + _query_params.append(('fleetUID', fleet_uid)) + + if notecard_firmware is not None: + + _query_params.append(('notecardFirmware', notecard_firmware)) + + if location is not None: + + _query_params.append(('location', location)) + + if host_firmware is not None: + + _query_params.append(('hostFirmware', host_firmware)) + + if product_uid is not None: + + _query_params.append(('productUID', product_uid)) + + if sku is not None: + + _query_params.append(('sku', sku)) + # process the header parameters # process the form parameters # process the body parameter + if dfu_action_request is not None: + _body_params = dfu_action_request # set the HTTP header `Accept` @@ -2814,6 +3022,19 @@ def _disable_global_transformation_serialize( ] ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -2822,7 +3043,7 @@ def _disable_global_transformation_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v1/projects/{projectUID}/global-transformation/disable', + resource_path='/v1/projects/{projectUID}/dfu/{firmwareType}/{action}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2839,7 +3060,7 @@ def _disable_global_transformation_serialize( @validate_call - def enable_global_transformation( + def disable_global_transformation( self, project_uid: StrictStr, _request_timeout: Union[ @@ -2855,9 +3076,9 @@ def enable_global_transformation( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> None: - """enable_global_transformation + """disable_global_transformation - Enable the project-level event JSONata transformation + Disable the project-level event JSONata transformation :param project_uid: (required) :type project_uid: str @@ -2883,7 +3104,7 @@ def enable_global_transformation( :return: Returns the result object. """ # noqa: E501 - _param = self._enable_global_transformation_serialize( + _param = self._disable_global_transformation_serialize( project_uid=project_uid, _request_auth=_request_auth, _content_type=_content_type, @@ -2906,7 +3127,7 @@ def enable_global_transformation( @validate_call - def enable_global_transformation_with_http_info( + def disable_global_transformation_with_http_info( self, project_uid: StrictStr, _request_timeout: Union[ @@ -2922,9 +3143,9 @@ def enable_global_transformation_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: - """enable_global_transformation + """disable_global_transformation - Enable the project-level event JSONata transformation + Disable the project-level event JSONata transformation :param project_uid: (required) :type project_uid: str @@ -2950,7 +3171,7 @@ def enable_global_transformation_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._enable_global_transformation_serialize( + _param = self._disable_global_transformation_serialize( project_uid=project_uid, _request_auth=_request_auth, _content_type=_content_type, @@ -2973,7 +3194,7 @@ def enable_global_transformation_with_http_info( @validate_call - def enable_global_transformation_without_preload_content( + def disable_global_transformation_without_preload_content( self, project_uid: StrictStr, _request_timeout: Union[ @@ -2989,9 +3210,9 @@ def enable_global_transformation_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """enable_global_transformation + """disable_global_transformation - Enable the project-level event JSONata transformation + Disable the project-level event JSONata transformation :param project_uid: (required) :type project_uid: str @@ -3017,7 +3238,7 @@ def enable_global_transformation_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._enable_global_transformation_serialize( + _param = self._disable_global_transformation_serialize( project_uid=project_uid, _request_auth=_request_auth, _content_type=_content_type, @@ -3035,7 +3256,7 @@ def enable_global_transformation_without_preload_content( return response_data.response - def _enable_global_transformation_serialize( + def _disable_global_transformation_serialize( self, project_uid, _request_auth, @@ -3080,7 +3301,7 @@ def _enable_global_transformation_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v1/projects/{projectUID}/global-transformation/enable', + resource_path='/v1/projects/{projectUID}/global-transformation/disable', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3097,10 +3318,9 @@ def _enable_global_transformation_serialize( @validate_call - def get_device_fleets( + def enable_global_transformation( self, project_uid: StrictStr, - device_uid: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3113,15 +3333,13 @@ def get_device_fleets( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GetProjectFleets200Response: - """get_device_fleets + ) -> None: + """enable_global_transformation - Get Device Fleets + Enable the project-level event JSONata transformation :param project_uid: (required) :type project_uid: str - :param device_uid: (required) - :type device_uid: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3144,9 +3362,8 @@ def get_device_fleets( :return: Returns the result object. """ # noqa: E501 - _param = self._get_device_fleets_serialize( + _param = self._enable_global_transformation_serialize( project_uid=project_uid, - device_uid=device_uid, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3154,7 +3371,7 @@ def get_device_fleets( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetProjectFleets200Response", + '200': None, } response_data = self.api_client.call_api( *_param, @@ -3168,10 +3385,9 @@ def get_device_fleets( @validate_call - def get_device_fleets_with_http_info( + def enable_global_transformation_with_http_info( self, project_uid: StrictStr, - device_uid: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3184,15 +3400,13 @@ def get_device_fleets_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GetProjectFleets200Response]: - """get_device_fleets + ) -> ApiResponse[None]: + """enable_global_transformation - Get Device Fleets + Enable the project-level event JSONata transformation :param project_uid: (required) :type project_uid: str - :param device_uid: (required) - :type device_uid: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3215,9 +3429,8 @@ def get_device_fleets_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_device_fleets_serialize( + _param = self._enable_global_transformation_serialize( project_uid=project_uid, - device_uid=device_uid, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3225,7 +3438,7 @@ def get_device_fleets_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetProjectFleets200Response", + '200': None, } response_data = self.api_client.call_api( *_param, @@ -3239,10 +3452,9 @@ def get_device_fleets_with_http_info( @validate_call - def get_device_fleets_without_preload_content( + def enable_global_transformation_without_preload_content( self, project_uid: StrictStr, - device_uid: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3256,14 +3468,12 @@ def get_device_fleets_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """get_device_fleets + """enable_global_transformation - Get Device Fleets + Enable the project-level event JSONata transformation :param project_uid: (required) :type project_uid: str - :param device_uid: (required) - :type device_uid: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3286,9 +3496,8 @@ def get_device_fleets_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_device_fleets_serialize( + _param = self._enable_global_transformation_serialize( project_uid=project_uid, - device_uid=device_uid, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3296,7 +3505,7 @@ def get_device_fleets_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetProjectFleets200Response", + '200': None, } response_data = self.api_client.call_api( *_param, @@ -3305,10 +3514,9 @@ def get_device_fleets_without_preload_content( return response_data.response - def _get_device_fleets_serialize( + def _enable_global_transformation_serialize( self, project_uid, - device_uid, _request_auth, _content_type, _headers, @@ -3330,8 +3538,6 @@ def _get_device_fleets_serialize( # process the path parameters if project_uid is not None: _path_params['projectUID'] = project_uid - if device_uid is not None: - _path_params['deviceUID'] = device_uid # process the query parameters # process the header parameters # process the form parameters @@ -3352,8 +3558,8 @@ def _get_device_fleets_serialize( ] return self.api_client.param_serialize( - method='GET', - resource_path='/v1/projects/{projectUID}/devices/{deviceUID}/fleets', + method='POST', + resource_path='/v1/projects/{projectUID}/global-transformation/enable', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3370,16 +3576,11 @@ def _get_device_fleets_serialize( @validate_call - def get_firmware_info( + def get_device_dfu_history( self, project_uid: StrictStr, - product: Optional[StrictStr] = None, - firmware_type: Optional[StrictStr] = None, - version: Optional[StrictStr] = None, - target: Optional[StrictStr] = None, - filename: Optional[StrictStr] = None, - md5: Optional[StrictStr] = None, - unpublished: Optional[StrictBool] = None, + device_uid: StrictStr, + firmware_type: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3392,27 +3593,17 @@ def get_firmware_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[FirmwareInfo]: - """get_firmware_info + ) -> DeviceDfuHistory: + """get_device_dfu_history - Get Available Firmware Information + Get device DFU history for host or Notecard firmware :param project_uid: (required) :type project_uid: str - :param product: - :type product: str - :param firmware_type: + :param device_uid: (required) + :type device_uid: str + :param firmware_type: (required) :type firmware_type: str - :param version: - :type version: str - :param target: - :type target: str - :param filename: - :type filename: str - :param md5: - :type md5: str - :param unpublished: - :type unpublished: bool :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3435,15 +3626,10 @@ def get_firmware_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_firmware_info_serialize( + _param = self._get_device_dfu_history_serialize( project_uid=project_uid, - product=product, + device_uid=device_uid, firmware_type=firmware_type, - version=version, - target=target, - filename=filename, - md5=md5, - unpublished=unpublished, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3451,7 +3637,7 @@ def get_firmware_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "List[FirmwareInfo]", + '200': "DeviceDfuHistory", } response_data = self.api_client.call_api( *_param, @@ -3465,16 +3651,11 @@ def get_firmware_info( @validate_call - def get_firmware_info_with_http_info( + def get_device_dfu_history_with_http_info( self, project_uid: StrictStr, - product: Optional[StrictStr] = None, - firmware_type: Optional[StrictStr] = None, - version: Optional[StrictStr] = None, - target: Optional[StrictStr] = None, - filename: Optional[StrictStr] = None, - md5: Optional[StrictStr] = None, - unpublished: Optional[StrictBool] = None, + device_uid: StrictStr, + firmware_type: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3487,27 +3668,17 @@ def get_firmware_info_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[FirmwareInfo]]: - """get_firmware_info + ) -> ApiResponse[DeviceDfuHistory]: + """get_device_dfu_history - Get Available Firmware Information + Get device DFU history for host or Notecard firmware :param project_uid: (required) :type project_uid: str - :param product: - :type product: str - :param firmware_type: + :param device_uid: (required) + :type device_uid: str + :param firmware_type: (required) :type firmware_type: str - :param version: - :type version: str - :param target: - :type target: str - :param filename: - :type filename: str - :param md5: - :type md5: str - :param unpublished: - :type unpublished: bool :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3530,15 +3701,10 @@ def get_firmware_info_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_firmware_info_serialize( + _param = self._get_device_dfu_history_serialize( project_uid=project_uid, - product=product, + device_uid=device_uid, firmware_type=firmware_type, - version=version, - target=target, - filename=filename, - md5=md5, - unpublished=unpublished, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3546,7 +3712,7 @@ def get_firmware_info_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "List[FirmwareInfo]", + '200': "DeviceDfuHistory", } response_data = self.api_client.call_api( *_param, @@ -3560,16 +3726,11 @@ def get_firmware_info_with_http_info( @validate_call - def get_firmware_info_without_preload_content( + def get_device_dfu_history_without_preload_content( self, project_uid: StrictStr, - product: Optional[StrictStr] = None, - firmware_type: Optional[StrictStr] = None, - version: Optional[StrictStr] = None, - target: Optional[StrictStr] = None, - filename: Optional[StrictStr] = None, - md5: Optional[StrictStr] = None, - unpublished: Optional[StrictBool] = None, + device_uid: StrictStr, + firmware_type: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3583,26 +3744,16 @@ def get_firmware_info_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """get_firmware_info + """get_device_dfu_history - Get Available Firmware Information + Get device DFU history for host or Notecard firmware :param project_uid: (required) :type project_uid: str - :param product: - :type product: str - :param firmware_type: + :param device_uid: (required) + :type device_uid: str + :param firmware_type: (required) :type firmware_type: str - :param version: - :type version: str - :param target: - :type target: str - :param filename: - :type filename: str - :param md5: - :type md5: str - :param unpublished: - :type unpublished: bool :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3625,15 +3776,10 @@ def get_firmware_info_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_firmware_info_serialize( + _param = self._get_device_dfu_history_serialize( project_uid=project_uid, - product=product, + device_uid=device_uid, firmware_type=firmware_type, - version=version, - target=target, - filename=filename, - md5=md5, - unpublished=unpublished, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3641,7 +3787,7 @@ def get_firmware_info_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "List[FirmwareInfo]", + '200': "DeviceDfuHistory", } response_data = self.api_client.call_api( *_param, @@ -3650,16 +3796,11 @@ def get_firmware_info_without_preload_content( return response_data.response - def _get_firmware_info_serialize( + def _get_device_dfu_history_serialize( self, project_uid, - product, + device_uid, firmware_type, - version, - target, - filename, - md5, - unpublished, _request_auth, _content_type, _headers, @@ -3681,35 +3822,11 @@ def _get_firmware_info_serialize( # process the path parameters if project_uid is not None: _path_params['projectUID'] = project_uid - # process the query parameters - if product is not None: - - _query_params.append(('product', product)) - + if device_uid is not None: + _path_params['deviceUID'] = device_uid if firmware_type is not None: - - _query_params.append(('firmwareType', firmware_type)) - - if version is not None: - - _query_params.append(('version', version)) - - if target is not None: - - _query_params.append(('target', target)) - - if filename is not None: - - _query_params.append(('filename', filename)) - - if md5 is not None: - - _query_params.append(('md5', md5)) - - if unpublished is not None: - - _query_params.append(('unpublished', unpublished)) - + _path_params['firmwareType'] = firmware_type + # process the query parameters # process the header parameters # process the form parameters # process the body parameter @@ -3730,7 +3847,7 @@ def _get_firmware_info_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/v1/projects/{projectUID}/firmware', + resource_path='/v1/projects/{projectUID}/devices/{deviceUID}/dfu/{firmwareType}/history', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3747,10 +3864,11 @@ def _get_firmware_info_serialize( @validate_call - def get_fleet_environment_variables( + def get_device_dfu_status( self, project_uid: StrictStr, - fleet_uid: StrictStr, + device_uid: StrictStr, + firmware_type: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3763,15 +3881,17 @@ def get_fleet_environment_variables( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> EnvironmentVariables: - """get_fleet_environment_variables + ) -> DeviceDfuStatus: + """get_device_dfu_status - Get environment variables of a fleet + Get device DFU history for host or Notecard firmware :param project_uid: (required) :type project_uid: str - :param fleet_uid: (required) - :type fleet_uid: str + :param device_uid: (required) + :type device_uid: str + :param firmware_type: (required) + :type firmware_type: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3794,9 +3914,10 @@ def get_fleet_environment_variables( :return: Returns the result object. """ # noqa: E501 - _param = self._get_fleet_environment_variables_serialize( + _param = self._get_device_dfu_status_serialize( project_uid=project_uid, - fleet_uid=fleet_uid, + device_uid=device_uid, + firmware_type=firmware_type, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3804,7 +3925,7 @@ def get_fleet_environment_variables( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "EnvironmentVariables", + '200': "DeviceDfuStatus", } response_data = self.api_client.call_api( *_param, @@ -3818,10 +3939,11 @@ def get_fleet_environment_variables( @validate_call - def get_fleet_environment_variables_with_http_info( + def get_device_dfu_status_with_http_info( self, project_uid: StrictStr, - fleet_uid: StrictStr, + device_uid: StrictStr, + firmware_type: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3834,15 +3956,17 @@ def get_fleet_environment_variables_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[EnvironmentVariables]: - """get_fleet_environment_variables + ) -> ApiResponse[DeviceDfuStatus]: + """get_device_dfu_status - Get environment variables of a fleet + Get device DFU history for host or Notecard firmware :param project_uid: (required) :type project_uid: str - :param fleet_uid: (required) - :type fleet_uid: str + :param device_uid: (required) + :type device_uid: str + :param firmware_type: (required) + :type firmware_type: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3865,9 +3989,10 @@ def get_fleet_environment_variables_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_fleet_environment_variables_serialize( + _param = self._get_device_dfu_status_serialize( project_uid=project_uid, - fleet_uid=fleet_uid, + device_uid=device_uid, + firmware_type=firmware_type, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3875,7 +4000,7 @@ def get_fleet_environment_variables_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "EnvironmentVariables", + '200': "DeviceDfuStatus", } response_data = self.api_client.call_api( *_param, @@ -3889,10 +4014,11 @@ def get_fleet_environment_variables_with_http_info( @validate_call - def get_fleet_environment_variables_without_preload_content( + def get_device_dfu_status_without_preload_content( self, project_uid: StrictStr, - fleet_uid: StrictStr, + device_uid: StrictStr, + firmware_type: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3906,14 +4032,16 @@ def get_fleet_environment_variables_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """get_fleet_environment_variables + """get_device_dfu_status - Get environment variables of a fleet + Get device DFU history for host or Notecard firmware :param project_uid: (required) :type project_uid: str - :param fleet_uid: (required) - :type fleet_uid: str + :param device_uid: (required) + :type device_uid: str + :param firmware_type: (required) + :type firmware_type: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3936,9 +4064,10 @@ def get_fleet_environment_variables_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_fleet_environment_variables_serialize( + _param = self._get_device_dfu_status_serialize( project_uid=project_uid, - fleet_uid=fleet_uid, + device_uid=device_uid, + firmware_type=firmware_type, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3946,7 +4075,7 @@ def get_fleet_environment_variables_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "EnvironmentVariables", + '200': "DeviceDfuStatus", } response_data = self.api_client.call_api( *_param, @@ -3955,10 +4084,11 @@ def get_fleet_environment_variables_without_preload_content( return response_data.response - def _get_fleet_environment_variables_serialize( + def _get_device_dfu_status_serialize( self, project_uid, - fleet_uid, + device_uid, + firmware_type, _request_auth, _content_type, _headers, @@ -3980,8 +4110,10 @@ def _get_fleet_environment_variables_serialize( # process the path parameters if project_uid is not None: _path_params['projectUID'] = project_uid - if fleet_uid is not None: - _path_params['fleetUID'] = fleet_uid + if device_uid is not None: + _path_params['deviceUID'] = device_uid + if firmware_type is not None: + _path_params['firmwareType'] = firmware_type # process the query parameters # process the header parameters # process the form parameters @@ -4003,7 +4135,7 @@ def _get_fleet_environment_variables_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/v1/projects/{projectUID}/fleets/{fleetUID}/environment_variables', + resource_path='/v1/projects/{projectUID}/devices/{deviceUID}/dfu/{firmwareType}/status', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4020,9 +4152,10 @@ def _get_fleet_environment_variables_serialize( @validate_call - def get_project( + def get_device_fleets( self, project_uid: StrictStr, + device_uid: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4035,13 +4168,15 @@ def get_project( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Project: - """get_project + ) -> GetProjectFleets200Response: + """get_device_fleets - Get a Project by ProjectUID + Get Device Fleets :param project_uid: (required) :type project_uid: str + :param device_uid: (required) + :type device_uid: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4064,8 +4199,9 @@ def get_project( :return: Returns the result object. """ # noqa: E501 - _param = self._get_project_serialize( + _param = self._get_device_fleets_serialize( project_uid=project_uid, + device_uid=device_uid, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4073,7 +4209,7 @@ def get_project( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Project", + '200': "GetProjectFleets200Response", } response_data = self.api_client.call_api( *_param, @@ -4087,9 +4223,10 @@ def get_project( @validate_call - def get_project_with_http_info( + def get_device_fleets_with_http_info( self, project_uid: StrictStr, + device_uid: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4102,13 +4239,15 @@ def get_project_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Project]: - """get_project + ) -> ApiResponse[GetProjectFleets200Response]: + """get_device_fleets - Get a Project by ProjectUID + Get Device Fleets :param project_uid: (required) :type project_uid: str + :param device_uid: (required) + :type device_uid: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4131,8 +4270,9 @@ def get_project_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_project_serialize( + _param = self._get_device_fleets_serialize( project_uid=project_uid, + device_uid=device_uid, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4140,7 +4280,7 @@ def get_project_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Project", + '200': "GetProjectFleets200Response", } response_data = self.api_client.call_api( *_param, @@ -4154,9 +4294,10 @@ def get_project_with_http_info( @validate_call - def get_project_without_preload_content( + def get_device_fleets_without_preload_content( self, project_uid: StrictStr, + device_uid: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4170,12 +4311,14 @@ def get_project_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """get_project + """get_device_fleets - Get a Project by ProjectUID + Get Device Fleets :param project_uid: (required) :type project_uid: str + :param device_uid: (required) + :type device_uid: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4198,8 +4341,9 @@ def get_project_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_project_serialize( + _param = self._get_device_fleets_serialize( project_uid=project_uid, + device_uid=device_uid, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4207,7 +4351,7 @@ def get_project_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Project", + '200': "GetProjectFleets200Response", } response_data = self.api_client.call_api( *_param, @@ -4216,9 +4360,10 @@ def get_project_without_preload_content( return response_data.response - def _get_project_serialize( + def _get_device_fleets_serialize( self, project_uid, + device_uid, _request_auth, _content_type, _headers, @@ -4240,6 +4385,8 @@ def _get_project_serialize( # process the path parameters if project_uid is not None: _path_params['projectUID'] = project_uid + if device_uid is not None: + _path_params['deviceUID'] = device_uid # process the query parameters # process the header parameters # process the form parameters @@ -4261,7 +4408,7 @@ def _get_project_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/v1/projects/{projectUID}', + resource_path='/v1/projects/{projectUID}/devices/{deviceUID}/fleets', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4278,9 +4425,23 @@ def _get_project_serialize( @validate_call - def get_project_by_product( + def get_devices_dfu_history( self, - product_uid: StrictStr, + project_uid: StrictStr, + firmware_type: StrictStr, + page_size: Optional[Annotated[int, Field(le=10000, strict=True, ge=1)]] = None, + page_num: Optional[Annotated[int, Field(strict=True, ge=1)]] = None, + sort_by: Optional[StrictStr] = None, + sort_order: Optional[StrictStr] = None, + device_uid: Annotated[Optional[List[StrictStr]], Field(description="A Device UID.")] = None, + tag: Annotated[Optional[List[StrictStr]], Field(description="Tag filter")] = None, + serial_number: Annotated[Optional[List[StrictStr]], Field(description="Serial number filter")] = None, + fleet_uid: Optional[StrictStr] = None, + notecard_firmware: Annotated[Optional[List[StrictStr]], Field(description="Firmware version filter")] = None, + location: Annotated[Optional[List[StrictStr]], Field(description="Location filter")] = None, + host_firmware: Annotated[Optional[List[StrictStr]], Field(description="Host firmware filter")] = None, + product_uid: Optional[List[StrictStr]] = None, + sku: Annotated[Optional[List[StrictStr]], Field(description="SKU filter")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4293,13 +4454,1653 @@ def get_project_by_product( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Project: - """get_project_by_product + ) -> DeviceDfuHistoryPage: + """get_devices_dfu_history - Get a Project by ProductUID + Get host or Notecard DFU history for all devices that match the filter criteria + + :param project_uid: (required) + :type project_uid: str + :param firmware_type: (required) + :type firmware_type: str + :param page_size: + :type page_size: int + :param page_num: + :type page_num: int + :param sort_by: + :type sort_by: str + :param sort_order: + :type sort_order: str + :param device_uid: A Device UID. + :type device_uid: List[str] + :param tag: Tag filter + :type tag: List[str] + :param serial_number: Serial number filter + :type serial_number: List[str] + :param fleet_uid: + :type fleet_uid: str + :param notecard_firmware: Firmware version filter + :type notecard_firmware: List[str] + :param location: Location filter + :type location: List[str] + :param host_firmware: Host firmware filter + :type host_firmware: List[str] + :param product_uid: + :type product_uid: List[str] + :param sku: SKU filter + :type sku: List[str] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_devices_dfu_history_serialize( + project_uid=project_uid, + firmware_type=firmware_type, + page_size=page_size, + page_num=page_num, + sort_by=sort_by, + sort_order=sort_order, + device_uid=device_uid, + tag=tag, + serial_number=serial_number, + fleet_uid=fleet_uid, + notecard_firmware=notecard_firmware, + location=location, + host_firmware=host_firmware, + product_uid=product_uid, + sku=sku, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DeviceDfuHistoryPage", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_devices_dfu_history_with_http_info( + self, + project_uid: StrictStr, + firmware_type: StrictStr, + page_size: Optional[Annotated[int, Field(le=10000, strict=True, ge=1)]] = None, + page_num: Optional[Annotated[int, Field(strict=True, ge=1)]] = None, + sort_by: Optional[StrictStr] = None, + sort_order: Optional[StrictStr] = None, + device_uid: Annotated[Optional[List[StrictStr]], Field(description="A Device UID.")] = None, + tag: Annotated[Optional[List[StrictStr]], Field(description="Tag filter")] = None, + serial_number: Annotated[Optional[List[StrictStr]], Field(description="Serial number filter")] = None, + fleet_uid: Optional[StrictStr] = None, + notecard_firmware: Annotated[Optional[List[StrictStr]], Field(description="Firmware version filter")] = None, + location: Annotated[Optional[List[StrictStr]], Field(description="Location filter")] = None, + host_firmware: Annotated[Optional[List[StrictStr]], Field(description="Host firmware filter")] = None, + product_uid: Optional[List[StrictStr]] = None, + sku: Annotated[Optional[List[StrictStr]], Field(description="SKU filter")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[DeviceDfuHistoryPage]: + """get_devices_dfu_history + + Get host or Notecard DFU history for all devices that match the filter criteria + + :param project_uid: (required) + :type project_uid: str + :param firmware_type: (required) + :type firmware_type: str + :param page_size: + :type page_size: int + :param page_num: + :type page_num: int + :param sort_by: + :type sort_by: str + :param sort_order: + :type sort_order: str + :param device_uid: A Device UID. + :type device_uid: List[str] + :param tag: Tag filter + :type tag: List[str] + :param serial_number: Serial number filter + :type serial_number: List[str] + :param fleet_uid: + :type fleet_uid: str + :param notecard_firmware: Firmware version filter + :type notecard_firmware: List[str] + :param location: Location filter + :type location: List[str] + :param host_firmware: Host firmware filter + :type host_firmware: List[str] + :param product_uid: + :type product_uid: List[str] + :param sku: SKU filter + :type sku: List[str] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_devices_dfu_history_serialize( + project_uid=project_uid, + firmware_type=firmware_type, + page_size=page_size, + page_num=page_num, + sort_by=sort_by, + sort_order=sort_order, + device_uid=device_uid, + tag=tag, + serial_number=serial_number, + fleet_uid=fleet_uid, + notecard_firmware=notecard_firmware, + location=location, + host_firmware=host_firmware, + product_uid=product_uid, + sku=sku, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DeviceDfuHistoryPage", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_devices_dfu_history_without_preload_content( + self, + project_uid: StrictStr, + firmware_type: StrictStr, + page_size: Optional[Annotated[int, Field(le=10000, strict=True, ge=1)]] = None, + page_num: Optional[Annotated[int, Field(strict=True, ge=1)]] = None, + sort_by: Optional[StrictStr] = None, + sort_order: Optional[StrictStr] = None, + device_uid: Annotated[Optional[List[StrictStr]], Field(description="A Device UID.")] = None, + tag: Annotated[Optional[List[StrictStr]], Field(description="Tag filter")] = None, + serial_number: Annotated[Optional[List[StrictStr]], Field(description="Serial number filter")] = None, + fleet_uid: Optional[StrictStr] = None, + notecard_firmware: Annotated[Optional[List[StrictStr]], Field(description="Firmware version filter")] = None, + location: Annotated[Optional[List[StrictStr]], Field(description="Location filter")] = None, + host_firmware: Annotated[Optional[List[StrictStr]], Field(description="Host firmware filter")] = None, + product_uid: Optional[List[StrictStr]] = None, + sku: Annotated[Optional[List[StrictStr]], Field(description="SKU filter")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """get_devices_dfu_history + + Get host or Notecard DFU history for all devices that match the filter criteria + + :param project_uid: (required) + :type project_uid: str + :param firmware_type: (required) + :type firmware_type: str + :param page_size: + :type page_size: int + :param page_num: + :type page_num: int + :param sort_by: + :type sort_by: str + :param sort_order: + :type sort_order: str + :param device_uid: A Device UID. + :type device_uid: List[str] + :param tag: Tag filter + :type tag: List[str] + :param serial_number: Serial number filter + :type serial_number: List[str] + :param fleet_uid: + :type fleet_uid: str + :param notecard_firmware: Firmware version filter + :type notecard_firmware: List[str] + :param location: Location filter + :type location: List[str] + :param host_firmware: Host firmware filter + :type host_firmware: List[str] + :param product_uid: + :type product_uid: List[str] + :param sku: SKU filter + :type sku: List[str] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_devices_dfu_history_serialize( + project_uid=project_uid, + firmware_type=firmware_type, + page_size=page_size, + page_num=page_num, + sort_by=sort_by, + sort_order=sort_order, + device_uid=device_uid, + tag=tag, + serial_number=serial_number, + fleet_uid=fleet_uid, + notecard_firmware=notecard_firmware, + location=location, + host_firmware=host_firmware, + product_uid=product_uid, + sku=sku, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DeviceDfuHistoryPage", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_devices_dfu_history_serialize( + self, + project_uid, + firmware_type, + page_size, + page_num, + sort_by, + sort_order, + device_uid, + tag, + serial_number, + fleet_uid, + notecard_firmware, + location, + host_firmware, + product_uid, + sku, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'deviceUID': 'multi', + 'tag': 'multi', + 'serialNumber': 'multi', + 'notecardFirmware': 'multi', + 'location': 'multi', + 'hostFirmware': 'multi', + 'productUID': 'multi', + 'sku': 'multi', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if project_uid is not None: + _path_params['projectUID'] = project_uid + if firmware_type is not None: + _path_params['firmwareType'] = firmware_type + # process the query parameters + if page_size is not None: + + _query_params.append(('pageSize', page_size)) + + if page_num is not None: + + _query_params.append(('pageNum', page_num)) + + if sort_by is not None: + + _query_params.append(('sortBy', sort_by)) + + if sort_order is not None: + + _query_params.append(('sortOrder', sort_order)) + + if device_uid is not None: + + _query_params.append(('deviceUID', device_uid)) + + if tag is not None: + + _query_params.append(('tag', tag)) + + if serial_number is not None: + + _query_params.append(('serialNumber', serial_number)) + + if fleet_uid is not None: + + _query_params.append(('fleetUID', fleet_uid)) + + if notecard_firmware is not None: + + _query_params.append(('notecardFirmware', notecard_firmware)) + + if location is not None: + + _query_params.append(('location', location)) + + if host_firmware is not None: + + _query_params.append(('hostFirmware', host_firmware)) + + if product_uid is not None: + + _query_params.append(('productUID', product_uid)) + + if sku is not None: + + _query_params.append(('sku', sku)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'api_key' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/projects/{projectUID}/dfu/{firmwareType}/history', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_devices_dfu_status( + self, + project_uid: StrictStr, + firmware_type: StrictStr, + page_size: Optional[Annotated[int, Field(le=10000, strict=True, ge=1)]] = None, + page_num: Optional[Annotated[int, Field(strict=True, ge=1)]] = None, + sort_by: Optional[StrictStr] = None, + sort_order: Optional[StrictStr] = None, + device_uid: Annotated[Optional[List[StrictStr]], Field(description="A Device UID.")] = None, + tag: Annotated[Optional[List[StrictStr]], Field(description="Tag filter")] = None, + serial_number: Annotated[Optional[List[StrictStr]], Field(description="Serial number filter")] = None, + fleet_uid: Optional[StrictStr] = None, + notecard_firmware: Annotated[Optional[List[StrictStr]], Field(description="Firmware version filter")] = None, + location: Annotated[Optional[List[StrictStr]], Field(description="Location filter")] = None, + host_firmware: Annotated[Optional[List[StrictStr]], Field(description="Host firmware filter")] = None, + product_uid: Optional[List[StrictStr]] = None, + sku: Annotated[Optional[List[StrictStr]], Field(description="SKU filter")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> DeviceDfuStatusPage: + """get_devices_dfu_status + + Get host or Notecard DFU history for all devices that match the filter criteria + + :param project_uid: (required) + :type project_uid: str + :param firmware_type: (required) + :type firmware_type: str + :param page_size: + :type page_size: int + :param page_num: + :type page_num: int + :param sort_by: + :type sort_by: str + :param sort_order: + :type sort_order: str + :param device_uid: A Device UID. + :type device_uid: List[str] + :param tag: Tag filter + :type tag: List[str] + :param serial_number: Serial number filter + :type serial_number: List[str] + :param fleet_uid: + :type fleet_uid: str + :param notecard_firmware: Firmware version filter + :type notecard_firmware: List[str] + :param location: Location filter + :type location: List[str] + :param host_firmware: Host firmware filter + :type host_firmware: List[str] + :param product_uid: + :type product_uid: List[str] + :param sku: SKU filter + :type sku: List[str] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_devices_dfu_status_serialize( + project_uid=project_uid, + firmware_type=firmware_type, + page_size=page_size, + page_num=page_num, + sort_by=sort_by, + sort_order=sort_order, + device_uid=device_uid, + tag=tag, + serial_number=serial_number, + fleet_uid=fleet_uid, + notecard_firmware=notecard_firmware, + location=location, + host_firmware=host_firmware, + product_uid=product_uid, + sku=sku, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DeviceDfuStatusPage", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_devices_dfu_status_with_http_info( + self, + project_uid: StrictStr, + firmware_type: StrictStr, + page_size: Optional[Annotated[int, Field(le=10000, strict=True, ge=1)]] = None, + page_num: Optional[Annotated[int, Field(strict=True, ge=1)]] = None, + sort_by: Optional[StrictStr] = None, + sort_order: Optional[StrictStr] = None, + device_uid: Annotated[Optional[List[StrictStr]], Field(description="A Device UID.")] = None, + tag: Annotated[Optional[List[StrictStr]], Field(description="Tag filter")] = None, + serial_number: Annotated[Optional[List[StrictStr]], Field(description="Serial number filter")] = None, + fleet_uid: Optional[StrictStr] = None, + notecard_firmware: Annotated[Optional[List[StrictStr]], Field(description="Firmware version filter")] = None, + location: Annotated[Optional[List[StrictStr]], Field(description="Location filter")] = None, + host_firmware: Annotated[Optional[List[StrictStr]], Field(description="Host firmware filter")] = None, + product_uid: Optional[List[StrictStr]] = None, + sku: Annotated[Optional[List[StrictStr]], Field(description="SKU filter")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[DeviceDfuStatusPage]: + """get_devices_dfu_status + + Get host or Notecard DFU history for all devices that match the filter criteria + + :param project_uid: (required) + :type project_uid: str + :param firmware_type: (required) + :type firmware_type: str + :param page_size: + :type page_size: int + :param page_num: + :type page_num: int + :param sort_by: + :type sort_by: str + :param sort_order: + :type sort_order: str + :param device_uid: A Device UID. + :type device_uid: List[str] + :param tag: Tag filter + :type tag: List[str] + :param serial_number: Serial number filter + :type serial_number: List[str] + :param fleet_uid: + :type fleet_uid: str + :param notecard_firmware: Firmware version filter + :type notecard_firmware: List[str] + :param location: Location filter + :type location: List[str] + :param host_firmware: Host firmware filter + :type host_firmware: List[str] + :param product_uid: + :type product_uid: List[str] + :param sku: SKU filter + :type sku: List[str] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_devices_dfu_status_serialize( + project_uid=project_uid, + firmware_type=firmware_type, + page_size=page_size, + page_num=page_num, + sort_by=sort_by, + sort_order=sort_order, + device_uid=device_uid, + tag=tag, + serial_number=serial_number, + fleet_uid=fleet_uid, + notecard_firmware=notecard_firmware, + location=location, + host_firmware=host_firmware, + product_uid=product_uid, + sku=sku, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DeviceDfuStatusPage", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_devices_dfu_status_without_preload_content( + self, + project_uid: StrictStr, + firmware_type: StrictStr, + page_size: Optional[Annotated[int, Field(le=10000, strict=True, ge=1)]] = None, + page_num: Optional[Annotated[int, Field(strict=True, ge=1)]] = None, + sort_by: Optional[StrictStr] = None, + sort_order: Optional[StrictStr] = None, + device_uid: Annotated[Optional[List[StrictStr]], Field(description="A Device UID.")] = None, + tag: Annotated[Optional[List[StrictStr]], Field(description="Tag filter")] = None, + serial_number: Annotated[Optional[List[StrictStr]], Field(description="Serial number filter")] = None, + fleet_uid: Optional[StrictStr] = None, + notecard_firmware: Annotated[Optional[List[StrictStr]], Field(description="Firmware version filter")] = None, + location: Annotated[Optional[List[StrictStr]], Field(description="Location filter")] = None, + host_firmware: Annotated[Optional[List[StrictStr]], Field(description="Host firmware filter")] = None, + product_uid: Optional[List[StrictStr]] = None, + sku: Annotated[Optional[List[StrictStr]], Field(description="SKU filter")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """get_devices_dfu_status + + Get host or Notecard DFU history for all devices that match the filter criteria + + :param project_uid: (required) + :type project_uid: str + :param firmware_type: (required) + :type firmware_type: str + :param page_size: + :type page_size: int + :param page_num: + :type page_num: int + :param sort_by: + :type sort_by: str + :param sort_order: + :type sort_order: str + :param device_uid: A Device UID. + :type device_uid: List[str] + :param tag: Tag filter + :type tag: List[str] + :param serial_number: Serial number filter + :type serial_number: List[str] + :param fleet_uid: + :type fleet_uid: str + :param notecard_firmware: Firmware version filter + :type notecard_firmware: List[str] + :param location: Location filter + :type location: List[str] + :param host_firmware: Host firmware filter + :type host_firmware: List[str] + :param product_uid: + :type product_uid: List[str] + :param sku: SKU filter + :type sku: List[str] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_devices_dfu_status_serialize( + project_uid=project_uid, + firmware_type=firmware_type, + page_size=page_size, + page_num=page_num, + sort_by=sort_by, + sort_order=sort_order, + device_uid=device_uid, + tag=tag, + serial_number=serial_number, + fleet_uid=fleet_uid, + notecard_firmware=notecard_firmware, + location=location, + host_firmware=host_firmware, + product_uid=product_uid, + sku=sku, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DeviceDfuStatusPage", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_devices_dfu_status_serialize( + self, + project_uid, + firmware_type, + page_size, + page_num, + sort_by, + sort_order, + device_uid, + tag, + serial_number, + fleet_uid, + notecard_firmware, + location, + host_firmware, + product_uid, + sku, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'deviceUID': 'multi', + 'tag': 'multi', + 'serialNumber': 'multi', + 'notecardFirmware': 'multi', + 'location': 'multi', + 'hostFirmware': 'multi', + 'productUID': 'multi', + 'sku': 'multi', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if project_uid is not None: + _path_params['projectUID'] = project_uid + if firmware_type is not None: + _path_params['firmwareType'] = firmware_type + # process the query parameters + if page_size is not None: + + _query_params.append(('pageSize', page_size)) + + if page_num is not None: + + _query_params.append(('pageNum', page_num)) + + if sort_by is not None: + + _query_params.append(('sortBy', sort_by)) + + if sort_order is not None: + + _query_params.append(('sortOrder', sort_order)) + + if device_uid is not None: + + _query_params.append(('deviceUID', device_uid)) + + if tag is not None: + + _query_params.append(('tag', tag)) + + if serial_number is not None: + + _query_params.append(('serialNumber', serial_number)) + + if fleet_uid is not None: + + _query_params.append(('fleetUID', fleet_uid)) + + if notecard_firmware is not None: + + _query_params.append(('notecardFirmware', notecard_firmware)) + + if location is not None: + + _query_params.append(('location', location)) + + if host_firmware is not None: + + _query_params.append(('hostFirmware', host_firmware)) + + if product_uid is not None: + + _query_params.append(('productUID', product_uid)) + + if sku is not None: + + _query_params.append(('sku', sku)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'api_key' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/projects/{projectUID}/dfu/{firmwareType}/status', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_firmware_info( + self, + project_uid: StrictStr, + product: Optional[StrictStr] = None, + firmware_type: Optional[StrictStr] = None, + version: Optional[StrictStr] = None, + target: Optional[StrictStr] = None, + filename: Optional[StrictStr] = None, + md5: Optional[StrictStr] = None, + unpublished: Optional[StrictBool] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[FirmwareInfo]: + """get_firmware_info + + Get Available Firmware Information + + :param project_uid: (required) + :type project_uid: str + :param product: + :type product: str + :param firmware_type: + :type firmware_type: str + :param version: + :type version: str + :param target: + :type target: str + :param filename: + :type filename: str + :param md5: + :type md5: str + :param unpublished: + :type unpublished: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_firmware_info_serialize( + project_uid=project_uid, + product=product, + firmware_type=firmware_type, + version=version, + target=target, + filename=filename, + md5=md5, + unpublished=unpublished, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[FirmwareInfo]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_firmware_info_with_http_info( + self, + project_uid: StrictStr, + product: Optional[StrictStr] = None, + firmware_type: Optional[StrictStr] = None, + version: Optional[StrictStr] = None, + target: Optional[StrictStr] = None, + filename: Optional[StrictStr] = None, + md5: Optional[StrictStr] = None, + unpublished: Optional[StrictBool] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[FirmwareInfo]]: + """get_firmware_info + + Get Available Firmware Information + + :param project_uid: (required) + :type project_uid: str + :param product: + :type product: str + :param firmware_type: + :type firmware_type: str + :param version: + :type version: str + :param target: + :type target: str + :param filename: + :type filename: str + :param md5: + :type md5: str + :param unpublished: + :type unpublished: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_firmware_info_serialize( + project_uid=project_uid, + product=product, + firmware_type=firmware_type, + version=version, + target=target, + filename=filename, + md5=md5, + unpublished=unpublished, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[FirmwareInfo]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_firmware_info_without_preload_content( + self, + project_uid: StrictStr, + product: Optional[StrictStr] = None, + firmware_type: Optional[StrictStr] = None, + version: Optional[StrictStr] = None, + target: Optional[StrictStr] = None, + filename: Optional[StrictStr] = None, + md5: Optional[StrictStr] = None, + unpublished: Optional[StrictBool] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """get_firmware_info + + Get Available Firmware Information + + :param project_uid: (required) + :type project_uid: str + :param product: + :type product: str + :param firmware_type: + :type firmware_type: str + :param version: + :type version: str + :param target: + :type target: str + :param filename: + :type filename: str + :param md5: + :type md5: str + :param unpublished: + :type unpublished: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_firmware_info_serialize( + project_uid=project_uid, + product=product, + firmware_type=firmware_type, + version=version, + target=target, + filename=filename, + md5=md5, + unpublished=unpublished, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[FirmwareInfo]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_firmware_info_serialize( + self, + project_uid, + product, + firmware_type, + version, + target, + filename, + md5, + unpublished, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if project_uid is not None: + _path_params['projectUID'] = project_uid + # process the query parameters + if product is not None: + + _query_params.append(('product', product)) + + if firmware_type is not None: + + _query_params.append(('firmwareType', firmware_type)) + + if version is not None: + + _query_params.append(('version', version)) + + if target is not None: + + _query_params.append(('target', target)) + + if filename is not None: + + _query_params.append(('filename', filename)) + + if md5 is not None: + + _query_params.append(('md5', md5)) + + if unpublished is not None: + + _query_params.append(('unpublished', unpublished)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'api_key' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/projects/{projectUID}/firmware', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_fleet_environment_variables( + self, + project_uid: StrictStr, + fleet_uid: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> EnvironmentVariables: + """get_fleet_environment_variables + + Get environment variables of a fleet + + :param project_uid: (required) + :type project_uid: str + :param fleet_uid: (required) + :type fleet_uid: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_fleet_environment_variables_serialize( + project_uid=project_uid, + fleet_uid=fleet_uid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EnvironmentVariables", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_fleet_environment_variables_with_http_info( + self, + project_uid: StrictStr, + fleet_uid: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[EnvironmentVariables]: + """get_fleet_environment_variables + + Get environment variables of a fleet + + :param project_uid: (required) + :type project_uid: str + :param fleet_uid: (required) + :type fleet_uid: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_fleet_environment_variables_serialize( + project_uid=project_uid, + fleet_uid=fleet_uid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EnvironmentVariables", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_fleet_environment_variables_without_preload_content( + self, + project_uid: StrictStr, + fleet_uid: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """get_fleet_environment_variables + + Get environment variables of a fleet + + :param project_uid: (required) + :type project_uid: str + :param fleet_uid: (required) + :type fleet_uid: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_fleet_environment_variables_serialize( + project_uid=project_uid, + fleet_uid=fleet_uid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EnvironmentVariables", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_fleet_environment_variables_serialize( + self, + project_uid, + fleet_uid, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if project_uid is not None: + _path_params['projectUID'] = project_uid + if fleet_uid is not None: + _path_params['fleetUID'] = fleet_uid + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'api_key' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/projects/{projectUID}/fleets/{fleetUID}/environment_variables', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_project( + self, + project_uid: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Project: + """get_project + + Get a Project by ProjectUID - :param product_uid: (required) - :type product_uid: str + :param project_uid: (required) + :type project_uid: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4322,8 +6123,8 @@ def get_project_by_product( :return: Returns the result object. """ # noqa: E501 - _param = self._get_project_by_product_serialize( - product_uid=product_uid, + _param = self._get_project_serialize( + project_uid=project_uid, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4345,9 +6146,9 @@ def get_project_by_product( @validate_call - def get_project_by_product_with_http_info( + def get_project_with_http_info( self, - product_uid: StrictStr, + project_uid: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4361,12 +6162,12 @@ def get_project_by_product_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[Project]: - """get_project_by_product + """get_project - Get a Project by ProductUID + Get a Project by ProjectUID - :param product_uid: (required) - :type product_uid: str + :param project_uid: (required) + :type project_uid: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4389,8 +6190,8 @@ def get_project_by_product_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_project_by_product_serialize( - product_uid=product_uid, + _param = self._get_project_serialize( + project_uid=project_uid, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4412,9 +6213,9 @@ def get_project_by_product_with_http_info( @validate_call - def get_project_by_product_without_preload_content( + def get_project_without_preload_content( self, - product_uid: StrictStr, + project_uid: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4428,12 +6229,12 @@ def get_project_by_product_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """get_project_by_product + """get_project - Get a Project by ProductUID + Get a Project by ProjectUID - :param product_uid: (required) - :type product_uid: str + :param project_uid: (required) + :type project_uid: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4456,8 +6257,8 @@ def get_project_by_product_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_project_by_product_serialize( - product_uid=product_uid, + _param = self._get_project_serialize( + project_uid=project_uid, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4474,9 +6275,9 @@ def get_project_by_product_without_preload_content( return response_data.response - def _get_project_by_product_serialize( + def _get_project_serialize( self, - product_uid, + project_uid, _request_auth, _content_type, _headers, @@ -4496,8 +6297,8 @@ def _get_project_by_product_serialize( _body_params: Optional[bytes] = None # process the path parameters - if product_uid is not None: - _path_params['productUID'] = product_uid + if project_uid is not None: + _path_params['projectUID'] = project_uid # process the query parameters # process the header parameters # process the form parameters @@ -4519,7 +6320,7 @@ def _get_project_by_product_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/v1/products/{productUID}/project', + resource_path='/v1/projects/{projectUID}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4536,9 +6337,9 @@ def _get_project_by_product_serialize( @validate_call - def get_project_environment_variables( + def get_project_by_product( self, - project_uid: StrictStr, + product_uid: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4551,13 +6352,13 @@ def get_project_environment_variables( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> EnvironmentVariables: - """get_project_environment_variables + ) -> Project: + """get_project_by_product - Get environment variables of a project + Get a Project by ProductUID - :param project_uid: (required) - :type project_uid: str + :param product_uid: (required) + :type product_uid: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4580,8 +6381,8 @@ def get_project_environment_variables( :return: Returns the result object. """ # noqa: E501 - _param = self._get_project_environment_variables_serialize( - project_uid=project_uid, + _param = self._get_project_by_product_serialize( + product_uid=product_uid, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4589,7 +6390,7 @@ def get_project_environment_variables( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "EnvironmentVariables", + '200': "Project", } response_data = self.api_client.call_api( *_param, @@ -4603,9 +6404,9 @@ def get_project_environment_variables( @validate_call - def get_project_environment_variables_with_http_info( + def get_project_by_product_with_http_info( self, - project_uid: StrictStr, + product_uid: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4618,13 +6419,13 @@ def get_project_environment_variables_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[EnvironmentVariables]: - """get_project_environment_variables + ) -> ApiResponse[Project]: + """get_project_by_product - Get environment variables of a project + Get a Project by ProductUID - :param project_uid: (required) - :type project_uid: str + :param product_uid: (required) + :type product_uid: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4647,8 +6448,8 @@ def get_project_environment_variables_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_project_environment_variables_serialize( - project_uid=project_uid, + _param = self._get_project_by_product_serialize( + product_uid=product_uid, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4656,7 +6457,7 @@ def get_project_environment_variables_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "EnvironmentVariables", + '200': "Project", } response_data = self.api_client.call_api( *_param, @@ -4670,9 +6471,9 @@ def get_project_environment_variables_with_http_info( @validate_call - def get_project_environment_variables_without_preload_content( + def get_project_by_product_without_preload_content( self, - project_uid: StrictStr, + product_uid: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4686,12 +6487,12 @@ def get_project_environment_variables_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """get_project_environment_variables + """get_project_by_product - Get environment variables of a project + Get a Project by ProductUID - :param project_uid: (required) - :type project_uid: str + :param product_uid: (required) + :type product_uid: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4714,8 +6515,8 @@ def get_project_environment_variables_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_project_environment_variables_serialize( - project_uid=project_uid, + _param = self._get_project_by_product_serialize( + product_uid=product_uid, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4723,7 +6524,7 @@ def get_project_environment_variables_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "EnvironmentVariables", + '200': "Project", } response_data = self.api_client.call_api( *_param, @@ -4732,9 +6533,9 @@ def get_project_environment_variables_without_preload_content( return response_data.response - def _get_project_environment_variables_serialize( + def _get_project_by_product_serialize( self, - project_uid, + product_uid, _request_auth, _content_type, _headers, @@ -4754,8 +6555,8 @@ def _get_project_environment_variables_serialize( _body_params: Optional[bytes] = None # process the path parameters - if project_uid is not None: - _path_params['projectUID'] = project_uid + if product_uid is not None: + _path_params['productUID'] = product_uid # process the query parameters # process the header parameters # process the form parameters @@ -4777,7 +6578,7 @@ def _get_project_environment_variables_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/v1/projects/{projectUID}/environment_variables', + resource_path='/v1/products/{productUID}/project', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4794,7 +6595,7 @@ def _get_project_environment_variables_serialize( @validate_call - def get_project_fleets( + def get_project_environment_variables( self, project_uid: StrictStr, _request_timeout: Union[ @@ -4809,10 +6610,10 @@ def get_project_fleets( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GetProjectFleets200Response: - """get_project_fleets + ) -> EnvironmentVariables: + """get_project_environment_variables - Get Project Fleets + Get environment variables of a project :param project_uid: (required) :type project_uid: str @@ -4838,7 +6639,7 @@ def get_project_fleets( :return: Returns the result object. """ # noqa: E501 - _param = self._get_project_fleets_serialize( + _param = self._get_project_environment_variables_serialize( project_uid=project_uid, _request_auth=_request_auth, _content_type=_content_type, @@ -4847,7 +6648,7 @@ def get_project_fleets( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetProjectFleets200Response", + '200': "EnvironmentVariables", } response_data = self.api_client.call_api( *_param, @@ -4861,7 +6662,7 @@ def get_project_fleets( @validate_call - def get_project_fleets_with_http_info( + def get_project_environment_variables_with_http_info( self, project_uid: StrictStr, _request_timeout: Union[ @@ -4876,10 +6677,10 @@ def get_project_fleets_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GetProjectFleets200Response]: - """get_project_fleets + ) -> ApiResponse[EnvironmentVariables]: + """get_project_environment_variables - Get Project Fleets + Get environment variables of a project :param project_uid: (required) :type project_uid: str @@ -4905,7 +6706,7 @@ def get_project_fleets_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_project_fleets_serialize( + _param = self._get_project_environment_variables_serialize( project_uid=project_uid, _request_auth=_request_auth, _content_type=_content_type, @@ -4914,7 +6715,7 @@ def get_project_fleets_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetProjectFleets200Response", + '200': "EnvironmentVariables", } response_data = self.api_client.call_api( *_param, @@ -4928,7 +6729,7 @@ def get_project_fleets_with_http_info( @validate_call - def get_project_fleets_without_preload_content( + def get_project_environment_variables_without_preload_content( self, project_uid: StrictStr, _request_timeout: Union[ @@ -4944,9 +6745,9 @@ def get_project_fleets_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """get_project_fleets + """get_project_environment_variables - Get Project Fleets + Get environment variables of a project :param project_uid: (required) :type project_uid: str @@ -4972,7 +6773,7 @@ def get_project_fleets_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_project_fleets_serialize( + _param = self._get_project_environment_variables_serialize( project_uid=project_uid, _request_auth=_request_auth, _content_type=_content_type, @@ -4981,7 +6782,7 @@ def get_project_fleets_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetProjectFleets200Response", + '200': "EnvironmentVariables", } response_data = self.api_client.call_api( *_param, @@ -4990,7 +6791,7 @@ def get_project_fleets_without_preload_content( return response_data.response - def _get_project_fleets_serialize( + def _get_project_environment_variables_serialize( self, project_uid, _request_auth, @@ -5035,7 +6836,7 @@ def _get_project_fleets_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/v1/projects/{projectUID}/fleets', + resource_path='/v1/projects/{projectUID}/environment_variables', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5052,7 +6853,7 @@ def _get_project_fleets_serialize( @validate_call - def get_project_members( + def get_project_fleets( self, project_uid: StrictStr, _request_timeout: Union[ @@ -5067,10 +6868,10 @@ def get_project_members( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GetProjectMembers200Response: - """get_project_members + ) -> GetProjectFleets200Response: + """get_project_fleets - Get Project Members + Get Project Fleets :param project_uid: (required) :type project_uid: str @@ -5096,7 +6897,7 @@ def get_project_members( :return: Returns the result object. """ # noqa: E501 - _param = self._get_project_members_serialize( + _param = self._get_project_fleets_serialize( project_uid=project_uid, _request_auth=_request_auth, _content_type=_content_type, @@ -5105,7 +6906,7 @@ def get_project_members( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetProjectMembers200Response", + '200': "GetProjectFleets200Response", } response_data = self.api_client.call_api( *_param, @@ -5119,7 +6920,7 @@ def get_project_members( @validate_call - def get_project_members_with_http_info( + def get_project_fleets_with_http_info( self, project_uid: StrictStr, _request_timeout: Union[ @@ -5134,10 +6935,10 @@ def get_project_members_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GetProjectMembers200Response]: - """get_project_members + ) -> ApiResponse[GetProjectFleets200Response]: + """get_project_fleets - Get Project Members + Get Project Fleets :param project_uid: (required) :type project_uid: str @@ -5163,7 +6964,7 @@ def get_project_members_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_project_members_serialize( + _param = self._get_project_fleets_serialize( project_uid=project_uid, _request_auth=_request_auth, _content_type=_content_type, @@ -5172,7 +6973,7 @@ def get_project_members_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetProjectMembers200Response", + '200': "GetProjectFleets200Response", } response_data = self.api_client.call_api( *_param, @@ -5186,7 +6987,7 @@ def get_project_members_with_http_info( @validate_call - def get_project_members_without_preload_content( + def get_project_fleets_without_preload_content( self, project_uid: StrictStr, _request_timeout: Union[ @@ -5202,9 +7003,9 @@ def get_project_members_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """get_project_members + """get_project_fleets - Get Project Members + Get Project Fleets :param project_uid: (required) :type project_uid: str @@ -5230,7 +7031,7 @@ def get_project_members_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_project_members_serialize( + _param = self._get_project_fleets_serialize( project_uid=project_uid, _request_auth=_request_auth, _content_type=_content_type, @@ -5239,7 +7040,7 @@ def get_project_members_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetProjectMembers200Response", + '200': "GetProjectFleets200Response", } response_data = self.api_client.call_api( *_param, @@ -5248,7 +7049,7 @@ def get_project_members_without_preload_content( return response_data.response - def _get_project_members_serialize( + def _get_project_fleets_serialize( self, project_uid, _request_auth, @@ -5293,7 +7094,7 @@ def _get_project_members_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/v1/projects/{projectUID}/members', + resource_path='/v1/projects/{projectUID}/fleets', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5310,14 +7111,9 @@ def _get_project_members_serialize( @validate_call - def get_project_ota_status( + def get_project_members( self, project_uid: StrictStr, - device_uids: Annotated[Optional[List[StrictStr]], Field(description="An array of Device UIDs.")] = None, - fleet_uids: Optional[List[StrictStr]] = None, - device_tags: Optional[List[StrictStr]] = None, - page_size: Optional[Annotated[int, Field(le=10000, strict=True, ge=1)]] = None, - page_num: Optional[Annotated[int, Field(strict=True, ge=1)]] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5330,23 +7126,13 @@ def get_project_ota_status( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[OTAStatusList]: - """get_project_ota_status + ) -> GetProjectMembers200Response: + """get_project_members - Get Project OTA Status + Get Project Members :param project_uid: (required) :type project_uid: str - :param device_uids: An array of Device UIDs. - :type device_uids: List[str] - :param fleet_uids: - :type fleet_uids: List[str] - :param device_tags: - :type device_tags: List[str] - :param page_size: - :type page_size: int - :param page_num: - :type page_num: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5369,13 +7155,8 @@ def get_project_ota_status( :return: Returns the result object. """ # noqa: E501 - _param = self._get_project_ota_status_serialize( + _param = self._get_project_members_serialize( project_uid=project_uid, - device_uids=device_uids, - fleet_uids=fleet_uids, - device_tags=device_tags, - page_size=page_size, - page_num=page_num, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5383,7 +7164,7 @@ def get_project_ota_status( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "List[OTAStatusList]", + '200': "GetProjectMembers200Response", } response_data = self.api_client.call_api( *_param, @@ -5397,14 +7178,9 @@ def get_project_ota_status( @validate_call - def get_project_ota_status_with_http_info( + def get_project_members_with_http_info( self, project_uid: StrictStr, - device_uids: Annotated[Optional[List[StrictStr]], Field(description="An array of Device UIDs.")] = None, - fleet_uids: Optional[List[StrictStr]] = None, - device_tags: Optional[List[StrictStr]] = None, - page_size: Optional[Annotated[int, Field(le=10000, strict=True, ge=1)]] = None, - page_num: Optional[Annotated[int, Field(strict=True, ge=1)]] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5417,23 +7193,13 @@ def get_project_ota_status_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[OTAStatusList]]: - """get_project_ota_status + ) -> ApiResponse[GetProjectMembers200Response]: + """get_project_members - Get Project OTA Status + Get Project Members :param project_uid: (required) :type project_uid: str - :param device_uids: An array of Device UIDs. - :type device_uids: List[str] - :param fleet_uids: - :type fleet_uids: List[str] - :param device_tags: - :type device_tags: List[str] - :param page_size: - :type page_size: int - :param page_num: - :type page_num: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5456,13 +7222,8 @@ def get_project_ota_status_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_project_ota_status_serialize( + _param = self._get_project_members_serialize( project_uid=project_uid, - device_uids=device_uids, - fleet_uids=fleet_uids, - device_tags=device_tags, - page_size=page_size, - page_num=page_num, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5470,7 +7231,7 @@ def get_project_ota_status_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "List[OTAStatusList]", + '200': "GetProjectMembers200Response", } response_data = self.api_client.call_api( *_param, @@ -5484,14 +7245,9 @@ def get_project_ota_status_with_http_info( @validate_call - def get_project_ota_status_without_preload_content( + def get_project_members_without_preload_content( self, project_uid: StrictStr, - device_uids: Annotated[Optional[List[StrictStr]], Field(description="An array of Device UIDs.")] = None, - fleet_uids: Optional[List[StrictStr]] = None, - device_tags: Optional[List[StrictStr]] = None, - page_size: Optional[Annotated[int, Field(le=10000, strict=True, ge=1)]] = None, - page_num: Optional[Annotated[int, Field(strict=True, ge=1)]] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5505,22 +7261,12 @@ def get_project_ota_status_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """get_project_ota_status + """get_project_members - Get Project OTA Status + Get Project Members :param project_uid: (required) :type project_uid: str - :param device_uids: An array of Device UIDs. - :type device_uids: List[str] - :param fleet_uids: - :type fleet_uids: List[str] - :param device_tags: - :type device_tags: List[str] - :param page_size: - :type page_size: int - :param page_num: - :type page_num: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5543,13 +7289,8 @@ def get_project_ota_status_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_project_ota_status_serialize( + _param = self._get_project_members_serialize( project_uid=project_uid, - device_uids=device_uids, - fleet_uids=fleet_uids, - device_tags=device_tags, - page_size=page_size, - page_num=page_num, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5557,7 +7298,7 @@ def get_project_ota_status_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "List[OTAStatusList]", + '200': "GetProjectMembers200Response", } response_data = self.api_client.call_api( *_param, @@ -5566,14 +7307,9 @@ def get_project_ota_status_without_preload_content( return response_data.response - def _get_project_ota_status_serialize( + def _get_project_members_serialize( self, project_uid, - device_uids, - fleet_uids, - device_tags, - page_size, - page_num, _request_auth, _content_type, _headers, @@ -5583,9 +7319,6 @@ def _get_project_ota_status_serialize( _host = None _collection_formats: Dict[str, str] = { - 'deviceUIDs': 'multi', - 'fleetUIDs': 'multi', - 'deviceTags': 'multi', } _path_params: Dict[str, str] = {} @@ -5596,29 +7329,9 @@ def _get_project_ota_status_serialize( _body_params: Optional[bytes] = None # process the path parameters - if project_uid is not None: - _path_params['projectUID'] = project_uid - # process the query parameters - if device_uids is not None: - - _query_params.append(('deviceUIDs', device_uids)) - - if fleet_uids is not None: - - _query_params.append(('fleetUIDs', fleet_uids)) - - if device_tags is not None: - - _query_params.append(('deviceTags', device_tags)) - - if page_size is not None: - - _query_params.append(('pageSize', page_size)) - - if page_num is not None: - - _query_params.append(('pageNum', page_num)) - + if project_uid is not None: + _path_params['projectUID'] = project_uid + # process the query parameters # process the header parameters # process the form parameters # process the body parameter @@ -5639,7 +7352,7 @@ def _get_project_ota_status_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/v1/projects/{projectUID}/ota/status', + resource_path='/v1/projects/{projectUID}/members', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -7629,289 +9342,3 @@ def _update_fleet_serialize( ) - - - @validate_call - def update_project_firmware( - self, - project_uid: StrictStr, - ota_update_request: Annotated[OTAUpdateRequest, Field(description="Body or payload of firmware update")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[OTAUpdateStatus]: - """update_project_firmware - - Update Project Firmware - - :param project_uid: (required) - :type project_uid: str - :param ota_update_request: Body or payload of firmware update (required) - :type ota_update_request: OTAUpdateRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._update_project_firmware_serialize( - project_uid=project_uid, - ota_update_request=ota_update_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[OTAUpdateStatus]", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def update_project_firmware_with_http_info( - self, - project_uid: StrictStr, - ota_update_request: Annotated[OTAUpdateRequest, Field(description="Body or payload of firmware update")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[OTAUpdateStatus]]: - """update_project_firmware - - Update Project Firmware - - :param project_uid: (required) - :type project_uid: str - :param ota_update_request: Body or payload of firmware update (required) - :type ota_update_request: OTAUpdateRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._update_project_firmware_serialize( - project_uid=project_uid, - ota_update_request=ota_update_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[OTAUpdateStatus]", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def update_project_firmware_without_preload_content( - self, - project_uid: StrictStr, - ota_update_request: Annotated[OTAUpdateRequest, Field(description="Body or payload of firmware update")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """update_project_firmware - - Update Project Firmware - - :param project_uid: (required) - :type project_uid: str - :param ota_update_request: Body or payload of firmware update (required) - :type ota_update_request: OTAUpdateRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._update_project_firmware_serialize( - project_uid=project_uid, - ota_update_request=ota_update_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[OTAUpdateStatus]", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _update_project_firmware_serialize( - self, - project_uid, - ota_update_request, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if project_uid is not None: - _path_params['projectUID'] = project_uid - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if ota_update_request is not None: - _body_params = ota_update_request - - - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'api_key' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/v1/projects/{projectUID}/ota/update', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - diff --git a/src/notehub_py/api/route_api.py b/src/notehub_py/api/route_api.py index 10f60cf..68b05a3 100644 --- a/src/notehub_py/api/route_api.py +++ b/src/notehub_py/api/route_api.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -21,7 +21,7 @@ from typing import Any, Dict, List, Optional from typing_extensions import Annotated from notehub_py.models.get_route_logs_by_route200_response_inner import GetRouteLogsByRoute200ResponseInner -from notehub_py.models.route import Route +from notehub_py.models.notehub_route import NotehubRoute from notehub_py.models.user_db_route import UserDbRoute from notehub_py.api_client import ApiClient, RequestSerialized @@ -46,7 +46,7 @@ def __init__(self, api_client=None) -> None: def create_route( self, project_uid: StrictStr, - route: Annotated[Route, Field(description="Route to be Created")], + notehub_route: Annotated[NotehubRoute, Field(description="Route to be Created")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -59,15 +59,15 @@ def create_route( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Route: + ) -> NotehubRoute: """create_route Create Route within a Project :param project_uid: (required) :type project_uid: str - :param route: Route to be Created (required) - :type route: Route + :param notehub_route: Route to be Created (required) + :type notehub_route: NotehubRoute :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -92,7 +92,7 @@ def create_route( _param = self._create_route_serialize( project_uid=project_uid, - route=route, + notehub_route=notehub_route, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -100,7 +100,7 @@ def create_route( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Route", + '200': "NotehubRoute", } response_data = self.api_client.call_api( *_param, @@ -117,7 +117,7 @@ def create_route( def create_route_with_http_info( self, project_uid: StrictStr, - route: Annotated[Route, Field(description="Route to be Created")], + notehub_route: Annotated[NotehubRoute, Field(description="Route to be Created")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -130,15 +130,15 @@ def create_route_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Route]: + ) -> ApiResponse[NotehubRoute]: """create_route Create Route within a Project :param project_uid: (required) :type project_uid: str - :param route: Route to be Created (required) - :type route: Route + :param notehub_route: Route to be Created (required) + :type notehub_route: NotehubRoute :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -163,7 +163,7 @@ def create_route_with_http_info( _param = self._create_route_serialize( project_uid=project_uid, - route=route, + notehub_route=notehub_route, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -171,7 +171,7 @@ def create_route_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Route", + '200': "NotehubRoute", } response_data = self.api_client.call_api( *_param, @@ -188,7 +188,7 @@ def create_route_with_http_info( def create_route_without_preload_content( self, project_uid: StrictStr, - route: Annotated[Route, Field(description="Route to be Created")], + notehub_route: Annotated[NotehubRoute, Field(description="Route to be Created")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -208,8 +208,8 @@ def create_route_without_preload_content( :param project_uid: (required) :type project_uid: str - :param route: Route to be Created (required) - :type route: Route + :param notehub_route: Route to be Created (required) + :type notehub_route: NotehubRoute :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -234,7 +234,7 @@ def create_route_without_preload_content( _param = self._create_route_serialize( project_uid=project_uid, - route=route, + notehub_route=notehub_route, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -242,7 +242,7 @@ def create_route_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Route", + '200': "NotehubRoute", } response_data = self.api_client.call_api( *_param, @@ -254,7 +254,7 @@ def create_route_without_preload_content( def _create_route_serialize( self, project_uid, - route, + notehub_route, _request_auth, _content_type, _headers, @@ -280,8 +280,8 @@ def _create_route_serialize( # process the header parameters # process the form parameters # process the body parameter - if route is not None: - _body_params = route + if notehub_route is not None: + _body_params = notehub_route # set the HTTP header `Accept` @@ -618,7 +618,7 @@ def get_route( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Route: + ) -> NotehubRoute: """get_route Get single route within a project @@ -659,7 +659,7 @@ def get_route( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Route", + '200': "NotehubRoute", } response_data = self.api_client.call_api( *_param, @@ -689,7 +689,7 @@ def get_route_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Route]: + ) -> ApiResponse[NotehubRoute]: """get_route Get single route within a project @@ -730,7 +730,7 @@ def get_route_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Route", + '200': "NotehubRoute", } response_data = self.api_client.call_api( *_param, @@ -801,7 +801,7 @@ def get_route_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Route", + '200': "NotehubRoute", } response_data = self.api_client.call_api( *_param, @@ -1564,7 +1564,7 @@ def update_route( self, project_uid: StrictStr, route_uid: StrictStr, - route: Annotated[Route, Field(description="Route settings to be updated")], + notehub_route: Annotated[NotehubRoute, Field(description="Route settings to be updated")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1577,7 +1577,7 @@ def update_route( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Route: + ) -> NotehubRoute: """update_route Update route by UID @@ -1586,8 +1586,8 @@ def update_route( :type project_uid: str :param route_uid: (required) :type route_uid: str - :param route: Route settings to be updated (required) - :type route: Route + :param notehub_route: Route settings to be updated (required) + :type notehub_route: NotehubRoute :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1613,7 +1613,7 @@ def update_route( _param = self._update_route_serialize( project_uid=project_uid, route_uid=route_uid, - route=route, + notehub_route=notehub_route, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1621,7 +1621,7 @@ def update_route( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Route", + '200': "NotehubRoute", } response_data = self.api_client.call_api( *_param, @@ -1639,7 +1639,7 @@ def update_route_with_http_info( self, project_uid: StrictStr, route_uid: StrictStr, - route: Annotated[Route, Field(description="Route settings to be updated")], + notehub_route: Annotated[NotehubRoute, Field(description="Route settings to be updated")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1652,7 +1652,7 @@ def update_route_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Route]: + ) -> ApiResponse[NotehubRoute]: """update_route Update route by UID @@ -1661,8 +1661,8 @@ def update_route_with_http_info( :type project_uid: str :param route_uid: (required) :type route_uid: str - :param route: Route settings to be updated (required) - :type route: Route + :param notehub_route: Route settings to be updated (required) + :type notehub_route: NotehubRoute :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1688,7 +1688,7 @@ def update_route_with_http_info( _param = self._update_route_serialize( project_uid=project_uid, route_uid=route_uid, - route=route, + notehub_route=notehub_route, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1696,7 +1696,7 @@ def update_route_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Route", + '200': "NotehubRoute", } response_data = self.api_client.call_api( *_param, @@ -1714,7 +1714,7 @@ def update_route_without_preload_content( self, project_uid: StrictStr, route_uid: StrictStr, - route: Annotated[Route, Field(description="Route settings to be updated")], + notehub_route: Annotated[NotehubRoute, Field(description="Route settings to be updated")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1736,8 +1736,8 @@ def update_route_without_preload_content( :type project_uid: str :param route_uid: (required) :type route_uid: str - :param route: Route settings to be updated (required) - :type route: Route + :param notehub_route: Route settings to be updated (required) + :type notehub_route: NotehubRoute :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1763,7 +1763,7 @@ def update_route_without_preload_content( _param = self._update_route_serialize( project_uid=project_uid, route_uid=route_uid, - route=route, + notehub_route=notehub_route, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1771,7 +1771,7 @@ def update_route_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Route", + '200': "NotehubRoute", } response_data = self.api_client.call_api( *_param, @@ -1784,7 +1784,7 @@ def _update_route_serialize( self, project_uid, route_uid, - route, + notehub_route, _request_auth, _content_type, _headers, @@ -1812,8 +1812,8 @@ def _update_route_serialize( # process the header parameters # process the form parameters # process the body parameter - if route is not None: - _body_params = route + if notehub_route is not None: + _body_params = notehub_route # set the HTTP header `Accept` diff --git a/src/notehub_py/api_client.py b/src/notehub_py/api_client.py index 163ac05..a2d7599 100644 --- a/src/notehub_py/api_client.py +++ b/src/notehub_py/api_client.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/notehub_py/configuration.py b/src/notehub_py/configuration.py index 4d55370..0c46482 100644 --- a/src/notehub_py/configuration.py +++ b/src/notehub_py/configuration.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -408,7 +408,7 @@ def to_debug_report(self): return "Python SDK Debug Report:\n"\ "OS: {env}\n"\ "Python Version: {pyversion}\n"\ - "Version of the API: 1.1.0\n"\ + "Version of the API: 1.2.0\n"\ "SDK Package Version: 1.0.2".\ format(env=sys.platform, pyversion=sys.version) diff --git a/src/notehub_py/exceptions.py b/src/notehub_py/exceptions.py index 5b98b50..2cc4769 100644 --- a/src/notehub_py/exceptions.py +++ b/src/notehub_py/exceptions.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/notehub_py/models/__init__.py b/src/notehub_py/models/__init__.py index 5f24556..f41d0a1 100644 --- a/src/notehub_py/models/__init__.py +++ b/src/notehub_py/models/__init__.py @@ -6,7 +6,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -29,19 +29,28 @@ from notehub_py.models.create_monitor import CreateMonitor from notehub_py.models.create_product_request import CreateProductRequest from notehub_py.models.create_project_request import CreateProjectRequest +from notehub_py.models.current_firmware import CurrentFirmware from notehub_py.models.dfu_env import DFUEnv from notehub_py.models.dfu_state import DFUState from notehub_py.models.delete_device_fleets_request import DeleteDeviceFleetsRequest from notehub_py.models.device import Device +from notehub_py.models.device_dfu_history import DeviceDfuHistory +from notehub_py.models.device_dfu_history_page import DeviceDfuHistoryPage +from notehub_py.models.device_dfu_state_machine import DeviceDfuStateMachine +from notehub_py.models.device_dfu_state_machine_node import DeviceDfuStateMachineNode +from notehub_py.models.device_dfu_status import DeviceDfuStatus +from notehub_py.models.device_dfu_status_current import DeviceDfuStatusCurrent +from notehub_py.models.device_dfu_status_page import DeviceDfuStatusPage from notehub_py.models.device_session import DeviceSession from notehub_py.models.device_tower_info import DeviceTowerInfo from notehub_py.models.device_usage import DeviceUsage +from notehub_py.models.dfu_action_request import DfuActionRequest from notehub_py.models.email_notification import EmailNotification from notehub_py.models.environment_variables import EnvironmentVariables from notehub_py.models.error import Error from notehub_py.models.event import Event +from notehub_py.models.firmware import Firmware from notehub_py.models.firmware_info import FirmwareInfo -from notehub_py.models.firmware_status import FirmwareStatus from notehub_py.models.fleet import Fleet from notehub_py.models.get_alerts200_response import GetAlerts200Response from notehub_py.models.get_billing_accounts200_response import GetBillingAccounts200Response @@ -78,10 +87,8 @@ from notehub_py.models.monitor_alert_routes_inner import MonitorAlertRoutesInner from notehub_py.models.mqtt import Mqtt from notehub_py.models.note import Note -from notehub_py.models.ota_status import OTAStatus -from notehub_py.models.ota_status_list import OTAStatusList -from notehub_py.models.ota_update_request import OTAUpdateRequest -from notehub_py.models.ota_update_status import OTAUpdateStatus +from notehub_py.models.notehub_route import NotehubRoute +from notehub_py.models.notehub_route_schema import NotehubRouteSchema from notehub_py.models.post_provision_project_device_request import PostProvisionProjectDeviceRequest from notehub_py.models.product import Product from notehub_py.models.project import Project @@ -90,8 +97,6 @@ from notehub_py.models.put_device_fleets_request import PutDeviceFleetsRequest from notehub_py.models.radresponder import Radresponder from notehub_py.models.role import Role -from notehub_py.models.route import Route -from notehub_py.models.route_schema import RouteSchema from notehub_py.models.slack import Slack from notehub_py.models.slack_bearer_notification import SlackBearerNotification from notehub_py.models.slack_web_hook_notification import SlackWebHookNotification @@ -101,4 +106,8 @@ from notehub_py.models.tower_location import TowerLocation from notehub_py.models.twilio import Twilio from notehub_py.models.update_fleet_request import UpdateFleetRequest +from notehub_py.models.upload_metadata import UploadMetadata from notehub_py.models.user_db_route import UserDbRoute +from notehub_py.models.user_dfu_state_machine import UserDfuStateMachine +from notehub_py.models.user_dfu_state_machine_status import UserDfuStateMachineStatus +from notehub_py.models.user_firmware_info import UserFirmwareInfo diff --git a/src/notehub_py/models/alert.py b/src/notehub_py/models/alert.py index 2ba0e9f..3524b26 100644 --- a/src/notehub_py/models/alert.py +++ b/src/notehub_py/models/alert.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -39,9 +39,11 @@ class Alert(BaseModel): version: Optional[StrictInt] = Field(default=None, description="The version of the alert") alert_source: Optional[StrictStr] = Field(default=None, description="The source of the alert") source: Optional[StrictStr] = Field(default=None, description="The UID of the source of the alert") + monitor_type: Optional[StrictStr] = Field(default=None, description="The type of monitor that triggered the alert") + field_name: Optional[StrictStr] = Field(default=None, description="The field name that triggered the alert") data: Optional[List[AlertDataInner]] = None notifications: Optional[List[AlertNotificationsInner]] = None - __properties: ClassVar[List[str]] = ["uid", "monitor_uid", "monitor_name", "device_uid", "created_at", "value", "resolved", "version", "alert_source", "source", "data", "notifications"] + __properties: ClassVar[List[str]] = ["uid", "monitor_uid", "monitor_name", "device_uid", "created_at", "value", "resolved", "version", "alert_source", "source", "monitor_type", "field_name", "data", "notifications"] @field_validator('alert_source') def alert_source_validate_enum(cls, value): @@ -53,6 +55,16 @@ def alert_source_validate_enum(cls, value): raise ValueError("must be one of enum values ('app', 'device')") return value + @field_validator('monitor_type') + def monitor_type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['event', 'device']): + raise ValueError("must be one of enum values ('event', 'device')") + return value + model_config = ConfigDict( populate_by_name=True, validate_assignment=True, @@ -128,6 +140,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "version": obj.get("version"), "alert_source": obj.get("alert_source"), "source": obj.get("source"), + "monitor_type": obj.get("monitor_type"), + "field_name": obj.get("field_name"), "data": [AlertDataInner.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, "notifications": [AlertNotificationsInner.from_dict(_item) for _item in obj["notifications"]] if obj.get("notifications") is not None else None }) diff --git a/src/notehub_py/models/alert_data_inner.py b/src/notehub_py/models/alert_data_inner.py index 6e365c1..702df40 100644 --- a/src/notehub_py/models/alert_data_inner.py +++ b/src/notehub_py/models/alert_data_inner.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/notehub_py/models/alert_notifications_inner.py b/src/notehub_py/models/alert_notifications_inner.py index fd7184a..05cde2f 100644 --- a/src/notehub_py/models/alert_notifications_inner.py +++ b/src/notehub_py/models/alert_notifications_inner.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/notehub_py/models/aws.py b/src/notehub_py/models/aws.py index 075a176..c1cd84f 100644 --- a/src/notehub_py/models/aws.py +++ b/src/notehub_py/models/aws.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/notehub_py/models/azure.py b/src/notehub_py/models/azure.py index d9125a2..73bbbce 100644 --- a/src/notehub_py/models/azure.py +++ b/src/notehub_py/models/azure.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/notehub_py/models/billing_account.py b/src/notehub_py/models/billing_account.py index aa44088..365dd50 100644 --- a/src/notehub_py/models/billing_account.py +++ b/src/notehub_py/models/billing_account.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/notehub_py/models/billing_account_role.py b/src/notehub_py/models/billing_account_role.py index ec8f081..c8c70d3 100644 --- a/src/notehub_py/models/billing_account_role.py +++ b/src/notehub_py/models/billing_account_role.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/notehub_py/models/body.py b/src/notehub_py/models/body.py index d016772..4b6e32c 100644 --- a/src/notehub_py/models/body.py +++ b/src/notehub_py/models/body.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/notehub_py/models/clone_project_request.py b/src/notehub_py/models/clone_project_request.py index 530d18d..d12aa1d 100644 --- a/src/notehub_py/models/clone_project_request.py +++ b/src/notehub_py/models/clone_project_request.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/notehub_py/models/contact.py b/src/notehub_py/models/contact.py index cf9f544..20241dc 100644 --- a/src/notehub_py/models/contact.py +++ b/src/notehub_py/models/contact.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/notehub_py/models/create_fleet_request.py b/src/notehub_py/models/create_fleet_request.py index 8efa58c..d12b5b3 100644 --- a/src/notehub_py/models/create_fleet_request.py +++ b/src/notehub_py/models/create_fleet_request.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/notehub_py/models/create_monitor.py b/src/notehub_py/models/create_monitor.py index 66ae065..29eace2 100644 --- a/src/notehub_py/models/create_monitor.py +++ b/src/notehub_py/models/create_monitor.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/notehub_py/models/create_product_request.py b/src/notehub_py/models/create_product_request.py index ec5c794..d3e2b1a 100644 --- a/src/notehub_py/models/create_product_request.py +++ b/src/notehub_py/models/create_product_request.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/notehub_py/models/create_project_request.py b/src/notehub_py/models/create_project_request.py index 6262967..24019d5 100644 --- a/src/notehub_py/models/create_project_request.py +++ b/src/notehub_py/models/create_project_request.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/notehub_py/models/current_firmware.py b/src/notehub_py/models/current_firmware.py new file mode 100644 index 0000000..5da3c1a --- /dev/null +++ b/src/notehub_py/models/current_firmware.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Notehub API + + The OpenAPI definition for the Notehub.io API. + + The version of the OpenAPI document: 1.2.0 + Contact: engineering@blues.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from notehub_py.models.firmware import Firmware +from typing import Optional, Set +from typing_extensions import Self + +class CurrentFirmware(BaseModel): + """ + CurrentFirmware + """ # noqa: E501 + version: Optional[StrictStr] = None + metadata: Optional[Firmware] = None + __properties: ClassVar[List[str]] = ["version", "metadata"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CurrentFirmware from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of metadata + if self.metadata: + _dict['metadata'] = self.metadata.to_dict() + # set to None if metadata (nullable) is None + # and model_fields_set contains the field + if self.metadata is None and "metadata" in self.model_fields_set: + _dict['metadata'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CurrentFirmware from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "version": obj.get("version"), + "metadata": Firmware.from_dict(obj["metadata"]) if obj.get("metadata") is not None else None + }) + return _obj + + diff --git a/src/notehub_py/models/delete_device_fleets_request.py b/src/notehub_py/models/delete_device_fleets_request.py index fc9d7ff..161f346 100644 --- a/src/notehub_py/models/delete_device_fleets_request.py +++ b/src/notehub_py/models/delete_device_fleets_request.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/notehub_py/models/device.py b/src/notehub_py/models/device.py index c0ee35c..9b7f4aa 100644 --- a/src/notehub_py/models/device.py +++ b/src/notehub_py/models/device.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/notehub_py/models/device_dfu_history.py b/src/notehub_py/models/device_dfu_history.py new file mode 100644 index 0000000..738d47a --- /dev/null +++ b/src/notehub_py/models/device_dfu_history.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Notehub API + + The OpenAPI definition for the Notehub.io API. + + The version of the OpenAPI document: 1.2.0 + Contact: engineering@blues.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from notehub_py.models.device_dfu_state_machine import DeviceDfuStateMachine +from notehub_py.models.device_dfu_status_current import DeviceDfuStatusCurrent +from typing import Optional, Set +from typing_extensions import Self + +class DeviceDfuHistory(BaseModel): + """ + DeviceDfuHistory + """ # noqa: E501 + device_uid: Optional[StrictStr] = Field(default=None, description="Device UID") + current: Optional[DeviceDfuStatusCurrent] = None + history: Optional[List[DeviceDfuStateMachine]] = None + __properties: ClassVar[List[str]] = ["device_uid", "current", "history"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DeviceDfuHistory from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of current + if self.current: + _dict['current'] = self.current.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in history (list) + _items = [] + if self.history: + for _item in self.history: + if _item: + _items.append(_item.to_dict()) + _dict['history'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeviceDfuHistory from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "device_uid": obj.get("device_uid"), + "current": DeviceDfuStatusCurrent.from_dict(obj["current"]) if obj.get("current") is not None else None, + "history": [DeviceDfuStateMachine.from_dict(_item) for _item in obj["history"]] if obj.get("history") is not None else None + }) + return _obj + + diff --git a/src/notehub_py/models/device_dfu_history_page.py b/src/notehub_py/models/device_dfu_history_page.py new file mode 100644 index 0000000..df279fe --- /dev/null +++ b/src/notehub_py/models/device_dfu_history_page.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + Notehub API + + The OpenAPI definition for the Notehub.io API. + + The version of the OpenAPI document: 1.2.0 + Contact: engineering@blues.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from notehub_py.models.device_dfu_history import DeviceDfuHistory +from typing import Optional, Set +from typing_extensions import Self + +class DeviceDfuHistoryPage(BaseModel): + """ + DeviceDfuHistoryPage + """ # noqa: E501 + devices: Optional[List[DeviceDfuHistory]] = None + has_more: Optional[StrictBool] = False + __properties: ClassVar[List[str]] = ["devices", "has_more"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DeviceDfuHistoryPage from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in devices (list) + _items = [] + if self.devices: + for _item in self.devices: + if _item: + _items.append(_item.to_dict()) + _dict['devices'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeviceDfuHistoryPage from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "devices": [DeviceDfuHistory.from_dict(_item) for _item in obj["devices"]] if obj.get("devices") is not None else None, + "has_more": obj.get("has_more") if obj.get("has_more") is not None else False + }) + return _obj + + diff --git a/src/notehub_py/models/device_dfu_state_machine.py b/src/notehub_py/models/device_dfu_state_machine.py new file mode 100644 index 0000000..74d0904 --- /dev/null +++ b/src/notehub_py/models/device_dfu_state_machine.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Notehub API + + The OpenAPI definition for the Notehub.io API. + + The version of the OpenAPI document: 1.2.0 + Contact: engineering@blues.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from notehub_py.models.device_dfu_state_machine_node import DeviceDfuStateMachineNode +from typing import Optional, Set +from typing_extensions import Self + +class DeviceDfuStateMachine(BaseModel): + """ + Represents a single request to update the host or Notecard firmware + """ # noqa: E501 + requested_version: Optional[StrictStr] = Field(default=None, description="Version of the firmware that was requested to be installed") + current_version: Optional[StrictStr] = Field(default=None, description="Version of the firmware that was installed prior to this request") + initiated: Optional[StrictStr] = Field(default=None, description="RFC3339 datetime of when this update was requested") + updates: Optional[List[DeviceDfuStateMachineNode]] = None + __properties: ClassVar[List[str]] = ["requested_version", "current_version", "initiated", "updates"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DeviceDfuStateMachine from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in updates (list) + _items = [] + if self.updates: + for _item in self.updates: + if _item: + _items.append(_item.to_dict()) + _dict['updates'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeviceDfuStateMachine from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "requested_version": obj.get("requested_version"), + "current_version": obj.get("current_version"), + "initiated": obj.get("initiated"), + "updates": [DeviceDfuStateMachineNode.from_dict(_item) for _item in obj["updates"]] if obj.get("updates") is not None else None + }) + return _obj + + diff --git a/src/notehub_py/models/device_dfu_state_machine_node.py b/src/notehub_py/models/device_dfu_state_machine_node.py new file mode 100644 index 0000000..bb69a13 --- /dev/null +++ b/src/notehub_py/models/device_dfu_state_machine_node.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" + Notehub API + + The OpenAPI definition for the Notehub.io API. + + The version of the OpenAPI document: 1.2.0 + Contact: engineering@blues.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class DeviceDfuStateMachineNode(BaseModel): + """ + Represents a single request to update the host or Notecard firmware + """ # noqa: E501 + status: Optional[StrictStr] = Field(default=None, description="Status for this step in the firmware update process") + phase: Optional[StrictStr] = Field(default=None, description="Phase for this step in the firmware update process") + datetime: Optional[StrictStr] = Field(default=None, description="RFC3339 compatible datetime of when this status update happened") + description: Optional[StrictStr] = Field(default=None, description="Additional information") + __properties: ClassVar[List[str]] = ["status", "phase", "datetime", "description"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DeviceDfuStateMachineNode from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeviceDfuStateMachineNode from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "status": obj.get("status"), + "phase": obj.get("phase"), + "datetime": obj.get("datetime"), + "description": obj.get("description") + }) + return _obj + + diff --git a/src/notehub_py/models/device_dfu_status.py b/src/notehub_py/models/device_dfu_status.py new file mode 100644 index 0000000..07c0fc4 --- /dev/null +++ b/src/notehub_py/models/device_dfu_status.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Notehub API + + The OpenAPI definition for the Notehub.io API. + + The version of the OpenAPI document: 1.2.0 + Contact: engineering@blues.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from notehub_py.models.device_dfu_state_machine import DeviceDfuStateMachine +from notehub_py.models.device_dfu_status_current import DeviceDfuStatusCurrent +from typing import Optional, Set +from typing_extensions import Self + +class DeviceDfuStatus(BaseModel): + """ + DeviceDfuStatus + """ # noqa: E501 + device_uid: Optional[StrictStr] = Field(default=None, description="Device UID") + dfu_in_progress: Optional[StrictBool] = Field(default=None, description="true if there is a DFU currently in progress") + current: Optional[DeviceDfuStatusCurrent] = None + status: Optional[DeviceDfuStateMachine] = None + __properties: ClassVar[List[str]] = ["device_uid", "dfu_in_progress", "current", "status"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DeviceDfuStatus from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of current + if self.current: + _dict['current'] = self.current.to_dict() + # override the default output from pydantic by calling `to_dict()` of status + if self.status: + _dict['status'] = self.status.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeviceDfuStatus from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "device_uid": obj.get("device_uid"), + "dfu_in_progress": obj.get("dfu_in_progress"), + "current": DeviceDfuStatusCurrent.from_dict(obj["current"]) if obj.get("current") is not None else None, + "status": DeviceDfuStateMachine.from_dict(obj["status"]) if obj.get("status") is not None else None + }) + return _obj + + diff --git a/src/notehub_py/models/firmware_status.py b/src/notehub_py/models/device_dfu_status_current.py similarity index 81% rename from src/notehub_py/models/firmware_status.py rename to src/notehub_py/models/device_dfu_status_current.py index 1305eb5..0b207b6 100644 --- a/src/notehub_py/models/firmware_status.py +++ b/src/notehub_py/models/device_dfu_status_current.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -23,16 +23,17 @@ from typing import Optional, Set from typing_extensions import Self -class FirmwareStatus(BaseModel): +class DeviceDfuStatusCurrent(BaseModel): """ - FirmwareStatus + Description of the current firmware """ # noqa: E501 - version: Optional[StrictStr] = Field(default=None, description="The version of the firmware") - organization: Optional[StrictStr] = Field(default=None, description="The organization that owns the firmware") - description: Optional[StrictStr] = Field(default=None, description="A description of the firmware") - product: Optional[StrictStr] = Field(default=None, description="The product that the firmware is for") - built: Optional[StrictStr] = Field(default=None, description="The date the firmware was built") - __properties: ClassVar[List[str]] = ["version", "organization", "description", "product", "built"] + version: Optional[StrictStr] = Field(default=None, description="Firmware version") + organization: Optional[StrictStr] = Field(default=None, description="Firmware organization") + description: Optional[StrictStr] = Field(default=None, description="Firmware description") + product: Optional[StrictStr] = Field(default=None, description="Firmware product") + built: Optional[StrictStr] = Field(default=None, description="Firmware build date") + builder: Optional[StrictStr] = Field(default=None, description="Firmware author") + __properties: ClassVar[List[str]] = ["version", "organization", "description", "product", "built", "builder"] model_config = ConfigDict( populate_by_name=True, @@ -52,7 +53,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of FirmwareStatus from a JSON string""" + """Create an instance of DeviceDfuStatusCurrent from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -77,7 +78,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of FirmwareStatus from a dict""" + """Create an instance of DeviceDfuStatusCurrent from a dict""" if obj is None: return None @@ -89,7 +90,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "organization": obj.get("organization"), "description": obj.get("description"), "product": obj.get("product"), - "built": obj.get("built") + "built": obj.get("built"), + "builder": obj.get("builder") }) return _obj diff --git a/src/notehub_py/models/ota_status_list.py b/src/notehub_py/models/device_dfu_status_page.py similarity index 78% rename from src/notehub_py/models/ota_status_list.py rename to src/notehub_py/models/device_dfu_status_page.py index 64205fb..e59992f 100644 --- a/src/notehub_py/models/ota_status_list.py +++ b/src/notehub_py/models/device_dfu_status_page.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,18 +18,18 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictBool +from pydantic import BaseModel, ConfigDict, StrictBool from typing import Any, ClassVar, Dict, List, Optional -from notehub_py.models.ota_status import OTAStatus +from notehub_py.models.device_dfu_status import DeviceDfuStatus from typing import Optional, Set from typing_extensions import Self -class OTAStatusList(BaseModel): +class DeviceDfuStatusPage(BaseModel): """ - OTAStatusList + DeviceDfuStatusPage """ # noqa: E501 - devices: Optional[List[OTAStatus]] = None - has_more: Optional[StrictBool] = Field(default=None, description="Indicates whether more items are available") + devices: Optional[List[DeviceDfuStatus]] = None + has_more: Optional[StrictBool] = False __properties: ClassVar[List[str]] = ["devices", "has_more"] model_config = ConfigDict( @@ -50,7 +50,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of OTAStatusList from a JSON string""" + """Create an instance of DeviceDfuStatusPage from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -82,7 +82,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of OTAStatusList from a dict""" + """Create an instance of DeviceDfuStatusPage from a dict""" if obj is None: return None @@ -90,8 +90,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "devices": [OTAStatus.from_dict(_item) for _item in obj["devices"]] if obj.get("devices") is not None else None, - "has_more": obj.get("has_more") + "devices": [DeviceDfuStatus.from_dict(_item) for _item in obj["devices"]] if obj.get("devices") is not None else None, + "has_more": obj.get("has_more") if obj.get("has_more") is not None else False }) return _obj diff --git a/src/notehub_py/models/device_session.py b/src/notehub_py/models/device_session.py index 50103ba..115b4b4 100644 --- a/src/notehub_py/models/device_session.py +++ b/src/notehub_py/models/device_session.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/notehub_py/models/device_tower_info.py b/src/notehub_py/models/device_tower_info.py index b1b3e94..a6acc7f 100644 --- a/src/notehub_py/models/device_tower_info.py +++ b/src/notehub_py/models/device_tower_info.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/notehub_py/models/device_usage.py b/src/notehub_py/models/device_usage.py index 670cb47..eda875a 100644 --- a/src/notehub_py/models/device_usage.py +++ b/src/notehub_py/models/device_usage.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/notehub_py/models/ota_update_status.py b/src/notehub_py/models/dfu_action_request.py similarity index 74% rename from src/notehub_py/models/ota_update_status.py rename to src/notehub_py/models/dfu_action_request.py index 7d6815d..733a020 100644 --- a/src/notehub_py/models/ota_update_status.py +++ b/src/notehub_py/models/dfu_action_request.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -23,14 +23,12 @@ from typing import Optional, Set from typing_extensions import Self -class OTAUpdateStatus(BaseModel): +class DfuActionRequest(BaseModel): """ - OTAUpdateStatus + DfuActionRequest """ # noqa: E501 - status: Optional[StrictStr] = Field(default=None, description="The status of the OTA request") - successful: Optional[List[StrictStr]] = Field(default=None, description="The successful device UIDs") - failed: Optional[List[StrictStr]] = Field(default=None, description="The failed device UIDs") - __properties: ClassVar[List[str]] = ["status", "successful", "failed"] + filename: Optional[StrictStr] = Field(default=None, description="The name of the firmware file") + __properties: ClassVar[List[str]] = ["filename"] model_config = ConfigDict( populate_by_name=True, @@ -50,7 +48,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of OTAUpdateStatus from a JSON string""" + """Create an instance of DfuActionRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -75,7 +73,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of OTAUpdateStatus from a dict""" + """Create an instance of DfuActionRequest from a dict""" if obj is None: return None @@ -83,9 +81,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "status": obj.get("status"), - "successful": obj.get("successful"), - "failed": obj.get("failed") + "filename": obj.get("filename") }) return _obj diff --git a/src/notehub_py/models/dfu_env.py b/src/notehub_py/models/dfu_env.py index d56a623..1ec4cd8 100644 --- a/src/notehub_py/models/dfu_env.py +++ b/src/notehub_py/models/dfu_env.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/notehub_py/models/dfu_state.py b/src/notehub_py/models/dfu_state.py index acd0b25..a2b046c 100644 --- a/src/notehub_py/models/dfu_state.py +++ b/src/notehub_py/models/dfu_state.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/notehub_py/models/email_notification.py b/src/notehub_py/models/email_notification.py index 30555e4..c2042fa 100644 --- a/src/notehub_py/models/email_notification.py +++ b/src/notehub_py/models/email_notification.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/notehub_py/models/environment_variables.py b/src/notehub_py/models/environment_variables.py index da0d5b8..3db214e 100644 --- a/src/notehub_py/models/environment_variables.py +++ b/src/notehub_py/models/environment_variables.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/notehub_py/models/error.py b/src/notehub_py/models/error.py index 493f47c..020d854 100644 --- a/src/notehub_py/models/error.py +++ b/src/notehub_py/models/error.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/notehub_py/models/event.py b/src/notehub_py/models/event.py index f9cfc25..0c368e3 100644 --- a/src/notehub_py/models/event.py +++ b/src/notehub_py/models/event.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/notehub_py/models/ota_update_request.py b/src/notehub_py/models/firmware.py similarity index 52% rename from src/notehub_py/models/ota_update_request.py rename to src/notehub_py/models/firmware.py index fa171b4..50bb00a 100644 --- a/src/notehub_py/models/ota_update_request.py +++ b/src/notehub_py/models/firmware.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,27 +18,27 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self -class OTAUpdateRequest(BaseModel): +class Firmware(BaseModel): """ - OTAUpdateRequest + Firmware """ # noqa: E501 - filename: Optional[StrictStr] = Field(default=None, description="The name of the firmware file") - device_uids: Optional[List[StrictStr]] = Field(default=None, description="The device UIDs to update") - fleet_uids: Optional[List[StrictStr]] = Field(default=None, description="The fleet UIDs to update") - device_tags: Optional[List[StrictStr]] = Field(default=None, description="The device tags to update") - version: Optional[StrictStr] = Field(default=None, description="The version of the firmware") - md5: Optional[StrictStr] = Field(default=None, description="The MD5 hash of the firmware file", alias="MD5") - type: Optional[StrictStr] = Field(default=None, description="The type of firmware") - product: Optional[StrictStr] = Field(default=None, description="The product that the firmware is for") - target: Optional[StrictStr] = Field(default=None, description="The target device for the firmware") - unpublished: Optional[StrictBool] = Field(default=None, description="If true, the firmware is unpublished") - cancel_dfu: Optional[StrictBool] = Field(default=None, description="If true, the DFU is canceled") - __properties: ClassVar[List[str]] = ["filename", "device_uids", "fleet_uids", "device_tags", "version", "MD5", "type", "product", "target", "unpublished", "cancel_dfu"] + org: Optional[StrictStr] = None + product: Optional[StrictStr] = None + firmware: Optional[StrictStr] = None + version: Optional[StrictStr] = None + target: Optional[StrictStr] = None + ver_major: Optional[StrictInt] = None + ver_minor: Optional[StrictInt] = None + ver_patch: Optional[StrictInt] = None + ver_build: Optional[StrictInt] = None + built: Optional[StrictStr] = None + builder: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["org", "product", "firmware", "version", "target", "ver_major", "ver_minor", "ver_patch", "ver_build", "built", "builder"] model_config = ConfigDict( populate_by_name=True, @@ -58,7 +58,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of OTAUpdateRequest from a JSON string""" + """Create an instance of Firmware from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -83,7 +83,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of OTAUpdateRequest from a dict""" + """Create an instance of Firmware from a dict""" if obj is None: return None @@ -91,17 +91,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "filename": obj.get("filename"), - "device_uids": obj.get("device_uids"), - "fleet_uids": obj.get("fleet_uids"), - "device_tags": obj.get("device_tags"), - "version": obj.get("version"), - "MD5": obj.get("MD5"), - "type": obj.get("type"), + "org": obj.get("org"), "product": obj.get("product"), + "firmware": obj.get("firmware"), + "version": obj.get("version"), "target": obj.get("target"), - "unpublished": obj.get("unpublished"), - "cancel_dfu": obj.get("cancel_dfu") + "ver_major": obj.get("ver_major"), + "ver_minor": obj.get("ver_minor"), + "ver_patch": obj.get("ver_patch"), + "ver_build": obj.get("ver_build"), + "built": obj.get("built"), + "builder": obj.get("builder") }) return _obj diff --git a/src/notehub_py/models/firmware_info.py b/src/notehub_py/models/firmware_info.py index bf21ece..51eeb0f 100644 --- a/src/notehub_py/models/firmware_info.py +++ b/src/notehub_py/models/firmware_info.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/notehub_py/models/fleet.py b/src/notehub_py/models/fleet.py index a3e0af4..aa38669 100644 --- a/src/notehub_py/models/fleet.py +++ b/src/notehub_py/models/fleet.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/notehub_py/models/get_alerts200_response.py b/src/notehub_py/models/get_alerts200_response.py index 6f919e2..044e3e7 100644 --- a/src/notehub_py/models/get_alerts200_response.py +++ b/src/notehub_py/models/get_alerts200_response.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/notehub_py/models/get_billing_accounts200_response.py b/src/notehub_py/models/get_billing_accounts200_response.py index 7813064..99d96c5 100644 --- a/src/notehub_py/models/get_billing_accounts200_response.py +++ b/src/notehub_py/models/get_billing_accounts200_response.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/notehub_py/models/get_device_environment_variables200_response.py b/src/notehub_py/models/get_device_environment_variables200_response.py index 578a7b6..08cfa52 100644 --- a/src/notehub_py/models/get_device_environment_variables200_response.py +++ b/src/notehub_py/models/get_device_environment_variables200_response.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/notehub_py/models/get_device_health_log200_response.py b/src/notehub_py/models/get_device_health_log200_response.py index 1b3759b..2ca6bbb 100644 --- a/src/notehub_py/models/get_device_health_log200_response.py +++ b/src/notehub_py/models/get_device_health_log200_response.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/notehub_py/models/get_device_health_log200_response_health_log_inner.py b/src/notehub_py/models/get_device_health_log200_response_health_log_inner.py index 0222755..b2583e6 100644 --- a/src/notehub_py/models/get_device_health_log200_response_health_log_inner.py +++ b/src/notehub_py/models/get_device_health_log200_response_health_log_inner.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/notehub_py/models/get_device_latest200_response.py b/src/notehub_py/models/get_device_latest200_response.py index 33d3cd0..2b45533 100644 --- a/src/notehub_py/models/get_device_latest200_response.py +++ b/src/notehub_py/models/get_device_latest200_response.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/notehub_py/models/get_device_public_key200_response.py b/src/notehub_py/models/get_device_public_key200_response.py index 27f43a9..9952211 100644 --- a/src/notehub_py/models/get_device_public_key200_response.py +++ b/src/notehub_py/models/get_device_public_key200_response.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/notehub_py/models/get_device_sessions200_response.py b/src/notehub_py/models/get_device_sessions200_response.py index 31f5272..dce0f6a 100644 --- a/src/notehub_py/models/get_device_sessions200_response.py +++ b/src/notehub_py/models/get_device_sessions200_response.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/notehub_py/models/get_project_device_public_keys200_response.py b/src/notehub_py/models/get_project_device_public_keys200_response.py index 2ec2bae..e34ad3b 100644 --- a/src/notehub_py/models/get_project_device_public_keys200_response.py +++ b/src/notehub_py/models/get_project_device_public_keys200_response.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/notehub_py/models/get_project_device_public_keys200_response_device_public_keys_inner.py b/src/notehub_py/models/get_project_device_public_keys200_response_device_public_keys_inner.py index aec6112..ebbf361 100644 --- a/src/notehub_py/models/get_project_device_public_keys200_response_device_public_keys_inner.py +++ b/src/notehub_py/models/get_project_device_public_keys200_response_device_public_keys_inner.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/notehub_py/models/get_project_devices200_response.py b/src/notehub_py/models/get_project_devices200_response.py index 993aa1c..09d2943 100644 --- a/src/notehub_py/models/get_project_devices200_response.py +++ b/src/notehub_py/models/get_project_devices200_response.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/notehub_py/models/get_project_events200_response.py b/src/notehub_py/models/get_project_events200_response.py index ad7fae4..20a5393 100644 --- a/src/notehub_py/models/get_project_events200_response.py +++ b/src/notehub_py/models/get_project_events200_response.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/notehub_py/models/get_project_events_by_cursor200_response.py b/src/notehub_py/models/get_project_events_by_cursor200_response.py index c3c2010..3e7f16d 100644 --- a/src/notehub_py/models/get_project_events_by_cursor200_response.py +++ b/src/notehub_py/models/get_project_events_by_cursor200_response.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/notehub_py/models/get_project_fleets200_response.py b/src/notehub_py/models/get_project_fleets200_response.py index bac67a5..2631da5 100644 --- a/src/notehub_py/models/get_project_fleets200_response.py +++ b/src/notehub_py/models/get_project_fleets200_response.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/notehub_py/models/get_project_members200_response.py b/src/notehub_py/models/get_project_members200_response.py index a415f3e..0b068ed 100644 --- a/src/notehub_py/models/get_project_members200_response.py +++ b/src/notehub_py/models/get_project_members200_response.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/notehub_py/models/get_project_products200_response.py b/src/notehub_py/models/get_project_products200_response.py index 285f689..a4ec4bc 100644 --- a/src/notehub_py/models/get_project_products200_response.py +++ b/src/notehub_py/models/get_project_products200_response.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/notehub_py/models/get_projects200_response.py b/src/notehub_py/models/get_projects200_response.py index 7eef07b..4d315cb 100644 --- a/src/notehub_py/models/get_projects200_response.py +++ b/src/notehub_py/models/get_projects200_response.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/notehub_py/models/get_route_logs_by_route200_response_inner.py b/src/notehub_py/models/get_route_logs_by_route200_response_inner.py index 70b123e..1be176d 100644 --- a/src/notehub_py/models/get_route_logs_by_route200_response_inner.py +++ b/src/notehub_py/models/get_route_logs_by_route200_response_inner.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/notehub_py/models/google.py b/src/notehub_py/models/google.py index c1adcad..2f2418d 100644 --- a/src/notehub_py/models/google.py +++ b/src/notehub_py/models/google.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/notehub_py/models/handle_note_changes200_response.py b/src/notehub_py/models/handle_note_changes200_response.py index e1be56a..a29eb9d 100644 --- a/src/notehub_py/models/handle_note_changes200_response.py +++ b/src/notehub_py/models/handle_note_changes200_response.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/notehub_py/models/handle_note_get200_response.py b/src/notehub_py/models/handle_note_get200_response.py index 2254e0d..dbc3b41 100644 --- a/src/notehub_py/models/handle_note_get200_response.py +++ b/src/notehub_py/models/handle_note_get200_response.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/notehub_py/models/handle_note_signal200_response.py b/src/notehub_py/models/handle_note_signal200_response.py index 4fe4e54..bc2d536 100644 --- a/src/notehub_py/models/handle_note_signal200_response.py +++ b/src/notehub_py/models/handle_note_signal200_response.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/notehub_py/models/handle_notefile_changes200_response.py b/src/notehub_py/models/handle_notefile_changes200_response.py index 6100117..61d39b9 100644 --- a/src/notehub_py/models/handle_notefile_changes200_response.py +++ b/src/notehub_py/models/handle_notefile_changes200_response.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/notehub_py/models/handle_notefile_changes_pending200_response.py b/src/notehub_py/models/handle_notefile_changes_pending200_response.py index 8a4f036..2a9ff8f 100644 --- a/src/notehub_py/models/handle_notefile_changes_pending200_response.py +++ b/src/notehub_py/models/handle_notefile_changes_pending200_response.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/notehub_py/models/handle_notefile_delete_request.py b/src/notehub_py/models/handle_notefile_delete_request.py index 904b271..8a2c708 100644 --- a/src/notehub_py/models/handle_notefile_delete_request.py +++ b/src/notehub_py/models/handle_notefile_delete_request.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/notehub_py/models/http.py b/src/notehub_py/models/http.py index 434ddee..0bada4f 100644 --- a/src/notehub_py/models/http.py +++ b/src/notehub_py/models/http.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/notehub_py/models/http_filter.py b/src/notehub_py/models/http_filter.py index 51bac1e..4fa0769 100644 --- a/src/notehub_py/models/http_filter.py +++ b/src/notehub_py/models/http_filter.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/notehub_py/models/http_transform.py b/src/notehub_py/models/http_transform.py index 7d8d8e7..7090110 100644 --- a/src/notehub_py/models/http_transform.py +++ b/src/notehub_py/models/http_transform.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/notehub_py/models/location.py b/src/notehub_py/models/location.py index dc890f8..2e0e324 100644 --- a/src/notehub_py/models/location.py +++ b/src/notehub_py/models/location.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/notehub_py/models/login200_response.py b/src/notehub_py/models/login200_response.py index d951841..1f03022 100644 --- a/src/notehub_py/models/login200_response.py +++ b/src/notehub_py/models/login200_response.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/notehub_py/models/login_request.py b/src/notehub_py/models/login_request.py index fa3f99d..a2a98f2 100644 --- a/src/notehub_py/models/login_request.py +++ b/src/notehub_py/models/login_request.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/notehub_py/models/monitor.py b/src/notehub_py/models/monitor.py index 36f9461..898b42c 100644 --- a/src/notehub_py/models/monitor.py +++ b/src/notehub_py/models/monitor.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/notehub_py/models/monitor_alert_routes_inner.py b/src/notehub_py/models/monitor_alert_routes_inner.py index 29a6d87..bc24b1d 100644 --- a/src/notehub_py/models/monitor_alert_routes_inner.py +++ b/src/notehub_py/models/monitor_alert_routes_inner.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/notehub_py/models/mqtt.py b/src/notehub_py/models/mqtt.py index 73f93ae..77c98bd 100644 --- a/src/notehub_py/models/mqtt.py +++ b/src/notehub_py/models/mqtt.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/notehub_py/models/note.py b/src/notehub_py/models/note.py index 1dd6b33..bb678b9 100644 --- a/src/notehub_py/models/note.py +++ b/src/notehub_py/models/note.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/notehub_py/models/route.py b/src/notehub_py/models/notehub_route.py similarity index 89% rename from src/notehub_py/models/route.py rename to src/notehub_py/models/notehub_route.py index 8afbfe6..7be13ce 100644 --- a/src/notehub_py/models/route.py +++ b/src/notehub_py/models/notehub_route.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -20,20 +20,20 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional -from notehub_py.models.route_schema import RouteSchema +from notehub_py.models.notehub_route_schema import NotehubRouteSchema from typing import Optional, Set from typing_extensions import Self -class Route(BaseModel): +class NotehubRoute(BaseModel): """ - Route + NotehubRoute """ # noqa: E501 uid: Optional[StrictStr] = Field(default=None, description="Route UID") label: Optional[StrictStr] = Field(default=None, description="Route Label") route_type: Optional[StrictStr] = Field(default='http', description="Type of route.") modified: Optional[StrictStr] = Field(default=None, description="Last Modified") disabled: Optional[StrictBool] = Field(default=False, description="Is route disabled?") - var_schema: Optional[RouteSchema] = Field(default=None, alias="schema") + var_schema: Optional[NotehubRouteSchema] = Field(default=None, alias="schema") __properties: ClassVar[List[str]] = ["uid", "label", "route_type", "modified", "disabled", "schema"] @field_validator('route_type') @@ -64,7 +64,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of Route from a JSON string""" + """Create an instance of NotehubRoute from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -92,7 +92,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of Route from a dict""" + """Create an instance of NotehubRoute from a dict""" if obj is None: return None @@ -105,7 +105,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "route_type": obj.get("route_type") if obj.get("route_type") is not None else 'http', "modified": obj.get("modified"), "disabled": obj.get("disabled") if obj.get("disabled") is not None else False, - "schema": RouteSchema.from_dict(obj["schema"]) if obj.get("schema") is not None else None + "schema": NotehubRouteSchema.from_dict(obj["schema"]) if obj.get("schema") is not None else None }) return _obj diff --git a/src/notehub_py/models/route_schema.py b/src/notehub_py/models/notehub_route_schema.py similarity index 89% rename from src/notehub_py/models/route_schema.py rename to src/notehub_py/models/notehub_route_schema.py index fbb6f46..cb0ae2f 100644 --- a/src/notehub_py/models/route_schema.py +++ b/src/notehub_py/models/notehub_route_schema.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -32,11 +32,11 @@ from typing import Union, List, Set, Optional, Dict from typing_extensions import Literal, Self -ROUTESCHEMA_ONE_OF_SCHEMAS = ["Aws", "Azure", "Google", "Http", "Mqtt", "Proxy", "Radresponder", "Slack", "Snowflake", "Thingworx"] +NOTEHUBROUTESCHEMA_ONE_OF_SCHEMAS = ["Aws", "Azure", "Google", "Http", "Mqtt", "Proxy", "Radresponder", "Slack", "Snowflake", "Thingworx"] -class RouteSchema(BaseModel): +class NotehubRouteSchema(BaseModel): """ - RouteSchema + NotehubRouteSchema """ # data type: Http oneof_schema_1_validator: Optional[Http] = None @@ -79,7 +79,7 @@ def __init__(self, *args, **kwargs) -> None: @field_validator('actual_instance') def actual_instance_must_validate_oneof(cls, v): - instance = RouteSchema.model_construct() + instance = NotehubRouteSchema.model_construct() error_messages = [] match = 0 # validate data type: Http @@ -134,10 +134,10 @@ def actual_instance_must_validate_oneof(cls, v): match += 1 if match > 1: # more than 1 match - raise ValueError("Multiple matches found when setting `actual_instance` in RouteSchema with oneOf schemas: Aws, Azure, Google, Http, Mqtt, Proxy, Radresponder, Slack, Snowflake, Thingworx. Details: " + ", ".join(error_messages)) + raise ValueError("Multiple matches found when setting `actual_instance` in NotehubRouteSchema with oneOf schemas: Aws, Azure, Google, Http, Mqtt, Proxy, Radresponder, Slack, Snowflake, Thingworx. Details: " + ", ".join(error_messages)) elif match == 0: # no match - raise ValueError("No match found when setting `actual_instance` in RouteSchema with oneOf schemas: Aws, Azure, Google, Http, Mqtt, Proxy, Radresponder, Slack, Snowflake, Thingworx. Details: " + ", ".join(error_messages)) + raise ValueError("No match found when setting `actual_instance` in NotehubRouteSchema with oneOf schemas: Aws, Azure, Google, Http, Mqtt, Proxy, Radresponder, Slack, Snowflake, Thingworx. Details: " + ", ".join(error_messages)) else: return v @@ -215,10 +215,10 @@ def from_json(cls, json_str: str) -> Self: if match > 1: # more than 1 match - raise ValueError("Multiple matches found when deserializing the JSON string into RouteSchema with oneOf schemas: Aws, Azure, Google, Http, Mqtt, Proxy, Radresponder, Slack, Snowflake, Thingworx. Details: " + ", ".join(error_messages)) + raise ValueError("Multiple matches found when deserializing the JSON string into NotehubRouteSchema with oneOf schemas: Aws, Azure, Google, Http, Mqtt, Proxy, Radresponder, Slack, Snowflake, Thingworx. Details: " + ", ".join(error_messages)) elif match == 0: # no match - raise ValueError("No match found when deserializing the JSON string into RouteSchema with oneOf schemas: Aws, Azure, Google, Http, Mqtt, Proxy, Radresponder, Slack, Snowflake, Thingworx. Details: " + ", ".join(error_messages)) + raise ValueError("No match found when deserializing the JSON string into NotehubRouteSchema with oneOf schemas: Aws, Azure, Google, Http, Mqtt, Proxy, Radresponder, Slack, Snowflake, Thingworx. Details: " + ", ".join(error_messages)) else: return instance diff --git a/src/notehub_py/models/ota_status.py b/src/notehub_py/models/ota_status.py deleted file mode 100644 index e43dc61..0000000 --- a/src/notehub_py/models/ota_status.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - Notehub API - - The OpenAPI definition for the Notehub.io API. - - The version of the OpenAPI document: 1.1.0 - Contact: engineering@blues.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from notehub_py.models.firmware_status import FirmwareStatus -from typing import Optional, Set -from typing_extensions import Self - -class OTAStatus(BaseModel): - """ - OTAStatus - """ # noqa: E501 - device_uid: Optional[StrictStr] = Field(default=None, description="The device UID") - tags: Optional[StrictStr] = Field(default=None, description="The tags associated with the device") - notecard_current_firmware: Optional[FirmwareStatus] = None - notecard_dfu_began_at: Optional[StrictStr] = Field(default=None, description="The time the Notecard DFU began") - notecard_dfu_status: Optional[StrictStr] = Field(default=None, description="The status of the Notecard DFU") - notecard_requested_firmware: Optional[FirmwareStatus] = None - notecard_requested_at: Optional[StrictStr] = Field(default=None, description="The time the Notecard firmware was requested") - notecard_requested_scope: Optional[StrictStr] = Field(default=None, description="The scope of the Notecard firmware request") - notecard_requested_show_details: Optional[StrictBool] = Field(default=None, description="Whether to show details of the Notecard firmware request") - notecard_requested_status: Optional[StrictStr] = Field(default=None, description="The status of the Notecard firmware request") - host_current_firmware: Optional[FirmwareStatus] = None - host_dfu_began_at: Optional[StrictStr] = Field(default=None, description="The time the host DFU began") - host_dfu_status: Optional[StrictStr] = Field(default=None, description="The status of the host DFU") - host_requested_firmware: Optional[FirmwareStatus] = None - host_requested_at: Optional[StrictStr] = Field(default=None, description="The time the host firmware was requested") - host_requested_scope: Optional[StrictStr] = Field(default=None, description="The scope of the host firmware request") - host_requested_show_details: Optional[StrictBool] = Field(default=None, description="Whether to show details of the host firmware request") - host_requested_status: Optional[StrictStr] = Field(default=None, description="The status of the host firmware request") - __properties: ClassVar[List[str]] = ["device_uid", "tags", "notecard_current_firmware", "notecard_dfu_began_at", "notecard_dfu_status", "notecard_requested_firmware", "notecard_requested_at", "notecard_requested_scope", "notecard_requested_show_details", "notecard_requested_status", "host_current_firmware", "host_dfu_began_at", "host_dfu_status", "host_requested_firmware", "host_requested_at", "host_requested_scope", "host_requested_show_details", "host_requested_status"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of OTAStatus from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of notecard_current_firmware - if self.notecard_current_firmware: - _dict['notecard_current_firmware'] = self.notecard_current_firmware.to_dict() - # override the default output from pydantic by calling `to_dict()` of notecard_requested_firmware - if self.notecard_requested_firmware: - _dict['notecard_requested_firmware'] = self.notecard_requested_firmware.to_dict() - # override the default output from pydantic by calling `to_dict()` of host_current_firmware - if self.host_current_firmware: - _dict['host_current_firmware'] = self.host_current_firmware.to_dict() - # override the default output from pydantic by calling `to_dict()` of host_requested_firmware - if self.host_requested_firmware: - _dict['host_requested_firmware'] = self.host_requested_firmware.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of OTAStatus from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "device_uid": obj.get("device_uid"), - "tags": obj.get("tags"), - "notecard_current_firmware": FirmwareStatus.from_dict(obj["notecard_current_firmware"]) if obj.get("notecard_current_firmware") is not None else None, - "notecard_dfu_began_at": obj.get("notecard_dfu_began_at"), - "notecard_dfu_status": obj.get("notecard_dfu_status"), - "notecard_requested_firmware": FirmwareStatus.from_dict(obj["notecard_requested_firmware"]) if obj.get("notecard_requested_firmware") is not None else None, - "notecard_requested_at": obj.get("notecard_requested_at"), - "notecard_requested_scope": obj.get("notecard_requested_scope"), - "notecard_requested_show_details": obj.get("notecard_requested_show_details"), - "notecard_requested_status": obj.get("notecard_requested_status"), - "host_current_firmware": FirmwareStatus.from_dict(obj["host_current_firmware"]) if obj.get("host_current_firmware") is not None else None, - "host_dfu_began_at": obj.get("host_dfu_began_at"), - "host_dfu_status": obj.get("host_dfu_status"), - "host_requested_firmware": FirmwareStatus.from_dict(obj["host_requested_firmware"]) if obj.get("host_requested_firmware") is not None else None, - "host_requested_at": obj.get("host_requested_at"), - "host_requested_scope": obj.get("host_requested_scope"), - "host_requested_show_details": obj.get("host_requested_show_details"), - "host_requested_status": obj.get("host_requested_status") - }) - return _obj - - diff --git a/src/notehub_py/models/post_provision_project_device_request.py b/src/notehub_py/models/post_provision_project_device_request.py index 7a37621..2abe94f 100644 --- a/src/notehub_py/models/post_provision_project_device_request.py +++ b/src/notehub_py/models/post_provision_project_device_request.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/notehub_py/models/product.py b/src/notehub_py/models/product.py index cebde49..bc17de6 100644 --- a/src/notehub_py/models/product.py +++ b/src/notehub_py/models/product.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/notehub_py/models/project.py b/src/notehub_py/models/project.py index 70037c3..d0ffb6a 100644 --- a/src/notehub_py/models/project.py +++ b/src/notehub_py/models/project.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/notehub_py/models/project_member.py b/src/notehub_py/models/project_member.py index f7ffe6d..3342ae8 100644 --- a/src/notehub_py/models/project_member.py +++ b/src/notehub_py/models/project_member.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/notehub_py/models/proxy.py b/src/notehub_py/models/proxy.py index 8d4407d..e93ab66 100644 --- a/src/notehub_py/models/proxy.py +++ b/src/notehub_py/models/proxy.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/notehub_py/models/put_device_fleets_request.py b/src/notehub_py/models/put_device_fleets_request.py index 43928dc..32b9712 100644 --- a/src/notehub_py/models/put_device_fleets_request.py +++ b/src/notehub_py/models/put_device_fleets_request.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/notehub_py/models/radresponder.py b/src/notehub_py/models/radresponder.py index 66befea..2632154 100644 --- a/src/notehub_py/models/radresponder.py +++ b/src/notehub_py/models/radresponder.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/notehub_py/models/role.py b/src/notehub_py/models/role.py index ab481ac..a338073 100644 --- a/src/notehub_py/models/role.py +++ b/src/notehub_py/models/role.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/notehub_py/models/slack.py b/src/notehub_py/models/slack.py index a29e4ee..e453e6f 100644 --- a/src/notehub_py/models/slack.py +++ b/src/notehub_py/models/slack.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/notehub_py/models/slack_bearer_notification.py b/src/notehub_py/models/slack_bearer_notification.py index f7405a4..94f78f3 100644 --- a/src/notehub_py/models/slack_bearer_notification.py +++ b/src/notehub_py/models/slack_bearer_notification.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/notehub_py/models/slack_web_hook_notification.py b/src/notehub_py/models/slack_web_hook_notification.py index 6d8ba26..3091c91 100644 --- a/src/notehub_py/models/slack_web_hook_notification.py +++ b/src/notehub_py/models/slack_web_hook_notification.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/notehub_py/models/snowflake.py b/src/notehub_py/models/snowflake.py index 0b06490..d58076c 100644 --- a/src/notehub_py/models/snowflake.py +++ b/src/notehub_py/models/snowflake.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/notehub_py/models/snowflake_transform.py b/src/notehub_py/models/snowflake_transform.py index b1f2f24..2dc04f9 100644 --- a/src/notehub_py/models/snowflake_transform.py +++ b/src/notehub_py/models/snowflake_transform.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/notehub_py/models/thingworx.py b/src/notehub_py/models/thingworx.py index 506188c..3591faf 100644 --- a/src/notehub_py/models/thingworx.py +++ b/src/notehub_py/models/thingworx.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/notehub_py/models/tower_location.py b/src/notehub_py/models/tower_location.py index 1887c6b..e96ef02 100644 --- a/src/notehub_py/models/tower_location.py +++ b/src/notehub_py/models/tower_location.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/notehub_py/models/twilio.py b/src/notehub_py/models/twilio.py index dda7e97..228b072 100644 --- a/src/notehub_py/models/twilio.py +++ b/src/notehub_py/models/twilio.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/notehub_py/models/update_fleet_request.py b/src/notehub_py/models/update_fleet_request.py index e1282d1..61042a3 100644 --- a/src/notehub_py/models/update_fleet_request.py +++ b/src/notehub_py/models/update_fleet_request.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/notehub_py/models/upload_metadata.py b/src/notehub_py/models/upload_metadata.py new file mode 100644 index 0000000..eb34e9d --- /dev/null +++ b/src/notehub_py/models/upload_metadata.py @@ -0,0 +1,121 @@ +# coding: utf-8 + +""" + Notehub API + + The OpenAPI definition for the Notehub.io API. + + The version of the OpenAPI document: 1.2.0 + Contact: engineering@blues.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from notehub_py.models.firmware import Firmware +from typing import Optional, Set +from typing_extensions import Self + +class UploadMetadata(BaseModel): + """ + UploadMetadata + """ # noqa: E501 + name: Optional[StrictStr] = None + length: Optional[StrictInt] = None + md5: Optional[StrictStr] = None + crc32: Optional[StrictInt] = None + created: Optional[StrictInt] = None + modified: Optional[StrictInt] = None + source: Optional[StrictStr] = None + contains: Optional[StrictStr] = None + found: Optional[StrictStr] = None + type: Optional[StrictStr] = None + tags: Optional[StrictStr] = None + notes: Optional[StrictStr] = None + firmware: Optional[Firmware] = None + __properties: ClassVar[List[str]] = ["name", "length", "md5", "crc32", "created", "modified", "source", "contains", "found", "type", "tags", "notes", "firmware"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UploadMetadata from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of firmware + if self.firmware: + _dict['firmware'] = self.firmware.to_dict() + # set to None if firmware (nullable) is None + # and model_fields_set contains the field + if self.firmware is None and "firmware" in self.model_fields_set: + _dict['firmware'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UploadMetadata from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "length": obj.get("length"), + "md5": obj.get("md5"), + "crc32": obj.get("crc32"), + "created": obj.get("created"), + "modified": obj.get("modified"), + "source": obj.get("source"), + "contains": obj.get("contains"), + "found": obj.get("found"), + "type": obj.get("type"), + "tags": obj.get("tags"), + "notes": obj.get("notes"), + "firmware": Firmware.from_dict(obj["firmware"]) if obj.get("firmware") is not None else None + }) + return _obj + + diff --git a/src/notehub_py/models/user_db_route.py b/src/notehub_py/models/user_db_route.py index 8d0c0c0..14d0135 100644 --- a/src/notehub_py/models/user_db_route.py +++ b/src/notehub_py/models/user_db_route.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/notehub_py/models/user_dfu_state_machine.py b/src/notehub_py/models/user_dfu_state_machine.py new file mode 100644 index 0000000..6d9a5f2 --- /dev/null +++ b/src/notehub_py/models/user_dfu_state_machine.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + Notehub API + + The OpenAPI definition for the Notehub.io API. + + The version of the OpenAPI document: 1.2.0 + Contact: engineering@blues.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from notehub_py.models.upload_metadata import UploadMetadata +from notehub_py.models.user_dfu_state_machine_status import UserDfuStateMachineStatus +from typing import Optional, Set +from typing_extensions import Self + +class UserDfuStateMachine(BaseModel): + """ + UserDfuStateMachine + """ # noqa: E501 + status: Optional[UserDfuStateMachineStatus] = None + created: Optional[datetime] = None + from_version: Optional[StrictStr] = None + metadata: Optional[UploadMetadata] = None + __properties: ClassVar[List[str]] = ["status", "created", "from_version", "metadata"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserDfuStateMachine from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of status + if self.status: + _dict['status'] = self.status.to_dict() + # override the default output from pydantic by calling `to_dict()` of metadata + if self.metadata: + _dict['metadata'] = self.metadata.to_dict() + # set to None if created (nullable) is None + # and model_fields_set contains the field + if self.created is None and "created" in self.model_fields_set: + _dict['created'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserDfuStateMachine from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "status": UserDfuStateMachineStatus.from_dict(obj["status"]) if obj.get("status") is not None else None, + "created": obj.get("created"), + "from_version": obj.get("from_version"), + "metadata": UploadMetadata.from_dict(obj["metadata"]) if obj.get("metadata") is not None else None + }) + return _obj + + diff --git a/src/notehub_py/models/user_dfu_state_machine_status.py b/src/notehub_py/models/user_dfu_state_machine_status.py new file mode 100644 index 0000000..2d4c6df --- /dev/null +++ b/src/notehub_py/models/user_dfu_state_machine_status.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + Notehub API + + The OpenAPI definition for the Notehub.io API. + + The version of the OpenAPI document: 1.2.0 + Contact: engineering@blues.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class UserDfuStateMachineStatus(BaseModel): + """ + UserDfuStateMachineStatus + """ # noqa: E501 + phase: Optional[StrictStr] = None + phase_description: Optional[StrictStr] = None + var_date: Optional[datetime] = Field(default=None, alias="date") + status: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["phase", "phase_description", "date", "status"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserDfuStateMachineStatus from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if var_date (nullable) is None + # and model_fields_set contains the field + if self.var_date is None and "var_date" in self.model_fields_set: + _dict['date'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserDfuStateMachineStatus from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "phase": obj.get("phase"), + "phase_description": obj.get("phase_description"), + "date": obj.get("date"), + "status": obj.get("status") + }) + return _obj + + diff --git a/src/notehub_py/models/user_firmware_info.py b/src/notehub_py/models/user_firmware_info.py new file mode 100644 index 0000000..00c7657 --- /dev/null +++ b/src/notehub_py/models/user_firmware_info.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + Notehub API + + The OpenAPI definition for the Notehub.io API. + + The version of the OpenAPI document: 1.2.0 + Contact: engineering@blues.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from notehub_py.models.current_firmware import CurrentFirmware +from notehub_py.models.user_dfu_state_machine import UserDfuStateMachine +from typing import Optional, Set +from typing_extensions import Self + +class UserFirmwareInfo(BaseModel): + """ + UserFirmwareInfo + """ # noqa: E501 + current_firmware: Optional[CurrentFirmware] = None + firmware_update: Optional[UserDfuStateMachine] = None + __properties: ClassVar[List[str]] = ["current_firmware", "firmware_update"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserFirmwareInfo from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of current_firmware + if self.current_firmware: + _dict['current_firmware'] = self.current_firmware.to_dict() + # override the default output from pydantic by calling `to_dict()` of firmware_update + if self.firmware_update: + _dict['firmware_update'] = self.firmware_update.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserFirmwareInfo from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "current_firmware": CurrentFirmware.from_dict(obj["current_firmware"]) if obj.get("current_firmware") is not None else None, + "firmware_update": UserDfuStateMachine.from_dict(obj["firmware_update"]) if obj.get("firmware_update") is not None else None + }) + return _obj + + diff --git a/src/notehub_py/rest.py b/src/notehub_py/rest.py index f074709..91ffd1d 100644 --- a/src/notehub_py/rest.py +++ b/src/notehub_py/rest.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/setup.py b/src/setup.py index 79b688f..267d112 100644 --- a/src/setup.py +++ b/src/setup.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/test/test_alert.py b/src/test/test_alert.py index 86273a8..5acb282 100644 --- a/src/test/test_alert.py +++ b/src/test/test_alert.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -46,6 +46,8 @@ def make_instance(self, include_optional) -> Alert: version = 56, alert_source = 'app', source = '', + monitor_type = 'event', + field_name = '', data = [ notehub_py.models.alert_data_inner.Alert_data_inner( alert_source = 'app', diff --git a/src/test/test_alert_api.py b/src/test/test_alert_api.py index 7ad3d9d..abe5503 100644 --- a/src/test/test_alert_api.py +++ b/src/test/test_alert_api.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/test/test_alert_data_inner.py b/src/test/test_alert_data_inner.py index b2977d6..824f657 100644 --- a/src/test/test_alert_data_inner.py +++ b/src/test/test_alert_data_inner.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/test/test_alert_notifications_inner.py b/src/test/test_alert_notifications_inner.py index ec3e174..719884a 100644 --- a/src/test/test_alert_notifications_inner.py +++ b/src/test/test_alert_notifications_inner.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/test/test_authorization_api.py b/src/test/test_authorization_api.py index cc90f7d..49a7750 100644 --- a/src/test/test_authorization_api.py +++ b/src/test/test_authorization_api.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/test/test_aws.py b/src/test/test_aws.py index bb8d170..a91509d 100644 --- a/src/test/test_aws.py +++ b/src/test/test_aws.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/test/test_azure.py b/src/test/test_azure.py index f68f82b..27a1453 100644 --- a/src/test/test_azure.py +++ b/src/test/test_azure.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/test/test_billing_account.py b/src/test/test_billing_account.py index 8e2f683..cd1d8cf 100644 --- a/src/test/test_billing_account.py +++ b/src/test/test_billing_account.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/test/test_billing_account_api.py b/src/test/test_billing_account_api.py index 32cb27c..7a184de 100644 --- a/src/test/test_billing_account_api.py +++ b/src/test/test_billing_account_api.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/test/test_billing_account_role.py b/src/test/test_billing_account_role.py index 858c88c..985b176 100644 --- a/src/test/test_billing_account_role.py +++ b/src/test/test_billing_account_role.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/test/test_body.py b/src/test/test_body.py index 01c1e72..1c96fc4 100644 --- a/src/test/test_body.py +++ b/src/test/test_body.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/test/test_clone_project_request.py b/src/test/test_clone_project_request.py index db75405..30c4633 100644 --- a/src/test/test_clone_project_request.py +++ b/src/test/test_clone_project_request.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/test/test_contact.py b/src/test/test_contact.py index c1a6423..99cb236 100644 --- a/src/test/test_contact.py +++ b/src/test/test_contact.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/test/test_create_fleet_request.py b/src/test/test_create_fleet_request.py index 3064647..f9626cb 100644 --- a/src/test/test_create_fleet_request.py +++ b/src/test/test_create_fleet_request.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/test/test_create_monitor.py b/src/test/test_create_monitor.py index 7651262..5b622ad 100644 --- a/src/test/test_create_monitor.py +++ b/src/test/test_create_monitor.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/test/test_create_product_request.py b/src/test/test_create_product_request.py index ba6c205..479ca39 100644 --- a/src/test/test_create_product_request.py +++ b/src/test/test_create_product_request.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/test/test_create_project_request.py b/src/test/test_create_project_request.py index 904ae13..5283b36 100644 --- a/src/test/test_create_project_request.py +++ b/src/test/test_create_project_request.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/test/test_current_firmware.py b/src/test/test_current_firmware.py new file mode 100644 index 0000000..926104f --- /dev/null +++ b/src/test/test_current_firmware.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + Notehub API + + The OpenAPI definition for the Notehub.io API. + + The version of the OpenAPI document: 1.2.0 + Contact: engineering@blues.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from notehub_py.models.current_firmware import CurrentFirmware + +class TestCurrentFirmware(unittest.TestCase): + """CurrentFirmware unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CurrentFirmware: + """Test CurrentFirmware + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CurrentFirmware` + """ + model = CurrentFirmware() + if include_optional: + return CurrentFirmware( + version = '', + metadata = notehub_py.models.firmware.Firmware( + org = '', + product = '', + firmware = '', + version = '', + target = '', + ver_major = 56, + ver_minor = 56, + ver_patch = 56, + ver_build = 56, + built = '', + builder = '', ) + ) + else: + return CurrentFirmware( + ) + """ + + def testCurrentFirmware(self): + """Test CurrentFirmware""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/src/test/test_delete_device_fleets_request.py b/src/test/test_delete_device_fleets_request.py index 9afc04d..63f3f8b 100644 --- a/src/test/test_delete_device_fleets_request.py +++ b/src/test/test_delete_device_fleets_request.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/test/test_device.py b/src/test/test_device.py index 8cc2348..80ec1e1 100644 --- a/src/test/test_device.py +++ b/src/test/test_device.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/test/test_device_api.py b/src/test/test_device_api.py index 5658e9a..0cccab8 100644 --- a/src/test/test_device_api.py +++ b/src/test/test_device_api.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/test/test_device_dfu_history.py b/src/test/test_device_dfu_history.py new file mode 100644 index 0000000..e42813a --- /dev/null +++ b/src/test/test_device_dfu_history.py @@ -0,0 +1,72 @@ +# coding: utf-8 + +""" + Notehub API + + The OpenAPI definition for the Notehub.io API. + + The version of the OpenAPI document: 1.2.0 + Contact: engineering@blues.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from notehub_py.models.device_dfu_history import DeviceDfuHistory + +class TestDeviceDfuHistory(unittest.TestCase): + """DeviceDfuHistory unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DeviceDfuHistory: + """Test DeviceDfuHistory + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DeviceDfuHistory` + """ + model = DeviceDfuHistory() + if include_optional: + return DeviceDfuHistory( + device_uid = '', + current = notehub_py.models.device_dfu_status_current.DeviceDfuStatus_current( + version = '', + organization = '', + description = '', + product = '', + built = '', + builder = '', ), + history = [ + notehub_py.models.device_dfu_state_machine.DeviceDfuStateMachine( + requested_version = '', + current_version = '', + initiated = '', + updates = [ + notehub_py.models.device_dfu_state_machine_node.DeviceDfuStateMachineNode( + status = '', + phase = '', + datetime = '', + description = '', ) + ], ) + ] + ) + else: + return DeviceDfuHistory( + ) + """ + + def testDeviceDfuHistory(self): + """Test DeviceDfuHistory""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/src/test/test_device_dfu_history_page.py b/src/test/test_device_dfu_history_page.py new file mode 100644 index 0000000..968dadc --- /dev/null +++ b/src/test/test_device_dfu_history_page.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + Notehub API + + The OpenAPI definition for the Notehub.io API. + + The version of the OpenAPI document: 1.2.0 + Contact: engineering@blues.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from notehub_py.models.device_dfu_history_page import DeviceDfuHistoryPage + +class TestDeviceDfuHistoryPage(unittest.TestCase): + """DeviceDfuHistoryPage unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DeviceDfuHistoryPage: + """Test DeviceDfuHistoryPage + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DeviceDfuHistoryPage` + """ + model = DeviceDfuHistoryPage() + if include_optional: + return DeviceDfuHistoryPage( + devices = [ + notehub_py.models.device_dfu_history.DeviceDfuHistory( + device_uid = '', + current = notehub_py.models.device_dfu_status_current.DeviceDfuStatus_current( + version = '', + organization = '', + description = '', + product = '', + built = '', + builder = '', ), + history = [ + notehub_py.models.device_dfu_state_machine.DeviceDfuStateMachine( + requested_version = '', + current_version = '', + initiated = '', + updates = [ + notehub_py.models.device_dfu_state_machine_node.DeviceDfuStateMachineNode( + status = '', + phase = '', + datetime = '', + description = '', ) + ], ) + ], ) + ], + has_more = True + ) + else: + return DeviceDfuHistoryPage( + ) + """ + + def testDeviceDfuHistoryPage(self): + """Test DeviceDfuHistoryPage""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/src/test/test_device_dfu_state_machine.py b/src/test/test_device_dfu_state_machine.py new file mode 100644 index 0000000..b794ee8 --- /dev/null +++ b/src/test/test_device_dfu_state_machine.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" + Notehub API + + The OpenAPI definition for the Notehub.io API. + + The version of the OpenAPI document: 1.2.0 + Contact: engineering@blues.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from notehub_py.models.device_dfu_state_machine import DeviceDfuStateMachine + +class TestDeviceDfuStateMachine(unittest.TestCase): + """DeviceDfuStateMachine unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DeviceDfuStateMachine: + """Test DeviceDfuStateMachine + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DeviceDfuStateMachine` + """ + model = DeviceDfuStateMachine() + if include_optional: + return DeviceDfuStateMachine( + requested_version = '', + current_version = '', + initiated = '', + updates = [ + notehub_py.models.device_dfu_state_machine_node.DeviceDfuStateMachineNode( + status = '', + phase = '', + datetime = '', + description = '', ) + ] + ) + else: + return DeviceDfuStateMachine( + ) + """ + + def testDeviceDfuStateMachine(self): + """Test DeviceDfuStateMachine""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/src/test/test_device_dfu_state_machine_node.py b/src/test/test_device_dfu_state_machine_node.py new file mode 100644 index 0000000..5f65d9a --- /dev/null +++ b/src/test/test_device_dfu_state_machine_node.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Notehub API + + The OpenAPI definition for the Notehub.io API. + + The version of the OpenAPI document: 1.2.0 + Contact: engineering@blues.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from notehub_py.models.device_dfu_state_machine_node import DeviceDfuStateMachineNode + +class TestDeviceDfuStateMachineNode(unittest.TestCase): + """DeviceDfuStateMachineNode unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DeviceDfuStateMachineNode: + """Test DeviceDfuStateMachineNode + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DeviceDfuStateMachineNode` + """ + model = DeviceDfuStateMachineNode() + if include_optional: + return DeviceDfuStateMachineNode( + status = '', + phase = '', + datetime = '', + description = '' + ) + else: + return DeviceDfuStateMachineNode( + ) + """ + + def testDeviceDfuStateMachineNode(self): + """Test DeviceDfuStateMachineNode""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/src/test/test_device_dfu_status.py b/src/test/test_device_dfu_status.py new file mode 100644 index 0000000..dbc032d --- /dev/null +++ b/src/test/test_device_dfu_status.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + Notehub API + + The OpenAPI definition for the Notehub.io API. + + The version of the OpenAPI document: 1.2.0 + Contact: engineering@blues.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from notehub_py.models.device_dfu_status import DeviceDfuStatus + +class TestDeviceDfuStatus(unittest.TestCase): + """DeviceDfuStatus unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DeviceDfuStatus: + """Test DeviceDfuStatus + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DeviceDfuStatus` + """ + model = DeviceDfuStatus() + if include_optional: + return DeviceDfuStatus( + device_uid = '', + dfu_in_progress = True, + current = notehub_py.models.device_dfu_status_current.DeviceDfuStatus_current( + version = '', + organization = '', + description = '', + product = '', + built = '', + builder = '', ), + status = notehub_py.models.device_dfu_state_machine.DeviceDfuStateMachine( + requested_version = '', + current_version = '', + initiated = '', + updates = [ + notehub_py.models.device_dfu_state_machine_node.DeviceDfuStateMachineNode( + status = '', + phase = '', + datetime = '', + description = '', ) + ], ) + ) + else: + return DeviceDfuStatus( + ) + """ + + def testDeviceDfuStatus(self): + """Test DeviceDfuStatus""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/src/test/test_firmware_status.py b/src/test/test_device_dfu_status_current.py similarity index 57% rename from src/test/test_firmware_status.py rename to src/test/test_device_dfu_status_current.py index a531389..9791002 100644 --- a/src/test/test_firmware_status.py +++ b/src/test/test_device_dfu_status_current.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -15,10 +15,10 @@ import unittest -from notehub_py.models.firmware_status import FirmwareStatus +from notehub_py.models.device_dfu_status_current import DeviceDfuStatusCurrent -class TestFirmwareStatus(unittest.TestCase): - """FirmwareStatus unit test stubs""" +class TestDeviceDfuStatusCurrent(unittest.TestCase): + """DeviceDfuStatusCurrent unit test stubs""" def setUp(self): pass @@ -26,29 +26,30 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> FirmwareStatus: - """Test FirmwareStatus + def make_instance(self, include_optional) -> DeviceDfuStatusCurrent: + """Test DeviceDfuStatusCurrent include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # uncomment below to create an instance of `FirmwareStatus` + # uncomment below to create an instance of `DeviceDfuStatusCurrent` """ - model = FirmwareStatus() + model = DeviceDfuStatusCurrent() if include_optional: - return FirmwareStatus( + return DeviceDfuStatusCurrent( version = '', organization = '', description = '', product = '', - built = '' + built = '', + builder = '' ) else: - return FirmwareStatus( + return DeviceDfuStatusCurrent( ) """ - def testFirmwareStatus(self): - """Test FirmwareStatus""" + def testDeviceDfuStatusCurrent(self): + """Test DeviceDfuStatusCurrent""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/src/test/test_device_dfu_status_page.py b/src/test/test_device_dfu_status_page.py new file mode 100644 index 0000000..d2fae11 --- /dev/null +++ b/src/test/test_device_dfu_status_page.py @@ -0,0 +1,74 @@ +# coding: utf-8 + +""" + Notehub API + + The OpenAPI definition for the Notehub.io API. + + The version of the OpenAPI document: 1.2.0 + Contact: engineering@blues.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from notehub_py.models.device_dfu_status_page import DeviceDfuStatusPage + +class TestDeviceDfuStatusPage(unittest.TestCase): + """DeviceDfuStatusPage unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DeviceDfuStatusPage: + """Test DeviceDfuStatusPage + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DeviceDfuStatusPage` + """ + model = DeviceDfuStatusPage() + if include_optional: + return DeviceDfuStatusPage( + devices = [ + notehub_py.models.device_dfu_status.DeviceDfuStatus( + device_uid = '', + dfu_in_progress = True, + current = notehub_py.models.device_dfu_status_current.DeviceDfuStatus_current( + version = '', + organization = '', + description = '', + product = '', + built = '', + builder = '', ), + status = notehub_py.models.device_dfu_state_machine.DeviceDfuStateMachine( + requested_version = '', + current_version = '', + initiated = '', + updates = [ + notehub_py.models.device_dfu_state_machine_node.DeviceDfuStateMachineNode( + phase = '', + datetime = '', + description = '', ) + ], ), ) + ], + has_more = True + ) + else: + return DeviceDfuStatusPage( + ) + """ + + def testDeviceDfuStatusPage(self): + """Test DeviceDfuStatusPage""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/src/test/test_device_session.py b/src/test/test_device_session.py index 868d28b..61f4916 100644 --- a/src/test/test_device_session.py +++ b/src/test/test_device_session.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/test/test_device_tower_info.py b/src/test/test_device_tower_info.py index 639544a..bcb2e1a 100644 --- a/src/test/test_device_tower_info.py +++ b/src/test/test_device_tower_info.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/test/test_device_usage.py b/src/test/test_device_usage.py index a84c691..79ad843 100644 --- a/src/test/test_device_usage.py +++ b/src/test/test_device_usage.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/test/test_ota_update_status.py b/src/test/test_dfu_action_request.py similarity index 52% rename from src/test/test_ota_update_status.py rename to src/test/test_dfu_action_request.py index 6def092..f1bc410 100644 --- a/src/test/test_ota_update_status.py +++ b/src/test/test_dfu_action_request.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -15,10 +15,10 @@ import unittest -from notehub_py.models.ota_update_status import OTAUpdateStatus +from notehub_py.models.dfu_action_request import DfuActionRequest -class TestOTAUpdateStatus(unittest.TestCase): - """OTAUpdateStatus unit test stubs""" +class TestDfuActionRequest(unittest.TestCase): + """DfuActionRequest unit test stubs""" def setUp(self): pass @@ -26,31 +26,25 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> OTAUpdateStatus: - """Test OTAUpdateStatus + def make_instance(self, include_optional) -> DfuActionRequest: + """Test DfuActionRequest include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # uncomment below to create an instance of `OTAUpdateStatus` + # uncomment below to create an instance of `DfuActionRequest` """ - model = OTAUpdateStatus() + model = DfuActionRequest() if include_optional: - return OTAUpdateStatus( - status = '', - successful = [ - '' - ], - failed = [ - '' - ] + return DfuActionRequest( + filename = '' ) else: - return OTAUpdateStatus( + return DfuActionRequest( ) """ - def testOTAUpdateStatus(self): - """Test OTAUpdateStatus""" + def testDfuActionRequest(self): + """Test DfuActionRequest""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/src/test/test_dfu_env.py b/src/test/test_dfu_env.py index 3736f7d..58322ba 100644 --- a/src/test/test_dfu_env.py +++ b/src/test/test_dfu_env.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/test/test_dfu_state.py b/src/test/test_dfu_state.py index b7a2a71..1e022d2 100644 --- a/src/test/test_dfu_state.py +++ b/src/test/test_dfu_state.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/test/test_email_notification.py b/src/test/test_email_notification.py index 7c527b3..795a3ed 100644 --- a/src/test/test_email_notification.py +++ b/src/test/test_email_notification.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/test/test_environment_variables.py b/src/test/test_environment_variables.py index e391a8c..8759545 100644 --- a/src/test/test_environment_variables.py +++ b/src/test/test_environment_variables.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/test/test_error.py b/src/test/test_error.py index a9009ba..6af7586 100644 --- a/src/test/test_error.py +++ b/src/test/test_error.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/test/test_event.py b/src/test/test_event.py index 30fcf49..7aba1f3 100644 --- a/src/test/test_event.py +++ b/src/test/test_event.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/test/test_event_api.py b/src/test/test_event_api.py index 3ce900b..7e827f1 100644 --- a/src/test/test_event_api.py +++ b/src/test/test_event_api.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/test/test_firmware.py b/src/test/test_firmware.py new file mode 100644 index 0000000..78ea1dc --- /dev/null +++ b/src/test/test_firmware.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Notehub API + + The OpenAPI definition for the Notehub.io API. + + The version of the OpenAPI document: 1.2.0 + Contact: engineering@blues.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from notehub_py.models.firmware import Firmware + +class TestFirmware(unittest.TestCase): + """Firmware unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Firmware: + """Test Firmware + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Firmware` + """ + model = Firmware() + if include_optional: + return Firmware( + org = '', + product = '', + firmware = '', + version = '', + target = '', + ver_major = 56, + ver_minor = 56, + ver_patch = 56, + ver_build = 56, + built = '', + builder = '' + ) + else: + return Firmware( + ) + """ + + def testFirmware(self): + """Test Firmware""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/src/test/test_firmware_info.py b/src/test/test_firmware_info.py index d08e3d7..1515cdf 100644 --- a/src/test/test_firmware_info.py +++ b/src/test/test_firmware_info.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/test/test_fleet.py b/src/test/test_fleet.py index 04f2fa7..c732df4 100644 --- a/src/test/test_fleet.py +++ b/src/test/test_fleet.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/test/test_get_alerts200_response.py b/src/test/test_get_alerts200_response.py index fefd86a..b88f25a 100644 --- a/src/test/test_get_alerts200_response.py +++ b/src/test/test_get_alerts200_response.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -48,6 +48,8 @@ def make_instance(self, include_optional) -> GetAlerts200Response: version = 56, alert_source = 'app', source = '', + monitor_type = 'event', + field_name = '', data = [ notehub_py.models.alert_data_inner.Alert_data_inner( alert_source = 'app', @@ -80,6 +82,8 @@ def make_instance(self, include_optional) -> GetAlerts200Response: version = 56, alert_source = 'app', source = '', + monitor_type = 'event', + field_name = '', data = [ notehub_py.models.alert_data_inner.Alert_data_inner( alert_source = 'app', diff --git a/src/test/test_get_billing_accounts200_response.py b/src/test/test_get_billing_accounts200_response.py index 04807f6..2175a39 100644 --- a/src/test/test_get_billing_accounts200_response.py +++ b/src/test/test_get_billing_accounts200_response.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/test/test_get_device_environment_variables200_response.py b/src/test/test_get_device_environment_variables200_response.py index 336ce77..da49b31 100644 --- a/src/test/test_get_device_environment_variables200_response.py +++ b/src/test/test_get_device_environment_variables200_response.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/test/test_get_device_health_log200_response.py b/src/test/test_get_device_health_log200_response.py index 1852d88..3b4f912 100644 --- a/src/test/test_get_device_health_log200_response.py +++ b/src/test/test_get_device_health_log200_response.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/test/test_get_device_health_log200_response_health_log_inner.py b/src/test/test_get_device_health_log200_response_health_log_inner.py index 0615194..325383e 100644 --- a/src/test/test_get_device_health_log200_response_health_log_inner.py +++ b/src/test/test_get_device_health_log200_response_health_log_inner.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/test/test_get_device_latest200_response.py b/src/test/test_get_device_latest200_response.py index 7520b7a..43ed2b9 100644 --- a/src/test/test_get_device_latest200_response.py +++ b/src/test/test_get_device_latest200_response.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/test/test_get_device_public_key200_response.py b/src/test/test_get_device_public_key200_response.py index 01e9413..1023f37 100644 --- a/src/test/test_get_device_public_key200_response.py +++ b/src/test/test_get_device_public_key200_response.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/test/test_get_device_sessions200_response.py b/src/test/test_get_device_sessions200_response.py index 98344e0..33b84cd 100644 --- a/src/test/test_get_device_sessions200_response.py +++ b/src/test/test_get_device_sessions200_response.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/test/test_get_project_device_public_keys200_response.py b/src/test/test_get_project_device_public_keys200_response.py index d367fec..6fa9677 100644 --- a/src/test/test_get_project_device_public_keys200_response.py +++ b/src/test/test_get_project_device_public_keys200_response.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/test/test_get_project_device_public_keys200_response_device_public_keys_inner.py b/src/test/test_get_project_device_public_keys200_response_device_public_keys_inner.py index 7e97ac5..4cf744a 100644 --- a/src/test/test_get_project_device_public_keys200_response_device_public_keys_inner.py +++ b/src/test/test_get_project_device_public_keys200_response_device_public_keys_inner.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/test/test_get_project_devices200_response.py b/src/test/test_get_project_devices200_response.py index 2b1dbf4..eddf3a9 100644 --- a/src/test/test_get_project_devices200_response.py +++ b/src/test/test_get_project_devices200_response.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/test/test_get_project_events200_response.py b/src/test/test_get_project_events200_response.py index 41917dc..dba2f27 100644 --- a/src/test/test_get_project_events200_response.py +++ b/src/test/test_get_project_events200_response.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/test/test_get_project_events_by_cursor200_response.py b/src/test/test_get_project_events_by_cursor200_response.py index 51c9785..77f9970 100644 --- a/src/test/test_get_project_events_by_cursor200_response.py +++ b/src/test/test_get_project_events_by_cursor200_response.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/test/test_get_project_fleets200_response.py b/src/test/test_get_project_fleets200_response.py index d27962e..05e71a7 100644 --- a/src/test/test_get_project_fleets200_response.py +++ b/src/test/test_get_project_fleets200_response.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/test/test_get_project_members200_response.py b/src/test/test_get_project_members200_response.py index 1c79eee..122490c 100644 --- a/src/test/test_get_project_members200_response.py +++ b/src/test/test_get_project_members200_response.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/test/test_get_project_products200_response.py b/src/test/test_get_project_products200_response.py index 0bf9f5e..44390f6 100644 --- a/src/test/test_get_project_products200_response.py +++ b/src/test/test_get_project_products200_response.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/test/test_get_projects200_response.py b/src/test/test_get_projects200_response.py index daec2c7..9d65456 100644 --- a/src/test/test_get_projects200_response.py +++ b/src/test/test_get_projects200_response.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/test/test_get_route_logs_by_route200_response_inner.py b/src/test/test_get_route_logs_by_route200_response_inner.py index a5824ab..9a8a054 100644 --- a/src/test/test_get_route_logs_by_route200_response_inner.py +++ b/src/test/test_get_route_logs_by_route200_response_inner.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/test/test_google.py b/src/test/test_google.py index 8cfe878..dbfceb1 100644 --- a/src/test/test_google.py +++ b/src/test/test_google.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/test/test_handle_note_changes200_response.py b/src/test/test_handle_note_changes200_response.py index 5c71d1e..a4942dc 100644 --- a/src/test/test_handle_note_changes200_response.py +++ b/src/test/test_handle_note_changes200_response.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/test/test_handle_note_get200_response.py b/src/test/test_handle_note_get200_response.py index d7fd3be..08aed8e 100644 --- a/src/test/test_handle_note_get200_response.py +++ b/src/test/test_handle_note_get200_response.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/test/test_handle_note_signal200_response.py b/src/test/test_handle_note_signal200_response.py index 8247a55..2586d80 100644 --- a/src/test/test_handle_note_signal200_response.py +++ b/src/test/test_handle_note_signal200_response.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/test/test_handle_notefile_changes200_response.py b/src/test/test_handle_notefile_changes200_response.py index cccbbd3..363055e 100644 --- a/src/test/test_handle_notefile_changes200_response.py +++ b/src/test/test_handle_notefile_changes200_response.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/test/test_handle_notefile_changes_pending200_response.py b/src/test/test_handle_notefile_changes_pending200_response.py index a47448a..37435f3 100644 --- a/src/test/test_handle_notefile_changes_pending200_response.py +++ b/src/test/test_handle_notefile_changes_pending200_response.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/test/test_handle_notefile_delete_request.py b/src/test/test_handle_notefile_delete_request.py index a3662c3..59329e0 100644 --- a/src/test/test_handle_notefile_delete_request.py +++ b/src/test/test_handle_notefile_delete_request.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/test/test_http.py b/src/test/test_http.py index 9a29bc8..37c7f6a 100644 --- a/src/test/test_http.py +++ b/src/test/test_http.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/test/test_http_filter.py b/src/test/test_http_filter.py index 7834d2c..36c67d1 100644 --- a/src/test/test_http_filter.py +++ b/src/test/test_http_filter.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/test/test_http_transform.py b/src/test/test_http_transform.py index 36ec49f..5d13e40 100644 --- a/src/test/test_http_transform.py +++ b/src/test/test_http_transform.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/test/test_location.py b/src/test/test_location.py index 528225a..71210a5 100644 --- a/src/test/test_location.py +++ b/src/test/test_location.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/test/test_login200_response.py b/src/test/test_login200_response.py index e5b155b..ea7f8ca 100644 --- a/src/test/test_login200_response.py +++ b/src/test/test_login200_response.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/test/test_login_request.py b/src/test/test_login_request.py index 56a0360..5d46453 100644 --- a/src/test/test_login_request.py +++ b/src/test/test_login_request.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/test/test_monitor.py b/src/test/test_monitor.py index b9401ef..ef638ab 100644 --- a/src/test/test_monitor.py +++ b/src/test/test_monitor.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/test/test_monitor_alert_routes_inner.py b/src/test/test_monitor_alert_routes_inner.py index 7bd8889..4397f00 100644 --- a/src/test/test_monitor_alert_routes_inner.py +++ b/src/test/test_monitor_alert_routes_inner.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/test/test_monitor_api.py b/src/test/test_monitor_api.py index cef0ddc..22b4497 100644 --- a/src/test/test_monitor_api.py +++ b/src/test/test_monitor_api.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/test/test_mqtt.py b/src/test/test_mqtt.py index f6cf972..f271665 100644 --- a/src/test/test_mqtt.py +++ b/src/test/test_mqtt.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/test/test_note.py b/src/test/test_note.py index c503e09..ec78534 100644 --- a/src/test/test_note.py +++ b/src/test/test_note.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/test/test_route.py b/src/test/test_notehub_route.py similarity index 66% rename from src/test/test_route.py rename to src/test/test_notehub_route.py index 036c6c8..8a8ac92 100644 --- a/src/test/test_route.py +++ b/src/test/test_notehub_route.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -15,10 +15,10 @@ import unittest -from notehub_py.models.route import Route +from notehub_py.models.notehub_route import NotehubRoute -class TestRoute(unittest.TestCase): - """Route unit test stubs""" +class TestNotehubRoute(unittest.TestCase): + """NotehubRoute unit test stubs""" def setUp(self): pass @@ -26,16 +26,16 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> Route: - """Test Route + def make_instance(self, include_optional) -> NotehubRoute: + """Test NotehubRoute include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # uncomment below to create an instance of `Route` + # uncomment below to create an instance of `NotehubRoute` """ - model = Route() + model = NotehubRoute() if include_optional: - return Route( + return NotehubRoute( uid = '', label = '', route_type = 'http', @@ -44,12 +44,12 @@ def make_instance(self, include_optional) -> Route: var_schema = None ) else: - return Route( + return NotehubRoute( ) """ - def testRoute(self): - """Test Route""" + def testNotehubRoute(self): + """Test NotehubRoute""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/src/test/test_route_schema.py b/src/test/test_notehub_route_schema.py similarity index 83% rename from src/test/test_route_schema.py rename to src/test/test_notehub_route_schema.py index ac47abe..87d356a 100644 --- a/src/test/test_route_schema.py +++ b/src/test/test_notehub_route_schema.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -15,10 +15,10 @@ import unittest -from notehub_py.models.route_schema import RouteSchema +from notehub_py.models.notehub_route_schema import NotehubRouteSchema -class TestRouteSchema(unittest.TestCase): - """RouteSchema unit test stubs""" +class TestNotehubRouteSchema(unittest.TestCase): + """NotehubRouteSchema unit test stubs""" def setUp(self): pass @@ -26,16 +26,16 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> RouteSchema: - """Test RouteSchema + def make_instance(self, include_optional) -> NotehubRouteSchema: + """Test NotehubRouteSchema include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # uncomment below to create an instance of `RouteSchema` + # uncomment below to create an instance of `NotehubRouteSchema` """ - model = RouteSchema() + model = NotehubRouteSchema() if include_optional: - return RouteSchema( + return NotehubRouteSchema( fleets = [ '' ], @@ -89,12 +89,12 @@ def make_instance(self, include_optional) -> RouteSchema: blocks = '' ) else: - return RouteSchema( + return NotehubRouteSchema( ) """ - def testRouteSchema(self): - """Test RouteSchema""" + def testNotehubRouteSchema(self): + """Test NotehubRouteSchema""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/src/test/test_ota_status.py b/src/test/test_ota_status.py deleted file mode 100644 index 720c882..0000000 --- a/src/test/test_ota_status.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - Notehub API - - The OpenAPI definition for the Notehub.io API. - - The version of the OpenAPI document: 1.1.0 - Contact: engineering@blues.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from notehub_py.models.ota_status import OTAStatus - -class TestOTAStatus(unittest.TestCase): - """OTAStatus unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> OTAStatus: - """Test OTAStatus - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `OTAStatus` - """ - model = OTAStatus() - if include_optional: - return OTAStatus( - device_uid = '', - tags = '', - notecard_current_firmware = notehub_py.models.firmware_status.FirmwareStatus( - version = '', - organization = '', - description = '', - product = '', - built = '', ), - notecard_dfu_began_at = '', - notecard_dfu_status = '', - notecard_requested_firmware = notehub_py.models.firmware_status.FirmwareStatus( - version = '', - organization = '', - description = '', - product = '', - built = '', ), - notecard_requested_at = '', - notecard_requested_scope = '', - notecard_requested_show_details = True, - notecard_requested_status = '', - host_current_firmware = notehub_py.models.firmware_status.FirmwareStatus( - version = '', - organization = '', - description = '', - product = '', - built = '', ), - host_dfu_began_at = '', - host_dfu_status = '', - host_requested_firmware = notehub_py.models.firmware_status.FirmwareStatus( - version = '', - organization = '', - description = '', - product = '', - built = '', ), - host_requested_at = '', - host_requested_scope = '', - host_requested_show_details = True, - host_requested_status = '' - ) - else: - return OTAStatus( - ) - """ - - def testOTAStatus(self): - """Test OTAStatus""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/src/test/test_ota_status_list.py b/src/test/test_ota_status_list.py deleted file mode 100644 index 5da1680..0000000 --- a/src/test/test_ota_status_list.py +++ /dev/null @@ -1,83 +0,0 @@ -# coding: utf-8 - -""" - Notehub API - - The OpenAPI definition for the Notehub.io API. - - The version of the OpenAPI document: 1.1.0 - Contact: engineering@blues.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from notehub_py.models.ota_status_list import OTAStatusList - -class TestOTAStatusList(unittest.TestCase): - """OTAStatusList unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> OTAStatusList: - """Test OTAStatusList - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `OTAStatusList` - """ - model = OTAStatusList() - if include_optional: - return OTAStatusList( - devices = [ - notehub_py.models.ota_status.OTAStatus( - device_uid = '', - tags = '', - notecard_current_firmware = notehub_py.models.firmware_status.FirmwareStatus( - version = '', - organization = '', - description = '', - product = '', - built = '', ), - notecard_dfu_began_at = '', - notecard_dfu_status = '', - notecard_requested_firmware = notehub_py.models.firmware_status.FirmwareStatus( - version = '', - organization = '', - description = '', - product = '', - built = '', ), - notecard_requested_at = '', - notecard_requested_scope = '', - notecard_requested_show_details = True, - notecard_requested_status = '', - host_current_firmware = , - host_dfu_began_at = '', - host_dfu_status = '', - host_requested_firmware = , - host_requested_at = '', - host_requested_scope = '', - host_requested_show_details = True, - host_requested_status = '', ) - ], - has_more = True - ) - else: - return OTAStatusList( - ) - """ - - def testOTAStatusList(self): - """Test OTAStatusList""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/src/test/test_ota_update_request.py b/src/test/test_ota_update_request.py deleted file mode 100644 index 3524be7..0000000 --- a/src/test/test_ota_update_request.py +++ /dev/null @@ -1,68 +0,0 @@ -# coding: utf-8 - -""" - Notehub API - - The OpenAPI definition for the Notehub.io API. - - The version of the OpenAPI document: 1.1.0 - Contact: engineering@blues.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from notehub_py.models.ota_update_request import OTAUpdateRequest - -class TestOTAUpdateRequest(unittest.TestCase): - """OTAUpdateRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> OTAUpdateRequest: - """Test OTAUpdateRequest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `OTAUpdateRequest` - """ - model = OTAUpdateRequest() - if include_optional: - return OTAUpdateRequest( - filename = '', - device_uids = [ - '' - ], - fleet_uids = [ - '' - ], - device_tags = [ - '' - ], - version = '', - md5 = '', - type = '', - product = '', - target = '', - unpublished = True, - cancel_dfu = True - ) - else: - return OTAUpdateRequest( - ) - """ - - def testOTAUpdateRequest(self): - """Test OTAUpdateRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/src/test/test_post_provision_project_device_request.py b/src/test/test_post_provision_project_device_request.py index 7998ffc..eabfcab 100644 --- a/src/test/test_post_provision_project_device_request.py +++ b/src/test/test_post_provision_project_device_request.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/test/test_product.py b/src/test/test_product.py index 943c6be..b6d76d8 100644 --- a/src/test/test_product.py +++ b/src/test/test_product.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/test/test_project.py b/src/test/test_project.py index c54fe73..f6f6755 100644 --- a/src/test/test_project.py +++ b/src/test/test_project.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/test/test_project_api.py b/src/test/test_project_api.py index d485717..657970f 100644 --- a/src/test/test_project_api.py +++ b/src/test/test_project_api.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -81,6 +81,12 @@ def test_delete_project_environment_variable(self) -> None: """ pass + def test_dfu_action(self) -> None: + """Test case for dfu_action + + """ + pass + def test_disable_global_transformation(self) -> None: """Test case for disable_global_transformation @@ -93,12 +99,36 @@ def test_enable_global_transformation(self) -> None: """ pass + def test_get_device_dfu_history(self) -> None: + """Test case for get_device_dfu_history + + """ + pass + + def test_get_device_dfu_status(self) -> None: + """Test case for get_device_dfu_status + + """ + pass + def test_get_device_fleets(self) -> None: """Test case for get_device_fleets """ pass + def test_get_devices_dfu_history(self) -> None: + """Test case for get_devices_dfu_history + + """ + pass + + def test_get_devices_dfu_status(self) -> None: + """Test case for get_devices_dfu_status + + """ + pass + def test_get_firmware_info(self) -> None: """Test case for get_firmware_info @@ -141,12 +171,6 @@ def test_get_project_members(self) -> None: """ pass - def test_get_project_ota_status(self) -> None: - """Test case for get_project_ota_status - - """ - pass - def test_get_project_products(self) -> None: """Test case for get_project_products @@ -189,12 +213,6 @@ def test_update_fleet(self) -> None: """ pass - def test_update_project_firmware(self) -> None: - """Test case for update_project_firmware - - """ - pass - if __name__ == '__main__': unittest.main() diff --git a/src/test/test_project_member.py b/src/test/test_project_member.py index 02c1feb..5adf622 100644 --- a/src/test/test_project_member.py +++ b/src/test/test_project_member.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/test/test_proxy.py b/src/test/test_proxy.py index c704de3..8c9bc2f 100644 --- a/src/test/test_proxy.py +++ b/src/test/test_proxy.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/test/test_put_device_fleets_request.py b/src/test/test_put_device_fleets_request.py index 9f25d4f..34ac4eb 100644 --- a/src/test/test_put_device_fleets_request.py +++ b/src/test/test_put_device_fleets_request.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/test/test_radresponder.py b/src/test/test_radresponder.py index b7e8c25..c1a0838 100644 --- a/src/test/test_radresponder.py +++ b/src/test/test_radresponder.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/test/test_role.py b/src/test/test_role.py index 0d0047d..9e29c57 100644 --- a/src/test/test_role.py +++ b/src/test/test_role.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/test/test_route_api.py b/src/test/test_route_api.py index 9b8cb2d..5febb74 100644 --- a/src/test/test_route_api.py +++ b/src/test/test_route_api.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/test/test_slack.py b/src/test/test_slack.py index 0d395eb..c4a08c6 100644 --- a/src/test/test_slack.py +++ b/src/test/test_slack.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/test/test_slack_bearer_notification.py b/src/test/test_slack_bearer_notification.py index bcc5cba..781cbe0 100644 --- a/src/test/test_slack_bearer_notification.py +++ b/src/test/test_slack_bearer_notification.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/test/test_slack_web_hook_notification.py b/src/test/test_slack_web_hook_notification.py index 5b94525..5b5f1d2 100644 --- a/src/test/test_slack_web_hook_notification.py +++ b/src/test/test_slack_web_hook_notification.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/test/test_snowflake.py b/src/test/test_snowflake.py index 315278a..3f92432 100644 --- a/src/test/test_snowflake.py +++ b/src/test/test_snowflake.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/test/test_snowflake_transform.py b/src/test/test_snowflake_transform.py index 0cbdc1a..ac07570 100644 --- a/src/test/test_snowflake_transform.py +++ b/src/test/test_snowflake_transform.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/test/test_thingworx.py b/src/test/test_thingworx.py index c472658..6ee93ee 100644 --- a/src/test/test_thingworx.py +++ b/src/test/test_thingworx.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/test/test_tower_location.py b/src/test/test_tower_location.py index 97fff24..99e40f1 100644 --- a/src/test/test_tower_location.py +++ b/src/test/test_tower_location.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/test/test_twilio.py b/src/test/test_twilio.py index 460cd4f..5d4df69 100644 --- a/src/test/test_twilio.py +++ b/src/test/test_twilio.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/test/test_update_fleet_request.py b/src/test/test_update_fleet_request.py index 9640760..01405b3 100644 --- a/src/test/test_update_fleet_request.py +++ b/src/test/test_update_fleet_request.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/test/test_upload_metadata.py b/src/test/test_upload_metadata.py new file mode 100644 index 0000000..de2686a --- /dev/null +++ b/src/test/test_upload_metadata.py @@ -0,0 +1,74 @@ +# coding: utf-8 + +""" + Notehub API + + The OpenAPI definition for the Notehub.io API. + + The version of the OpenAPI document: 1.2.0 + Contact: engineering@blues.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from notehub_py.models.upload_metadata import UploadMetadata + +class TestUploadMetadata(unittest.TestCase): + """UploadMetadata unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UploadMetadata: + """Test UploadMetadata + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UploadMetadata` + """ + model = UploadMetadata() + if include_optional: + return UploadMetadata( + name = '', + length = 56, + md5 = '', + crc32 = 56, + created = 56, + modified = 56, + source = '', + contains = '', + found = '', + type = '', + tags = '', + notes = '', + firmware = notehub_py.models.firmware.Firmware( + org = '', + product = '', + version = '', + target = '', + ver_major = 56, + ver_minor = 56, + ver_patch = 56, + ver_build = 56, + built = '', + builder = '', ) + ) + else: + return UploadMetadata( + ) + """ + + def testUploadMetadata(self): + """Test UploadMetadata""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/src/test/test_user_db_route.py b/src/test/test_user_db_route.py index 396a8e5..757b651 100644 --- a/src/test/test_user_db_route.py +++ b/src/test/test_user_db_route.py @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. - The version of the OpenAPI document: 1.1.0 + The version of the OpenAPI document: 1.2.0 Contact: engineering@blues.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/src/test/test_user_dfu_state_machine.py b/src/test/test_user_dfu_state_machine.py new file mode 100644 index 0000000..dcd751c --- /dev/null +++ b/src/test/test_user_dfu_state_machine.py @@ -0,0 +1,81 @@ +# coding: utf-8 + +""" + Notehub API + + The OpenAPI definition for the Notehub.io API. + + The version of the OpenAPI document: 1.2.0 + Contact: engineering@blues.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from notehub_py.models.user_dfu_state_machine import UserDfuStateMachine + +class TestUserDfuStateMachine(unittest.TestCase): + """UserDfuStateMachine unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UserDfuStateMachine: + """Test UserDfuStateMachine + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UserDfuStateMachine` + """ + model = UserDfuStateMachine() + if include_optional: + return UserDfuStateMachine( + status = notehub_py.models.user_dfu_state_machine_status.UserDfuStateMachineStatus( + phase = '', + phase_description = '', + date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ), + created = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + from_version = '', + metadata = notehub_py.models.upload_metadata.UploadMetadata( + name = '', + length = 56, + md5 = '', + crc32 = 56, + created = 56, + modified = 56, + source = '', + contains = '', + found = '', + type = '', + tags = '', + notes = '', + firmware = notehub_py.models.firmware.Firmware( + org = '', + product = '', + version = '', + target = '', + ver_major = 56, + ver_minor = 56, + ver_patch = 56, + ver_build = 56, + built = '', + builder = '', ), ) + ) + else: + return UserDfuStateMachine( + ) + """ + + def testUserDfuStateMachine(self): + """Test UserDfuStateMachine""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/src/test/test_user_dfu_state_machine_status.py b/src/test/test_user_dfu_state_machine_status.py new file mode 100644 index 0000000..ba186a2 --- /dev/null +++ b/src/test/test_user_dfu_state_machine_status.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Notehub API + + The OpenAPI definition for the Notehub.io API. + + The version of the OpenAPI document: 1.2.0 + Contact: engineering@blues.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from notehub_py.models.user_dfu_state_machine_status import UserDfuStateMachineStatus + +class TestUserDfuStateMachineStatus(unittest.TestCase): + """UserDfuStateMachineStatus unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UserDfuStateMachineStatus: + """Test UserDfuStateMachineStatus + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UserDfuStateMachineStatus` + """ + model = UserDfuStateMachineStatus() + if include_optional: + return UserDfuStateMachineStatus( + phase = '', + phase_description = '', + var_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + status = '' + ) + else: + return UserDfuStateMachineStatus( + ) + """ + + def testUserDfuStateMachineStatus(self): + """Test UserDfuStateMachineStatus""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/src/test/test_user_firmware_info.py b/src/test/test_user_firmware_info.py new file mode 100644 index 0000000..e4402f1 --- /dev/null +++ b/src/test/test_user_firmware_info.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + Notehub API + + The OpenAPI definition for the Notehub.io API. + + The version of the OpenAPI document: 1.2.0 + Contact: engineering@blues.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from notehub_py.models.user_firmware_info import UserFirmwareInfo + +class TestUserFirmwareInfo(unittest.TestCase): + """UserFirmwareInfo unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UserFirmwareInfo: + """Test UserFirmwareInfo + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UserFirmwareInfo` + """ + model = UserFirmwareInfo() + if include_optional: + return UserFirmwareInfo( + current_firmware = notehub_py.models.current_firmware.CurrentFirmware( + version = '', + metadata = notehub_py.models.firmware.Firmware( + org = '', + product = '', + firmware = '', + version = '', + target = '', + ver_major = 56, + ver_minor = 56, + ver_patch = 56, + ver_build = 56, + built = '', + builder = '', ), ), + firmware_update = notehub_py.models.user_dfu_state_machine.UserDfuStateMachine( + status = notehub_py.models.user_dfu_state_machine_status.UserDfuStateMachineStatus( + phase = '', + phase_description = '', + date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ), + created = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + from_version = '', + metadata = notehub_py.models.upload_metadata.UploadMetadata( + name = '', + length = 56, + md5 = '', + crc32 = 56, + created = 56, + modified = 56, + source = '', + contains = '', + found = '', + type = '', + tags = '', + notes = '', + firmware = notehub_py.models.firmware.Firmware( + org = '', + product = '', + version = '', + target = '', + ver_major = 56, + ver_minor = 56, + ver_patch = 56, + ver_build = 56, + built = '', + builder = '', ), ), ) + ) + else: + return UserFirmwareInfo( + ) + """ + + def testUserFirmwareInfo(self): + """Test UserFirmwareInfo""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() From b7b1966a96b75576f65c8efa75eded91f9a01256 Mon Sep 17 00:00:00 2001 From: Paige Niedringhaus Date: Thu, 31 Oct 2024 14:08:57 -0400 Subject: [PATCH 3/3] deps: bump project version for new sdk deploy --- .gitignore | 134 ++++++++++++++++++++++++++++++++ config.json | 2 +- src/README.md | 2 +- src/notehub_py/__init__.py | 2 +- src/notehub_py/api_client.py | 2 +- src/notehub_py/configuration.py | 2 +- src/pyproject.toml | 2 +- src/setup.py | 2 +- 8 files changed, 141 insertions(+), 7 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9fba281 --- /dev/null +++ b/.gitignore @@ -0,0 +1,134 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* +.pnpm-debug.log* + +# Diagnostic reports (https://nodejs.org/api/report.html) +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage +*.lcov + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ + +# Snowpack dependency directory (https://snowpack.dev/) +web_modules/ + +# TypeScript cache +*.tsbuildinfo + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Optional stylelint cache +.stylelintcache + +# Microbundle cache +.rpt2_cache/ +.rts2_cache_cjs/ +.rts2_cache_es/ +.rts2_cache_umd/ + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variable files +.env +.env.development.local +.env.test.local +.env.production.local +.env.local + +# parcel-bundler cache (https://parceljs.org/) +.cache +.parcel-cache + +# Next.js build output +.next +out + +# Nuxt.js build / generate output +.nuxt +dist + +# Gatsby files +.cache/ +# Comment in the public line in if your project uses Gatsby and not Next.js +# https://nextjs.org/blog/next-9-1#public-directory-support +# public + +# vuepress build output +.vuepress/dist + +# vuepress v2.x temp and cache directory +.temp +.cache + +# Docusaurus cache and generated files +.docusaurus + +# Serverless directories +.serverless/ + +# FuseBox cache +.fusebox/ + +# DynamoDB Local files +.dynamodb/ + +# TernJS port file +.tern-port + +# Stores VSCode versions used for testing VSCode extensions +.vscode-test +.vscode/ + +# yarn v2 +.yarn/cache +.yarn/unplugged +.yarn/build-state.yml +.yarn/install-state.gz +.pnp.* + +# MacOS files +.DS_Store \ No newline at end of file diff --git a/config.json b/config.json index dfd50e8..392ab0a 100644 --- a/config.json +++ b/config.json @@ -2,5 +2,5 @@ "packageName": "notehub_py", "packageUrl": "https://github.com/blues/notehub-py", "projectName": "notehub-py", - "packageVersion": "1.0.2" + "packageVersion": "1.0.3" } \ No newline at end of file diff --git a/src/README.md b/src/README.md index 2b4884b..050629d 100644 --- a/src/README.md +++ b/src/README.md @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API. This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: 1.2.0 -- Package version: 1.0.2 +- Package version: 1.0.3 - Generator version: 7.5.0 - Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit [https://dev.blues.io/support/](https://dev.blues.io/support/) diff --git a/src/notehub_py/__init__.py b/src/notehub_py/__init__.py index 0a3a390..c98c430 100644 --- a/src/notehub_py/__init__.py +++ b/src/notehub_py/__init__.py @@ -15,7 +15,7 @@ """ # noqa: E501 -__version__ = "1.0.2" +__version__ = "1.0.3" # import apis into sdk package from notehub_py.api.alert_api import AlertApi diff --git a/src/notehub_py/api_client.py b/src/notehub_py/api_client.py index a2d7599..c3d0f57 100644 --- a/src/notehub_py/api_client.py +++ b/src/notehub_py/api_client.py @@ -89,7 +89,7 @@ def __init__( self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/1.0.2/python' + self.user_agent = 'OpenAPI-Generator/1.0.3/python' self.client_side_validation = configuration.client_side_validation def __enter__(self): diff --git a/src/notehub_py/configuration.py b/src/notehub_py/configuration.py index 0c46482..ed643b6 100644 --- a/src/notehub_py/configuration.py +++ b/src/notehub_py/configuration.py @@ -409,7 +409,7 @@ def to_debug_report(self): "OS: {env}\n"\ "Python Version: {pyversion}\n"\ "Version of the API: 1.2.0\n"\ - "SDK Package Version: 1.0.2".\ + "SDK Package Version: 1.0.3".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self): diff --git a/src/pyproject.toml b/src/pyproject.toml index 1bb3587..5e55ff7 100644 --- a/src/pyproject.toml +++ b/src/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "notehub_py" -version = "1.0.2" +version = "1.0.3" description = "Notehub API" authors = ["Blues Engineering "] license = "MIT" diff --git a/src/setup.py b/src/setup.py index 267d112..f65854f 100644 --- a/src/setup.py +++ b/src/setup.py @@ -25,7 +25,7 @@ # prerequisite: setuptools # http://pypi.python.org/pypi/setuptools NAME = "notehub-py" -VERSION = "1.0.2" +VERSION = "1.0.3" PYTHON_REQUIRES = ">=3.7" REQUIRES = [ "urllib3 >= 1.25.3, < 2.1.0",