batchPutGeofence method

Future<BatchPutGeofenceResponse> batchPutGeofence({
  1. required String collectionName,
  2. required List<BatchPutGeofenceRequestEntry> entries,
})

A batch request for storing geofence geometries into a given geofence collection, or updates the geometry of an existing geofence if a geofence ID is included in the request.

May throw AccessDeniedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter collectionName : The geofence collection storing the geofences.

Parameter entries : The batch of geofences to be stored in a geofence collection.

Implementation

Future<BatchPutGeofenceResponse> batchPutGeofence({
  required String collectionName,
  required List<BatchPutGeofenceRequestEntry> entries,
}) async {
  final $payload = <String, dynamic>{
    'Entries': entries,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri:
        '/geofencing/v0/collections/${Uri.encodeComponent(collectionName)}/put-geofences',
    hostPrefix: 'geofencing.',
    exceptionFnMap: _exceptionFns,
  );
  return BatchPutGeofenceResponse.fromJson(response);
}