PieceActivity constructor

PieceActivity({
  1. String? pieceId,
  2. int? parcelId,
  3. String? shipmentId,
  4. int? compartmentId,
  5. int? shipmentType,
  6. String? token,
  7. int? signature,
  8. int? expiryTime,
  9. Iterable<Auth>? auth,
  10. String? carrierName,
  11. int? width,
  12. int? height,
  13. int? depth,
  14. int? wheelchairAccessible,
  15. Iterable<PieceEvents>? pieceEvents,
  16. String? instruction,
})

Implementation

factory PieceActivity({
  $core.String? pieceId,
  $core.int? parcelId,
  $core.String? shipmentId,
  $core.int? compartmentId,
  $core.int? shipmentType,
  $core.String? token,
  $core.int? signature,
  $core.int? expiryTime,
  $core.Iterable<Auth>? auth,
  $core.String? carrierName,
  $core.String? carrierLogo,
  $core.int? width,
  $core.int? height,
  $core.int? depth,
  $core.int? wheelchairAccessible,
  $core.Iterable<PieceEvents>? pieceEvents,
  $core.String? instruction,
}) {
  final result = create();
  if (pieceId != null) result.pieceId = pieceId;
  if (parcelId != null) result.parcelId = parcelId;
  if (shipmentId != null) result.shipmentId = shipmentId;
  if (compartmentId != null) result.compartmentId = compartmentId;
  if (shipmentType != null) result.shipmentType = shipmentType;
  if (token != null) result.token = token;
  if (signature != null) result.signature = signature;
  if (expiryTime != null) result.expiryTime = expiryTime;
  if (auth != null) result.auth.addAll(auth);
  if (carrierName != null) result.carrierName = carrierName;
  if (carrierLogo != null) result.carrierLogo = carrierLogo;
  if (width != null) result.width = width;
  if (height != null) result.height = height;
  if (depth != null) result.depth = depth;
  if (wheelchairAccessible != null)
    result.wheelchairAccessible = wheelchairAccessible;
  if (pieceEvents != null) result.pieceEvents.addAll(pieceEvents);
  if (instruction != null) result.instruction = instruction;
  return result;
}