Skip to content

Commit

Permalink
Update Proto Files
Browse files Browse the repository at this point in the history
  • Loading branch information
jakobkoerber committed Jul 25, 2024
1 parent 309176b commit c28c0dd
Show file tree
Hide file tree
Showing 4 changed files with 349 additions and 0 deletions.
244 changes: 244 additions & 0 deletions lib/base/networking/apis/tumdev/campus_backend.pb.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4349,6 +4349,250 @@ class GetCanteenHeadCountReply extends $pb.GeneratedMessage {
$1.Timestamp ensureTimestamp() => $_ensure(3);
}

class ListStudentClubRequest extends $pb.GeneratedMessage {
factory ListStudentClubRequest() => create();
ListStudentClubRequest._() : super();
factory ListStudentClubRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
factory ListStudentClubRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);

static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ListStudentClubRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'api'), createEmptyInstance: create)
..hasRequiredFields = false
;

@$core.Deprecated(
'Using this can add significant overhead to your binary. '
'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
'Will be removed in next major version')
ListStudentClubRequest clone() => ListStudentClubRequest()..mergeFromMessage(this);
@$core.Deprecated(
'Using this can add significant overhead to your binary. '
'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
'Will be removed in next major version')
ListStudentClubRequest copyWith(void Function(ListStudentClubRequest) updates) => super.copyWith((message) => updates(message as ListStudentClubRequest)) as ListStudentClubRequest;

$pb.BuilderInfo get info_ => _i;

@$core.pragma('dart2js:noInline')
static ListStudentClubRequest create() => ListStudentClubRequest._();
ListStudentClubRequest createEmptyInstance() => create();
static $pb.PbList<ListStudentClubRequest> createRepeated() => $pb.PbList<ListStudentClubRequest>();
@$core.pragma('dart2js:noInline')
static ListStudentClubRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<ListStudentClubRequest>(create);
static ListStudentClubRequest? _defaultInstance;
}

class ListStudentClubReply extends $pb.GeneratedMessage {
factory ListStudentClubReply({
$core.Iterable<StudentClubCollection>? collections,
}) {
final $result = create();
if (collections != null) {
$result.collections.addAll(collections);
}
return $result;
}
ListStudentClubReply._() : super();
factory ListStudentClubReply.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
factory ListStudentClubReply.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);

static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ListStudentClubReply', package: const $pb.PackageName(_omitMessageNames ? '' : 'api'), createEmptyInstance: create)
..pc<StudentClubCollection>(1, _omitFieldNames ? '' : 'collections', $pb.PbFieldType.PM, subBuilder: StudentClubCollection.create)
..hasRequiredFields = false
;

@$core.Deprecated(
'Using this can add significant overhead to your binary. '
'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
'Will be removed in next major version')
ListStudentClubReply clone() => ListStudentClubReply()..mergeFromMessage(this);
@$core.Deprecated(
'Using this can add significant overhead to your binary. '
'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
'Will be removed in next major version')
ListStudentClubReply copyWith(void Function(ListStudentClubReply) updates) => super.copyWith((message) => updates(message as ListStudentClubReply)) as ListStudentClubReply;

$pb.BuilderInfo get info_ => _i;

@$core.pragma('dart2js:noInline')
static ListStudentClubReply create() => ListStudentClubReply._();
ListStudentClubReply createEmptyInstance() => create();
static $pb.PbList<ListStudentClubReply> createRepeated() => $pb.PbList<ListStudentClubReply>();
@$core.pragma('dart2js:noInline')
static ListStudentClubReply getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<ListStudentClubReply>(create);
static ListStudentClubReply? _defaultInstance;

@$pb.TagNumber(1)
$core.List<StudentClubCollection> get collections => $_getList(0);
}

class StudentClub extends $pb.GeneratedMessage {
factory StudentClub({
$core.String? name,
$core.String? description,
$core.String? linkUrl,
$core.String? coverUrl,
}) {
final $result = create();
if (name != null) {
$result.name = name;
}
if (description != null) {
$result.description = description;
}
if (linkUrl != null) {
$result.linkUrl = linkUrl;
}
if (coverUrl != null) {
$result.coverUrl = coverUrl;
}
return $result;
}
StudentClub._() : super();
factory StudentClub.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
factory StudentClub.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);

