deleteEntitiesWithConditions method

Future<Empty> deleteEntitiesWithConditions(
  1. String entityType, {
  2. String? conditions,
  3. String? $fields,
})

Deletes entities based on conditions specified in the request and not on entity id.

Request parameters:

entityType - Required. Resource name of the Entity Type. Format: projects/{project}/locations/{location}/connections/{connection}/entityTypes/{type} Value must have pattern ^projects/\[^/\]+/locations/\[^/\]+/connections/\[^/\]+/entityTypes/\[^/\]+$.

conditions - Required. Conditions to be used when deleting entities. From a proto standpoint, There are no restrictions on what can be passed using this field. The connector documentation should have information about what format of filters/conditions are supported. Note: If this conditions field is left empty, an exception is thrown. We don't want to consider 'empty conditions' to be a match-all case. Connector developers can determine and document what a match-all case constraint would be.

$fields - Selector specifying which fields to include in a partial response.

Completes with a Empty.

Completes with a commons.ApiRequestError if the API endpoint returned an error.

If the used http.Client completes with an error when making a REST call, this method will complete with the same error.

Implementation

async.Future<Empty> deleteEntitiesWithConditions(
  core.String entityType, {
  core.String? conditions,
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    if (conditions != null) 'conditions': [conditions],
    if ($fields != null) 'fields': [$fields],
  };

  final url_ = 'v2/' +
      core.Uri.encodeFull('$entityType') +
      '/entities:deleteEntitiesWithConditions';

  final response_ = await _requester.request(
    url_,
    'POST',
    queryParams: queryParams_,
  );
  return Empty.fromJson(response_ as core.Map<core.String, core.dynamic>);
}