Browse Source

specs,nextcloud: private user status inherit public user status

pull/344/head
jld3103 2 years ago
parent
commit
f885790bf4
No known key found for this signature in database
GPG Key ID: 9062417B9E8EB7B3
  1. 158
      packages/nextcloud/lib/src/nextcloud.openapi.dart
  2. 452
      packages/nextcloud/lib/src/nextcloud.openapi.g.dart
  3. 68
      packages/nextcloud/lib/src/nextcloud.openapi.json
  4. 96
      packages/nextcloud/test/user_status.dart
  5. 68
      specs/user_status.json

158
packages/nextcloud/lib/src/nextcloud.openapi.dart

@ -4664,85 +4664,74 @@ abstract class NextcloudUserStatusGetPublicStatus
_$nextcloudUserStatusGetPublicStatusSerializer; _$nextcloudUserStatusGetPublicStatusSerializer;
} }
abstract class NextcloudUserStatusStatus_ClearAt abstract class NextcloudUserStatusStatus1
implements Built<NextcloudUserStatusStatus_ClearAt, NextcloudUserStatusStatus_ClearAtBuilder> { implements Built<NextcloudUserStatusStatus1, NextcloudUserStatusStatus1Builder> {
factory NextcloudUserStatusStatus_ClearAt([final void Function(NextcloudUserStatusStatus_ClearAtBuilder)? b]) = factory NextcloudUserStatusStatus1([final void Function(NextcloudUserStatusStatus1Builder)? b]) =
_$NextcloudUserStatusStatus_ClearAt; _$NextcloudUserStatusStatus1;
const NextcloudUserStatusStatus_ClearAt._(); const NextcloudUserStatusStatus1._();
JsonObject get data; factory NextcloudUserStatusStatus1.fromJson(final Map<String, dynamic> json) =>
NextcloudUserStatusClearAt? get userStatusClearAt;
/// Time as unix timestamp
int? get $int;
static NextcloudUserStatusStatus_ClearAt fromJson(final Object json) =>
jsonSerializers.deserializeWith(serializer, json)!; jsonSerializers.deserializeWith(serializer, json)!;
Map<String, dynamic> toJson() => jsonSerializers.serializeWith(serializer, this)! as Map<String, dynamic>;
String? get messageId;
bool get messageIsPredefined;
bool get statusIsUserDefined;
static Serializer<NextcloudUserStatusStatus1> get serializer => _$nextcloudUserStatusStatus1Serializer;
}
abstract class NextcloudUserStatusStatus implements Built<NextcloudUserStatusStatus, NextcloudUserStatusStatusBuilder> {
factory NextcloudUserStatusStatus([final void Function(NextcloudUserStatusStatusBuilder)? b]) =
_$NextcloudUserStatusStatus;
const NextcloudUserStatusStatus._();
JsonObject get data;
NextcloudUserStatusPublicStatus get userStatusPublicStatus;
NextcloudUserStatusStatus1 get userStatusStatus1;
static NextcloudUserStatusStatus fromJson(final Object json) => jsonSerializers.deserializeWith(serializer, json)!;
Map<String, dynamic> toJson() => jsonSerializers.serializeWith(serializer, this)! as Map<String, dynamic>; Map<String, dynamic> toJson() => jsonSerializers.serializeWith(serializer, this)! as Map<String, dynamic>;
@BuiltValueSerializer(custom: true) @BuiltValueSerializer(custom: true)
static Serializer<NextcloudUserStatusStatus_ClearAt> get serializer => static Serializer<NextcloudUserStatusStatus> get serializer => _$NextcloudUserStatusStatusSerializer();
_$NextcloudUserStatusStatus_ClearAtSerializer();
} }
class _$NextcloudUserStatusStatus_ClearAtSerializer implements PrimitiveSerializer<NextcloudUserStatusStatus_ClearAt> { class _$NextcloudUserStatusStatusSerializer implements PrimitiveSerializer<NextcloudUserStatusStatus> {
@override @override
final Iterable<Type> types = const [NextcloudUserStatusStatus_ClearAt, _$NextcloudUserStatusStatus_ClearAt]; final Iterable<Type> types = const [NextcloudUserStatusStatus, _$NextcloudUserStatusStatus];
@override @override
final String wireName = 'NextcloudUserStatusStatus_ClearAt'; final String wireName = 'NextcloudUserStatusStatus';
@override @override
Object serialize( Object serialize(
final Serializers serializers, final Serializers serializers,
final NextcloudUserStatusStatus_ClearAt object, { final NextcloudUserStatusStatus object, {
final FullType specifiedType = FullType.unspecified, final FullType specifiedType = FullType.unspecified,
}) => }) =>
object.data.value; object.data.value;
@override @override
NextcloudUserStatusStatus_ClearAt deserialize( NextcloudUserStatusStatus deserialize(
final Serializers serializers, final Serializers serializers,
final Object data, { final Object data, {
final FullType specifiedType = FullType.unspecified, final FullType specifiedType = FullType.unspecified,
}) { }) {
final result = NextcloudUserStatusStatus_ClearAtBuilder()..data = JsonObject(data); final result = NextcloudUserStatusStatusBuilder()..data = JsonObject(data);
try { result.userStatusPublicStatus.replace(
result._userStatusClearAt = (jsonSerializers.deserialize( jsonSerializers.deserialize(
data, data,
specifiedType: const FullType(NextcloudUserStatusClearAt), specifiedType: const FullType(NextcloudUserStatusPublicStatus),
)! as NextcloudUserStatusClearAt) )! as NextcloudUserStatusPublicStatus,
.toBuilder(); );
} catch (_) {} result.userStatusStatus1.replace(
try { jsonSerializers.deserialize(
result._$int = data as int?; data,
} catch (_) {} specifiedType: const FullType(NextcloudUserStatusStatus1),
assert( )! as NextcloudUserStatusStatus1,
[result._userStatusClearAt, result._$int].where((final x) => x != null).isNotEmpty,
'Need oneOf for ${result._data}',
); );
return result.build(); return result.build();
} }
} }
abstract class NextcloudUserStatusStatus implements Built<NextcloudUserStatusStatus, NextcloudUserStatusStatusBuilder> {
factory NextcloudUserStatusStatus([final void Function(NextcloudUserStatusStatusBuilder)? b]) =
_$NextcloudUserStatusStatus;
const NextcloudUserStatusStatus._();
factory NextcloudUserStatusStatus.fromJson(final Map<String, dynamic> json) =>
jsonSerializers.deserializeWith(serializer, json)!;
Map<String, dynamic> toJson() => jsonSerializers.serializeWith(serializer, this)! as Map<String, dynamic>;
String get userId;
String? get message;
String? get messageId;
bool get messageIsPredefined;
String? get icon;
NextcloudUserStatusStatus_ClearAt? get clearAt;
NextcloudUserStatusType get status;
bool get statusIsUserDefined;
static Serializer<NextcloudUserStatusStatus> get serializer => _$nextcloudUserStatusStatusSerializer;
}
abstract class NextcloudUserStatusGetStatus_Ocs_Data abstract class NextcloudUserStatusGetStatus_Ocs_Data
implements Built<NextcloudUserStatusGetStatus_Ocs_Data, NextcloudUserStatusGetStatus_Ocs_DataBuilder> { implements Built<NextcloudUserStatusGetStatus_Ocs_Data, NextcloudUserStatusGetStatus_Ocs_DataBuilder> {
factory NextcloudUserStatusGetStatus_Ocs_Data([ factory NextcloudUserStatusGetStatus_Ocs_Data([
@ -4950,6 +4939,69 @@ abstract class NextcloudUserStatusPredefinedStatuses
_$nextcloudUserStatusPredefinedStatusesSerializer; _$nextcloudUserStatusPredefinedStatusesSerializer;
} }
abstract class NextcloudUserStatusHeartbeat_Ocs_Data
implements Built<NextcloudUserStatusHeartbeat_Ocs_Data, NextcloudUserStatusHeartbeat_Ocs_DataBuilder> {
factory NextcloudUserStatusHeartbeat_Ocs_Data([
final void Function(NextcloudUserStatusHeartbeat_Ocs_DataBuilder)? b,
]) = _$NextcloudUserStatusHeartbeat_Ocs_Data;
const NextcloudUserStatusHeartbeat_Ocs_Data._();
JsonObject get data;
BuiltList<JsonObject>? get builtListJsonObject;
NextcloudUserStatusStatus? get userStatusStatus;
static NextcloudUserStatusHeartbeat_Ocs_Data fromJson(final Object json) =>
jsonSerializers.deserializeWith(serializer, json)!;
Map<String, dynamic> toJson() => jsonSerializers.serializeWith(serializer, this)! as Map<String, dynamic>;
@BuiltValueSerializer(custom: true)
static Serializer<NextcloudUserStatusHeartbeat_Ocs_Data> get serializer =>
_$NextcloudUserStatusHeartbeat_Ocs_DataSerializer();
}
class _$NextcloudUserStatusHeartbeat_Ocs_DataSerializer
implements PrimitiveSerializer<NextcloudUserStatusHeartbeat_Ocs_Data> {
@override
final Iterable<Type> types = const [NextcloudUserStatusHeartbeat_Ocs_Data, _$NextcloudUserStatusHeartbeat_Ocs_Data];
@override
final String wireName = 'NextcloudUserStatusHeartbeat_Ocs_Data';
@override
Object serialize(
final Serializers serializers,
final NextcloudUserStatusHeartbeat_Ocs_Data object, {
final FullType specifiedType = FullType.unspecified,
}) =>
object.data.value;
@override
NextcloudUserStatusHeartbeat_Ocs_Data deserialize(
final Serializers serializers,
final Object data, {
final FullType specifiedType = FullType.unspecified,
}) {
final result = NextcloudUserStatusHeartbeat_Ocs_DataBuilder()..data = JsonObject(data);
try {
result._builtListJsonObject = (jsonSerializers.deserialize(
data,
specifiedType: const FullType(BuiltList, [FullType(JsonObject)]),
)! as BuiltList<JsonObject>)
.toBuilder();
} catch (_) {}
try {
result._userStatusStatus = (jsonSerializers.deserialize(
data,
specifiedType: const FullType(NextcloudUserStatusStatus),
)! as NextcloudUserStatusStatus)
.toBuilder();
} catch (_) {}
assert(
[result._builtListJsonObject, result._userStatusStatus].where((final x) => x != null).isNotEmpty,
'Need oneOf for ${result._data}',
);
return result.build();
}
}
abstract class NextcloudUserStatusHeartbeat_Ocs abstract class NextcloudUserStatusHeartbeat_Ocs
implements Built<NextcloudUserStatusHeartbeat_Ocs, NextcloudUserStatusHeartbeat_OcsBuilder> { implements Built<NextcloudUserStatusHeartbeat_Ocs, NextcloudUserStatusHeartbeat_OcsBuilder> {
factory NextcloudUserStatusHeartbeat_Ocs([final void Function(NextcloudUserStatusHeartbeat_OcsBuilder)? b]) = factory NextcloudUserStatusHeartbeat_Ocs([final void Function(NextcloudUserStatusHeartbeat_OcsBuilder)? b]) =
@ -4961,7 +5013,7 @@ abstract class NextcloudUserStatusHeartbeat_Ocs
Map<String, dynamic> toJson() => jsonSerializers.serializeWith(serializer, this)! as Map<String, dynamic>; Map<String, dynamic> toJson() => jsonSerializers.serializeWith(serializer, this)! as Map<String, dynamic>;
NextcloudOCSMeta get meta; NextcloudOCSMeta get meta;
NextcloudUserStatusStatus get data; NextcloudUserStatusHeartbeat_Ocs_Data get data;
static Serializer<NextcloudUserStatusHeartbeat_Ocs> get serializer => _$nextcloudUserStatusHeartbeatOcsSerializer; static Serializer<NextcloudUserStatusHeartbeat_Ocs> get serializer => _$nextcloudUserStatusHeartbeatOcsSerializer;
} }
@ -5112,7 +5164,7 @@ abstract class NextcloudNotificationsNotificationDecryptedSubject
NextcloudUserStatusGetPublicStatus_Ocs, NextcloudUserStatusGetPublicStatus_Ocs,
NextcloudUserStatusGetStatus, NextcloudUserStatusGetStatus,
NextcloudUserStatusGetStatus_Ocs, NextcloudUserStatusGetStatus_Ocs,
NextcloudUserStatusStatus, NextcloudUserStatusStatus1,
NextcloudUserStatusPredefinedStatuses, NextcloudUserStatusPredefinedStatuses,
NextcloudUserStatusPredefinedStatuses_Ocs, NextcloudUserStatusPredefinedStatuses_Ocs,
NextcloudUserStatusPredefinedStatus, NextcloudUserStatusPredefinedStatus,

452
packages/nextcloud/lib/src/nextcloud.openapi.g.dart

@ -225,6 +225,7 @@ Serializers _$serializers = (Serializers().toBuilder()
..add(NextcloudUserStatusGetStatus_Ocs_Data.serializer) ..add(NextcloudUserStatusGetStatus_Ocs_Data.serializer)
..add(NextcloudUserStatusHeartbeat.serializer) ..add(NextcloudUserStatusHeartbeat.serializer)
..add(NextcloudUserStatusHeartbeat_Ocs.serializer) ..add(NextcloudUserStatusHeartbeat_Ocs.serializer)
..add(NextcloudUserStatusHeartbeat_Ocs_Data.serializer)
..add(NextcloudUserStatusPredefinedStatus.serializer) ..add(NextcloudUserStatusPredefinedStatus.serializer)
..add(NextcloudUserStatusPredefinedStatus_ClearAt.serializer) ..add(NextcloudUserStatusPredefinedStatus_ClearAt.serializer)
..add(NextcloudUserStatusPredefinedStatuses.serializer) ..add(NextcloudUserStatusPredefinedStatuses.serializer)
@ -232,12 +233,13 @@ Serializers _$serializers = (Serializers().toBuilder()
..add(NextcloudUserStatusPublicStatus.serializer) ..add(NextcloudUserStatusPublicStatus.serializer)
..add(NextcloudUserStatusPublicStatus_ClearAt.serializer) ..add(NextcloudUserStatusPublicStatus_ClearAt.serializer)
..add(NextcloudUserStatusStatus.serializer) ..add(NextcloudUserStatusStatus.serializer)
..add(NextcloudUserStatusStatus_ClearAt.serializer) ..add(NextcloudUserStatusStatus1.serializer)
..add(NextcloudUserStatusType.serializer) ..add(NextcloudUserStatusType.serializer)
..addBuilderFactory(const FullType(BuiltList, [FullType(JsonObject)]), () => ListBuilder<JsonObject>()) ..addBuilderFactory(const FullType(BuiltList, [FullType(JsonObject)]), () => ListBuilder<JsonObject>())
..addBuilderFactory(const FullType(BuiltList, [FullType(JsonObject)]), () => ListBuilder<JsonObject>()) ..addBuilderFactory(const FullType(BuiltList, [FullType(JsonObject)]), () => ListBuilder<JsonObject>())
..addBuilderFactory(const FullType(BuiltList, [FullType(JsonObject)]), () => ListBuilder<JsonObject>()) ..addBuilderFactory(const FullType(BuiltList, [FullType(JsonObject)]), () => ListBuilder<JsonObject>())
..addBuilderFactory(const FullType(BuiltList, [FullType(JsonObject)]), () => ListBuilder<JsonObject>()) ..addBuilderFactory(const FullType(BuiltList, [FullType(JsonObject)]), () => ListBuilder<JsonObject>())
..addBuilderFactory(const FullType(BuiltList, [FullType(JsonObject)]), () => ListBuilder<JsonObject>())
..addBuilderFactory(const FullType(BuiltList, [FullType(NextcloudCoreAutocompleteResult_Ocs_Data)]), ..addBuilderFactory(const FullType(BuiltList, [FullType(NextcloudCoreAutocompleteResult_Ocs_Data)]),
() => ListBuilder<NextcloudCoreAutocompleteResult_Ocs_Data>()) () => ListBuilder<NextcloudCoreAutocompleteResult_Ocs_Data>())
..addBuilderFactory(const FullType(BuiltList, [FullType(NextcloudCoreNavigationApps_Ocs_Data)]), ..addBuilderFactory(const FullType(BuiltList, [FullType(NextcloudCoreNavigationApps_Ocs_Data)]),
@ -548,7 +550,8 @@ Serializer<NextcloudUserStatusGetPublicStatus_Ocs> _$nextcloudUserStatusGetPubli
_$NextcloudUserStatusGetPublicStatus_OcsSerializer(); _$NextcloudUserStatusGetPublicStatus_OcsSerializer();
Serializer<NextcloudUserStatusGetPublicStatus> _$nextcloudUserStatusGetPublicStatusSerializer = Serializer<NextcloudUserStatusGetPublicStatus> _$nextcloudUserStatusGetPublicStatusSerializer =
_$NextcloudUserStatusGetPublicStatusSerializer(); _$NextcloudUserStatusGetPublicStatusSerializer();
Serializer<NextcloudUserStatusStatus> _$nextcloudUserStatusStatusSerializer = _$NextcloudUserStatusStatusSerializer(); Serializer<NextcloudUserStatusStatus1> _$nextcloudUserStatusStatus1Serializer =
_$NextcloudUserStatusStatus1Serializer();
Serializer<NextcloudUserStatusGetStatus_Ocs> _$nextcloudUserStatusGetStatusOcsSerializer = Serializer<NextcloudUserStatusGetStatus_Ocs> _$nextcloudUserStatusGetStatusOcsSerializer =
_$NextcloudUserStatusGetStatus_OcsSerializer(); _$NextcloudUserStatusGetStatus_OcsSerializer();
Serializer<NextcloudUserStatusGetStatus> _$nextcloudUserStatusGetStatusSerializer = Serializer<NextcloudUserStatusGetStatus> _$nextcloudUserStatusGetStatusSerializer =
@ -7380,57 +7383,35 @@ class _$NextcloudUserStatusGetPublicStatusSerializer
} }
} }
class _$NextcloudUserStatusStatusSerializer implements StructuredSerializer<NextcloudUserStatusStatus> { class _$NextcloudUserStatusStatus1Serializer implements StructuredSerializer<NextcloudUserStatusStatus1> {
@override @override
final Iterable<Type> types = const [NextcloudUserStatusStatus, _$NextcloudUserStatusStatus]; final Iterable<Type> types = const [NextcloudUserStatusStatus1, _$NextcloudUserStatusStatus1];
@override @override
final String wireName = 'NextcloudUserStatusStatus'; final String wireName = 'NextcloudUserStatusStatus1';
@override @override
Iterable<Object?> serialize(Serializers serializers, NextcloudUserStatusStatus object, Iterable<Object?> serialize(Serializers serializers, NextcloudUserStatusStatus1 object,
{FullType specifiedType = FullType.unspecified}) { {FullType specifiedType = FullType.unspecified}) {
final result = <Object?>[ final result = <Object?>[
'userId',
serializers.serialize(object.userId, specifiedType: const FullType(String)),
'messageIsPredefined', 'messageIsPredefined',
serializers.serialize(object.messageIsPredefined, specifiedType: const FullType(bool)), serializers.serialize(object.messageIsPredefined, specifiedType: const FullType(bool)),
'status',
serializers.serialize(object.status, specifiedType: const FullType(NextcloudUserStatusType)),
'statusIsUserDefined', 'statusIsUserDefined',
serializers.serialize(object.statusIsUserDefined, specifiedType: const FullType(bool)), serializers.serialize(object.statusIsUserDefined, specifiedType: const FullType(bool)),
]; ];
Object? value; Object? value;
value = object.message;
if (value != null) {
result
..add('message')
..add(serializers.serialize(value, specifiedType: const FullType(String)));
}
value = object.messageId; value = object.messageId;
if (value != null) { if (value != null) {
result result
..add('messageId') ..add('messageId')
..add(serializers.serialize(value, specifiedType: const FullType(String))); ..add(serializers.serialize(value, specifiedType: const FullType(String)));
} }
value = object.icon;
if (value != null) {
result
..add('icon')
..add(serializers.serialize(value, specifiedType: const FullType(String)));
}
value = object.clearAt;
if (value != null) {
result
..add('clearAt')
..add(serializers.serialize(value, specifiedType: const FullType(NextcloudUserStatusStatus_ClearAt)));
}
return result; return result;
} }
@override @override
NextcloudUserStatusStatus deserialize(Serializers serializers, Iterable<Object?> serialized, NextcloudUserStatusStatus1 deserialize(Serializers serializers, Iterable<Object?> serialized,
{FullType specifiedType = FullType.unspecified}) { {FullType specifiedType = FullType.unspecified}) {
final result = NextcloudUserStatusStatusBuilder(); final result = NextcloudUserStatusStatus1Builder();
final iterator = serialized.iterator; final iterator = serialized.iterator;
while (iterator.moveNext()) { while (iterator.moveNext()) {
@ -7438,29 +7419,12 @@ class _$NextcloudUserStatusStatusSerializer implements StructuredSerializer<Next
iterator.moveNext(); iterator.moveNext();
final Object? value = iterator.current; final Object? value = iterator.current;
switch (key) { switch (key) {
case 'userId':
result.userId = serializers.deserialize(value, specifiedType: const FullType(String))! as String;
break;
case 'message':
result.message = serializers.deserialize(value, specifiedType: const FullType(String)) as String?;
break;
case 'messageId': case 'messageId':
result.messageId = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; result.messageId = serializers.deserialize(value, specifiedType: const FullType(String)) as String?;
break; break;
case 'messageIsPredefined': case 'messageIsPredefined':
result.messageIsPredefined = serializers.deserialize(value, specifiedType: const FullType(bool))! as bool; result.messageIsPredefined = serializers.deserialize(value, specifiedType: const FullType(bool))! as bool;
break; break;
case 'icon':
result.icon = serializers.deserialize(value, specifiedType: const FullType(String)) as String?;
break;
case 'clearAt':
result.clearAt.replace(serializers.deserialize(value,
specifiedType: const FullType(NextcloudUserStatusStatus_ClearAt))! as NextcloudUserStatusStatus_ClearAt);
break;
case 'status':
result.status = serializers.deserialize(value, specifiedType: const FullType(NextcloudUserStatusType))!
as NextcloudUserStatusType;
break;
case 'statusIsUserDefined': case 'statusIsUserDefined':
result.statusIsUserDefined = serializers.deserialize(value, specifiedType: const FullType(bool))! as bool; result.statusIsUserDefined = serializers.deserialize(value, specifiedType: const FullType(bool))! as bool;
break; break;
@ -7721,7 +7685,7 @@ class _$NextcloudUserStatusHeartbeat_OcsSerializer implements StructuredSerializ
'meta', 'meta',
serializers.serialize(object.meta, specifiedType: const FullType(NextcloudOCSMeta)), serializers.serialize(object.meta, specifiedType: const FullType(NextcloudOCSMeta)),
'data', 'data',
serializers.serialize(object.data, specifiedType: const FullType(NextcloudUserStatusStatus)), serializers.serialize(object.data, specifiedType: const FullType(NextcloudUserStatusHeartbeat_Ocs_Data)),
]; ];
return result; return result;
@ -7743,8 +7707,9 @@ class _$NextcloudUserStatusHeartbeat_OcsSerializer implements StructuredSerializ
serializers.deserialize(value, specifiedType: const FullType(NextcloudOCSMeta))! as NextcloudOCSMeta); serializers.deserialize(value, specifiedType: const FullType(NextcloudOCSMeta))! as NextcloudOCSMeta);
break; break;
case 'data': case 'data':
result.data.replace(serializers.deserialize(value, specifiedType: const FullType(NextcloudUserStatusStatus))! result.data.replace(
as NextcloudUserStatusStatus); serializers.deserialize(value, specifiedType: const FullType(NextcloudUserStatusHeartbeat_Ocs_Data))!
as NextcloudUserStatusHeartbeat_Ocs_Data);
break; break;
} }
} }
@ -21799,120 +21764,110 @@ class NextcloudUserStatusGetPublicStatusBuilder
} }
} }
class _$NextcloudUserStatusStatus_ClearAt extends NextcloudUserStatusStatus_ClearAt { class _$NextcloudUserStatusStatus1 extends NextcloudUserStatusStatus1 {
@override @override
final JsonObject data; final String? messageId;
@override @override
final NextcloudUserStatusClearAt? userStatusClearAt; final bool messageIsPredefined;
@override @override
final int? $int; final bool statusIsUserDefined;
factory _$NextcloudUserStatusStatus_ClearAt([void Function(NextcloudUserStatusStatus_ClearAtBuilder)? updates]) => factory _$NextcloudUserStatusStatus1([void Function(NextcloudUserStatusStatus1Builder)? updates]) =>
(NextcloudUserStatusStatus_ClearAtBuilder()..update(updates))._build(); (NextcloudUserStatusStatus1Builder()..update(updates))._build();
_$NextcloudUserStatusStatus_ClearAt._({required this.data, this.userStatusClearAt, this.$int}) : super._() { _$NextcloudUserStatusStatus1._({this.messageId, required this.messageIsPredefined, required this.statusIsUserDefined})
BuiltValueNullFieldError.checkNotNull(data, r'NextcloudUserStatusStatus_ClearAt', 'data'); : super._() {
BuiltValueNullFieldError.checkNotNull(messageIsPredefined, r'NextcloudUserStatusStatus1', 'messageIsPredefined');
BuiltValueNullFieldError.checkNotNull(statusIsUserDefined, r'NextcloudUserStatusStatus1', 'statusIsUserDefined');
} }
@override @override
NextcloudUserStatusStatus_ClearAt rebuild(void Function(NextcloudUserStatusStatus_ClearAtBuilder) updates) => NextcloudUserStatusStatus1 rebuild(void Function(NextcloudUserStatusStatus1Builder) updates) =>
(toBuilder()..update(updates)).build(); (toBuilder()..update(updates)).build();
@override @override
NextcloudUserStatusStatus_ClearAtBuilder toBuilder() => NextcloudUserStatusStatus_ClearAtBuilder()..replace(this); NextcloudUserStatusStatus1Builder toBuilder() => NextcloudUserStatusStatus1Builder()..replace(this);
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
if (identical(other, this)) return true; if (identical(other, this)) return true;
return other is NextcloudUserStatusStatus_ClearAt && return other is NextcloudUserStatusStatus1 &&
data == other.data && messageId == other.messageId &&
userStatusClearAt == other.userStatusClearAt && messageIsPredefined == other.messageIsPredefined &&
$int == other.$int; statusIsUserDefined == other.statusIsUserDefined;
} }
@override @override
int get hashCode { int get hashCode {
var _$hash = 0; var _$hash = 0;
_$hash = $jc(_$hash, data.hashCode); _$hash = $jc(_$hash, messageId.hashCode);
_$hash = $jc(_$hash, userStatusClearAt.hashCode); _$hash = $jc(_$hash, messageIsPredefined.hashCode);
_$hash = $jc(_$hash, $int.hashCode); _$hash = $jc(_$hash, statusIsUserDefined.hashCode);
_$hash = $jf(_$hash); _$hash = $jf(_$hash);
return _$hash; return _$hash;
} }
@override @override
String toString() { String toString() {
return (newBuiltValueToStringHelper(r'NextcloudUserStatusStatus_ClearAt') return (newBuiltValueToStringHelper(r'NextcloudUserStatusStatus1')
..add('data', data) ..add('messageId', messageId)
..add('userStatusClearAt', userStatusClearAt) ..add('messageIsPredefined', messageIsPredefined)
..add('\$int', $int)) ..add('statusIsUserDefined', statusIsUserDefined))
.toString(); .toString();
} }
} }
class NextcloudUserStatusStatus_ClearAtBuilder class NextcloudUserStatusStatus1Builder
implements Builder<NextcloudUserStatusStatus_ClearAt, NextcloudUserStatusStatus_ClearAtBuilder> { implements Builder<NextcloudUserStatusStatus1, NextcloudUserStatusStatus1Builder> {
_$NextcloudUserStatusStatus_ClearAt? _$v; _$NextcloudUserStatusStatus1? _$v;
JsonObject? _data; String? _messageId;
JsonObject? get data => _$this._data; String? get messageId => _$this._messageId;
set data(JsonObject? data) => _$this._data = data; set messageId(String? messageId) => _$this._messageId = messageId;
NextcloudUserStatusClearAtBuilder? _userStatusClearAt; bool? _messageIsPredefined;
NextcloudUserStatusClearAtBuilder get userStatusClearAt => bool? get messageIsPredefined => _$this._messageIsPredefined;
_$this._userStatusClearAt ??= NextcloudUserStatusClearAtBuilder(); set messageIsPredefined(bool? messageIsPredefined) => _$this._messageIsPredefined = messageIsPredefined;
set userStatusClearAt(NextcloudUserStatusClearAtBuilder? userStatusClearAt) =>
_$this._userStatusClearAt = userStatusClearAt;
int? _$int; bool? _statusIsUserDefined;
int? get $int => _$this._$int; bool? get statusIsUserDefined => _$this._statusIsUserDefined;
set $int(int? $int) => _$this._$int = $int; set statusIsUserDefined(bool? statusIsUserDefined) => _$this._statusIsUserDefined = statusIsUserDefined;
NextcloudUserStatusStatus_ClearAtBuilder(); NextcloudUserStatusStatus1Builder();
NextcloudUserStatusStatus_ClearAtBuilder get _$this { NextcloudUserStatusStatus1Builder get _$this {
final $v = _$v; final $v = _$v;
if ($v != null) { if ($v != null) {
_data = $v.data; _messageId = $v.messageId;
_userStatusClearAt = $v.userStatusClearAt?.toBuilder(); _messageIsPredefined = $v.messageIsPredefined;
_$int = $v.$int; _statusIsUserDefined = $v.statusIsUserDefined;
_$v = null; _$v = null;
} }
return this; return this;
} }
@override @override
void replace(NextcloudUserStatusStatus_ClearAt other) { void replace(NextcloudUserStatusStatus1 other) {
ArgumentError.checkNotNull(other, 'other'); ArgumentError.checkNotNull(other, 'other');
_$v = other as _$NextcloudUserStatusStatus_ClearAt; _$v = other as _$NextcloudUserStatusStatus1;
} }
@override @override
void update(void Function(NextcloudUserStatusStatus_ClearAtBuilder)? updates) { void update(void Function(NextcloudUserStatusStatus1Builder)? updates) {
if (updates != null) updates(this); if (updates != null) updates(this);
} }
@override @override
NextcloudUserStatusStatus_ClearAt build() => _build(); NextcloudUserStatusStatus1 build() => _build();
_$NextcloudUserStatusStatus_ClearAt _build() { _$NextcloudUserStatusStatus1 _build() {
_$NextcloudUserStatusStatus_ClearAt _$result; final _$result = _$v ??
try { _$NextcloudUserStatusStatus1._(
_$result = _$v ?? messageId: messageId,
_$NextcloudUserStatusStatus_ClearAt._( messageIsPredefined: BuiltValueNullFieldError.checkNotNull(
data: BuiltValueNullFieldError.checkNotNull(data, r'NextcloudUserStatusStatus_ClearAt', 'data'), messageIsPredefined, r'NextcloudUserStatusStatus1', 'messageIsPredefined'),
userStatusClearAt: _userStatusClearAt?.build(), statusIsUserDefined: BuiltValueNullFieldError.checkNotNull(
$int: $int); statusIsUserDefined, r'NextcloudUserStatusStatus1', 'statusIsUserDefined'));
} catch (_) {
late String _$failedField;
try {
_$failedField = 'userStatusClearAt';
_userStatusClearAt?.build();
} catch (e) {
throw BuiltValueNestedFieldError(r'NextcloudUserStatusStatus_ClearAt', _$failedField, e.toString());
}
rethrow;
}
replace(_$result); replace(_$result);
return _$result; return _$result;
} }
@ -21920,39 +21875,22 @@ class NextcloudUserStatusStatus_ClearAtBuilder
class _$NextcloudUserStatusStatus extends NextcloudUserStatusStatus { class _$NextcloudUserStatusStatus extends NextcloudUserStatusStatus {
@override @override
final String userId; final JsonObject data;
@override
final String? message;
@override
final String? messageId;
@override
final bool messageIsPredefined;
@override
final String? icon;
@override @override
final NextcloudUserStatusStatus_ClearAt? clearAt; final NextcloudUserStatusPublicStatus userStatusPublicStatus;
@override @override
final NextcloudUserStatusType status; final NextcloudUserStatusStatus1 userStatusStatus1;
@override
final bool statusIsUserDefined;
factory _$NextcloudUserStatusStatus([void Function(NextcloudUserStatusStatusBuilder)? updates]) => factory _$NextcloudUserStatusStatus([void Function(NextcloudUserStatusStatusBuilder)? updates]) =>
(NextcloudUserStatusStatusBuilder()..update(updates))._build(); (NextcloudUserStatusStatusBuilder()..update(updates))._build();
_$NextcloudUserStatusStatus._( _$NextcloudUserStatusStatus._(
{required this.userId, {required this.data, required this.userStatusPublicStatus, required this.userStatusStatus1})
this.message,
this.messageId,
required this.messageIsPredefined,
this.icon,
this.clearAt,
required this.status,
required this.statusIsUserDefined})
: super._() { : super._() {
BuiltValueNullFieldError.checkNotNull(userId, r'NextcloudUserStatusStatus', 'userId'); BuiltValueNullFieldError.checkNotNull(data, r'NextcloudUserStatusStatus', 'data');
BuiltValueNullFieldError.checkNotNull(messageIsPredefined, r'NextcloudUserStatusStatus', 'messageIsPredefined'); BuiltValueNullFieldError.checkNotNull(
BuiltValueNullFieldError.checkNotNull(status, r'NextcloudUserStatusStatus', 'status'); userStatusPublicStatus, r'NextcloudUserStatusStatus', 'userStatusPublicStatus');
BuiltValueNullFieldError.checkNotNull(statusIsUserDefined, r'NextcloudUserStatusStatus', 'statusIsUserDefined'); BuiltValueNullFieldError.checkNotNull(userStatusStatus1, r'NextcloudUserStatusStatus', 'userStatusStatus1');
} }
@override @override
@ -21966,27 +21904,17 @@ class _$NextcloudUserStatusStatus extends NextcloudUserStatusStatus {
bool operator ==(Object other) { bool operator ==(Object other) {
if (identical(other, this)) return true; if (identical(other, this)) return true;
return other is NextcloudUserStatusStatus && return other is NextcloudUserStatusStatus &&
userId == other.userId && data == other.data &&
message == other.message && userStatusPublicStatus == other.userStatusPublicStatus &&
messageId == other.messageId && userStatusStatus1 == other.userStatusStatus1;
messageIsPredefined == other.messageIsPredefined &&
icon == other.icon &&
clearAt == other.clearAt &&
status == other.status &&
statusIsUserDefined == other.statusIsUserDefined;
} }
@override @override
int get hashCode { int get hashCode {
var _$hash = 0; var _$hash = 0;
_$hash = $jc(_$hash, userId.hashCode); _$hash = $jc(_$hash, data.hashCode);
_$hash = $jc(_$hash, message.hashCode); _$hash = $jc(_$hash, userStatusPublicStatus.hashCode);
_$hash = $jc(_$hash, messageId.hashCode); _$hash = $jc(_$hash, userStatusStatus1.hashCode);
_$hash = $jc(_$hash, messageIsPredefined.hashCode);
_$hash = $jc(_$hash, icon.hashCode);
_$hash = $jc(_$hash, clearAt.hashCode);
_$hash = $jc(_$hash, status.hashCode);
_$hash = $jc(_$hash, statusIsUserDefined.hashCode);
_$hash = $jf(_$hash); _$hash = $jf(_$hash);
return _$hash; return _$hash;
} }
@ -21994,14 +21922,9 @@ class _$NextcloudUserStatusStatus extends NextcloudUserStatusStatus {
@override @override
String toString() { String toString() {
return (newBuiltValueToStringHelper(r'NextcloudUserStatusStatus') return (newBuiltValueToStringHelper(r'NextcloudUserStatusStatus')
..add('userId', userId) ..add('data', data)
..add('message', message) ..add('userStatusPublicStatus', userStatusPublicStatus)
..add('messageId', messageId) ..add('userStatusStatus1', userStatusStatus1))
..add('messageIsPredefined', messageIsPredefined)
..add('icon', icon)
..add('clearAt', clearAt)
..add('status', status)
..add('statusIsUserDefined', statusIsUserDefined))
.toString(); .toString();
} }
} }
@ -22009,52 +21932,30 @@ class _$NextcloudUserStatusStatus extends NextcloudUserStatusStatus {
class NextcloudUserStatusStatusBuilder implements Builder<NextcloudUserStatusStatus, NextcloudUserStatusStatusBuilder> { class NextcloudUserStatusStatusBuilder implements Builder<NextcloudUserStatusStatus, NextcloudUserStatusStatusBuilder> {
_$NextcloudUserStatusStatus? _$v; _$NextcloudUserStatusStatus? _$v;
String? _userId; JsonObject? _data;
String? get userId => _$this._userId; JsonObject? get data => _$this._data;
set userId(String? userId) => _$this._userId = userId; set data(JsonObject? data) => _$this._data = data;
String? _message;
String? get message => _$this._message;
set message(String? message) => _$this._message = message;
String? _messageId;
String? get messageId => _$this._messageId;
set messageId(String? messageId) => _$this._messageId = messageId;
bool? _messageIsPredefined;
bool? get messageIsPredefined => _$this._messageIsPredefined;
set messageIsPredefined(bool? messageIsPredefined) => _$this._messageIsPredefined = messageIsPredefined;
String? _icon;
String? get icon => _$this._icon;
set icon(String? icon) => _$this._icon = icon;
NextcloudUserStatusStatus_ClearAtBuilder? _clearAt;
NextcloudUserStatusStatus_ClearAtBuilder get clearAt =>
_$this._clearAt ??= NextcloudUserStatusStatus_ClearAtBuilder();
set clearAt(NextcloudUserStatusStatus_ClearAtBuilder? clearAt) => _$this._clearAt = clearAt;
NextcloudUserStatusType? _status; NextcloudUserStatusPublicStatusBuilder? _userStatusPublicStatus;
NextcloudUserStatusType? get status => _$this._status; NextcloudUserStatusPublicStatusBuilder get userStatusPublicStatus =>
set status(NextcloudUserStatusType? status) => _$this._status = status; _$this._userStatusPublicStatus ??= NextcloudUserStatusPublicStatusBuilder();
set userStatusPublicStatus(NextcloudUserStatusPublicStatusBuilder? userStatusPublicStatus) =>
_$this._userStatusPublicStatus = userStatusPublicStatus;
bool? _statusIsUserDefined; NextcloudUserStatusStatus1Builder? _userStatusStatus1;
bool? get statusIsUserDefined => _$this._statusIsUserDefined; NextcloudUserStatusStatus1Builder get userStatusStatus1 =>
set statusIsUserDefined(bool? statusIsUserDefined) => _$this._statusIsUserDefined = statusIsUserDefined; _$this._userStatusStatus1 ??= NextcloudUserStatusStatus1Builder();
set userStatusStatus1(NextcloudUserStatusStatus1Builder? userStatusStatus1) =>
_$this._userStatusStatus1 = userStatusStatus1;
NextcloudUserStatusStatusBuilder(); NextcloudUserStatusStatusBuilder();
NextcloudUserStatusStatusBuilder get _$this { NextcloudUserStatusStatusBuilder get _$this {
final $v = _$v; final $v = _$v;
if ($v != null) { if ($v != null) {
_userId = $v.userId; _data = $v.data;
_message = $v.message; _userStatusPublicStatus = $v.userStatusPublicStatus.toBuilder();
_messageId = $v.messageId; _userStatusStatus1 = $v.userStatusStatus1.toBuilder();
_messageIsPredefined = $v.messageIsPredefined;
_icon = $v.icon;
_clearAt = $v.clearAt?.toBuilder();
_status = $v.status;
_statusIsUserDefined = $v.statusIsUserDefined;
_$v = null; _$v = null;
} }
return this; return this;
@ -22079,21 +21980,16 @@ class NextcloudUserStatusStatusBuilder implements Builder<NextcloudUserStatusSta
try { try {
_$result = _$v ?? _$result = _$v ??
_$NextcloudUserStatusStatus._( _$NextcloudUserStatusStatus._(
userId: BuiltValueNullFieldError.checkNotNull(userId, r'NextcloudUserStatusStatus', 'userId'), data: BuiltValueNullFieldError.checkNotNull(data, r'NextcloudUserStatusStatus', 'data'),
message: message, userStatusPublicStatus: userStatusPublicStatus.build(),
messageId: messageId, userStatusStatus1: userStatusStatus1.build());
messageIsPredefined: BuiltValueNullFieldError.checkNotNull(
messageIsPredefined, r'NextcloudUserStatusStatus', 'messageIsPredefined'),
icon: icon,
clearAt: _clearAt?.build(),
status: BuiltValueNullFieldError.checkNotNull(status, r'NextcloudUserStatusStatus', 'status'),
statusIsUserDefined: BuiltValueNullFieldError.checkNotNull(
statusIsUserDefined, r'NextcloudUserStatusStatus', 'statusIsUserDefined'));
} catch (_) { } catch (_) {
late String _$failedField; late String _$failedField;
try { try {
_$failedField = 'clearAt'; _$failedField = 'userStatusPublicStatus';
_clearAt?.build(); userStatusPublicStatus.build();
_$failedField = 'userStatusStatus1';
userStatusStatus1.build();
} catch (e) { } catch (e) {
throw BuiltValueNestedFieldError(r'NextcloudUserStatusStatus', _$failedField, e.toString()); throw BuiltValueNestedFieldError(r'NextcloudUserStatusStatus', _$failedField, e.toString());
} }
@ -22881,11 +22777,136 @@ class NextcloudUserStatusPredefinedStatusesBuilder
} }
} }
class _$NextcloudUserStatusHeartbeat_Ocs_Data extends NextcloudUserStatusHeartbeat_Ocs_Data {
@override
final JsonObject data;
@override
final BuiltList<JsonObject>? builtListJsonObject;
@override
final NextcloudUserStatusStatus? userStatusStatus;
factory _$NextcloudUserStatusHeartbeat_Ocs_Data(
[void Function(NextcloudUserStatusHeartbeat_Ocs_DataBuilder)? updates]) =>
(NextcloudUserStatusHeartbeat_Ocs_DataBuilder()..update(updates))._build();
_$NextcloudUserStatusHeartbeat_Ocs_Data._({required this.data, this.builtListJsonObject, this.userStatusStatus})
: super._() {
BuiltValueNullFieldError.checkNotNull(data, r'NextcloudUserStatusHeartbeat_Ocs_Data', 'data');
}
@override
NextcloudUserStatusHeartbeat_Ocs_Data rebuild(void Function(NextcloudUserStatusHeartbeat_Ocs_DataBuilder) updates) =>
(toBuilder()..update(updates)).build();
@override
NextcloudUserStatusHeartbeat_Ocs_DataBuilder toBuilder() =>
NextcloudUserStatusHeartbeat_Ocs_DataBuilder()..replace(this);
@override
bool operator ==(Object other) {
if (identical(other, this)) return true;
return other is NextcloudUserStatusHeartbeat_Ocs_Data &&
data == other.data &&
builtListJsonObject == other.builtListJsonObject &&
userStatusStatus == other.userStatusStatus;
}
@override
int get hashCode {
var _$hash = 0;
_$hash = $jc(_$hash, data.hashCode);
_$hash = $jc(_$hash, builtListJsonObject.hashCode);
_$hash = $jc(_$hash, userStatusStatus.hashCode);
_$hash = $jf(_$hash);
return _$hash;
}
@override
String toString() {
return (newBuiltValueToStringHelper(r'NextcloudUserStatusHeartbeat_Ocs_Data')
..add('data', data)
..add('builtListJsonObject', builtListJsonObject)
..add('userStatusStatus', userStatusStatus))
.toString();
}
}
class NextcloudUserStatusHeartbeat_Ocs_DataBuilder
implements Builder<NextcloudUserStatusHeartbeat_Ocs_Data, NextcloudUserStatusHeartbeat_Ocs_DataBuilder> {
_$NextcloudUserStatusHeartbeat_Ocs_Data? _$v;
JsonObject? _data;
JsonObject? get data => _$this._data;
set data(JsonObject? data) => _$this._data = data;
ListBuilder<JsonObject>? _builtListJsonObject;
ListBuilder<JsonObject> get builtListJsonObject => _$this._builtListJsonObject ??= ListBuilder<JsonObject>();
set builtListJsonObject(ListBuilder<JsonObject>? builtListJsonObject) =>
_$this._builtListJsonObject = builtListJsonObject;
NextcloudUserStatusStatusBuilder? _userStatusStatus;
NextcloudUserStatusStatusBuilder get userStatusStatus =>
_$this._userStatusStatus ??= NextcloudUserStatusStatusBuilder();
set userStatusStatus(NextcloudUserStatusStatusBuilder? userStatusStatus) =>
_$this._userStatusStatus = userStatusStatus;
NextcloudUserStatusHeartbeat_Ocs_DataBuilder();
NextcloudUserStatusHeartbeat_Ocs_DataBuilder get _$this {
final $v = _$v;
if ($v != null) {
_data = $v.data;
_builtListJsonObject = $v.builtListJsonObject?.toBuilder();
_userStatusStatus = $v.userStatusStatus?.toBuilder();
_$v = null;
}
return this;
}
@override
void replace(NextcloudUserStatusHeartbeat_Ocs_Data other) {
ArgumentError.checkNotNull(other, 'other');
_$v = other as _$NextcloudUserStatusHeartbeat_Ocs_Data;
}
@override
void update(void Function(NextcloudUserStatusHeartbeat_Ocs_DataBuilder)? updates) {
if (updates != null) updates(this);
}
@override
NextcloudUserStatusHeartbeat_Ocs_Data build() => _build();
_$NextcloudUserStatusHeartbeat_Ocs_Data _build() {
_$NextcloudUserStatusHeartbeat_Ocs_Data _$result;
try {
_$result = _$v ??
_$NextcloudUserStatusHeartbeat_Ocs_Data._(
data: BuiltValueNullFieldError.checkNotNull(data, r'NextcloudUserStatusHeartbeat_Ocs_Data', 'data'),
builtListJsonObject: _builtListJsonObject?.build(),
userStatusStatus: _userStatusStatus?.build());
} catch (_) {
late String _$failedField;
try {
_$failedField = 'builtListJsonObject';
_builtListJsonObject?.build();
_$failedField = 'userStatusStatus';
_userStatusStatus?.build();
} catch (e) {
throw BuiltValueNestedFieldError(r'NextcloudUserStatusHeartbeat_Ocs_Data', _$failedField, e.toString());
}
rethrow;
}
replace(_$result);
return _$result;
}
}
class _$NextcloudUserStatusHeartbeat_Ocs extends NextcloudUserStatusHeartbeat_Ocs { class _$NextcloudUserStatusHeartbeat_Ocs extends NextcloudUserStatusHeartbeat_Ocs {
@override @override
final NextcloudOCSMeta meta; final NextcloudOCSMeta meta;
@override @override
final NextcloudUserStatusStatus data; final NextcloudUserStatusHeartbeat_Ocs_Data data;
factory _$NextcloudUserStatusHeartbeat_Ocs([void Function(NextcloudUserStatusHeartbeat_OcsBuilder)? updates]) => factory _$NextcloudUserStatusHeartbeat_Ocs([void Function(NextcloudUserStatusHeartbeat_OcsBuilder)? updates]) =>
(NextcloudUserStatusHeartbeat_OcsBuilder()..update(updates))._build(); (NextcloudUserStatusHeartbeat_OcsBuilder()..update(updates))._build();
@ -22934,9 +22955,10 @@ class NextcloudUserStatusHeartbeat_OcsBuilder
NextcloudOCSMetaBuilder get meta => _$this._meta ??= NextcloudOCSMetaBuilder(); NextcloudOCSMetaBuilder get meta => _$this._meta ??= NextcloudOCSMetaBuilder();
set meta(NextcloudOCSMetaBuilder? meta) => _$this._meta = meta; set meta(NextcloudOCSMetaBuilder? meta) => _$this._meta = meta;
NextcloudUserStatusStatusBuilder? _data; NextcloudUserStatusHeartbeat_Ocs_DataBuilder? _data;
NextcloudUserStatusStatusBuilder get data => _$this._data ??= NextcloudUserStatusStatusBuilder(); NextcloudUserStatusHeartbeat_Ocs_DataBuilder get data =>
set data(NextcloudUserStatusStatusBuilder? data) => _$this._data = data; _$this._data ??= NextcloudUserStatusHeartbeat_Ocs_DataBuilder();
set data(NextcloudUserStatusHeartbeat_Ocs_DataBuilder? data) => _$this._data = data;
NextcloudUserStatusHeartbeat_OcsBuilder(); NextcloudUserStatusHeartbeat_OcsBuilder();

68
packages/nextcloud/lib/src/nextcloud.openapi.json

@ -1894,47 +1894,29 @@
} }
}, },
"UserStatusStatus": { "UserStatusStatus": {
"type": "object", "allOf": [
"required": [ {
"userId", "$ref": "#/components/schemas/UserStatusPublicStatus"
"messageIsPredefined",
"status",
"statusIsUserDefined"
],
"properties": {
"userId": {
"type": "string"
},
"message": {
"type": "string"
},
"messageId": {
"type": "string"
},
"messageIsPredefined": {
"type": "boolean"
},
"icon": {
"type": "string"
}, },
"clearAt": { {
"oneOf": [ "type": "object",
{ "required": [
"$ref": "#/components/schemas/UserStatusClearAt" "messageIsPredefined",
"statusIsUserDefined"
],
"properties": {
"messageId": {
"type": "string"
}, },
{ "messageIsPredefined": {
"type": "integer", "type": "boolean"
"description": "Time as unix timestamp" },
"statusIsUserDefined": {
"type": "boolean"
} }
] }
},
"status": {
"$ref": "#/components/schemas/UserStatusType"
},
"statusIsUserDefined": {
"type": "boolean"
} }
} ]
}, },
"UserStatusPublicStatus": { "UserStatusPublicStatus": {
"type": "object", "type": "object",
@ -1985,7 +1967,17 @@
"$ref": "#/components/schemas/OCSMeta" "$ref": "#/components/schemas/OCSMeta"
}, },
"data": { "data": {
"$ref": "#/components/schemas/UserStatusStatus" "oneOf": [
{
"type": "array",
"items": {
"type": "object"
}
},
{
"$ref": "#/components/schemas/UserStatusStatus"
}
]
} }
} }
} }

96
packages/nextcloud/test/user_status.dart

@ -51,14 +51,14 @@ Future run(final DockerImage image) async {
test('Set status', () async { test('Set status', () async {
final response = await client.userStatus.setStatus(statusType: NextcloudUserStatusType.online); final response = await client.userStatus.setStatus(statusType: NextcloudUserStatusType.online);
expect(response.ocs.data.userStatusStatus!.userId, 'user1'); expect(response.ocs.data.userStatusStatus!.userStatusPublicStatus.userId, 'user1');
expect(response.ocs.data.userStatusStatus!.message, null); expect(response.ocs.data.userStatusStatus!.userStatusPublicStatus.message, null);
expect(response.ocs.data.userStatusStatus!.messageId, null); expect(response.ocs.data.userStatusStatus!.userStatusStatus1.messageId, null);
expect(response.ocs.data.userStatusStatus!.messageIsPredefined, false); expect(response.ocs.data.userStatusStatus!.userStatusStatus1.messageIsPredefined, false);
expect(response.ocs.data.userStatusStatus!.icon, null); expect(response.ocs.data.userStatusStatus!.userStatusPublicStatus.icon, null);
expect(response.ocs.data.userStatusStatus!.clearAt, null); expect(response.ocs.data.userStatusStatus!.userStatusPublicStatus.clearAt, null);
expect(response.ocs.data.userStatusStatus!.status, NextcloudUserStatusType.online); expect(response.ocs.data.userStatusStatus!.userStatusPublicStatus.status, NextcloudUserStatusType.online);
expect(response.ocs.data.userStatusStatus!.statusIsUserDefined, true); expect(response.ocs.data.userStatusStatus!.userStatusStatus1.statusIsUserDefined, true);
}); });
test('Get status', () async { test('Get status', () async {
@ -67,14 +67,14 @@ Future run(final DockerImage image) async {
await client.userStatus.setStatus(statusType: NextcloudUserStatusType.online); await client.userStatus.setStatus(statusType: NextcloudUserStatusType.online);
final response = await client.userStatus.getStatus(); final response = await client.userStatus.getStatus();
expect(response.ocs.data.userStatusStatus!.userId, 'user1'); expect(response.ocs.data.userStatusStatus!.userStatusPublicStatus.userId, 'user1');
expect(response.ocs.data.userStatusStatus!.message, null); expect(response.ocs.data.userStatusStatus!.userStatusPublicStatus.message, null);
expect(response.ocs.data.userStatusStatus!.messageId, null); expect(response.ocs.data.userStatusStatus!.userStatusStatus1.messageId, null);
expect(response.ocs.data.userStatusStatus!.messageIsPredefined, false); expect(response.ocs.data.userStatusStatus!.userStatusStatus1.messageIsPredefined, false);
expect(response.ocs.data.userStatusStatus!.icon, null); expect(response.ocs.data.userStatusStatus!.userStatusPublicStatus.icon, null);
expect(response.ocs.data.userStatusStatus!.clearAt, null); expect(response.ocs.data.userStatusStatus!.userStatusPublicStatus.clearAt, null);
expect(response.ocs.data.userStatusStatus!.status, NextcloudUserStatusType.online); expect(response.ocs.data.userStatusStatus!.userStatusPublicStatus.status, NextcloudUserStatusType.online);
expect(response.ocs.data.userStatusStatus!.statusIsUserDefined, true); expect(response.ocs.data.userStatusStatus!.userStatusStatus1.statusIsUserDefined, true);
}); });
test('Find all statuses', () async { test('Find all statuses', () async {
@ -110,14 +110,14 @@ Future run(final DockerImage image) async {
messageId: 'meeting', messageId: 'meeting',
clearAt: clearAt, clearAt: clearAt,
); );
expect(response.ocs.data.userStatusStatus!.userId, 'user1'); expect(response.ocs.data.userStatusStatus!.userStatusPublicStatus.userId, 'user1');
expect(response.ocs.data.userStatusStatus!.message, null); expect(response.ocs.data.userStatusStatus!.userStatusPublicStatus.message, null);
expect(response.ocs.data.userStatusStatus!.messageId, 'meeting'); expect(response.ocs.data.userStatusStatus!.userStatusStatus1.messageId, 'meeting');
expect(response.ocs.data.userStatusStatus!.messageIsPredefined, true); expect(response.ocs.data.userStatusStatus!.userStatusStatus1.messageIsPredefined, true);
expect(response.ocs.data.userStatusStatus!.icon, null); expect(response.ocs.data.userStatusStatus!.userStatusPublicStatus.icon, null);
expect(response.ocs.data.userStatusStatus!.clearAt!.$int, clearAt); expect(response.ocs.data.userStatusStatus!.userStatusPublicStatus.clearAt!.$int, clearAt);
expect(response.ocs.data.userStatusStatus!.status, NextcloudUserStatusType.offline); expect(response.ocs.data.userStatusStatus!.userStatusPublicStatus.status, NextcloudUserStatusType.offline);
expect(response.ocs.data.userStatusStatus!.statusIsUserDefined, false); expect(response.ocs.data.userStatusStatus!.userStatusStatus1.statusIsUserDefined, false);
}); });
test('Set custom message', () async { test('Set custom message', () async {
@ -127,14 +127,14 @@ Future run(final DockerImage image) async {
message: 'bla', message: 'bla',
clearAt: clearAt, clearAt: clearAt,
); );
expect(response.ocs.data.userStatusStatus!.userId, 'user1'); expect(response.ocs.data.userStatusStatus!.userStatusPublicStatus.userId, 'user1');
expect(response.ocs.data.userStatusStatus!.message, 'bla'); expect(response.ocs.data.userStatusStatus!.userStatusPublicStatus.message, 'bla');
expect(response.ocs.data.userStatusStatus!.messageId, null); expect(response.ocs.data.userStatusStatus!.userStatusStatus1.messageId, null);
expect(response.ocs.data.userStatusStatus!.messageIsPredefined, false); expect(response.ocs.data.userStatusStatus!.userStatusStatus1.messageIsPredefined, false);
expect(response.ocs.data.userStatusStatus!.icon, '😀'); expect(response.ocs.data.userStatusStatus!.userStatusPublicStatus.icon, '😀');
expect(response.ocs.data.userStatusStatus!.clearAt!.$int, clearAt); expect(response.ocs.data.userStatusStatus!.userStatusPublicStatus.clearAt!.$int, clearAt);
expect(response.ocs.data.userStatusStatus!.status, NextcloudUserStatusType.offline); expect(response.ocs.data.userStatusStatus!.userStatusPublicStatus.status, NextcloudUserStatusType.offline);
expect(response.ocs.data.userStatusStatus!.statusIsUserDefined, false); expect(response.ocs.data.userStatusStatus!.userStatusStatus1.statusIsUserDefined, false);
}); });
test('Clear message', () async { test('Clear message', () async {
@ -147,26 +147,26 @@ Future run(final DockerImage image) async {
await client.userStatus.clearMessage(); await client.userStatus.clearMessage();
final response = await client.userStatus.getStatus(); final response = await client.userStatus.getStatus();
expect(response.ocs.data.userStatusStatus!.userId, 'user1'); expect(response.ocs.data.userStatusStatus!.userStatusPublicStatus.userId, 'user1');
expect(response.ocs.data.userStatusStatus!.message, null); expect(response.ocs.data.userStatusStatus!.userStatusPublicStatus.message, null);
expect(response.ocs.data.userStatusStatus!.messageId, null); expect(response.ocs.data.userStatusStatus!.userStatusStatus1.messageId, null);
expect(response.ocs.data.userStatusStatus!.messageIsPredefined, false); expect(response.ocs.data.userStatusStatus!.userStatusStatus1.messageIsPredefined, false);
expect(response.ocs.data.userStatusStatus!.icon, null); expect(response.ocs.data.userStatusStatus!.userStatusPublicStatus.icon, null);
expect(response.ocs.data.userStatusStatus!.clearAt, null); expect(response.ocs.data.userStatusStatus!.userStatusPublicStatus.clearAt, null);
expect(response.ocs.data.userStatusStatus!.status, NextcloudUserStatusType.offline); expect(response.ocs.data.userStatusStatus!.userStatusPublicStatus.status, NextcloudUserStatusType.offline);
expect(response.ocs.data.userStatusStatus!.statusIsUserDefined, false); expect(response.ocs.data.userStatusStatus!.userStatusStatus1.statusIsUserDefined, false);
}); });
test('Heartbeat', () async { test('Heartbeat', () async {
final response = await client.userStatus.heartbeat(status: NextcloudUserStatusType.online); final response = await client.userStatus.heartbeat(status: NextcloudUserStatusType.online);
expect(response.ocs.data.userId, 'user1'); expect(response.ocs.data.userStatusStatus!.userStatusPublicStatus.userId, 'user1');
expect(response.ocs.data.message, null); expect(response.ocs.data.userStatusStatus!.userStatusPublicStatus.message, null);
expect(response.ocs.data.messageId, null); expect(response.ocs.data.userStatusStatus!.userStatusStatus1.messageId, null);
expect(response.ocs.data.messageIsPredefined, false); expect(response.ocs.data.userStatusStatus!.userStatusStatus1.messageIsPredefined, false);
expect(response.ocs.data.icon, null); expect(response.ocs.data.userStatusStatus!.userStatusPublicStatus.icon, null);
expect(response.ocs.data.clearAt, null); expect(response.ocs.data.userStatusStatus!.userStatusPublicStatus.clearAt, null);
expect(response.ocs.data.status, NextcloudUserStatusType.online); expect(response.ocs.data.userStatusStatus!.userStatusPublicStatus.status, NextcloudUserStatusType.online);
expect(response.ocs.data.statusIsUserDefined, false); expect(response.ocs.data.userStatusStatus!.userStatusStatus1.statusIsUserDefined, false);
}); });
}); });
} }

