From e036e948884938f3334bc5433ddb54815ecf2a13 Mon Sep 17 00:00:00 2001 From: 1riatsila1 Date: Mon, 21 Oct 2024 11:10:24 +0100 Subject: [PATCH] feat: latest client and incorporate breaking changes --- .../.openapi-generator/FILES | 4 + pkg/config-api-client/README.md | 6 +- .../api/.openapi.source.yaml | 303 +++++++++-- pkg/config-api-client/api/openapi.yaml | 316 +++++++++-- pkg/config-api-client/api_configuration.go | 328 +++++++++++- pkg/config-api-client/client.go | 4 +- pkg/config-api-client/configuration.go | 2 +- .../docs/ConfigurationAPI.md | 182 ++++++- pkg/config-api-client/docs/SensorItem.md | 367 +++++++++++++ pkg/config-api-client/docs/SensorsResponse.md | 103 ++++ pkg/config-api-client/model_error_detail.go | 2 +- pkg/config-api-client/model_error_response.go | 2 +- pkg/config-api-client/model_group.go | 2 +- .../model_groups_get_item.go | 2 +- .../model_groups_get_response.go | 2 +- .../model_groups_patch_request.go | 2 +- .../model_groups_patch_response.go | 2 +- .../model_groups_post_request.go | 2 +- .../model_groups_post_response.go | 2 +- pkg/config-api-client/model_issue.go | 2 +- pkg/config-api-client/model_issue_subject.go | 2 +- pkg/config-api-client/model_network.go | 2 +- .../model_network_group_assignments_item.go | 2 +- ..._network_group_assignments_post_request.go | 2 +- ...network_group_assignments_post_response.go | 2 +- ...odel_network_group_assignments_response.go | 2 +- pkg/config-api-client/model_parent.go | 2 +- pkg/config-api-client/model_sensor.go | 2 +- .../model_sensor_group_assignment_response.go | 2 +- .../model_sensor_group_assignments_item.go | 2 +- ...l_sensor_group_assignments_post_request.go | 2 +- ...model_sensor_group_assignments_response.go | 2 +- pkg/config-api-client/model_sensor_item.go | 493 ++++++++++++++++++ .../model_sensors_response.go | 215 ++++++++ pkg/config-api-client/model_service_test_.go | 2 +- ...ice_test_group_assignments_post_request.go | 2 +- ...ce_test_group_assignments_post_response.go | 8 +- .../model_wired_networks_item.go | 2 +- .../model_wired_networks_response.go | 2 +- .../model_wireless_networks_item.go | 2 +- .../model_wireless_networks_response.go | 2 +- pkg/config-api-client/response.go | 2 +- .../test/api_configuration_test.go | 29 +- pkg/config-api-client/utils.go | 2 +- pkg/config-api-provider/go.mod | 2 +- pkg/config-api-provider/go.sum | 4 +- .../provider/data-sources/group.go | 2 +- .../data-sources/network_group_assignment.go | 2 +- .../data-sources/sensor_group_assignment.go | 2 +- .../provider/data-sources/wired_network.go | 2 +- .../provider/data-sources/wireless_network.go | 2 +- .../provider/resources/group.go | 2 +- .../resources/network_group_assignment.go | 2 +- .../resources/sensor_group_assignment.go | 2 +- .../provider/resources/wired_network.go | 2 +- .../provider/resources/wireless_network.go | 2 +- pkg/config-api-provider/test/util/utils.go | 10 +- 57 files changed, 2229 insertions(+), 227 deletions(-) create mode 100644 pkg/config-api-client/docs/SensorItem.md create mode 100644 pkg/config-api-client/docs/SensorsResponse.md create mode 100644 pkg/config-api-client/model_sensor_item.go create mode 100644 pkg/config-api-client/model_sensors_response.go diff --git a/pkg/config-api-client/.openapi-generator/FILES b/pkg/config-api-client/.openapi-generator/FILES index 71caf49e..ecc12ae0 100644 --- a/pkg/config-api-client/.openapi-generator/FILES +++ b/pkg/config-api-client/.openapi-generator/FILES @@ -26,6 +26,8 @@ docs/SensorGroupAssignmentResponse.md docs/SensorGroupAssignmentsItem.md docs/SensorGroupAssignmentsPostRequest.md docs/SensorGroupAssignmentsResponse.md +docs/SensorItem.md +docs/SensorsResponse.md docs/ServiceTest.md docs/ServiceTestGroupAssignmentsPostRequest.md docs/ServiceTestGroupAssignmentsPostResponse.md @@ -57,6 +59,8 @@ model_sensor_group_assignment_response.go model_sensor_group_assignments_item.go model_sensor_group_assignments_post_request.go model_sensor_group_assignments_response.go +model_sensor_item.go +model_sensors_response.go model_service_test_.go model_service_test_group_assignments_post_request.go model_service_test_group_assignments_post_response.go diff --git a/pkg/config-api-client/README.md b/pkg/config-api-client/README.md index d3763639..ad76d78b 100644 --- a/pkg/config-api-client/README.md +++ b/pkg/config-api-client/README.md @@ -5,7 +5,7 @@ Nice description goes here ## Overview This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. -- API version: 2.1.0 +- API version: 2.6.0 - Package version: 1.0.0 - Generator version: 7.9.0-SNAPSHOT - Build package: org.openapitools.codegen.languages.GoClientCodegen @@ -83,8 +83,10 @@ Class | Method | HTTP request | Description *ConfigurationAPI* | [**DeleteSensorGroupAssignmentUxiV1alpha1SensorGroupAssignmentsIdDelete**](docs/ConfigurationAPI.md#deletesensorgroupassignmentuxiv1alpha1sensorgroupassignmentsiddelete) | **Delete** /uxi/v1alpha1/sensor-group-assignments/{id} | Delete Sensor Group Assignment *ConfigurationAPI* | [**GetUxiV1alpha1NetworkGroupAssignmentsGet**](docs/ConfigurationAPI.md#getuxiv1alpha1networkgroupassignmentsget) | **Get** /uxi/v1alpha1/network-group-assignments | Get *ConfigurationAPI* | [**GetUxiV1alpha1SensorGroupAssignmentsGet**](docs/ConfigurationAPI.md#getuxiv1alpha1sensorgroupassignmentsget) | **Get** /uxi/v1alpha1/sensor-group-assignments | Get +*ConfigurationAPI* | [**GetUxiV1alpha1SensorsGet**](docs/ConfigurationAPI.md#getuxiv1alpha1sensorsget) | **Get** /uxi/v1alpha1/sensors | Get *ConfigurationAPI* | [**GetUxiV1alpha1WiredNetworksGet**](docs/ConfigurationAPI.md#getuxiv1alpha1wirednetworksget) | **Get** /uxi/v1alpha1/wired-networks | Get *ConfigurationAPI* | [**GetUxiV1alpha1WirelessNetworksGet**](docs/ConfigurationAPI.md#getuxiv1alpha1wirelessnetworksget) | **Get** /uxi/v1alpha1/wireless-networks | Get +*ConfigurationAPI* | [**GroupsDeleteUxiV1alpha1GroupsGroupUidDelete**](docs/ConfigurationAPI.md#groupsdeleteuxiv1alpha1groupsgroupuiddelete) | **Delete** /uxi/v1alpha1/groups/{group_uid} | Groups Delete *ConfigurationAPI* | [**GroupsGetUxiV1alpha1GroupsGet**](docs/ConfigurationAPI.md#groupsgetuxiv1alpha1groupsget) | **Get** /uxi/v1alpha1/groups | Groups Get *ConfigurationAPI* | [**GroupsPatchUxiV1alpha1GroupsGroupUidPatch**](docs/ConfigurationAPI.md#groupspatchuxiv1alpha1groupsgroupuidpatch) | **Patch** /uxi/v1alpha1/groups/{group_uid} | Groups Patch *ConfigurationAPI* | [**GroupsPostUxiV1alpha1GroupsPost**](docs/ConfigurationAPI.md#groupspostuxiv1alpha1groupspost) | **Post** /uxi/v1alpha1/groups | Groups Post @@ -117,6 +119,8 @@ Class | Method | HTTP request | Description - [SensorGroupAssignmentsItem](docs/SensorGroupAssignmentsItem.md) - [SensorGroupAssignmentsPostRequest](docs/SensorGroupAssignmentsPostRequest.md) - [SensorGroupAssignmentsResponse](docs/SensorGroupAssignmentsResponse.md) + - [SensorItem](docs/SensorItem.md) + - [SensorsResponse](docs/SensorsResponse.md) - [ServiceTest](docs/ServiceTest.md) - [ServiceTestGroupAssignmentsPostRequest](docs/ServiceTestGroupAssignmentsPostRequest.md) - [ServiceTestGroupAssignmentsPostResponse](docs/ServiceTestGroupAssignmentsPostResponse.md) diff --git a/pkg/config-api-client/api/.openapi.source.yaml b/pkg/config-api-client/api/.openapi.source.yaml index e45f1876..3b74be3a 100644 --- a/pkg/config-api-client/api/.openapi.source.yaml +++ b/pkg/config-api-client/api/.openapi.source.yaml @@ -9,25 +9,107 @@ info: email: support@capenetworks.com license: name: No idea, but we need something - version: 2.1.0 + version: 2.6.0 servers: - url: https://api.capenetworks.com - url: https://api.staging.capedev.io paths: + /uxi/v1alpha1/groups/{group_uid}: + delete: + operationId: groups_delete_uxi_v1alpha1_groups__group_uid__delete + summary: Groups Delete + description: Delete an existing group. + parameters: + - name: group_uid + in: path + required: true + schema: + type: string + title: Group Uid + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + '204': + description: No Content + 4XX: + description: Client Error + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 5XX: + description: Server Error + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + security: + - HTTPBearer: [] + tags: + - api + - configuration + - v1 + - groups + patch: + operationId: groups_patch_uxi_v1alpha1_groups__group_uid__patch + summary: Groups Patch + description: Update an existing group. + parameters: + - name: group_uid + in: path + required: true + schema: + type: string + title: Group Uid + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/GroupsPatchRequest' + responses: + '200': + description: Successful Response + content: + application/json: + schema: + $ref: '#/components/schemas/GroupsPatchResponse' + 4XX: + description: Client Error + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 5XX: + description: Server Error + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + security: + - HTTPBearer: [] + tags: + - api + - configuration + - v1 + - groups /uxi/v1alpha1/groups: get: operationId: groups_get_uxi_v1alpha1_groups_get summary: Groups Get description: Lists groups matching provided criteria parameters: - - name: uid + - name: id in: query required: false schema: anyOf: - type: string nullable: true - title: Uid + title: Id - name: cursor in: query required: false @@ -42,6 +124,8 @@ paths: schema: type: integer default: 50 + maximum: 100 + minimum: 0 title: Limit responses: '200': @@ -109,50 +193,6 @@ paths: - v1alpha1 - groups x-stability-level: alpha - /uxi/v1alpha1/groups/{group_uid}: - patch: - operationId: groups_patch_uxi_v1alpha1_groups__group_uid__patch - summary: Groups Patch - description: Update an existing group. - parameters: - - name: group_uid - in: path - required: true - schema: - type: string - title: Group Uid - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/GroupsPatchRequest' - responses: - '200': - description: Successful Response - content: - application/json: - schema: - $ref: '#/components/schemas/GroupsPatchResponse' - 4XX: - description: Client Error - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - 5XX: - description: Server Error - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - security: - - HTTPBearer: [] - tags: - - api - - configuration - - v1 - - groups /uxi/v1alpha1/network-group-assignments/{id}: delete: operationId: >- @@ -200,14 +240,14 @@ paths: summary: Get description: Get a list of network group assignments parameters: - - name: uid + - name: id in: query required: false schema: anyOf: - type: string nullable: true - title: Uid + title: Id - name: cursor in: query required: false @@ -293,14 +333,14 @@ paths: summary: Get description: Get a list of sensor group assignments parameters: - - name: uid + - name: id in: query required: false schema: anyOf: - type: string nullable: true - title: Uid + title: Id - name: cursor in: query required: false @@ -421,6 +461,64 @@ paths: - v1alpha1 - sensor-group-assignments x-stability-level: alpha + /uxi/v1alpha1/sensors: + get: + operationId: get_uxi_v1alpha1_sensors_get + summary: Get + description: Get a list of sensors + parameters: + - name: id + in: query + required: false + schema: + anyOf: + - type: string + nullable: true + title: Id + - name: cursor + in: query + required: false + schema: + anyOf: + - type: string + nullable: true + title: Cursor + - name: limit + in: query + required: false + schema: + type: integer + default: 50 + maximum: 100 + minimum: 0 + title: Limit + responses: + '200': + description: Successful Response + content: + application/json: + schema: + $ref: '#/components/schemas/SensorsResponse' + 4XX: + description: Client Error + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 5XX: + description: Server Error + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + security: + - HTTPBearer: [] + tags: + - api + - configuration + - v1alpha1 + - sensors + x-stability-level: alpha /uxi/v1alpha1/service-test-group-assignments: post: operationId: post_uxi_v1alpha1_service_test_group_assignments_post @@ -465,14 +563,14 @@ paths: summary: Get description: Get a list of wired networks parameters: - - name: uid + - name: id in: query required: false schema: anyOf: - type: string nullable: true - title: Uid + title: Id - name: cursor in: query required: false @@ -521,14 +619,14 @@ paths: summary: Get description: Get a list of wireless networks parameters: - - name: uid + - name: id in: query required: false schema: anyOf: - type: string nullable: true - title: Uid + title: Id - name: cursor in: query required: false @@ -938,6 +1036,96 @@ components: - count - next title: SensorGroupAssignmentsResponse + SensorItem: + type: object + properties: + id: + type: string + title: Id + serial: + type: string + title: Serial + name: + type: string + title: Name + modelNumber: + anyOf: + - type: string + nullable: true + title: Modelnumber + wifiMacAddress: + anyOf: + - type: string + nullable: true + title: Wifimacaddress + ethernetMacAddress: + anyOf: + - type: string + nullable: true + title: Ethernetmacaddress + addressNote: + anyOf: + - type: string + nullable: true + title: Addressnote + longitude: + anyOf: + - type: number + nullable: true + title: Longitude + latitude: + anyOf: + - type: number + nullable: true + title: Latitude + notes: + anyOf: + - type: string + nullable: true + title: Notes + pcapMode: + anyOf: + - type: string + nullable: true + title: Pcapmode + type: + type: string + default: uxi/sensor + title: Type + required: + - id + - serial + - name + - modelNumber + - wifiMacAddress + - ethernetMacAddress + - addressNote + - longitude + - latitude + - notes + - pcapMode + title: SensorItem + SensorsResponse: + type: object + properties: + items: + type: array + items: + $ref: '#/components/schemas/SensorItem' + title: Items + count: + type: integer + title: Count + next: + anyOf: + - type: string + nullable: true + title: Next + required: + - items + - count + - next + title: SensorsResponse ServiceTest: type: object properties: @@ -969,7 +1157,7 @@ components: title: Id group: $ref: '#/components/schemas/Group' - service_test: + serviceTest: $ref: '#/components/schemas/ServiceTest' type: type: string @@ -978,7 +1166,7 @@ components: required: - id - group - - service_test + - serviceTest title: ServiceTestGroupAssignmentsPostResponse WiredNetworksItem: type: object @@ -1162,6 +1350,7 @@ tags: - name: groups - name: health - name: network-group-assignments + - name: sensors - name: sensor-group-assignments - name: service-test-group-assignments - name: wired-networks diff --git a/pkg/config-api-client/api/openapi.yaml b/pkg/config-api-client/api/openapi.yaml index 7706698b..cc89f22c 100644 --- a/pkg/config-api-client/api/openapi.yaml +++ b/pkg/config-api-client/api/openapi.yaml @@ -9,7 +9,7 @@ info: name: "No idea, but we need something" termsOfService: http://we.dont.care.yet.com/term-of-service title: Configuration Api - version: 2.1.0 + version: 2.6.0 servers: - url: https://api.capenetworks.com - url: https://api.staging.capedev.io @@ -21,11 +21,92 @@ tags: - name: groups - name: health - name: network-group-assignments +- name: sensors - name: sensor-group-assignments - name: service-test-group-assignments - name: wired-networks - name: wireless-networks paths: + /uxi/v1alpha1/groups/{group_uid}: + delete: + description: Delete an existing group. + operationId: groups_delete_uxi_v1alpha1_groups__group_uid__delete + parameters: + - explode: false + in: path + name: group_uid + required: true + schema: + title: Group Uid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: {} + description: Successful Response + "204": + description: No Content + "4XX": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Client Error + "5XX": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Server Error + security: + - HTTPBearer: [] + summary: Groups Delete + tags: + - configuration + patch: + description: Update an existing group. + operationId: groups_patch_uxi_v1alpha1_groups__group_uid__patch + parameters: + - explode: false + in: path + name: group_uid + required: true + schema: + title: Group Uid + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/GroupsPatchRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/GroupsPatchResponse' + description: Successful Response + "4XX": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Client Error + "5XX": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Server Error + security: + - HTTPBearer: [] + summary: Groups Patch + tags: + - configuration /uxi/v1alpha1/groups: get: description: Lists groups matching provided criteria @@ -33,7 +114,7 @@ paths: parameters: - explode: true in: query - name: uid + name: id required: false schema: nullable: true @@ -53,6 +134,8 @@ paths: required: false schema: default: 50 + maximum: 100 + minimum: 0 title: Limit type: integer style: form @@ -116,49 +199,6 @@ paths: tags: - configuration x-stability-level: alpha - /uxi/v1alpha1/groups/{group_uid}: - patch: - description: Update an existing group. - operationId: groups_patch_uxi_v1alpha1_groups__group_uid__patch - parameters: - - explode: false - in: path - name: group_uid - required: true - schema: - title: Group Uid - type: string - style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/GroupsPatchRequest' - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/GroupsPatchResponse' - description: Successful Response - "4XX": - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - description: Client Error - "5XX": - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - description: Server Error - security: - - HTTPBearer: [] - summary: Groups Patch - tags: - - configuration /uxi/v1alpha1/network-group-assignments/{id}: delete: description: Delete a network group assignment @@ -205,7 +245,7 @@ paths: parameters: - explode: true in: query - name: uid + name: id required: false schema: nullable: true @@ -294,7 +334,7 @@ paths: parameters: - explode: true in: query - name: uid + name: id required: false schema: nullable: true @@ -415,6 +455,63 @@ paths: tags: - configuration x-stability-level: alpha + /uxi/v1alpha1/sensors: + get: + description: Get a list of sensors + operationId: get_uxi_v1alpha1_sensors_get + parameters: + - explode: true + in: query + name: id + required: false + schema: + nullable: true + type: string + style: form + - explode: true + in: query + name: cursor + required: false + schema: + nullable: true + type: string + style: form + - explode: true + in: query + name: limit + required: false + schema: + default: 50 + maximum: 100 + minimum: 0 + title: Limit + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/SensorsResponse' + description: Successful Response + "4XX": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Client Error + "5XX": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Server Error + security: + - HTTPBearer: [] + summary: Get + tags: + - configuration + x-stability-level: alpha /uxi/v1alpha1/service-test-group-assignments: post: description: Create a service-test group assignment @@ -457,7 +554,7 @@ paths: parameters: - explode: true in: query - name: uid + name: id required: false schema: nullable: true @@ -512,7 +609,7 @@ paths: parameters: - explode: true in: query - name: uid + name: id required: false schema: nullable: true @@ -591,7 +688,7 @@ components: errorCode: errorCode debugId: debugId message: message - httpStatusCode: 6 + httpStatusCode: 0 errorDetails: - type: type issues: @@ -1066,6 +1163,119 @@ components: - next title: SensorGroupAssignmentsResponse type: object + SensorItem: + example: + addressNote: addressNote + notes: notes + pcapMode: pcapMode + serial: serial + ethernetMacAddress: ethernetMacAddress + latitude: 6.027456183070403 + name: name + modelNumber: modelNumber + id: id + type: uxi/sensor + wifiMacAddress: wifiMacAddress + longitude: 0.8008281904610115 + properties: + id: + title: Id + type: string + serial: + title: Serial + type: string + name: + title: Name + type: string + modelNumber: + nullable: true + type: string + wifiMacAddress: + nullable: true + type: string + ethernetMacAddress: + nullable: true + type: string + addressNote: + nullable: true + type: string + longitude: + nullable: true + type: number + latitude: + nullable: true + type: number + notes: + nullable: true + type: string + pcapMode: + nullable: true + type: string + type: + default: uxi/sensor + title: Type + type: string + required: + - addressNote + - ethernetMacAddress + - id + - latitude + - longitude + - modelNumber + - name + - notes + - pcapMode + - serial + - wifiMacAddress + title: SensorItem + type: object + SensorsResponse: + example: + next: next + count: 1 + items: + - addressNote: addressNote + notes: notes + pcapMode: pcapMode + serial: serial + ethernetMacAddress: ethernetMacAddress + latitude: 6.027456183070403 + name: name + modelNumber: modelNumber + id: id + type: uxi/sensor + wifiMacAddress: wifiMacAddress + longitude: 0.8008281904610115 + - addressNote: addressNote + notes: notes + pcapMode: pcapMode + serial: serial + ethernetMacAddress: ethernetMacAddress + latitude: 6.027456183070403 + name: name + modelNumber: modelNumber + id: id + type: uxi/sensor + wifiMacAddress: wifiMacAddress + longitude: 0.8008281904610115 + properties: + items: + items: + $ref: '#/components/schemas/SensorItem' + title: Items + type: array + count: + title: Count + type: integer + next: + nullable: true + type: string + required: + - count + - items + - next + title: SensorsResponse + type: object ServiceTest: example: id: id @@ -1095,7 +1305,7 @@ components: type: object ServiceTestGroupAssignmentsPostResponse: example: - service_test: + serviceTest: id: id id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 type: uxi/service-test-group-assignment @@ -1108,7 +1318,7 @@ components: type: string group: $ref: '#/components/schemas/Group' - service_test: + serviceTest: $ref: '#/components/schemas/ServiceTest' type: default: uxi/service-test-group-assignment @@ -1117,7 +1327,7 @@ components: required: - group - id - - service_test + - serviceTest title: ServiceTestGroupAssignmentsPostResponse type: object WiredNetworksItem: diff --git a/pkg/config-api-client/api_configuration.go b/pkg/config-api-client/api_configuration.go index f5948c3f..b61bf49e 100644 --- a/pkg/config-api-client/api_configuration.go +++ b/pkg/config-api-client/api_configuration.go @@ -3,7 +3,7 @@ Configuration Api Nice description goes here -API version: 2.1.0 +API version: 2.6.0 Contact: support@capenetworks.com */ @@ -276,13 +276,13 @@ func (a *ConfigurationAPIService) DeleteSensorGroupAssignmentUxiV1alpha1SensorGr type ApiGetUxiV1alpha1NetworkGroupAssignmentsGetRequest struct { ctx context.Context ApiService *ConfigurationAPIService - uid *string + id *string cursor *string limit *int32 } -func (r ApiGetUxiV1alpha1NetworkGroupAssignmentsGetRequest) Uid(uid string) ApiGetUxiV1alpha1NetworkGroupAssignmentsGetRequest { - r.uid = &uid +func (r ApiGetUxiV1alpha1NetworkGroupAssignmentsGetRequest) Id(id string) ApiGetUxiV1alpha1NetworkGroupAssignmentsGetRequest { + r.id = &id return r } @@ -337,8 +337,8 @@ func (a *ConfigurationAPIService) GetUxiV1alpha1NetworkGroupAssignmentsGetExecut localVarQueryParams := url.Values{} localVarFormParams := url.Values{} - if r.uid != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "uid", r.uid, "form", "") + if r.id != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "id", r.id, "form", "") } if r.cursor != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "cursor", r.cursor, "form", "") @@ -427,13 +427,13 @@ func (a *ConfigurationAPIService) GetUxiV1alpha1NetworkGroupAssignmentsGetExecut type ApiGetUxiV1alpha1SensorGroupAssignmentsGetRequest struct { ctx context.Context ApiService *ConfigurationAPIService - uid *string + id *string cursor *string limit *int32 } -func (r ApiGetUxiV1alpha1SensorGroupAssignmentsGetRequest) Uid(uid string) ApiGetUxiV1alpha1SensorGroupAssignmentsGetRequest { - r.uid = &uid +func (r ApiGetUxiV1alpha1SensorGroupAssignmentsGetRequest) Id(id string) ApiGetUxiV1alpha1SensorGroupAssignmentsGetRequest { + r.id = &id return r } @@ -488,8 +488,159 @@ func (a *ConfigurationAPIService) GetUxiV1alpha1SensorGroupAssignmentsGetExecute localVarQueryParams := url.Values{} localVarFormParams := url.Values{} - if r.uid != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "uid", r.uid, "form", "") + if r.id != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "id", r.id, "form", "") + } + if r.cursor != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "cursor", r.cursor, "form", "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") + } else { + var defaultValue int32 = 50 + r.limit = &defaultValue + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode >= 400 && localVarHTTPResponse.StatusCode < 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode >= 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetUxiV1alpha1SensorsGetRequest struct { + ctx context.Context + ApiService *ConfigurationAPIService + id *string + cursor *string + limit *int32 +} + +func (r ApiGetUxiV1alpha1SensorsGetRequest) Id(id string) ApiGetUxiV1alpha1SensorsGetRequest { + r.id = &id + return r +} + +func (r ApiGetUxiV1alpha1SensorsGetRequest) Cursor(cursor string) ApiGetUxiV1alpha1SensorsGetRequest { + r.cursor = &cursor + return r +} + +func (r ApiGetUxiV1alpha1SensorsGetRequest) Limit(limit int32) ApiGetUxiV1alpha1SensorsGetRequest { + r.limit = &limit + return r +} + +func (r ApiGetUxiV1alpha1SensorsGetRequest) Execute() (*SensorsResponse, *http.Response, error) { + return r.ApiService.GetUxiV1alpha1SensorsGetExecute(r) +} + +/* +GetUxiV1alpha1SensorsGet Get + +Get a list of sensors + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetUxiV1alpha1SensorsGetRequest +*/ +func (a *ConfigurationAPIService) GetUxiV1alpha1SensorsGet(ctx context.Context) ApiGetUxiV1alpha1SensorsGetRequest { + return ApiGetUxiV1alpha1SensorsGetRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return SensorsResponse +func (a *ConfigurationAPIService) GetUxiV1alpha1SensorsGetExecute(r ApiGetUxiV1alpha1SensorsGetRequest) (*SensorsResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *SensorsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ConfigurationAPIService.GetUxiV1alpha1SensorsGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/uxi/v1alpha1/sensors" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.id != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "id", r.id, "form", "") } if r.cursor != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "cursor", r.cursor, "form", "") @@ -578,13 +729,13 @@ func (a *ConfigurationAPIService) GetUxiV1alpha1SensorGroupAssignmentsGetExecute type ApiGetUxiV1alpha1WiredNetworksGetRequest struct { ctx context.Context ApiService *ConfigurationAPIService - uid *string + id *string cursor *string limit *int32 } -func (r ApiGetUxiV1alpha1WiredNetworksGetRequest) Uid(uid string) ApiGetUxiV1alpha1WiredNetworksGetRequest { - r.uid = &uid +func (r ApiGetUxiV1alpha1WiredNetworksGetRequest) Id(id string) ApiGetUxiV1alpha1WiredNetworksGetRequest { + r.id = &id return r } @@ -639,8 +790,8 @@ func (a *ConfigurationAPIService) GetUxiV1alpha1WiredNetworksGetExecute(r ApiGet localVarQueryParams := url.Values{} localVarFormParams := url.Values{} - if r.uid != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "uid", r.uid, "form", "") + if r.id != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "id", r.id, "form", "") } if r.cursor != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "cursor", r.cursor, "form", "") @@ -729,13 +880,13 @@ func (a *ConfigurationAPIService) GetUxiV1alpha1WiredNetworksGetExecute(r ApiGet type ApiGetUxiV1alpha1WirelessNetworksGetRequest struct { ctx context.Context ApiService *ConfigurationAPIService - uid *string + id *string cursor *string limit *int32 } -func (r ApiGetUxiV1alpha1WirelessNetworksGetRequest) Uid(uid string) ApiGetUxiV1alpha1WirelessNetworksGetRequest { - r.uid = &uid +func (r ApiGetUxiV1alpha1WirelessNetworksGetRequest) Id(id string) ApiGetUxiV1alpha1WirelessNetworksGetRequest { + r.id = &id return r } @@ -790,8 +941,8 @@ func (a *ConfigurationAPIService) GetUxiV1alpha1WirelessNetworksGetExecute(r Api localVarQueryParams := url.Values{} localVarFormParams := url.Values{} - if r.uid != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "uid", r.uid, "form", "") + if r.id != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "id", r.id, "form", "") } if r.cursor != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "cursor", r.cursor, "form", "") @@ -877,16 +1028,141 @@ func (a *ConfigurationAPIService) GetUxiV1alpha1WirelessNetworksGetExecute(r Api return localVarReturnValue, localVarHTTPResponse, nil } +type ApiGroupsDeleteUxiV1alpha1GroupsGroupUidDeleteRequest struct { + ctx context.Context + ApiService *ConfigurationAPIService + groupUid string +} + +func (r ApiGroupsDeleteUxiV1alpha1GroupsGroupUidDeleteRequest) Execute() (interface{}, *http.Response, error) { + return r.ApiService.GroupsDeleteUxiV1alpha1GroupsGroupUidDeleteExecute(r) +} + +/* +GroupsDeleteUxiV1alpha1GroupsGroupUidDelete Groups Delete + +Delete an existing group. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param groupUid + @return ApiGroupsDeleteUxiV1alpha1GroupsGroupUidDeleteRequest +*/ +func (a *ConfigurationAPIService) GroupsDeleteUxiV1alpha1GroupsGroupUidDelete(ctx context.Context, groupUid string) ApiGroupsDeleteUxiV1alpha1GroupsGroupUidDeleteRequest { + return ApiGroupsDeleteUxiV1alpha1GroupsGroupUidDeleteRequest{ + ApiService: a, + ctx: ctx, + groupUid: groupUid, + } +} + +// Execute executes the request +// +// @return interface{} +func (a *ConfigurationAPIService) GroupsDeleteUxiV1alpha1GroupsGroupUidDeleteExecute(r ApiGroupsDeleteUxiV1alpha1GroupsGroupUidDeleteRequest) (interface{}, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue interface{} + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ConfigurationAPIService.GroupsDeleteUxiV1alpha1GroupsGroupUidDelete") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/uxi/v1alpha1/groups/{group_uid}" + localVarPath = strings.Replace(localVarPath, "{"+"group_uid"+"}", url.PathEscape(parameterValueToString(r.groupUid, "groupUid")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode >= 400 && localVarHTTPResponse.StatusCode < 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode >= 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + type ApiGroupsGetUxiV1alpha1GroupsGetRequest struct { ctx context.Context ApiService *ConfigurationAPIService - uid *string + id *string cursor *string limit *int32 } -func (r ApiGroupsGetUxiV1alpha1GroupsGetRequest) Uid(uid string) ApiGroupsGetUxiV1alpha1GroupsGetRequest { - r.uid = &uid +func (r ApiGroupsGetUxiV1alpha1GroupsGetRequest) Id(id string) ApiGroupsGetUxiV1alpha1GroupsGetRequest { + r.id = &id return r } @@ -941,8 +1217,8 @@ func (a *ConfigurationAPIService) GroupsGetUxiV1alpha1GroupsGetExecute(r ApiGrou localVarQueryParams := url.Values{} localVarFormParams := url.Values{} - if r.uid != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "uid", r.uid, "form", "") + if r.id != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "id", r.id, "form", "") } if r.cursor != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "cursor", r.cursor, "form", "") diff --git a/pkg/config-api-client/client.go b/pkg/config-api-client/client.go index 96cb8295..ebd0ae7f 100644 --- a/pkg/config-api-client/client.go +++ b/pkg/config-api-client/client.go @@ -3,7 +3,7 @@ Configuration Api Nice description goes here -API version: 2.1.0 +API version: 2.6.0 Contact: support@capenetworks.com */ @@ -41,7 +41,7 @@ var ( queryDescape = strings.NewReplacer("%5B", "[", "%5D", "]") ) -// APIClient manages communication with the Configuration Api API v2.1.0 +// APIClient manages communication with the Configuration Api API v2.6.0 // In most cases there should be only one, shared, APIClient. type APIClient struct { cfg *Configuration diff --git a/pkg/config-api-client/configuration.go b/pkg/config-api-client/configuration.go index 820437f4..61189149 100644 --- a/pkg/config-api-client/configuration.go +++ b/pkg/config-api-client/configuration.go @@ -3,7 +3,7 @@ Configuration Api Nice description goes here -API version: 2.1.0 +API version: 2.6.0 Contact: support@capenetworks.com */ diff --git a/pkg/config-api-client/docs/ConfigurationAPI.md b/pkg/config-api-client/docs/ConfigurationAPI.md index a96cfa4d..b5c44d41 100644 --- a/pkg/config-api-client/docs/ConfigurationAPI.md +++ b/pkg/config-api-client/docs/ConfigurationAPI.md @@ -8,8 +8,10 @@ Method | HTTP request | Description [**DeleteSensorGroupAssignmentUxiV1alpha1SensorGroupAssignmentsIdDelete**](ConfigurationAPI.md#DeleteSensorGroupAssignmentUxiV1alpha1SensorGroupAssignmentsIdDelete) | **Delete** /uxi/v1alpha1/sensor-group-assignments/{id} | Delete Sensor Group Assignment [**GetUxiV1alpha1NetworkGroupAssignmentsGet**](ConfigurationAPI.md#GetUxiV1alpha1NetworkGroupAssignmentsGet) | **Get** /uxi/v1alpha1/network-group-assignments | Get [**GetUxiV1alpha1SensorGroupAssignmentsGet**](ConfigurationAPI.md#GetUxiV1alpha1SensorGroupAssignmentsGet) | **Get** /uxi/v1alpha1/sensor-group-assignments | Get +[**GetUxiV1alpha1SensorsGet**](ConfigurationAPI.md#GetUxiV1alpha1SensorsGet) | **Get** /uxi/v1alpha1/sensors | Get [**GetUxiV1alpha1WiredNetworksGet**](ConfigurationAPI.md#GetUxiV1alpha1WiredNetworksGet) | **Get** /uxi/v1alpha1/wired-networks | Get [**GetUxiV1alpha1WirelessNetworksGet**](ConfigurationAPI.md#GetUxiV1alpha1WirelessNetworksGet) | **Get** /uxi/v1alpha1/wireless-networks | Get +[**GroupsDeleteUxiV1alpha1GroupsGroupUidDelete**](ConfigurationAPI.md#GroupsDeleteUxiV1alpha1GroupsGroupUidDelete) | **Delete** /uxi/v1alpha1/groups/{group_uid} | Groups Delete [**GroupsGetUxiV1alpha1GroupsGet**](ConfigurationAPI.md#GroupsGetUxiV1alpha1GroupsGet) | **Get** /uxi/v1alpha1/groups | Groups Get [**GroupsPatchUxiV1alpha1GroupsGroupUidPatch**](ConfigurationAPI.md#GroupsPatchUxiV1alpha1GroupsGroupUidPatch) | **Patch** /uxi/v1alpha1/groups/{group_uid} | Groups Patch [**GroupsPostUxiV1alpha1GroupsPost**](ConfigurationAPI.md#GroupsPostUxiV1alpha1GroupsPost) | **Post** /uxi/v1alpha1/groups | Groups Post @@ -161,7 +163,7 @@ Name | Type | Description | Notes ## GetUxiV1alpha1NetworkGroupAssignmentsGet -> NetworkGroupAssignmentsResponse GetUxiV1alpha1NetworkGroupAssignmentsGet(ctx).Uid(uid).Cursor(cursor).Limit(limit).Execute() +> NetworkGroupAssignmentsResponse GetUxiV1alpha1NetworkGroupAssignmentsGet(ctx).Id(id).Cursor(cursor).Limit(limit).Execute() Get @@ -180,13 +182,13 @@ import ( ) func main() { - uid := "uid_example" // string | (optional) + id := "id_example" // string | (optional) cursor := "cursor_example" // string | (optional) limit := int32(56) // int32 | (optional) (default to 50) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ConfigurationAPI.GetUxiV1alpha1NetworkGroupAssignmentsGet(context.Background()).Uid(uid).Cursor(cursor).Limit(limit).Execute() + resp, r, err := apiClient.ConfigurationAPI.GetUxiV1alpha1NetworkGroupAssignmentsGet(context.Background()).Id(id).Cursor(cursor).Limit(limit).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ConfigurationAPI.GetUxiV1alpha1NetworkGroupAssignmentsGet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -207,7 +209,7 @@ Other parameters are passed through a pointer to a apiGetUxiV1alpha1NetworkGroup Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **uid** | **string** | | + **id** | **string** | | **cursor** | **string** | | **limit** | **int32** | | [default to 50] @@ -231,7 +233,7 @@ Name | Type | Description | Notes ## GetUxiV1alpha1SensorGroupAssignmentsGet -> SensorGroupAssignmentsResponse GetUxiV1alpha1SensorGroupAssignmentsGet(ctx).Uid(uid).Cursor(cursor).Limit(limit).Execute() +> SensorGroupAssignmentsResponse GetUxiV1alpha1SensorGroupAssignmentsGet(ctx).Id(id).Cursor(cursor).Limit(limit).Execute() Get @@ -250,13 +252,13 @@ import ( ) func main() { - uid := "uid_example" // string | (optional) + id := "id_example" // string | (optional) cursor := "cursor_example" // string | (optional) limit := int32(56) // int32 | (optional) (default to 50) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ConfigurationAPI.GetUxiV1alpha1SensorGroupAssignmentsGet(context.Background()).Uid(uid).Cursor(cursor).Limit(limit).Execute() + resp, r, err := apiClient.ConfigurationAPI.GetUxiV1alpha1SensorGroupAssignmentsGet(context.Background()).Id(id).Cursor(cursor).Limit(limit).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ConfigurationAPI.GetUxiV1alpha1SensorGroupAssignmentsGet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -277,7 +279,7 @@ Other parameters are passed through a pointer to a apiGetUxiV1alpha1SensorGroupA Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **uid** | **string** | | + **id** | **string** | | **cursor** | **string** | | **limit** | **int32** | | [default to 50] @@ -299,9 +301,79 @@ Name | Type | Description | Notes [[Back to README]](../README.md) +## GetUxiV1alpha1SensorsGet + +> SensorsResponse GetUxiV1alpha1SensorsGet(ctx).Id(id).Cursor(cursor).Limit(limit).Execute() + +Get + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/aruba-uxi/configuration-api-terraform-provider/pkg/config-api-client" +) + +func main() { + id := "id_example" // string | (optional) + cursor := "cursor_example" // string | (optional) + limit := int32(56) // int32 | (optional) (default to 50) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ConfigurationAPI.GetUxiV1alpha1SensorsGet(context.Background()).Id(id).Cursor(cursor).Limit(limit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ConfigurationAPI.GetUxiV1alpha1SensorsGet``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetUxiV1alpha1SensorsGet`: SensorsResponse + fmt.Fprintf(os.Stdout, "Response from `ConfigurationAPI.GetUxiV1alpha1SensorsGet`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetUxiV1alpha1SensorsGetRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **string** | | + **cursor** | **string** | | + **limit** | **int32** | | [default to 50] + +### Return type + +[**SensorsResponse**](SensorsResponse.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + ## GetUxiV1alpha1WiredNetworksGet -> WiredNetworksResponse GetUxiV1alpha1WiredNetworksGet(ctx).Uid(uid).Cursor(cursor).Limit(limit).Execute() +> WiredNetworksResponse GetUxiV1alpha1WiredNetworksGet(ctx).Id(id).Cursor(cursor).Limit(limit).Execute() Get @@ -320,13 +392,13 @@ import ( ) func main() { - uid := "uid_example" // string | (optional) + id := "id_example" // string | (optional) cursor := "cursor_example" // string | (optional) limit := int32(56) // int32 | (optional) (default to 50) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ConfigurationAPI.GetUxiV1alpha1WiredNetworksGet(context.Background()).Uid(uid).Cursor(cursor).Limit(limit).Execute() + resp, r, err := apiClient.ConfigurationAPI.GetUxiV1alpha1WiredNetworksGet(context.Background()).Id(id).Cursor(cursor).Limit(limit).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ConfigurationAPI.GetUxiV1alpha1WiredNetworksGet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -347,7 +419,7 @@ Other parameters are passed through a pointer to a apiGetUxiV1alpha1WiredNetwork Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **uid** | **string** | | + **id** | **string** | | **cursor** | **string** | | **limit** | **int32** | | [default to 50] @@ -371,7 +443,7 @@ Name | Type | Description | Notes ## GetUxiV1alpha1WirelessNetworksGet -> WirelessNetworksResponse GetUxiV1alpha1WirelessNetworksGet(ctx).Uid(uid).Cursor(cursor).Limit(limit).Execute() +> WirelessNetworksResponse GetUxiV1alpha1WirelessNetworksGet(ctx).Id(id).Cursor(cursor).Limit(limit).Execute() Get @@ -390,13 +462,13 @@ import ( ) func main() { - uid := "uid_example" // string | (optional) + id := "id_example" // string | (optional) cursor := "cursor_example" // string | (optional) limit := int32(56) // int32 | (optional) (default to 50) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ConfigurationAPI.GetUxiV1alpha1WirelessNetworksGet(context.Background()).Uid(uid).Cursor(cursor).Limit(limit).Execute() + resp, r, err := apiClient.ConfigurationAPI.GetUxiV1alpha1WirelessNetworksGet(context.Background()).Id(id).Cursor(cursor).Limit(limit).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ConfigurationAPI.GetUxiV1alpha1WirelessNetworksGet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -417,7 +489,7 @@ Other parameters are passed through a pointer to a apiGetUxiV1alpha1WirelessNetw Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **uid** | **string** | | + **id** | **string** | | **cursor** | **string** | | **limit** | **int32** | | [default to 50] @@ -439,9 +511,79 @@ Name | Type | Description | Notes [[Back to README]](../README.md) +## GroupsDeleteUxiV1alpha1GroupsGroupUidDelete + +> interface{} GroupsDeleteUxiV1alpha1GroupsGroupUidDelete(ctx, groupUid).Execute() + +Groups Delete + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/aruba-uxi/configuration-api-terraform-provider/pkg/config-api-client" +) + +func main() { + groupUid := "groupUid_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ConfigurationAPI.GroupsDeleteUxiV1alpha1GroupsGroupUidDelete(context.Background(), groupUid).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ConfigurationAPI.GroupsDeleteUxiV1alpha1GroupsGroupUidDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GroupsDeleteUxiV1alpha1GroupsGroupUidDelete`: interface{} + fmt.Fprintf(os.Stdout, "Response from `ConfigurationAPI.GroupsDeleteUxiV1alpha1GroupsGroupUidDelete`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**groupUid** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGroupsDeleteUxiV1alpha1GroupsGroupUidDeleteRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +**interface{}** + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + ## GroupsGetUxiV1alpha1GroupsGet -> GroupsGetResponse GroupsGetUxiV1alpha1GroupsGet(ctx).Uid(uid).Cursor(cursor).Limit(limit).Execute() +> GroupsGetResponse GroupsGetUxiV1alpha1GroupsGet(ctx).Id(id).Cursor(cursor).Limit(limit).Execute() Groups Get @@ -460,13 +602,13 @@ import ( ) func main() { - uid := "uid_example" // string | (optional) + id := "id_example" // string | (optional) cursor := "cursor_example" // string | (optional) limit := int32(56) // int32 | (optional) (default to 50) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ConfigurationAPI.GroupsGetUxiV1alpha1GroupsGet(context.Background()).Uid(uid).Cursor(cursor).Limit(limit).Execute() + resp, r, err := apiClient.ConfigurationAPI.GroupsGetUxiV1alpha1GroupsGet(context.Background()).Id(id).Cursor(cursor).Limit(limit).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ConfigurationAPI.GroupsGetUxiV1alpha1GroupsGet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -487,7 +629,7 @@ Other parameters are passed through a pointer to a apiGroupsGetUxiV1alpha1Groups Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **uid** | **string** | | + **id** | **string** | | **cursor** | **string** | | **limit** | **int32** | | [default to 50] diff --git a/pkg/config-api-client/docs/SensorItem.md b/pkg/config-api-client/docs/SensorItem.md new file mode 100644 index 00000000..2f9ac67f --- /dev/null +++ b/pkg/config-api-client/docs/SensorItem.md @@ -0,0 +1,367 @@ +# SensorItem + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | | +**Serial** | **string** | | +**Name** | **string** | | +**ModelNumber** | **NullableString** | | +**WifiMacAddress** | **NullableString** | | +**EthernetMacAddress** | **NullableString** | | +**AddressNote** | **NullableString** | | +**Longitude** | **NullableFloat32** | | +**Latitude** | **NullableFloat32** | | +**Notes** | **NullableString** | | +**PcapMode** | **NullableString** | | +**Type** | Pointer to **string** | | [optional] [default to "uxi/sensor"] + +## Methods + +### NewSensorItem + +`func NewSensorItem(id string, serial string, name string, modelNumber NullableString, wifiMacAddress NullableString, ethernetMacAddress NullableString, addressNote NullableString, longitude NullableFloat32, latitude NullableFloat32, notes NullableString, pcapMode NullableString, ) *SensorItem` + +NewSensorItem instantiates a new SensorItem object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewSensorItemWithDefaults + +`func NewSensorItemWithDefaults() *SensorItem` + +NewSensorItemWithDefaults instantiates a new SensorItem object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *SensorItem) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *SensorItem) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *SensorItem) SetId(v string)` + +SetId sets Id field to given value. + + +### GetSerial + +`func (o *SensorItem) GetSerial() string` + +GetSerial returns the Serial field if non-nil, zero value otherwise. + +### GetSerialOk + +`func (o *SensorItem) GetSerialOk() (*string, bool)` + +GetSerialOk returns a tuple with the Serial field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSerial + +`func (o *SensorItem) SetSerial(v string)` + +SetSerial sets Serial field to given value. + + +### GetName + +`func (o *SensorItem) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *SensorItem) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *SensorItem) SetName(v string)` + +SetName sets Name field to given value. + + +### GetModelNumber + +`func (o *SensorItem) GetModelNumber() string` + +GetModelNumber returns the ModelNumber field if non-nil, zero value otherwise. + +### GetModelNumberOk + +`func (o *SensorItem) GetModelNumberOk() (*string, bool)` + +GetModelNumberOk returns a tuple with the ModelNumber field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetModelNumber + +`func (o *SensorItem) SetModelNumber(v string)` + +SetModelNumber sets ModelNumber field to given value. + + +### SetModelNumberNil + +`func (o *SensorItem) SetModelNumberNil(b bool)` + + SetModelNumberNil sets the value for ModelNumber to be an explicit nil + +### UnsetModelNumber +`func (o *SensorItem) UnsetModelNumber()` + +UnsetModelNumber ensures that no value is present for ModelNumber, not even an explicit nil +### GetWifiMacAddress + +`func (o *SensorItem) GetWifiMacAddress() string` + +GetWifiMacAddress returns the WifiMacAddress field if non-nil, zero value otherwise. + +### GetWifiMacAddressOk + +`func (o *SensorItem) GetWifiMacAddressOk() (*string, bool)` + +GetWifiMacAddressOk returns a tuple with the WifiMacAddress field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetWifiMacAddress + +`func (o *SensorItem) SetWifiMacAddress(v string)` + +SetWifiMacAddress sets WifiMacAddress field to given value. + + +### SetWifiMacAddressNil + +`func (o *SensorItem) SetWifiMacAddressNil(b bool)` + + SetWifiMacAddressNil sets the value for WifiMacAddress to be an explicit nil + +### UnsetWifiMacAddress +`func (o *SensorItem) UnsetWifiMacAddress()` + +UnsetWifiMacAddress ensures that no value is present for WifiMacAddress, not even an explicit nil +### GetEthernetMacAddress + +`func (o *SensorItem) GetEthernetMacAddress() string` + +GetEthernetMacAddress returns the EthernetMacAddress field if non-nil, zero value otherwise. + +### GetEthernetMacAddressOk + +`func (o *SensorItem) GetEthernetMacAddressOk() (*string, bool)` + +GetEthernetMacAddressOk returns a tuple with the EthernetMacAddress field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEthernetMacAddress + +`func (o *SensorItem) SetEthernetMacAddress(v string)` + +SetEthernetMacAddress sets EthernetMacAddress field to given value. + + +### SetEthernetMacAddressNil + +`func (o *SensorItem) SetEthernetMacAddressNil(b bool)` + + SetEthernetMacAddressNil sets the value for EthernetMacAddress to be an explicit nil + +### UnsetEthernetMacAddress +`func (o *SensorItem) UnsetEthernetMacAddress()` + +UnsetEthernetMacAddress ensures that no value is present for EthernetMacAddress, not even an explicit nil +### GetAddressNote + +`func (o *SensorItem) GetAddressNote() string` + +GetAddressNote returns the AddressNote field if non-nil, zero value otherwise. + +### GetAddressNoteOk + +`func (o *SensorItem) GetAddressNoteOk() (*string, bool)` + +GetAddressNoteOk returns a tuple with the AddressNote field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAddressNote + +`func (o *SensorItem) SetAddressNote(v string)` + +SetAddressNote sets AddressNote field to given value. + + +### SetAddressNoteNil + +`func (o *SensorItem) SetAddressNoteNil(b bool)` + + SetAddressNoteNil sets the value for AddressNote to be an explicit nil + +### UnsetAddressNote +`func (o *SensorItem) UnsetAddressNote()` + +UnsetAddressNote ensures that no value is present for AddressNote, not even an explicit nil +### GetLongitude + +`func (o *SensorItem) GetLongitude() float32` + +GetLongitude returns the Longitude field if non-nil, zero value otherwise. + +### GetLongitudeOk + +`func (o *SensorItem) GetLongitudeOk() (*float32, bool)` + +GetLongitudeOk returns a tuple with the Longitude field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLongitude + +`func (o *SensorItem) SetLongitude(v float32)` + +SetLongitude sets Longitude field to given value. + + +### SetLongitudeNil + +`func (o *SensorItem) SetLongitudeNil(b bool)` + + SetLongitudeNil sets the value for Longitude to be an explicit nil + +### UnsetLongitude +`func (o *SensorItem) UnsetLongitude()` + +UnsetLongitude ensures that no value is present for Longitude, not even an explicit nil +### GetLatitude + +`func (o *SensorItem) GetLatitude() float32` + +GetLatitude returns the Latitude field if non-nil, zero value otherwise. + +### GetLatitudeOk + +`func (o *SensorItem) GetLatitudeOk() (*float32, bool)` + +GetLatitudeOk returns a tuple with the Latitude field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLatitude + +`func (o *SensorItem) SetLatitude(v float32)` + +SetLatitude sets Latitude field to given value. + + +### SetLatitudeNil + +`func (o *SensorItem) SetLatitudeNil(b bool)` + + SetLatitudeNil sets the value for Latitude to be an explicit nil + +### UnsetLatitude +`func (o *SensorItem) UnsetLatitude()` + +UnsetLatitude ensures that no value is present for Latitude, not even an explicit nil +### GetNotes + +`func (o *SensorItem) GetNotes() string` + +GetNotes returns the Notes field if non-nil, zero value otherwise. + +### GetNotesOk + +`func (o *SensorItem) GetNotesOk() (*string, bool)` + +GetNotesOk returns a tuple with the Notes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNotes + +`func (o *SensorItem) SetNotes(v string)` + +SetNotes sets Notes field to given value. + + +### SetNotesNil + +`func (o *SensorItem) SetNotesNil(b bool)` + + SetNotesNil sets the value for Notes to be an explicit nil + +### UnsetNotes +`func (o *SensorItem) UnsetNotes()` + +UnsetNotes ensures that no value is present for Notes, not even an explicit nil +### GetPcapMode + +`func (o *SensorItem) GetPcapMode() string` + +GetPcapMode returns the PcapMode field if non-nil, zero value otherwise. + +### GetPcapModeOk + +`func (o *SensorItem) GetPcapModeOk() (*string, bool)` + +GetPcapModeOk returns a tuple with the PcapMode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPcapMode + +`func (o *SensorItem) SetPcapMode(v string)` + +SetPcapMode sets PcapMode field to given value. + + +### SetPcapModeNil + +`func (o *SensorItem) SetPcapModeNil(b bool)` + + SetPcapModeNil sets the value for PcapMode to be an explicit nil + +### UnsetPcapMode +`func (o *SensorItem) UnsetPcapMode()` + +UnsetPcapMode ensures that no value is present for PcapMode, not even an explicit nil +### GetType + +`func (o *SensorItem) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *SensorItem) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *SensorItem) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *SensorItem) HasType() bool` + +HasType returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pkg/config-api-client/docs/SensorsResponse.md b/pkg/config-api-client/docs/SensorsResponse.md new file mode 100644 index 00000000..0a046fb6 --- /dev/null +++ b/pkg/config-api-client/docs/SensorsResponse.md @@ -0,0 +1,103 @@ +# SensorsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Items** | [**[]SensorItem**](SensorItem.md) | | +**Count** | **int32** | | +**Next** | **NullableString** | | + +## Methods + +### NewSensorsResponse + +`func NewSensorsResponse(items []SensorItem, count int32, next NullableString, ) *SensorsResponse` + +NewSensorsResponse instantiates a new SensorsResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewSensorsResponseWithDefaults + +`func NewSensorsResponseWithDefaults() *SensorsResponse` + +NewSensorsResponseWithDefaults instantiates a new SensorsResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetItems + +`func (o *SensorsResponse) GetItems() []SensorItem` + +GetItems returns the Items field if non-nil, zero value otherwise. + +### GetItemsOk + +`func (o *SensorsResponse) GetItemsOk() (*[]SensorItem, bool)` + +GetItemsOk returns a tuple with the Items field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetItems + +`func (o *SensorsResponse) SetItems(v []SensorItem)` + +SetItems sets Items field to given value. + + +### GetCount + +`func (o *SensorsResponse) GetCount() int32` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *SensorsResponse) GetCountOk() (*int32, bool)` + +GetCountOk returns a tuple with the Count field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCount + +`func (o *SensorsResponse) SetCount(v int32)` + +SetCount sets Count field to given value. + + +### GetNext + +`func (o *SensorsResponse) GetNext() string` + +GetNext returns the Next field if non-nil, zero value otherwise. + +### GetNextOk + +`func (o *SensorsResponse) GetNextOk() (*string, bool)` + +GetNextOk returns a tuple with the Next field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNext + +`func (o *SensorsResponse) SetNext(v string)` + +SetNext sets Next field to given value. + + +### SetNextNil + +`func (o *SensorsResponse) SetNextNil(b bool)` + + SetNextNil sets the value for Next to be an explicit nil + +### UnsetNext +`func (o *SensorsResponse) UnsetNext()` + +UnsetNext ensures that no value is present for Next, not even an explicit nil + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pkg/config-api-client/model_error_detail.go b/pkg/config-api-client/model_error_detail.go index 5468174c..36ce8f5f 100644 --- a/pkg/config-api-client/model_error_detail.go +++ b/pkg/config-api-client/model_error_detail.go @@ -3,7 +3,7 @@ Configuration Api Nice description goes here -API version: 2.1.0 +API version: 2.6.0 Contact: support@capenetworks.com */ diff --git a/pkg/config-api-client/model_error_response.go b/pkg/config-api-client/model_error_response.go index fc0821b0..c769ea1a 100644 --- a/pkg/config-api-client/model_error_response.go +++ b/pkg/config-api-client/model_error_response.go @@ -3,7 +3,7 @@ Configuration Api Nice description goes here -API version: 2.1.0 +API version: 2.6.0 Contact: support@capenetworks.com */ diff --git a/pkg/config-api-client/model_group.go b/pkg/config-api-client/model_group.go index 012336d1..1e3021e2 100644 --- a/pkg/config-api-client/model_group.go +++ b/pkg/config-api-client/model_group.go @@ -3,7 +3,7 @@ Configuration Api Nice description goes here -API version: 2.1.0 +API version: 2.6.0 Contact: support@capenetworks.com */ diff --git a/pkg/config-api-client/model_groups_get_item.go b/pkg/config-api-client/model_groups_get_item.go index 96a29e69..dab8f58d 100644 --- a/pkg/config-api-client/model_groups_get_item.go +++ b/pkg/config-api-client/model_groups_get_item.go @@ -3,7 +3,7 @@ Configuration Api Nice description goes here -API version: 2.1.0 +API version: 2.6.0 Contact: support@capenetworks.com */ diff --git a/pkg/config-api-client/model_groups_get_response.go b/pkg/config-api-client/model_groups_get_response.go index 2608c3ab..a0708f36 100644 --- a/pkg/config-api-client/model_groups_get_response.go +++ b/pkg/config-api-client/model_groups_get_response.go @@ -3,7 +3,7 @@ Configuration Api Nice description goes here -API version: 2.1.0 +API version: 2.6.0 Contact: support@capenetworks.com */ diff --git a/pkg/config-api-client/model_groups_patch_request.go b/pkg/config-api-client/model_groups_patch_request.go index d5a41641..4224a96e 100644 --- a/pkg/config-api-client/model_groups_patch_request.go +++ b/pkg/config-api-client/model_groups_patch_request.go @@ -3,7 +3,7 @@ Configuration Api Nice description goes here -API version: 2.1.0 +API version: 2.6.0 Contact: support@capenetworks.com */ diff --git a/pkg/config-api-client/model_groups_patch_response.go b/pkg/config-api-client/model_groups_patch_response.go index 08352ad6..ea395490 100644 --- a/pkg/config-api-client/model_groups_patch_response.go +++ b/pkg/config-api-client/model_groups_patch_response.go @@ -3,7 +3,7 @@ Configuration Api Nice description goes here -API version: 2.1.0 +API version: 2.6.0 Contact: support@capenetworks.com */ diff --git a/pkg/config-api-client/model_groups_post_request.go b/pkg/config-api-client/model_groups_post_request.go index d9cc5c68..edf90462 100644 --- a/pkg/config-api-client/model_groups_post_request.go +++ b/pkg/config-api-client/model_groups_post_request.go @@ -3,7 +3,7 @@ Configuration Api Nice description goes here -API version: 2.1.0 +API version: 2.6.0 Contact: support@capenetworks.com */ diff --git a/pkg/config-api-client/model_groups_post_response.go b/pkg/config-api-client/model_groups_post_response.go index c955a725..904e4068 100644 --- a/pkg/config-api-client/model_groups_post_response.go +++ b/pkg/config-api-client/model_groups_post_response.go @@ -3,7 +3,7 @@ Configuration Api Nice description goes here -API version: 2.1.0 +API version: 2.6.0 Contact: support@capenetworks.com */ diff --git a/pkg/config-api-client/model_issue.go b/pkg/config-api-client/model_issue.go index 5c962687..d973be75 100644 --- a/pkg/config-api-client/model_issue.go +++ b/pkg/config-api-client/model_issue.go @@ -3,7 +3,7 @@ Configuration Api Nice description goes here -API version: 2.1.0 +API version: 2.6.0 Contact: support@capenetworks.com */ diff --git a/pkg/config-api-client/model_issue_subject.go b/pkg/config-api-client/model_issue_subject.go index 29ef3bee..8df6225f 100644 --- a/pkg/config-api-client/model_issue_subject.go +++ b/pkg/config-api-client/model_issue_subject.go @@ -3,7 +3,7 @@ Configuration Api Nice description goes here -API version: 2.1.0 +API version: 2.6.0 Contact: support@capenetworks.com */ diff --git a/pkg/config-api-client/model_network.go b/pkg/config-api-client/model_network.go index 90e3dc19..403e5c7e 100644 --- a/pkg/config-api-client/model_network.go +++ b/pkg/config-api-client/model_network.go @@ -3,7 +3,7 @@ Configuration Api Nice description goes here -API version: 2.1.0 +API version: 2.6.0 Contact: support@capenetworks.com */ diff --git a/pkg/config-api-client/model_network_group_assignments_item.go b/pkg/config-api-client/model_network_group_assignments_item.go index a94fc8c4..19a19ea6 100644 --- a/pkg/config-api-client/model_network_group_assignments_item.go +++ b/pkg/config-api-client/model_network_group_assignments_item.go @@ -3,7 +3,7 @@ Configuration Api Nice description goes here -API version: 2.1.0 +API version: 2.6.0 Contact: support@capenetworks.com */ diff --git a/pkg/config-api-client/model_network_group_assignments_post_request.go b/pkg/config-api-client/model_network_group_assignments_post_request.go index 8899c683..5590376c 100644 --- a/pkg/config-api-client/model_network_group_assignments_post_request.go +++ b/pkg/config-api-client/model_network_group_assignments_post_request.go @@ -3,7 +3,7 @@ Configuration Api Nice description goes here -API version: 2.1.0 +API version: 2.6.0 Contact: support@capenetworks.com */ diff --git a/pkg/config-api-client/model_network_group_assignments_post_response.go b/pkg/config-api-client/model_network_group_assignments_post_response.go index 314d0e40..6c8cc337 100644 --- a/pkg/config-api-client/model_network_group_assignments_post_response.go +++ b/pkg/config-api-client/model_network_group_assignments_post_response.go @@ -3,7 +3,7 @@ Configuration Api Nice description goes here -API version: 2.1.0 +API version: 2.6.0 Contact: support@capenetworks.com */ diff --git a/pkg/config-api-client/model_network_group_assignments_response.go b/pkg/config-api-client/model_network_group_assignments_response.go index 19880cdd..38f1ac18 100644 --- a/pkg/config-api-client/model_network_group_assignments_response.go +++ b/pkg/config-api-client/model_network_group_assignments_response.go @@ -3,7 +3,7 @@ Configuration Api Nice description goes here -API version: 2.1.0 +API version: 2.6.0 Contact: support@capenetworks.com */ diff --git a/pkg/config-api-client/model_parent.go b/pkg/config-api-client/model_parent.go index bb8ecda5..b34b959a 100644 --- a/pkg/config-api-client/model_parent.go +++ b/pkg/config-api-client/model_parent.go @@ -3,7 +3,7 @@ Configuration Api Nice description goes here -API version: 2.1.0 +API version: 2.6.0 Contact: support@capenetworks.com */ diff --git a/pkg/config-api-client/model_sensor.go b/pkg/config-api-client/model_sensor.go index eda79f71..88f2ec7c 100644 --- a/pkg/config-api-client/model_sensor.go +++ b/pkg/config-api-client/model_sensor.go @@ -3,7 +3,7 @@ Configuration Api Nice description goes here -API version: 2.1.0 +API version: 2.6.0 Contact: support@capenetworks.com */ diff --git a/pkg/config-api-client/model_sensor_group_assignment_response.go b/pkg/config-api-client/model_sensor_group_assignment_response.go index 40bfca9e..0dbbf46d 100644 --- a/pkg/config-api-client/model_sensor_group_assignment_response.go +++ b/pkg/config-api-client/model_sensor_group_assignment_response.go @@ -3,7 +3,7 @@ Configuration Api Nice description goes here -API version: 2.1.0 +API version: 2.6.0 Contact: support@capenetworks.com */ diff --git a/pkg/config-api-client/model_sensor_group_assignments_item.go b/pkg/config-api-client/model_sensor_group_assignments_item.go index cbfc7d6f..1a7f4731 100644 --- a/pkg/config-api-client/model_sensor_group_assignments_item.go +++ b/pkg/config-api-client/model_sensor_group_assignments_item.go @@ -3,7 +3,7 @@ Configuration Api Nice description goes here -API version: 2.1.0 +API version: 2.6.0 Contact: support@capenetworks.com */ diff --git a/pkg/config-api-client/model_sensor_group_assignments_post_request.go b/pkg/config-api-client/model_sensor_group_assignments_post_request.go index 2929d955..2f0caa7c 100644 --- a/pkg/config-api-client/model_sensor_group_assignments_post_request.go +++ b/pkg/config-api-client/model_sensor_group_assignments_post_request.go @@ -3,7 +3,7 @@ Configuration Api Nice description goes here -API version: 2.1.0 +API version: 2.6.0 Contact: support@capenetworks.com */ diff --git a/pkg/config-api-client/model_sensor_group_assignments_response.go b/pkg/config-api-client/model_sensor_group_assignments_response.go index 87c80bad..0365cecf 100644 --- a/pkg/config-api-client/model_sensor_group_assignments_response.go +++ b/pkg/config-api-client/model_sensor_group_assignments_response.go @@ -3,7 +3,7 @@ Configuration Api Nice description goes here -API version: 2.1.0 +API version: 2.6.0 Contact: support@capenetworks.com */ diff --git a/pkg/config-api-client/model_sensor_item.go b/pkg/config-api-client/model_sensor_item.go new file mode 100644 index 00000000..c6bdf486 --- /dev/null +++ b/pkg/config-api-client/model_sensor_item.go @@ -0,0 +1,493 @@ +/* +Configuration Api + +Nice description goes here + +API version: 2.6.0 +Contact: support@capenetworks.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package config_api_client + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the SensorItem type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SensorItem{} + +// SensorItem struct for SensorItem +type SensorItem struct { + Id string `json:"id"` + Serial string `json:"serial"` + Name string `json:"name"` + ModelNumber NullableString `json:"modelNumber"` + WifiMacAddress NullableString `json:"wifiMacAddress"` + EthernetMacAddress NullableString `json:"ethernetMacAddress"` + AddressNote NullableString `json:"addressNote"` + Longitude NullableFloat32 `json:"longitude"` + Latitude NullableFloat32 `json:"latitude"` + Notes NullableString `json:"notes"` + PcapMode NullableString `json:"pcapMode"` + Type *string `json:"type,omitempty"` +} + +type _SensorItem SensorItem + +// NewSensorItem instantiates a new SensorItem object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSensorItem(id string, serial string, name string, modelNumber NullableString, wifiMacAddress NullableString, ethernetMacAddress NullableString, addressNote NullableString, longitude NullableFloat32, latitude NullableFloat32, notes NullableString, pcapMode NullableString) *SensorItem { + this := SensorItem{} + this.Id = id + this.Serial = serial + this.Name = name + this.ModelNumber = modelNumber + this.WifiMacAddress = wifiMacAddress + this.EthernetMacAddress = ethernetMacAddress + this.AddressNote = addressNote + this.Longitude = longitude + this.Latitude = latitude + this.Notes = notes + this.PcapMode = pcapMode + var type_ string = "uxi/sensor" + this.Type = &type_ + return &this +} + +// NewSensorItemWithDefaults instantiates a new SensorItem object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSensorItemWithDefaults() *SensorItem { + this := SensorItem{} + var type_ string = "uxi/sensor" + this.Type = &type_ + return &this +} + +// GetId returns the Id field value +func (o *SensorItem) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *SensorItem) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *SensorItem) SetId(v string) { + o.Id = v +} + +// GetSerial returns the Serial field value +func (o *SensorItem) GetSerial() string { + if o == nil { + var ret string + return ret + } + + return o.Serial +} + +// GetSerialOk returns a tuple with the Serial field value +// and a boolean to check if the value has been set. +func (o *SensorItem) GetSerialOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Serial, true +} + +// SetSerial sets field value +func (o *SensorItem) SetSerial(v string) { + o.Serial = v +} + +// GetName returns the Name field value +func (o *SensorItem) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *SensorItem) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *SensorItem) SetName(v string) { + o.Name = v +} + +// GetModelNumber returns the ModelNumber field value +// If the value is explicit nil, the zero value for string will be returned +func (o *SensorItem) GetModelNumber() string { + if o == nil || o.ModelNumber.Get() == nil { + var ret string + return ret + } + + return *o.ModelNumber.Get() +} + +// GetModelNumberOk returns a tuple with the ModelNumber field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SensorItem) GetModelNumberOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ModelNumber.Get(), o.ModelNumber.IsSet() +} + +// SetModelNumber sets field value +func (o *SensorItem) SetModelNumber(v string) { + o.ModelNumber.Set(&v) +} + +// GetWifiMacAddress returns the WifiMacAddress field value +// If the value is explicit nil, the zero value for string will be returned +func (o *SensorItem) GetWifiMacAddress() string { + if o == nil || o.WifiMacAddress.Get() == nil { + var ret string + return ret + } + + return *o.WifiMacAddress.Get() +} + +// GetWifiMacAddressOk returns a tuple with the WifiMacAddress field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SensorItem) GetWifiMacAddressOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.WifiMacAddress.Get(), o.WifiMacAddress.IsSet() +} + +// SetWifiMacAddress sets field value +func (o *SensorItem) SetWifiMacAddress(v string) { + o.WifiMacAddress.Set(&v) +} + +// GetEthernetMacAddress returns the EthernetMacAddress field value +// If the value is explicit nil, the zero value for string will be returned +func (o *SensorItem) GetEthernetMacAddress() string { + if o == nil || o.EthernetMacAddress.Get() == nil { + var ret string + return ret + } + + return *o.EthernetMacAddress.Get() +} + +// GetEthernetMacAddressOk returns a tuple with the EthernetMacAddress field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SensorItem) GetEthernetMacAddressOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.EthernetMacAddress.Get(), o.EthernetMacAddress.IsSet() +} + +// SetEthernetMacAddress sets field value +func (o *SensorItem) SetEthernetMacAddress(v string) { + o.EthernetMacAddress.Set(&v) +} + +// GetAddressNote returns the AddressNote field value +// If the value is explicit nil, the zero value for string will be returned +func (o *SensorItem) GetAddressNote() string { + if o == nil || o.AddressNote.Get() == nil { + var ret string + return ret + } + + return *o.AddressNote.Get() +} + +// GetAddressNoteOk returns a tuple with the AddressNote field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SensorItem) GetAddressNoteOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.AddressNote.Get(), o.AddressNote.IsSet() +} + +// SetAddressNote sets field value +func (o *SensorItem) SetAddressNote(v string) { + o.AddressNote.Set(&v) +} + +// GetLongitude returns the Longitude field value +// If the value is explicit nil, the zero value for float32 will be returned +func (o *SensorItem) GetLongitude() float32 { + if o == nil || o.Longitude.Get() == nil { + var ret float32 + return ret + } + + return *o.Longitude.Get() +} + +// GetLongitudeOk returns a tuple with the Longitude field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SensorItem) GetLongitudeOk() (*float32, bool) { + if o == nil { + return nil, false + } + return o.Longitude.Get(), o.Longitude.IsSet() +} + +// SetLongitude sets field value +func (o *SensorItem) SetLongitude(v float32) { + o.Longitude.Set(&v) +} + +// GetLatitude returns the Latitude field value +// If the value is explicit nil, the zero value for float32 will be returned +func (o *SensorItem) GetLatitude() float32 { + if o == nil || o.Latitude.Get() == nil { + var ret float32 + return ret + } + + return *o.Latitude.Get() +} + +// GetLatitudeOk returns a tuple with the Latitude field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SensorItem) GetLatitudeOk() (*float32, bool) { + if o == nil { + return nil, false + } + return o.Latitude.Get(), o.Latitude.IsSet() +} + +// SetLatitude sets field value +func (o *SensorItem) SetLatitude(v float32) { + o.Latitude.Set(&v) +} + +// GetNotes returns the Notes field value +// If the value is explicit nil, the zero value for string will be returned +func (o *SensorItem) GetNotes() string { + if o == nil || o.Notes.Get() == nil { + var ret string + return ret + } + + return *o.Notes.Get() +} + +// GetNotesOk returns a tuple with the Notes field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SensorItem) GetNotesOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Notes.Get(), o.Notes.IsSet() +} + +// SetNotes sets field value +func (o *SensorItem) SetNotes(v string) { + o.Notes.Set(&v) +} + +// GetPcapMode returns the PcapMode field value +// If the value is explicit nil, the zero value for string will be returned +func (o *SensorItem) GetPcapMode() string { + if o == nil || o.PcapMode.Get() == nil { + var ret string + return ret + } + + return *o.PcapMode.Get() +} + +// GetPcapModeOk returns a tuple with the PcapMode field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SensorItem) GetPcapModeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.PcapMode.Get(), o.PcapMode.IsSet() +} + +// SetPcapMode sets field value +func (o *SensorItem) SetPcapMode(v string) { + o.PcapMode.Set(&v) +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *SensorItem) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SensorItem) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *SensorItem) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *SensorItem) SetType(v string) { + o.Type = &v +} + +func (o SensorItem) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SensorItem) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["serial"] = o.Serial + toSerialize["name"] = o.Name + toSerialize["modelNumber"] = o.ModelNumber.Get() + toSerialize["wifiMacAddress"] = o.WifiMacAddress.Get() + toSerialize["ethernetMacAddress"] = o.EthernetMacAddress.Get() + toSerialize["addressNote"] = o.AddressNote.Get() + toSerialize["longitude"] = o.Longitude.Get() + toSerialize["latitude"] = o.Latitude.Get() + toSerialize["notes"] = o.Notes.Get() + toSerialize["pcapMode"] = o.PcapMode.Get() + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + return toSerialize, nil +} + +func (o *SensorItem) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "serial", + "name", + "modelNumber", + "wifiMacAddress", + "ethernetMacAddress", + "addressNote", + "longitude", + "latitude", + "notes", + "pcapMode", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSensorItem := _SensorItem{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varSensorItem) + + if err != nil { + return err + } + + *o = SensorItem(varSensorItem) + + return err +} + +type NullableSensorItem struct { + value *SensorItem + isSet bool +} + +func (v NullableSensorItem) Get() *SensorItem { + return v.value +} + +func (v *NullableSensorItem) Set(val *SensorItem) { + v.value = val + v.isSet = true +} + +func (v NullableSensorItem) IsSet() bool { + return v.isSet +} + +func (v *NullableSensorItem) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSensorItem(val *SensorItem) *NullableSensorItem { + return &NullableSensorItem{value: val, isSet: true} +} + +func (v NullableSensorItem) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSensorItem) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/config-api-client/model_sensors_response.go b/pkg/config-api-client/model_sensors_response.go new file mode 100644 index 00000000..e3fde4b3 --- /dev/null +++ b/pkg/config-api-client/model_sensors_response.go @@ -0,0 +1,215 @@ +/* +Configuration Api + +Nice description goes here + +API version: 2.6.0 +Contact: support@capenetworks.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package config_api_client + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the SensorsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SensorsResponse{} + +// SensorsResponse struct for SensorsResponse +type SensorsResponse struct { + Items []SensorItem `json:"items"` + Count int32 `json:"count"` + Next NullableString `json:"next"` +} + +type _SensorsResponse SensorsResponse + +// NewSensorsResponse instantiates a new SensorsResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSensorsResponse(items []SensorItem, count int32, next NullableString) *SensorsResponse { + this := SensorsResponse{} + this.Items = items + this.Count = count + this.Next = next + return &this +} + +// NewSensorsResponseWithDefaults instantiates a new SensorsResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSensorsResponseWithDefaults() *SensorsResponse { + this := SensorsResponse{} + return &this +} + +// GetItems returns the Items field value +func (o *SensorsResponse) GetItems() []SensorItem { + if o == nil { + var ret []SensorItem + return ret + } + + return o.Items +} + +// GetItemsOk returns a tuple with the Items field value +// and a boolean to check if the value has been set. +func (o *SensorsResponse) GetItemsOk() ([]SensorItem, bool) { + if o == nil { + return nil, false + } + return o.Items, true +} + +// SetItems sets field value +func (o *SensorsResponse) SetItems(v []SensorItem) { + o.Items = v +} + +// GetCount returns the Count field value +func (o *SensorsResponse) GetCount() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Count +} + +// GetCountOk returns a tuple with the Count field value +// and a boolean to check if the value has been set. +func (o *SensorsResponse) GetCountOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Count, true +} + +// SetCount sets field value +func (o *SensorsResponse) SetCount(v int32) { + o.Count = v +} + +// GetNext returns the Next field value +// If the value is explicit nil, the zero value for string will be returned +func (o *SensorsResponse) GetNext() string { + if o == nil || o.Next.Get() == nil { + var ret string + return ret + } + + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SensorsResponse) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// SetNext sets field value +func (o *SensorsResponse) SetNext(v string) { + o.Next.Set(&v) +} + +func (o SensorsResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SensorsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["items"] = o.Items + toSerialize["count"] = o.Count + toSerialize["next"] = o.Next.Get() + return toSerialize, nil +} + +func (o *SensorsResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "items", + "count", + "next", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSensorsResponse := _SensorsResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varSensorsResponse) + + if err != nil { + return err + } + + *o = SensorsResponse(varSensorsResponse) + + return err +} + +type NullableSensorsResponse struct { + value *SensorsResponse + isSet bool +} + +func (v NullableSensorsResponse) Get() *SensorsResponse { + return v.value +} + +func (v *NullableSensorsResponse) Set(val *SensorsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableSensorsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableSensorsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSensorsResponse(val *SensorsResponse) *NullableSensorsResponse { + return &NullableSensorsResponse{value: val, isSet: true} +} + +func (v NullableSensorsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSensorsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/config-api-client/model_service_test_.go b/pkg/config-api-client/model_service_test_.go index 723192a1..c034c17b 100644 --- a/pkg/config-api-client/model_service_test_.go +++ b/pkg/config-api-client/model_service_test_.go @@ -3,7 +3,7 @@ Configuration Api Nice description goes here -API version: 2.1.0 +API version: 2.6.0 Contact: support@capenetworks.com */ diff --git a/pkg/config-api-client/model_service_test_group_assignments_post_request.go b/pkg/config-api-client/model_service_test_group_assignments_post_request.go index 627f8dcd..55d91846 100644 --- a/pkg/config-api-client/model_service_test_group_assignments_post_request.go +++ b/pkg/config-api-client/model_service_test_group_assignments_post_request.go @@ -3,7 +3,7 @@ Configuration Api Nice description goes here -API version: 2.1.0 +API version: 2.6.0 Contact: support@capenetworks.com */ diff --git a/pkg/config-api-client/model_service_test_group_assignments_post_response.go b/pkg/config-api-client/model_service_test_group_assignments_post_response.go index 2c73ac9b..11fb7656 100644 --- a/pkg/config-api-client/model_service_test_group_assignments_post_response.go +++ b/pkg/config-api-client/model_service_test_group_assignments_post_response.go @@ -3,7 +3,7 @@ Configuration Api Nice description goes here -API version: 2.1.0 +API version: 2.6.0 Contact: support@capenetworks.com */ @@ -24,7 +24,7 @@ var _ MappedNullable = &ServiceTestGroupAssignmentsPostResponse{} type ServiceTestGroupAssignmentsPostResponse struct { Id string `json:"id"` Group Group `json:"group"` - ServiceTest ServiceTest `json:"service_test"` + ServiceTest ServiceTest `json:"serviceTest"` Type *string `json:"type,omitempty"` } @@ -170,7 +170,7 @@ func (o ServiceTestGroupAssignmentsPostResponse) ToMap() (map[string]interface{} toSerialize := map[string]interface{}{} toSerialize["id"] = o.Id toSerialize["group"] = o.Group - toSerialize["service_test"] = o.ServiceTest + toSerialize["serviceTest"] = o.ServiceTest if !IsNil(o.Type) { toSerialize["type"] = o.Type } @@ -184,7 +184,7 @@ func (o *ServiceTestGroupAssignmentsPostResponse) UnmarshalJSON(data []byte) (er requiredProperties := []string{ "id", "group", - "service_test", + "serviceTest", } allProperties := make(map[string]interface{}) diff --git a/pkg/config-api-client/model_wired_networks_item.go b/pkg/config-api-client/model_wired_networks_item.go index 020efd68..bb1a082b 100644 --- a/pkg/config-api-client/model_wired_networks_item.go +++ b/pkg/config-api-client/model_wired_networks_item.go @@ -3,7 +3,7 @@ Configuration Api Nice description goes here -API version: 2.1.0 +API version: 2.6.0 Contact: support@capenetworks.com */ diff --git a/pkg/config-api-client/model_wired_networks_response.go b/pkg/config-api-client/model_wired_networks_response.go index 1d9b72db..92efe703 100644 --- a/pkg/config-api-client/model_wired_networks_response.go +++ b/pkg/config-api-client/model_wired_networks_response.go @@ -3,7 +3,7 @@ Configuration Api Nice description goes here -API version: 2.1.0 +API version: 2.6.0 Contact: support@capenetworks.com */ diff --git a/pkg/config-api-client/model_wireless_networks_item.go b/pkg/config-api-client/model_wireless_networks_item.go index 331d4953..d2d72241 100644 --- a/pkg/config-api-client/model_wireless_networks_item.go +++ b/pkg/config-api-client/model_wireless_networks_item.go @@ -3,7 +3,7 @@ Configuration Api Nice description goes here -API version: 2.1.0 +API version: 2.6.0 Contact: support@capenetworks.com */ diff --git a/pkg/config-api-client/model_wireless_networks_response.go b/pkg/config-api-client/model_wireless_networks_response.go index 784ac6d4..f78f2c05 100644 --- a/pkg/config-api-client/model_wireless_networks_response.go +++ b/pkg/config-api-client/model_wireless_networks_response.go @@ -3,7 +3,7 @@ Configuration Api Nice description goes here -API version: 2.1.0 +API version: 2.6.0 Contact: support@capenetworks.com */ diff --git a/pkg/config-api-client/response.go b/pkg/config-api-client/response.go index ef072486..4b561457 100644 --- a/pkg/config-api-client/response.go +++ b/pkg/config-api-client/response.go @@ -3,7 +3,7 @@ Configuration Api Nice description goes here -API version: 2.1.0 +API version: 2.6.0 Contact: support@capenetworks.com */ diff --git a/pkg/config-api-client/test/api_configuration_test.go b/pkg/config-api-client/test/api_configuration_test.go index 745135d0..6fdd8478 100644 --- a/pkg/config-api-client/test/api_configuration_test.go +++ b/pkg/config-api-client/test/api_configuration_test.go @@ -24,7 +24,7 @@ func Test_config_api_client_ConfigurationAPIService(t *testing.T) { parent_uid := "parent_uid" gock.New(configuration.Scheme + "://" + configuration.Host). Get("/uxi/v1alpha1/groups"). - MatchParams(map[string]string{"uid": "uid", "limit": "10", "cursor": "some-cursor"}). + MatchParams(map[string]string{"id": "uid", "limit": "10", "cursor": "some-cursor"}). Reply(200). JSON(map[string]interface{}{ "items": []map[string]interface{}{ @@ -41,7 +41,7 @@ func Test_config_api_client_ConfigurationAPIService(t *testing.T) { }) resp, httpRes, err := apiClient.ConfigurationAPI. GroupsGetUxiV1alpha1GroupsGet(context.Background()). - Uid("uid"). + Id("uid"). Limit(10). Cursor("some-cursor"). Execute() @@ -129,7 +129,7 @@ func Test_config_api_client_ConfigurationAPIService(t *testing.T) { gock.New(configuration.Scheme + "://" + configuration.Host). Get("/uxi/v1alpha1/sensor-group-assignments"). - MatchParams(map[string]string{"uid": "uid", "limit": "10", "cursor": "some-cursor"}). + MatchParams(map[string]string{"id": "uid", "limit": "10", "cursor": "some-cursor"}). Reply(200). JSON(map[string]interface{}{ "items": []map[string]interface{}{ @@ -145,7 +145,7 @@ func Test_config_api_client_ConfigurationAPIService(t *testing.T) { }) resp, httpRes, err := apiClient.ConfigurationAPI. GetUxiV1alpha1SensorGroupAssignmentsGet(context.Background()). - Uid("uid"). + Id("uid"). Limit(10). Cursor("some-cursor"). Execute() @@ -215,7 +215,7 @@ func Test_config_api_client_ConfigurationAPIService(t *testing.T) { gock.New(configuration.Scheme + "://" + configuration.Host). Get("/uxi/v1alpha1/wired-networks"). - MatchParams(map[string]string{"uid": "uid", "limit": "10", "cursor": "some-cursor"}). + MatchParams(map[string]string{"id": "uid", "limit": "10", "cursor": "some-cursor"}). Reply(200). JSON(map[string]interface{}{ "items": []map[string]interface{}{ @@ -239,7 +239,7 @@ func Test_config_api_client_ConfigurationAPIService(t *testing.T) { }) resp, httpRes, err := apiClient.ConfigurationAPI. GetUxiV1alpha1WiredNetworksGet(context.Background()). - Uid("uid"). + Id("uid"). Limit(10). Cursor("some-cursor"). Execute() @@ -277,7 +277,7 @@ func Test_config_api_client_ConfigurationAPIService(t *testing.T) { gock.New(configuration.Scheme + "://" + configuration.Host). Get("/uxi/v1alpha1/wireless-networks"). - MatchParams(map[string]string{"uid": "uid", "limit": "10", "cursor": "some-cursor"}). + MatchParams(map[string]string{"id": "uid", "limit": "10", "cursor": "some-cursor"}). Reply(200). JSON(map[string]interface{}{ "items": []map[string]interface{}{ @@ -303,7 +303,7 @@ func Test_config_api_client_ConfigurationAPIService(t *testing.T) { }) resp, httpRes, err := apiClient.ConfigurationAPI. GetUxiV1alpha1WirelessNetworksGet(context.Background()). - Uid("uid"). + Id("uid"). Limit(10). Cursor("some-cursor"). Execute() @@ -342,7 +342,7 @@ func Test_config_api_client_ConfigurationAPIService(t *testing.T) { gock.New(configuration.Scheme + "://" + configuration.Host). Get("/uxi/v1alpha1/network-group-assignments"). - MatchParams(map[string]string{"uid": "uid", "limit": "10", "cursor": "some-cursor"}). + MatchParams(map[string]string{"id": "uid", "limit": "10", "cursor": "some-cursor"}). Reply(200). JSON(map[string]interface{}{ "items": []map[string]interface{}{ @@ -358,7 +358,7 @@ func Test_config_api_client_ConfigurationAPIService(t *testing.T) { }) resp, httpRes, err := apiClient.ConfigurationAPI. GetUxiV1alpha1NetworkGroupAssignmentsGet(context.Background()). - Uid("uid"). + Id("uid"). Limit(10). Cursor("some-cursor"). Execute() @@ -434,10 +434,10 @@ func Test_config_api_client_ConfigurationAPIService(t *testing.T) { BodyString(`{"groupId": "group_uid", "serviceTestId": "service_test_uid"}`). Reply(200). JSON(map[string]interface{}{ - "id": "uid", - "group": map[string]string{"id": "group_uid"}, - "service_test": map[string]string{"id": "service_test_uid"}, - "type": "uxi/service-test-group-assignment", + "id": "uid", + "group": map[string]string{"id": "group_uid"}, + "serviceTest": map[string]string{"id": "service_test_uid"}, + "type": "uxi/service-test-group-assignment", }) postRequest := openapiclient.NewServiceTestGroupAssignmentsPostRequest("group_uid", "service_test_uid") @@ -457,5 +457,4 @@ func Test_config_api_client_ConfigurationAPIService(t *testing.T) { Type: &resourceType, }) }) - } diff --git a/pkg/config-api-client/utils.go b/pkg/config-api-client/utils.go index a083ff60..af01e25d 100644 --- a/pkg/config-api-client/utils.go +++ b/pkg/config-api-client/utils.go @@ -3,7 +3,7 @@ Configuration Api Nice description goes here -API version: 2.1.0 +API version: 2.6.0 Contact: support@capenetworks.com */ diff --git a/pkg/config-api-provider/go.mod b/pkg/config-api-provider/go.mod index debc5d76..f12e74d1 100644 --- a/pkg/config-api-provider/go.mod +++ b/pkg/config-api-provider/go.mod @@ -7,7 +7,7 @@ toolchain go1.22.5 require ( github.com/aruba-uxi/configuration-api-terraform-provider/pkg/config-api-client v0.0.0-00010101000000-000000000000 github.com/h2non/gock v1.2.0 - github.com/hashicorp/terraform-plugin-framework v1.9.0 + github.com/hashicorp/terraform-plugin-framework v1.10.0 github.com/hashicorp/terraform-plugin-go v0.23.0 github.com/hashicorp/terraform-plugin-testing v1.10.0 github.com/nbio/st v0.0.0-20140626010706-e9e8d9816f32 diff --git a/pkg/config-api-provider/go.sum b/pkg/config-api-provider/go.sum index 095e2aeb..a81f86dd 100644 --- a/pkg/config-api-provider/go.sum +++ b/pkg/config-api-provider/go.sum @@ -78,8 +78,8 @@ github.com/hashicorp/terraform-exec v0.21.0 h1:uNkLAe95ey5Uux6KJdua6+cv8asgILFVW github.com/hashicorp/terraform-exec v0.21.0/go.mod h1:1PPeMYou+KDUSSeRE9szMZ/oHf4fYUmB923Wzbq1ICg= github.com/hashicorp/terraform-json v0.22.1 h1:xft84GZR0QzjPVWs4lRUwvTcPnegqlyS7orfb5Ltvec= github.com/hashicorp/terraform-json v0.22.1/go.mod h1:JbWSQCLFSXFFhg42T7l9iJwdGXBYV8fmmD6o/ML4p3A= -github.com/hashicorp/terraform-plugin-framework v1.9.0 h1:caLcDoxiRucNi2hk8+j3kJwkKfvHznubyFsJMWfZqKU= -github.com/hashicorp/terraform-plugin-framework v1.9.0/go.mod h1:qBXLDn69kM97NNVi/MQ9qgd1uWWsVftGSnygYG1tImM= +github.com/hashicorp/terraform-plugin-framework v1.10.0 h1:xXhICE2Fns1RYZxEQebwkB2+kXouLC932Li9qelozrc= +github.com/hashicorp/terraform-plugin-framework v1.10.0/go.mod h1:qBXLDn69kM97NNVi/MQ9qgd1uWWsVftGSnygYG1tImM= github.com/hashicorp/terraform-plugin-go v0.23.0 h1:AALVuU1gD1kPb48aPQUjug9Ir/125t+AAurhqphJ2Co= github.com/hashicorp/terraform-plugin-go v0.23.0/go.mod h1:1E3Cr9h2vMlahWMbsSEcNrOCxovCZhOOIXjFHbjc/lQ= github.com/hashicorp/terraform-plugin-log v0.9.0 h1:i7hOA+vdAItN1/7UrfBqBwvYPQ9TFvymaRGZED3FCV0= diff --git a/pkg/config-api-provider/provider/data-sources/group.go b/pkg/config-api-provider/provider/data-sources/group.go index 8f5f1934..931e4223 100644 --- a/pkg/config-api-provider/provider/data-sources/group.go +++ b/pkg/config-api-provider/provider/data-sources/group.go @@ -76,7 +76,7 @@ func (d *groupDataSource) Read(ctx context.Context, req datasource.ReadRequest, request := d.client.ConfigurationAPI. GroupsGetUxiV1alpha1GroupsGet(ctx). - Uid(*state.Filter.GroupID) + Id(*state.Filter.GroupID) groupResponse, response, err := util.RetryFor429(request.Execute) errorPresent, errorDetail := util.RaiseForStatus(response, err) diff --git a/pkg/config-api-provider/provider/data-sources/network_group_assignment.go b/pkg/config-api-provider/provider/data-sources/network_group_assignment.go index 6ed6022f..eb9d8483 100644 --- a/pkg/config-api-provider/provider/data-sources/network_group_assignment.go +++ b/pkg/config-api-provider/provider/data-sources/network_group_assignment.go @@ -71,7 +71,7 @@ func (d *networkGroupAssignmentDataSource) Read(ctx context.Context, req datasou request := d.client.ConfigurationAPI. GetUxiV1alpha1NetworkGroupAssignmentsGet(ctx). - Uid(state.Filter.NetworkGroupAssignmentID) + Id(state.Filter.NetworkGroupAssignmentID) networkGroupAssignmentResponse, response, err := util.RetryFor429(request.Execute) errorPresent, errorDetail := util.RaiseForStatus(response, err) diff --git a/pkg/config-api-provider/provider/data-sources/sensor_group_assignment.go b/pkg/config-api-provider/provider/data-sources/sensor_group_assignment.go index 09592464..acbd4c8e 100644 --- a/pkg/config-api-provider/provider/data-sources/sensor_group_assignment.go +++ b/pkg/config-api-provider/provider/data-sources/sensor_group_assignment.go @@ -73,7 +73,7 @@ func (d *sensorGroupAssignmentDataSource) Read(ctx context.Context, req datasour request := d.client.ConfigurationAPI. GetUxiV1alpha1SensorGroupAssignmentsGet(ctx). - Uid(state.Filter.SensorGroupAssignmentID) + Id(state.Filter.SensorGroupAssignmentID) sensorGroupAssignmentResponse, response, err := util.RetryFor429(request.Execute) errorPresent, errorDetail := util.RaiseForStatus(response, err) diff --git a/pkg/config-api-provider/provider/data-sources/wired_network.go b/pkg/config-api-provider/provider/data-sources/wired_network.go index f283cd27..dd6d9c2f 100644 --- a/pkg/config-api-provider/provider/data-sources/wired_network.go +++ b/pkg/config-api-provider/provider/data-sources/wired_network.go @@ -98,7 +98,7 @@ func (d *wiredNetworkDataSource) Read(ctx context.Context, req datasource.ReadRe request := d.client.ConfigurationAPI. GetUxiV1alpha1WiredNetworksGet(ctx). - Uid(state.Filter.WiredNetworkID) + Id(state.Filter.WiredNetworkID) networkResponse, response, err := util.RetryFor429(request.Execute) errorPresent, errorDetail := util.RaiseForStatus(response, err) diff --git a/pkg/config-api-provider/provider/data-sources/wireless_network.go b/pkg/config-api-provider/provider/data-sources/wireless_network.go index 61972da1..7ab8f0d6 100644 --- a/pkg/config-api-provider/provider/data-sources/wireless_network.go +++ b/pkg/config-api-provider/provider/data-sources/wireless_network.go @@ -106,7 +106,7 @@ func (d *wirelessNetworkDataSource) Read(ctx context.Context, req datasource.Rea request := d.client.ConfigurationAPI. GetUxiV1alpha1WirelessNetworksGet(ctx). - Uid(state.Filter.WirelessNetworkID) + Id(state.Filter.WirelessNetworkID) networkResponse, response, err := util.RetryFor429(request.Execute) errorPresent, errorDetail := util.RaiseForStatus(response, err) diff --git a/pkg/config-api-provider/provider/resources/group.go b/pkg/config-api-provider/provider/resources/group.go index 9c1e43a3..9f1634ac 100644 --- a/pkg/config-api-provider/provider/resources/group.go +++ b/pkg/config-api-provider/provider/resources/group.go @@ -127,7 +127,7 @@ func (r *groupResource) Read(ctx context.Context, req resource.ReadRequest, resp request := r.client.ConfigurationAPI. GroupsGetUxiV1alpha1GroupsGet(ctx). - Uid(state.ID.ValueString()) + Id(state.ID.ValueString()) groupResponse, response, err := util.RetryFor429(request.Execute) errorPresent, errorDetail := util.RaiseForStatus(response, err) diff --git a/pkg/config-api-provider/provider/resources/network_group_assignment.go b/pkg/config-api-provider/provider/resources/network_group_assignment.go index 1bf70038..7b4a3b44 100644 --- a/pkg/config-api-provider/provider/resources/network_group_assignment.go +++ b/pkg/config-api-provider/provider/resources/network_group_assignment.go @@ -128,7 +128,7 @@ func (r *networkGroupAssignmentResource) Read(ctx context.Context, req resource. request := r.client.ConfigurationAPI. GetUxiV1alpha1NetworkGroupAssignmentsGet(ctx). - Uid(state.ID.ValueString()) + Id(state.ID.ValueString()) networkGroupAssignmentResponse, response, err := util.RetryFor429(request.Execute) errorPresent, errorDetail := util.RaiseForStatus(response, err) diff --git a/pkg/config-api-provider/provider/resources/sensor_group_assignment.go b/pkg/config-api-provider/provider/resources/sensor_group_assignment.go index 047a1067..32ecd916 100644 --- a/pkg/config-api-provider/provider/resources/sensor_group_assignment.go +++ b/pkg/config-api-provider/provider/resources/sensor_group_assignment.go @@ -129,7 +129,7 @@ func (r *sensorGroupAssignmentResource) Read(ctx context.Context, req resource.R request := r.client.ConfigurationAPI. GetUxiV1alpha1SensorGroupAssignmentsGet(ctx). - Uid(state.ID.ValueString()) + Id(state.ID.ValueString()) sensorGroupAssignmentResponse, response, err := util.RetryFor429(request.Execute) errorPresent, errorDetail := util.RaiseForStatus(response, err) diff --git a/pkg/config-api-provider/provider/resources/wired_network.go b/pkg/config-api-provider/provider/resources/wired_network.go index b9eee1ec..882137af 100644 --- a/pkg/config-api-provider/provider/resources/wired_network.go +++ b/pkg/config-api-provider/provider/resources/wired_network.go @@ -91,7 +91,7 @@ func (r *wiredNetworkResource) Read(ctx context.Context, req resource.ReadReques request := r.client.ConfigurationAPI. GetUxiV1alpha1WiredNetworksGet(ctx). - Uid(state.ID.ValueString()) + Id(state.ID.ValueString()) networkResponse, response, err := util.RetryFor429(request.Execute) errorPresent, errorDetail := util.RaiseForStatus(response, err) diff --git a/pkg/config-api-provider/provider/resources/wireless_network.go b/pkg/config-api-provider/provider/resources/wireless_network.go index ad029364..eb0a6c0f 100644 --- a/pkg/config-api-provider/provider/resources/wireless_network.go +++ b/pkg/config-api-provider/provider/resources/wireless_network.go @@ -91,7 +91,7 @@ func (r *wirelessNetworkResource) Read(ctx context.Context, req resource.ReadReq request := r.client.ConfigurationAPI. GetUxiV1alpha1WirelessNetworksGet(ctx). - Uid(state.ID.ValueString()) + Id(state.ID.ValueString()) networkResponse, response, err := util.RetryFor429(request.Execute) errorPresent, errorDetail := util.RaiseForStatus(response, err) diff --git a/pkg/config-api-provider/test/util/utils.go b/pkg/config-api-provider/test/util/utils.go index 112d0d83..e95e40f5 100644 --- a/pkg/config-api-provider/test/util/utils.go +++ b/pkg/config-api-provider/test/util/utils.go @@ -178,7 +178,7 @@ func MockGetGroup(uid string, response map[string]interface{}, times int) { gock.New("https://test.api.capenetworks.com"). Get("/uxi/v1alpha1/groups"). MatchHeader("Authorization", "mock_token"). - MatchParam("uid", uid). + MatchParam("id", uid). Times(times). Reply(200). JSON(response) @@ -197,7 +197,7 @@ func MockGetWiredNetwork(uid string, response map[string]interface{}, times int) gock.New("https://test.api.capenetworks.com"). Get("/uxi/v1alpha1/wired-networks"). MatchHeader("Authorization", "mock_token"). - MatchParam("uid", uid). + MatchParam("id", uid). Times(times). Reply(200). JSON(response) @@ -207,7 +207,7 @@ func MockGetWirelessNetwork(uid string, response map[string]interface{}, times i gock.New("https://test.api.capenetworks.com"). Get("/uxi/v1alpha1/wireless-networks"). MatchHeader("Authorization", "mock_token"). - MatchParam("uid", uid). + MatchParam("id", uid). Times(times). Reply(200). JSON(response) @@ -217,7 +217,7 @@ func MockGetSensorGroupAssignment(uid string, response map[string]interface{}, t gock.New("https://test.api.capenetworks.com"). Get("/uxi/v1alpha1/sensor-group-assignments"). MatchHeader("Authorization", "mock_token"). - MatchParam("uid", uid). + MatchParam("id", uid). Times(times). Reply(200). JSON(response) @@ -245,7 +245,7 @@ func MockGetNetworkGroupAssignment(uid string, response map[string]interface{}, gock.New("https://test.api.capenetworks.com"). Get("/uxi/v1alpha1/network-group-assignments"). MatchHeader("Authorization", "mock_token"). - MatchParam("uid", uid). + MatchParam("id", uid). Times(times). Reply(200). JSON(response)