updateGcmChannel method

Future<UpdateGcmChannelResponse> updateGcmChannel({
  1. required String applicationId,
  2. required GCMChannelRequest gCMChannelRequest,
})

Enables the GCM channel for an application or updates the status and settings of the GCM channel for an application.

May throw BadRequestException. May throw InternalServerErrorException. May throw PayloadTooLargeException. May throw ForbiddenException. May throw NotFoundException. May throw MethodNotAllowedException. May throw TooManyRequestsException.

Parameter applicationId : The unique identifier for the application. This identifier is displayed as the Project ID on the Amazon Pinpoint console.

Implementation

Future<UpdateGcmChannelResponse> updateGcmChannel({
  required String applicationId,
  required GCMChannelRequest gCMChannelRequest,
}) async {
  ArgumentError.checkNotNull(applicationId, 'applicationId');
  ArgumentError.checkNotNull(gCMChannelRequest, 'gCMChannelRequest');
  final response = await _protocol.sendRaw(
    payload: gCMChannelRequest,
    method: 'PUT',
    requestUri: '/v1/apps/${Uri.encodeComponent(applicationId)}/channels/gcm',
    exceptionFnMap: _exceptionFns,
  );
  final $json = await _s.jsonFromResponse(response);
  return UpdateGcmChannelResponse(
    gCMChannelResponse: GCMChannelResponse.fromJson($json),
  );
}