static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'StudentClub', package: const $pb.PackageName(_omitMessageNames ? '' : 'api'), createEmptyInstance: create)
..aOS(1, _omitFieldNames ? '' : 'name')
..aOS(2, _omitFieldNames ? '' : 'description')
..aOS(3, _omitFieldNames ? '' : 'linkUrl')
..aOS(4, _omitFieldNames ? '' : 'coverUrl')
..hasRequiredFields = false
;

@$core.Deprecated(
'Using this can add significant overhead to your binary. '
'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
'Will be removed in next major version')
StudentClub clone() => StudentClub()..mergeFromMessage(this);
@$core.Deprecated(
'Using this can add significant overhead to your binary. '
'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
'Will be removed in next major version')
StudentClub copyWith(void Function(StudentClub) updates) => super.copyWith((message) => updates(message as StudentClub)) as StudentClub;

$pb.BuilderInfo get info_ => _i;

@$core.pragma('dart2js:noInline')
static StudentClub create() => StudentClub._();
StudentClub createEmptyInstance() => create();
static $pb.PbList<StudentClub> createRepeated() => $pb.PbList<StudentClub>();
@$core.pragma('dart2js:noInline')
static StudentClub getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<StudentClub>(create);
static StudentClub? _defaultInstance;

/// The name of the club
@$pb.TagNumber(1)
$core.String get name => $_getSZ(0);
@$pb.TagNumber(1)
set name($core.String v) { $_setString(0, v); }
@$pb.TagNumber(1)
$core.bool hasName() => $_has(0);
@$pb.TagNumber(1)
void clearName() => clearField(1);

/// How the club describes itsself
@$pb.TagNumber(2)
$core.String get description => $_getSZ(1);
@$pb.TagNumber(2)
set description($core.String v) { $_setString(1, v); }
@$pb.TagNumber(2)
$core.bool hasDescription() => $_has(1);
@$pb.TagNumber(2)
void clearDescription() => clearField(2);

/// Where the clubs main internet presence is
@$pb.TagNumber(3)
$core.String get linkUrl => $_getSZ(2);
@$pb.TagNumber(3)
set linkUrl($core.String v) { $_setString(2, v); }
@$pb.TagNumber(3)
$core.bool hasLinkUrl() => $_has(2);
@$pb.TagNumber(3)
void clearLinkUrl() => clearField(3);

/// Where to find a image for this club
@$pb.TagNumber(4)
$core.String get coverUrl => $_getSZ(3);
@$pb.TagNumber(4)
set coverUrl($core.String v) { $_setString(3, v); }
@$pb.TagNumber(4)
$core.bool hasCoverUrl() => $_has(3);
@$pb.TagNumber(4)
void clearCoverUrl() => clearField(4);
}

class StudentClubCollection extends $pb.GeneratedMessage {
factory StudentClubCollection({
$core.String? title,
$core.String? description,
$core.Iterable<StudentClub>? clubs,
}) {
final $result = create();
if (title != null) {
$result.title = title;
}
if (description != null) {
$result.description = description;
}
if (clubs != null) {
$result.clubs.addAll(clubs);
}
return $result;
}
StudentClubCollection._() : super();
factory StudentClubCollection.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
factory StudentClubCollection.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);

static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'StudentClubCollection', package: const $pb.PackageName(_omitMessageNames ? '' : 'api'), createEmptyInstance: create)
..aOS(1, _omitFieldNames ? '' : 'title')
..aOS(2, _omitFieldNames ? '' : 'description')
..pc<StudentClub>(3, _omitFieldNames ? '' : 'clubs', $pb.PbFieldType.PM, subBuilder: StudentClub.create)
..hasRequiredFields = false
;

@$core.Deprecated(
'Using this can add significant overhead to your binary. '
'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
'Will be removed in next major version')
StudentClubCollection clone() => StudentClubCollection()..mergeFromMessage(this);
@$core.Deprecated(
'Using this can add significant overhead to your binary. '
'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
'Will be removed in next major version')
StudentClubCollection copyWith(void Function(StudentClubCollection) updates) => super.copyWith((message) => updates(message as StudentClubCollection)) as StudentClubCollection;

$pb.BuilderInfo get info_ => _i;

@$core.pragma('dart2js:noInline')
static StudentClubCollection create() => StudentClubCollection._();
StudentClubCollection createEmptyInstance() => create();
static $pb.PbList<StudentClubCollection> createRepeated() => $pb.PbList<StudentClubCollection>();
@$core.pragma('dart2js:noInline')
static StudentClubCollection getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<StudentClubCollection>(create);
static StudentClubCollection? _defaultInstance;

