Skip to content

Commit

Permalink
Various dart fixes (#430)
Browse files Browse the repository at this point in the history
  • Loading branch information
fundthmcalculus authored May 24, 2022
1 parent b75aee4 commit 17dc90a
Show file tree
Hide file tree
Showing 81 changed files with 7,965 additions and 2,721 deletions.
10 changes: 4 additions & 6 deletions dart/lib/okapi.dart
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,8 @@ class Hashing {

class Metadata {
static final _metadataGetMetadata = OkapiNative.library
.lookupFunction<OkapiFunctionNative, OkapiFunction>(
'okapi_metadata');
.lookupFunction<OkapiFunctionNative, OkapiFunction>('okapi_metadata');

static MetadataResponse getMetadata() =>
OkapiNative.nativeCall(
_metadataGetMetadata, MetadataRequest(), MetadataResponse());
}
static MetadataResponse getMetadata() => OkapiNative.nativeCall(
_metadataGetMetadata, MetadataRequest(), MetadataResponse());
}
74 changes: 51 additions & 23 deletions dart/lib/proto/google/protobuf/any.pb.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,29 @@ import 'package:protobuf/protobuf.dart' as $pb;
import 'package:protobuf/src/protobuf/mixins/well_known.dart' as $mixin;

class Any extends $pb.GeneratedMessage with $mixin.AnyMixin {
static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'Any', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'google.protobuf'), createEmptyInstance: create, toProto3Json: $mixin.AnyMixin.toProto3JsonHelper, fromProto3Json: $mixin.AnyMixin.fromProto3JsonHelper)
..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'typeUrl')
..a<$core.List<$core.int>>(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'value', $pb.PbFieldType.OY)
..hasRequiredFields = false
;
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
const $core.bool.fromEnvironment('protobuf.omit_message_names')
? ''
: 'Any',
package: const $pb.PackageName(
const $core.bool.fromEnvironment('protobuf.omit_message_names')
? ''
: 'google.protobuf'),
createEmptyInstance: create,
toProto3Json: $mixin.AnyMixin.toProto3JsonHelper,
fromProto3Json: $mixin.AnyMixin.fromProto3JsonHelper)
..aOS(
1,
const $core.bool.fromEnvironment('protobuf.omit_field_names')
? ''
: 'typeUrl')
..a<$core.List<$core.int>>(
2,
const $core.bool.fromEnvironment('protobuf.omit_field_names')
? ''
: 'value',
$pb.PbFieldType.OY)
..hasRequiredFields = false;

Any._() : super();
factory Any({
Expand All @@ -32,31 +50,39 @@ class Any extends $pb.GeneratedMessage with $mixin.AnyMixin {
}
return _result;
}
factory Any.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
factory Any.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
@$core.Deprecated(
'Using this can add significant overhead to your binary. '
'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
'Will be removed in next major version')
factory Any.fromBuffer($core.List<$core.int> i,
[$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) =>
create()..mergeFromBuffer(i, r);
factory Any.fromJson($core.String i,
[$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) =>
create()..mergeFromJson(i, r);
@$core.Deprecated('Using this can add significant overhead to your binary. '
'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
'Will be removed in next major version')
Any clone() => Any()..mergeFromMessage(this);
@$core.Deprecated(
'Using this can add significant overhead to your binary. '
'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
'Will be removed in next major version')
Any copyWith(void Function(Any) updates) => super.copyWith((message) => updates(message as Any)) as Any; // ignore: deprecated_member_use
@$core.Deprecated('Using this can add significant overhead to your binary. '
'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
'Will be removed in next major version')
Any copyWith(void Function(Any) updates) =>
super.copyWith((message) => updates(message as Any))
as Any; // ignore: deprecated_member_use
$pb.BuilderInfo get info_ => _i;
@$core.pragma('dart2js:noInline')
static Any create() => Any._();
Any createEmptyInstance() => create();
static $pb.PbList<Any> createRepeated() => $pb.PbList<Any>();
@$core.pragma('dart2js:noInline')
static Any getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<Any>(create);
static Any getDefault() =>
_defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<Any>(create);
static Any? _defaultInstance;

@$pb.TagNumber(1)
$core.String get typeUrl => $_getSZ(0);
@$pb.TagNumber(1)
set typeUrl($core.String v) { $_setString(0, v); }
set typeUrl($core.String v) {
$_setString(0, v);
}

@$pb.TagNumber(1)
$core.bool hasTypeUrl() => $_has(0);
@$pb.TagNumber(1)
Expand All @@ -65,21 +91,23 @@ class Any extends $pb.GeneratedMessage with $mixin.AnyMixin {
@$pb.TagNumber(2)
$core.List<$core.int> get value => $_getN(1);
@$pb.TagNumber(2)
set value($core.List<$core.int> v) { $_setBytes(1, v); }
set value($core.List<$core.int> v) {
$_setBytes(1, v);
}

@$pb.TagNumber(2)
$core.bool hasValue() => $_has(1);
@$pb.TagNumber(2)
void clearValue() => clearField(2);

/// Creates a new [Any] encoding [message].
///
/// The [typeUrl] will be [typeUrlPrefix]/`fullName` where `fullName` is
/// the fully qualified name of the type of [message].
static Any pack($pb.GeneratedMessage message,
{$core.String typeUrlPrefix = 'type.googleapis.com'}) {
{$core.String typeUrlPrefix = 'type.googleapis.com'}) {
final result = create();
$mixin.AnyMixin.packIntoAny(result, message,
typeUrlPrefix: typeUrlPrefix);
$mixin.AnyMixin.packIntoAny(result, message, typeUrlPrefix: typeUrlPrefix);
return result;
}
}

1 change: 0 additions & 1 deletion dart/lib/proto/google/protobuf/any.pbenum.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@
//
// @dart = 2.12
// ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_fields

4 changes: 3 additions & 1 deletion dart/lib/proto/google/protobuf/any.pbjson.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import 'dart:core' as $core;
import 'dart:convert' as $convert;
import 'dart:typed_data' as $typed_data;

@$core.Deprecated('Use anyDescriptor instead')
const Any$json = const {
'1': 'Any',
Expand All @@ -18,4 +19,5 @@ const Any$json = const {
};

/// Descriptor for `Any`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List anyDescriptor = $convert.base64Decode('CgNBbnkSGQoIdHlwZV91cmwYASABKAlSB3R5cGVVcmwSFAoFdmFsdWUYAiABKAxSBXZhbHVl');
final $typed_data.Uint8List anyDescriptor = $convert.base64Decode(
'CgNBbnkSGQoIdHlwZV91cmwYASABKAlSB3R5cGVVcmwSFAoFdmFsdWUYAiABKAxSBXZhbHVl');
1 change: 0 additions & 1 deletion dart/lib/proto/google/protobuf/any.pbserver.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@
// ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_fields,deprecated_member_use_from_same_package

export 'any.pb.dart';

Loading

0 comments on commit 17dc90a

Please sign in to comment.