Skip to content

Commit 622091f

Browse files
committed
Re-generate protobuf code
1 parent 46c8acb commit 622091f

File tree

176 files changed

+15578
-22702
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

176 files changed

+15578
-22702
lines changed
Lines changed: 156 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,113 +1,206 @@
1-
///
1+
//
22
// Generated code. Do not modify.
33
// source: google/protobuf/any.proto
44
//
5-
// @dart = 2.12
6-
// 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
5+
// @dart = 3.3
6+
7+
// ignore_for_file: annotate_overrides, camel_case_types, comment_references
8+
// ignore_for_file: constant_identifier_names, library_prefixes
9+
// ignore_for_file: non_constant_identifier_names, prefer_final_fields
10+
// ignore_for_file: unnecessary_import, unnecessary_this, unused_import
711

812
import 'dart:core' as $core;
913

1014
import 'package:protobuf/protobuf.dart' as $pb;
11-
1215
import 'package:protobuf/src/protobuf/mixins/well_known.dart' as $mixin;
1316

14-
class Any extends $pb.GeneratedMessage with $mixin.AnyMixin {
15-
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
16-
const $core.bool.fromEnvironment('protobuf.omit_message_names')
17-
? ''
18-
: 'Any',
19-
package: const $pb.PackageName(
20-
const $core.bool.fromEnvironment('protobuf.omit_message_names')
21-
? ''
22-
: 'google.protobuf'),
23-
createEmptyInstance: create,
24-
toProto3Json: $mixin.AnyMixin.toProto3JsonHelper,
25-
fromProto3Json: $mixin.AnyMixin.fromProto3JsonHelper)
26-
..aOS(
27-
1,
28-
const $core.bool.fromEnvironment('protobuf.omit_field_names')
29-
? ''
30-
: 'typeUrl')
31-
..a<$core.List<$core.int>>(
32-
2,
33-
const $core.bool.fromEnvironment('protobuf.omit_field_names')
34-
? ''
35-
: 'value',
36-
$pb.PbFieldType.OY)
37-
..hasRequiredFields = false;
17+
export 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions;
3818

