CopyLogEntriesMetadata.fromJson constructor

CopyLogEntriesMetadata.fromJson(
  1. Object? j
)

Implementation

factory CopyLogEntriesMetadata.fromJson(Object? j) {
  final json = j as Map<String, Object?>;
  return CopyLogEntriesMetadata(
    startTime: switch (json['startTime']) {
      null => null,
      Object $1 => Timestamp.fromJson($1),
    },
    endTime: switch (json['endTime']) {
      null => null,
      Object $1 => Timestamp.fromJson($1),
    },
    state: switch (json['state']) {
      null => OperationState.$default,
      Object $1 => OperationState.fromJson($1),
    },
    cancellationRequested: switch (json['cancellationRequested']) {
      null => false,
      Object $1 => decodeBool($1),
    },
    request: switch (json['request']) {
      null => null,
      Object $1 => CopyLogEntriesRequest.fromJson($1),
    },
    progress: switch (json['progress']) {
      null => 0,
      Object $1 => decodeInt($1),
    },
    writerIdentity: switch (json['writerIdentity']) {
      null => '',
      Object $1 => decodeString($1),
    },
  );
}