SecretVersion.fromJson constructor

SecretVersion.fromJson(
  1. Object? j
)

Implementation

factory SecretVersion.fromJson(Object? j) {
  final json = j as Map<String, Object?>;
  return SecretVersion(
    name: switch (json['name']) {
      null => '',
      Object $1 => decodeString($1),
    },
    createTime: switch (json['createTime']) {
      null => null,
      Object $1 => Timestamp.fromJson($1),
    },
    destroyTime: switch (json['destroyTime']) {
      null => null,
      Object $1 => Timestamp.fromJson($1),
    },
    state: switch (json['state']) {
      null => SecretVersion_State.$default,
      Object $1 => SecretVersion_State.fromJson($1),
    },
    replicationStatus: switch (json['replicationStatus']) {
      null => null,
      Object $1 => ReplicationStatus.fromJson($1),
    },
    etag: switch (json['etag']) {
      null => '',
      Object $1 => decodeString($1),
    },
    clientSpecifiedPayloadChecksum:
        switch (json['clientSpecifiedPayloadChecksum']) {
          null => false,
          Object $1 => decodeBool($1),
        },
    scheduledDestroyTime: switch (json['scheduledDestroyTime']) {
      null => null,
      Object $1 => Timestamp.fromJson($1),
    },
    customerManagedEncryption: switch (json['customerManagedEncryption']) {
      null => null,
      Object $1 => CustomerManagedEncryptionStatus.fromJson($1),
    },
  );
}