CreateSnapshotDiskRequest.fromJson constructor

CreateSnapshotDiskRequest.fromJson(
  1. Object? j
)

Implementation

factory CreateSnapshotDiskRequest.fromJson(Object? j) {
  final json = j as Map<String, Object?>;
  return CreateSnapshotDiskRequest(
    disk: switch (json['disk']) {
      null => '',
      Object $1 => decodeString($1),
    },
    guestFlush: switch (json['guestFlush']) {
      null => null,
      Object $1 => decodeBool($1),
    },
    project: switch (json['project']) {
      null => '',
      Object $1 => decodeString($1),
    },
    requestId: switch (json['requestId']) {
      null => null,
      Object $1 => decodeString($1),
    },
    snapshotResource: switch (json['snapshotResource']) {
      null => null,
      Object $1 => Snapshot.fromJson($1),
    },
    zone: switch (json['zone']) {
      null => '',
      Object $1 => decodeString($1),
    },
  );
}