schedule method

Future<GoogleApiHttpBody> schedule(
  1. String parent, {
  2. String? requestId,
  3. String? scheduleTime,
  4. String? triggerId,
  5. String? $fields,
})

Schedules an integration for execution.

Request parameters:

parent - Required. The integration resource name. Value must have pattern ^projects/\[^/\]+/locations/\[^/\]+/integrations/\[^/\]+$.

requestId - Optional. This is used to de-dup incoming request: if the duplicate request was detected, the response from the previous execution is returned.

scheduleTime - Optional. The time that the integration should be executed. If the time is less or equal to the current time, the integration is executed immediately.

triggerId - Required. The API trigger id associated with the integration. An integration can have multiple trigger_id. This field is required to disambiguate which trigger should be invoked

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

Completes with a GoogleApiHttpBody.

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<GoogleApiHttpBody> schedule(
  core.String parent, {
  core.String? requestId,
  core.String? scheduleTime,
  core.String? triggerId,
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    'requestId': ?requestId == null ? null : [requestId],
    'scheduleTime': ?scheduleTime == null ? null : [scheduleTime],
    'triggerId': ?triggerId == null ? null : [triggerId],
    'fields': ?$fields == null ? null : [$fields],
  };

  final url_ = 'v2/' + core.Uri.encodeFull('$parent') + ':schedule';

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