39-
Any._() : super();
19+
/// `Any` contains an arbitrary serialized protocol buffer message along with a
20+
/// URL that describes the type of the serialized message.
21+
///
22+
/// Protobuf library provides support to pack/unpack Any values in the form
23+
/// of utility functions or additional generated methods of the Any type.
24+
///
25+
/// Example 1: Pack and unpack a message in C++.
26+
///
27+
/// Foo foo = ...;
28+
/// Any any;
29+
/// any.PackFrom(foo);
30+
/// ...
31+
/// if (any.UnpackTo(&foo)) {
32+
/// ...
33+
/// }
34+
///
35+
/// Example 2: Pack and unpack a message in Java.
36+
///
37+
/// Foo foo = ...;
38+
/// Any any = Any.pack(foo);
39+
/// ...
40+
/// if (any.is(Foo.class)) {
41+
/// foo = any.unpack(Foo.class);
42+
/// }
43+
///
44+
/// Example 3: Pack and unpack a message in Python.
45+
///
46+
/// foo = Foo(...)
47+
/// any = Any()
48+
/// any.Pack(foo)
49+
/// ...
50+
/// if any.Is(Foo.DESCRIPTOR):
51+
/// any.Unpack(foo)
52+
/// ...
53+
///
54+
/// Example 4: Pack and unpack a message in Go
55+
///
56+
/// foo := &pb.Foo{...}
57+
/// any, err := anypb.New(foo)
58+
/// if err != nil {
59+
/// ...
60+
/// }
61+
/// ...
62+
/// foo := &pb.Foo{}
63+
/// if err := any.UnmarshalTo(foo); err != nil {
64+
/// ...
65+
/// }
66+
///
67+
/// The pack methods provided by protobuf library will by default use
68+
/// 'type.googleapis.com/full.type.name' as the type URL and the unpack
69+
/// methods only use the fully qualified type name after the last '/'
70+
/// in the type URL, for example "foo.bar.com/x/y.z" will yield type
71+
/// name "y.z".
72+
///
73+
///
74+
/// JSON
75+
///
76+
/// The JSON representation of an `Any` value uses the regular
77+
/// representation of the deserialized, embedded message, with an
78+
/// additional field `@type` which contains the type URL. Example:
79+
///
80+
/// package google.profile;
81+
/// message Person {
82+
/// string first_name = 1;
83+
/// string last_name = 2;
84+
/// }
85+
///
86+
/// {
87+
/// "@type": "type.googleapis.com/google.profile.Person",
88+
/// "firstName": <string>,
89+
/// "lastName": <string>
90+
/// }
91+
///
92+
/// If the embedded message type is well-known and has a custom JSON
93+
/// representation, that representation will be embedded adding a field
94+
/// `value` which holds the custom JSON in addition to the `@type`
95+
/// field. Example (for message [google.protobuf.Duration][]):
96+
///
97+
/// {
98+
/// "@type": "type.googleapis.com/google.protobuf.Duration",
99+
/// "value": "1.212s"
100+
/// }
101+
class Any extends $pb.GeneratedMessage with $mixin.AnyMixin {
40102
factory Any({
41103
$core.String? typeUrl,
42104
$core.List<$core.int>? value,
43105
}) {
44-
final _result = create();
106+
final $result = create();
45107
if (typeUrl != null) {
46-
_result.typeUrl = typeUrl;
108+
$result.typeUrl = typeUrl;
47109
}
48110
if (value != null) {
49-
_result.value = value;
111+
$result.value = value;
50112
}
51-
return _result;
113+
return $result;
52114
}
53-
factory Any.fromBuffer($core.List<$core.int> i,
54-
[$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) =>
55-
create()..mergeFromBuffer(i, r);
56-
factory Any.fromJson($core.String i,
57-
[$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) =>
58-
create()..mergeFromJson(i, r);
59-
@$core.Deprecated('Using this can add significant overhead to your binary. '
60-
'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
61-
'Will be removed in next major version')
115+
Any._() : super();
116+
factory Any.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
117+
factory Any.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
118+
119+
static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Any', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), createEmptyInstance: create, toProto3Json: $mixin.AnyMixin.toProto3JsonHelper, fromProto3Json: $mixin.AnyMixin.fromProto3JsonHelper)
120+
..aOS(1, _omitFieldNames ? '' : 'typeUrl')
121+
..a<$core.List<$core.int>>(2, _omitFieldNames ? '' : 'value', $pb.PbFieldType.OY)
122+
..hasRequiredFields = false
123+
;
124+
125+
@$core.Deprecated(
126+
'Using this can add significant overhead to your binary. '
127+
'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
128+
'Will be removed in next major version')
62129
Any clone() => Any()..mergeFromMessage(this);
63-
@$core.Deprecated('Using this can add significant overhead to your binary. '
64-
'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
65-
'Will be removed in next major version')
66-
Any copyWith(void Function(Any) updates) =>
67-
super.copyWith((message) => updates(message as Any))
68-
as Any; // ignore: deprecated_member_use
130+
@$core.Deprecated(
131+
'Using this can add significant overhead to your binary. '
132+
'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
133+
'Will be removed in next major version')
134+
Any copyWith(void Function(Any) updates) => super.copyWith((message) => updates(message as Any)) as Any;
135+
69136
$pb.BuilderInfo get info_ => _i;
137+
70138
@$core.pragma('dart2js:noInline')
71139
static Any create() => Any._();
72140
Any createEmptyInstance() => create();
73141
static $pb.PbList<Any> createRepeated() => $pb.PbList<Any>();
74142
@$core.pragma('dart2js:noInline')
75-
static Any getDefault() =>
76-
_defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<Any>(create);
143+
static Any getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<Any>(create);
77144
static Any? _defaultInstance;
78145

146+
/// A URL/resource name that uniquely identifies the type of the serialized
147+
/// protocol buffer message. This string must contain at least
148+
/// one "/" character. The last segment of the URL's path must represent
149+
/// the fully qualified name of the type (as in
150+
/// `path/google.protobuf.Duration`). The name should be in a canonical form
151+
/// (e.g., leading "." is not accepted).
152+
///
153+
/// In practice, teams usually precompile into the binary all types that they
154+
/// expect it to use in the context of Any. However, for URLs which use the
155+
/// scheme `http`, `https`, or no scheme, one can optionally set up a type
156+
/// server that maps type URLs to message definitions as follows:
157+
///
158+
/// * If no scheme is provided, `https` is assumed.
159+
/// * An HTTP GET on the URL must yield a [google.protobuf.Type][]
160+
/// value in binary format, or produce an error.
161+
/// * Applications are allowed to cache lookup results based on the
162+
/// URL, or have them precompiled into a binary to avoid any
163+
/// lookup. Therefore, binary compatibility needs to be preserved
164+
/// on changes to types. (Use versioned type names to manage
165+
/// breaking changes.)
166+
///
167+
/// Note: this functionality is not currently available in the official
168+
/// protobuf release, and it is not used for type URLs beginning with
169+
/// type.googleapis.com.
170+
///
171+
/// Schemes other than `http`, `https` (or the empty scheme) might be
172+
/// used with implementation specific semantics.
79173
@$pb.TagNumber(1)
80174
$core.String get typeUrl => $_getSZ(0);
81175
@$pb.TagNumber(1)
82-
set typeUrl($core.String v) {
83-
$_setString(0, v);
84-
}
85-
176+
set typeUrl($core.String v) { $_setString(0, v); }
86177
@$pb.TagNumber(1)
87178
$core.bool hasTypeUrl() => $_has(0);
88179
@$pb.TagNumber(1)
89-
void clearTypeUrl() => clearField(1);
180+
void clearTypeUrl() => $_clearField(1);
90181

182+
/// Must be a valid serialized protocol buffer of the above specified type.
91183
@$pb.TagNumber(2)
92184
$core.List<$core.int> get value => $_getN(1);
93185
@$pb.TagNumber(2)
94-
set value($core.List<$core.int> v) {
95-
$_setBytes(1, v);
96-
}
97-
186+
set value($core.List<$core.int> v) { $_setBytes(1, v); }
98187
@$pb.TagNumber(2)
99188
$core.bool hasValue() => $_has(1);
100189
@$pb.TagNumber(2)
101-
void clearValue() => clearField(2);
102-
190+
void clearValue() => $_clearField(2);
103191
/// Creates a new [Any] encoding [message].
104192
///
105193
/// The [typeUrl] will be [typeUrlPrefix]/`fullName` where `fullName` is
106194
/// the fully qualified name of the type of [message].
107195
static Any pack($pb.GeneratedMessage message,
108-
{$core.String typeUrlPrefix = 'type.googleapis.com'}) {
196+
{$core.String typeUrlPrefix = 'type.googleapis.com'}) {
109197
final result = create();
110-
$mixin.AnyMixin.packIntoAny(result, message, typeUrlPrefix: typeUrlPrefix);
198+
$mixin.AnyMixin.packIntoAny(result, message,
199+
typeUrlPrefix: typeUrlPrefix);
111200
return result;
112201
}
113202
}
203+
204+
205+
const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names');
206+
const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names');
Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1-
///
1+
//
22
// Generated code. Do not modify.
33
// source: google/protobuf/any.proto
44
//
5-
// @dart = 2.12
6-
// 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
5+
// @dart = 3.3
6+
7+
// ignore_for_file: annotate_overrides, camel_case_types, comment_references
8+
// ignore_for_file: constant_identifier_names, library_prefixes
9+
// ignore_for_file: non_constant_identifier_names, prefer_final_fields
10+
// ignore_for_file: unnecessary_import, unnecessary_this, unused_import
11+
Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,28 @@
1-
///
1+
//
22
// Generated code. Do not modify.
33
// source: google/protobuf/any.proto
44
//
5-
// @dart = 2.12
6-
// 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
5+
// @dart = 3.3
6+
7+
// ignore_for_file: annotate_overrides, camel_case_types, comment_references
8+
// ignore_for_file: constant_identifier_names, library_prefixes
9+
// ignore_for_file: non_constant_identifier_names, prefer_final_fields
10+
// ignore_for_file: unnecessary_import, unnecessary_this, unused_import
711

8-
import 'dart:core' as $core;
912
import 'dart:convert' as $convert;
13+
import 'dart:core' as $core;
1014
import 'dart:typed_data' as $typed_data;
1115

1216
@$core.Deprecated('Use anyDescriptor instead')
13-
const Any$json = const {
17+
const Any$json = {
1418
'1': 'Any',
15-
'2': const [
16-
const {'1': 'type_url', '3': 1, '4': 1, '5': 9, '10': 'typeUrl'},
17-
const {'1': 'value', '3': 2, '4': 1, '5': 12, '10': 'value'},
19+
'2': [
20+
{'1': 'type_url', '3': 1, '4': 1, '5': 9, '10': 'typeUrl'},
21+
{'1': 'value', '3': 2, '4': 1, '5': 12, '10': 'value'},
1822
],
1923
};
2024

2125
/// Descriptor for `Any`. Decode as a `google.protobuf.DescriptorProto`.
2226
final $typed_data.Uint8List anyDescriptor = $convert.base64Decode(
2327
'CgNBbnkSGQoIdHlwZV91cmwYASABKAlSB3R5cGVVcmwSFAoFdmFsdWUYAiABKAxSBXZhbHVl');
28+

0 commit comments

Comments
 (0)