@$pb.TagNumber(1)
$core.String get title => $_getSZ(0);
@$pb.TagNumber(1)
set title($core.String v) { $_setString(0, v); }
@$pb.TagNumber(1)
$core.bool hasTitle() => $_has(0);
@$pb.TagNumber(1)
void clearTitle() => clearField(1);

@$pb.TagNumber(2)
$core.String get description => $_getSZ(1);
@$pb.TagNumber(2)
set description($core.String v) { $_setString(1, v); }
@$pb.TagNumber(2)
$core.bool hasDescription() => $_has(1);
@$pb.TagNumber(2)
void clearDescription() => clearField(2);

@$pb.TagNumber(3)
$core.List<StudentClub> get clubs => $_getList(2);
}


const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names');
const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names');
20 changes: 20 additions & 0 deletions lib/base/networking/apis/tumdev/campus_backend.pbgrpc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@ class CampusClient extends $grpc.Client {
'/api.Campus/DeleteDevice',
($0.DeleteDeviceRequest value) => value.writeToBuffer(),
($core.List<$core.int> value) => $0.DeleteDeviceReply.fromBuffer(value));
static final _$listStudentClub = $grpc.ClientMethod<$0.ListStudentClubRequest, $0.ListStudentClubReply>(
'/api.Campus/ListStudentClub',
($0.ListStudentClubRequest value) => value.writeToBuffer(),
($core.List<$core.int> value) => $0.ListStudentClubReply.fromBuffer(value));

CampusClient($grpc.ClientChannel channel,
{$grpc.CallOptions? options,
Expand Down Expand Up @@ -203,6 +207,10 @@ class CampusClient extends $grpc.Client {
$grpc.ResponseFuture<$0.DeleteDeviceReply> deleteDevice($0.DeleteDeviceRequest request, {$grpc.CallOptions? options}) {
return $createUnaryCall(_$deleteDevice, request, options: options);
}

$grpc.ResponseFuture<$0.ListStudentClubReply> listStudentClub($0.ListStudentClubRequest request, {$grpc.CallOptions? options}) {
return $createUnaryCall(_$listStudentClub, request, options: options);
}
}

@$pb.GrpcServiceName('api.Campus')
Expand Down Expand Up @@ -364,6 +372,13 @@ abstract class CampusServiceBase extends $grpc.Service {
false,
($core.List<$core.int> value) => $0.DeleteDeviceRequest.fromBuffer(value),
($0.DeleteDeviceReply value) => value.writeToBuffer()));
$addMethod($grpc.ServiceMethod<$0.ListStudentClubRequest, $0.ListStudentClubReply>(
'ListStudentClub',
listStudentClub_Pre,
false,
false,
($core.List<$core.int> value) => $0.ListStudentClubRequest.fromBuffer(value),
($0.ListStudentClubReply value) => value.writeToBuffer()));
}

$async.Future<$0.ListNewsAlertsReply> listNewsAlerts_Pre($grpc.ServiceCall call, $async.Future<$0.ListNewsAlertsRequest> request) async {
Expand Down Expand Up @@ -450,6 +465,10 @@ abstract class CampusServiceBase extends $grpc.Service {
return deleteDevice(call, await request);
}

$async.Future<$0.ListStudentClubReply> listStudentClub_Pre($grpc.ServiceCall call, $async.Future<$0.ListStudentClubRequest> request) async {
return listStudentClub(call, await request);
}

$async.Future<$0.ListNewsAlertsReply> listNewsAlerts($grpc.ServiceCall call, $0.ListNewsAlertsRequest request);
$async.Future<$0.ListNewsSourcesReply> listNewsSources($grpc.ServiceCall call, $0.ListNewsSourcesRequest request);
$async.Future<$0.ListNewsReply> listNews($grpc.ServiceCall call, $0.ListNewsRequest request);
Expand All @@ -472,4 +491,5 @@ abstract class CampusServiceBase extends $grpc.Service {
$async.Future<$0.GetCanteenHeadCountReply> getCanteenHeadCount($grpc.ServiceCall call, $0.GetCanteenHeadCountRequest request);
$async.Future<$0.CreateDeviceReply> createDevice($grpc.ServiceCall call, $0.CreateDeviceRequest request);
$async.Future<$0.DeleteDeviceReply> deleteDevice($grpc.ServiceCall call, $0.DeleteDeviceRequest request);
$async.Future<$0.ListStudentClubReply> listStudentClub($grpc.ServiceCall call, $0.ListStudentClubRequest request);
}
61 changes: 61 additions & 0 deletions lib/base/networking/apis/tumdev/campus_backend.pbjson.dart
Original file line number Diff line number Diff line change
Expand Up @@ -910,3 +910,64 @@ final $typed_data.Uint8List getCanteenHeadCountReplyDescriptor = $convert.base64
'9jb3VudBgCIAEoDVIIbWF4Q291bnQSGAoHcGVyY2VudBgDIAEoAlIHcGVyY2VudBI4Cgl0aW1l'
'c3RhbXAYBCABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wUgl0aW1lc3RhbXA=');

