putRepositoryTriggers method

Future<PutRepositoryTriggersOutput> putRepositoryTriggers({
  1. required String repositoryName,
  2. required List<RepositoryTrigger> triggers,
})

Implementation

Future<PutRepositoryTriggersOutput> putRepositoryTriggers({
  required String repositoryName,
  required List<RepositoryTrigger> triggers,
}) async {
  ArgumentError.checkNotNull(repositoryName, 'repositoryName');
  _s.validateStringLength(
    'repositoryName',
    repositoryName,
    1,
    100,
    isRequired: true,
  );
  ArgumentError.checkNotNull(triggers, 'triggers');
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'CodeCommit_20150413.PutRepositoryTriggers'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'repositoryName': repositoryName,
      'triggers': triggers,
    },
  );

  return PutRepositoryTriggersOutput.fromJson(jsonResponse.body);
}