toQueryParameters method

Map<String, List<String>> toQueryParameters()

Serializes to query parameters.

Implementation

Map<String, List<String>> toQueryParameters() {
  return <String, List<String>>{
    if (networks.isNotEmpty) 'network': networks,
    if (noHosts) 'noHosts': const <String>['true'],
    if (noTrunc) 'noTrunc': const <String>['true'],
    if (publishPorts.isNotEmpty) 'publishPorts': publishPorts,
    if (publishAllPorts) 'publishAllPorts': const <String>['true'],
    if (replace) 'replace': const <String>['true'],
    if (serviceContainer) 'serviceContainer': const <String>['true'],
    if (start != null) 'start': <String>['$start'],
    if (staticIps.isNotEmpty) 'staticIPs': staticIps,
    if (staticMacs.isNotEmpty) 'staticMACs': staticMacs,
    if (tlsVerify != null) 'tlsVerify': <String>['$tlsVerify'],
    if (userns != null && userns!.isNotEmpty) 'userns': <String>[userns!],
    if (wait) 'wait': const <String>['true'],
    if (build != null) 'build': <String>['$build'],
  };
}