Commit 4263411b authored by M. Rehan Abbasi's avatar M. Rehan Abbasi
Browse files

add /geodata/cellularPower endpoint in GIS Engine Client

parent 2b7b09b7
Loading
Loading
Loading
Loading
+17 −13
Original line number Diff line number Diff line
@@ -19,32 +19,37 @@ import "./client"

All URIs are relative to *https://localhost/sandboxname/gis/v1*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*AutomationApi* | [**GetAutomationState**](docs/AutomationApi.md#getautomationstate) | **Get** /automation | Get automation state
*AutomationApi* | [**GetAutomationStateByName**](docs/AutomationApi.md#getautomationstatebyname) | **Get** /automation/{type} | Get automation state
*AutomationApi* | [**SetAutomationStateByName**](docs/AutomationApi.md#setautomationstatebyname) | **Post** /automation/{type} | Set automation state
*GeospatialDataApi* | [**DeleteGeoDataByName**](docs/GeospatialDataApi.md#deletegeodatabyname) | **Delete** /geodata/{assetName} | Delete geospatial data
*GeospatialDataApi* | [**GetAssetData**](docs/GeospatialDataApi.md#getassetdata) | **Get** /geodata | Get geospatial data
*GeospatialDataApi* | [**GetDistanceGeoDataByName**](docs/GeospatialDataApi.md#getdistancegeodatabyname) | **Post** /geodata/{assetName}/distanceTo | Get distance between geospatial data points
*GeospatialDataApi* | [**GetGeoDataByName**](docs/GeospatialDataApi.md#getgeodatabyname) | **Get** /geodata/{assetName} | Get geospatial data
*GeospatialDataApi* | [**GetWithinRangeByName**](docs/GeospatialDataApi.md#getwithinrangebyname) | **Post** /geodata/{assetName}/withinRange | Returns if a geospatial data points is within a specified distance from a location
*GeospatialDataApi* | [**UpdateGeoDataByName**](docs/GeospatialDataApi.md#updategeodatabyname) | **Post** /geodata/{assetName} | Create/Update geospatial data
| Class               | Method                                                                             | HTTP request                              | Description                                                                        |
| ------------------- | ---------------------------------------------------------------------------------- | ----------------------------------------- | ---------------------------------------------------------------------------------- |
| *AutomationApi*     | [**GetAutomationState**](docs/AutomationApi.md#getautomationstate)                 | **Get** /automation                       | Get automation state                                                               |
| *AutomationApi*     | [**GetAutomationStateByName**](docs/AutomationApi.md#getautomationstatebyname)     | **Get** /automation/{type}                | Get automation state                                                               |
| *AutomationApi*     | [**SetAutomationStateByName**](docs/AutomationApi.md#setautomationstatebyname)     | **Post** /automation/{type}               | Set automation state                                                               |
| *GeospatialDataApi* | [**DeleteGeoDataByName**](docs/GeospatialDataApi.md#deletegeodatabyname)           | **Delete** /geodata/{assetName}           | Delete geospatial data                                                             |
| *GeospatialDataApi* | [**GetAssetData**](docs/GeospatialDataApi.md#getassetdata)                         | **Get** /geodata                          | Get geospatial data                                                                |
| *GeospatialDataApi* | [**GetDistanceGeoDataByName**](docs/GeospatialDataApi.md#getdistancegeodatabyname) | **Post** /geodata/{assetName}/distanceTo  | Get distance between geospatial data points                                        |
| *GeospatialDataApi* | [**GetGeoDataByName**](docs/GeospatialDataApi.md#getgeodatabyname)                 | **Get** /geodata/{assetName}              | Get geospatial data                                                                |
| *GeospatialDataApi* | [**GetGeoDataPowerValues**](docs/GeospatialDataApi.md#getgeodatapowervalues)       | **Post** /geodata/cellularPower           | Get RSRQ and RSRP values for a list of coordinates                                 |
| *GeospatialDataApi* | [**GetWithinRangeByName**](docs/GeospatialDataApi.md#getwithinrangebyname)         | **Post** /geodata/{assetName}/withinRange | Returns if a geospatial data points is within a specified distance from a location |
| *GeospatialDataApi* | [**UpdateGeoDataByName**](docs/GeospatialDataApi.md#updategeodatabyname)           | **Post** /geodata/{assetName}             | Create/Update geospatial data                                                      |


## Documentation For Models

 - [AutomationState](docs/AutomationState.md)
 - [AutomationStateList](docs/AutomationStateList.md)
 - [CoordinatePower](docs/CoordinatePower.md)
 - [CoordinatePowerList](docs/CoordinatePowerList.md)
 - [Distance](docs/Distance.md)
 - [GeoCoordinate](docs/GeoCoordinate.md)
 - [GeoCoordinateList](docs/GeoCoordinateList.md)
 - [GeoData](docs/GeoData.md)
 - [GeoDataAsset](docs/GeoDataAsset.md)
 - [GeoDataAssetList](docs/GeoDataAssetList.md)
 - [LineString](docs/LineString.md)
 - [Point](docs/Point.md)
 - [TargetPoint](docs/TargetPoint.md)
 - [TargetRange](docs/TargetRange.md)
 - [WithinRange](docs/WithinRange.md)
 - [GeoDataAsset](docs/GeoDataAsset.md)


## Documentation For Authorization
@@ -54,4 +59,3 @@ Class | Method | HTTP request | Description
## Author

AdvantEDGE@InterDigital.com
+117 −22
Original line number Diff line number Diff line
@@ -32,7 +32,7 @@ paths:
      - "application/json"
      parameters: []
      responses:
        200:
        "200":
          description: "OK"
          schema:
            $ref: "#/definitions/AutomationStateList"
@@ -65,11 +65,11 @@ paths:
        - "NETWORK-CHARACTERISTICS-UPDATE"
        x-exportParamName: "Type_"
      responses:
        200:
        "200":
          description: "OK"
          schema:
            $ref: "#/definitions/AutomationState"
        500:
        "500":
          description: "Internal server error"
    post:
      tags:
@@ -105,9 +105,9 @@ paths:
        type: "boolean"
        x-exportParamName: "Run"
      responses:
        200:
        "200":
          description: "OK"
        500:
        "500":
          description: "Internal server error"
  /geodata:
    get:
@@ -157,11 +157,11 @@ paths:
        x-exportParamName: "ExcludePath"
        x-optionalDataType: "String"
      responses:
        200:
        "200":
          description: "OK"
          schema:
            $ref: "#/definitions/GeoDataAssetList"
        500:
        "500":
          description: "Internal server error"
  /geodata/{assetName}:
    get:
@@ -190,13 +190,13 @@ paths:
        x-exportParamName: "ExcludePath"
        x-optionalDataType: "String"
      responses:
        200:
        "200":
          description: "OK"
          schema:
            $ref: "#/definitions/GeoDataAsset"
        404:
        "404":
          description: "Not found"
        500:
        "500":
          description: "Internal server error"
    post:
      tags:
@@ -221,11 +221,11 @@ paths:
          $ref: "#/definitions/GeoDataAsset"
        x-exportParamName: "GeoData"
      responses:
        200:
        "200":
          description: "OK"
        201:
        "201":
          description: "Created"
        500:
        "500":
          description: "Internal server error"
    delete:
      tags:
@@ -243,11 +243,11 @@ paths:
        type: "string"
        x-exportParamName: "AssetName"
      responses:
        200:
        "200":
          description: "OK"
        404:
        "404":
          description: "Not found"
        500:
        "500":
          description: "Internal server error"
  /geodata/{assetName}/distanceTo:
    post:
@@ -274,13 +274,13 @@ paths:
          $ref: "#/definitions/TargetPoint"
        x-exportParamName: "TargetPoint"
      responses:
        200:
        "200":
          description: "OK"
          schema:
            $ref: "#/definitions/Distance"
        404:
        "404":
          description: "Not found"
        500:
        "500":
          description: "Internal server error"
  /geodata/{assetName}/withinRange:
    post:
@@ -308,13 +308,40 @@ paths:
          $ref: "#/definitions/TargetRange"
        x-exportParamName: "TargetRange"
      responses:
        200:
        "200":
          description: "OK"
          schema:
            $ref: "#/definitions/WithinRange"
        404:
        "404":
          description: "Not found"
        500:
        "500":
          description: "Internal server error"
  /geodata/cellularPower:
    post:
      tags:
      - "Geospatial Data"
      summary: "Get RSRQ and RSRP values for a list of coordinates"
      description: "Get geospatial data for the given asset and if it is within range\
        \ of another asset or geospatial coordinates"
      operationId: "getGeoDataPowerValues"
      produces:
      - "application/json"
      parameters:
      - in: "body"
        name: "coordinates"
        description: "List of geo coordinates"
        required: true
        schema:
          $ref: "#/definitions/GeoCoordinateList"
        x-exportParamName: "Coordinates"
      responses:
        "200":
          description: "OK"
          schema:
            $ref: "#/definitions/CoordinatePowerList"
        "404":
          description: "Not found"
        "500":
          description: "Internal server error"
definitions:
  AutomationStateList:
@@ -350,6 +377,74 @@ definitions:
    example:
      active: true
      type: "MOBILITY"
  CoordinatePowerList:
    type: "object"
    properties:
      CoordinatesPower:
        type: "array"
        items:
          $ref: "#/definitions/CoordinatePower"
    description: "List of geo coordinates with RSRQ/RSRP values"
    example: {}
  CoordinatePower:
    required:
    - "latitude"
    - "longitude"
    - "poaName"
    - "rsrp"
    - "rsrq"
    properties:
      latitude:
        type: "number"
        format: "float"
        description: "Latitude of a second element for query purpose."
      longitude:
        type: "number"
        format: "float"
        description: "Longitude of a second element for query purpose."
      rsrq:
        type: "integer"
        format: "uint8"
        description: "Reference Signal Received Quality as defined in ETSI TS 136\
          \ 214."
      rsrp:
        type: "integer"
        format: "uint8"
        description: "Reference Signal Received Power as defined in ETSI TS 136 214."
      poaName:
        type: "string"
        description: "Name of the POA for which RSRP/RSRQ values are calculated."
    description: "Coordinates with their power values."
    example:
      latitude: 0.8008282
      longitude: 6.0274563
      rsrq: -2
      rsrp: 40
      poaName: "5G-macro-cell-15"
  GeoCoordinateList:
    type: "object"
    properties:
      GeoCoordinates:
        type: "array"
        items:
          $ref: "#/definitions/GeoCoordinate"
    description: "List of geo-coordinates"
    example: {}
  GeoCoordinate:
    type: "object"
    properties:
      latitude:
        type: "number"
        format: "float"
        description: "Latitude of a second element for query purpose."
      longitude:
        type: "number"
        format: "float"
        description: "Longitude of a second element for query purpose."
    description: "Geo-coordinates for cellular power."
    example:
      latitude: 0.8008282
      longitude: 6.0274563
  TargetPoint:
    type: "object"
    properties:
+90 −0
Original line number Diff line number Diff line
@@ -409,6 +409,96 @@ func (a *GeospatialDataApiService) GetGeoDataByName(ctx context.Context, assetNa
	return localVarReturnValue, localVarHttpResponse, nil
}

/*
GeospatialDataApiService Get RSRQ and RSRP values for a list of coordinates
Get geospatial data for the given asset and if it is within range of another asset or geospatial coordinates
 * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
 * @param coordinates List of geo coordinates

@return CoordinatePowerList
*/
func (a *GeospatialDataApiService) GetGeoDataPowerValues(ctx context.Context, coordinates GeoCoordinateList) (CoordinatePowerList, *http.Response, error) {
	var (
		localVarHttpMethod  = strings.ToUpper("Post")
		localVarPostBody    interface{}
		localVarFileName    string
		localVarFileBytes   []byte
		localVarReturnValue CoordinatePowerList
	)

	// create path and map variables
	localVarPath := a.client.cfg.BasePath + "/geodata/cellularPower"

	localVarHeaderParams := make(map[string]string)
	localVarQueryParams := url.Values{}
	localVarFormParams := url.Values{}

	// to determine the Content-Type header
	localVarHttpContentTypes := []string{"application/json"}

	// set Content-Type header
	localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
	if localVarHttpContentType != "" {
		localVarHeaderParams["Content-Type"] = localVarHttpContentType
	}

	// to determine the Accept header
	localVarHttpHeaderAccepts := []string{"application/json"}

	// set Accept header
	localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
	if localVarHttpHeaderAccept != "" {
		localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
	}
	// body params
	localVarPostBody = &coordinates
	r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
	if err != nil {
		return localVarReturnValue, nil, err
	}

	localVarHttpResponse, err := a.client.callAPI(r)
	if err != nil || localVarHttpResponse == nil {
		return localVarReturnValue, localVarHttpResponse, err
	}

	localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
	localVarHttpResponse.Body.Close()
	if err != nil {
		return localVarReturnValue, localVarHttpResponse, err
	}

	if localVarHttpResponse.StatusCode < 300 {
		// If we succeed, return the data, otherwise pass on to decode error.
		err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
		if err == nil {
			return localVarReturnValue, localVarHttpResponse, err
		}
	}

	if localVarHttpResponse.StatusCode >= 300 {
		newErr := GenericSwaggerError{
			body:  localVarBody,
			error: localVarHttpResponse.Status,
		}

		if localVarHttpResponse.StatusCode == 200 {
			var v CoordinatePowerList
			err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
			if err != nil {
				newErr.error = err.Error()
				return localVarReturnValue, localVarHttpResponse, newErr
			}
			newErr.model = v
			return localVarReturnValue, localVarHttpResponse, newErr
		}

		return localVarReturnValue, localVarHttpResponse, newErr
	}

	return localVarReturnValue, localVarHttpResponse, nil
}

/*
GeospatialDataApiService Returns if a geospatial data points is within a specified distance from a location
Get geospatial data for the given asset and if it is within range of another asset or geospatial coordinates
+14 −0
Original line number Diff line number Diff line
# CoordinatePower

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Latitude** | **float32** | Latitude of a second element for query purpose. | [default to null]
**Longitude** | **float32** | Longitude of a second element for query purpose. | [default to null]
**Rsrq** | **int32** | Reference Signal Received Quality as defined in ETSI TS 136 214. | [default to null]
**Rsrp** | **int32** | Reference Signal Received Power as defined in ETSI TS 136 214. | [default to null]
**PoaName** | **string** | Name of the POA for which RSRP/RSRQ values are calculated. | [default to null]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

+10 −0
Original line number Diff line number Diff line
# CoordinatePowerList

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**CoordinatesPower** | [**[]CoordinatePower**](CoordinatePower.md) |  | [optional] [default to null]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

Loading