68
specs/user_status.json

@ -267,47 +267,29 @@
} }
}, },
"Status": { "Status": {
"type": "object", "allOf": [
"required": [ {
"userId", "$ref": "#/components/schemas/PublicStatus"
"messageIsPredefined",
"status",
"statusIsUserDefined"
],
"properties": {
"userId": {
"type": "string"
},
"message": {
"type": "string"
},
"messageId": {
"type": "string"
},
"messageIsPredefined": {
"type": "boolean"
},
"icon": {
"type": "string"
}, },
"clearAt": { {
"oneOf": [ "type": "object",
{ "required": [
"$ref": "#/components/schemas/ClearAt" "messageIsPredefined",
"statusIsUserDefined"
],
"properties": {
"messageId": {
"type": "string"
}, },
{ "messageIsPredefined": {
"type": "integer", "type": "boolean"
"description": "Time as unix timestamp" },
"statusIsUserDefined": {
"type": "boolean"
} }
] }
},
"status": {
"$ref": "#/components/schemas/Type"
},
"statusIsUserDefined": {
"type": "boolean"
} }
} ]
}, },
"PublicStatus": { "PublicStatus": {
"type": "object", "type": "object",
@ -358,7 +340,17 @@
"$ref": "#/components/schemas/OCSMeta" "$ref": "#/components/schemas/OCSMeta"
}, },
"data": { "data": {
"$ref": "#/components/schemas/Status" "oneOf": [
{
"type": "array",
"items": {
"type": "object"
}
},
{
"$ref": "#/components/schemas/Status"
}
]
} }
} }
} }

Loading…
Cancel
Save