reserveContact method
Reserves a contact using specified parameters.
May throw InvalidParameterException. May throw DependencyException. May throw ResourceNotFoundException.
Parameter endTime
:
End time of a contact.
Parameter groundStation
:
Name of a ground station.
Parameter missionProfileArn
:
ARN of a mission profile.
Parameter satelliteArn
:
ARN of a satellite
Parameter startTime
:
Start time of a contact.
Parameter tags
:
Tags assigned to a contact.
Implementation
Future<ContactIdResponse> reserveContact({
required DateTime endTime,
required String groundStation,
required String missionProfileArn,
required String satelliteArn,
required DateTime startTime,
Map<String, String>? tags,
}) async {
ArgumentError.checkNotNull(endTime, 'endTime');
ArgumentError.checkNotNull(groundStation, 'groundStation');
ArgumentError.checkNotNull(missionProfileArn, 'missionProfileArn');
ArgumentError.checkNotNull(satelliteArn, 'satelliteArn');
ArgumentError.checkNotNull(startTime, 'startTime');
final $payload = <String, dynamic>{
'endTime': unixTimestampToJson(endTime),
'groundStation': groundStation,
'missionProfileArn': missionProfileArn,
'satelliteArn': satelliteArn,
'startTime': unixTimestampToJson(startTime),
if (tags != null) 'tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/contact',
exceptionFnMap: _exceptionFns,
);
return ContactIdResponse.fromJson(response);
}