createRobotApplication method

Future<CreateRobotApplicationResponse> createRobotApplication({
  1. required String name,
  2. required RobotSoftwareSuite robotSoftwareSuite,
  3. required List<SourceConfig> sources,
  4. Map<String, String>? tags,
})

Creates a robot application.

May throw InvalidParameterException. May throw ResourceAlreadyExistsException. May throw LimitExceededException. May throw ThrottlingException. May throw InternalServerException. May throw IdempotentParameterMismatchException.

Parameter name : The name of the robot application.

Parameter robotSoftwareSuite : The robot software suite (ROS distribuition) used by the robot application.

Parameter sources : The sources of the robot application.

Parameter tags : A map that contains tag keys and tag values that are attached to the robot application.

Implementation

Future<CreateRobotApplicationResponse> createRobotApplication({
  required String name,
  required RobotSoftwareSuite robotSoftwareSuite,
  required List<SourceConfig> sources,
  Map<String, String>? tags,
}) async {
  ArgumentError.checkNotNull(name, 'name');
  _s.validateStringLength(
    'name',
    name,
    1,
    255,
    isRequired: true,
  );
  ArgumentError.checkNotNull(robotSoftwareSuite, 'robotSoftwareSuite');
  ArgumentError.checkNotNull(sources, 'sources');
  final $payload = <String, dynamic>{
    'name': name,
    'robotSoftwareSuite': robotSoftwareSuite,
    'sources': sources,
    if (tags != null) 'tags': tags,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/createRobotApplication',
    exceptionFnMap: _exceptionFns,
  );
  return CreateRobotApplicationResponse.fromJson(response);
}