mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2024-11-18 06:39:14 +00:00
48 lines
1.1 KiB
Dart
48 lines
1.1 KiB
Dart
import 'package:hive/hive.dart';
|
|
|
|
part 'backblaze_bucket.g.dart';
|
|
|
|
@HiveType(typeId: 6)
|
|
class BackblazeBucket {
|
|
BackblazeBucket({
|
|
required this.bucketId,
|
|
required this.bucketName,
|
|
required this.applicationKeyId,
|
|
required this.applicationKey,
|
|
required this.encryptionKey,
|
|
});
|
|
|
|
@HiveField(0)
|
|
final String bucketId;
|
|
|
|
@HiveField(1)
|
|
final String applicationKeyId;
|
|
|
|
@HiveField(2)
|
|
final String applicationKey;
|
|
|
|
@HiveField(3)
|
|
final String bucketName;
|
|
|
|
@HiveField(4)
|
|
final String encryptionKey;
|
|
|
|
@override
|
|
String toString() => bucketName;
|
|
|
|
BackblazeBucket copyWith({
|
|
final String? bucketId,
|
|
final String? applicationKeyId,
|
|
final String? applicationKey,
|
|
final String? bucketName,
|
|
final String? encryptionKey,
|
|
}) =>
|
|
BackblazeBucket(
|
|
bucketId: bucketId ?? this.bucketId,
|
|
applicationKeyId: applicationKeyId ?? this.applicationKeyId,
|
|
applicationKey: applicationKey ?? this.applicationKey,
|
|
bucketName: bucketName ?? this.bucketName,
|
|
encryptionKey: encryptionKey ?? this.encryptionKey,
|
|
);
|
|
}
|