@$core.Deprecated('Use listStudentClubRequestDescriptor instead')
const ListStudentClubRequest$json = {
'1': 'ListStudentClubRequest',
};

/// Descriptor for `ListStudentClubRequest`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List listStudentClubRequestDescriptor = $convert.base64Decode(
'ChZMaXN0U3R1ZGVudENsdWJSZXF1ZXN0');

@$core.Deprecated('Use listStudentClubReplyDescriptor instead')
const ListStudentClubReply$json = {
'1': 'ListStudentClubReply',
'2': [
{'1': 'collections', '3': 1, '4': 3, '5': 11, '6': '.api.StudentClubCollection', '10': 'collections'},
],
};

/// Descriptor for `ListStudentClubReply`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List listStudentClubReplyDescriptor = $convert.base64Decode(
'ChRMaXN0U3R1ZGVudENsdWJSZXBseRI8Cgtjb2xsZWN0aW9ucxgBIAMoCzIaLmFwaS5TdHVkZW'
'50Q2x1YkNvbGxlY3Rpb25SC2NvbGxlY3Rpb25z');

@$core.Deprecated('Use studentClubDescriptor instead')
const StudentClub$json = {
'1': 'StudentClub',
'2': [
{'1': 'name', '3': 1, '4': 1, '5': 9, '10': 'name'},
{'1': 'description', '3': 2, '4': 1, '5': 9, '9': 0, '10': 'description', '17': true},
{'1': 'link_url', '3': 3, '4': 1, '5': 9, '9': 1, '10': 'linkUrl', '17': true},
{'1': 'cover_url', '3': 4, '4': 1, '5': 9, '9': 2, '10': 'coverUrl', '17': true},
],
'8': [
{'1': '_description'},
{'1': '_link_url'},
{'1': '_cover_url'},
],
};

/// Descriptor for `StudentClub`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List studentClubDescriptor = $convert.base64Decode(
'CgtTdHVkZW50Q2x1YhISCgRuYW1lGAEgASgJUgRuYW1lEiUKC2Rlc2NyaXB0aW9uGAIgASgJSA'
'BSC2Rlc2NyaXB0aW9uiAEBEh4KCGxpbmtfdXJsGAMgASgJSAFSB2xpbmtVcmyIAQESIAoJY292'
'ZXJfdXJsGAQgASgJSAJSCGNvdmVyVXJsiAEBQg4KDF9kZXNjcmlwdGlvbkILCglfbGlua191cm'
'xCDAoKX2NvdmVyX3VybA==');

@$core.Deprecated('Use studentClubCollectionDescriptor instead')
const StudentClubCollection$json = {
'1': 'StudentClubCollection',
'2': [
{'1': 'title', '3': 1, '4': 1, '5': 9, '10': 'title'},
{'1': 'description', '3': 2, '4': 1, '5': 9, '10': 'description'},
{'1': 'clubs', '3': 3, '4': 3, '5': 11, '6': '.api.StudentClub', '10': 'clubs'},
],
};

/// Descriptor for `StudentClubCollection`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List studentClubCollectionDescriptor = $convert.base64Decode(
'ChVTdHVkZW50Q2x1YkNvbGxlY3Rpb24SFAoFdGl0bGUYASABKAlSBXRpdGxlEiAKC2Rlc2NyaX'
'B0aW9uGAIgASgJUgtkZXNjcmlwdGlvbhImCgVjbHVicxgDIAMoCzIQLmFwaS5TdHVkZW50Q2x1'
'YlIFY2x1YnM=');

Loading

0 comments on commit c28c0dd

Please sign in to comment.