diff --git a/CHANGELOG.md b/CHANGELOG.md index 258dcf94..7f72e2a2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 4.3.0 + +- Require `package:protobuf` 5.0.0 + ## 4.2.0 - Export a protobuf generated symbol (`Any`) diff --git a/example/googleapis/lib/src/generated/google/api/label.pb.dart b/example/googleapis/lib/src/generated/google/api/label.pb.dart index 805fc93b..95089677 100644 --- a/example/googleapis/lib/src/generated/google/api/label.pb.dart +++ b/example/googleapis/lib/src/generated/google/api/label.pb.dart @@ -1,13 +1,14 @@ +// This is a generated file - do not edit. // -// Generated code. Do not modify. -// source: google/api/label.proto -// -// @dart = 2.12 +// Generated from google/api/label.proto. + +// @dart = 3.3 // ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names import 'dart:core' as $core; @@ -15,6 +16,8 @@ import 'package:protobuf/protobuf.dart' as $pb; import 'label.pbenum.dart'; +export 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions; + export 'label.pbenum.dart'; /// A description of a label. @@ -25,53 +28,44 @@ class LabelDescriptor extends $pb.GeneratedMessage { $core.String? description, }) { final result = create(); - if (key != null) { - result.key = key; - } - if (valueType != null) { - result.valueType = valueType; - } - if (description != null) { - result.description = description; - } + if (key != null) result.key = key; + if (valueType != null) result.valueType = valueType; + if (description != null) result.description = description; return result; } - LabelDescriptor._() : super(); - factory LabelDescriptor.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory LabelDescriptor.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); + + LabelDescriptor._(); + + factory LabelDescriptor.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory LabelDescriptor.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); static final $pb.BuilderInfo _i = $pb.BuilderInfo( _omitMessageNames ? '' : 'LabelDescriptor', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.api'), createEmptyInstance: create) ..aOS(1, _omitFieldNames ? '' : 'key') - ..e( - 2, _omitFieldNames ? '' : 'valueType', $pb.PbFieldType.OE, - defaultOrMaker: LabelDescriptor_ValueType.STRING, - valueOf: LabelDescriptor_ValueType.valueOf, + ..aE(2, _omitFieldNames ? '' : 'valueType', enumValues: LabelDescriptor_ValueType.values) ..aOS(3, _omitFieldNames ? '' : 'description') ..hasRequiredFields = false; - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - LabelDescriptor clone() => LabelDescriptor()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + LabelDescriptor clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') LabelDescriptor copyWith(void Function(LabelDescriptor) updates) => super.copyWith((message) => updates(message as LabelDescriptor)) as LabelDescriptor; + @$core.override $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static LabelDescriptor create() => LabelDescriptor._(); + @$core.override LabelDescriptor createEmptyInstance() => create(); static $pb.PbList createRepeated() => $pb.PbList(); @@ -84,42 +78,34 @@ class LabelDescriptor extends $pb.GeneratedMessage { @$pb.TagNumber(1) $core.String get key => $_getSZ(0); @$pb.TagNumber(1) - set key($core.String v) { - $_setString(0, v); - } - + set key($core.String value) => $_setString(0, value); @$pb.TagNumber(1) $core.bool hasKey() => $_has(0); @$pb.TagNumber(1) - void clearKey() => clearField(1); + void clearKey() => $_clearField(1); /// The type of data that can be assigned to the label. @$pb.TagNumber(2) LabelDescriptor_ValueType get valueType => $_getN(1); @$pb.TagNumber(2) - set valueType(LabelDescriptor_ValueType v) { - setField(2, v); - } - + set valueType(LabelDescriptor_ValueType value) => $_setField(2, value); @$pb.TagNumber(2) $core.bool hasValueType() => $_has(1); @$pb.TagNumber(2) - void clearValueType() => clearField(2); + void clearValueType() => $_clearField(2); /// A human-readable description for the label. @$pb.TagNumber(3) $core.String get description => $_getSZ(2); @$pb.TagNumber(3) - set description($core.String v) { - $_setString(2, v); - } - + set description($core.String value) => $_setString(2, value); @$pb.TagNumber(3) $core.bool hasDescription() => $_has(2); @$pb.TagNumber(3) - void clearDescription() => clearField(3); + void clearDescription() => $_clearField(3); } -const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); -const _omitMessageNames = +const $core.bool _omitFieldNames = + $core.bool.fromEnvironment('protobuf.omit_field_names'); +const $core.bool _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/example/googleapis/lib/src/generated/google/api/label.pbenum.dart b/example/googleapis/lib/src/generated/google/api/label.pbenum.dart index 1dabf309..d1b91b7f 100644 --- a/example/googleapis/lib/src/generated/google/api/label.pbenum.dart +++ b/example/googleapis/lib/src/generated/google/api/label.pbenum.dart @@ -1,13 +1,14 @@ +// This is a generated file - do not edit. // -// Generated code. Do not modify. -// source: google/api/label.proto -// -// @dart = 2.12 +// Generated from google/api/label.proto. + +// @dart = 3.3 // ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names import 'dart:core' as $core; @@ -15,10 +16,15 @@ import 'package:protobuf/protobuf.dart' as $pb; /// Value types that can be used as label values. class LabelDescriptor_ValueType extends $pb.ProtobufEnum { + /// A variable-length string. This is the default. static const LabelDescriptor_ValueType STRING = LabelDescriptor_ValueType._(0, _omitEnumNames ? '' : 'STRING'); + + /// Boolean; true or false. static const LabelDescriptor_ValueType BOOL = LabelDescriptor_ValueType._(1, _omitEnumNames ? '' : 'BOOL'); + + /// A 64-bit signed integer. static const LabelDescriptor_ValueType INT64 = LabelDescriptor_ValueType._(2, _omitEnumNames ? '' : 'INT64'); @@ -29,11 +35,13 @@ class LabelDescriptor_ValueType extends $pb.ProtobufEnum { INT64, ]; - static final $core.Map<$core.int, LabelDescriptor_ValueType> _byValue = - $pb.ProtobufEnum.initByValue(values); - static LabelDescriptor_ValueType? valueOf($core.int value) => _byValue[value]; + static final $core.List _byValue = + $pb.ProtobufEnum.$_initByValueList(values, 2); + static LabelDescriptor_ValueType? valueOf($core.int value) => + value < 0 || value >= _byValue.length ? null : _byValue[value]; - const LabelDescriptor_ValueType._($core.int v, $core.String n) : super(v, n); + const LabelDescriptor_ValueType._(super.value, super.name); } -const _omitEnumNames = $core.bool.fromEnvironment('protobuf.omit_enum_names'); +const $core.bool _omitEnumNames = + $core.bool.fromEnvironment('protobuf.omit_enum_names'); diff --git a/example/googleapis/lib/src/generated/google/api/label.pbjson.dart b/example/googleapis/lib/src/generated/google/api/label.pbjson.dart index 0c103ad6..ff1bbfc0 100644 --- a/example/googleapis/lib/src/generated/google/api/label.pbjson.dart +++ b/example/googleapis/lib/src/generated/google/api/label.pbjson.dart @@ -1,13 +1,14 @@ +// This is a generated file - do not edit. // -// Generated code. Do not modify. -// source: google/api/label.proto -// -// @dart = 2.12 +// Generated from google/api/label.proto. + +// @dart = 3.3 // ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names, unused_import import 'dart:convert' as $convert; import 'dart:core' as $core; diff --git a/example/googleapis/lib/src/generated/google/api/launch_stage.pb.dart b/example/googleapis/lib/src/generated/google/api/launch_stage.pb.dart index fe464387..4d97868a 100644 --- a/example/googleapis/lib/src/generated/google/api/launch_stage.pb.dart +++ b/example/googleapis/lib/src/generated/google/api/launch_stage.pb.dart @@ -1,14 +1,17 @@ +// This is a generated file - do not edit. // -// Generated code. Do not modify. -// source: google/api/launch_stage.proto -// -// @dart = 2.12 +// Generated from google/api/launch_stage.proto. + +// @dart = 3.3 // ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names import 'dart:core' as $core; +export 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions; + export 'launch_stage.pbenum.dart'; diff --git a/example/googleapis/lib/src/generated/google/api/launch_stage.pbenum.dart b/example/googleapis/lib/src/generated/google/api/launch_stage.pbenum.dart index 3077f267..b441be82 100644 --- a/example/googleapis/lib/src/generated/google/api/launch_stage.pbenum.dart +++ b/example/googleapis/lib/src/generated/google/api/launch_stage.pbenum.dart @@ -1,13 +1,14 @@ +// This is a generated file - do not edit. // -// Generated code. Do not modify. -// source: google/api/launch_stage.proto -// -// @dart = 2.12 +// Generated from google/api/launch_stage.proto. + +// @dart = 3.3 // ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names import 'dart:core' as $core; @@ -16,19 +17,55 @@ import 'package:protobuf/protobuf.dart' as $pb; /// The launch stage as defined by [Google Cloud Platform /// Launch Stages](https://cloud.google.com/terms/launch-stages). class LaunchStage extends $pb.ProtobufEnum { + /// Do not use this default value. static const LaunchStage LAUNCH_STAGE_UNSPECIFIED = LaunchStage._(0, _omitEnumNames ? '' : 'LAUNCH_STAGE_UNSPECIFIED'); + + /// The feature is not yet implemented. Users can not use it. static const LaunchStage UNIMPLEMENTED = LaunchStage._(6, _omitEnumNames ? '' : 'UNIMPLEMENTED'); + + /// Prelaunch features are hidden from users and are only visible internally. static const LaunchStage PRELAUNCH = LaunchStage._(7, _omitEnumNames ? '' : 'PRELAUNCH'); + + /// Early Access features are limited to a closed group of testers. To use + /// these features, you must sign up in advance and sign a Trusted Tester + /// agreement (which includes confidentiality provisions). These features may + /// be unstable, changed in backward-incompatible ways, and are not + /// guaranteed to be released. static const LaunchStage EARLY_ACCESS = LaunchStage._(1, _omitEnumNames ? '' : 'EARLY_ACCESS'); + + /// Alpha is a limited availability test for releases before they are cleared + /// for widespread use. By Alpha, all significant design issues are resolved + /// and we are in the process of verifying functionality. Alpha customers + /// need to apply for access, agree to applicable terms, and have their + /// projects allowlisted. Alpha releases don't have to be feature complete, + /// no SLAs are provided, and there are no technical support obligations, but + /// they will be far enough along that customers can actually use them in + /// test environments or for limited-use tests -- just like they would in + /// normal production cases. static const LaunchStage ALPHA = LaunchStage._(2, _omitEnumNames ? '' : 'ALPHA'); + + /// Beta is the point at which we are ready to open a release for any + /// customer to use. There are no SLA or technical support obligations in a + /// Beta release. Products will be complete from a feature perspective, but + /// may have some open outstanding issues. Beta releases are suitable for + /// limited production use cases. static const LaunchStage BETA = LaunchStage._(3, _omitEnumNames ? '' : 'BETA'); + + /// GA features are open to all developers and are considered stable and + /// fully qualified for production use. static const LaunchStage GA = LaunchStage._(4, _omitEnumNames ? '' : 'GA'); + + /// Deprecated features are scheduled to be shut down and removed. For more + /// information, see the "Deprecation Policy" section of our [Terms of + /// Service](https://cloud.google.com/terms/) + /// and the [Google Cloud Platform Subject to the Deprecation + /// Policy](https://cloud.google.com/terms/deprecation) documentation. static const LaunchStage DEPRECATED = LaunchStage._(5, _omitEnumNames ? '' : 'DEPRECATED'); @@ -43,11 +80,13 @@ class LaunchStage extends $pb.ProtobufEnum { DEPRECATED, ]; - static final $core.Map<$core.int, LaunchStage> _byValue = - $pb.ProtobufEnum.initByValue(values); - static LaunchStage? valueOf($core.int value) => _byValue[value]; + static final $core.List _byValue = + $pb.ProtobufEnum.$_initByValueList(values, 7); + static LaunchStage? valueOf($core.int value) => + value < 0 || value >= _byValue.length ? null : _byValue[value]; - const LaunchStage._($core.int v, $core.String n) : super(v, n); + const LaunchStage._(super.value, super.name); } -const _omitEnumNames = $core.bool.fromEnvironment('protobuf.omit_enum_names'); +const $core.bool _omitEnumNames = + $core.bool.fromEnvironment('protobuf.omit_enum_names'); diff --git a/example/googleapis/lib/src/generated/google/api/launch_stage.pbjson.dart b/example/googleapis/lib/src/generated/google/api/launch_stage.pbjson.dart index d488a117..de02e6d9 100644 --- a/example/googleapis/lib/src/generated/google/api/launch_stage.pbjson.dart +++ b/example/googleapis/lib/src/generated/google/api/launch_stage.pbjson.dart @@ -1,13 +1,14 @@ +// This is a generated file - do not edit. // -// Generated code. Do not modify. -// source: google/api/launch_stage.proto -// -// @dart = 2.12 +// Generated from google/api/launch_stage.proto. + +// @dart = 3.3 // ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names, unused_import import 'dart:convert' as $convert; import 'dart:core' as $core; diff --git a/example/googleapis/lib/src/generated/google/api/monitored_resource.pb.dart b/example/googleapis/lib/src/generated/google/api/monitored_resource.pb.dart index 412370c3..8dc4c47f 100644 --- a/example/googleapis/lib/src/generated/google/api/monitored_resource.pb.dart +++ b/example/googleapis/lib/src/generated/google/api/monitored_resource.pb.dart @@ -1,13 +1,14 @@ +// This is a generated file - do not edit. // -// Generated code. Do not modify. -// source: google/api/monitored_resource.proto -// -// @dart = 2.12 +// Generated from google/api/monitored_resource.proto. + +// @dart = 3.3 // ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names import 'dart:core' as $core; @@ -17,16 +18,18 @@ import '../protobuf/struct.pb.dart' as $1; import 'label.pb.dart' as $0; import 'launch_stage.pbenum.dart' as $2; -/// An object that describes the schema of a -/// [MonitoredResource][google.api.MonitoredResource] object using a type name -/// and a set of labels. For example, the monitored resource descriptor for -/// Google Compute Engine VM instances has a type of -/// `"gce_instance"` and specifies the use of the labels `"instance_id"` and -/// `"zone"` to identify particular VM instances. +export 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions; + +/// An object that describes the schema of a +/// [MonitoredResource][google.api.MonitoredResource] object using a type name +/// and a set of labels. For example, the monitored resource descriptor for +/// Google Compute Engine VM instances has a type of +/// `"gce_instance"` and specifies the use of the labels `"instance_id"` and +/// `"zone"` to identify particular VM instances. /// -/// Different APIs can support different monitored resource types. APIs generally -/// provide a `list` method that returns the monitored resource descriptors used -/// by the API. +/// Different APIs can support different monitored resource types. APIs generally +/// provide a `list` method that returns the monitored resource descriptors used +/// by the API. class MonitoredResourceDescriptor extends $pb.GeneratedMessage { factory MonitoredResourceDescriptor({ $core.String? type, @@ -37,33 +40,23 @@ class MonitoredResourceDescriptor extends $pb.GeneratedMessage { $2.LaunchStage? launchStage, }) { final result = create(); - if (type != null) { - result.type = type; - } - if (displayName != null) { - result.displayName = displayName; - } - if (description != null) { - result.description = description; - } - if (labels != null) { - result.labels.addAll(labels); - } - if (name != null) { - result.name = name; - } - if (launchStage != null) { - result.launchStage = launchStage; - } + if (type != null) result.type = type; + if (displayName != null) result.displayName = displayName; + if (description != null) result.description = description; + if (labels != null) result.labels.addAll(labels); + if (name != null) result.name = name; + if (launchStage != null) result.launchStage = launchStage; return result; } - MonitoredResourceDescriptor._() : super(); - factory MonitoredResourceDescriptor.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory MonitoredResourceDescriptor.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); + + MonitoredResourceDescriptor._(); + + factory MonitoredResourceDescriptor.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory MonitoredResourceDescriptor.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); static final $pb.BuilderInfo _i = $pb.BuilderInfo( _omitMessageNames ? '' : 'MonitoredResourceDescriptor', @@ -72,36 +65,29 @@ class MonitoredResourceDescriptor extends $pb.GeneratedMessage { ..aOS(1, _omitFieldNames ? '' : 'type') ..aOS(2, _omitFieldNames ? '' : 'displayName') ..aOS(3, _omitFieldNames ? '' : 'description') - ..pc<$0.LabelDescriptor>( - 4, _omitFieldNames ? '' : 'labels', $pb.PbFieldType.PM, + ..pPM<$0.LabelDescriptor>(4, _omitFieldNames ? '' : 'labels', subBuilder: $0.LabelDescriptor.create) ..aOS(5, _omitFieldNames ? '' : 'name') - ..e<$2.LaunchStage>( - 7, _omitFieldNames ? '' : 'launchStage', $pb.PbFieldType.OE, - defaultOrMaker: $2.LaunchStage.LAUNCH_STAGE_UNSPECIFIED, - valueOf: $2.LaunchStage.valueOf, + ..aE<$2.LaunchStage>(7, _omitFieldNames ? '' : 'launchStage', enumValues: $2.LaunchStage.values) ..hasRequiredFields = false; - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - MonitoredResourceDescriptor clone() => - MonitoredResourceDescriptor()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + MonitoredResourceDescriptor clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') MonitoredResourceDescriptor copyWith( void Function(MonitoredResourceDescriptor) updates) => super.copyWith( (message) => updates(message as MonitoredResourceDescriptor)) as MonitoredResourceDescriptor; + @$core.override $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static MonitoredResourceDescriptor create() => MonitoredResourceDescriptor._(); + @$core.override MonitoredResourceDescriptor createEmptyInstance() => create(); static $pb.PbList createRepeated() => $pb.PbList(); @@ -112,21 +98,18 @@ class MonitoredResourceDescriptor extends $pb.GeneratedMessage { /// Required. The monitored resource type. For example, the type /// `"cloudsql_database"` represents databases in Google Cloud SQL. - /// For a list of types, see [Monitoring resource + /// For a list of types, see [Monitored resource /// types](https://cloud.google.com/monitoring/api/resources) /// and [Logging resource /// types](https://cloud.google.com/logging/docs/api/v2/resource-list). @$pb.TagNumber(1) $core.String get type => $_getSZ(0); @$pb.TagNumber(1) - set type($core.String v) { - $_setString(0, v); - } - + set type($core.String value) => $_setString(0, value); @$pb.TagNumber(1) $core.bool hasType() => $_has(0); @$pb.TagNumber(1) - void clearType() => clearField(1); + void clearType() => $_clearField(1); /// Optional. A concise name for the monitored resource type that might be /// displayed in user interfaces. It should be a Title Cased Noun Phrase, @@ -135,34 +118,28 @@ class MonitoredResourceDescriptor extends $pb.GeneratedMessage { @$pb.TagNumber(2) $core.String get displayName => $_getSZ(1); @$pb.TagNumber(2) - set displayName($core.String v) { - $_setString(1, v); - } - + set displayName($core.String value) => $_setString(1, value); @$pb.TagNumber(2) $core.bool hasDisplayName() => $_has(1); @$pb.TagNumber(2) - void clearDisplayName() => clearField(2); + void clearDisplayName() => $_clearField(2); /// Optional. A detailed description of the monitored resource type that might /// be used in documentation. @$pb.TagNumber(3) $core.String get description => $_getSZ(2); @$pb.TagNumber(3) - set description($core.String v) { - $_setString(2, v); - } - + set description($core.String value) => $_setString(2, value); @$pb.TagNumber(3) $core.bool hasDescription() => $_has(2); @$pb.TagNumber(3) - void clearDescription() => clearField(3); + void clearDescription() => $_clearField(3); /// Required. A set of labels used to describe instances of this monitored /// resource type. For example, an individual Google Cloud SQL database is /// identified by values for the labels `"database_id"` and `"zone"`. @$pb.TagNumber(4) - $core.List<$0.LabelDescriptor> get labels => $_getList(3); + $pb.PbList<$0.LabelDescriptor> get labels => $_getList(3); /// Optional. The resource name of the monitored resource descriptor: /// `"projects/{project_id}/monitoredResourceDescriptors/{type}"` where @@ -173,66 +150,58 @@ class MonitoredResourceDescriptor extends $pb.GeneratedMessage { @$pb.TagNumber(5) $core.String get name => $_getSZ(4); @$pb.TagNumber(5) - set name($core.String v) { - $_setString(4, v); - } - + set name($core.String value) => $_setString(4, value); @$pb.TagNumber(5) $core.bool hasName() => $_has(4); @$pb.TagNumber(5) - void clearName() => clearField(5); + void clearName() => $_clearField(5); /// Optional. The launch stage of the monitored resource definition. @$pb.TagNumber(7) $2.LaunchStage get launchStage => $_getN(5); @$pb.TagNumber(7) - set launchStage($2.LaunchStage v) { - setField(7, v); - } - + set launchStage($2.LaunchStage value) => $_setField(7, value); @$pb.TagNumber(7) $core.bool hasLaunchStage() => $_has(5); @$pb.TagNumber(7) - void clearLaunchStage() => clearField(7); + void clearLaunchStage() => $_clearField(7); } -/// An object representing a resource that can be used for monitoring, logging, -/// billing, or other purposes. Examples include virtual machine instances, -/// databases, and storage devices such as disks. The `type` field identifies a -/// [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor] object -/// that describes the resource's schema. Information in the `labels` field -/// identifies the actual resource and its attributes according to the schema. -/// For example, a particular Compute Engine VM instance could be represented by -/// the following object, because the -/// [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor] for -/// `"gce_instance"` has labels -/// `"project_id"`, `"instance_id"` and `"zone"`: +/// An object representing a resource that can be used for monitoring, logging, +/// billing, or other purposes. Examples include virtual machine instances, +/// databases, and storage devices such as disks. The `type` field identifies a +/// [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor] object +/// that describes the resource's schema. Information in the `labels` field +/// identifies the actual resource and its attributes according to the schema. +/// For example, a particular Compute Engine VM instance could be represented by +/// the following object, because the +/// [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor] for +/// `"gce_instance"` has labels +/// `"project_id"`, `"instance_id"` and `"zone"`: /// -/// { "type": "gce_instance", -/// "labels": { "project_id": "my-project", -/// "instance_id": "12345678901234", -/// "zone": "us-central1-a" }} +/// { "type": "gce_instance", +/// "labels": { "project_id": "my-project", +/// "instance_id": "12345678901234", +/// "zone": "us-central1-a" }} class MonitoredResource extends $pb.GeneratedMessage { factory MonitoredResource({ $core.String? type, - $core.Map<$core.String, $core.String>? labels, + $core.Iterable<$core.MapEntry<$core.String, $core.String>>? labels, }) { final result = create(); - if (type != null) { - result.type = type; - } - if (labels != null) { - result.labels.addAll(labels); - } + if (type != null) result.type = type; + if (labels != null) result.labels.addEntries(labels); return result; } - MonitoredResource._() : super(); - factory MonitoredResource.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory MonitoredResource.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); + + MonitoredResource._(); + + factory MonitoredResource.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory MonitoredResource.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); static final $pb.BuilderInfo _i = $pb.BuilderInfo( _omitMessageNames ? '' : 'MonitoredResource', @@ -246,21 +215,19 @@ class MonitoredResource extends $pb.GeneratedMessage { packageName: const $pb.PackageName('google.api')) ..hasRequiredFields = false; - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - MonitoredResource clone() => MonitoredResource()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + MonitoredResource clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') MonitoredResource copyWith(void Function(MonitoredResource) updates) => super.copyWith((message) => updates(message as MonitoredResource)) as MonitoredResource; + @$core.override $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static MonitoredResource create() => MonitoredResource._(); + @$core.override MonitoredResource createEmptyInstance() => create(); static $pb.PbList createRepeated() => $pb.PbList(); @@ -279,20 +246,17 @@ class MonitoredResource extends $pb.GeneratedMessage { @$pb.TagNumber(1) $core.String get type => $_getSZ(0); @$pb.TagNumber(1) - set type($core.String v) { - $_setString(0, v); - } - + set type($core.String value) => $_setString(0, value); @$pb.TagNumber(1) $core.bool hasType() => $_has(0); @$pb.TagNumber(1) - void clearType() => clearField(1); + void clearType() => $_clearField(1); /// Required. Values for all of the labels listed in the associated monitored /// resource descriptor. For example, Compute Engine VM instances use the /// labels `"project_id"`, `"instance_id"`, and `"zone"`. @$pb.TagNumber(2) - $core.Map<$core.String, $core.String> get labels => $_getMap(1); + $pb.PbMap<$core.String, $core.String> get labels => $_getMap(1); } /// Auxiliary metadata for a [MonitoredResource][google.api.MonitoredResource] @@ -304,24 +268,22 @@ class MonitoredResource extends $pb.GeneratedMessage { class MonitoredResourceMetadata extends $pb.GeneratedMessage { factory MonitoredResourceMetadata({ $1.Struct? systemLabels, - $core.Map<$core.String, $core.String>? userLabels, + $core.Iterable<$core.MapEntry<$core.String, $core.String>>? userLabels, }) { final result = create(); - if (systemLabels != null) { - result.systemLabels = systemLabels; - } - if (userLabels != null) { - result.userLabels.addAll(userLabels); - } + if (systemLabels != null) result.systemLabels = systemLabels; + if (userLabels != null) result.userLabels.addEntries(userLabels); return result; } - MonitoredResourceMetadata._() : super(); - factory MonitoredResourceMetadata.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory MonitoredResourceMetadata.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); + + MonitoredResourceMetadata._(); + + factory MonitoredResourceMetadata.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory MonitoredResourceMetadata.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); static final $pb.BuilderInfo _i = $pb.BuilderInfo( _omitMessageNames ? '' : 'MonitoredResourceMetadata', @@ -336,23 +298,20 @@ class MonitoredResourceMetadata extends $pb.GeneratedMessage { packageName: const $pb.PackageName('google.api')) ..hasRequiredFields = false; - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - MonitoredResourceMetadata clone() => - MonitoredResourceMetadata()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + MonitoredResourceMetadata clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') MonitoredResourceMetadata copyWith( void Function(MonitoredResourceMetadata) updates) => super.copyWith((message) => updates(message as MonitoredResourceMetadata)) as MonitoredResourceMetadata; + @$core.override $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static MonitoredResourceMetadata create() => MonitoredResourceMetadata._(); + @$core.override MonitoredResourceMetadata createEmptyInstance() => create(); static $pb.PbList createRepeated() => $pb.PbList(); @@ -361,35 +320,33 @@ class MonitoredResourceMetadata extends $pb.GeneratedMessage { $pb.GeneratedMessage.$_defaultFor(create); static MonitoredResourceMetadata? _defaultInstance; - /// Output only. Values for predefined system metadata labels. - /// System labels are a kind of metadata extracted by Google, including - /// "machine_image", "vpc", "subnet_id", - /// "security_group", "name", etc. - /// System label values can be only strings, Boolean values, or a list of - /// strings. For example: + /// Output only. Values for predefined system metadata labels. + /// System labels are a kind of metadata extracted by Google, including + /// "machine_image", "vpc", "subnet_id", + /// "security_group", "name", etc. + /// System label values can be only strings, Boolean values, or a list of + /// strings. For example: /// - /// { "name": "my-test-instance", - /// "security_group": ["a", "b", "c"], - /// "spot_instance": false } + /// { "name": "my-test-instance", + /// "security_group": ["a", "b", "c"], + /// "spot_instance": false } @$pb.TagNumber(1) $1.Struct get systemLabels => $_getN(0); @$pb.TagNumber(1) - set systemLabels($1.Struct v) { - setField(1, v); - } - + set systemLabels($1.Struct value) => $_setField(1, value); @$pb.TagNumber(1) $core.bool hasSystemLabels() => $_has(0); @$pb.TagNumber(1) - void clearSystemLabels() => clearField(1); + void clearSystemLabels() => $_clearField(1); @$pb.TagNumber(1) $1.Struct ensureSystemLabels() => $_ensure(0); /// Output only. A map of user-defined metadata labels. @$pb.TagNumber(2) - $core.Map<$core.String, $core.String> get userLabels => $_getMap(1); + $pb.PbMap<$core.String, $core.String> get userLabels => $_getMap(1); } -const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); -const _omitMessageNames = +const $core.bool _omitFieldNames = + $core.bool.fromEnvironment('protobuf.omit_field_names'); +const $core.bool _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/example/googleapis/lib/src/generated/google/api/monitored_resource.pbenum.dart b/example/googleapis/lib/src/generated/google/api/monitored_resource.pbenum.dart index c036a326..21eb78dd 100644 --- a/example/googleapis/lib/src/generated/google/api/monitored_resource.pbenum.dart +++ b/example/googleapis/lib/src/generated/google/api/monitored_resource.pbenum.dart @@ -1,10 +1,11 @@ +// This is a generated file - do not edit. // -// Generated code. Do not modify. -// source: google/api/monitored_resource.proto -// -// @dart = 2.12 +// Generated from google/api/monitored_resource.proto. + +// @dart = 3.3 // ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names diff --git a/example/googleapis/lib/src/generated/google/api/monitored_resource.pbjson.dart b/example/googleapis/lib/src/generated/google/api/monitored_resource.pbjson.dart index f51942b4..cb1bfb02 100644 --- a/example/googleapis/lib/src/generated/google/api/monitored_resource.pbjson.dart +++ b/example/googleapis/lib/src/generated/google/api/monitored_resource.pbjson.dart @@ -1,13 +1,14 @@ +// This is a generated file - do not edit. // -// Generated code. Do not modify. -// source: google/api/monitored_resource.proto -// -// @dart = 2.12 +// Generated from google/api/monitored_resource.proto. + +// @dart = 3.3 // ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names, unused_import import 'dart:convert' as $convert; import 'dart:core' as $core; diff --git a/example/googleapis/lib/src/generated/google/logging/type/http_request.pb.dart b/example/googleapis/lib/src/generated/google/logging/type/http_request.pb.dart index 2e2bed9e..13afd651 100644 --- a/example/googleapis/lib/src/generated/google/logging/type/http_request.pb.dart +++ b/example/googleapis/lib/src/generated/google/logging/type/http_request.pb.dart @@ -1,13 +1,14 @@ +// This is a generated file - do not edit. // -// Generated code. Do not modify. -// source: google/logging/type/http_request.proto -// -// @dart = 2.12 +// Generated from google/logging/type/http_request.proto. + +// @dart = 3.3 // ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names import 'dart:core' as $core; @@ -16,6 +17,8 @@ import 'package:protobuf/protobuf.dart' as $pb; import '../../protobuf/duration.pb.dart' as $0; +export 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions; + /// A common proto for logging HTTP requests. Only contains semantics /// defined by the HTTP specification. Product-specific logging /// information MUST be defined in a separate message. @@ -38,60 +41,33 @@ class HttpRequest extends $pb.GeneratedMessage { $core.String? protocol, }) { final result = create(); - if (requestMethod != null) { - result.requestMethod = requestMethod; - } - if (requestUrl != null) { - result.requestUrl = requestUrl; - } - if (requestSize != null) { - result.requestSize = requestSize; - } - if (status != null) { - result.status = status; - } - if (responseSize != null) { - result.responseSize = responseSize; - } - if (userAgent != null) { - result.userAgent = userAgent; - } - if (remoteIp != null) { - result.remoteIp = remoteIp; - } - if (referer != null) { - result.referer = referer; - } - if (cacheHit != null) { - result.cacheHit = cacheHit; - } - if (cacheValidatedWithOriginServer != null) { + if (requestMethod != null) result.requestMethod = requestMethod; + if (requestUrl != null) result.requestUrl = requestUrl; + if (requestSize != null) result.requestSize = requestSize; + if (status != null) result.status = status; + if (responseSize != null) result.responseSize = responseSize; + if (userAgent != null) result.userAgent = userAgent; + if (remoteIp != null) result.remoteIp = remoteIp; + if (referer != null) result.referer = referer; + if (cacheHit != null) result.cacheHit = cacheHit; + if (cacheValidatedWithOriginServer != null) result.cacheValidatedWithOriginServer = cacheValidatedWithOriginServer; - } - if (cacheLookup != null) { - result.cacheLookup = cacheLookup; - } - if (cacheFillBytes != null) { - result.cacheFillBytes = cacheFillBytes; - } - if (serverIp != null) { - result.serverIp = serverIp; - } - if (latency != null) { - result.latency = latency; - } - if (protocol != null) { - result.protocol = protocol; - } + if (cacheLookup != null) result.cacheLookup = cacheLookup; + if (cacheFillBytes != null) result.cacheFillBytes = cacheFillBytes; + if (serverIp != null) result.serverIp = serverIp; + if (latency != null) result.latency = latency; + if (protocol != null) result.protocol = protocol; return result; } - HttpRequest._() : super(); - factory HttpRequest.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory HttpRequest.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); + + HttpRequest._(); + + factory HttpRequest.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory HttpRequest.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); static final $pb.BuilderInfo _i = $pb.BuilderInfo( _omitMessageNames ? '' : 'HttpRequest', @@ -101,7 +77,7 @@ class HttpRequest extends $pb.GeneratedMessage { ..aOS(1, _omitFieldNames ? '' : 'requestMethod') ..aOS(2, _omitFieldNames ? '' : 'requestUrl') ..aInt64(3, _omitFieldNames ? '' : 'requestSize') - ..a<$core.int>(4, _omitFieldNames ? '' : 'status', $pb.PbFieldType.O3) + ..aI(4, _omitFieldNames ? '' : 'status') ..aInt64(5, _omitFieldNames ? '' : 'responseSize') ..aOS(6, _omitFieldNames ? '' : 'userAgent') ..aOS(7, _omitFieldNames ? '' : 'remoteIp') @@ -116,21 +92,19 @@ class HttpRequest extends $pb.GeneratedMessage { ..aOS(15, _omitFieldNames ? '' : 'protocol') ..hasRequiredFields = false; - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - HttpRequest clone() => HttpRequest()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + HttpRequest clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') HttpRequest copyWith(void Function(HttpRequest) updates) => super.copyWith((message) => updates(message as HttpRequest)) as HttpRequest; + @$core.override $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static HttpRequest create() => HttpRequest._(); + @$core.override HttpRequest createEmptyInstance() => create(); static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') @@ -142,14 +116,11 @@ class HttpRequest extends $pb.GeneratedMessage { @$pb.TagNumber(1) $core.String get requestMethod => $_getSZ(0); @$pb.TagNumber(1) - set requestMethod($core.String v) { - $_setString(0, v); - } - + set requestMethod($core.String value) => $_setString(0, value); @$pb.TagNumber(1) $core.bool hasRequestMethod() => $_has(0); @$pb.TagNumber(1) - void clearRequestMethod() => clearField(1); + void clearRequestMethod() => $_clearField(1); /// The scheme (http, https), the host name, the path and the query /// portion of the URL that was requested. @@ -157,56 +128,44 @@ class HttpRequest extends $pb.GeneratedMessage { @$pb.TagNumber(2) $core.String get requestUrl => $_getSZ(1); @$pb.TagNumber(2) - set requestUrl($core.String v) { - $_setString(1, v); - } - + set requestUrl($core.String value) => $_setString(1, value); @$pb.TagNumber(2) $core.bool hasRequestUrl() => $_has(1); @$pb.TagNumber(2) - void clearRequestUrl() => clearField(2); + void clearRequestUrl() => $_clearField(2); /// The size of the HTTP request message in bytes, including the request /// headers and the request body. @$pb.TagNumber(3) $fixnum.Int64 get requestSize => $_getI64(2); @$pb.TagNumber(3) - set requestSize($fixnum.Int64 v) { - $_setInt64(2, v); - } - + set requestSize($fixnum.Int64 value) => $_setInt64(2, value); @$pb.TagNumber(3) $core.bool hasRequestSize() => $_has(2); @$pb.TagNumber(3) - void clearRequestSize() => clearField(3); + void clearRequestSize() => $_clearField(3); /// The response code indicating the status of response. /// Examples: 200, 404. @$pb.TagNumber(4) $core.int get status => $_getIZ(3); @$pb.TagNumber(4) - set status($core.int v) { - $_setSignedInt32(3, v); - } - + set status($core.int value) => $_setSignedInt32(3, value); @$pb.TagNumber(4) $core.bool hasStatus() => $_has(3); @$pb.TagNumber(4) - void clearStatus() => clearField(4); + void clearStatus() => $_clearField(4); /// The size of the HTTP response message sent back to the client, in bytes, /// including the response headers and the response body. @$pb.TagNumber(5) $fixnum.Int64 get responseSize => $_getI64(4); @$pb.TagNumber(5) - set responseSize($fixnum.Int64 v) { - $_setInt64(4, v); - } - + set responseSize($fixnum.Int64 value) => $_setInt64(4, value); @$pb.TagNumber(5) $core.bool hasResponseSize() => $_has(4); @$pb.TagNumber(5) - void clearResponseSize() => clearField(5); + void clearResponseSize() => $_clearField(5); /// The user agent sent by the client. Example: /// `"Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET @@ -214,14 +173,11 @@ class HttpRequest extends $pb.GeneratedMessage { @$pb.TagNumber(6) $core.String get userAgent => $_getSZ(5); @$pb.TagNumber(6) - set userAgent($core.String v) { - $_setString(5, v); - } - + set userAgent($core.String value) => $_setString(5, value); @$pb.TagNumber(6) $core.bool hasUserAgent() => $_has(5); @$pb.TagNumber(6) - void clearUserAgent() => clearField(6); + void clearUserAgent() => $_clearField(6); /// The IP address (IPv4 or IPv6) of the client that issued the HTTP /// request. This field can include port information. Examples: @@ -229,14 +185,11 @@ class HttpRequest extends $pb.GeneratedMessage { @$pb.TagNumber(7) $core.String get remoteIp => $_getSZ(6); @$pb.TagNumber(7) - set remoteIp($core.String v) { - $_setString(6, v); - } - + set remoteIp($core.String value) => $_setString(6, value); @$pb.TagNumber(7) $core.bool hasRemoteIp() => $_has(6); @$pb.TagNumber(7) - void clearRemoteIp() => clearField(7); + void clearRemoteIp() => $_clearField(7); /// The referer URL of the request, as defined in /// [HTTP/1.1 Header Field @@ -244,28 +197,22 @@ class HttpRequest extends $pb.GeneratedMessage { @$pb.TagNumber(8) $core.String get referer => $_getSZ(7); @$pb.TagNumber(8) - set referer($core.String v) { - $_setString(7, v); - } - + set referer($core.String value) => $_setString(7, value); @$pb.TagNumber(8) $core.bool hasReferer() => $_has(7); @$pb.TagNumber(8) - void clearReferer() => clearField(8); + void clearReferer() => $_clearField(8); /// Whether or not an entity was served from cache /// (with or without validation). @$pb.TagNumber(9) $core.bool get cacheHit => $_getBF(8); @$pb.TagNumber(9) - set cacheHit($core.bool v) { - $_setBool(8, v); - } - + set cacheHit($core.bool value) => $_setBool(8, value); @$pb.TagNumber(9) $core.bool hasCacheHit() => $_has(8); @$pb.TagNumber(9) - void clearCacheHit() => clearField(9); + void clearCacheHit() => $_clearField(9); /// Whether or not the response was validated with the origin server before /// being served from cache. This field is only meaningful if `cache_hit` is @@ -273,41 +220,32 @@ class HttpRequest extends $pb.GeneratedMessage { @$pb.TagNumber(10) $core.bool get cacheValidatedWithOriginServer => $_getBF(9); @$pb.TagNumber(10) - set cacheValidatedWithOriginServer($core.bool v) { - $_setBool(9, v); - } - + set cacheValidatedWithOriginServer($core.bool value) => $_setBool(9, value); @$pb.TagNumber(10) $core.bool hasCacheValidatedWithOriginServer() => $_has(9); @$pb.TagNumber(10) - void clearCacheValidatedWithOriginServer() => clearField(10); + void clearCacheValidatedWithOriginServer() => $_clearField(10); /// Whether or not a cache lookup was attempted. @$pb.TagNumber(11) $core.bool get cacheLookup => $_getBF(10); @$pb.TagNumber(11) - set cacheLookup($core.bool v) { - $_setBool(10, v); - } - + set cacheLookup($core.bool value) => $_setBool(10, value); @$pb.TagNumber(11) $core.bool hasCacheLookup() => $_has(10); @$pb.TagNumber(11) - void clearCacheLookup() => clearField(11); + void clearCacheLookup() => $_clearField(11); /// The number of HTTP response bytes inserted into cache. Set only when a /// cache fill was attempted. @$pb.TagNumber(12) $fixnum.Int64 get cacheFillBytes => $_getI64(11); @$pb.TagNumber(12) - set cacheFillBytes($fixnum.Int64 v) { - $_setInt64(11, v); - } - + set cacheFillBytes($fixnum.Int64 value) => $_setInt64(11, value); @$pb.TagNumber(12) $core.bool hasCacheFillBytes() => $_has(11); @$pb.TagNumber(12) - void clearCacheFillBytes() => clearField(12); + void clearCacheFillBytes() => $_clearField(12); /// The IP address (IPv4 or IPv6) of the origin server that the request was /// sent to. This field can include port information. Examples: @@ -315,28 +253,22 @@ class HttpRequest extends $pb.GeneratedMessage { @$pb.TagNumber(13) $core.String get serverIp => $_getSZ(12); @$pb.TagNumber(13) - set serverIp($core.String v) { - $_setString(12, v); - } - + set serverIp($core.String value) => $_setString(12, value); @$pb.TagNumber(13) $core.bool hasServerIp() => $_has(12); @$pb.TagNumber(13) - void clearServerIp() => clearField(13); + void clearServerIp() => $_clearField(13); /// The request processing latency on the server, from the time the request was /// received until the response was sent. @$pb.TagNumber(14) $0.Duration get latency => $_getN(13); @$pb.TagNumber(14) - set latency($0.Duration v) { - setField(14, v); - } - + set latency($0.Duration value) => $_setField(14, value); @$pb.TagNumber(14) $core.bool hasLatency() => $_has(13); @$pb.TagNumber(14) - void clearLatency() => clearField(14); + void clearLatency() => $_clearField(14); @$pb.TagNumber(14) $0.Duration ensureLatency() => $_ensure(13); @@ -344,16 +276,14 @@ class HttpRequest extends $pb.GeneratedMessage { @$pb.TagNumber(15) $core.String get protocol => $_getSZ(14); @$pb.TagNumber(15) - set protocol($core.String v) { - $_setString(14, v); - } - + set protocol($core.String value) => $_setString(14, value); @$pb.TagNumber(15) $core.bool hasProtocol() => $_has(14); @$pb.TagNumber(15) - void clearProtocol() => clearField(15); + void clearProtocol() => $_clearField(15); } -const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); -const _omitMessageNames = +const $core.bool _omitFieldNames = + $core.bool.fromEnvironment('protobuf.omit_field_names'); +const $core.bool _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/example/googleapis/lib/src/generated/google/logging/type/http_request.pbenum.dart b/example/googleapis/lib/src/generated/google/logging/type/http_request.pbenum.dart index fc82b412..cc3f75e8 100644 --- a/example/googleapis/lib/src/generated/google/logging/type/http_request.pbenum.dart +++ b/example/googleapis/lib/src/generated/google/logging/type/http_request.pbenum.dart @@ -1,10 +1,11 @@ +// This is a generated file - do not edit. // -// Generated code. Do not modify. -// source: google/logging/type/http_request.proto -// -// @dart = 2.12 +// Generated from google/logging/type/http_request.proto. + +// @dart = 3.3 // ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names diff --git a/example/googleapis/lib/src/generated/google/logging/type/http_request.pbjson.dart b/example/googleapis/lib/src/generated/google/logging/type/http_request.pbjson.dart index 8cb06df6..7fd5ef2a 100644 --- a/example/googleapis/lib/src/generated/google/logging/type/http_request.pbjson.dart +++ b/example/googleapis/lib/src/generated/google/logging/type/http_request.pbjson.dart @@ -1,13 +1,14 @@ +// This is a generated file - do not edit. // -// Generated code. Do not modify. -// source: google/logging/type/http_request.proto -// -// @dart = 2.12 +// Generated from google/logging/type/http_request.proto. + +// @dart = 3.3 // ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names, unused_import import 'dart:convert' as $convert; import 'dart:core' as $core; diff --git a/example/googleapis/lib/src/generated/google/logging/type/log_severity.pb.dart b/example/googleapis/lib/src/generated/google/logging/type/log_severity.pb.dart index da0684fc..9845a889 100644 --- a/example/googleapis/lib/src/generated/google/logging/type/log_severity.pb.dart +++ b/example/googleapis/lib/src/generated/google/logging/type/log_severity.pb.dart @@ -1,14 +1,17 @@ +// This is a generated file - do not edit. // -// Generated code. Do not modify. -// source: google/logging/type/log_severity.proto -// -// @dart = 2.12 +// Generated from google/logging/type/log_severity.proto. + +// @dart = 3.3 // ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names import 'dart:core' as $core; +export 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions; + export 'log_severity.pbenum.dart'; diff --git a/example/googleapis/lib/src/generated/google/logging/type/log_severity.pbenum.dart b/example/googleapis/lib/src/generated/google/logging/type/log_severity.pbenum.dart index f9816c97..29645139 100644 --- a/example/googleapis/lib/src/generated/google/logging/type/log_severity.pbenum.dart +++ b/example/googleapis/lib/src/generated/google/logging/type/log_severity.pbenum.dart @@ -1,50 +1,69 @@ +// This is a generated file - do not edit. // -// Generated code. Do not modify. -// source: google/logging/type/log_severity.proto -// -// @dart = 2.12 +// Generated from google/logging/type/log_severity.proto. + +// @dart = 3.3 // ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names import 'dart:core' as $core; import 'package:protobuf/protobuf.dart' as $pb; -/// The severity of the event described in a log entry, expressed as one of the -/// standard severity levels listed below. For your reference, the levels are -/// assigned the listed numeric values. The effect of using numeric values other -/// than those listed is undefined. +/// The severity of the event described in a log entry, expressed as one of the +/// standard severity levels listed below. For your reference, the levels are +/// assigned the listed numeric values. The effect of using numeric values other +/// than those listed is undefined. /// -/// You can filter for log entries by severity. For example, the following -/// filter expression will match log entries with severities `INFO`, `NOTICE`, -/// and `WARNING`: +/// You can filter for log entries by severity. For example, the following +/// filter expression will match log entries with severities `INFO`, `NOTICE`, +/// and `WARNING`: /// -/// severity > DEBUG AND severity <= WARNING +/// severity > DEBUG AND severity <= WARNING /// -/// If you are writing log entries, you should map other severity encodings to -/// one of these standard levels. For example, you might map all of Java's FINE, -/// FINER, and FINEST levels to `LogSeverity.DEBUG`. You can preserve the -/// original severity level in the log entry payload if you wish. +/// If you are writing log entries, you should map other severity encodings to +/// one of these standard levels. For example, you might map all of Java's FINE, +/// FINER, and FINEST levels to `LogSeverity.DEBUG`. You can preserve the +/// original severity level in the log entry payload if you wish. class LogSeverity extends $pb.ProtobufEnum { + /// (0) The log entry has no assigned severity level. static const LogSeverity DEFAULT = LogSeverity._(0, _omitEnumNames ? '' : 'DEFAULT'); + + /// (100) Debug or trace information. static const LogSeverity DEBUG = LogSeverity._(100, _omitEnumNames ? '' : 'DEBUG'); + + /// (200) Routine information, such as ongoing status or performance. static const LogSeverity INFO = LogSeverity._(200, _omitEnumNames ? '' : 'INFO'); + + /// (300) Normal but significant events, such as start up, shut down, or + /// a configuration change. static const LogSeverity NOTICE = LogSeverity._(300, _omitEnumNames ? '' : 'NOTICE'); + + /// (400) Warning events might cause problems. static const LogSeverity WARNING = LogSeverity._(400, _omitEnumNames ? '' : 'WARNING'); + + /// (500) Error events are likely to cause problems. static const LogSeverity ERROR = LogSeverity._(500, _omitEnumNames ? '' : 'ERROR'); + + /// (600) Critical events cause more severe problems or outages. static const LogSeverity CRITICAL = LogSeverity._(600, _omitEnumNames ? '' : 'CRITICAL'); + + /// (700) A person must take an action immediately. static const LogSeverity ALERT = LogSeverity._(700, _omitEnumNames ? '' : 'ALERT'); + + /// (800) One or more systems are unusable. static const LogSeverity EMERGENCY = LogSeverity._(800, _omitEnumNames ? '' : 'EMERGENCY'); @@ -64,7 +83,8 @@ class LogSeverity extends $pb.ProtobufEnum { $pb.ProtobufEnum.initByValue(values); static LogSeverity? valueOf($core.int value) => _byValue[value]; - const LogSeverity._($core.int v, $core.String n) : super(v, n); + const LogSeverity._(super.value, super.name); } -const _omitEnumNames = $core.bool.fromEnvironment('protobuf.omit_enum_names'); +const $core.bool _omitEnumNames = + $core.bool.fromEnvironment('protobuf.omit_enum_names'); diff --git a/example/googleapis/lib/src/generated/google/logging/type/log_severity.pbjson.dart b/example/googleapis/lib/src/generated/google/logging/type/log_severity.pbjson.dart index 37d3dfd9..5c9d3ed3 100644 --- a/example/googleapis/lib/src/generated/google/logging/type/log_severity.pbjson.dart +++ b/example/googleapis/lib/src/generated/google/logging/type/log_severity.pbjson.dart @@ -1,13 +1,14 @@ +// This is a generated file - do not edit. // -// Generated code. Do not modify. -// source: google/logging/type/log_severity.proto -// -// @dart = 2.12 +// Generated from google/logging/type/log_severity.proto. + +// @dart = 3.3 // ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names, unused_import import 'dart:convert' as $convert; import 'dart:core' as $core; diff --git a/example/googleapis/lib/src/generated/google/logging/v2/log_entry.pb.dart b/example/googleapis/lib/src/generated/google/logging/v2/log_entry.pb.dart index e4a71040..8b252428 100644 --- a/example/googleapis/lib/src/generated/google/logging/v2/log_entry.pb.dart +++ b/example/googleapis/lib/src/generated/google/logging/v2/log_entry.pb.dart @@ -1,13 +1,14 @@ +// This is a generated file - do not edit. // -// Generated code. Do not modify. -// source: google/logging/v2/log_entry.proto -// -// @dart = 2.12 +// Generated from google/logging/v2/log_entry.proto. + +// @dart = 3.3 // ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names import 'dart:core' as $core; @@ -21,6 +22,8 @@ import '../../protobuf/timestamp.pb.dart' as $4; import '../type/http_request.pb.dart' as $2; import '../type/log_severity.pbenum.dart' as $5; +export 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions; + enum LogEntry_Payload { protoPayload, textPayload, jsonPayload, notSet } /// An individual entry in a log. @@ -34,7 +37,7 @@ class LogEntry extends $pb.GeneratedMessage { $3.MonitoredResource? resource, $4.Timestamp? timestamp, $5.LogSeverity? severity, - $core.Map<$core.String, $core.String>? labels, + $core.Iterable<$core.MapEntry<$core.String, $core.String>>? labels, $core.String? logName, LogEntryOperation? operation, $core.String? trace, @@ -45,66 +48,34 @@ class LogEntry extends $pb.GeneratedMessage { LogSplit? split, }) { final result = create(); - if (protoPayload != null) { - result.protoPayload = protoPayload; - } - if (textPayload != null) { - result.textPayload = textPayload; - } - if (insertId != null) { - result.insertId = insertId; - } - if (jsonPayload != null) { - result.jsonPayload = jsonPayload; - } - if (httpRequest != null) { - result.httpRequest = httpRequest; - } - if (resource != null) { - result.resource = resource; - } - if (timestamp != null) { - result.timestamp = timestamp; - } - if (severity != null) { - result.severity = severity; - } - if (labels != null) { - result.labels.addAll(labels); - } - if (logName != null) { - result.logName = logName; - } - if (operation != null) { - result.operation = operation; - } - if (trace != null) { - result.trace = trace; - } - if (sourceLocation != null) { - result.sourceLocation = sourceLocation; - } - if (receiveTimestamp != null) { - result.receiveTimestamp = receiveTimestamp; - } - if (spanId != null) { - result.spanId = spanId; - } - if (traceSampled != null) { - result.traceSampled = traceSampled; - } - if (split != null) { - result.split = split; - } + if (protoPayload != null) result.protoPayload = protoPayload; + if (textPayload != null) result.textPayload = textPayload; + if (insertId != null) result.insertId = insertId; + if (jsonPayload != null) result.jsonPayload = jsonPayload; + if (httpRequest != null) result.httpRequest = httpRequest; + if (resource != null) result.resource = resource; + if (timestamp != null) result.timestamp = timestamp; + if (severity != null) result.severity = severity; + if (labels != null) result.labels.addEntries(labels); + if (logName != null) result.logName = logName; + if (operation != null) result.operation = operation; + if (trace != null) result.trace = trace; + if (sourceLocation != null) result.sourceLocation = sourceLocation; + if (receiveTimestamp != null) result.receiveTimestamp = receiveTimestamp; + if (spanId != null) result.spanId = spanId; + if (traceSampled != null) result.traceSampled = traceSampled; + if (split != null) result.split = split; return result; } - LogEntry._() : super(); - factory LogEntry.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory LogEntry.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); + + LogEntry._(); + + factory LogEntry.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory LogEntry.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); static const $core.Map<$core.int, LogEntry_Payload> _LogEntry_PayloadByTag = { 2: LogEntry_Payload.protoPayload, @@ -130,10 +101,7 @@ class LogEntry extends $pb.GeneratedMessage { subBuilder: $3.MonitoredResource.create) ..aOM<$4.Timestamp>(9, _omitFieldNames ? '' : 'timestamp', subBuilder: $4.Timestamp.create) - ..e<$5.LogSeverity>( - 10, _omitFieldNames ? '' : 'severity', $pb.PbFieldType.OE, - defaultOrMaker: $5.LogSeverity.DEFAULT, - valueOf: $5.LogSeverity.valueOf, + ..aE<$5.LogSeverity>(10, _omitFieldNames ? '' : 'severity', enumValues: $5.LogSeverity.values) ..m<$core.String, $core.String>(11, _omitFieldNames ? '' : 'labels', entryClassName: 'LogEntry.LabelsEntry', @@ -154,20 +122,18 @@ class LogEntry extends $pb.GeneratedMessage { subBuilder: LogSplit.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') - LogEntry clone() => LogEntry()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + LogEntry clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') LogEntry copyWith(void Function(LogEntry) updates) => super.copyWith((message) => updates(message as LogEntry)) as LogEntry; + @$core.override $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static LogEntry create() => LogEntry._(); + @$core.override LogEntry createEmptyInstance() => create(); static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') @@ -175,28 +141,31 @@ class LogEntry extends $pb.GeneratedMessage { _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static LogEntry? _defaultInstance; + @$pb.TagNumber(2) + @$pb.TagNumber(3) + @$pb.TagNumber(6) LogEntry_Payload whichPayload() => _LogEntry_PayloadByTag[$_whichOneof(0)]!; - void clearPayload() => clearField($_whichOneof(0)); + @$pb.TagNumber(2) + @$pb.TagNumber(3) + @$pb.TagNumber(6) + void clearPayload() => $_clearField($_whichOneof(0)); - /// The log entry payload, represented as a protocol buffer. Some Google - /// Cloud Platform services use this field for their log entry payloads. + /// The log entry payload, represented as a protocol buffer. Some Google + /// Cloud Platform services use this field for their log entry payloads. /// - /// The following protocol buffer types are supported; user-defined types - /// are not supported: + /// The following protocol buffer types are supported; user-defined types + /// are not supported: /// - /// "type.googleapis.com/google.cloud.audit.AuditLog" - /// "type.googleapis.com/google.appengine.logging.v1.RequestLog" + /// "type.googleapis.com/google.cloud.audit.AuditLog" + /// "type.googleapis.com/google.appengine.logging.v1.RequestLog" @$pb.TagNumber(2) $0.Any get protoPayload => $_getN(0); @$pb.TagNumber(2) - set protoPayload($0.Any v) { - setField(2, v); - } - + set protoPayload($0.Any value) => $_setField(2, value); @$pb.TagNumber(2) $core.bool hasProtoPayload() => $_has(0); @$pb.TagNumber(2) - void clearProtoPayload() => clearField(2); + void clearProtoPayload() => $_clearField(2); @$pb.TagNumber(2) $0.Any ensureProtoPayload() => $_ensure(0); @@ -204,51 +173,42 @@ class LogEntry extends $pb.GeneratedMessage { @$pb.TagNumber(3) $core.String get textPayload => $_getSZ(1); @$pb.TagNumber(3) - set textPayload($core.String v) { - $_setString(1, v); - } - + set textPayload($core.String value) => $_setString(1, value); @$pb.TagNumber(3) $core.bool hasTextPayload() => $_has(1); @$pb.TagNumber(3) - void clearTextPayload() => clearField(3); + void clearTextPayload() => $_clearField(3); - /// Optional. A unique identifier for the log entry. If you provide a value, - /// then Logging considers other log entries in the same project, with the same - /// `timestamp`, and with the same `insert_id` to be duplicates which are - /// removed in a single query result. However, there are no guarantees of - /// de-duplication in the export of logs. + /// Optional. A unique identifier for the log entry. If you provide a value, + /// then Logging considers other log entries in the same project, with the same + /// `timestamp`, and with the same `insert_id` to be duplicates which are + /// removed in a single query result. However, there are no guarantees of + /// de-duplication in the export of logs. /// - /// If the `insert_id` is omitted when writing a log entry, the Logging API - /// assigns its own unique identifier in this field. + /// If the `insert_id` is omitted when writing a log entry, the Logging API + /// assigns its own unique identifier in this field. /// - /// In queries, the `insert_id` is also used to order log entries that have - /// the same `log_name` and `timestamp` values. + /// In queries, the `insert_id` is also used to order log entries that have + /// the same `log_name` and `timestamp` values. @$pb.TagNumber(4) $core.String get insertId => $_getSZ(2); @$pb.TagNumber(4) - set insertId($core.String v) { - $_setString(2, v); - } - + set insertId($core.String value) => $_setString(2, value); @$pb.TagNumber(4) $core.bool hasInsertId() => $_has(2); @$pb.TagNumber(4) - void clearInsertId() => clearField(4); + void clearInsertId() => $_clearField(4); /// The log entry payload, represented as a structure that is /// expressed as a JSON object. @$pb.TagNumber(6) $1.Struct get jsonPayload => $_getN(3); @$pb.TagNumber(6) - set jsonPayload($1.Struct v) { - setField(6, v); - } - + set jsonPayload($1.Struct value) => $_setField(6, value); @$pb.TagNumber(6) $core.bool hasJsonPayload() => $_has(3); @$pb.TagNumber(6) - void clearJsonPayload() => clearField(6); + void clearJsonPayload() => $_clearField(6); @$pb.TagNumber(6) $1.Struct ensureJsonPayload() => $_ensure(3); @@ -257,59 +217,50 @@ class LogEntry extends $pb.GeneratedMessage { @$pb.TagNumber(7) $2.HttpRequest get httpRequest => $_getN(4); @$pb.TagNumber(7) - set httpRequest($2.HttpRequest v) { - setField(7, v); - } - + set httpRequest($2.HttpRequest value) => $_setField(7, value); @$pb.TagNumber(7) $core.bool hasHttpRequest() => $_has(4); @$pb.TagNumber(7) - void clearHttpRequest() => clearField(7); + void clearHttpRequest() => $_clearField(7); @$pb.TagNumber(7) $2.HttpRequest ensureHttpRequest() => $_ensure(4); - /// Required. The monitored resource that produced this log entry. + /// Required. The monitored resource that produced this log entry. /// - /// Example: a log entry that reports a database error would be associated with - /// the monitored resource designating the particular database that reported - /// the error. + /// Example: a log entry that reports a database error would be associated with + /// the monitored resource designating the particular database that reported + /// the error. @$pb.TagNumber(8) $3.MonitoredResource get resource => $_getN(5); @$pb.TagNumber(8) - set resource($3.MonitoredResource v) { - setField(8, v); - } - + set resource($3.MonitoredResource value) => $_setField(8, value); @$pb.TagNumber(8) $core.bool hasResource() => $_has(5); @$pb.TagNumber(8) - void clearResource() => clearField(8); + void clearResource() => $_clearField(8); @$pb.TagNumber(8) $3.MonitoredResource ensureResource() => $_ensure(5); - /// Optional. The time the event described by the log entry occurred. This time - /// is used to compute the log entry's age and to enforce the logs retention - /// period. If this field is omitted in a new log entry, then Logging assigns - /// it the current time. Timestamps have nanosecond accuracy, but trailing - /// zeros in the fractional seconds might be omitted when the timestamp is - /// displayed. + /// Optional. The time the event described by the log entry occurred. This time + /// is used to compute the log entry's age and to enforce the logs retention + /// period. If this field is omitted in a new log entry, then Logging assigns + /// it the current time. Timestamps have nanosecond accuracy, but trailing + /// zeros in the fractional seconds might be omitted when the timestamp is + /// displayed. /// - /// Incoming log entries must have timestamps that don't exceed the - /// [logs retention - /// period](https://cloud.google.com/logging/quotas#logs_retention_periods) in - /// the past, and that don't exceed 24 hours in the future. Log entries outside - /// those time boundaries aren't ingested by Logging. + /// Incoming log entries must have timestamps that don't exceed the + /// [logs retention + /// period](https://cloud.google.com/logging/quotas#logs_retention_periods) in + /// the past, and that don't exceed 24 hours in the future. Log entries outside + /// those time boundaries aren't ingested by Logging. @$pb.TagNumber(9) $4.Timestamp get timestamp => $_getN(6); @$pb.TagNumber(9) - set timestamp($4.Timestamp v) { - setField(9, v); - } - + set timestamp($4.Timestamp value) => $_setField(9, value); @$pb.TagNumber(9) $core.bool hasTimestamp() => $_has(6); @$pb.TagNumber(9) - void clearTimestamp() => clearField(9); + void clearTimestamp() => $_clearField(9); @$pb.TagNumber(9) $4.Timestamp ensureTimestamp() => $_ensure(6); @@ -318,117 +269,102 @@ class LogEntry extends $pb.GeneratedMessage { @$pb.TagNumber(10) $5.LogSeverity get severity => $_getN(7); @$pb.TagNumber(10) - set severity($5.LogSeverity v) { - setField(10, v); - } - + set severity($5.LogSeverity value) => $_setField(10, value); @$pb.TagNumber(10) $core.bool hasSeverity() => $_has(7); @$pb.TagNumber(10) - void clearSeverity() => clearField(10); + void clearSeverity() => $_clearField(10); - /// Optional. A map of key, value pairs that provides additional information - /// about the log entry. The labels can be user-defined or system-defined. + /// Optional. A map of key, value pairs that provides additional information + /// about the log entry. The labels can be user-defined or system-defined. /// - /// User-defined labels are arbitrary key, value pairs that you can use to - /// classify logs. + /// User-defined labels are arbitrary key, value pairs that you can use to + /// classify logs. /// - /// System-defined labels are defined by GCP services for platform logs. - /// They have two components - a service namespace component and the - /// attribute name. For example: `compute.googleapis.com/resource_name`. + /// System-defined labels are defined by GCP services for platform logs. + /// They have two components - a service namespace component and the + /// attribute name. For example: `compute.googleapis.com/resource_name`. /// - /// Cloud Logging truncates label keys that exceed 512 B and label - /// values that exceed 64 KB upon their associated log entry being - /// written. The truncation is indicated by an ellipsis at the - /// end of the character string. + /// Cloud Logging truncates label keys that exceed 512 B and label + /// values that exceed 64 KB upon their associated log entry being + /// written. The truncation is indicated by an ellipsis at the + /// end of the character string. @$pb.TagNumber(11) - $core.Map<$core.String, $core.String> get labels => $_getMap(8); + $pb.PbMap<$core.String, $core.String> get labels => $_getMap(8); - /// Required. The resource name of the log to which this log entry belongs: + /// Required. The resource name of the log to which this log entry belongs: /// - /// "projects/[PROJECT_ID]/logs/[LOG_ID]" - /// "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" - /// "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" - /// "folders/[FOLDER_ID]/logs/[LOG_ID]" + /// "projects/[PROJECT_ID]/logs/[LOG_ID]" + /// "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" + /// "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" + /// "folders/[FOLDER_ID]/logs/[LOG_ID]" /// - /// A project number may be used in place of PROJECT_ID. The project number is - /// translated to its corresponding PROJECT_ID internally and the `log_name` - /// field will contain PROJECT_ID in queries and exports. + /// A project number may be used in place of PROJECT_ID. The project number is + /// translated to its corresponding PROJECT_ID internally and the `log_name` + /// field will contain PROJECT_ID in queries and exports. /// - /// `[LOG_ID]` must be URL-encoded within `log_name`. Example: - /// `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`. + /// `[LOG_ID]` must be URL-encoded within `log_name`. Example: + /// `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`. /// - /// `[LOG_ID]` must be less than 512 characters long and can only include the - /// following characters: upper and lower case alphanumeric characters, - /// forward-slash, underscore, hyphen, and period. + /// `[LOG_ID]` must be less than 512 characters long and can only include the + /// following characters: upper and lower case alphanumeric characters, + /// forward-slash, underscore, hyphen, and period. /// - /// For backward compatibility, if `log_name` begins with a forward-slash, such - /// as `/projects/...`, then the log entry is ingested as usual, but the - /// forward-slash is removed. Listing the log entry will not show the leading - /// slash and filtering for a log name with a leading slash will never return - /// any results. + /// For backward compatibility, if `log_name` begins with a forward-slash, such + /// as `/projects/...`, then the log entry is ingested as usual, but the + /// forward-slash is removed. Listing the log entry will not show the leading + /// slash and filtering for a log name with a leading slash will never return + /// any results. @$pb.TagNumber(12) $core.String get logName => $_getSZ(9); @$pb.TagNumber(12) - set logName($core.String v) { - $_setString(9, v); - } - + set logName($core.String value) => $_setString(9, value); @$pb.TagNumber(12) $core.bool hasLogName() => $_has(9); @$pb.TagNumber(12) - void clearLogName() => clearField(12); + void clearLogName() => $_clearField(12); /// Optional. Information about an operation associated with the log entry, if /// applicable. @$pb.TagNumber(15) LogEntryOperation get operation => $_getN(10); @$pb.TagNumber(15) - set operation(LogEntryOperation v) { - setField(15, v); - } - + set operation(LogEntryOperation value) => $_setField(15, value); @$pb.TagNumber(15) $core.bool hasOperation() => $_has(10); @$pb.TagNumber(15) - void clearOperation() => clearField(15); + void clearOperation() => $_clearField(15); @$pb.TagNumber(15) LogEntryOperation ensureOperation() => $_ensure(10); - /// Optional. The REST resource name of the trace being written to - /// [Cloud Trace](https://cloud.google.com/trace) in - /// association with this log entry. For example, if your trace data is stored - /// in the Cloud project "my-trace-project" and if the service that is creating - /// the log entry receives a trace header that includes the trace ID "12345", - /// then the service should use "projects/my-tracing-project/traces/12345". + /// Optional. The REST resource name of the trace being written to + /// [Cloud Trace](https://cloud.google.com/trace) in + /// association with this log entry. For example, if your trace data is stored + /// in the Cloud project "my-trace-project" and if the service that is creating + /// the log entry receives a trace header that includes the trace ID "12345", + /// then the service should use "projects/my-tracing-project/traces/12345". /// - /// The `trace` field provides the link between logs and traces. By using - /// this field, you can navigate from a log entry to a trace. + /// The `trace` field provides the link between logs and traces. By using + /// this field, you can navigate from a log entry to a trace. @$pb.TagNumber(22) $core.String get trace => $_getSZ(11); @$pb.TagNumber(22) - set trace($core.String v) { - $_setString(11, v); - } - + set trace($core.String value) => $_setString(11, value); @$pb.TagNumber(22) $core.bool hasTrace() => $_has(11); @$pb.TagNumber(22) - void clearTrace() => clearField(22); + void clearTrace() => $_clearField(22); /// Optional. Source code location information associated with the log entry, /// if any. @$pb.TagNumber(23) LogEntrySourceLocation get sourceLocation => $_getN(12); @$pb.TagNumber(23) - set sourceLocation(LogEntrySourceLocation v) { - setField(23, v); - } - + set sourceLocation(LogEntrySourceLocation value) => $_setField(23, value); @$pb.TagNumber(23) $core.bool hasSourceLocation() => $_has(12); @$pb.TagNumber(23) - void clearSourceLocation() => clearField(23); + void clearSourceLocation() => $_clearField(23); @$pb.TagNumber(23) LogEntrySourceLocation ensureSourceLocation() => $_ensure(12); @@ -436,91 +372,79 @@ class LogEntry extends $pb.GeneratedMessage { @$pb.TagNumber(24) $4.Timestamp get receiveTimestamp => $_getN(13); @$pb.TagNumber(24) - set receiveTimestamp($4.Timestamp v) { - setField(24, v); - } - + set receiveTimestamp($4.Timestamp value) => $_setField(24, value); @$pb.TagNumber(24) $core.bool hasReceiveTimestamp() => $_has(13); @$pb.TagNumber(24) - void clearReceiveTimestamp() => clearField(24); + void clearReceiveTimestamp() => $_clearField(24); @$pb.TagNumber(24) $4.Timestamp ensureReceiveTimestamp() => $_ensure(13); - /// Optional. The ID of the [Cloud Trace](https://cloud.google.com/trace) span - /// associated with the current operation in which the log is being written. - /// For example, if a span has the REST resource name of - /// "projects/some-project/traces/some-trace/spans/some-span-id", then the - /// `span_id` field is "some-span-id". + /// Optional. The ID of the [Cloud Trace](https://cloud.google.com/trace) span + /// associated with the current operation in which the log is being written. + /// For example, if a span has the REST resource name of + /// "projects/some-project/traces/some-trace/spans/some-span-id", then the + /// `span_id` field is "some-span-id". /// - /// A - /// [Span](https://cloud.google.com/trace/docs/reference/v2/rest/v2/projects.traces/batchWrite#Span) - /// represents a single operation within a trace. Whereas a trace may involve - /// multiple different microservices running on multiple different machines, - /// a span generally corresponds to a single logical operation being performed - /// in a single instance of a microservice on one specific machine. Spans - /// are the nodes within the tree that is a trace. + /// A + /// [Span](https://cloud.google.com/trace/docs/reference/v2/rest/v2/projects.traces/batchWrite#Span) + /// represents a single operation within a trace. Whereas a trace may involve + /// multiple different microservices running on multiple different machines, + /// a span generally corresponds to a single logical operation being performed + /// in a single instance of a microservice on one specific machine. Spans + /// are the nodes within the tree that is a trace. /// - /// Applications that are [instrumented for - /// tracing](https://cloud.google.com/trace/docs/setup) will generally assign a - /// new, unique span ID on each incoming request. It is also common to create - /// and record additional spans corresponding to internal processing elements - /// as well as issuing requests to dependencies. + /// Applications that are [instrumented for + /// tracing](https://cloud.google.com/trace/docs/setup) will generally assign a + /// new, unique span ID on each incoming request. It is also common to create + /// and record additional spans corresponding to internal processing elements + /// as well as issuing requests to dependencies. /// - /// The span ID is expected to be a 16-character, hexadecimal encoding of an - /// 8-byte array and should not be zero. It should be unique within the trace - /// and should, ideally, be generated in a manner that is uniformly random. + /// The span ID is expected to be a 16-character, hexadecimal encoding of an + /// 8-byte array and should not be zero. It should be unique within the trace + /// and should, ideally, be generated in a manner that is uniformly random. /// - /// Example values: + /// Example values: /// - /// - `000000000000004a` - /// - `7a2190356c3fc94b` - /// - `0000f00300090021` - /// - `d39223e101960076` + /// - `000000000000004a` + /// - `7a2190356c3fc94b` + /// - `0000f00300090021` + /// - `d39223e101960076` @$pb.TagNumber(27) $core.String get spanId => $_getSZ(14); @$pb.TagNumber(27) - set spanId($core.String v) { - $_setString(14, v); - } - + set spanId($core.String value) => $_setString(14, value); @$pb.TagNumber(27) $core.bool hasSpanId() => $_has(14); @$pb.TagNumber(27) - void clearSpanId() => clearField(27); + void clearSpanId() => $_clearField(27); - /// Optional. The sampling decision of the trace associated with the log entry. + /// Optional. The sampling decision of the trace associated with the log entry. /// - /// True means that the trace resource name in the `trace` field was sampled - /// for storage in a trace backend. False means that the trace was not sampled - /// for storage when this log entry was written, or the sampling decision was - /// unknown at the time. A non-sampled `trace` value is still useful as a - /// request correlation identifier. The default is False. + /// True means that the trace resource name in the `trace` field was sampled + /// for storage in a trace backend. False means that the trace was not sampled + /// for storage when this log entry was written, or the sampling decision was + /// unknown at the time. A non-sampled `trace` value is still useful as a + /// request correlation identifier. The default is False. @$pb.TagNumber(30) $core.bool get traceSampled => $_getBF(15); @$pb.TagNumber(30) - set traceSampled($core.bool v) { - $_setBool(15, v); - } - + set traceSampled($core.bool value) => $_setBool(15, value); @$pb.TagNumber(30) $core.bool hasTraceSampled() => $_has(15); @$pb.TagNumber(30) - void clearTraceSampled() => clearField(30); + void clearTraceSampled() => $_clearField(30); /// Optional. Information indicating this LogEntry is part of a sequence of /// multiple log entries split from a single LogEntry. @$pb.TagNumber(35) LogSplit get split => $_getN(16); @$pb.TagNumber(35) - set split(LogSplit v) { - setField(35, v); - } - + set split(LogSplit value) => $_setField(35, value); @$pb.TagNumber(35) $core.bool hasSplit() => $_has(16); @$pb.TagNumber(35) - void clearSplit() => clearField(35); + void clearSplit() => $_clearField(35); @$pb.TagNumber(35) LogSplit ensureSplit() => $_ensure(16); } @@ -535,27 +459,21 @@ class LogEntryOperation extends $pb.GeneratedMessage { $core.bool? last, }) { final result = create(); - if (id != null) { - result.id = id; - } - if (producer != null) { - result.producer = producer; - } - if (first != null) { - result.first = first; - } - if (last != null) { - result.last = last; - } + if (id != null) result.id = id; + if (producer != null) result.producer = producer; + if (first != null) result.first = first; + if (last != null) result.last = last; return result; } - LogEntryOperation._() : super(); - factory LogEntryOperation.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory LogEntryOperation.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); + + LogEntryOperation._(); + + factory LogEntryOperation.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory LogEntryOperation.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); static final $pb.BuilderInfo _i = $pb.BuilderInfo( _omitMessageNames ? '' : 'LogEntryOperation', @@ -568,21 +486,19 @@ class LogEntryOperation extends $pb.GeneratedMessage { ..aOB(4, _omitFieldNames ? '' : 'last') ..hasRequiredFields = false; - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - LogEntryOperation clone() => LogEntryOperation()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + LogEntryOperation clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') LogEntryOperation copyWith(void Function(LogEntryOperation) updates) => super.copyWith((message) => updates(message as LogEntryOperation)) as LogEntryOperation; + @$core.override $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static LogEntryOperation create() => LogEntryOperation._(); + @$core.override LogEntryOperation createEmptyInstance() => create(); static $pb.PbList createRepeated() => $pb.PbList(); @@ -596,14 +512,11 @@ class LogEntryOperation extends $pb.GeneratedMessage { @$pb.TagNumber(1) $core.String get id => $_getSZ(0); @$pb.TagNumber(1) - set id($core.String v) { - $_setString(0, v); - } - + set id($core.String value) => $_setString(0, value); @$pb.TagNumber(1) $core.bool hasId() => $_has(0); @$pb.TagNumber(1) - void clearId() => clearField(1); + void clearId() => $_clearField(1); /// Optional. An arbitrary producer identifier. The combination of `id` and /// `producer` must be globally unique. Examples for `producer`: @@ -611,40 +524,31 @@ class LogEntryOperation extends $pb.GeneratedMessage { @$pb.TagNumber(2) $core.String get producer => $_getSZ(1); @$pb.TagNumber(2) - set producer($core.String v) { - $_setString(1, v); - } - + set producer($core.String value) => $_setString(1, value); @$pb.TagNumber(2) $core.bool hasProducer() => $_has(1); @$pb.TagNumber(2) - void clearProducer() => clearField(2); + void clearProducer() => $_clearField(2); /// Optional. Set this to True if this is the first log entry in the operation. @$pb.TagNumber(3) $core.bool get first => $_getBF(2); @$pb.TagNumber(3) - set first($core.bool v) { - $_setBool(2, v); - } - + set first($core.bool value) => $_setBool(2, value); @$pb.TagNumber(3) $core.bool hasFirst() => $_has(2); @$pb.TagNumber(3) - void clearFirst() => clearField(3); + void clearFirst() => $_clearField(3); /// Optional. Set this to True if this is the last log entry in the operation. @$pb.TagNumber(4) $core.bool get last => $_getBF(3); @$pb.TagNumber(4) - set last($core.bool v) { - $_setBool(3, v); - } - + set last($core.bool value) => $_setBool(3, value); @$pb.TagNumber(4) $core.bool hasLast() => $_has(3); @$pb.TagNumber(4) - void clearLast() => clearField(4); + void clearLast() => $_clearField(4); } /// Additional information about the source code location that produced the log @@ -656,24 +560,20 @@ class LogEntrySourceLocation extends $pb.GeneratedMessage { $core.String? function, }) { final result = create(); - if (file != null) { - result.file = file; - } - if (line != null) { - result.line = line; - } - if (function != null) { - result.function = function; - } + if (file != null) result.file = file; + if (line != null) result.line = line; + if (function != null) result.function = function; return result; } - LogEntrySourceLocation._() : super(); - factory LogEntrySourceLocation.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory LogEntrySourceLocation.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); + + LogEntrySourceLocation._(); + + factory LogEntrySourceLocation.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory LogEntrySourceLocation.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); static final $pb.BuilderInfo _i = $pb.BuilderInfo( _omitMessageNames ? '' : 'LogEntrySourceLocation', @@ -685,23 +585,20 @@ class LogEntrySourceLocation extends $pb.GeneratedMessage { ..aOS(3, _omitFieldNames ? '' : 'function') ..hasRequiredFields = false; - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - LogEntrySourceLocation clone() => - LogEntrySourceLocation()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + LogEntrySourceLocation clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') LogEntrySourceLocation copyWith( void Function(LogEntrySourceLocation) updates) => super.copyWith((message) => updates(message as LogEntrySourceLocation)) as LogEntrySourceLocation; + @$core.override $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static LogEntrySourceLocation create() => LogEntrySourceLocation._(); + @$core.override LogEntrySourceLocation createEmptyInstance() => create(); static $pb.PbList createRepeated() => $pb.PbList(); @@ -715,28 +612,22 @@ class LogEntrySourceLocation extends $pb.GeneratedMessage { @$pb.TagNumber(1) $core.String get file => $_getSZ(0); @$pb.TagNumber(1) - set file($core.String v) { - $_setString(0, v); - } - + set file($core.String value) => $_setString(0, value); @$pb.TagNumber(1) $core.bool hasFile() => $_has(0); @$pb.TagNumber(1) - void clearFile() => clearField(1); + void clearFile() => $_clearField(1); /// Optional. Line within the source file. 1-based; 0 indicates no line number /// available. @$pb.TagNumber(2) $fixnum.Int64 get line => $_getI64(1); @$pb.TagNumber(2) - set line($fixnum.Int64 v) { - $_setInt64(1, v); - } - + set line($fixnum.Int64 value) => $_setInt64(1, value); @$pb.TagNumber(2) $core.bool hasLine() => $_has(1); @$pb.TagNumber(2) - void clearLine() => clearField(2); + void clearLine() => $_clearField(2); /// Optional. Human-readable name of the function or method being invoked, with /// optional context such as the class or package name. This information may be @@ -747,14 +638,11 @@ class LogEntrySourceLocation extends $pb.GeneratedMessage { @$pb.TagNumber(3) $core.String get function => $_getSZ(2); @$pb.TagNumber(3) - set function($core.String v) { - $_setString(2, v); - } - + set function($core.String value) => $_setString(2, value); @$pb.TagNumber(3) $core.bool hasFunction() => $_has(2); @$pb.TagNumber(3) - void clearFunction() => clearField(3); + void clearFunction() => $_clearField(3); } /// Additional information used to correlate multiple log entries. Used when a @@ -767,24 +655,20 @@ class LogSplit extends $pb.GeneratedMessage { $core.int? totalSplits, }) { final result = create(); - if (uid != null) { - result.uid = uid; - } - if (index != null) { - result.index = index; - } - if (totalSplits != null) { - result.totalSplits = totalSplits; - } + if (uid != null) result.uid = uid; + if (index != null) result.index = index; + if (totalSplits != null) result.totalSplits = totalSplits; return result; } - LogSplit._() : super(); - factory LogSplit.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory LogSplit.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); + + LogSplit._(); + + factory LogSplit.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory LogSplit.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); static final $pb.BuilderInfo _i = $pb.BuilderInfo( _omitMessageNames ? '' : 'LogSplit', @@ -792,24 +676,22 @@ class LogSplit extends $pb.GeneratedMessage { const $pb.PackageName(_omitMessageNames ? '' : 'google.logging.v2'), createEmptyInstance: create) ..aOS(1, _omitFieldNames ? '' : 'uid') - ..a<$core.int>(2, _omitFieldNames ? '' : 'index', $pb.PbFieldType.O3) - ..a<$core.int>(3, _omitFieldNames ? '' : 'totalSplits', $pb.PbFieldType.O3) + ..aI(2, _omitFieldNames ? '' : 'index') + ..aI(3, _omitFieldNames ? '' : 'totalSplits') ..hasRequiredFields = false; - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - LogSplit clone() => LogSplit()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + LogSplit clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') LogSplit copyWith(void Function(LogSplit) updates) => super.copyWith((message) => updates(message as LogSplit)) as LogSplit; + @$core.override $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static LogSplit create() => LogSplit._(); + @$core.override LogSplit createEmptyInstance() => create(); static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') @@ -823,14 +705,11 @@ class LogSplit extends $pb.GeneratedMessage { @$pb.TagNumber(1) $core.String get uid => $_getSZ(0); @$pb.TagNumber(1) - set uid($core.String v) { - $_setString(0, v); - } - + set uid($core.String value) => $_setString(0, value); @$pb.TagNumber(1) $core.bool hasUid() => $_has(0); @$pb.TagNumber(1) - void clearUid() => clearField(1); + void clearUid() => $_clearField(1); /// The index of this LogEntry in the sequence of split log entries. Log /// entries are given |index| values 0, 1, ..., n-1 for a sequence of n log @@ -838,29 +717,24 @@ class LogSplit extends $pb.GeneratedMessage { @$pb.TagNumber(2) $core.int get index => $_getIZ(1); @$pb.TagNumber(2) - set index($core.int v) { - $_setSignedInt32(1, v); - } - + set index($core.int value) => $_setSignedInt32(1, value); @$pb.TagNumber(2) $core.bool hasIndex() => $_has(1); @$pb.TagNumber(2) - void clearIndex() => clearField(2); + void clearIndex() => $_clearField(2); /// The total number of log entries that the original LogEntry was split into. @$pb.TagNumber(3) $core.int get totalSplits => $_getIZ(2); @$pb.TagNumber(3) - set totalSplits($core.int v) { - $_setSignedInt32(2, v); - } - + set totalSplits($core.int value) => $_setSignedInt32(2, value); @$pb.TagNumber(3) $core.bool hasTotalSplits() => $_has(2); @$pb.TagNumber(3) - void clearTotalSplits() => clearField(3); + void clearTotalSplits() => $_clearField(3); } -const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); -const _omitMessageNames = +const $core.bool _omitFieldNames = + $core.bool.fromEnvironment('protobuf.omit_field_names'); +const $core.bool _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/example/googleapis/lib/src/generated/google/logging/v2/log_entry.pbenum.dart b/example/googleapis/lib/src/generated/google/logging/v2/log_entry.pbenum.dart index 0219522a..07c63d95 100644 --- a/example/googleapis/lib/src/generated/google/logging/v2/log_entry.pbenum.dart +++ b/example/googleapis/lib/src/generated/google/logging/v2/log_entry.pbenum.dart @@ -1,10 +1,11 @@ +// This is a generated file - do not edit. // -// Generated code. Do not modify. -// source: google/logging/v2/log_entry.proto -// -// @dart = 2.12 +// Generated from google/logging/v2/log_entry.proto. + +// @dart = 3.3 // ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names diff --git a/example/googleapis/lib/src/generated/google/logging/v2/log_entry.pbjson.dart b/example/googleapis/lib/src/generated/google/logging/v2/log_entry.pbjson.dart index 4a54b3dc..2da05caf 100644 --- a/example/googleapis/lib/src/generated/google/logging/v2/log_entry.pbjson.dart +++ b/example/googleapis/lib/src/generated/google/logging/v2/log_entry.pbjson.dart @@ -1,13 +1,14 @@ +// This is a generated file - do not edit. // -// Generated code. Do not modify. -// source: google/logging/v2/log_entry.proto -// -// @dart = 2.12 +// Generated from google/logging/v2/log_entry.proto. + +// @dart = 3.3 // ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names, unused_import import 'dart:convert' as $convert; import 'dart:core' as $core; diff --git a/example/googleapis/lib/src/generated/google/logging/v2/logging.pb.dart b/example/googleapis/lib/src/generated/google/logging/v2/logging.pb.dart index 03461606..e02452cc 100644 --- a/example/googleapis/lib/src/generated/google/logging/v2/logging.pb.dart +++ b/example/googleapis/lib/src/generated/google/logging/v2/logging.pb.dart @@ -1,13 +1,14 @@ +// This is a generated file - do not edit. // -// Generated code. Do not modify. -// source: google/logging/v2/logging.proto -// -// @dart = 2.12 +// Generated from google/logging/v2/logging.proto. + +// @dart = 3.3 // ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names import 'dart:core' as $core; @@ -19,6 +20,8 @@ import '../../rpc/status.pb.dart' as $4; import 'log_entry.pb.dart' as $3; import 'logging.pbenum.dart'; +export 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions; + export 'logging.pbenum.dart'; /// The parameters to DeleteLog. @@ -27,18 +30,18 @@ class DeleteLogRequest extends $pb.GeneratedMessage { $core.String? logName, }) { final result = create(); - if (logName != null) { - result.logName = logName; - } + if (logName != null) result.logName = logName; return result; } - DeleteLogRequest._() : super(); - factory DeleteLogRequest.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory DeleteLogRequest.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); + + DeleteLogRequest._(); + + factory DeleteLogRequest.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory DeleteLogRequest.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); static final $pb.BuilderInfo _i = $pb.BuilderInfo( _omitMessageNames ? '' : 'DeleteLogRequest', @@ -48,21 +51,19 @@ class DeleteLogRequest extends $pb.GeneratedMessage { ..aOS(1, _omitFieldNames ? '' : 'logName') ..hasRequiredFields = false; - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - DeleteLogRequest clone() => DeleteLogRequest()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + DeleteLogRequest clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') DeleteLogRequest copyWith(void Function(DeleteLogRequest) updates) => super.copyWith((message) => updates(message as DeleteLogRequest)) as DeleteLogRequest; + @$core.override $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static DeleteLogRequest create() => DeleteLogRequest._(); + @$core.override DeleteLogRequest createEmptyInstance() => create(); static $pb.PbList createRepeated() => $pb.PbList(); @@ -71,30 +72,27 @@ class DeleteLogRequest extends $pb.GeneratedMessage { $pb.GeneratedMessage.$_defaultFor(create); static DeleteLogRequest? _defaultInstance; - /// Required. The resource name of the log to delete: + /// Required. The resource name of the log to delete: /// - /// * `projects/[PROJECT_ID]/logs/[LOG_ID]` - /// * `organizations/[ORGANIZATION_ID]/logs/[LOG_ID]` - /// * `billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]` - /// * `folders/[FOLDER_ID]/logs/[LOG_ID]` + /// * `projects/[PROJECT_ID]/logs/[LOG_ID]` + /// * `organizations/[ORGANIZATION_ID]/logs/[LOG_ID]` + /// * `billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]` + /// * `folders/[FOLDER_ID]/logs/[LOG_ID]` /// - /// `[LOG_ID]` must be URL-encoded. For example, - /// `"projects/my-project-id/logs/syslog"`, - /// `"organizations/123/logs/cloudaudit.googleapis.com%2Factivity"`. + /// `[LOG_ID]` must be URL-encoded. For example, + /// `"projects/my-project-id/logs/syslog"`, + /// `"organizations/123/logs/cloudaudit.googleapis.com%2Factivity"`. /// - /// For more information about log names, see - /// [LogEntry][google.logging.v2.LogEntry]. + /// For more information about log names, see + /// [LogEntry][google.logging.v2.LogEntry]. @$pb.TagNumber(1) $core.String get logName => $_getSZ(0); @$pb.TagNumber(1) - set logName($core.String v) { - $_setString(0, v); - } - + set logName($core.String value) => $_setString(0, value); @$pb.TagNumber(1) $core.bool hasLogName() => $_has(0); @$pb.TagNumber(1) - void clearLogName() => clearField(1); + void clearLogName() => $_clearField(1); } /// The parameters to WriteLogEntries. @@ -102,39 +100,29 @@ class WriteLogEntriesRequest extends $pb.GeneratedMessage { factory WriteLogEntriesRequest({ $core.String? logName, $2.MonitoredResource? resource, - $core.Map<$core.String, $core.String>? labels, + $core.Iterable<$core.MapEntry<$core.String, $core.String>>? labels, $core.Iterable<$3.LogEntry>? entries, $core.bool? partialSuccess, $core.bool? dryRun, }) { final result = create(); - if (logName != null) { - result.logName = logName; - } - if (resource != null) { - result.resource = resource; - } - if (labels != null) { - result.labels.addAll(labels); - } - if (entries != null) { - result.entries.addAll(entries); - } - if (partialSuccess != null) { - result.partialSuccess = partialSuccess; - } - if (dryRun != null) { - result.dryRun = dryRun; - } + if (logName != null) result.logName = logName; + if (resource != null) result.resource = resource; + if (labels != null) result.labels.addEntries(labels); + if (entries != null) result.entries.addAll(entries); + if (partialSuccess != null) result.partialSuccess = partialSuccess; + if (dryRun != null) result.dryRun = dryRun; return result; } - WriteLogEntriesRequest._() : super(); - factory WriteLogEntriesRequest.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory WriteLogEntriesRequest.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); + + WriteLogEntriesRequest._(); + + factory WriteLogEntriesRequest.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory WriteLogEntriesRequest.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); static final $pb.BuilderInfo _i = $pb.BuilderInfo( _omitMessageNames ? '' : 'WriteLogEntriesRequest', @@ -149,29 +137,26 @@ class WriteLogEntriesRequest extends $pb.GeneratedMessage { keyFieldType: $pb.PbFieldType.OS, valueFieldType: $pb.PbFieldType.OS, packageName: const $pb.PackageName('google.logging.v2')) - ..pc<$3.LogEntry>(4, _omitFieldNames ? '' : 'entries', $pb.PbFieldType.PM, + ..pPM<$3.LogEntry>(4, _omitFieldNames ? '' : 'entries', subBuilder: $3.LogEntry.create) ..aOB(5, _omitFieldNames ? '' : 'partialSuccess') ..aOB(6, _omitFieldNames ? '' : 'dryRun') ..hasRequiredFields = false; - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - WriteLogEntriesRequest clone() => - WriteLogEntriesRequest()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + WriteLogEntriesRequest clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') WriteLogEntriesRequest copyWith( void Function(WriteLogEntriesRequest) updates) => super.copyWith((message) => updates(message as WriteLogEntriesRequest)) as WriteLogEntriesRequest; + @$core.override $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static WriteLogEntriesRequest create() => WriteLogEntriesRequest._(); + @$core.override WriteLogEntriesRequest createEmptyInstance() => create(); static $pb.PbList createRepeated() => $pb.PbList(); @@ -180,54 +165,48 @@ class WriteLogEntriesRequest extends $pb.GeneratedMessage { $pb.GeneratedMessage.$_defaultFor(create); static WriteLogEntriesRequest? _defaultInstance; - /// Optional. A default log resource name that is assigned to all log entries - /// in `entries` that do not specify a value for `log_name`: + /// Optional. A default log resource name that is assigned to all log entries + /// in `entries` that do not specify a value for `log_name`: /// - /// * `projects/[PROJECT_ID]/logs/[LOG_ID]` - /// * `organizations/[ORGANIZATION_ID]/logs/[LOG_ID]` - /// * `billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]` - /// * `folders/[FOLDER_ID]/logs/[LOG_ID]` + /// * `projects/[PROJECT_ID]/logs/[LOG_ID]` + /// * `organizations/[ORGANIZATION_ID]/logs/[LOG_ID]` + /// * `billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]` + /// * `folders/[FOLDER_ID]/logs/[LOG_ID]` /// - /// `[LOG_ID]` must be URL-encoded. For example: + /// `[LOG_ID]` must be URL-encoded. For example: /// - /// "projects/my-project-id/logs/syslog" - /// "organizations/123/logs/cloudaudit.googleapis.com%2Factivity" + /// "projects/my-project-id/logs/syslog" + /// "organizations/123/logs/cloudaudit.googleapis.com%2Factivity" /// - /// The permission `logging.logEntries.create` is needed on each project, - /// organization, billing account, or folder that is receiving new log - /// entries, whether the resource is specified in `logName` or in an - /// individual log entry. + /// The permission `logging.logEntries.create` is needed on each project, + /// organization, billing account, or folder that is receiving new log + /// entries, whether the resource is specified in `logName` or in an + /// individual log entry. @$pb.TagNumber(1) $core.String get logName => $_getSZ(0); @$pb.TagNumber(1) - set logName($core.String v) { - $_setString(0, v); - } - + set logName($core.String value) => $_setString(0, value); @$pb.TagNumber(1) $core.bool hasLogName() => $_has(0); @$pb.TagNumber(1) - void clearLogName() => clearField(1); + void clearLogName() => $_clearField(1); - /// Optional. A default monitored resource object that is assigned to all log - /// entries in `entries` that do not specify a value for `resource`. Example: + /// Optional. A default monitored resource object that is assigned to all log + /// entries in `entries` that do not specify a value for `resource`. Example: /// - /// { "type": "gce_instance", - /// "labels": { - /// "zone": "us-central1-a", "instance_id": "00000000000000000000" }} + /// { "type": "gce_instance", + /// "labels": { + /// "zone": "us-central1-a", "instance_id": "00000000000000000000" }} /// - /// See [LogEntry][google.logging.v2.LogEntry]. + /// See [LogEntry][google.logging.v2.LogEntry]. @$pb.TagNumber(2) $2.MonitoredResource get resource => $_getN(1); @$pb.TagNumber(2) - set resource($2.MonitoredResource v) { - setField(2, v); - } - + set resource($2.MonitoredResource value) => $_setField(2, value); @$pb.TagNumber(2) $core.bool hasResource() => $_has(1); @$pb.TagNumber(2) - void clearResource() => clearField(2); + void clearResource() => $_clearField(2); @$pb.TagNumber(2) $2.MonitoredResource ensureResource() => $_ensure(1); @@ -236,34 +215,34 @@ class WriteLogEntriesRequest extends $pb.GeneratedMessage { /// as a label in this parameter, then the log entry's label is not changed. /// See [LogEntry][google.logging.v2.LogEntry]. @$pb.TagNumber(3) - $core.Map<$core.String, $core.String> get labels => $_getMap(2); - - /// Required. The log entries to send to Logging. The order of log - /// entries in this list does not matter. Values supplied in this method's - /// `log_name`, `resource`, and `labels` fields are copied into those log - /// entries in this list that do not include values for their corresponding - /// fields. For more information, see the - /// [LogEntry][google.logging.v2.LogEntry] type. + $pb.PbMap<$core.String, $core.String> get labels => $_getMap(2); + + /// Required. The log entries to send to Logging. The order of log + /// entries in this list does not matter. Values supplied in this method's + /// `log_name`, `resource`, and `labels` fields are copied into those log + /// entries in this list that do not include values for their corresponding + /// fields. For more information, see the + /// [LogEntry][google.logging.v2.LogEntry] type. /// - /// If the `timestamp` or `insert_id` fields are missing in log entries, then - /// this method supplies the current time or a unique identifier, respectively. - /// The supplied values are chosen so that, among the log entries that did not - /// supply their own values, the entries earlier in the list will sort before - /// the entries later in the list. See the `entries.list` method. + /// If the `timestamp` or `insert_id` fields are missing in log entries, then + /// this method supplies the current time or a unique identifier, respectively. + /// The supplied values are chosen so that, among the log entries that did not + /// supply their own values, the entries earlier in the list will sort before + /// the entries later in the list. See the `entries.list` method. /// - /// Log entries with timestamps that are more than the - /// [logs retention period](https://cloud.google.com/logging/quotas) in - /// the past or more than 24 hours in the future will not be available when - /// calling `entries.list`. However, those log entries can still be [exported - /// with - /// LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). + /// Log entries with timestamps that are more than the + /// [logs retention period](https://cloud.google.com/logging/quotas) in + /// the past or more than 24 hours in the future will not be available when + /// calling `entries.list`. However, those log entries can still be [exported + /// with + /// LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). /// - /// To improve throughput and to avoid exceeding the - /// [quota limit](https://cloud.google.com/logging/quotas) for calls to - /// `entries.write`, you should try to include several log entries in this - /// list, rather than calling this method for each individual log entry. + /// To improve throughput and to avoid exceeding the + /// [quota limit](https://cloud.google.com/logging/quotas) for calls to + /// `entries.write`, you should try to include several log entries in this + /// list, rather than calling this method for each individual log entry. @$pb.TagNumber(4) - $core.List<$3.LogEntry> get entries => $_getList(3); + $pb.PbList<$3.LogEntry> get entries => $_getList(3); /// Optional. Whether a batch's valid entries should be written even if some /// other entry failed due to a permanent error such as INVALID_ARGUMENT or @@ -275,14 +254,11 @@ class WriteLogEntriesRequest extends $pb.GeneratedMessage { @$pb.TagNumber(5) $core.bool get partialSuccess => $_getBF(4); @$pb.TagNumber(5) - set partialSuccess($core.bool v) { - $_setBool(4, v); - } - + set partialSuccess($core.bool value) => $_setBool(4, value); @$pb.TagNumber(5) $core.bool hasPartialSuccess() => $_has(4); @$pb.TagNumber(5) - void clearPartialSuccess() => clearField(5); + void clearPartialSuccess() => $_clearField(5); /// Optional. If true, the request should expect normal response, but the /// entries won't be persisted nor exported. Useful for checking whether the @@ -290,26 +266,25 @@ class WriteLogEntriesRequest extends $pb.GeneratedMessage { @$pb.TagNumber(6) $core.bool get dryRun => $_getBF(5); @$pb.TagNumber(6) - set dryRun($core.bool v) { - $_setBool(5, v); - } - + set dryRun($core.bool value) => $_setBool(5, value); @$pb.TagNumber(6) $core.bool hasDryRun() => $_has(5); @$pb.TagNumber(6) - void clearDryRun() => clearField(6); + void clearDryRun() => $_clearField(6); } /// Result returned from WriteLogEntries. class WriteLogEntriesResponse extends $pb.GeneratedMessage { factory WriteLogEntriesResponse() => create(); - WriteLogEntriesResponse._() : super(); - factory WriteLogEntriesResponse.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory WriteLogEntriesResponse.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); + + WriteLogEntriesResponse._(); + + factory WriteLogEntriesResponse.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory WriteLogEntriesResponse.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); static final $pb.BuilderInfo _i = $pb.BuilderInfo( _omitMessageNames ? '' : 'WriteLogEntriesResponse', @@ -318,23 +293,20 @@ class WriteLogEntriesResponse extends $pb.GeneratedMessage { 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') - WriteLogEntriesResponse clone() => - WriteLogEntriesResponse()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + WriteLogEntriesResponse clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') WriteLogEntriesResponse copyWith( void Function(WriteLogEntriesResponse) updates) => super.copyWith((message) => updates(message as WriteLogEntriesResponse)) as WriteLogEntriesResponse; + @$core.override $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static WriteLogEntriesResponse create() => WriteLogEntriesResponse._(); + @$core.override WriteLogEntriesResponse createEmptyInstance() => create(); static $pb.PbList createRepeated() => $pb.PbList(); @@ -347,21 +319,22 @@ class WriteLogEntriesResponse extends $pb.GeneratedMessage { /// Error details for WriteLogEntries with partial success. class WriteLogEntriesPartialErrors extends $pb.GeneratedMessage { factory WriteLogEntriesPartialErrors({ - $core.Map<$core.int, $4.Status>? logEntryErrors, + $core.Iterable<$core.MapEntry<$core.int, $4.Status>>? logEntryErrors, }) { final result = create(); - if (logEntryErrors != null) { - result.logEntryErrors.addAll(logEntryErrors); - } + if (logEntryErrors != null) + result.logEntryErrors.addEntries(logEntryErrors); return result; } - WriteLogEntriesPartialErrors._() : super(); - factory WriteLogEntriesPartialErrors.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory WriteLogEntriesPartialErrors.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); + + WriteLogEntriesPartialErrors._(); + + factory WriteLogEntriesPartialErrors.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory WriteLogEntriesPartialErrors.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); static final $pb.BuilderInfo _i = $pb.BuilderInfo( _omitMessageNames ? '' : 'WriteLogEntriesPartialErrors', @@ -377,25 +350,22 @@ class WriteLogEntriesPartialErrors extends $pb.GeneratedMessage { packageName: const $pb.PackageName('google.logging.v2')) ..hasRequiredFields = false; - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - WriteLogEntriesPartialErrors clone() => - WriteLogEntriesPartialErrors()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + WriteLogEntriesPartialErrors clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') WriteLogEntriesPartialErrors copyWith( void Function(WriteLogEntriesPartialErrors) updates) => super.copyWith( (message) => updates(message as WriteLogEntriesPartialErrors)) as WriteLogEntriesPartialErrors; + @$core.override $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static WriteLogEntriesPartialErrors create() => WriteLogEntriesPartialErrors._(); + @$core.override WriteLogEntriesPartialErrors createEmptyInstance() => create(); static $pb.PbList createRepeated() => $pb.PbList(); @@ -404,14 +374,14 @@ class WriteLogEntriesPartialErrors extends $pb.GeneratedMessage { $pb.GeneratedMessage.$_defaultFor(create); static WriteLogEntriesPartialErrors? _defaultInstance; - /// When `WriteLogEntriesRequest.partial_success` is true, records the error - /// status for entries that were not written due to a permanent error, keyed - /// by the entry's zero-based index in `WriteLogEntriesRequest.entries`. + /// When `WriteLogEntriesRequest.partial_success` is true, records the error + /// status for entries that were not written due to a permanent error, keyed + /// by the entry's zero-based index in `WriteLogEntriesRequest.entries`. /// - /// Failed requests for which no entries are written will not include - /// per-entry errors. + /// Failed requests for which no entries are written will not include + /// per-entry errors. @$pb.TagNumber(1) - $core.Map<$core.int, $4.Status> get logEntryErrors => $_getMap(0); + $pb.PbMap<$core.int, $4.Status> get logEntryErrors => $_getMap(0); } /// The parameters to `ListLogEntries`. @@ -424,30 +394,22 @@ class ListLogEntriesRequest extends $pb.GeneratedMessage { $core.Iterable<$core.String>? resourceNames, }) { final result = create(); - if (filter != null) { - result.filter = filter; - } - if (orderBy != null) { - result.orderBy = orderBy; - } - if (pageSize != null) { - result.pageSize = pageSize; - } - if (pageToken != null) { - result.pageToken = pageToken; - } - if (resourceNames != null) { - result.resourceNames.addAll(resourceNames); - } + if (filter != null) result.filter = filter; + if (orderBy != null) result.orderBy = orderBy; + if (pageSize != null) result.pageSize = pageSize; + if (pageToken != null) result.pageToken = pageToken; + if (resourceNames != null) result.resourceNames.addAll(resourceNames); return result; } - ListLogEntriesRequest._() : super(); - factory ListLogEntriesRequest.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory ListLogEntriesRequest.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); + + ListLogEntriesRequest._(); + + factory ListLogEntriesRequest.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory ListLogEntriesRequest.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); static final $pb.BuilderInfo _i = $pb.BuilderInfo( _omitMessageNames ? '' : 'ListLogEntriesRequest', @@ -456,28 +418,25 @@ class ListLogEntriesRequest extends $pb.GeneratedMessage { createEmptyInstance: create) ..aOS(2, _omitFieldNames ? '' : 'filter') ..aOS(3, _omitFieldNames ? '' : 'orderBy') - ..a<$core.int>(4, _omitFieldNames ? '' : 'pageSize', $pb.PbFieldType.O3) + ..aI(4, _omitFieldNames ? '' : 'pageSize') ..aOS(5, _omitFieldNames ? '' : 'pageToken') ..pPS(8, _omitFieldNames ? '' : 'resourceNames') ..hasRequiredFields = false; - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - ListLogEntriesRequest clone() => - ListLogEntriesRequest()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ListLogEntriesRequest clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') ListLogEntriesRequest copyWith( void Function(ListLogEntriesRequest) updates) => super.copyWith((message) => updates(message as ListLogEntriesRequest)) as ListLogEntriesRequest; + @$core.override $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static ListLogEntriesRequest create() => ListLogEntriesRequest._(); + @$core.override ListLogEntriesRequest createEmptyInstance() => create(); static $pb.PbList createRepeated() => $pb.PbList(); @@ -494,14 +453,11 @@ class ListLogEntriesRequest extends $pb.GeneratedMessage { @$pb.TagNumber(2) $core.String get filter => $_getSZ(0); @$pb.TagNumber(2) - set filter($core.String v) { - $_setString(0, v); - } - + set filter($core.String value) => $_setString(0, value); @$pb.TagNumber(2) $core.bool hasFilter() => $_has(0); @$pb.TagNumber(2) - void clearFilter() => clearField(2); + void clearFilter() => $_clearField(2); /// Optional. How the results should be sorted. Presently, the only permitted /// values are `"timestamp asc"` (default) and `"timestamp desc"`. The first @@ -512,14 +468,11 @@ class ListLogEntriesRequest extends $pb.GeneratedMessage { @$pb.TagNumber(3) $core.String get orderBy => $_getSZ(1); @$pb.TagNumber(3) - set orderBy($core.String v) { - $_setString(1, v); - } - + set orderBy($core.String value) => $_setString(1, value); @$pb.TagNumber(3) $core.bool hasOrderBy() => $_has(1); @$pb.TagNumber(3) - void clearOrderBy() => clearField(3); + void clearOrderBy() => $_clearField(3); /// Optional. The maximum number of results to return from this request. /// Default is 50. If the value is negative or exceeds 1000, the request is @@ -528,14 +481,11 @@ class ListLogEntriesRequest extends $pb.GeneratedMessage { @$pb.TagNumber(4) $core.int get pageSize => $_getIZ(2); @$pb.TagNumber(4) - set pageSize($core.int v) { - $_setSignedInt32(2, v); - } - + set pageSize($core.int value) => $_setSignedInt32(2, value); @$pb.TagNumber(4) $core.bool hasPageSize() => $_has(2); @$pb.TagNumber(4) - void clearPageSize() => clearField(4); + void clearPageSize() => $_clearField(4); /// Optional. If present, then retrieve the next batch of results from the /// preceding call to this method. `page_token` must be the value of @@ -544,34 +494,31 @@ class ListLogEntriesRequest extends $pb.GeneratedMessage { @$pb.TagNumber(5) $core.String get pageToken => $_getSZ(3); @$pb.TagNumber(5) - set pageToken($core.String v) { - $_setString(3, v); - } - + set pageToken($core.String value) => $_setString(3, value); @$pb.TagNumber(5) $core.bool hasPageToken() => $_has(3); @$pb.TagNumber(5) - void clearPageToken() => clearField(5); + void clearPageToken() => $_clearField(5); - /// Required. Names of one or more parent resources from which to - /// retrieve log entries: + /// Required. Names of one or more parent resources from which to + /// retrieve log entries: /// - /// * `projects/[PROJECT_ID]` - /// * `organizations/[ORGANIZATION_ID]` - /// * `billingAccounts/[BILLING_ACCOUNT_ID]` - /// * `folders/[FOLDER_ID]` + /// * `projects/[PROJECT_ID]` + /// * `organizations/[ORGANIZATION_ID]` + /// * `billingAccounts/[BILLING_ACCOUNT_ID]` + /// * `folders/[FOLDER_ID]` /// - /// May alternatively be one or more views: + /// May alternatively be one or more views: /// - /// * `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - /// * `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - /// * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - /// * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + /// * `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + /// * `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + /// * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + /// * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` /// - /// Projects listed in the `project_ids` field are added to this list. - /// A maximum of 100 resources may be specified in a single request. + /// Projects listed in the `project_ids` field are added to this list. + /// A maximum of 100 resources may be specified in a single request. @$pb.TagNumber(8) - $core.List<$core.String> get resourceNames => $_getList(4); + $pb.PbList<$core.String> get resourceNames => $_getList(4); } /// Result returned from `ListLogEntries`. @@ -581,49 +528,44 @@ class ListLogEntriesResponse extends $pb.GeneratedMessage { $core.String? nextPageToken, }) { final result = create(); - if (entries != null) { - result.entries.addAll(entries); - } - if (nextPageToken != null) { - result.nextPageToken = nextPageToken; - } + if (entries != null) result.entries.addAll(entries); + if (nextPageToken != null) result.nextPageToken = nextPageToken; return result; } - ListLogEntriesResponse._() : super(); - factory ListLogEntriesResponse.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory ListLogEntriesResponse.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); + + ListLogEntriesResponse._(); + + factory ListLogEntriesResponse.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory ListLogEntriesResponse.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); static final $pb.BuilderInfo _i = $pb.BuilderInfo( _omitMessageNames ? '' : 'ListLogEntriesResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.logging.v2'), createEmptyInstance: create) - ..pc<$3.LogEntry>(1, _omitFieldNames ? '' : 'entries', $pb.PbFieldType.PM, + ..pPM<$3.LogEntry>(1, _omitFieldNames ? '' : 'entries', subBuilder: $3.LogEntry.create) ..aOS(2, _omitFieldNames ? '' : 'nextPageToken') ..hasRequiredFields = false; - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - ListLogEntriesResponse clone() => - ListLogEntriesResponse()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ListLogEntriesResponse clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') ListLogEntriesResponse copyWith( void Function(ListLogEntriesResponse) updates) => super.copyWith((message) => updates(message as ListLogEntriesResponse)) as ListLogEntriesResponse; + @$core.override $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static ListLogEntriesResponse create() => ListLogEntriesResponse._(); + @$core.override ListLogEntriesResponse createEmptyInstance() => create(); static $pb.PbList createRepeated() => $pb.PbList(); @@ -636,29 +578,26 @@ class ListLogEntriesResponse extends $pb.GeneratedMessage { /// returned, indicating that more entries may exist. See `nextPageToken` for /// more information. @$pb.TagNumber(1) - $core.List<$3.LogEntry> get entries => $_getList(0); + $pb.PbList<$3.LogEntry> get entries => $_getList(0); - /// If there might be more results than those appearing in this response, then - /// `nextPageToken` is included. To get the next set of results, call this - /// method again using the value of `nextPageToken` as `pageToken`. + /// If there might be more results than those appearing in this response, then + /// `nextPageToken` is included. To get the next set of results, call this + /// method again using the value of `nextPageToken` as `pageToken`. /// - /// If a value for `next_page_token` appears and the `entries` field is empty, - /// it means that the search found no log entries so far but it did not have - /// time to search all the possible log entries. Retry the method with this - /// value for `page_token` to continue the search. Alternatively, consider - /// speeding up the search by changing your filter to specify a single log name - /// or resource type, or to narrow the time range of the search. + /// If a value for `next_page_token` appears and the `entries` field is empty, + /// it means that the search found no log entries so far but it did not have + /// time to search all the possible log entries. Retry the method with this + /// value for `page_token` to continue the search. Alternatively, consider + /// speeding up the search by changing your filter to specify a single log name + /// or resource type, or to narrow the time range of the search. @$pb.TagNumber(2) $core.String get nextPageToken => $_getSZ(1); @$pb.TagNumber(2) - set nextPageToken($core.String v) { - $_setString(1, v); - } - + set nextPageToken($core.String value) => $_setString(1, value); @$pb.TagNumber(2) $core.bool hasNextPageToken() => $_has(1); @$pb.TagNumber(2) - void clearNextPageToken() => clearField(2); + void clearNextPageToken() => $_clearField(2); } /// The parameters to ListMonitoredResourceDescriptors @@ -668,51 +607,46 @@ class ListMonitoredResourceDescriptorsRequest extends $pb.GeneratedMessage { $core.String? pageToken, }) { final result = create(); - if (pageSize != null) { - result.pageSize = pageSize; - } - if (pageToken != null) { - result.pageToken = pageToken; - } + if (pageSize != null) result.pageSize = pageSize; + if (pageToken != null) result.pageToken = pageToken; return result; } - ListMonitoredResourceDescriptorsRequest._() : super(); + + ListMonitoredResourceDescriptorsRequest._(); + factory ListMonitoredResourceDescriptorsRequest.fromBuffer( - $core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory ListMonitoredResourceDescriptorsRequest.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); + $core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory ListMonitoredResourceDescriptorsRequest.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); static final $pb.BuilderInfo _i = $pb.BuilderInfo( _omitMessageNames ? '' : 'ListMonitoredResourceDescriptorsRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.logging.v2'), createEmptyInstance: create) - ..a<$core.int>(1, _omitFieldNames ? '' : 'pageSize', $pb.PbFieldType.O3) + ..aI(1, _omitFieldNames ? '' : 'pageSize') ..aOS(2, _omitFieldNames ? '' : 'pageToken') ..hasRequiredFields = false; - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - ListMonitoredResourceDescriptorsRequest clone() => - ListMonitoredResourceDescriptorsRequest()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ListMonitoredResourceDescriptorsRequest clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') ListMonitoredResourceDescriptorsRequest copyWith( void Function(ListMonitoredResourceDescriptorsRequest) updates) => super.copyWith((message) => updates(message as ListMonitoredResourceDescriptorsRequest)) as ListMonitoredResourceDescriptorsRequest; + @$core.override $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static ListMonitoredResourceDescriptorsRequest create() => ListMonitoredResourceDescriptorsRequest._(); + @$core.override ListMonitoredResourceDescriptorsRequest createEmptyInstance() => create(); static $pb.PbList createRepeated() => $pb.PbList(); @@ -728,14 +662,11 @@ class ListMonitoredResourceDescriptorsRequest extends $pb.GeneratedMessage { @$pb.TagNumber(1) $core.int get pageSize => $_getIZ(0); @$pb.TagNumber(1) - set pageSize($core.int v) { - $_setSignedInt32(0, v); - } - + set pageSize($core.int value) => $_setSignedInt32(0, value); @$pb.TagNumber(1) $core.bool hasPageSize() => $_has(0); @$pb.TagNumber(1) - void clearPageSize() => clearField(1); + void clearPageSize() => $_clearField(1); /// Optional. If present, then retrieve the next batch of results from the /// preceding call to this method. `pageToken` must be the value of @@ -744,14 +675,11 @@ class ListMonitoredResourceDescriptorsRequest extends $pb.GeneratedMessage { @$pb.TagNumber(2) $core.String get pageToken => $_getSZ(1); @$pb.TagNumber(2) - set pageToken($core.String v) { - $_setString(1, v); - } - + set pageToken($core.String value) => $_setString(1, value); @$pb.TagNumber(2) $core.bool hasPageToken() => $_has(1); @$pb.TagNumber(2) - void clearPageToken() => clearField(2); + void clearPageToken() => $_clearField(2); } /// Result returned from ListMonitoredResourceDescriptors. @@ -761,53 +689,49 @@ class ListMonitoredResourceDescriptorsResponse extends $pb.GeneratedMessage { $core.String? nextPageToken, }) { final result = create(); - if (resourceDescriptors != null) { + if (resourceDescriptors != null) result.resourceDescriptors.addAll(resourceDescriptors); - } - if (nextPageToken != null) { - result.nextPageToken = nextPageToken; - } + if (nextPageToken != null) result.nextPageToken = nextPageToken; return result; } - ListMonitoredResourceDescriptorsResponse._() : super(); + + ListMonitoredResourceDescriptorsResponse._(); + factory ListMonitoredResourceDescriptorsResponse.fromBuffer( - $core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory ListMonitoredResourceDescriptorsResponse.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); + $core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory ListMonitoredResourceDescriptorsResponse.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); static final $pb.BuilderInfo _i = $pb.BuilderInfo( _omitMessageNames ? '' : 'ListMonitoredResourceDescriptorsResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.logging.v2'), createEmptyInstance: create) - ..pc<$2.MonitoredResourceDescriptor>( - 1, _omitFieldNames ? '' : 'resourceDescriptors', $pb.PbFieldType.PM, + ..pPM<$2.MonitoredResourceDescriptor>( + 1, _omitFieldNames ? '' : 'resourceDescriptors', subBuilder: $2.MonitoredResourceDescriptor.create) ..aOS(2, _omitFieldNames ? '' : 'nextPageToken') ..hasRequiredFields = false; - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - ListMonitoredResourceDescriptorsResponse clone() => - ListMonitoredResourceDescriptorsResponse()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ListMonitoredResourceDescriptorsResponse clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') ListMonitoredResourceDescriptorsResponse copyWith( void Function(ListMonitoredResourceDescriptorsResponse) updates) => super.copyWith((message) => updates(message as ListMonitoredResourceDescriptorsResponse)) as ListMonitoredResourceDescriptorsResponse; + @$core.override $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static ListMonitoredResourceDescriptorsResponse create() => ListMonitoredResourceDescriptorsResponse._(); + @$core.override ListMonitoredResourceDescriptorsResponse createEmptyInstance() => create(); static $pb.PbList createRepeated() => @@ -820,7 +744,7 @@ class ListMonitoredResourceDescriptorsResponse extends $pb.GeneratedMessage { /// A list of resource descriptors. @$pb.TagNumber(1) - $core.List<$2.MonitoredResourceDescriptor> get resourceDescriptors => + $pb.PbList<$2.MonitoredResourceDescriptor> get resourceDescriptors => $_getList(0); /// If there might be more results than those appearing in this response, then @@ -829,14 +753,11 @@ class ListMonitoredResourceDescriptorsResponse extends $pb.GeneratedMessage { @$pb.TagNumber(2) $core.String get nextPageToken => $_getSZ(1); @$pb.TagNumber(2) - set nextPageToken($core.String v) { - $_setString(1, v); - } - + set nextPageToken($core.String value) => $_setString(1, value); @$pb.TagNumber(2) $core.bool hasNextPageToken() => $_has(1); @$pb.TagNumber(2) - void clearNextPageToken() => clearField(2); + void clearNextPageToken() => $_clearField(2); } /// The parameters to ListLogs. @@ -848,27 +769,21 @@ class ListLogsRequest extends $pb.GeneratedMessage { $core.Iterable<$core.String>? resourceNames, }) { final result = create(); - if (parent != null) { - result.parent = parent; - } - if (pageSize != null) { - result.pageSize = pageSize; - } - if (pageToken != null) { - result.pageToken = pageToken; - } - if (resourceNames != null) { - result.resourceNames.addAll(resourceNames); - } + if (parent != null) result.parent = parent; + if (pageSize != null) result.pageSize = pageSize; + if (pageToken != null) result.pageToken = pageToken; + if (resourceNames != null) result.resourceNames.addAll(resourceNames); return result; } - ListLogsRequest._() : super(); - factory ListLogsRequest.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory ListLogsRequest.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); + + ListLogsRequest._(); + + factory ListLogsRequest.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory ListLogsRequest.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); static final $pb.BuilderInfo _i = $pb.BuilderInfo( _omitMessageNames ? '' : 'ListLogsRequest', @@ -876,26 +791,24 @@ class ListLogsRequest extends $pb.GeneratedMessage { const $pb.PackageName(_omitMessageNames ? '' : 'google.logging.v2'), createEmptyInstance: create) ..aOS(1, _omitFieldNames ? '' : 'parent') - ..a<$core.int>(2, _omitFieldNames ? '' : 'pageSize', $pb.PbFieldType.O3) + ..aI(2, _omitFieldNames ? '' : 'pageSize') ..aOS(3, _omitFieldNames ? '' : 'pageToken') ..pPS(8, _omitFieldNames ? '' : 'resourceNames') ..hasRequiredFields = false; - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - ListLogsRequest clone() => ListLogsRequest()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ListLogsRequest clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') ListLogsRequest copyWith(void Function(ListLogsRequest) updates) => super.copyWith((message) => updates(message as ListLogsRequest)) as ListLogsRequest; + @$core.override $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static ListLogsRequest create() => ListLogsRequest._(); + @$core.override ListLogsRequest createEmptyInstance() => create(); static $pb.PbList createRepeated() => $pb.PbList(); @@ -904,23 +817,20 @@ class ListLogsRequest extends $pb.GeneratedMessage { $pb.GeneratedMessage.$_defaultFor(create); static ListLogsRequest? _defaultInstance; - /// Required. The resource name to list logs for: + /// Required. The resource name to list logs for: /// - /// * `projects/[PROJECT_ID]` - /// * `organizations/[ORGANIZATION_ID]` - /// * `billingAccounts/[BILLING_ACCOUNT_ID]` - /// * `folders/[FOLDER_ID]` + /// * `projects/[PROJECT_ID]` + /// * `organizations/[ORGANIZATION_ID]` + /// * `billingAccounts/[BILLING_ACCOUNT_ID]` + /// * `folders/[FOLDER_ID]` @$pb.TagNumber(1) $core.String get parent => $_getSZ(0); @$pb.TagNumber(1) - set parent($core.String v) { - $_setString(0, v); - } - + set parent($core.String value) => $_setString(0, value); @$pb.TagNumber(1) $core.bool hasParent() => $_has(0); @$pb.TagNumber(1) - void clearParent() => clearField(1); + void clearParent() => $_clearField(1); /// Optional. The maximum number of results to return from this request. /// Non-positive values are ignored. The presence of `nextPageToken` in the @@ -928,14 +838,11 @@ class ListLogsRequest extends $pb.GeneratedMessage { @$pb.TagNumber(2) $core.int get pageSize => $_getIZ(1); @$pb.TagNumber(2) - set pageSize($core.int v) { - $_setSignedInt32(1, v); - } - + set pageSize($core.int value) => $_setSignedInt32(1, value); @$pb.TagNumber(2) $core.bool hasPageSize() => $_has(1); @$pb.TagNumber(2) - void clearPageSize() => clearField(2); + void clearPageSize() => $_clearField(2); /// Optional. If present, then retrieve the next batch of results from the /// preceding call to this method. `pageToken` must be the value of @@ -944,32 +851,29 @@ class ListLogsRequest extends $pb.GeneratedMessage { @$pb.TagNumber(3) $core.String get pageToken => $_getSZ(2); @$pb.TagNumber(3) - set pageToken($core.String v) { - $_setString(2, v); - } - + set pageToken($core.String value) => $_setString(2, value); @$pb.TagNumber(3) $core.bool hasPageToken() => $_has(2); @$pb.TagNumber(3) - void clearPageToken() => clearField(3); + void clearPageToken() => $_clearField(3); - /// Optional. List of resource names to list logs for: + /// Optional. List of resource names to list logs for: /// - /// * `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - /// * `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - /// * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - /// * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + /// * `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + /// * `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + /// * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + /// * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` /// - /// To support legacy queries, it could also be: + /// To support legacy queries, it could also be: /// - /// * `projects/[PROJECT_ID]` - /// * `organizations/[ORGANIZATION_ID]` - /// * `billingAccounts/[BILLING_ACCOUNT_ID]` - /// * `folders/[FOLDER_ID]` + /// * `projects/[PROJECT_ID]` + /// * `organizations/[ORGANIZATION_ID]` + /// * `billingAccounts/[BILLING_ACCOUNT_ID]` + /// * `folders/[FOLDER_ID]` /// - /// The resource name in the `parent` field is added to this list. + /// The resource name in the `parent` field is added to this list. @$pb.TagNumber(8) - $core.List<$core.String> get resourceNames => $_getList(3); + $pb.PbList<$core.String> get resourceNames => $_getList(3); } /// Result returned from ListLogs. @@ -979,21 +883,19 @@ class ListLogsResponse extends $pb.GeneratedMessage { $core.Iterable<$core.String>? logNames, }) { final result = create(); - if (nextPageToken != null) { - result.nextPageToken = nextPageToken; - } - if (logNames != null) { - result.logNames.addAll(logNames); - } + if (nextPageToken != null) result.nextPageToken = nextPageToken; + if (logNames != null) result.logNames.addAll(logNames); return result; } - ListLogsResponse._() : super(); - factory ListLogsResponse.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory ListLogsResponse.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); + + ListLogsResponse._(); + + factory ListLogsResponse.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory ListLogsResponse.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); static final $pb.BuilderInfo _i = $pb.BuilderInfo( _omitMessageNames ? '' : 'ListLogsResponse', @@ -1004,21 +906,19 @@ class ListLogsResponse extends $pb.GeneratedMessage { ..pPS(3, _omitFieldNames ? '' : 'logNames') ..hasRequiredFields = false; - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - ListLogsResponse clone() => ListLogsResponse()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ListLogsResponse clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') ListLogsResponse copyWith(void Function(ListLogsResponse) updates) => super.copyWith((message) => updates(message as ListLogsResponse)) as ListLogsResponse; + @$core.override $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static ListLogsResponse create() => ListLogsResponse._(); + @$core.override ListLogsResponse createEmptyInstance() => create(); static $pb.PbList createRepeated() => $pb.PbList(); @@ -1033,20 +933,17 @@ class ListLogsResponse extends $pb.GeneratedMessage { @$pb.TagNumber(2) $core.String get nextPageToken => $_getSZ(0); @$pb.TagNumber(2) - set nextPageToken($core.String v) { - $_setString(0, v); - } - + set nextPageToken($core.String value) => $_setString(0, value); @$pb.TagNumber(2) $core.bool hasNextPageToken() => $_has(0); @$pb.TagNumber(2) - void clearNextPageToken() => clearField(2); + void clearNextPageToken() => $_clearField(2); /// A list of log names. For example, /// `"projects/my-project/logs/syslog"` or /// `"organizations/123/logs/cloudresourcemanager.googleapis.com%2Factivity"`. @$pb.TagNumber(3) - $core.List<$core.String> get logNames => $_getList(1); + $pb.PbList<$core.String> get logNames => $_getList(1); } /// The parameters to `TailLogEntries`. @@ -1057,24 +954,20 @@ class TailLogEntriesRequest extends $pb.GeneratedMessage { $5.Duration? bufferWindow, }) { final result = create(); - if (resourceNames != null) { - result.resourceNames.addAll(resourceNames); - } - if (filter != null) { - result.filter = filter; - } - if (bufferWindow != null) { - result.bufferWindow = bufferWindow; - } + if (resourceNames != null) result.resourceNames.addAll(resourceNames); + if (filter != null) result.filter = filter; + if (bufferWindow != null) result.bufferWindow = bufferWindow; return result; } - TailLogEntriesRequest._() : super(); - factory TailLogEntriesRequest.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory TailLogEntriesRequest.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); + + TailLogEntriesRequest._(); + + factory TailLogEntriesRequest.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory TailLogEntriesRequest.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); static final $pb.BuilderInfo _i = $pb.BuilderInfo( _omitMessageNames ? '' : 'TailLogEntriesRequest', @@ -1087,23 +980,20 @@ class TailLogEntriesRequest extends $pb.GeneratedMessage { subBuilder: $5.Duration.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') - TailLogEntriesRequest clone() => - TailLogEntriesRequest()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + TailLogEntriesRequest clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') TailLogEntriesRequest copyWith( void Function(TailLogEntriesRequest) updates) => super.copyWith((message) => updates(message as TailLogEntriesRequest)) as TailLogEntriesRequest; + @$core.override $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static TailLogEntriesRequest create() => TailLogEntriesRequest._(); + @$core.override TailLogEntriesRequest createEmptyInstance() => create(); static $pb.PbList createRepeated() => $pb.PbList(); @@ -1112,21 +1002,21 @@ class TailLogEntriesRequest extends $pb.GeneratedMessage { $pb.GeneratedMessage.$_defaultFor(create); static TailLogEntriesRequest? _defaultInstance; - /// Required. Name of a parent resource from which to retrieve log entries: + /// Required. Name of a parent resource from which to retrieve log entries: /// - /// * `projects/[PROJECT_ID]` - /// * `organizations/[ORGANIZATION_ID]` - /// * `billingAccounts/[BILLING_ACCOUNT_ID]` - /// * `folders/[FOLDER_ID]` + /// * `projects/[PROJECT_ID]` + /// * `organizations/[ORGANIZATION_ID]` + /// * `billingAccounts/[BILLING_ACCOUNT_ID]` + /// * `folders/[FOLDER_ID]` /// - /// May alternatively be one or more views: + /// May alternatively be one or more views: /// - /// * `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - /// * `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - /// * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - /// * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + /// * `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + /// * `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + /// * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + /// * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` @$pb.TagNumber(1) - $core.List<$core.String> get resourceNames => $_getList(0); + $pb.PbList<$core.String> get resourceNames => $_getList(0); /// Optional. Only log entries that match the filter are returned. An empty /// filter matches all log entries in the resources listed in `resource_names`. @@ -1136,14 +1026,11 @@ class TailLogEntriesRequest extends $pb.GeneratedMessage { @$pb.TagNumber(2) $core.String get filter => $_getSZ(1); @$pb.TagNumber(2) - set filter($core.String v) { - $_setString(1, v); - } - + set filter($core.String value) => $_setString(1, value); @$pb.TagNumber(2) $core.bool hasFilter() => $_has(1); @$pb.TagNumber(2) - void clearFilter() => clearField(2); + void clearFilter() => $_clearField(2); /// Optional. The amount of time to buffer log entries at the server before /// being returned to prevent out of order results due to late arriving log @@ -1152,14 +1039,11 @@ class TailLogEntriesRequest extends $pb.GeneratedMessage { @$pb.TagNumber(3) $5.Duration get bufferWindow => $_getN(2); @$pb.TagNumber(3) - set bufferWindow($5.Duration v) { - setField(3, v); - } - + set bufferWindow($5.Duration value) => $_setField(3, value); @$pb.TagNumber(3) $core.bool hasBufferWindow() => $_has(2); @$pb.TagNumber(3) - void clearBufferWindow() => clearField(3); + void clearBufferWindow() => $_clearField(3); @$pb.TagNumber(3) $5.Duration ensureBufferWindow() => $_ensure(2); } @@ -1171,57 +1055,48 @@ class TailLogEntriesResponse_SuppressionInfo extends $pb.GeneratedMessage { $core.int? suppressedCount, }) { final result = create(); - if (reason != null) { - result.reason = reason; - } - if (suppressedCount != null) { - result.suppressedCount = suppressedCount; - } + if (reason != null) result.reason = reason; + if (suppressedCount != null) result.suppressedCount = suppressedCount; return result; } - TailLogEntriesResponse_SuppressionInfo._() : super(); + + TailLogEntriesResponse_SuppressionInfo._(); + factory TailLogEntriesResponse_SuppressionInfo.fromBuffer( - $core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory TailLogEntriesResponse_SuppressionInfo.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); + $core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory TailLogEntriesResponse_SuppressionInfo.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); static final $pb.BuilderInfo _i = $pb.BuilderInfo( _omitMessageNames ? '' : 'TailLogEntriesResponse.SuppressionInfo', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.logging.v2'), createEmptyInstance: create) - ..e( - 1, _omitFieldNames ? '' : 'reason', $pb.PbFieldType.OE, - defaultOrMaker: - TailLogEntriesResponse_SuppressionInfo_Reason.REASON_UNSPECIFIED, - valueOf: TailLogEntriesResponse_SuppressionInfo_Reason.valueOf, + ..aE( + 1, _omitFieldNames ? '' : 'reason', enumValues: TailLogEntriesResponse_SuppressionInfo_Reason.values) - ..a<$core.int>( - 2, _omitFieldNames ? '' : 'suppressedCount', $pb.PbFieldType.O3) + ..aI(2, _omitFieldNames ? '' : 'suppressedCount') ..hasRequiredFields = false; - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - TailLogEntriesResponse_SuppressionInfo clone() => - TailLogEntriesResponse_SuppressionInfo()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + TailLogEntriesResponse_SuppressionInfo clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') TailLogEntriesResponse_SuppressionInfo copyWith( void Function(TailLogEntriesResponse_SuppressionInfo) updates) => super.copyWith((message) => updates(message as TailLogEntriesResponse_SuppressionInfo)) as TailLogEntriesResponse_SuppressionInfo; + @$core.override $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static TailLogEntriesResponse_SuppressionInfo create() => TailLogEntriesResponse_SuppressionInfo._(); + @$core.override TailLogEntriesResponse_SuppressionInfo createEmptyInstance() => create(); static $pb.PbList createRepeated() => $pb.PbList(); @@ -1235,27 +1110,22 @@ class TailLogEntriesResponse_SuppressionInfo extends $pb.GeneratedMessage { @$pb.TagNumber(1) TailLogEntriesResponse_SuppressionInfo_Reason get reason => $_getN(0); @$pb.TagNumber(1) - set reason(TailLogEntriesResponse_SuppressionInfo_Reason v) { - setField(1, v); - } - + set reason(TailLogEntriesResponse_SuppressionInfo_Reason value) => + $_setField(1, value); @$pb.TagNumber(1) $core.bool hasReason() => $_has(0); @$pb.TagNumber(1) - void clearReason() => clearField(1); + void clearReason() => $_clearField(1); /// A lower bound on the count of entries omitted due to `reason`. @$pb.TagNumber(2) $core.int get suppressedCount => $_getIZ(1); @$pb.TagNumber(2) - set suppressedCount($core.int v) { - $_setSignedInt32(1, v); - } - + set suppressedCount($core.int value) => $_setSignedInt32(1, value); @$pb.TagNumber(2) $core.bool hasSuppressedCount() => $_has(1); @$pb.TagNumber(2) - void clearSuppressedCount() => clearField(2); + void clearSuppressedCount() => $_clearField(2); } /// Result returned from `TailLogEntries`. @@ -1265,51 +1135,46 @@ class TailLogEntriesResponse extends $pb.GeneratedMessage { $core.Iterable? suppressionInfo, }) { final result = create(); - if (entries != null) { - result.entries.addAll(entries); - } - if (suppressionInfo != null) { - result.suppressionInfo.addAll(suppressionInfo); - } + if (entries != null) result.entries.addAll(entries); + if (suppressionInfo != null) result.suppressionInfo.addAll(suppressionInfo); return result; } - TailLogEntriesResponse._() : super(); - factory TailLogEntriesResponse.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory TailLogEntriesResponse.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); + + TailLogEntriesResponse._(); + + factory TailLogEntriesResponse.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory TailLogEntriesResponse.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); static final $pb.BuilderInfo _i = $pb.BuilderInfo( _omitMessageNames ? '' : 'TailLogEntriesResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.logging.v2'), createEmptyInstance: create) - ..pc<$3.LogEntry>(1, _omitFieldNames ? '' : 'entries', $pb.PbFieldType.PM, + ..pPM<$3.LogEntry>(1, _omitFieldNames ? '' : 'entries', subBuilder: $3.LogEntry.create) - ..pc( - 2, _omitFieldNames ? '' : 'suppressionInfo', $pb.PbFieldType.PM, + ..pPM( + 2, _omitFieldNames ? '' : 'suppressionInfo', subBuilder: TailLogEntriesResponse_SuppressionInfo.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') - TailLogEntriesResponse clone() => - TailLogEntriesResponse()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + TailLogEntriesResponse clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') TailLogEntriesResponse copyWith( void Function(TailLogEntriesResponse) updates) => super.copyWith((message) => updates(message as TailLogEntriesResponse)) as TailLogEntriesResponse; + @$core.override $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static TailLogEntriesResponse create() => TailLogEntriesResponse._(); + @$core.override TailLogEntriesResponse createEmptyInstance() => create(); static $pb.PbList createRepeated() => $pb.PbList(); @@ -1322,7 +1187,7 @@ class TailLogEntriesResponse extends $pb.GeneratedMessage { /// increasing values of `LogEntry.timestamp`. Ordering is not guaranteed /// between separate responses. @$pb.TagNumber(1) - $core.List<$3.LogEntry> get entries => $_getList(0); + $pb.PbList<$3.LogEntry> get entries => $_getList(0); /// If entries that otherwise would have been included in the session were not /// sent back to the client, counts of relevant entries omitted from the @@ -1330,10 +1195,11 @@ class TailLogEntriesResponse extends $pb.GeneratedMessage { /// one of each reason per response. The counts represent the number of /// suppressed entries since the last streamed response. @$pb.TagNumber(2) - $core.List get suppressionInfo => + $pb.PbList get suppressionInfo => $_getList(1); } -const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); -const _omitMessageNames = +const $core.bool _omitFieldNames = + $core.bool.fromEnvironment('protobuf.omit_field_names'); +const $core.bool _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/example/googleapis/lib/src/generated/google/logging/v2/logging.pbenum.dart b/example/googleapis/lib/src/generated/google/logging/v2/logging.pbenum.dart index fbdb18e4..747df7e5 100644 --- a/example/googleapis/lib/src/generated/google/logging/v2/logging.pbenum.dart +++ b/example/googleapis/lib/src/generated/google/logging/v2/logging.pbenum.dart @@ -1,13 +1,14 @@ +// This is a generated file - do not edit. // -// Generated code. Do not modify. -// source: google/logging/v2/logging.proto -// -// @dart = 2.12 +// Generated from google/logging/v2/logging.proto. + +// @dart = 3.3 // ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names import 'dart:core' as $core; @@ -15,12 +16,21 @@ import 'package:protobuf/protobuf.dart' as $pb; /// An indicator of why entries were omitted. class TailLogEntriesResponse_SuppressionInfo_Reason extends $pb.ProtobufEnum { + /// Unexpected default. static const TailLogEntriesResponse_SuppressionInfo_Reason REASON_UNSPECIFIED = TailLogEntriesResponse_SuppressionInfo_Reason._( 0, _omitEnumNames ? '' : 'REASON_UNSPECIFIED'); + + /// Indicates suppression occurred due to relevant entries being + /// received in excess of rate limits. For quotas and limits, see + /// [Logging API quotas and + /// limits](https://cloud.google.com/logging/quotas#api-limits). static const TailLogEntriesResponse_SuppressionInfo_Reason RATE_LIMIT = TailLogEntriesResponse_SuppressionInfo_Reason._( 1, _omitEnumNames ? '' : 'RATE_LIMIT'); + + /// Indicates suppression occurred due to the client not consuming + /// responses quickly enough. static const TailLogEntriesResponse_SuppressionInfo_Reason NOT_CONSUMED = TailLogEntriesResponse_SuppressionInfo_Reason._( 2, _omitEnumNames ? '' : 'NOT_CONSUMED'); @@ -32,16 +42,15 @@ class TailLogEntriesResponse_SuppressionInfo_Reason extends $pb.ProtobufEnum { NOT_CONSUMED, ]; - static final $core - .Map<$core.int, TailLogEntriesResponse_SuppressionInfo_Reason> _byValue = - $pb.ProtobufEnum.initByValue(values); + static final $core.List + _byValue = $pb.ProtobufEnum.$_initByValueList(values, 2); static TailLogEntriesResponse_SuppressionInfo_Reason? valueOf( $core.int value) => - _byValue[value]; + value < 0 || value >= _byValue.length ? null : _byValue[value]; const TailLogEntriesResponse_SuppressionInfo_Reason._( - $core.int v, $core.String n) - : super(v, n); + super.value, super.name); } -const _omitEnumNames = $core.bool.fromEnvironment('protobuf.omit_enum_names'); +const $core.bool _omitEnumNames = + $core.bool.fromEnvironment('protobuf.omit_enum_names'); diff --git a/example/googleapis/lib/src/generated/google/logging/v2/logging.pbgrpc.dart b/example/googleapis/lib/src/generated/google/logging/v2/logging.pbgrpc.dart index 5f612cb9..3ddd7f1b 100644 --- a/example/googleapis/lib/src/generated/google/logging/v2/logging.pbgrpc.dart +++ b/example/googleapis/lib/src/generated/google/logging/v2/logging.pbgrpc.dart @@ -1,13 +1,14 @@ +// This is a generated file - do not edit. // -// Generated code. Do not modify. -// source: google/logging/v2/logging.proto -// -// @dart = 2.12 +// Generated from google/logging/v2/logging.proto. + +// @dart = 3.3 // ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names import 'dart:async' as $async; import 'dart:core' as $core; @@ -20,85 +21,120 @@ import 'logging.pb.dart' as $0; export 'logging.pb.dart'; +/// Service for ingesting and querying logs. @$pb.GrpcServiceName('google.logging.v2.LoggingServiceV2') class LoggingServiceV2Client extends $grpc.Client { + /// The hostname for this service. + static const $core.String defaultHost = 'logging.googleapis.com'; + + /// OAuth scopes needed for the client. + static const $core.List<$core.String> oauthScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/cloud-platform.read-only', + 'https://www.googleapis.com/auth/logging.admin', + 'https://www.googleapis.com/auth/logging.read', + 'https://www.googleapis.com/auth/logging.write', + ]; + + LoggingServiceV2Client(super.channel, {super.options, super.interceptors}); + + /// Deletes all the log entries in a log for the _Default Log Bucket. The log + /// reappears if it receives new entries. Log entries written shortly before + /// the delete operation might not be deleted. Entries received after the + /// delete operation with a timestamp before the operation will be deleted. + $grpc.ResponseFuture<$1.Empty> deleteLog( + $0.DeleteLogRequest request, { + $grpc.CallOptions? options, + }) { + return $createUnaryCall(_$deleteLog, request, options: options); + } + + /// Writes log entries to Logging. This API method is the + /// only way to send log entries to Logging. This method + /// is used, directly or indirectly, by the Logging agent + /// (fluentd) and all logging libraries configured to use Logging. + /// A single request may contain log entries for a maximum of 1000 + /// different resources (projects, organizations, billing accounts or + /// folders) + $grpc.ResponseFuture<$0.WriteLogEntriesResponse> writeLogEntries( + $0.WriteLogEntriesRequest request, { + $grpc.CallOptions? options, + }) { + return $createUnaryCall(_$writeLogEntries, request, options: options); + } + + /// Lists log entries. Use this method to retrieve log entries that originated + /// from a project/folder/organization/billing account. For ways to export log + /// entries, see [Exporting + /// Logs](https://cloud.google.com/logging/docs/export). + $grpc.ResponseFuture<$0.ListLogEntriesResponse> listLogEntries( + $0.ListLogEntriesRequest request, { + $grpc.CallOptions? options, + }) { + return $createUnaryCall(_$listLogEntries, request, options: options); + } + + /// Lists the descriptors for monitored resource types used by Logging. + $grpc.ResponseFuture<$0.ListMonitoredResourceDescriptorsResponse> + listMonitoredResourceDescriptors( + $0.ListMonitoredResourceDescriptorsRequest request, { + $grpc.CallOptions? options, + }) { + return $createUnaryCall(_$listMonitoredResourceDescriptors, request, + options: options); + } + + /// Lists the logs in projects, organizations, folders, or billing accounts. + /// Only logs that have entries are listed. + $grpc.ResponseFuture<$0.ListLogsResponse> listLogs( + $0.ListLogsRequest request, { + $grpc.CallOptions? options, + }) { + return $createUnaryCall(_$listLogs, request, options: options); + } + + /// Streaming read of log entries as they are ingested. Until the stream is + /// terminated, it will continue reading logs. + $grpc.ResponseStream<$0.TailLogEntriesResponse> tailLogEntries( + $async.Stream<$0.TailLogEntriesRequest> request, { + $grpc.CallOptions? options, + }) { + return $createStreamingCall(_$tailLogEntries, request, options: options); + } + + // method descriptors + static final _$deleteLog = $grpc.ClientMethod<$0.DeleteLogRequest, $1.Empty>( '/google.logging.v2.LoggingServiceV2/DeleteLog', ($0.DeleteLogRequest value) => value.writeToBuffer(), - ($core.List<$core.int> value) => $1.Empty.fromBuffer(value)); + $1.Empty.fromBuffer); static final _$writeLogEntries = $grpc.ClientMethod<$0.WriteLogEntriesRequest, $0.WriteLogEntriesResponse>( '/google.logging.v2.LoggingServiceV2/WriteLogEntries', ($0.WriteLogEntriesRequest value) => value.writeToBuffer(), - ($core.List<$core.int> value) => - $0.WriteLogEntriesResponse.fromBuffer(value)); + $0.WriteLogEntriesResponse.fromBuffer); static final _$listLogEntries = $grpc.ClientMethod<$0.ListLogEntriesRequest, $0.ListLogEntriesResponse>( '/google.logging.v2.LoggingServiceV2/ListLogEntries', ($0.ListLogEntriesRequest value) => value.writeToBuffer(), - ($core.List<$core.int> value) => - $0.ListLogEntriesResponse.fromBuffer(value)); + $0.ListLogEntriesResponse.fromBuffer); static final _$listMonitoredResourceDescriptors = $grpc.ClientMethod< $0.ListMonitoredResourceDescriptorsRequest, $0.ListMonitoredResourceDescriptorsResponse>( '/google.logging.v2.LoggingServiceV2/ListMonitoredResourceDescriptors', ($0.ListMonitoredResourceDescriptorsRequest value) => value.writeToBuffer(), - ($core.List<$core.int> value) => - $0.ListMonitoredResourceDescriptorsResponse.fromBuffer(value)); + $0.ListMonitoredResourceDescriptorsResponse.fromBuffer); static final _$listLogs = $grpc.ClientMethod<$0.ListLogsRequest, $0.ListLogsResponse>( '/google.logging.v2.LoggingServiceV2/ListLogs', ($0.ListLogsRequest value) => value.writeToBuffer(), - ($core.List<$core.int> value) => - $0.ListLogsResponse.fromBuffer(value)); + $0.ListLogsResponse.fromBuffer); static final _$tailLogEntries = $grpc.ClientMethod<$0.TailLogEntriesRequest, $0.TailLogEntriesResponse>( '/google.logging.v2.LoggingServiceV2/TailLogEntries', ($0.TailLogEntriesRequest value) => value.writeToBuffer(), - ($core.List<$core.int> value) => - $0.TailLogEntriesResponse.fromBuffer(value)); - - LoggingServiceV2Client($grpc.ClientChannel channel, - {$grpc.CallOptions? options, - $core.Iterable<$grpc.ClientInterceptor>? interceptors}) - : super(channel, options: options, interceptors: interceptors); - - $grpc.ResponseFuture<$1.Empty> deleteLog($0.DeleteLogRequest request, - {$grpc.CallOptions? options}) { - return $createUnaryCall(_$deleteLog, request, options: options); - } - - $grpc.ResponseFuture<$0.WriteLogEntriesResponse> writeLogEntries( - $0.WriteLogEntriesRequest request, - {$grpc.CallOptions? options}) { - return $createUnaryCall(_$writeLogEntries, request, options: options); - } - - $grpc.ResponseFuture<$0.ListLogEntriesResponse> listLogEntries( - $0.ListLogEntriesRequest request, - {$grpc.CallOptions? options}) { - return $createUnaryCall(_$listLogEntries, request, options: options); - } - - $grpc.ResponseFuture<$0.ListMonitoredResourceDescriptorsResponse> - listMonitoredResourceDescriptors( - $0.ListMonitoredResourceDescriptorsRequest request, - {$grpc.CallOptions? options}) { - return $createUnaryCall(_$listMonitoredResourceDescriptors, request, - options: options); - } - - $grpc.ResponseFuture<$0.ListLogsResponse> listLogs($0.ListLogsRequest request, - {$grpc.CallOptions? options}) { - return $createUnaryCall(_$listLogs, request, options: options); - } - - $grpc.ResponseStream<$0.TailLogEntriesResponse> tailLogEntries( - $async.Stream<$0.TailLogEntriesRequest> request, - {$grpc.CallOptions? options}) { - return $createStreamingCall(_$tailLogEntries, request, options: options); - } + $0.TailLogEntriesResponse.fromBuffer); } @$pb.GrpcServiceName('google.logging.v2.LoggingServiceV2') @@ -159,47 +195,52 @@ abstract class LoggingServiceV2ServiceBase extends $grpc.Service { ($0.TailLogEntriesResponse value) => value.writeToBuffer())); } - $async.Future<$1.Empty> deleteLog_Pre($grpc.ServiceCall call, - $async.Future<$0.DeleteLogRequest> request) async { - return deleteLog(call, await request); + $async.Future<$1.Empty> deleteLog_Pre($grpc.ServiceCall $call, + $async.Future<$0.DeleteLogRequest> $request) async { + return deleteLog($call, await $request); } + $async.Future<$1.Empty> deleteLog( + $grpc.ServiceCall call, $0.DeleteLogRequest request); + $async.Future<$0.WriteLogEntriesResponse> writeLogEntries_Pre( - $grpc.ServiceCall call, - $async.Future<$0.WriteLogEntriesRequest> request) async { - return writeLogEntries(call, await request); + $grpc.ServiceCall $call, + $async.Future<$0.WriteLogEntriesRequest> $request) async { + return writeLogEntries($call, await $request); } + $async.Future<$0.WriteLogEntriesResponse> writeLogEntries( + $grpc.ServiceCall call, $0.WriteLogEntriesRequest request); + $async.Future<$0.ListLogEntriesResponse> listLogEntries_Pre( - $grpc.ServiceCall call, - $async.Future<$0.ListLogEntriesRequest> request) async { - return listLogEntries(call, await request); + $grpc.ServiceCall $call, + $async.Future<$0.ListLogEntriesRequest> $request) async { + return listLogEntries($call, await $request); } + $async.Future<$0.ListLogEntriesResponse> listLogEntries( + $grpc.ServiceCall call, $0.ListLogEntriesRequest request); + $async.Future<$0.ListMonitoredResourceDescriptorsResponse> listMonitoredResourceDescriptors_Pre( - $grpc.ServiceCall call, + $grpc.ServiceCall $call, $async.Future<$0.ListMonitoredResourceDescriptorsRequest> - request) async { - return listMonitoredResourceDescriptors(call, await request); - } - - $async.Future<$0.ListLogsResponse> listLogs_Pre( - $grpc.ServiceCall call, $async.Future<$0.ListLogsRequest> request) async { - return listLogs(call, await request); + $request) async { + return listMonitoredResourceDescriptors($call, await $request); } - $async.Future<$1.Empty> deleteLog( - $grpc.ServiceCall call, $0.DeleteLogRequest request); - $async.Future<$0.WriteLogEntriesResponse> writeLogEntries( - $grpc.ServiceCall call, $0.WriteLogEntriesRequest request); - $async.Future<$0.ListLogEntriesResponse> listLogEntries( - $grpc.ServiceCall call, $0.ListLogEntriesRequest request); $async.Future<$0.ListMonitoredResourceDescriptorsResponse> listMonitoredResourceDescriptors($grpc.ServiceCall call, $0.ListMonitoredResourceDescriptorsRequest request); + + $async.Future<$0.ListLogsResponse> listLogs_Pre($grpc.ServiceCall $call, + $async.Future<$0.ListLogsRequest> $request) async { + return listLogs($call, await $request); + } + $async.Future<$0.ListLogsResponse> listLogs( $grpc.ServiceCall call, $0.ListLogsRequest request); + $async.Stream<$0.TailLogEntriesResponse> tailLogEntries( $grpc.ServiceCall call, $async.Stream<$0.TailLogEntriesRequest> request); } diff --git a/example/googleapis/lib/src/generated/google/logging/v2/logging.pbjson.dart b/example/googleapis/lib/src/generated/google/logging/v2/logging.pbjson.dart index df191dbd..92b23e2b 100644 --- a/example/googleapis/lib/src/generated/google/logging/v2/logging.pbjson.dart +++ b/example/googleapis/lib/src/generated/google/logging/v2/logging.pbjson.dart @@ -1,13 +1,14 @@ +// This is a generated file - do not edit. // -// Generated code. Do not modify. -// source: google/logging/v2/logging.proto -// -// @dart = 2.12 +// Generated from google/logging/v2/logging.proto. + +// @dart = 3.3 // ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names, unused_import import 'dart:convert' as $convert; import 'dart:core' as $core; diff --git a/example/googleapis/lib/src/generated/google/protobuf/any.pb.dart b/example/googleapis/lib/src/generated/google/protobuf/any.pb.dart index 1eac9903..83f75f91 100644 --- a/example/googleapis/lib/src/generated/google/protobuf/any.pb.dart +++ b/example/googleapis/lib/src/generated/google/protobuf/any.pb.dart @@ -1,152 +1,151 @@ +// This is a generated file - do not edit. // -// Generated code. Do not modify. -// source: google/protobuf/any.proto -// -// @dart = 2.12 +// Generated from google/protobuf/any.proto. + +// @dart = 3.3 // ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package +// ignore_for_file: implementation_imports, library_prefixes +// ignore_for_file: non_constant_identifier_names import 'dart:core' as $core; import 'package:protobuf/protobuf.dart' as $pb; import 'package:protobuf/src/protobuf/mixins/well_known.dart' as $mixin; -/// `Any` contains an arbitrary serialized protocol buffer message along with a -/// URL that describes the type of the serialized message. +export 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions; + +/// `Any` contains an arbitrary serialized protocol buffer message along with a +/// URL that describes the type of the serialized message. /// -/// Protobuf library provides support to pack/unpack Any values in the form -/// of utility functions or additional generated methods of the Any type. +/// Protobuf library provides support to pack/unpack Any values in the form +/// of utility functions or additional generated methods of the Any type. /// -/// Example 1: Pack and unpack a message in C++. +/// Example 1: Pack and unpack a message in C++. /// -/// Foo foo = ...; -/// Any any; -/// any.PackFrom(foo); -/// ... -/// if (any.UnpackTo(&foo)) { -/// ... -/// } +/// Foo foo = ...; +/// Any any; +/// any.PackFrom(foo); +/// ... +/// if (any.UnpackTo(&foo)) { +/// ... +/// } /// -/// Example 2: Pack and unpack a message in Java. +/// Example 2: Pack and unpack a message in Java. /// -/// Foo foo = ...; -/// Any any = Any.pack(foo); -/// ... -/// if (any.is(Foo.class)) { -/// foo = any.unpack(Foo.class); -/// } -/// // or ... -/// if (any.isSameTypeAs(Foo.getDefaultInstance())) { -/// foo = any.unpack(Foo.getDefaultInstance()); -/// } +/// Foo foo = ...; +/// Any any = Any.pack(foo); +/// ... +/// if (any.is(Foo.class)) { +/// foo = any.unpack(Foo.class); +/// } +/// // or ... +/// if (any.isSameTypeAs(Foo.getDefaultInstance())) { +/// foo = any.unpack(Foo.getDefaultInstance()); +/// } /// -/// Example 3: Pack and unpack a message in Python. +/// Example 3: Pack and unpack a message in Python. /// -/// foo = Foo(...) -/// any = Any() -/// any.Pack(foo) -/// ... -/// if any.Is(Foo.DESCRIPTOR): -/// any.Unpack(foo) -/// ... +/// foo = Foo(...) +/// any = Any() +/// any.Pack(foo) +/// ... +/// if any.Is(Foo.DESCRIPTOR): +/// any.Unpack(foo) +/// ... /// -/// Example 4: Pack and unpack a message in Go +/// Example 4: Pack and unpack a message in Go /// -/// foo := &pb.Foo{...} -/// any, err := anypb.New(foo) -/// if err != nil { -/// ... -/// } -/// ... -/// foo := &pb.Foo{} -/// if err := any.UnmarshalTo(foo); err != nil { -/// ... -/// } +/// foo := &pb.Foo{...} +/// any, err := anypb.New(foo) +/// if err != nil { +/// ... +/// } +/// ... +/// foo := &pb.Foo{} +/// if err := any.UnmarshalTo(foo); err != nil { +/// ... +/// } /// -/// The pack methods provided by protobuf library will by default use -/// 'type.googleapis.com/full.type.name' as the type URL and the unpack -/// methods only use the fully qualified type name after the last '/' -/// in the type URL, for example "foo.bar.com/x/y.z" will yield type -/// name "y.z". +/// The pack methods provided by protobuf library will by default use +/// 'type.googleapis.com/full.type.name' as the type URL and the unpack +/// methods only use the fully qualified type name after the last '/' +/// in the type URL, for example "foo.bar.com/x/y.z" will yield type +/// name "y.z". /// -/// JSON -/// ==== -/// The JSON representation of an `Any` value uses the regular -/// representation of the deserialized, embedded message, with an -/// additional field `@type` which contains the type URL. Example: +/// JSON +/// ==== +/// The JSON representation of an `Any` value uses the regular +/// representation of the deserialized, embedded message, with an +/// additional field `@type` which contains the type URL. Example: /// -/// package google.profile; -/// message Person { -/// string first_name = 1; -/// string last_name = 2; -/// } +/// package google.profile; +/// message Person { +/// string first_name = 1; +/// string last_name = 2; +/// } /// -/// { -/// "@type": "type.googleapis.com/google.profile.Person", -/// "firstName": , -/// "lastName": -/// } +/// { +/// "@type": "type.googleapis.com/google.profile.Person", +/// "firstName": , +/// "lastName": +/// } /// -/// If the embedded message type is well-known and has a custom JSON -/// representation, that representation will be embedded adding a field -/// `value` which holds the custom JSON in addition to the `@type` -/// field. Example (for message [google.protobuf.Duration][]): +/// If the embedded message type is well-known and has a custom JSON +/// representation, that representation will be embedded adding a field +/// `value` which holds the custom JSON in addition to the `@type` +/// field. Example (for message [google.protobuf.Duration][]): /// -/// { -/// "@type": "type.googleapis.com/google.protobuf.Duration", -/// "value": "1.212s" -/// } +/// { +/// "@type": "type.googleapis.com/google.protobuf.Duration", +/// "value": "1.212s" +/// } class Any extends $pb.GeneratedMessage with $mixin.AnyMixin { factory Any({ $core.String? typeUrl, $core.List<$core.int>? value, }) { final result = create(); - if (typeUrl != null) { - result.typeUrl = typeUrl; - } - if (value != null) { - result.value = value; - } + if (typeUrl != null) result.typeUrl = typeUrl; + if (value != null) result.value = value; return result; } - Any._() : super(); - 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); + + Any._(); + + factory Any.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory Any.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); 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) + wellKnownType: $mixin.WellKnownType.any) ..aOS(1, _omitFieldNames ? '' : 'typeUrl') ..a<$core.List<$core.int>>( 2, _omitFieldNames ? '' : 'value', $pb.PbFieldType.OY) ..hasRequiredFields = false; - @$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') + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Any clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') Any copyWith(void Function(Any) updates) => super.copyWith((message) => updates(message as Any)) as Any; + @$core.override $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static Any create() => Any._(); + @$core.override Any createEmptyInstance() => create(); static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') @@ -154,58 +153,52 @@ class Any extends $pb.GeneratedMessage with $mixin.AnyMixin { _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static Any? _defaultInstance; - /// A URL/resource name that uniquely identifies the type of the serialized - /// protocol buffer message. This string must contain at least - /// one "/" character. The last segment of the URL's path must represent - /// the fully qualified name of the type (as in - /// `path/google.protobuf.Duration`). The name should be in a canonical form - /// (e.g., leading "." is not accepted). + /// A URL/resource name that uniquely identifies the type of the serialized + /// protocol buffer message. This string must contain at least + /// one "/" character. The last segment of the URL's path must represent + /// the fully qualified name of the type (as in + /// `path/google.protobuf.Duration`). The name should be in a canonical form + /// (e.g., leading "." is not accepted). /// - /// In practice, teams usually precompile into the binary all types that they - /// expect it to use in the context of Any. However, for URLs which use the - /// scheme `http`, `https`, or no scheme, one can optionally set up a type - /// server that maps type URLs to message definitions as follows: + /// In practice, teams usually precompile into the binary all types that they + /// expect it to use in the context of Any. However, for URLs which use the + /// scheme `http`, `https`, or no scheme, one can optionally set up a type + /// server that maps type URLs to message definitions as follows: /// - /// * If no scheme is provided, `https` is assumed. - /// * An HTTP GET on the URL must yield a [google.protobuf.Type][] - /// value in binary format, or produce an error. - /// * Applications are allowed to cache lookup results based on the - /// URL, or have them precompiled into a binary to avoid any - /// lookup. Therefore, binary compatibility needs to be preserved - /// on changes to types. (Use versioned type names to manage - /// breaking changes.) + /// * If no scheme is provided, `https` is assumed. + /// * An HTTP GET on the URL must yield a [google.protobuf.Type][] + /// value in binary format, or produce an error. + /// * Applications are allowed to cache lookup results based on the + /// URL, or have them precompiled into a binary to avoid any + /// lookup. Therefore, binary compatibility needs to be preserved + /// on changes to types. (Use versioned type names to manage + /// breaking changes.) /// - /// Note: this functionality is not currently available in the official - /// protobuf release, and it is not used for type URLs beginning with - /// type.googleapis.com. As of May 2023, there are no widely used type server - /// implementations and no plans to implement one. + /// Note: this functionality is not currently available in the official + /// protobuf release, and it is not used for type URLs beginning with + /// type.googleapis.com. As of May 2023, there are no widely used type server + /// implementations and no plans to implement one. /// - /// Schemes other than `http`, `https` (or the empty scheme) might be - /// used with implementation specific semantics. + /// Schemes other than `http`, `https` (or the empty scheme) might be + /// used with implementation specific semantics. @$pb.TagNumber(1) $core.String get typeUrl => $_getSZ(0); @$pb.TagNumber(1) - set typeUrl($core.String v) { - $_setString(0, v); - } - + set typeUrl($core.String value) => $_setString(0, value); @$pb.TagNumber(1) $core.bool hasTypeUrl() => $_has(0); @$pb.TagNumber(1) - void clearTypeUrl() => clearField(1); + void clearTypeUrl() => $_clearField(1); /// Must be a valid serialized protocol buffer of the above specified type. @$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> value) => $_setBytes(1, value); @$pb.TagNumber(2) $core.bool hasValue() => $_has(1); @$pb.TagNumber(2) - void clearValue() => clearField(2); + void clearValue() => $_clearField(2); /// Creates a new [Any] encoding [message]. /// @@ -219,6 +212,7 @@ class Any extends $pb.GeneratedMessage with $mixin.AnyMixin { } } -const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); -const _omitMessageNames = +const $core.bool _omitFieldNames = + $core.bool.fromEnvironment('protobuf.omit_field_names'); +const $core.bool _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/example/googleapis/lib/src/generated/google/protobuf/any.pbenum.dart b/example/googleapis/lib/src/generated/google/protobuf/any.pbenum.dart index 3744f124..a829fd5b 100644 --- a/example/googleapis/lib/src/generated/google/protobuf/any.pbenum.dart +++ b/example/googleapis/lib/src/generated/google/protobuf/any.pbenum.dart @@ -1,10 +1,11 @@ +// This is a generated file - do not edit. // -// Generated code. Do not modify. -// source: google/protobuf/any.proto -// -// @dart = 2.12 +// Generated from google/protobuf/any.proto. + +// @dart = 3.3 // ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names diff --git a/example/googleapis/lib/src/generated/google/protobuf/any.pbjson.dart b/example/googleapis/lib/src/generated/google/protobuf/any.pbjson.dart index eafbc6bd..1a9543b2 100644 --- a/example/googleapis/lib/src/generated/google/protobuf/any.pbjson.dart +++ b/example/googleapis/lib/src/generated/google/protobuf/any.pbjson.dart @@ -1,13 +1,14 @@ +// This is a generated file - do not edit. // -// Generated code. Do not modify. -// source: google/protobuf/any.proto -// -// @dart = 2.12 +// Generated from google/protobuf/any.proto. + +// @dart = 3.3 // ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names, unused_import import 'dart:convert' as $convert; import 'dart:core' as $core; diff --git a/example/googleapis/lib/src/generated/google/protobuf/duration.pb.dart b/example/googleapis/lib/src/generated/google/protobuf/duration.pb.dart index 2c225ac5..fafadb50 100644 --- a/example/googleapis/lib/src/generated/google/protobuf/duration.pb.dart +++ b/example/googleapis/lib/src/generated/google/protobuf/duration.pb.dart @@ -1,13 +1,15 @@ +// This is a generated file - do not edit. // -// Generated code. Do not modify. -// source: google/protobuf/duration.proto -// -// @dart = 2.12 +// Generated from google/protobuf/duration.proto. + +// @dart = 3.3 // ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package +// ignore_for_file: implementation_imports, library_prefixes +// ignore_for_file: non_constant_identifier_names import 'dart:core' as $core; @@ -15,111 +17,108 @@ import 'package:fixnum/fixnum.dart' as $fixnum; import 'package:protobuf/protobuf.dart' as $pb; import 'package:protobuf/src/protobuf/mixins/well_known.dart' as $mixin; -/// A Duration represents a signed, fixed-length span of time represented -/// as a count of seconds and fractions of seconds at nanosecond -/// resolution. It is independent of any calendar and concepts like "day" -/// or "month". It is related to Timestamp in that the difference between -/// two Timestamp values is a Duration and it can be added or subtracted -/// from a Timestamp. Range is approximately +-10,000 years. +export 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions; + +/// A Duration represents a signed, fixed-length span of time represented +/// as a count of seconds and fractions of seconds at nanosecond +/// resolution. It is independent of any calendar and concepts like "day" +/// or "month". It is related to Timestamp in that the difference between +/// two Timestamp values is a Duration and it can be added or subtracted +/// from a Timestamp. Range is approximately +-10,000 years. /// -/// # Examples +/// # Examples /// -/// Example 1: Compute Duration from two Timestamps in pseudo code. +/// Example 1: Compute Duration from two Timestamps in pseudo code. /// -/// Timestamp start = ...; -/// Timestamp end = ...; -/// Duration duration = ...; +/// Timestamp start = ...; +/// Timestamp end = ...; +/// Duration duration = ...; /// -/// duration.seconds = end.seconds - start.seconds; -/// duration.nanos = end.nanos - start.nanos; +/// duration.seconds = end.seconds - start.seconds; +/// duration.nanos = end.nanos - start.nanos; /// -/// if (duration.seconds < 0 && duration.nanos > 0) { -/// duration.seconds += 1; -/// duration.nanos -= 1000000000; -/// } else if (duration.seconds > 0 && duration.nanos < 0) { -/// duration.seconds -= 1; -/// duration.nanos += 1000000000; -/// } +/// if (duration.seconds < 0 && duration.nanos > 0) { +/// duration.seconds += 1; +/// duration.nanos -= 1000000000; +/// } else if (duration.seconds > 0 && duration.nanos < 0) { +/// duration.seconds -= 1; +/// duration.nanos += 1000000000; +/// } /// -/// Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. +/// Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. /// -/// Timestamp start = ...; -/// Duration duration = ...; -/// Timestamp end = ...; +/// Timestamp start = ...; +/// Duration duration = ...; +/// Timestamp end = ...; /// -/// end.seconds = start.seconds + duration.seconds; -/// end.nanos = start.nanos + duration.nanos; +/// end.seconds = start.seconds + duration.seconds; +/// end.nanos = start.nanos + duration.nanos; /// -/// if (end.nanos < 0) { -/// end.seconds -= 1; -/// end.nanos += 1000000000; -/// } else if (end.nanos >= 1000000000) { -/// end.seconds += 1; -/// end.nanos -= 1000000000; -/// } +/// if (end.nanos < 0) { +/// end.seconds -= 1; +/// end.nanos += 1000000000; +/// } else if (end.nanos >= 1000000000) { +/// end.seconds += 1; +/// end.nanos -= 1000000000; +/// } /// -/// Example 3: Compute Duration from datetime.timedelta in Python. +/// Example 3: Compute Duration from datetime.timedelta in Python. /// -/// td = datetime.timedelta(days=3, minutes=10) -/// duration = Duration() -/// duration.FromTimedelta(td) +/// td = datetime.timedelta(days=3, minutes=10) +/// duration = Duration() +/// duration.FromTimedelta(td) /// -/// # JSON Mapping +/// # JSON Mapping /// -/// In JSON format, the Duration type is encoded as a string rather than an -/// object, where the string ends in the suffix "s" (indicating seconds) and -/// is preceded by the number of seconds, with nanoseconds expressed as -/// fractional seconds. For example, 3 seconds with 0 nanoseconds should be -/// encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should -/// be expressed in JSON format as "3.000000001s", and 3 seconds and 1 -/// microsecond should be expressed in JSON format as "3.000001s". +/// In JSON format, the Duration type is encoded as a string rather than an +/// object, where the string ends in the suffix "s" (indicating seconds) and +/// is preceded by the number of seconds, with nanoseconds expressed as +/// fractional seconds. For example, 3 seconds with 0 nanoseconds should be +/// encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should +/// be expressed in JSON format as "3.000000001s", and 3 seconds and 1 +/// microsecond should be expressed in JSON format as "3.000001s". class Duration extends $pb.GeneratedMessage with $mixin.DurationMixin { factory Duration({ $fixnum.Int64? seconds, $core.int? nanos, }) { final result = create(); - if (seconds != null) { - result.seconds = seconds; - } - if (nanos != null) { - result.nanos = nanos; - } + if (seconds != null) result.seconds = seconds; + if (nanos != null) result.nanos = nanos; return result; } - Duration._() : super(); - factory Duration.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory Duration.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); + + Duration._(); + + factory Duration.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory Duration.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); static final $pb.BuilderInfo _i = $pb.BuilderInfo( _omitMessageNames ? '' : 'Duration', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), createEmptyInstance: create, - toProto3Json: $mixin.DurationMixin.toProto3JsonHelper, - fromProto3Json: $mixin.DurationMixin.fromProto3JsonHelper) + wellKnownType: $mixin.WellKnownType.duration) ..aInt64(1, _omitFieldNames ? '' : 'seconds') - ..a<$core.int>(2, _omitFieldNames ? '' : 'nanos', $pb.PbFieldType.O3) + ..aI(2, _omitFieldNames ? '' : 'nanos') ..hasRequiredFields = false; - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - Duration clone() => Duration()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Duration clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') Duration copyWith(void Function(Duration) updates) => super.copyWith((message) => updates(message as Duration)) as Duration; + @$core.override $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static Duration create() => Duration._(); + @$core.override Duration createEmptyInstance() => create(); static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') @@ -133,14 +132,11 @@ class Duration extends $pb.GeneratedMessage with $mixin.DurationMixin { @$pb.TagNumber(1) $fixnum.Int64 get seconds => $_getI64(0); @$pb.TagNumber(1) - set seconds($fixnum.Int64 v) { - $_setInt64(0, v); - } - + set seconds($fixnum.Int64 value) => $_setInt64(0, value); @$pb.TagNumber(1) $core.bool hasSeconds() => $_has(0); @$pb.TagNumber(1) - void clearSeconds() => clearField(1); + void clearSeconds() => $_clearField(1); /// Signed fractions of a second at nanosecond resolution of the span /// of time. Durations less than one second are represented with a 0 @@ -151,16 +147,29 @@ class Duration extends $pb.GeneratedMessage with $mixin.DurationMixin { @$pb.TagNumber(2) $core.int get nanos => $_getIZ(1); @$pb.TagNumber(2) - set nanos($core.int v) { - $_setSignedInt32(1, v); - } - + set nanos($core.int value) => $_setSignedInt32(1, value); @$pb.TagNumber(2) $core.bool hasNanos() => $_has(1); @$pb.TagNumber(2) - void clearNanos() => clearField(2); + void clearNanos() => $_clearField(2); + + /// Converts the [Duration] to [$core.Duration]. + /// + /// This is a lossy conversion, as [$core.Duration] is limited to [int] + /// microseconds and also does not support nanosecond precision. + $core.Duration toDart() => $core.Duration( + seconds: seconds.toInt(), + microseconds: nanos ~/ 1000, + ); + + /// Creates a new instance from [$core.Duration]. + static Duration fromDart($core.Duration duration) => Duration() + ..seconds = $fixnum.Int64(duration.inSeconds) + ..nanos = + (duration.inMicroseconds % $core.Duration.microsecondsPerSecond) * 1000; } -const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); -const _omitMessageNames = +const $core.bool _omitFieldNames = + $core.bool.fromEnvironment('protobuf.omit_field_names'); +const $core.bool _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/example/googleapis/lib/src/generated/google/protobuf/duration.pbenum.dart b/example/googleapis/lib/src/generated/google/protobuf/duration.pbenum.dart index 1a2c58d8..bc980256 100644 --- a/example/googleapis/lib/src/generated/google/protobuf/duration.pbenum.dart +++ b/example/googleapis/lib/src/generated/google/protobuf/duration.pbenum.dart @@ -1,10 +1,11 @@ +// This is a generated file - do not edit. // -// Generated code. Do not modify. -// source: google/protobuf/duration.proto -// -// @dart = 2.12 +// Generated from google/protobuf/duration.proto. + +// @dart = 3.3 // ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names diff --git a/example/googleapis/lib/src/generated/google/protobuf/duration.pbjson.dart b/example/googleapis/lib/src/generated/google/protobuf/duration.pbjson.dart index 5847acb2..9d986eaf 100644 --- a/example/googleapis/lib/src/generated/google/protobuf/duration.pbjson.dart +++ b/example/googleapis/lib/src/generated/google/protobuf/duration.pbjson.dart @@ -1,13 +1,14 @@ +// This is a generated file - do not edit. // -// Generated code. Do not modify. -// source: google/protobuf/duration.proto -// -// @dart = 2.12 +// Generated from google/protobuf/duration.proto. + +// @dart = 3.3 // ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names, unused_import import 'dart:convert' as $convert; import 'dart:core' as $core; diff --git a/example/googleapis/lib/src/generated/google/protobuf/empty.pb.dart b/example/googleapis/lib/src/generated/google/protobuf/empty.pb.dart index 5c5ce508..cd583381 100644 --- a/example/googleapis/lib/src/generated/google/protobuf/empty.pb.dart +++ b/example/googleapis/lib/src/generated/google/protobuf/empty.pb.dart @@ -1,34 +1,39 @@ +// This is a generated file - do not edit. // -// Generated code. Do not modify. -// source: google/protobuf/empty.proto -// -// @dart = 2.12 +// Generated from google/protobuf/empty.proto. + +// @dart = 3.3 // ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names import 'dart:core' as $core; import 'package:protobuf/protobuf.dart' as $pb; -/// A generic empty message that you can re-use to avoid defining duplicated -/// empty messages in your APIs. A typical example is to use it as the request -/// or the response type of an API method. For instance: +export 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions; + +/// A generic empty message that you can re-use to avoid defining duplicated +/// empty messages in your APIs. A typical example is to use it as the request +/// or the response type of an API method. For instance: /// -/// service Foo { -/// rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); -/// } +/// service Foo { +/// rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); +/// } class Empty extends $pb.GeneratedMessage { factory Empty() => create(); - Empty._() : super(); - factory Empty.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory Empty.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); + + Empty._(); + + factory Empty.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory Empty.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); static final $pb.BuilderInfo _i = $pb.BuilderInfo( _omitMessageNames ? '' : 'Empty', @@ -37,20 +42,18 @@ class Empty extends $pb.GeneratedMessage { 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') - Empty clone() => Empty()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Empty clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') Empty copyWith(void Function(Empty) updates) => super.copyWith((message) => updates(message as Empty)) as Empty; + @$core.override $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static Empty create() => Empty._(); + @$core.override Empty createEmptyInstance() => create(); static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') @@ -59,5 +62,5 @@ class Empty extends $pb.GeneratedMessage { static Empty? _defaultInstance; } -const _omitMessageNames = +const $core.bool _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/example/googleapis/lib/src/generated/google/protobuf/empty.pbenum.dart b/example/googleapis/lib/src/generated/google/protobuf/empty.pbenum.dart index 2f2a7613..0573bd5a 100644 --- a/example/googleapis/lib/src/generated/google/protobuf/empty.pbenum.dart +++ b/example/googleapis/lib/src/generated/google/protobuf/empty.pbenum.dart @@ -1,10 +1,11 @@ +// This is a generated file - do not edit. // -// Generated code. Do not modify. -// source: google/protobuf/empty.proto -// -// @dart = 2.12 +// Generated from google/protobuf/empty.proto. + +// @dart = 3.3 // ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names diff --git a/example/googleapis/lib/src/generated/google/protobuf/empty.pbjson.dart b/example/googleapis/lib/src/generated/google/protobuf/empty.pbjson.dart index 35f6e2ec..1a7b5e48 100644 --- a/example/googleapis/lib/src/generated/google/protobuf/empty.pbjson.dart +++ b/example/googleapis/lib/src/generated/google/protobuf/empty.pbjson.dart @@ -1,13 +1,14 @@ +// This is a generated file - do not edit. // -// Generated code. Do not modify. -// source: google/protobuf/empty.proto -// -// @dart = 2.12 +// Generated from google/protobuf/empty.proto. + +// @dart = 3.3 // ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names, unused_import import 'dart:convert' as $convert; import 'dart:core' as $core; diff --git a/example/googleapis/lib/src/generated/google/protobuf/struct.pb.dart b/example/googleapis/lib/src/generated/google/protobuf/struct.pb.dart index fa1e3e72..ac3b54c6 100644 --- a/example/googleapis/lib/src/generated/google/protobuf/struct.pb.dart +++ b/example/googleapis/lib/src/generated/google/protobuf/struct.pb.dart @@ -1,13 +1,15 @@ +// This is a generated file - do not edit. // -// Generated code. Do not modify. -// source: google/protobuf/struct.proto -// -// @dart = 2.12 +// Generated from google/protobuf/struct.proto. + +// @dart = 3.3 // ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package +// ignore_for_file: implementation_imports, library_prefixes +// ignore_for_file: non_constant_identifier_names import 'dart:core' as $core; @@ -16,41 +18,42 @@ import 'package:protobuf/src/protobuf/mixins/well_known.dart' as $mixin; import 'struct.pbenum.dart'; +export 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions; + export 'struct.pbenum.dart'; -/// `Struct` represents a structured data value, consisting of fields -/// which map to dynamically typed values. In some languages, `Struct` -/// might be supported by a native representation. For example, in -/// scripting languages like JS a struct is represented as an -/// object. The details of that representation are described together -/// with the proto support for the language. +/// `Struct` represents a structured data value, consisting of fields +/// which map to dynamically typed values. In some languages, `Struct` +/// might be supported by a native representation. For example, in +/// scripting languages like JS a struct is represented as an +/// object. The details of that representation are described together +/// with the proto support for the language. /// -/// The JSON representation for `Struct` is JSON object. +/// The JSON representation for `Struct` is JSON object. class Struct extends $pb.GeneratedMessage with $mixin.StructMixin { factory Struct({ - $core.Map<$core.String, Value>? fields, + $core.Iterable<$core.MapEntry<$core.String, Value>>? fields, }) { final result = create(); - if (fields != null) { - result.fields.addAll(fields); - } + if (fields != null) result.fields.addEntries(fields); return result; } - Struct._() : super(); - factory Struct.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory Struct.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); + + Struct._(); + + factory Struct.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory Struct.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); static final $pb.BuilderInfo _i = $pb.BuilderInfo( _omitMessageNames ? '' : 'Struct', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), createEmptyInstance: create, - toProto3Json: $mixin.StructMixin.toProto3JsonHelper, - fromProto3Json: $mixin.StructMixin.fromProto3JsonHelper) + wellKnownType: $mixin.WellKnownType.struct) ..m<$core.String, Value>(1, _omitFieldNames ? '' : 'fields', entryClassName: 'Struct.FieldsEntry', keyFieldType: $pb.PbFieldType.OS, @@ -60,20 +63,18 @@ class Struct extends $pb.GeneratedMessage with $mixin.StructMixin { packageName: const $pb.PackageName('google.protobuf')) ..hasRequiredFields = false; - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - Struct clone() => Struct()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Struct clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') Struct copyWith(void Function(Struct) updates) => super.copyWith((message) => updates(message as Struct)) as Struct; + @$core.override $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static Struct create() => Struct._(); + @$core.override Struct createEmptyInstance() => create(); static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') @@ -83,7 +84,7 @@ class Struct extends $pb.GeneratedMessage with $mixin.StructMixin { /// Unordered map of dynamically typed values. @$pb.TagNumber(1) - $core.Map<$core.String, Value> get fields => $_getMap(0); + $pb.PbMap<$core.String, Value> get fields => $_getMap(0); } enum Value_Kind { @@ -96,12 +97,12 @@ enum Value_Kind { notSet } -/// `Value` represents a dynamically typed value which can be either -/// null, a number, a string, a boolean, a recursive struct value, or a -/// list of values. A producer of value is expected to set one of these -/// variants. Absence of any variant indicates an error. +/// `Value` represents a dynamically typed value which can be either +/// null, a number, a string, a boolean, a recursive struct value, or a +/// list of values. A producer of value is expected to set one of these +/// variants. Absence of any variant indicates an error. /// -/// The JSON representation for `Value` is JSON value. +/// The JSON representation for `Value` is JSON value. class Value extends $pb.GeneratedMessage with $mixin.ValueMixin { factory Value({ NullValue? nullValue, @@ -112,33 +113,23 @@ class Value extends $pb.GeneratedMessage with $mixin.ValueMixin { ListValue? listValue, }) { final result = create(); - if (nullValue != null) { - result.nullValue = nullValue; - } - if (numberValue != null) { - result.numberValue = numberValue; - } - if (stringValue != null) { - result.stringValue = stringValue; - } - if (boolValue != null) { - result.boolValue = boolValue; - } - if (structValue != null) { - result.structValue = structValue; - } - if (listValue != null) { - result.listValue = listValue; - } + if (nullValue != null) result.nullValue = nullValue; + if (numberValue != null) result.numberValue = numberValue; + if (stringValue != null) result.stringValue = stringValue; + if (boolValue != null) result.boolValue = boolValue; + if (structValue != null) result.structValue = structValue; + if (listValue != null) result.listValue = listValue; return result; } - Value._() : super(); - factory Value.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory Value.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); + + Value._(); + + factory Value.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory Value.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); static const $core.Map<$core.int, Value_Kind> _Value_KindByTag = { 1: Value_Kind.nullValue, @@ -154,15 +145,11 @@ class Value extends $pb.GeneratedMessage with $mixin.ValueMixin { package: const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), createEmptyInstance: create, - toProto3Json: $mixin.ValueMixin.toProto3JsonHelper, - fromProto3Json: $mixin.ValueMixin.fromProto3JsonHelper) + wellKnownType: $mixin.WellKnownType.value) ..oo(0, [1, 2, 3, 4, 5, 6]) - ..e(1, _omitFieldNames ? '' : 'nullValue', $pb.PbFieldType.OE, - defaultOrMaker: NullValue.NULL_VALUE, - valueOf: NullValue.valueOf, + ..aE(1, _omitFieldNames ? '' : 'nullValue', enumValues: NullValue.values) - ..a<$core.double>( - 2, _omitFieldNames ? '' : 'numberValue', $pb.PbFieldType.OD) + ..aD(2, _omitFieldNames ? '' : 'numberValue') ..aOS(3, _omitFieldNames ? '' : 'stringValue') ..aOB(4, _omitFieldNames ? '' : 'boolValue') ..aOM(5, _omitFieldNames ? '' : 'structValue', @@ -171,20 +158,18 @@ class Value extends $pb.GeneratedMessage with $mixin.ValueMixin { subBuilder: ListValue.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') - Value clone() => Value()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Value clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') Value copyWith(void Function(Value) updates) => super.copyWith((message) => updates(message as Value)) as Value; + @$core.override $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static Value create() => Value._(); + @$core.override Value createEmptyInstance() => create(); static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') @@ -192,73 +177,70 @@ class Value extends $pb.GeneratedMessage with $mixin.ValueMixin { _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static Value? _defaultInstance; + @$pb.TagNumber(1) + @$pb.TagNumber(2) + @$pb.TagNumber(3) + @$pb.TagNumber(4) + @$pb.TagNumber(5) + @$pb.TagNumber(6) Value_Kind whichKind() => _Value_KindByTag[$_whichOneof(0)]!; - void clearKind() => clearField($_whichOneof(0)); + @$pb.TagNumber(1) + @$pb.TagNumber(2) + @$pb.TagNumber(3) + @$pb.TagNumber(4) + @$pb.TagNumber(5) + @$pb.TagNumber(6) + void clearKind() => $_clearField($_whichOneof(0)); /// Represents a null value. @$pb.TagNumber(1) NullValue get nullValue => $_getN(0); @$pb.TagNumber(1) - set nullValue(NullValue v) { - setField(1, v); - } - + set nullValue(NullValue value) => $_setField(1, value); @$pb.TagNumber(1) $core.bool hasNullValue() => $_has(0); @$pb.TagNumber(1) - void clearNullValue() => clearField(1); + void clearNullValue() => $_clearField(1); /// Represents a double value. @$pb.TagNumber(2) $core.double get numberValue => $_getN(1); @$pb.TagNumber(2) - set numberValue($core.double v) { - $_setDouble(1, v); - } - + set numberValue($core.double value) => $_setDouble(1, value); @$pb.TagNumber(2) $core.bool hasNumberValue() => $_has(1); @$pb.TagNumber(2) - void clearNumberValue() => clearField(2); + void clearNumberValue() => $_clearField(2); /// Represents a string value. @$pb.TagNumber(3) $core.String get stringValue => $_getSZ(2); @$pb.TagNumber(3) - set stringValue($core.String v) { - $_setString(2, v); - } - + set stringValue($core.String value) => $_setString(2, value); @$pb.TagNumber(3) $core.bool hasStringValue() => $_has(2); @$pb.TagNumber(3) - void clearStringValue() => clearField(3); + void clearStringValue() => $_clearField(3); /// Represents a boolean value. @$pb.TagNumber(4) $core.bool get boolValue => $_getBF(3); @$pb.TagNumber(4) - set boolValue($core.bool v) { - $_setBool(3, v); - } - + set boolValue($core.bool value) => $_setBool(3, value); @$pb.TagNumber(4) $core.bool hasBoolValue() => $_has(3); @$pb.TagNumber(4) - void clearBoolValue() => clearField(4); + void clearBoolValue() => $_clearField(4); /// Represents a structured value. @$pb.TagNumber(5) Struct get structValue => $_getN(4); @$pb.TagNumber(5) - set structValue(Struct v) { - setField(5, v); - } - + set structValue(Struct value) => $_setField(5, value); @$pb.TagNumber(5) $core.bool hasStructValue() => $_has(4); @$pb.TagNumber(5) - void clearStructValue() => clearField(5); + void clearStructValue() => $_clearField(5); @$pb.TagNumber(5) Struct ensureStructValue() => $_ensure(4); @@ -266,64 +248,57 @@ class Value extends $pb.GeneratedMessage with $mixin.ValueMixin { @$pb.TagNumber(6) ListValue get listValue => $_getN(5); @$pb.TagNumber(6) - set listValue(ListValue v) { - setField(6, v); - } - + set listValue(ListValue value) => $_setField(6, value); @$pb.TagNumber(6) $core.bool hasListValue() => $_has(5); @$pb.TagNumber(6) - void clearListValue() => clearField(6); + void clearListValue() => $_clearField(6); @$pb.TagNumber(6) ListValue ensureListValue() => $_ensure(5); } -/// `ListValue` is a wrapper around a repeated field of values. +/// `ListValue` is a wrapper around a repeated field of values. /// -/// The JSON representation for `ListValue` is JSON array. +/// The JSON representation for `ListValue` is JSON array. class ListValue extends $pb.GeneratedMessage with $mixin.ListValueMixin { factory ListValue({ $core.Iterable? values, }) { final result = create(); - if (values != null) { - result.values.addAll(values); - } + if (values != null) result.values.addAll(values); return result; } - ListValue._() : super(); - factory ListValue.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory ListValue.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); + + ListValue._(); + + factory ListValue.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory ListValue.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); static final $pb.BuilderInfo _i = $pb.BuilderInfo( _omitMessageNames ? '' : 'ListValue', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), createEmptyInstance: create, - toProto3Json: $mixin.ListValueMixin.toProto3JsonHelper, - fromProto3Json: $mixin.ListValueMixin.fromProto3JsonHelper) - ..pc(1, _omitFieldNames ? '' : 'values', $pb.PbFieldType.PM, - subBuilder: Value.create) + wellKnownType: $mixin.WellKnownType.listValue) + ..pPM(1, _omitFieldNames ? '' : 'values', subBuilder: Value.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') - ListValue clone() => ListValue()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ListValue clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') ListValue copyWith(void Function(ListValue) updates) => super.copyWith((message) => updates(message as ListValue)) as ListValue; + @$core.override $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static ListValue create() => ListValue._(); + @$core.override ListValue createEmptyInstance() => create(); static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') @@ -333,9 +308,10 @@ class ListValue extends $pb.GeneratedMessage with $mixin.ListValueMixin { /// Repeated field of dynamically typed values. @$pb.TagNumber(1) - $core.List get values => $_getList(0); + $pb.PbList get values => $_getList(0); } -const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); -const _omitMessageNames = +const $core.bool _omitFieldNames = + $core.bool.fromEnvironment('protobuf.omit_field_names'); +const $core.bool _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/example/googleapis/lib/src/generated/google/protobuf/struct.pbenum.dart b/example/googleapis/lib/src/generated/google/protobuf/struct.pbenum.dart index 7f9bf0cb..480d8150 100644 --- a/example/googleapis/lib/src/generated/google/protobuf/struct.pbenum.dart +++ b/example/googleapis/lib/src/generated/google/protobuf/struct.pbenum.dart @@ -1,23 +1,25 @@ +// This is a generated file - do not edit. // -// Generated code. Do not modify. -// source: google/protobuf/struct.proto -// -// @dart = 2.12 +// Generated from google/protobuf/struct.proto. + +// @dart = 3.3 // ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names import 'dart:core' as $core; import 'package:protobuf/protobuf.dart' as $pb; -/// `NullValue` is a singleton enumeration to represent the null value for the -/// `Value` type union. +/// `NullValue` is a singleton enumeration to represent the null value for the +/// `Value` type union. /// -/// The JSON representation for `NullValue` is JSON `null`. +/// The JSON representation for `NullValue` is JSON `null`. class NullValue extends $pb.ProtobufEnum { + /// Null value. static const NullValue NULL_VALUE = NullValue._(0, _omitEnumNames ? '' : 'NULL_VALUE'); @@ -25,11 +27,13 @@ class NullValue extends $pb.ProtobufEnum { NULL_VALUE, ]; - static final $core.Map<$core.int, NullValue> _byValue = - $pb.ProtobufEnum.initByValue(values); - static NullValue? valueOf($core.int value) => _byValue[value]; + static final $core.List _byValue = + $pb.ProtobufEnum.$_initByValueList(values, 0); + static NullValue? valueOf($core.int value) => + value < 0 || value >= _byValue.length ? null : _byValue[value]; - const NullValue._($core.int v, $core.String n) : super(v, n); + const NullValue._(super.value, super.name); } -const _omitEnumNames = $core.bool.fromEnvironment('protobuf.omit_enum_names'); +const $core.bool _omitEnumNames = + $core.bool.fromEnvironment('protobuf.omit_enum_names'); diff --git a/example/googleapis/lib/src/generated/google/protobuf/struct.pbjson.dart b/example/googleapis/lib/src/generated/google/protobuf/struct.pbjson.dart index c0693f57..87f9cb49 100644 --- a/example/googleapis/lib/src/generated/google/protobuf/struct.pbjson.dart +++ b/example/googleapis/lib/src/generated/google/protobuf/struct.pbjson.dart @@ -1,13 +1,14 @@ +// This is a generated file - do not edit. // -// Generated code. Do not modify. -// source: google/protobuf/struct.proto -// -// @dart = 2.12 +// Generated from google/protobuf/struct.proto. + +// @dart = 3.3 // ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names, unused_import import 'dart:convert' as $convert; import 'dart:core' as $core; diff --git a/example/googleapis/lib/src/generated/google/protobuf/timestamp.pb.dart b/example/googleapis/lib/src/generated/google/protobuf/timestamp.pb.dart index 3282fc27..9421974e 100644 --- a/example/googleapis/lib/src/generated/google/protobuf/timestamp.pb.dart +++ b/example/googleapis/lib/src/generated/google/protobuf/timestamp.pb.dart @@ -1,13 +1,15 @@ +// This is a generated file - do not edit. // -// Generated code. Do not modify. -// source: google/protobuf/timestamp.proto -// -// @dart = 2.12 +// Generated from google/protobuf/timestamp.proto. + +// @dart = 3.3 // ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package +// ignore_for_file: implementation_imports, library_prefixes +// ignore_for_file: non_constant_identifier_names import 'dart:core' as $core; @@ -15,142 +17,139 @@ import 'package:fixnum/fixnum.dart' as $fixnum; import 'package:protobuf/protobuf.dart' as $pb; import 'package:protobuf/src/protobuf/mixins/well_known.dart' as $mixin; -/// A Timestamp represents a point in time independent of any time zone or local -/// calendar, encoded as a count of seconds and fractions of seconds at -/// nanosecond resolution. The count is relative to an epoch at UTC midnight on -/// January 1, 1970, in the proleptic Gregorian calendar which extends the -/// Gregorian calendar backwards to year one. +export 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions; + +/// A Timestamp represents a point in time independent of any time zone or local +/// calendar, encoded as a count of seconds and fractions of seconds at +/// nanosecond resolution. The count is relative to an epoch at UTC midnight on +/// January 1, 1970, in the proleptic Gregorian calendar which extends the +/// Gregorian calendar backwards to year one. /// -/// All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap -/// second table is needed for interpretation, using a [24-hour linear -/// smear](https://developers.google.com/time/smear). +/// All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap +/// second table is needed for interpretation, using a [24-hour linear +/// smear](https://developers.google.com/time/smear). /// -/// The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By -/// restricting to that range, we ensure that we can convert to and from [RFC -/// 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. +/// The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By +/// restricting to that range, we ensure that we can convert to and from [RFC +/// 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. /// -/// # Examples +/// # Examples /// -/// Example 1: Compute Timestamp from POSIX `time()`. +/// Example 1: Compute Timestamp from POSIX `time()`. /// -/// Timestamp timestamp; -/// timestamp.set_seconds(time(NULL)); -/// timestamp.set_nanos(0); +/// Timestamp timestamp; +/// timestamp.set_seconds(time(NULL)); +/// timestamp.set_nanos(0); /// -/// Example 2: Compute Timestamp from POSIX `gettimeofday()`. +/// Example 2: Compute Timestamp from POSIX `gettimeofday()`. /// -/// struct timeval tv; -/// gettimeofday(&tv, NULL); +/// struct timeval tv; +/// gettimeofday(&tv, NULL); /// -/// Timestamp timestamp; -/// timestamp.set_seconds(tv.tv_sec); -/// timestamp.set_nanos(tv.tv_usec * 1000); +/// Timestamp timestamp; +/// timestamp.set_seconds(tv.tv_sec); +/// timestamp.set_nanos(tv.tv_usec * 1000); /// -/// Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. +/// Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. /// -/// FILETIME ft; -/// GetSystemTimeAsFileTime(&ft); -/// UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; +/// FILETIME ft; +/// GetSystemTimeAsFileTime(&ft); +/// UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; /// -/// // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z -/// // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. -/// Timestamp timestamp; -/// timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); -/// timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); +/// // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z +/// // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. +/// Timestamp timestamp; +/// timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); +/// timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); /// -/// Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. +/// Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. /// -/// long millis = System.currentTimeMillis(); +/// long millis = System.currentTimeMillis(); /// -/// Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) -/// .setNanos((int) ((millis % 1000) * 1000000)).build(); +/// Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) +/// .setNanos((int) ((millis % 1000) * 1000000)).build(); /// -/// Example 5: Compute Timestamp from Java `Instant.now()`. +/// Example 5: Compute Timestamp from Java `Instant.now()`. /// -/// Instant now = Instant.now(); +/// Instant now = Instant.now(); /// -/// Timestamp timestamp = -/// Timestamp.newBuilder().setSeconds(now.getEpochSecond()) -/// .setNanos(now.getNano()).build(); +/// Timestamp timestamp = +/// Timestamp.newBuilder().setSeconds(now.getEpochSecond()) +/// .setNanos(now.getNano()).build(); /// -/// Example 6: Compute Timestamp from current time in Python. +/// Example 6: Compute Timestamp from current time in Python. /// -/// timestamp = Timestamp() -/// timestamp.GetCurrentTime() +/// timestamp = Timestamp() +/// timestamp.GetCurrentTime() /// -/// # JSON Mapping +/// # JSON Mapping /// -/// In JSON format, the Timestamp type is encoded as a string in the -/// [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the -/// format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" -/// where {year} is always expressed using four digits while {month}, {day}, -/// {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional -/// seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), -/// are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone -/// is required. A proto3 JSON serializer should always use UTC (as indicated by -/// "Z") when printing the Timestamp type and a proto3 JSON parser should be -/// able to accept both UTC and other timezones (as indicated by an offset). +/// In JSON format, the Timestamp type is encoded as a string in the +/// [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the +/// format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" +/// where {year} is always expressed using four digits while {month}, {day}, +/// {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional +/// seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), +/// are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone +/// is required. A proto3 JSON serializer should always use UTC (as indicated by +/// "Z") when printing the Timestamp type and a proto3 JSON parser should be +/// able to accept both UTC and other timezones (as indicated by an offset). /// -/// For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past -/// 01:30 UTC on January 15, 2017. +/// For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past +/// 01:30 UTC on January 15, 2017. /// -/// In JavaScript, one can convert a Date object to this format using the -/// standard -/// [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) -/// method. In Python, a standard `datetime.datetime` object can be converted -/// to this format using -/// [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with -/// the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use -/// the Joda Time's [`ISODateTimeFormat.dateTime()`]( -/// http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() -/// ) to obtain a formatter capable of generating timestamps in this format. +/// In JavaScript, one can convert a Date object to this format using the +/// standard +/// [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) +/// method. In Python, a standard `datetime.datetime` object can be converted +/// to this format using +/// [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with +/// the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use +/// the Joda Time's [`ISODateTimeFormat.dateTime()`]( +/// http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() +/// ) to obtain a formatter capable of generating timestamps in this format. class Timestamp extends $pb.GeneratedMessage with $mixin.TimestampMixin { factory Timestamp({ $fixnum.Int64? seconds, $core.int? nanos, }) { final result = create(); - if (seconds != null) { - result.seconds = seconds; - } - if (nanos != null) { - result.nanos = nanos; - } + if (seconds != null) result.seconds = seconds; + if (nanos != null) result.nanos = nanos; return result; } - Timestamp._() : super(); - factory Timestamp.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory Timestamp.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); + + Timestamp._(); + + factory Timestamp.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory Timestamp.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); static final $pb.BuilderInfo _i = $pb.BuilderInfo( _omitMessageNames ? '' : 'Timestamp', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), createEmptyInstance: create, - toProto3Json: $mixin.TimestampMixin.toProto3JsonHelper, - fromProto3Json: $mixin.TimestampMixin.fromProto3JsonHelper) + wellKnownType: $mixin.WellKnownType.timestamp) ..aInt64(1, _omitFieldNames ? '' : 'seconds') - ..a<$core.int>(2, _omitFieldNames ? '' : 'nanos', $pb.PbFieldType.O3) + ..aI(2, _omitFieldNames ? '' : 'nanos') ..hasRequiredFields = false; - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - Timestamp clone() => Timestamp()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Timestamp clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') Timestamp copyWith(void Function(Timestamp) updates) => super.copyWith((message) => updates(message as Timestamp)) as Timestamp; + @$core.override $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static Timestamp create() => Timestamp._(); + @$core.override Timestamp createEmptyInstance() => create(); static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') @@ -158,36 +157,31 @@ class Timestamp extends $pb.GeneratedMessage with $mixin.TimestampMixin { _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static Timestamp? _defaultInstance; - /// Represents seconds of UTC time since Unix epoch - /// 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - /// 9999-12-31T23:59:59Z inclusive. + /// Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + /// be between -315576000000 and 315576000000 inclusive (which corresponds to + /// 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). @$pb.TagNumber(1) $fixnum.Int64 get seconds => $_getI64(0); @$pb.TagNumber(1) - set seconds($fixnum.Int64 v) { - $_setInt64(0, v); - } - + set seconds($fixnum.Int64 value) => $_setInt64(0, value); @$pb.TagNumber(1) $core.bool hasSeconds() => $_has(0); @$pb.TagNumber(1) - void clearSeconds() => clearField(1); + void clearSeconds() => $_clearField(1); - /// Non-negative fractions of a second at nanosecond resolution. Negative - /// second values with fractions must still have non-negative nanos values - /// that count forward in time. Must be from 0 to 999,999,999 + /// Non-negative fractions of a second at nanosecond resolution. This field is + /// the nanosecond portion of the duration, not an alternative to seconds. + /// Negative second values with fractions must still have non-negative nanos + /// values that count forward in time. Must be between 0 and 999,999,999 /// inclusive. @$pb.TagNumber(2) $core.int get nanos => $_getIZ(1); @$pb.TagNumber(2) - set nanos($core.int v) { - $_setSignedInt32(1, v); - } - + set nanos($core.int value) => $_setSignedInt32(1, value); @$pb.TagNumber(2) $core.bool hasNanos() => $_has(1); @$pb.TagNumber(2) - void clearNanos() => clearField(2); + void clearNanos() => $_clearField(2); /// Creates a new instance from [dateTime]. /// @@ -199,6 +193,7 @@ class Timestamp extends $pb.GeneratedMessage with $mixin.TimestampMixin { } } -const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); -const _omitMessageNames = +const $core.bool _omitFieldNames = + $core.bool.fromEnvironment('protobuf.omit_field_names'); +const $core.bool _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/example/googleapis/lib/src/generated/google/protobuf/timestamp.pbenum.dart b/example/googleapis/lib/src/generated/google/protobuf/timestamp.pbenum.dart index a194b805..f952d36b 100644 --- a/example/googleapis/lib/src/generated/google/protobuf/timestamp.pbenum.dart +++ b/example/googleapis/lib/src/generated/google/protobuf/timestamp.pbenum.dart @@ -1,10 +1,11 @@ +// This is a generated file - do not edit. // -// Generated code. Do not modify. -// source: google/protobuf/timestamp.proto -// -// @dart = 2.12 +// Generated from google/protobuf/timestamp.proto. + +// @dart = 3.3 // ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names diff --git a/example/googleapis/lib/src/generated/google/protobuf/timestamp.pbjson.dart b/example/googleapis/lib/src/generated/google/protobuf/timestamp.pbjson.dart index 39ab20fa..a1320368 100644 --- a/example/googleapis/lib/src/generated/google/protobuf/timestamp.pbjson.dart +++ b/example/googleapis/lib/src/generated/google/protobuf/timestamp.pbjson.dart @@ -1,13 +1,14 @@ +// This is a generated file - do not edit. // -// Generated code. Do not modify. -// source: google/protobuf/timestamp.proto -// -// @dart = 2.12 +// Generated from google/protobuf/timestamp.proto. + +// @dart = 3.3 // ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names, unused_import import 'dart:convert' as $convert; import 'dart:core' as $core; diff --git a/example/googleapis/lib/src/generated/google/rpc/status.pb.dart b/example/googleapis/lib/src/generated/google/rpc/status.pb.dart index 3e43a52d..a1a62a1d 100644 --- a/example/googleapis/lib/src/generated/google/rpc/status.pb.dart +++ b/example/googleapis/lib/src/generated/google/rpc/status.pb.dart @@ -1,13 +1,14 @@ +// This is a generated file - do not edit. // -// Generated code. Do not modify. -// source: google/rpc/status.proto -// -// @dart = 2.12 +// Generated from google/rpc/status.proto. + +// @dart = 3.3 // ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names import 'dart:core' as $core; @@ -15,13 +16,15 @@ import 'package:protobuf/protobuf.dart' as $pb; import '../protobuf/any.pb.dart' as $0; -/// The `Status` type defines a logical error model that is suitable for -/// different programming environments, including REST APIs and RPC APIs. It is -/// used by [gRPC](https://github.com/grpc). Each `Status` message contains -/// three pieces of data: error code, error message, and error details. +export 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions; + +/// The `Status` type defines a logical error model that is suitable for +/// different programming environments, including REST APIs and RPC APIs. It is +/// used by [gRPC](https://github.com/grpc). Each `Status` message contains +/// three pieces of data: error code, error message, and error details. /// -/// You can find out more about this error model and how to work with it in the -/// [API Design Guide](https://cloud.google.com/apis/design/errors). +/// You can find out more about this error model and how to work with it in the +/// [API Design Guide](https://cloud.google.com/apis/design/errors). class Status extends $pb.GeneratedMessage { factory Status({ $core.int? code, @@ -29,49 +32,43 @@ class Status extends $pb.GeneratedMessage { $core.Iterable<$0.Any>? details, }) { final result = create(); - if (code != null) { - result.code = code; - } - if (message != null) { - result.message = message; - } - if (details != null) { - result.details.addAll(details); - } + if (code != null) result.code = code; + if (message != null) result.message = message; + if (details != null) result.details.addAll(details); return result; } - Status._() : super(); - factory Status.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory Status.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); + + Status._(); + + factory Status.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory Status.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); static final $pb.BuilderInfo _i = $pb.BuilderInfo( _omitMessageNames ? '' : 'Status', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.rpc'), createEmptyInstance: create) - ..a<$core.int>(1, _omitFieldNames ? '' : 'code', $pb.PbFieldType.O3) + ..aI(1, _omitFieldNames ? '' : 'code') ..aOS(2, _omitFieldNames ? '' : 'message') - ..pc<$0.Any>(3, _omitFieldNames ? '' : 'details', $pb.PbFieldType.PM, + ..pPM<$0.Any>(3, _omitFieldNames ? '' : 'details', subBuilder: $0.Any.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') - Status clone() => Status()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Status clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') Status copyWith(void Function(Status) updates) => super.copyWith((message) => updates(message as Status)) as Status; + @$core.override $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static Status create() => Status._(); + @$core.override Status createEmptyInstance() => create(); static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') @@ -84,14 +81,11 @@ class Status extends $pb.GeneratedMessage { @$pb.TagNumber(1) $core.int get code => $_getIZ(0); @$pb.TagNumber(1) - set code($core.int v) { - $_setSignedInt32(0, v); - } - + set code($core.int value) => $_setSignedInt32(0, value); @$pb.TagNumber(1) $core.bool hasCode() => $_has(0); @$pb.TagNumber(1) - void clearCode() => clearField(1); + void clearCode() => $_clearField(1); /// A developer-facing error message, which should be in English. Any /// user-facing error message should be localized and sent in the @@ -100,21 +94,19 @@ class Status extends $pb.GeneratedMessage { @$pb.TagNumber(2) $core.String get message => $_getSZ(1); @$pb.TagNumber(2) - set message($core.String v) { - $_setString(1, v); - } - + set message($core.String value) => $_setString(1, value); @$pb.TagNumber(2) $core.bool hasMessage() => $_has(1); @$pb.TagNumber(2) - void clearMessage() => clearField(2); + void clearMessage() => $_clearField(2); /// A list of messages that carry the error details. There is a common set of /// message types for APIs to use. @$pb.TagNumber(3) - $core.List<$0.Any> get details => $_getList(2); + $pb.PbList<$0.Any> get details => $_getList(2); } -const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); -const _omitMessageNames = +const $core.bool _omitFieldNames = + $core.bool.fromEnvironment('protobuf.omit_field_names'); +const $core.bool _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/example/googleapis/lib/src/generated/google/rpc/status.pbenum.dart b/example/googleapis/lib/src/generated/google/rpc/status.pbenum.dart index aaf54bbc..646a13c5 100644 --- a/example/googleapis/lib/src/generated/google/rpc/status.pbenum.dart +++ b/example/googleapis/lib/src/generated/google/rpc/status.pbenum.dart @@ -1,10 +1,11 @@ +// This is a generated file - do not edit. // -// Generated code. Do not modify. -// source: google/rpc/status.proto -// -// @dart = 2.12 +// Generated from google/rpc/status.proto. + +// @dart = 3.3 // ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names diff --git a/example/googleapis/lib/src/generated/google/rpc/status.pbjson.dart b/example/googleapis/lib/src/generated/google/rpc/status.pbjson.dart index d7608ca4..98042466 100644 --- a/example/googleapis/lib/src/generated/google/rpc/status.pbjson.dart +++ b/example/googleapis/lib/src/generated/google/rpc/status.pbjson.dart @@ -1,13 +1,14 @@ +// This is a generated file - do not edit. // -// Generated code. Do not modify. -// source: google/rpc/status.proto -// -// @dart = 2.12 +// Generated from google/rpc/status.proto. + +// @dart = 3.3 // ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names, unused_import import 'dart:convert' as $convert; import 'dart:core' as $core; diff --git a/interop/lib/src/generated/empty.pb.dart b/interop/lib/src/generated/empty.pb.dart index afe1522c..38e254c1 100644 --- a/interop/lib/src/generated/empty.pb.dart +++ b/interop/lib/src/generated/empty.pb.dart @@ -1,34 +1,39 @@ +// This is a generated file - do not edit. // -// Generated code. Do not modify. -// source: empty.proto -// -// @dart = 2.12 +// Generated from empty.proto. + +// @dart = 3.3 // ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names import 'dart:core' as $core; import 'package:protobuf/protobuf.dart' as $pb; -/// An empty message that you can re-use to avoid defining duplicated empty -/// messages in your project. A typical example is to use it as argument or the -/// return value of a service API. For instance: +export 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions; + +/// An empty message that you can re-use to avoid defining duplicated empty +/// messages in your project. A typical example is to use it as argument or the +/// return value of a service API. For instance: /// -/// service Foo { -/// rpc Bar (grpc.testing.Empty) returns (grpc.testing.Empty) { }; -/// }; +/// service Foo { +/// rpc Bar (grpc.testing.Empty) returns (grpc.testing.Empty) { }; +/// }; class Empty extends $pb.GeneratedMessage { factory Empty() => create(); - Empty._() : super(); - factory Empty.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory Empty.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); + + Empty._(); + + factory Empty.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory Empty.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); static final $pb.BuilderInfo _i = $pb.BuilderInfo( _omitMessageNames ? '' : 'Empty', @@ -36,20 +41,18 @@ class Empty extends $pb.GeneratedMessage { 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') - Empty clone() => Empty()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Empty clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') Empty copyWith(void Function(Empty) updates) => super.copyWith((message) => updates(message as Empty)) as Empty; + @$core.override $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static Empty create() => Empty._(); + @$core.override Empty createEmptyInstance() => create(); static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') @@ -58,5 +61,5 @@ class Empty extends $pb.GeneratedMessage { static Empty? _defaultInstance; } -const _omitMessageNames = +const $core.bool _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/interop/lib/src/generated/messages.pb.dart b/interop/lib/src/generated/messages.pb.dart index 29833019..bd14193e 100644 --- a/interop/lib/src/generated/messages.pb.dart +++ b/interop/lib/src/generated/messages.pb.dart @@ -1,13 +1,14 @@ +// This is a generated file - do not edit. // -// Generated code. Do not modify. -// source: messages.proto -// -// @dart = 2.12 +// Generated from messages.proto. + +// @dart = 3.3 // ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names import 'dart:core' as $core; @@ -15,6 +16,8 @@ import 'package:protobuf/protobuf.dart' as $pb; import 'messages.pbenum.dart'; +export 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions; + export 'messages.pbenum.dart'; /// TODO(dgq): Go back to using well-known types once @@ -25,18 +28,18 @@ class BoolValue extends $pb.GeneratedMessage { $core.bool? value, }) { final result = create(); - if (value != null) { - result.value = value; - } + if (value != null) result.value = value; return result; } - BoolValue._() : super(); - factory BoolValue.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory BoolValue.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); + + BoolValue._(); + + factory BoolValue.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory BoolValue.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); static final $pb.BuilderInfo _i = $pb.BuilderInfo( _omitMessageNames ? '' : 'BoolValue', @@ -45,20 +48,18 @@ class BoolValue extends $pb.GeneratedMessage { ..aOB(1, _omitFieldNames ? '' : 'value') ..hasRequiredFields = false; - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - BoolValue clone() => BoolValue()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + BoolValue clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') BoolValue copyWith(void Function(BoolValue) updates) => super.copyWith((message) => updates(message as BoolValue)) as BoolValue; + @$core.override $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static BoolValue create() => BoolValue._(); + @$core.override BoolValue createEmptyInstance() => create(); static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') @@ -70,14 +71,11 @@ class BoolValue extends $pb.GeneratedMessage { @$pb.TagNumber(1) $core.bool get value => $_getBF(0); @$pb.TagNumber(1) - set value($core.bool v) { - $_setBool(0, v); - } - + set value($core.bool value) => $_setBool(0, value); @$pb.TagNumber(1) $core.bool hasValue() => $_has(0); @$pb.TagNumber(1) - void clearValue() => clearField(1); + void clearValue() => $_clearField(1); } /// A block of data, to simply increase gRPC message size. @@ -87,48 +85,42 @@ class Payload extends $pb.GeneratedMessage { $core.List<$core.int>? body, }) { final result = create(); - if (type != null) { - result.type = type; - } - if (body != null) { - result.body = body; - } + if (type != null) result.type = type; + if (body != null) result.body = body; return result; } - Payload._() : super(); - factory Payload.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory Payload.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); + + Payload._(); + + factory Payload.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory Payload.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); static final $pb.BuilderInfo _i = $pb.BuilderInfo( _omitMessageNames ? '' : 'Payload', package: const $pb.PackageName(_omitMessageNames ? '' : 'grpc.testing'), createEmptyInstance: create) - ..e(1, _omitFieldNames ? '' : 'type', $pb.PbFieldType.OE, - defaultOrMaker: PayloadType.COMPRESSABLE, - valueOf: PayloadType.valueOf, + ..aE(1, _omitFieldNames ? '' : 'type', enumValues: PayloadType.values) ..a<$core.List<$core.int>>( 2, _omitFieldNames ? '' : 'body', $pb.PbFieldType.OY) ..hasRequiredFields = false; - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - Payload clone() => Payload()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Payload clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') Payload copyWith(void Function(Payload) updates) => super.copyWith((message) => updates(message as Payload)) as Payload; + @$core.override $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static Payload create() => Payload._(); + @$core.override Payload createEmptyInstance() => create(); static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') @@ -141,27 +133,21 @@ class Payload extends $pb.GeneratedMessage { @$pb.TagNumber(1) PayloadType get type => $_getN(0); @$pb.TagNumber(1) - set type(PayloadType v) { - setField(1, v); - } - + set type(PayloadType value) => $_setField(1, value); @$pb.TagNumber(1) $core.bool hasType() => $_has(0); @$pb.TagNumber(1) - void clearType() => clearField(1); + void clearType() => $_clearField(1); /// Primary contents of payload. @$pb.TagNumber(2) $core.List<$core.int> get body => $_getN(1); @$pb.TagNumber(2) - set body($core.List<$core.int> v) { - $_setBytes(1, v); - } - + set body($core.List<$core.int> value) => $_setBytes(1, value); @$pb.TagNumber(2) $core.bool hasBody() => $_has(1); @$pb.TagNumber(2) - void clearBody() => clearField(2); + void clearBody() => $_clearField(2); } /// A protobuf representation for grpc status. This is used by test @@ -172,44 +158,40 @@ class EchoStatus extends $pb.GeneratedMessage { $core.String? message, }) { final result = create(); - if (code != null) { - result.code = code; - } - if (message != null) { - result.message = message; - } + if (code != null) result.code = code; + if (message != null) result.message = message; return result; } - EchoStatus._() : super(); - factory EchoStatus.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory EchoStatus.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); + + EchoStatus._(); + + factory EchoStatus.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory EchoStatus.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); static final $pb.BuilderInfo _i = $pb.BuilderInfo( _omitMessageNames ? '' : 'EchoStatus', package: const $pb.PackageName(_omitMessageNames ? '' : 'grpc.testing'), createEmptyInstance: create) - ..a<$core.int>(1, _omitFieldNames ? '' : 'code', $pb.PbFieldType.O3) + ..aI(1, _omitFieldNames ? '' : 'code') ..aOS(2, _omitFieldNames ? '' : 'message') ..hasRequiredFields = false; - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - EchoStatus clone() => EchoStatus()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + EchoStatus clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') EchoStatus copyWith(void Function(EchoStatus) updates) => super.copyWith((message) => updates(message as EchoStatus)) as EchoStatus; + @$core.override $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static EchoStatus create() => EchoStatus._(); + @$core.override EchoStatus createEmptyInstance() => create(); static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') @@ -220,26 +202,20 @@ class EchoStatus extends $pb.GeneratedMessage { @$pb.TagNumber(1) $core.int get code => $_getIZ(0); @$pb.TagNumber(1) - set code($core.int v) { - $_setSignedInt32(0, v); - } - + set code($core.int value) => $_setSignedInt32(0, value); @$pb.TagNumber(1) $core.bool hasCode() => $_has(0); @$pb.TagNumber(1) - void clearCode() => clearField(1); + void clearCode() => $_clearField(1); @$pb.TagNumber(2) $core.String get message => $_getSZ(1); @$pb.TagNumber(2) - set message($core.String v) { - $_setString(1, v); - } - + set message($core.String value) => $_setString(1, value); @$pb.TagNumber(2) $core.bool hasMessage() => $_has(1); @$pb.TagNumber(2) - void clearMessage() => clearField(2); + void clearMessage() => $_clearField(2); } /// Unary request. @@ -255,50 +231,34 @@ class SimpleRequest extends $pb.GeneratedMessage { BoolValue? expectCompressed, }) { final result = create(); - if (responseType != null) { - result.responseType = responseType; - } - if (responseSize != null) { - result.responseSize = responseSize; - } - if (payload != null) { - result.payload = payload; - } - if (fillUsername != null) { - result.fillUsername = fillUsername; - } - if (fillOauthScope != null) { - result.fillOauthScope = fillOauthScope; - } - if (responseCompressed != null) { + if (responseType != null) result.responseType = responseType; + if (responseSize != null) result.responseSize = responseSize; + if (payload != null) result.payload = payload; + if (fillUsername != null) result.fillUsername = fillUsername; + if (fillOauthScope != null) result.fillOauthScope = fillOauthScope; + if (responseCompressed != null) result.responseCompressed = responseCompressed; - } - if (responseStatus != null) { - result.responseStatus = responseStatus; - } - if (expectCompressed != null) { - result.expectCompressed = expectCompressed; - } + if (responseStatus != null) result.responseStatus = responseStatus; + if (expectCompressed != null) result.expectCompressed = expectCompressed; return result; } - SimpleRequest._() : super(); - factory SimpleRequest.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory SimpleRequest.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); + + SimpleRequest._(); + + factory SimpleRequest.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory SimpleRequest.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); static final $pb.BuilderInfo _i = $pb.BuilderInfo( _omitMessageNames ? '' : 'SimpleRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'grpc.testing'), createEmptyInstance: create) - ..e( - 1, _omitFieldNames ? '' : 'responseType', $pb.PbFieldType.OE, - defaultOrMaker: PayloadType.COMPRESSABLE, - valueOf: PayloadType.valueOf, + ..aE(1, _omitFieldNames ? '' : 'responseType', enumValues: PayloadType.values) - ..a<$core.int>(2, _omitFieldNames ? '' : 'responseSize', $pb.PbFieldType.O3) + ..aI(2, _omitFieldNames ? '' : 'responseSize') ..aOM(3, _omitFieldNames ? '' : 'payload', subBuilder: Payload.create) ..aOB(4, _omitFieldNames ? '' : 'fillUsername') @@ -311,21 +271,19 @@ class SimpleRequest extends $pb.GeneratedMessage { subBuilder: BoolValue.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') - SimpleRequest clone() => SimpleRequest()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + SimpleRequest clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') SimpleRequest copyWith(void Function(SimpleRequest) updates) => super.copyWith((message) => updates(message as SimpleRequest)) as SimpleRequest; + @$core.override $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static SimpleRequest create() => SimpleRequest._(); + @$core.override SimpleRequest createEmptyInstance() => create(); static $pb.PbList createRepeated() => $pb.PbList(); @@ -340,40 +298,31 @@ class SimpleRequest extends $pb.GeneratedMessage { @$pb.TagNumber(1) PayloadType get responseType => $_getN(0); @$pb.TagNumber(1) - set responseType(PayloadType v) { - setField(1, v); - } - + set responseType(PayloadType value) => $_setField(1, value); @$pb.TagNumber(1) $core.bool hasResponseType() => $_has(0); @$pb.TagNumber(1) - void clearResponseType() => clearField(1); + void clearResponseType() => $_clearField(1); /// Desired payload size in the response from the server. @$pb.TagNumber(2) $core.int get responseSize => $_getIZ(1); @$pb.TagNumber(2) - set responseSize($core.int v) { - $_setSignedInt32(1, v); - } - + set responseSize($core.int value) => $_setSignedInt32(1, value); @$pb.TagNumber(2) $core.bool hasResponseSize() => $_has(1); @$pb.TagNumber(2) - void clearResponseSize() => clearField(2); + void clearResponseSize() => $_clearField(2); /// Optional input payload sent along with the request. @$pb.TagNumber(3) Payload get payload => $_getN(2); @$pb.TagNumber(3) - set payload(Payload v) { - setField(3, v); - } - + set payload(Payload value) => $_setField(3, value); @$pb.TagNumber(3) $core.bool hasPayload() => $_has(2); @$pb.TagNumber(3) - void clearPayload() => clearField(3); + void clearPayload() => $_clearField(3); @$pb.TagNumber(3) Payload ensurePayload() => $_ensure(2); @@ -381,27 +330,21 @@ class SimpleRequest extends $pb.GeneratedMessage { @$pb.TagNumber(4) $core.bool get fillUsername => $_getBF(3); @$pb.TagNumber(4) - set fillUsername($core.bool v) { - $_setBool(3, v); - } - + set fillUsername($core.bool value) => $_setBool(3, value); @$pb.TagNumber(4) $core.bool hasFillUsername() => $_has(3); @$pb.TagNumber(4) - void clearFillUsername() => clearField(4); + void clearFillUsername() => $_clearField(4); /// Whether SimpleResponse should include OAuth scope. @$pb.TagNumber(5) $core.bool get fillOauthScope => $_getBF(4); @$pb.TagNumber(5) - set fillOauthScope($core.bool v) { - $_setBool(4, v); - } - + set fillOauthScope($core.bool value) => $_setBool(4, value); @$pb.TagNumber(5) $core.bool hasFillOauthScope() => $_has(4); @$pb.TagNumber(5) - void clearFillOauthScope() => clearField(5); + void clearFillOauthScope() => $_clearField(5); /// Whether to request the server to compress the response. This field is /// "nullable" in order to interoperate seamlessly with clients not able to @@ -410,14 +353,11 @@ class SimpleRequest extends $pb.GeneratedMessage { @$pb.TagNumber(6) BoolValue get responseCompressed => $_getN(5); @$pb.TagNumber(6) - set responseCompressed(BoolValue v) { - setField(6, v); - } - + set responseCompressed(BoolValue value) => $_setField(6, value); @$pb.TagNumber(6) $core.bool hasResponseCompressed() => $_has(5); @$pb.TagNumber(6) - void clearResponseCompressed() => clearField(6); + void clearResponseCompressed() => $_clearField(6); @$pb.TagNumber(6) BoolValue ensureResponseCompressed() => $_ensure(5); @@ -425,14 +365,11 @@ class SimpleRequest extends $pb.GeneratedMessage { @$pb.TagNumber(7) EchoStatus get responseStatus => $_getN(6); @$pb.TagNumber(7) - set responseStatus(EchoStatus v) { - setField(7, v); - } - + set responseStatus(EchoStatus value) => $_setField(7, value); @$pb.TagNumber(7) $core.bool hasResponseStatus() => $_has(6); @$pb.TagNumber(7) - void clearResponseStatus() => clearField(7); + void clearResponseStatus() => $_clearField(7); @$pb.TagNumber(7) EchoStatus ensureResponseStatus() => $_ensure(6); @@ -440,14 +377,11 @@ class SimpleRequest extends $pb.GeneratedMessage { @$pb.TagNumber(8) BoolValue get expectCompressed => $_getN(7); @$pb.TagNumber(8) - set expectCompressed(BoolValue v) { - setField(8, v); - } - + set expectCompressed(BoolValue value) => $_setField(8, value); @$pb.TagNumber(8) $core.bool hasExpectCompressed() => $_has(7); @$pb.TagNumber(8) - void clearExpectCompressed() => clearField(8); + void clearExpectCompressed() => $_clearField(8); @$pb.TagNumber(8) BoolValue ensureExpectCompressed() => $_ensure(7); } @@ -460,24 +394,20 @@ class SimpleResponse extends $pb.GeneratedMessage { $core.String? oauthScope, }) { final result = create(); - if (payload != null) { - result.payload = payload; - } - if (username != null) { - result.username = username; - } - if (oauthScope != null) { - result.oauthScope = oauthScope; - } + if (payload != null) result.payload = payload; + if (username != null) result.username = username; + if (oauthScope != null) result.oauthScope = oauthScope; return result; } - SimpleResponse._() : super(); - factory SimpleResponse.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory SimpleResponse.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); + + SimpleResponse._(); + + factory SimpleResponse.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory SimpleResponse.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); static final $pb.BuilderInfo _i = $pb.BuilderInfo( _omitMessageNames ? '' : 'SimpleResponse', @@ -489,21 +419,19 @@ class SimpleResponse extends $pb.GeneratedMessage { ..aOS(3, _omitFieldNames ? '' : 'oauthScope') ..hasRequiredFields = false; - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - SimpleResponse clone() => SimpleResponse()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + SimpleResponse clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') SimpleResponse copyWith(void Function(SimpleResponse) updates) => super.copyWith((message) => updates(message as SimpleResponse)) as SimpleResponse; + @$core.override $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static SimpleResponse create() => SimpleResponse._(); + @$core.override SimpleResponse createEmptyInstance() => create(); static $pb.PbList createRepeated() => $pb.PbList(); @@ -516,14 +444,11 @@ class SimpleResponse extends $pb.GeneratedMessage { @$pb.TagNumber(1) Payload get payload => $_getN(0); @$pb.TagNumber(1) - set payload(Payload v) { - setField(1, v); - } - + set payload(Payload value) => $_setField(1, value); @$pb.TagNumber(1) $core.bool hasPayload() => $_has(0); @$pb.TagNumber(1) - void clearPayload() => clearField(1); + void clearPayload() => $_clearField(1); @$pb.TagNumber(1) Payload ensurePayload() => $_ensure(0); @@ -532,27 +457,21 @@ class SimpleResponse extends $pb.GeneratedMessage { @$pb.TagNumber(2) $core.String get username => $_getSZ(1); @$pb.TagNumber(2) - set username($core.String v) { - $_setString(1, v); - } - + set username($core.String value) => $_setString(1, value); @$pb.TagNumber(2) $core.bool hasUsername() => $_has(1); @$pb.TagNumber(2) - void clearUsername() => clearField(2); + void clearUsername() => $_clearField(2); /// OAuth scope. @$pb.TagNumber(3) $core.String get oauthScope => $_getSZ(2); @$pb.TagNumber(3) - set oauthScope($core.String v) { - $_setString(2, v); - } - + set oauthScope($core.String value) => $_setString(2, value); @$pb.TagNumber(3) $core.bool hasOauthScope() => $_has(2); @$pb.TagNumber(3) - void clearOauthScope() => clearField(3); + void clearOauthScope() => $_clearField(3); } /// Client-streaming request. @@ -562,21 +481,19 @@ class StreamingInputCallRequest extends $pb.GeneratedMessage { BoolValue? expectCompressed, }) { final result = create(); - if (payload != null) { - result.payload = payload; - } - if (expectCompressed != null) { - result.expectCompressed = expectCompressed; - } + if (payload != null) result.payload = payload; + if (expectCompressed != null) result.expectCompressed = expectCompressed; return result; } - StreamingInputCallRequest._() : super(); - factory StreamingInputCallRequest.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory StreamingInputCallRequest.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); + + StreamingInputCallRequest._(); + + factory StreamingInputCallRequest.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory StreamingInputCallRequest.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); static final $pb.BuilderInfo _i = $pb.BuilderInfo( _omitMessageNames ? '' : 'StreamingInputCallRequest', @@ -588,23 +505,20 @@ class StreamingInputCallRequest extends $pb.GeneratedMessage { subBuilder: BoolValue.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') - StreamingInputCallRequest clone() => - StreamingInputCallRequest()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + StreamingInputCallRequest clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') StreamingInputCallRequest copyWith( void Function(StreamingInputCallRequest) updates) => super.copyWith((message) => updates(message as StreamingInputCallRequest)) as StreamingInputCallRequest; + @$core.override $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static StreamingInputCallRequest create() => StreamingInputCallRequest._(); + @$core.override StreamingInputCallRequest createEmptyInstance() => create(); static $pb.PbList createRepeated() => $pb.PbList(); @@ -617,14 +531,11 @@ class StreamingInputCallRequest extends $pb.GeneratedMessage { @$pb.TagNumber(1) Payload get payload => $_getN(0); @$pb.TagNumber(1) - set payload(Payload v) { - setField(1, v); - } - + set payload(Payload value) => $_setField(1, value); @$pb.TagNumber(1) $core.bool hasPayload() => $_has(0); @$pb.TagNumber(1) - void clearPayload() => clearField(1); + void clearPayload() => $_clearField(1); @$pb.TagNumber(1) Payload ensurePayload() => $_ensure(0); @@ -635,14 +546,11 @@ class StreamingInputCallRequest extends $pb.GeneratedMessage { @$pb.TagNumber(2) BoolValue get expectCompressed => $_getN(1); @$pb.TagNumber(2) - set expectCompressed(BoolValue v) { - setField(2, v); - } - + set expectCompressed(BoolValue value) => $_setField(2, value); @$pb.TagNumber(2) $core.bool hasExpectCompressed() => $_has(1); @$pb.TagNumber(2) - void clearExpectCompressed() => clearField(2); + void clearExpectCompressed() => $_clearField(2); @$pb.TagNumber(2) BoolValue ensureExpectCompressed() => $_ensure(1); } @@ -653,45 +561,42 @@ class StreamingInputCallResponse extends $pb.GeneratedMessage { $core.int? aggregatedPayloadSize, }) { final result = create(); - if (aggregatedPayloadSize != null) { + if (aggregatedPayloadSize != null) result.aggregatedPayloadSize = aggregatedPayloadSize; - } return result; } - StreamingInputCallResponse._() : super(); - factory StreamingInputCallResponse.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory StreamingInputCallResponse.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); + + StreamingInputCallResponse._(); + + factory StreamingInputCallResponse.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory StreamingInputCallResponse.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); static final $pb.BuilderInfo _i = $pb.BuilderInfo( _omitMessageNames ? '' : 'StreamingInputCallResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'grpc.testing'), createEmptyInstance: create) - ..a<$core.int>( - 1, _omitFieldNames ? '' : 'aggregatedPayloadSize', $pb.PbFieldType.O3) + ..aI(1, _omitFieldNames ? '' : 'aggregatedPayloadSize') ..hasRequiredFields = false; - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - StreamingInputCallResponse clone() => - StreamingInputCallResponse()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + StreamingInputCallResponse clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') StreamingInputCallResponse copyWith( void Function(StreamingInputCallResponse) updates) => super.copyWith( (message) => updates(message as StreamingInputCallResponse)) as StreamingInputCallResponse; + @$core.override $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static StreamingInputCallResponse create() => StreamingInputCallResponse._(); + @$core.override StreamingInputCallResponse createEmptyInstance() => create(); static $pb.PbList createRepeated() => $pb.PbList(); @@ -704,14 +609,11 @@ class StreamingInputCallResponse extends $pb.GeneratedMessage { @$pb.TagNumber(1) $core.int get aggregatedPayloadSize => $_getIZ(0); @$pb.TagNumber(1) - set aggregatedPayloadSize($core.int v) { - $_setSignedInt32(0, v); - } - + set aggregatedPayloadSize($core.int value) => $_setSignedInt32(0, value); @$pb.TagNumber(1) $core.bool hasAggregatedPayloadSize() => $_has(0); @$pb.TagNumber(1) - void clearAggregatedPayloadSize() => clearField(1); + void clearAggregatedPayloadSize() => $_clearField(1); } /// Configuration for a particular response. @@ -722,50 +624,44 @@ class ResponseParameters extends $pb.GeneratedMessage { BoolValue? compressed, }) { final result = create(); - if (size != null) { - result.size = size; - } - if (intervalUs != null) { - result.intervalUs = intervalUs; - } - if (compressed != null) { - result.compressed = compressed; - } + if (size != null) result.size = size; + if (intervalUs != null) result.intervalUs = intervalUs; + if (compressed != null) result.compressed = compressed; return result; } - ResponseParameters._() : super(); - factory ResponseParameters.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory ResponseParameters.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); + + ResponseParameters._(); + + factory ResponseParameters.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory ResponseParameters.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); static final $pb.BuilderInfo _i = $pb.BuilderInfo( _omitMessageNames ? '' : 'ResponseParameters', package: const $pb.PackageName(_omitMessageNames ? '' : 'grpc.testing'), createEmptyInstance: create) - ..a<$core.int>(1, _omitFieldNames ? '' : 'size', $pb.PbFieldType.O3) - ..a<$core.int>(2, _omitFieldNames ? '' : 'intervalUs', $pb.PbFieldType.O3) + ..aI(1, _omitFieldNames ? '' : 'size') + ..aI(2, _omitFieldNames ? '' : 'intervalUs') ..aOM(3, _omitFieldNames ? '' : 'compressed', subBuilder: BoolValue.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') - ResponseParameters clone() => ResponseParameters()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ResponseParameters clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') ResponseParameters copyWith(void Function(ResponseParameters) updates) => super.copyWith((message) => updates(message as ResponseParameters)) as ResponseParameters; + @$core.override $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static ResponseParameters create() => ResponseParameters._(); + @$core.override ResponseParameters createEmptyInstance() => create(); static $pb.PbList createRepeated() => $pb.PbList(); @@ -778,28 +674,22 @@ class ResponseParameters extends $pb.GeneratedMessage { @$pb.TagNumber(1) $core.int get size => $_getIZ(0); @$pb.TagNumber(1) - set size($core.int v) { - $_setSignedInt32(0, v); - } - + set size($core.int value) => $_setSignedInt32(0, value); @$pb.TagNumber(1) $core.bool hasSize() => $_has(0); @$pb.TagNumber(1) - void clearSize() => clearField(1); + void clearSize() => $_clearField(1); /// Desired interval between consecutive responses in the response stream in /// microseconds. @$pb.TagNumber(2) $core.int get intervalUs => $_getIZ(1); @$pb.TagNumber(2) - set intervalUs($core.int v) { - $_setSignedInt32(1, v); - } - + set intervalUs($core.int value) => $_setSignedInt32(1, value); @$pb.TagNumber(2) $core.bool hasIntervalUs() => $_has(1); @$pb.TagNumber(2) - void clearIntervalUs() => clearField(2); + void clearIntervalUs() => $_clearField(2); /// Whether to request the server to compress the response. This field is /// "nullable" in order to interoperate seamlessly with clients not able to @@ -808,14 +698,11 @@ class ResponseParameters extends $pb.GeneratedMessage { @$pb.TagNumber(3) BoolValue get compressed => $_getN(2); @$pb.TagNumber(3) - set compressed(BoolValue v) { - setField(3, v); - } - + set compressed(BoolValue value) => $_setField(3, value); @$pb.TagNumber(3) $core.bool hasCompressed() => $_has(2); @$pb.TagNumber(3) - void clearCompressed() => clearField(3); + void clearCompressed() => $_clearField(3); @$pb.TagNumber(3) BoolValue ensureCompressed() => $_ensure(2); } @@ -829,39 +716,30 @@ class StreamingOutputCallRequest extends $pb.GeneratedMessage { EchoStatus? responseStatus, }) { final result = create(); - if (responseType != null) { - result.responseType = responseType; - } - if (responseParameters != null) { + if (responseType != null) result.responseType = responseType; + if (responseParameters != null) result.responseParameters.addAll(responseParameters); - } - if (payload != null) { - result.payload = payload; - } - if (responseStatus != null) { - result.responseStatus = responseStatus; - } + if (payload != null) result.payload = payload; + if (responseStatus != null) result.responseStatus = responseStatus; return result; } - StreamingOutputCallRequest._() : super(); - factory StreamingOutputCallRequest.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory StreamingOutputCallRequest.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); + + StreamingOutputCallRequest._(); + + factory StreamingOutputCallRequest.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory StreamingOutputCallRequest.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); static final $pb.BuilderInfo _i = $pb.BuilderInfo( _omitMessageNames ? '' : 'StreamingOutputCallRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'grpc.testing'), createEmptyInstance: create) - ..e( - 1, _omitFieldNames ? '' : 'responseType', $pb.PbFieldType.OE, - defaultOrMaker: PayloadType.COMPRESSABLE, - valueOf: PayloadType.valueOf, + ..aE(1, _omitFieldNames ? '' : 'responseType', enumValues: PayloadType.values) - ..pc( - 2, _omitFieldNames ? '' : 'responseParameters', $pb.PbFieldType.PM, + ..pPM(2, _omitFieldNames ? '' : 'responseParameters', subBuilder: ResponseParameters.create) ..aOM(3, _omitFieldNames ? '' : 'payload', subBuilder: Payload.create) @@ -869,24 +747,21 @@ class StreamingOutputCallRequest extends $pb.GeneratedMessage { subBuilder: EchoStatus.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') - StreamingOutputCallRequest clone() => - StreamingOutputCallRequest()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + StreamingOutputCallRequest clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') StreamingOutputCallRequest copyWith( void Function(StreamingOutputCallRequest) updates) => super.copyWith( (message) => updates(message as StreamingOutputCallRequest)) as StreamingOutputCallRequest; + @$core.override $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static StreamingOutputCallRequest create() => StreamingOutputCallRequest._(); + @$core.override StreamingOutputCallRequest createEmptyInstance() => create(); static $pb.PbList createRepeated() => $pb.PbList(); @@ -903,31 +778,25 @@ class StreamingOutputCallRequest extends $pb.GeneratedMessage { @$pb.TagNumber(1) PayloadType get responseType => $_getN(0); @$pb.TagNumber(1) - set responseType(PayloadType v) { - setField(1, v); - } - + set responseType(PayloadType value) => $_setField(1, value); @$pb.TagNumber(1) $core.bool hasResponseType() => $_has(0); @$pb.TagNumber(1) - void clearResponseType() => clearField(1); + void clearResponseType() => $_clearField(1); /// Configuration for each expected response message. @$pb.TagNumber(2) - $core.List get responseParameters => $_getList(1); + $pb.PbList get responseParameters => $_getList(1); /// Optional input payload sent along with the request. @$pb.TagNumber(3) Payload get payload => $_getN(2); @$pb.TagNumber(3) - set payload(Payload v) { - setField(3, v); - } - + set payload(Payload value) => $_setField(3, value); @$pb.TagNumber(3) $core.bool hasPayload() => $_has(2); @$pb.TagNumber(3) - void clearPayload() => clearField(3); + void clearPayload() => $_clearField(3); @$pb.TagNumber(3) Payload ensurePayload() => $_ensure(2); @@ -935,14 +804,11 @@ class StreamingOutputCallRequest extends $pb.GeneratedMessage { @$pb.TagNumber(7) EchoStatus get responseStatus => $_getN(3); @$pb.TagNumber(7) - set responseStatus(EchoStatus v) { - setField(7, v); - } - + set responseStatus(EchoStatus value) => $_setField(7, value); @$pb.TagNumber(7) $core.bool hasResponseStatus() => $_has(3); @$pb.TagNumber(7) - void clearResponseStatus() => clearField(7); + void clearResponseStatus() => $_clearField(7); @$pb.TagNumber(7) EchoStatus ensureResponseStatus() => $_ensure(3); } @@ -953,18 +819,18 @@ class StreamingOutputCallResponse extends $pb.GeneratedMessage { Payload? payload, }) { final result = create(); - if (payload != null) { - result.payload = payload; - } + if (payload != null) result.payload = payload; return result; } - StreamingOutputCallResponse._() : super(); - factory StreamingOutputCallResponse.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory StreamingOutputCallResponse.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); + + StreamingOutputCallResponse._(); + + factory StreamingOutputCallResponse.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory StreamingOutputCallResponse.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); static final $pb.BuilderInfo _i = $pb.BuilderInfo( _omitMessageNames ? '' : 'StreamingOutputCallResponse', @@ -974,25 +840,22 @@ class StreamingOutputCallResponse extends $pb.GeneratedMessage { subBuilder: Payload.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') - StreamingOutputCallResponse clone() => - StreamingOutputCallResponse()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + StreamingOutputCallResponse clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') StreamingOutputCallResponse copyWith( void Function(StreamingOutputCallResponse) updates) => super.copyWith( (message) => updates(message as StreamingOutputCallResponse)) as StreamingOutputCallResponse; + @$core.override $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static StreamingOutputCallResponse create() => StreamingOutputCallResponse._(); + @$core.override StreamingOutputCallResponse createEmptyInstance() => create(); static $pb.PbList createRepeated() => $pb.PbList(); @@ -1005,14 +868,11 @@ class StreamingOutputCallResponse extends $pb.GeneratedMessage { @$pb.TagNumber(1) Payload get payload => $_getN(0); @$pb.TagNumber(1) - set payload(Payload v) { - setField(1, v); - } - + set payload(Payload value) => $_setField(1, value); @$pb.TagNumber(1) $core.bool hasPayload() => $_has(0); @$pb.TagNumber(1) - void clearPayload() => clearField(1); + void clearPayload() => $_clearField(1); @$pb.TagNumber(1) Payload ensurePayload() => $_ensure(0); } @@ -1024,42 +884,40 @@ class ReconnectParams extends $pb.GeneratedMessage { $core.int? maxReconnectBackoffMs, }) { final result = create(); - if (maxReconnectBackoffMs != null) { + if (maxReconnectBackoffMs != null) result.maxReconnectBackoffMs = maxReconnectBackoffMs; - } return result; } - ReconnectParams._() : super(); - factory ReconnectParams.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory ReconnectParams.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); + + ReconnectParams._(); + + factory ReconnectParams.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory ReconnectParams.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); static final $pb.BuilderInfo _i = $pb.BuilderInfo( _omitMessageNames ? '' : 'ReconnectParams', package: const $pb.PackageName(_omitMessageNames ? '' : 'grpc.testing'), createEmptyInstance: create) - ..a<$core.int>( - 1, _omitFieldNames ? '' : 'maxReconnectBackoffMs', $pb.PbFieldType.O3) + ..aI(1, _omitFieldNames ? '' : 'maxReconnectBackoffMs') ..hasRequiredFields = false; - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - ReconnectParams clone() => ReconnectParams()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ReconnectParams clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') ReconnectParams copyWith(void Function(ReconnectParams) updates) => super.copyWith((message) => updates(message as ReconnectParams)) as ReconnectParams; + @$core.override $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static ReconnectParams create() => ReconnectParams._(); + @$core.override ReconnectParams createEmptyInstance() => create(); static $pb.PbList createRepeated() => $pb.PbList(); @@ -1071,14 +929,11 @@ class ReconnectParams extends $pb.GeneratedMessage { @$pb.TagNumber(1) $core.int get maxReconnectBackoffMs => $_getIZ(0); @$pb.TagNumber(1) - set maxReconnectBackoffMs($core.int v) { - $_setSignedInt32(0, v); - } - + set maxReconnectBackoffMs($core.int value) => $_setSignedInt32(0, value); @$pb.TagNumber(1) $core.bool hasMaxReconnectBackoffMs() => $_has(0); @$pb.TagNumber(1) - void clearMaxReconnectBackoffMs() => clearField(1); + void clearMaxReconnectBackoffMs() => $_clearField(1); } /// For reconnect interop test only. @@ -1090,21 +945,19 @@ class ReconnectInfo extends $pb.GeneratedMessage { $core.Iterable<$core.int>? backoffMs, }) { final result = create(); - if (passed != null) { - result.passed = passed; - } - if (backoffMs != null) { - result.backoffMs.addAll(backoffMs); - } + if (passed != null) result.passed = passed; + if (backoffMs != null) result.backoffMs.addAll(backoffMs); return result; } - ReconnectInfo._() : super(); - factory ReconnectInfo.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory ReconnectInfo.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); + + ReconnectInfo._(); + + factory ReconnectInfo.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory ReconnectInfo.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); static final $pb.BuilderInfo _i = $pb.BuilderInfo( _omitMessageNames ? '' : 'ReconnectInfo', @@ -1114,21 +967,19 @@ class ReconnectInfo extends $pb.GeneratedMessage { ..p<$core.int>(2, _omitFieldNames ? '' : 'backoffMs', $pb.PbFieldType.K3) ..hasRequiredFields = false; - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - ReconnectInfo clone() => ReconnectInfo()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ReconnectInfo clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') ReconnectInfo copyWith(void Function(ReconnectInfo) updates) => super.copyWith((message) => updates(message as ReconnectInfo)) as ReconnectInfo; + @$core.override $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static ReconnectInfo create() => ReconnectInfo._(); + @$core.override ReconnectInfo createEmptyInstance() => create(); static $pb.PbList createRepeated() => $pb.PbList(); @@ -1140,19 +991,17 @@ class ReconnectInfo extends $pb.GeneratedMessage { @$pb.TagNumber(1) $core.bool get passed => $_getBF(0); @$pb.TagNumber(1) - set passed($core.bool v) { - $_setBool(0, v); - } - + set passed($core.bool value) => $_setBool(0, value); @$pb.TagNumber(1) $core.bool hasPassed() => $_has(0); @$pb.TagNumber(1) - void clearPassed() => clearField(1); + void clearPassed() => $_clearField(1); @$pb.TagNumber(2) - $core.List<$core.int> get backoffMs => $_getList(1); + $pb.PbList<$core.int> get backoffMs => $_getList(1); } -const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); -const _omitMessageNames = +const $core.bool _omitFieldNames = + $core.bool.fromEnvironment('protobuf.omit_field_names'); +const $core.bool _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/interop/lib/src/generated/messages.pbenum.dart b/interop/lib/src/generated/messages.pbenum.dart index 3bcce87f..35eea7fb 100644 --- a/interop/lib/src/generated/messages.pbenum.dart +++ b/interop/lib/src/generated/messages.pbenum.dart @@ -1,13 +1,14 @@ +// This is a generated file - do not edit. // -// Generated code. Do not modify. -// source: messages.proto -// -// @dart = 2.12 +// Generated from messages.proto. + +// @dart = 3.3 // ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names import 'dart:core' as $core; @@ -16,6 +17,7 @@ import 'package:protobuf/protobuf.dart' as $pb; /// DEPRECATED, don't use. To be removed shortly. /// The type of payload that should be returned. class PayloadType extends $pb.ProtobufEnum { + /// Compressable text format. static const PayloadType COMPRESSABLE = PayloadType._(0, _omitEnumNames ? '' : 'COMPRESSABLE'); @@ -23,11 +25,13 @@ class PayloadType extends $pb.ProtobufEnum { COMPRESSABLE, ]; - static final $core.Map<$core.int, PayloadType> _byValue = - $pb.ProtobufEnum.initByValue(values); - static PayloadType? valueOf($core.int value) => _byValue[value]; + static final $core.List _byValue = + $pb.ProtobufEnum.$_initByValueList(values, 0); + static PayloadType? valueOf($core.int value) => + value < 0 || value >= _byValue.length ? null : _byValue[value]; - const PayloadType._($core.int v, $core.String n) : super(v, n); + const PayloadType._(super.value, super.name); } -const _omitEnumNames = $core.bool.fromEnvironment('protobuf.omit_enum_names'); +const $core.bool _omitEnumNames = + $core.bool.fromEnvironment('protobuf.omit_enum_names'); diff --git a/interop/lib/src/generated/test.pb.dart b/interop/lib/src/generated/test.pb.dart index 008b80eb..494da27b 100644 --- a/interop/lib/src/generated/test.pb.dart +++ b/interop/lib/src/generated/test.pb.dart @@ -1,12 +1,15 @@ +// This is a generated file - do not edit. // -// Generated code. Do not modify. -// source: test.proto -// -// @dart = 2.12 +// Generated from test.proto. + +// @dart = 3.3 // ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names import 'dart:core' as $core; + +export 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions; diff --git a/interop/lib/src/generated/test.pbgrpc.dart b/interop/lib/src/generated/test.pbgrpc.dart index 74b2c7d1..42f6c18c 100644 --- a/interop/lib/src/generated/test.pbgrpc.dart +++ b/interop/lib/src/generated/test.pbgrpc.dart @@ -1,13 +1,14 @@ +// This is a generated file - do not edit. // -// Generated code. Do not modify. -// source: test.proto -// -// @dart = 2.12 +// Generated from test.proto. + +// @dart = 3.3 // ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names import 'dart:async' as $async; import 'dart:core' as $core; @@ -20,103 +21,137 @@ import 'messages.pb.dart' as $1; export 'test.pb.dart'; +/// A simple service to test the various types of RPCs and experiment with +/// performance with various types of payload. @$pb.GrpcServiceName('grpc.testing.TestService') class TestServiceClient extends $grpc.Client { - static final _$emptyCall = $grpc.ClientMethod<$0.Empty, $0.Empty>( - '/grpc.testing.TestService/EmptyCall', - ($0.Empty value) => value.writeToBuffer(), - ($core.List<$core.int> value) => $0.Empty.fromBuffer(value)); - static final _$unaryCall = - $grpc.ClientMethod<$1.SimpleRequest, $1.SimpleResponse>( - '/grpc.testing.TestService/UnaryCall', - ($1.SimpleRequest value) => value.writeToBuffer(), - ($core.List<$core.int> value) => $1.SimpleResponse.fromBuffer(value)); - static final _$cacheableUnaryCall = - $grpc.ClientMethod<$1.SimpleRequest, $1.SimpleResponse>( - '/grpc.testing.TestService/CacheableUnaryCall', - ($1.SimpleRequest value) => value.writeToBuffer(), - ($core.List<$core.int> value) => $1.SimpleResponse.fromBuffer(value)); - static final _$streamingOutputCall = $grpc.ClientMethod< - $1.StreamingOutputCallRequest, $1.StreamingOutputCallResponse>( - '/grpc.testing.TestService/StreamingOutputCall', - ($1.StreamingOutputCallRequest value) => value.writeToBuffer(), - ($core.List<$core.int> value) => - $1.StreamingOutputCallResponse.fromBuffer(value)); - static final _$streamingInputCall = $grpc.ClientMethod< - $1.StreamingInputCallRequest, $1.StreamingInputCallResponse>( - '/grpc.testing.TestService/StreamingInputCall', - ($1.StreamingInputCallRequest value) => value.writeToBuffer(), - ($core.List<$core.int> value) => - $1.StreamingInputCallResponse.fromBuffer(value)); - static final _$fullDuplexCall = $grpc.ClientMethod< - $1.StreamingOutputCallRequest, $1.StreamingOutputCallResponse>( - '/grpc.testing.TestService/FullDuplexCall', - ($1.StreamingOutputCallRequest value) => value.writeToBuffer(), - ($core.List<$core.int> value) => - $1.StreamingOutputCallResponse.fromBuffer(value)); - static final _$halfDuplexCall = $grpc.ClientMethod< - $1.StreamingOutputCallRequest, $1.StreamingOutputCallResponse>( - '/grpc.testing.TestService/HalfDuplexCall', - ($1.StreamingOutputCallRequest value) => value.writeToBuffer(), - ($core.List<$core.int> value) => - $1.StreamingOutputCallResponse.fromBuffer(value)); - static final _$unimplementedCall = $grpc.ClientMethod<$0.Empty, $0.Empty>( - '/grpc.testing.TestService/UnimplementedCall', - ($0.Empty value) => value.writeToBuffer(), - ($core.List<$core.int> value) => $0.Empty.fromBuffer(value)); + /// The hostname for this service. + static const $core.String defaultHost = ''; - TestServiceClient($grpc.ClientChannel channel, - {$grpc.CallOptions? options, - $core.Iterable<$grpc.ClientInterceptor>? interceptors}) - : super(channel, options: options, interceptors: interceptors); + /// OAuth scopes needed for the client. + static const $core.List<$core.String> oauthScopes = [ + '', + ]; - $grpc.ResponseFuture<$0.Empty> emptyCall($0.Empty request, - {$grpc.CallOptions? options}) { + TestServiceClient(super.channel, {super.options, super.interceptors}); + + /// One empty request followed by one empty response. + $grpc.ResponseFuture<$0.Empty> emptyCall( + $0.Empty request, { + $grpc.CallOptions? options, + }) { return $createUnaryCall(_$emptyCall, request, options: options); } - $grpc.ResponseFuture<$1.SimpleResponse> unaryCall($1.SimpleRequest request, - {$grpc.CallOptions? options}) { + /// One request followed by one response. + $grpc.ResponseFuture<$1.SimpleResponse> unaryCall( + $1.SimpleRequest request, { + $grpc.CallOptions? options, + }) { return $createUnaryCall(_$unaryCall, request, options: options); } + /// One request followed by one response. Response has cache control + /// headers set such that a caching HTTP proxy (such as GFE) can + /// satisfy subsequent requests. $grpc.ResponseFuture<$1.SimpleResponse> cacheableUnaryCall( - $1.SimpleRequest request, - {$grpc.CallOptions? options}) { + $1.SimpleRequest request, { + $grpc.CallOptions? options, + }) { return $createUnaryCall(_$cacheableUnaryCall, request, options: options); } + /// One request followed by a sequence of responses (streamed download). + /// The server returns the payload with client desired type and sizes. $grpc.ResponseStream<$1.StreamingOutputCallResponse> streamingOutputCall( - $1.StreamingOutputCallRequest request, - {$grpc.CallOptions? options}) { + $1.StreamingOutputCallRequest request, { + $grpc.CallOptions? options, + }) { return $createStreamingCall( _$streamingOutputCall, $async.Stream.fromIterable([request]), options: options); } + /// A sequence of requests followed by one response (streamed upload). + /// The server returns the aggregated size of client payload as the result. $grpc.ResponseFuture<$1.StreamingInputCallResponse> streamingInputCall( - $async.Stream<$1.StreamingInputCallRequest> request, - {$grpc.CallOptions? options}) { + $async.Stream<$1.StreamingInputCallRequest> request, { + $grpc.CallOptions? options, + }) { return $createStreamingCall(_$streamingInputCall, request, options: options) .single; } + /// A sequence of requests with each request served by the server immediately. + /// As one request could lead to multiple responses, this interface + /// demonstrates the idea of full duplexing. $grpc.ResponseStream<$1.StreamingOutputCallResponse> fullDuplexCall( - $async.Stream<$1.StreamingOutputCallRequest> request, - {$grpc.CallOptions? options}) { + $async.Stream<$1.StreamingOutputCallRequest> request, { + $grpc.CallOptions? options, + }) { return $createStreamingCall(_$fullDuplexCall, request, options: options); } + /// A sequence of requests followed by a sequence of responses. + /// The server buffers all the client requests and then serves them in order. A + /// stream of responses are returned to the client when the server starts with + /// first request. $grpc.ResponseStream<$1.StreamingOutputCallResponse> halfDuplexCall( - $async.Stream<$1.StreamingOutputCallRequest> request, - {$grpc.CallOptions? options}) { + $async.Stream<$1.StreamingOutputCallRequest> request, { + $grpc.CallOptions? options, + }) { return $createStreamingCall(_$halfDuplexCall, request, options: options); } - $grpc.ResponseFuture<$0.Empty> unimplementedCall($0.Empty request, - {$grpc.CallOptions? options}) { + /// The test server will not implement this method. It will be used + /// to test the behavior when clients call unimplemented methods. + $grpc.ResponseFuture<$0.Empty> unimplementedCall( + $0.Empty request, { + $grpc.CallOptions? options, + }) { return $createUnaryCall(_$unimplementedCall, request, options: options); } + + // method descriptors + + static final _$emptyCall = $grpc.ClientMethod<$0.Empty, $0.Empty>( + '/grpc.testing.TestService/EmptyCall', + ($0.Empty value) => value.writeToBuffer(), + $0.Empty.fromBuffer); + static final _$unaryCall = + $grpc.ClientMethod<$1.SimpleRequest, $1.SimpleResponse>( + '/grpc.testing.TestService/UnaryCall', + ($1.SimpleRequest value) => value.writeToBuffer(), + $1.SimpleResponse.fromBuffer); + static final _$cacheableUnaryCall = + $grpc.ClientMethod<$1.SimpleRequest, $1.SimpleResponse>( + '/grpc.testing.TestService/CacheableUnaryCall', + ($1.SimpleRequest value) => value.writeToBuffer(), + $1.SimpleResponse.fromBuffer); + static final _$streamingOutputCall = $grpc.ClientMethod< + $1.StreamingOutputCallRequest, $1.StreamingOutputCallResponse>( + '/grpc.testing.TestService/StreamingOutputCall', + ($1.StreamingOutputCallRequest value) => value.writeToBuffer(), + $1.StreamingOutputCallResponse.fromBuffer); + static final _$streamingInputCall = $grpc.ClientMethod< + $1.StreamingInputCallRequest, $1.StreamingInputCallResponse>( + '/grpc.testing.TestService/StreamingInputCall', + ($1.StreamingInputCallRequest value) => value.writeToBuffer(), + $1.StreamingInputCallResponse.fromBuffer); + static final _$fullDuplexCall = $grpc.ClientMethod< + $1.StreamingOutputCallRequest, $1.StreamingOutputCallResponse>( + '/grpc.testing.TestService/FullDuplexCall', + ($1.StreamingOutputCallRequest value) => value.writeToBuffer(), + $1.StreamingOutputCallResponse.fromBuffer); + static final _$halfDuplexCall = $grpc.ClientMethod< + $1.StreamingOutputCallRequest, $1.StreamingOutputCallResponse>( + '/grpc.testing.TestService/HalfDuplexCall', + ($1.StreamingOutputCallRequest value) => value.writeToBuffer(), + $1.StreamingOutputCallResponse.fromBuffer); + static final _$unimplementedCall = $grpc.ClientMethod<$0.Empty, $0.Empty>( + '/grpc.testing.TestService/UnimplementedCall', + ($0.Empty value) => value.writeToBuffer(), + $0.Empty.fromBuffer); } @$pb.GrpcServiceName('grpc.testing.TestService') @@ -191,67 +226,87 @@ abstract class TestServiceBase extends $grpc.Service { } $async.Future<$0.Empty> emptyCall_Pre( - $grpc.ServiceCall call, $async.Future<$0.Empty> request) async { - return emptyCall(call, await request); + $grpc.ServiceCall $call, $async.Future<$0.Empty> $request) async { + return emptyCall($call, await $request); } + $async.Future<$0.Empty> emptyCall($grpc.ServiceCall call, $0.Empty request); + $async.Future<$1.SimpleResponse> unaryCall_Pre( - $grpc.ServiceCall call, $async.Future<$1.SimpleRequest> request) async { - return unaryCall(call, await request); + $grpc.ServiceCall $call, $async.Future<$1.SimpleRequest> $request) async { + return unaryCall($call, await $request); } + $async.Future<$1.SimpleResponse> unaryCall( + $grpc.ServiceCall call, $1.SimpleRequest request); + $async.Future<$1.SimpleResponse> cacheableUnaryCall_Pre( - $grpc.ServiceCall call, $async.Future<$1.SimpleRequest> request) async { - return cacheableUnaryCall(call, await request); + $grpc.ServiceCall $call, $async.Future<$1.SimpleRequest> $request) async { + return cacheableUnaryCall($call, await $request); } - $async.Stream<$1.StreamingOutputCallResponse> streamingOutputCall_Pre( - $grpc.ServiceCall call, - $async.Future<$1.StreamingOutputCallRequest> request) async* { - yield* streamingOutputCall(call, await request); - } + $async.Future<$1.SimpleResponse> cacheableUnaryCall( + $grpc.ServiceCall call, $1.SimpleRequest request); - $async.Future<$0.Empty> unimplementedCall_Pre( - $grpc.ServiceCall call, $async.Future<$0.Empty> request) async { - return unimplementedCall(call, await request); + $async.Stream<$1.StreamingOutputCallResponse> streamingOutputCall_Pre( + $grpc.ServiceCall $call, + $async.Future<$1.StreamingOutputCallRequest> $request) async* { + yield* streamingOutputCall($call, await $request); } - $async.Future<$0.Empty> emptyCall($grpc.ServiceCall call, $0.Empty request); - $async.Future<$1.SimpleResponse> unaryCall( - $grpc.ServiceCall call, $1.SimpleRequest request); - $async.Future<$1.SimpleResponse> cacheableUnaryCall( - $grpc.ServiceCall call, $1.SimpleRequest request); $async.Stream<$1.StreamingOutputCallResponse> streamingOutputCall( $grpc.ServiceCall call, $1.StreamingOutputCallRequest request); + $async.Future<$1.StreamingInputCallResponse> streamingInputCall( $grpc.ServiceCall call, $async.Stream<$1.StreamingInputCallRequest> request); + $async.Stream<$1.StreamingOutputCallResponse> fullDuplexCall( $grpc.ServiceCall call, $async.Stream<$1.StreamingOutputCallRequest> request); + $async.Stream<$1.StreamingOutputCallResponse> halfDuplexCall( $grpc.ServiceCall call, $async.Stream<$1.StreamingOutputCallRequest> request); + + $async.Future<$0.Empty> unimplementedCall_Pre( + $grpc.ServiceCall $call, $async.Future<$0.Empty> $request) async { + return unimplementedCall($call, await $request); + } + $async.Future<$0.Empty> unimplementedCall( $grpc.ServiceCall call, $0.Empty request); } +/// A simple service NOT implemented at servers so clients can test for +/// that case. @$pb.GrpcServiceName('grpc.testing.UnimplementedService') class UnimplementedServiceClient extends $grpc.Client { + /// The hostname for this service. + static const $core.String defaultHost = ''; + + /// OAuth scopes needed for the client. + static const $core.List<$core.String> oauthScopes = [ + '', + ]; + + UnimplementedServiceClient(super.channel, + {super.options, super.interceptors}); + + /// A call that no server should implement + $grpc.ResponseFuture<$0.Empty> unimplementedCall( + $0.Empty request, { + $grpc.CallOptions? options, + }) { + return $createUnaryCall(_$unimplementedCall, request, options: options); + } + + // method descriptors + static final _$unimplementedCall = $grpc.ClientMethod<$0.Empty, $0.Empty>( '/grpc.testing.UnimplementedService/UnimplementedCall', ($0.Empty value) => value.writeToBuffer(), - ($core.List<$core.int> value) => $0.Empty.fromBuffer(value)); - - UnimplementedServiceClient($grpc.ClientChannel channel, - {$grpc.CallOptions? options, - $core.Iterable<$grpc.ClientInterceptor>? interceptors}) - : super(channel, options: options, interceptors: interceptors); - - $grpc.ResponseFuture<$0.Empty> unimplementedCall($0.Empty request, - {$grpc.CallOptions? options}) { - return $createUnaryCall(_$unimplementedCall, request, options: options); - } + $0.Empty.fromBuffer); } @$pb.GrpcServiceName('grpc.testing.UnimplementedService') @@ -269,39 +324,51 @@ abstract class UnimplementedServiceBase extends $grpc.Service { } $async.Future<$0.Empty> unimplementedCall_Pre( - $grpc.ServiceCall call, $async.Future<$0.Empty> request) async { - return unimplementedCall(call, await request); + $grpc.ServiceCall $call, $async.Future<$0.Empty> $request) async { + return unimplementedCall($call, await $request); } $async.Future<$0.Empty> unimplementedCall( $grpc.ServiceCall call, $0.Empty request); } +/// A service used to control reconnect server. @$pb.GrpcServiceName('grpc.testing.ReconnectService') class ReconnectServiceClient extends $grpc.Client { - static final _$start = $grpc.ClientMethod<$1.ReconnectParams, $0.Empty>( - '/grpc.testing.ReconnectService/Start', - ($1.ReconnectParams value) => value.writeToBuffer(), - ($core.List<$core.int> value) => $0.Empty.fromBuffer(value)); - static final _$stop = $grpc.ClientMethod<$0.Empty, $1.ReconnectInfo>( - '/grpc.testing.ReconnectService/Stop', - ($0.Empty value) => value.writeToBuffer(), - ($core.List<$core.int> value) => $1.ReconnectInfo.fromBuffer(value)); + /// The hostname for this service. + static const $core.String defaultHost = ''; - ReconnectServiceClient($grpc.ClientChannel channel, - {$grpc.CallOptions? options, - $core.Iterable<$grpc.ClientInterceptor>? interceptors}) - : super(channel, options: options, interceptors: interceptors); + /// OAuth scopes needed for the client. + static const $core.List<$core.String> oauthScopes = [ + '', + ]; - $grpc.ResponseFuture<$0.Empty> start($1.ReconnectParams request, - {$grpc.CallOptions? options}) { + ReconnectServiceClient(super.channel, {super.options, super.interceptors}); + + $grpc.ResponseFuture<$0.Empty> start( + $1.ReconnectParams request, { + $grpc.CallOptions? options, + }) { return $createUnaryCall(_$start, request, options: options); } - $grpc.ResponseFuture<$1.ReconnectInfo> stop($0.Empty request, - {$grpc.CallOptions? options}) { + $grpc.ResponseFuture<$1.ReconnectInfo> stop( + $0.Empty request, { + $grpc.CallOptions? options, + }) { return $createUnaryCall(_$stop, request, options: options); } + + // method descriptors + + static final _$start = $grpc.ClientMethod<$1.ReconnectParams, $0.Empty>( + '/grpc.testing.ReconnectService/Start', + ($1.ReconnectParams value) => value.writeToBuffer(), + $0.Empty.fromBuffer); + static final _$stop = $grpc.ClientMethod<$0.Empty, $1.ReconnectInfo>( + '/grpc.testing.ReconnectService/Stop', + ($0.Empty value) => value.writeToBuffer(), + $1.ReconnectInfo.fromBuffer); } @$pb.GrpcServiceName('grpc.testing.ReconnectService') @@ -325,18 +392,19 @@ abstract class ReconnectServiceBase extends $grpc.Service { ($1.ReconnectInfo value) => value.writeToBuffer())); } - $async.Future<$0.Empty> start_Pre( - $grpc.ServiceCall call, $async.Future<$1.ReconnectParams> request) async { - return start(call, await request); + $async.Future<$0.Empty> start_Pre($grpc.ServiceCall $call, + $async.Future<$1.ReconnectParams> $request) async { + return start($call, await $request); } + $async.Future<$0.Empty> start( + $grpc.ServiceCall call, $1.ReconnectParams request); + $async.Future<$1.ReconnectInfo> stop_Pre( - $grpc.ServiceCall call, $async.Future<$0.Empty> request) async { - return stop(call, await request); + $grpc.ServiceCall $call, $async.Future<$0.Empty> $request) async { + return stop($call, await $request); } - $async.Future<$0.Empty> start( - $grpc.ServiceCall call, $1.ReconnectParams request); $async.Future<$1.ReconnectInfo> stop( $grpc.ServiceCall call, $0.Empty request); } diff --git a/lib/src/generated/google/protobuf/any.pb.dart b/lib/src/generated/google/protobuf/any.pb.dart index a2d0d305..8f2cb011 100644 --- a/lib/src/generated/google/protobuf/any.pb.dart +++ b/lib/src/generated/google/protobuf/any.pb.dart @@ -1,149 +1,148 @@ +// This is a generated file - do not edit. // -// Generated code. Do not modify. -// source: google/protobuf/any.proto -// -// @dart = 2.12 +// Generated from google/protobuf/any.proto. + +// @dart = 3.3 // ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package +// ignore_for_file: implementation_imports, library_prefixes +// ignore_for_file: non_constant_identifier_names import 'dart:core' as $core; import 'package:protobuf/protobuf.dart' as $pb; import 'package:protobuf/src/protobuf/mixins/well_known.dart' as $mixin; -/// `Any` contains an arbitrary serialized protocol buffer message along with a -/// URL that describes the type of the serialized message. +export 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions; + +/// `Any` contains an arbitrary serialized protocol buffer message along with a +/// URL that describes the type of the serialized message. /// -/// Protobuf library provides support to pack/unpack Any values in the form -/// of utility functions or additional generated methods of the Any type. +/// Protobuf library provides support to pack/unpack Any values in the form +/// of utility functions or additional generated methods of the Any type. /// -/// Example 1: Pack and unpack a message in C++. +/// Example 1: Pack and unpack a message in C++. /// -/// Foo foo = ...; -/// Any any; -/// any.PackFrom(foo); -/// ... -/// if (any.UnpackTo(&foo)) { -/// ... -/// } +/// Foo foo = ...; +/// Any any; +/// any.PackFrom(foo); +/// ... +/// if (any.UnpackTo(&foo)) { +/// ... +/// } /// -/// Example 2: Pack and unpack a message in Java. +/// Example 2: Pack and unpack a message in Java. /// -/// Foo foo = ...; -/// Any any = Any.pack(foo); -/// ... -/// if (any.is(Foo.class)) { -/// foo = any.unpack(Foo.class); -/// } +/// Foo foo = ...; +/// Any any = Any.pack(foo); +/// ... +/// if (any.is(Foo.class)) { +/// foo = any.unpack(Foo.class); +/// } /// -/// Example 3: Pack and unpack a message in Python. +/// Example 3: Pack and unpack a message in Python. /// -/// foo = Foo(...) -/// any = Any() -/// any.Pack(foo) -/// ... -/// if any.Is(Foo.DESCRIPTOR): -/// any.Unpack(foo) -/// ... +/// foo = Foo(...) +/// any = Any() +/// any.Pack(foo) +/// ... +/// if any.Is(Foo.DESCRIPTOR): +/// any.Unpack(foo) +/// ... /// -/// Example 4: Pack and unpack a message in Go +/// Example 4: Pack and unpack a message in Go /// -/// foo := &pb.Foo{...} -/// any, err := anypb.New(foo) -/// if err != nil { -/// ... -/// } -/// ... -/// foo := &pb.Foo{} -/// if err := any.UnmarshalTo(foo); err != nil { -/// ... -/// } -/// -/// The pack methods provided by protobuf library will by default use -/// 'type.googleapis.com/full.type.name' as the type URL and the unpack -/// methods only use the fully qualified type name after the last '/' -/// in the type URL, for example "foo.bar.com/x/y.z" will yield type -/// name "y.z". -/// -/// -/// JSON -/// ==== -/// The JSON representation of an `Any` value uses the regular -/// representation of the deserialized, embedded message, with an -/// additional field `@type` which contains the type URL. Example: -/// -/// package google.profile; -/// message Person { -/// string first_name = 1; -/// string last_name = 2; +/// foo := &pb.Foo{...} +/// any, err := anypb.New(foo) +/// if err != nil { +/// ... /// } -/// -/// { -/// "@type": "type.googleapis.com/google.profile.Person", -/// "firstName": , -/// "lastName": +/// ... +/// foo := &pb.Foo{} +/// if err := any.UnmarshalTo(foo); err != nil { +/// ... /// } /// -/// If the embedded message type is well-known and has a custom JSON -/// representation, that representation will be embedded adding a field -/// `value` which holds the custom JSON in addition to the `@type` -/// field. Example (for message [google.protobuf.Duration][]): -/// -/// { -/// "@type": "type.googleapis.com/google.protobuf.Duration", -/// "value": "1.212s" -/// } +/// The pack methods provided by protobuf library will by default use +/// 'type.googleapis.com/full.type.name' as the type URL and the unpack +/// methods only use the fully qualified type name after the last '/' +/// in the type URL, for example "foo.bar.com/x/y.z" will yield type +/// name "y.z". +/// +/// +/// JSON +/// ==== +/// The JSON representation of an `Any` value uses the regular +/// representation of the deserialized, embedded message, with an +/// additional field `@type` which contains the type URL. Example: +/// +/// package google.profile; +/// message Person { +/// string first_name = 1; +/// string last_name = 2; +/// } +/// +/// { +/// "@type": "type.googleapis.com/google.profile.Person", +/// "firstName": , +/// "lastName": +/// } +/// +/// If the embedded message type is well-known and has a custom JSON +/// representation, that representation will be embedded adding a field +/// `value` which holds the custom JSON in addition to the `@type` +/// field. Example (for message [google.protobuf.Duration][]): +/// +/// { +/// "@type": "type.googleapis.com/google.protobuf.Duration", +/// "value": "1.212s" +/// } class Any extends $pb.GeneratedMessage with $mixin.AnyMixin { factory Any({ $core.String? typeUrl, $core.List<$core.int>? value, }) { final result = create(); - if (typeUrl != null) { - result.typeUrl = typeUrl; - } - if (value != null) { - result.value = value; - } + if (typeUrl != null) result.typeUrl = typeUrl; + if (value != null) result.value = value; return result; } - Any._() : super(); - 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); + + Any._(); + + factory Any.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory Any.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); 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) + wellKnownType: $mixin.WellKnownType.any) ..aOS(1, _omitFieldNames ? '' : 'typeUrl') ..a<$core.List<$core.int>>( 2, _omitFieldNames ? '' : 'value', $pb.PbFieldType.OY) ..hasRequiredFields = false; - @$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') + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Any clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') Any copyWith(void Function(Any) updates) => super.copyWith((message) => updates(message as Any)) as Any; + @$core.override $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static Any create() => Any._(); + @$core.override Any createEmptyInstance() => create(); static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') @@ -151,57 +150,51 @@ class Any extends $pb.GeneratedMessage with $mixin.AnyMixin { _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static Any? _defaultInstance; - /// A URL/resource name that uniquely identifies the type of the serialized - /// protocol buffer message. This string must contain at least - /// one "/" character. The last segment of the URL's path must represent - /// the fully qualified name of the type (as in - /// `path/google.protobuf.Duration`). The name should be in a canonical form - /// (e.g., leading "." is not accepted). + /// A URL/resource name that uniquely identifies the type of the serialized + /// protocol buffer message. This string must contain at least + /// one "/" character. The last segment of the URL's path must represent + /// the fully qualified name of the type (as in + /// `path/google.protobuf.Duration`). The name should be in a canonical form + /// (e.g., leading "." is not accepted). /// - /// In practice, teams usually precompile into the binary all types that they - /// expect it to use in the context of Any. However, for URLs which use the - /// scheme `http`, `https`, or no scheme, one can optionally set up a type - /// server that maps type URLs to message definitions as follows: + /// In practice, teams usually precompile into the binary all types that they + /// expect it to use in the context of Any. However, for URLs which use the + /// scheme `http`, `https`, or no scheme, one can optionally set up a type + /// server that maps type URLs to message definitions as follows: /// - /// * If no scheme is provided, `https` is assumed. - /// * An HTTP GET on the URL must yield a [google.protobuf.Type][] - /// value in binary format, or produce an error. - /// * Applications are allowed to cache lookup results based on the - /// URL, or have them precompiled into a binary to avoid any - /// lookup. Therefore, binary compatibility needs to be preserved - /// on changes to types. (Use versioned type names to manage - /// breaking changes.) + /// * If no scheme is provided, `https` is assumed. + /// * An HTTP GET on the URL must yield a [google.protobuf.Type][] + /// value in binary format, or produce an error. + /// * Applications are allowed to cache lookup results based on the + /// URL, or have them precompiled into a binary to avoid any + /// lookup. Therefore, binary compatibility needs to be preserved + /// on changes to types. (Use versioned type names to manage + /// breaking changes.) /// - /// Note: this functionality is not currently available in the official - /// protobuf release, and it is not used for type URLs beginning with - /// type.googleapis.com. + /// Note: this functionality is not currently available in the official + /// protobuf release, and it is not used for type URLs beginning with + /// type.googleapis.com. /// - /// Schemes other than `http`, `https` (or the empty scheme) might be - /// used with implementation specific semantics. + /// Schemes other than `http`, `https` (or the empty scheme) might be + /// used with implementation specific semantics. @$pb.TagNumber(1) $core.String get typeUrl => $_getSZ(0); @$pb.TagNumber(1) - set typeUrl($core.String v) { - $_setString(0, v); - } - + set typeUrl($core.String value) => $_setString(0, value); @$pb.TagNumber(1) $core.bool hasTypeUrl() => $_has(0); @$pb.TagNumber(1) - void clearTypeUrl() => clearField(1); + void clearTypeUrl() => $_clearField(1); /// Must be a valid serialized protocol buffer of the above specified type. @$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> value) => $_setBytes(1, value); @$pb.TagNumber(2) $core.bool hasValue() => $_has(1); @$pb.TagNumber(2) - void clearValue() => clearField(2); + void clearValue() => $_clearField(2); /// Creates a new [Any] encoding [message]. /// @@ -215,6 +208,7 @@ class Any extends $pb.GeneratedMessage with $mixin.AnyMixin { } } -const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); -const _omitMessageNames = +const $core.bool _omitFieldNames = + $core.bool.fromEnvironment('protobuf.omit_field_names'); +const $core.bool _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/lib/src/generated/google/protobuf/any.pbenum.dart b/lib/src/generated/google/protobuf/any.pbenum.dart index 3744f124..a829fd5b 100644 --- a/lib/src/generated/google/protobuf/any.pbenum.dart +++ b/lib/src/generated/google/protobuf/any.pbenum.dart @@ -1,10 +1,11 @@ +// This is a generated file - do not edit. // -// Generated code. Do not modify. -// source: google/protobuf/any.proto -// -// @dart = 2.12 +// Generated from google/protobuf/any.proto. + +// @dart = 3.3 // ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names diff --git a/lib/src/generated/google/protobuf/any.pbjson.dart b/lib/src/generated/google/protobuf/any.pbjson.dart index eafbc6bd..1a9543b2 100644 --- a/lib/src/generated/google/protobuf/any.pbjson.dart +++ b/lib/src/generated/google/protobuf/any.pbjson.dart @@ -1,13 +1,14 @@ +// This is a generated file - do not edit. // -// Generated code. Do not modify. -// source: google/protobuf/any.proto -// -// @dart = 2.12 +// Generated from google/protobuf/any.proto. + +// @dart = 3.3 // ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names, unused_import import 'dart:convert' as $convert; import 'dart:core' as $core; diff --git a/lib/src/generated/google/protobuf/duration.pb.dart b/lib/src/generated/google/protobuf/duration.pb.dart index 2c225ac5..fafadb50 100644 --- a/lib/src/generated/google/protobuf/duration.pb.dart +++ b/lib/src/generated/google/protobuf/duration.pb.dart @@ -1,13 +1,15 @@ +// This is a generated file - do not edit. // -// Generated code. Do not modify. -// source: google/protobuf/duration.proto -// -// @dart = 2.12 +// Generated from google/protobuf/duration.proto. + +// @dart = 3.3 // ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package +// ignore_for_file: implementation_imports, library_prefixes +// ignore_for_file: non_constant_identifier_names import 'dart:core' as $core; @@ -15,111 +17,108 @@ import 'package:fixnum/fixnum.dart' as $fixnum; import 'package:protobuf/protobuf.dart' as $pb; import 'package:protobuf/src/protobuf/mixins/well_known.dart' as $mixin; -/// A Duration represents a signed, fixed-length span of time represented -/// as a count of seconds and fractions of seconds at nanosecond -/// resolution. It is independent of any calendar and concepts like "day" -/// or "month". It is related to Timestamp in that the difference between -/// two Timestamp values is a Duration and it can be added or subtracted -/// from a Timestamp. Range is approximately +-10,000 years. +export 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions; + +/// A Duration represents a signed, fixed-length span of time represented +/// as a count of seconds and fractions of seconds at nanosecond +/// resolution. It is independent of any calendar and concepts like "day" +/// or "month". It is related to Timestamp in that the difference between +/// two Timestamp values is a Duration and it can be added or subtracted +/// from a Timestamp. Range is approximately +-10,000 years. /// -/// # Examples +/// # Examples /// -/// Example 1: Compute Duration from two Timestamps in pseudo code. +/// Example 1: Compute Duration from two Timestamps in pseudo code. /// -/// Timestamp start = ...; -/// Timestamp end = ...; -/// Duration duration = ...; +/// Timestamp start = ...; +/// Timestamp end = ...; +/// Duration duration = ...; /// -/// duration.seconds = end.seconds - start.seconds; -/// duration.nanos = end.nanos - start.nanos; +/// duration.seconds = end.seconds - start.seconds; +/// duration.nanos = end.nanos - start.nanos; /// -/// if (duration.seconds < 0 && duration.nanos > 0) { -/// duration.seconds += 1; -/// duration.nanos -= 1000000000; -/// } else if (duration.seconds > 0 && duration.nanos < 0) { -/// duration.seconds -= 1; -/// duration.nanos += 1000000000; -/// } +/// if (duration.seconds < 0 && duration.nanos > 0) { +/// duration.seconds += 1; +/// duration.nanos -= 1000000000; +/// } else if (duration.seconds > 0 && duration.nanos < 0) { +/// duration.seconds -= 1; +/// duration.nanos += 1000000000; +/// } /// -/// Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. +/// Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. /// -/// Timestamp start = ...; -/// Duration duration = ...; -/// Timestamp end = ...; +/// Timestamp start = ...; +/// Duration duration = ...; +/// Timestamp end = ...; /// -/// end.seconds = start.seconds + duration.seconds; -/// end.nanos = start.nanos + duration.nanos; +/// end.seconds = start.seconds + duration.seconds; +/// end.nanos = start.nanos + duration.nanos; /// -/// if (end.nanos < 0) { -/// end.seconds -= 1; -/// end.nanos += 1000000000; -/// } else if (end.nanos >= 1000000000) { -/// end.seconds += 1; -/// end.nanos -= 1000000000; -/// } +/// if (end.nanos < 0) { +/// end.seconds -= 1; +/// end.nanos += 1000000000; +/// } else if (end.nanos >= 1000000000) { +/// end.seconds += 1; +/// end.nanos -= 1000000000; +/// } /// -/// Example 3: Compute Duration from datetime.timedelta in Python. +/// Example 3: Compute Duration from datetime.timedelta in Python. /// -/// td = datetime.timedelta(days=3, minutes=10) -/// duration = Duration() -/// duration.FromTimedelta(td) +/// td = datetime.timedelta(days=3, minutes=10) +/// duration = Duration() +/// duration.FromTimedelta(td) /// -/// # JSON Mapping +/// # JSON Mapping /// -/// In JSON format, the Duration type is encoded as a string rather than an -/// object, where the string ends in the suffix "s" (indicating seconds) and -/// is preceded by the number of seconds, with nanoseconds expressed as -/// fractional seconds. For example, 3 seconds with 0 nanoseconds should be -/// encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should -/// be expressed in JSON format as "3.000000001s", and 3 seconds and 1 -/// microsecond should be expressed in JSON format as "3.000001s". +/// In JSON format, the Duration type is encoded as a string rather than an +/// object, where the string ends in the suffix "s" (indicating seconds) and +/// is preceded by the number of seconds, with nanoseconds expressed as +/// fractional seconds. For example, 3 seconds with 0 nanoseconds should be +/// encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should +/// be expressed in JSON format as "3.000000001s", and 3 seconds and 1 +/// microsecond should be expressed in JSON format as "3.000001s". class Duration extends $pb.GeneratedMessage with $mixin.DurationMixin { factory Duration({ $fixnum.Int64? seconds, $core.int? nanos, }) { final result = create(); - if (seconds != null) { - result.seconds = seconds; - } - if (nanos != null) { - result.nanos = nanos; - } + if (seconds != null) result.seconds = seconds; + if (nanos != null) result.nanos = nanos; return result; } - Duration._() : super(); - factory Duration.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory Duration.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); + + Duration._(); + + factory Duration.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory Duration.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); static final $pb.BuilderInfo _i = $pb.BuilderInfo( _omitMessageNames ? '' : 'Duration', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), createEmptyInstance: create, - toProto3Json: $mixin.DurationMixin.toProto3JsonHelper, - fromProto3Json: $mixin.DurationMixin.fromProto3JsonHelper) + wellKnownType: $mixin.WellKnownType.duration) ..aInt64(1, _omitFieldNames ? '' : 'seconds') - ..a<$core.int>(2, _omitFieldNames ? '' : 'nanos', $pb.PbFieldType.O3) + ..aI(2, _omitFieldNames ? '' : 'nanos') ..hasRequiredFields = false; - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - Duration clone() => Duration()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Duration clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') Duration copyWith(void Function(Duration) updates) => super.copyWith((message) => updates(message as Duration)) as Duration; + @$core.override $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static Duration create() => Duration._(); + @$core.override Duration createEmptyInstance() => create(); static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') @@ -133,14 +132,11 @@ class Duration extends $pb.GeneratedMessage with $mixin.DurationMixin { @$pb.TagNumber(1) $fixnum.Int64 get seconds => $_getI64(0); @$pb.TagNumber(1) - set seconds($fixnum.Int64 v) { - $_setInt64(0, v); - } - + set seconds($fixnum.Int64 value) => $_setInt64(0, value); @$pb.TagNumber(1) $core.bool hasSeconds() => $_has(0); @$pb.TagNumber(1) - void clearSeconds() => clearField(1); + void clearSeconds() => $_clearField(1); /// Signed fractions of a second at nanosecond resolution of the span /// of time. Durations less than one second are represented with a 0 @@ -151,16 +147,29 @@ class Duration extends $pb.GeneratedMessage with $mixin.DurationMixin { @$pb.TagNumber(2) $core.int get nanos => $_getIZ(1); @$pb.TagNumber(2) - set nanos($core.int v) { - $_setSignedInt32(1, v); - } - + set nanos($core.int value) => $_setSignedInt32(1, value); @$pb.TagNumber(2) $core.bool hasNanos() => $_has(1); @$pb.TagNumber(2) - void clearNanos() => clearField(2); + void clearNanos() => $_clearField(2); + + /// Converts the [Duration] to [$core.Duration]. + /// + /// This is a lossy conversion, as [$core.Duration] is limited to [int] + /// microseconds and also does not support nanosecond precision. + $core.Duration toDart() => $core.Duration( + seconds: seconds.toInt(), + microseconds: nanos ~/ 1000, + ); + + /// Creates a new instance from [$core.Duration]. + static Duration fromDart($core.Duration duration) => Duration() + ..seconds = $fixnum.Int64(duration.inSeconds) + ..nanos = + (duration.inMicroseconds % $core.Duration.microsecondsPerSecond) * 1000; } -const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); -const _omitMessageNames = +const $core.bool _omitFieldNames = + $core.bool.fromEnvironment('protobuf.omit_field_names'); +const $core.bool _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/lib/src/generated/google/protobuf/duration.pbenum.dart b/lib/src/generated/google/protobuf/duration.pbenum.dart index 1a2c58d8..bc980256 100644 --- a/lib/src/generated/google/protobuf/duration.pbenum.dart +++ b/lib/src/generated/google/protobuf/duration.pbenum.dart @@ -1,10 +1,11 @@ +// This is a generated file - do not edit. // -// Generated code. Do not modify. -// source: google/protobuf/duration.proto -// -// @dart = 2.12 +// Generated from google/protobuf/duration.proto. + +// @dart = 3.3 // ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names diff --git a/lib/src/generated/google/protobuf/duration.pbjson.dart b/lib/src/generated/google/protobuf/duration.pbjson.dart index 5847acb2..9d986eaf 100644 --- a/lib/src/generated/google/protobuf/duration.pbjson.dart +++ b/lib/src/generated/google/protobuf/duration.pbjson.dart @@ -1,13 +1,14 @@ +// This is a generated file - do not edit. // -// Generated code. Do not modify. -// source: google/protobuf/duration.proto -// -// @dart = 2.12 +// Generated from google/protobuf/duration.proto. + +// @dart = 3.3 // ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names, unused_import import 'dart:convert' as $convert; import 'dart:core' as $core; diff --git a/lib/src/generated/google/rpc/error_details.pb.dart b/lib/src/generated/google/rpc/error_details.pb.dart index c8d99b24..7f0a5732 100644 --- a/lib/src/generated/google/rpc/error_details.pb.dart +++ b/lib/src/generated/google/rpc/error_details.pb.dart @@ -1,73 +1,74 @@ +// This is a generated file - do not edit. // -// Generated code. Do not modify. -// source: google/rpc/error_details.proto -// -// @dart = 2.12 +// Generated from google/rpc/error_details.proto. + +// @dart = 3.3 // ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names import 'dart:core' as $core; import 'package:protobuf/protobuf.dart' as $pb; -import '../protobuf/duration.pb.dart' as $1; +import '../protobuf/duration.pb.dart' as $0; + +export 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions; -/// Describes when the clients can retry a failed request. Clients could ignore -/// the recommendation here or retry when this information is missing from error -/// responses. +/// Describes when the clients can retry a failed request. Clients could ignore +/// the recommendation here or retry when this information is missing from error +/// responses. /// -/// It's always recommended that clients should use exponential backoff when -/// retrying. +/// It's always recommended that clients should use exponential backoff when +/// retrying. /// -/// Clients should wait until `retry_delay` amount of time has passed since -/// receiving the error response before retrying. If retrying requests also -/// fail, clients should use an exponential backoff scheme to gradually increase -/// the delay between retries based on `retry_delay`, until either a maximum -/// number of retries have been reached or a maximum retry delay cap has been -/// reached. +/// Clients should wait until `retry_delay` amount of time has passed since +/// receiving the error response before retrying. If retrying requests also +/// fail, clients should use an exponential backoff scheme to gradually increase +/// the delay between retries based on `retry_delay`, until either a maximum +/// number of retries have been reached or a maximum retry delay cap has been +/// reached. class RetryInfo extends $pb.GeneratedMessage { factory RetryInfo({ - $1.Duration? retryDelay, + $0.Duration? retryDelay, }) { final result = create(); - if (retryDelay != null) { - result.retryDelay = retryDelay; - } + if (retryDelay != null) result.retryDelay = retryDelay; return result; } - RetryInfo._() : super(); - factory RetryInfo.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory RetryInfo.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); + + RetryInfo._(); + + factory RetryInfo.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory RetryInfo.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); static final $pb.BuilderInfo _i = $pb.BuilderInfo( _omitMessageNames ? '' : 'RetryInfo', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.rpc'), createEmptyInstance: create) - ..aOM<$1.Duration>(1, _omitFieldNames ? '' : 'retryDelay', - subBuilder: $1.Duration.create) + ..aOM<$0.Duration>(1, _omitFieldNames ? '' : 'retryDelay', + subBuilder: $0.Duration.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') - RetryInfo clone() => RetryInfo()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + RetryInfo clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') RetryInfo copyWith(void Function(RetryInfo) updates) => super.copyWith((message) => updates(message as RetryInfo)) as RetryInfo; + @$core.override $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static RetryInfo create() => RetryInfo._(); + @$core.override RetryInfo createEmptyInstance() => create(); static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') @@ -77,18 +78,15 @@ class RetryInfo extends $pb.GeneratedMessage { /// Clients should wait at least this long between retrying the same request. @$pb.TagNumber(1) - $1.Duration get retryDelay => $_getN(0); + $0.Duration get retryDelay => $_getN(0); @$pb.TagNumber(1) - set retryDelay($1.Duration v) { - setField(1, v); - } - + set retryDelay($0.Duration value) => $_setField(1, value); @$pb.TagNumber(1) $core.bool hasRetryDelay() => $_has(0); @$pb.TagNumber(1) - void clearRetryDelay() => clearField(1); + void clearRetryDelay() => $_clearField(1); @$pb.TagNumber(1) - $1.Duration ensureRetryDelay() => $_ensure(0); + $0.Duration ensureRetryDelay() => $_ensure(0); } /// Describes additional debugging info. @@ -98,21 +96,19 @@ class DebugInfo extends $pb.GeneratedMessage { $core.String? detail, }) { final result = create(); - if (stackEntries != null) { - result.stackEntries.addAll(stackEntries); - } - if (detail != null) { - result.detail = detail; - } + if (stackEntries != null) result.stackEntries.addAll(stackEntries); + if (detail != null) result.detail = detail; return result; } - DebugInfo._() : super(); - factory DebugInfo.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory DebugInfo.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); + + DebugInfo._(); + + factory DebugInfo.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory DebugInfo.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); static final $pb.BuilderInfo _i = $pb.BuilderInfo( _omitMessageNames ? '' : 'DebugInfo', @@ -122,20 +118,18 @@ class DebugInfo extends $pb.GeneratedMessage { ..aOS(2, _omitFieldNames ? '' : 'detail') ..hasRequiredFields = false; - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - DebugInfo clone() => DebugInfo()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + DebugInfo clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') DebugInfo copyWith(void Function(DebugInfo) updates) => super.copyWith((message) => updates(message as DebugInfo)) as DebugInfo; + @$core.override $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static DebugInfo create() => DebugInfo._(); + @$core.override DebugInfo createEmptyInstance() => create(); static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') @@ -145,20 +139,17 @@ class DebugInfo extends $pb.GeneratedMessage { /// The stack trace entries indicating where the error occurred. @$pb.TagNumber(1) - $core.List<$core.String> get stackEntries => $_getList(0); + $pb.PbList<$core.String> get stackEntries => $_getList(0); /// Additional debugging information provided by the server. @$pb.TagNumber(2) $core.String get detail => $_getSZ(1); @$pb.TagNumber(2) - set detail($core.String v) { - $_setString(1, v); - } - + set detail($core.String value) => $_setString(1, value); @$pb.TagNumber(2) $core.bool hasDetail() => $_has(1); @$pb.TagNumber(2) - void clearDetail() => clearField(2); + void clearDetail() => $_clearField(2); } /// A message type used to describe a single quota violation. For example, a @@ -169,21 +160,19 @@ class QuotaFailure_Violation extends $pb.GeneratedMessage { $core.String? description, }) { final result = create(); - if (subject != null) { - result.subject = subject; - } - if (description != null) { - result.description = description; - } + if (subject != null) result.subject = subject; + if (description != null) result.description = description; return result; } - QuotaFailure_Violation._() : super(); - factory QuotaFailure_Violation.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory QuotaFailure_Violation.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); + + QuotaFailure_Violation._(); + + factory QuotaFailure_Violation.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory QuotaFailure_Violation.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); static final $pb.BuilderInfo _i = $pb.BuilderInfo( _omitMessageNames ? '' : 'QuotaFailure.Violation', @@ -193,23 +182,20 @@ class QuotaFailure_Violation extends $pb.GeneratedMessage { ..aOS(2, _omitFieldNames ? '' : 'description') ..hasRequiredFields = false; - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - QuotaFailure_Violation clone() => - QuotaFailure_Violation()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + QuotaFailure_Violation clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') QuotaFailure_Violation copyWith( void Function(QuotaFailure_Violation) updates) => super.copyWith((message) => updates(message as QuotaFailure_Violation)) as QuotaFailure_Violation; + @$core.override $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static QuotaFailure_Violation create() => QuotaFailure_Violation._(); + @$core.override QuotaFailure_Violation createEmptyInstance() => create(); static $pb.PbList createRepeated() => $pb.PbList(); @@ -224,88 +210,79 @@ class QuotaFailure_Violation extends $pb.GeneratedMessage { @$pb.TagNumber(1) $core.String get subject => $_getSZ(0); @$pb.TagNumber(1) - set subject($core.String v) { - $_setString(0, v); - } - + set subject($core.String value) => $_setString(0, value); @$pb.TagNumber(1) $core.bool hasSubject() => $_has(0); @$pb.TagNumber(1) - void clearSubject() => clearField(1); + void clearSubject() => $_clearField(1); - /// A description of how the quota check failed. Clients can use this - /// description to find more about the quota configuration in the service's - /// public documentation, or find the relevant quota limit to adjust through - /// developer console. + /// A description of how the quota check failed. Clients can use this + /// description to find more about the quota configuration in the service's + /// public documentation, or find the relevant quota limit to adjust through + /// developer console. /// - /// For example: "Service disabled" or "Daily Limit for read operations - /// exceeded". + /// For example: "Service disabled" or "Daily Limit for read operations + /// exceeded". @$pb.TagNumber(2) $core.String get description => $_getSZ(1); @$pb.TagNumber(2) - set description($core.String v) { - $_setString(1, v); - } - + set description($core.String value) => $_setString(1, value); @$pb.TagNumber(2) $core.bool hasDescription() => $_has(1); @$pb.TagNumber(2) - void clearDescription() => clearField(2); + void clearDescription() => $_clearField(2); } -/// Describes how a quota check failed. +/// Describes how a quota check failed. /// -/// For example if a daily limit was exceeded for the calling project, -/// a service could respond with a QuotaFailure detail containing the project -/// id and the description of the quota limit that was exceeded. If the -/// calling project hasn't enabled the service in the developer console, then -/// a service could respond with the project id and set `service_disabled` -/// to true. +/// For example if a daily limit was exceeded for the calling project, +/// a service could respond with a QuotaFailure detail containing the project +/// id and the description of the quota limit that was exceeded. If the +/// calling project hasn't enabled the service in the developer console, then +/// a service could respond with the project id and set `service_disabled` +/// to true. /// -/// Also see RetryInfo and Help types for other details about handling a -/// quota failure. +/// Also see RetryInfo and Help types for other details about handling a +/// quota failure. class QuotaFailure extends $pb.GeneratedMessage { factory QuotaFailure({ $core.Iterable? violations, }) { final result = create(); - if (violations != null) { - result.violations.addAll(violations); - } + if (violations != null) result.violations.addAll(violations); return result; } - QuotaFailure._() : super(); - factory QuotaFailure.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory QuotaFailure.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); + + QuotaFailure._(); + + factory QuotaFailure.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory QuotaFailure.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); static final $pb.BuilderInfo _i = $pb.BuilderInfo( _omitMessageNames ? '' : 'QuotaFailure', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.rpc'), createEmptyInstance: create) - ..pc( - 1, _omitFieldNames ? '' : 'violations', $pb.PbFieldType.PM, + ..pPM(1, _omitFieldNames ? '' : 'violations', subBuilder: QuotaFailure_Violation.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') - QuotaFailure clone() => QuotaFailure()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + QuotaFailure clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') QuotaFailure copyWith(void Function(QuotaFailure) updates) => super.copyWith((message) => updates(message as QuotaFailure)) as QuotaFailure; + @$core.override $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static QuotaFailure create() => QuotaFailure._(); + @$core.override QuotaFailure createEmptyInstance() => create(); static $pb.PbList createRepeated() => $pb.PbList(); @@ -316,58 +293,54 @@ class QuotaFailure extends $pb.GeneratedMessage { /// Describes all quota violations. @$pb.TagNumber(1) - $core.List get violations => $_getList(0); + $pb.PbList get violations => $_getList(0); } -/// Describes the cause of the error with structured details. +/// Describes the cause of the error with structured details. /// -/// Example of an error when contacting the "pubsub.googleapis.com" API when it -/// is not enabled: +/// Example of an error when contacting the "pubsub.googleapis.com" API when it +/// is not enabled: /// -/// { "reason": "API_DISABLED" -/// "domain": "googleapis.com" -/// "metadata": { -/// "resource": "projects/123", -/// "service": "pubsub.googleapis.com" -/// } -/// } +/// { "reason": "API_DISABLED" +/// "domain": "googleapis.com" +/// "metadata": { +/// "resource": "projects/123", +/// "service": "pubsub.googleapis.com" +/// } +/// } /// -/// This response indicates that the pubsub.googleapis.com API is not enabled. +/// This response indicates that the pubsub.googleapis.com API is not enabled. /// -/// Example of an error that is returned when attempting to create a Spanner -/// instance in a region that is out of stock: +/// Example of an error that is returned when attempting to create a Spanner +/// instance in a region that is out of stock: /// -/// { "reason": "STOCKOUT" -/// "domain": "spanner.googleapis.com", -/// "metadata": { -/// "availableRegions": "us-central1,us-east2" -/// } -/// } +/// { "reason": "STOCKOUT" +/// "domain": "spanner.googleapis.com", +/// "metadata": { +/// "availableRegions": "us-central1,us-east2" +/// } +/// } class ErrorInfo extends $pb.GeneratedMessage { factory ErrorInfo({ $core.String? reason, $core.String? domain, - $core.Map<$core.String, $core.String>? metadata, + $core.Iterable<$core.MapEntry<$core.String, $core.String>>? metadata, }) { final result = create(); - if (reason != null) { - result.reason = reason; - } - if (domain != null) { - result.domain = domain; - } - if (metadata != null) { - result.metadata.addAll(metadata); - } + if (reason != null) result.reason = reason; + if (domain != null) result.domain = domain; + if (metadata != null) result.metadata.addEntries(metadata); return result; } - ErrorInfo._() : super(); - factory ErrorInfo.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory ErrorInfo.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); + + ErrorInfo._(); + + factory ErrorInfo.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory ErrorInfo.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); static final $pb.BuilderInfo _i = $pb.BuilderInfo( _omitMessageNames ? '' : 'ErrorInfo', @@ -382,20 +355,18 @@ class ErrorInfo extends $pb.GeneratedMessage { packageName: const $pb.PackageName('google.rpc')) ..hasRequiredFields = false; - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - ErrorInfo clone() => ErrorInfo()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ErrorInfo clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') ErrorInfo copyWith(void Function(ErrorInfo) updates) => super.copyWith((message) => updates(message as ErrorInfo)) as ErrorInfo; + @$core.override $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static ErrorInfo create() => ErrorInfo._(); + @$core.override ErrorInfo createEmptyInstance() => create(); static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') @@ -410,14 +381,11 @@ class ErrorInfo extends $pb.GeneratedMessage { @$pb.TagNumber(1) $core.String get reason => $_getSZ(0); @$pb.TagNumber(1) - set reason($core.String v) { - $_setString(0, v); - } - + set reason($core.String value) => $_setString(0, value); @$pb.TagNumber(1) $core.bool hasReason() => $_has(0); @$pb.TagNumber(1) - void clearReason() => clearField(1); + void clearReason() => $_clearField(1); /// The logical grouping to which the "reason" belongs. The error domain /// is typically the registered service name of the tool or product that @@ -428,25 +396,22 @@ class ErrorInfo extends $pb.GeneratedMessage { @$pb.TagNumber(2) $core.String get domain => $_getSZ(1); @$pb.TagNumber(2) - set domain($core.String v) { - $_setString(1, v); - } - + set domain($core.String value) => $_setString(1, value); @$pb.TagNumber(2) $core.bool hasDomain() => $_has(1); @$pb.TagNumber(2) - void clearDomain() => clearField(2); + void clearDomain() => $_clearField(2); - /// Additional structured details about this error. + /// Additional structured details about this error. /// - /// Keys should match /[a-zA-Z0-9-_]/ and be limited to 64 characters in - /// length. When identifying the current value of an exceeded limit, the units - /// should be contained in the key, not the value. For example, rather than - /// {"instanceLimit": "100/request"}, should be returned as, - /// {"instanceLimitPerRequest": "100"}, if the client exceeds the number of - /// instances that can be created in a single (batch) request. + /// Keys should match /[a-zA-Z0-9-_]/ and be limited to 64 characters in + /// length. When identifying the current value of an exceeded limit, the units + /// should be contained in the key, not the value. For example, rather than + /// {"instanceLimit": "100/request"}, should be returned as, + /// {"instanceLimitPerRequest": "100"}, if the client exceeds the number of + /// instances that can be created in a single (batch) request. @$pb.TagNumber(3) - $core.Map<$core.String, $core.String> get metadata => $_getMap(2); + $pb.PbMap<$core.String, $core.String> get metadata => $_getMap(2); } /// A message type used to describe a single precondition failure. @@ -457,24 +422,20 @@ class PreconditionFailure_Violation extends $pb.GeneratedMessage { $core.String? description, }) { final result = create(); - if (type != null) { - result.type = type; - } - if (subject != null) { - result.subject = subject; - } - if (description != null) { - result.description = description; - } + if (type != null) result.type = type; + if (subject != null) result.subject = subject; + if (description != null) result.description = description; return result; } - PreconditionFailure_Violation._() : super(); - factory PreconditionFailure_Violation.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory PreconditionFailure_Violation.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); + + PreconditionFailure_Violation._(); + + factory PreconditionFailure_Violation.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory PreconditionFailure_Violation.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); static final $pb.BuilderInfo _i = $pb.BuilderInfo( _omitMessageNames ? '' : 'PreconditionFailure.Violation', @@ -485,25 +446,22 @@ class PreconditionFailure_Violation extends $pb.GeneratedMessage { ..aOS(3, _omitFieldNames ? '' : 'description') ..hasRequiredFields = false; - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - PreconditionFailure_Violation clone() => - PreconditionFailure_Violation()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + PreconditionFailure_Violation clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') PreconditionFailure_Violation copyWith( void Function(PreconditionFailure_Violation) updates) => super.copyWith( (message) => updates(message as PreconditionFailure_Violation)) as PreconditionFailure_Violation; + @$core.override $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static PreconditionFailure_Violation create() => PreconditionFailure_Violation._(); + @$core.override PreconditionFailure_Violation createEmptyInstance() => create(); static $pb.PbList createRepeated() => $pb.PbList(); @@ -518,14 +476,11 @@ class PreconditionFailure_Violation extends $pb.GeneratedMessage { @$pb.TagNumber(1) $core.String get type => $_getSZ(0); @$pb.TagNumber(1) - set type($core.String v) { - $_setString(0, v); - } - + set type($core.String value) => $_setString(0, value); @$pb.TagNumber(1) $core.bool hasType() => $_has(0); @$pb.TagNumber(1) - void clearType() => clearField(1); + void clearType() => $_clearField(1); /// The subject, relative to the type, that failed. /// For example, "google.com/cloud" relative to the "TOS" type would indicate @@ -533,79 +488,70 @@ class PreconditionFailure_Violation extends $pb.GeneratedMessage { @$pb.TagNumber(2) $core.String get subject => $_getSZ(1); @$pb.TagNumber(2) - set subject($core.String v) { - $_setString(1, v); - } - + set subject($core.String value) => $_setString(1, value); @$pb.TagNumber(2) $core.bool hasSubject() => $_has(1); @$pb.TagNumber(2) - void clearSubject() => clearField(2); + void clearSubject() => $_clearField(2); - /// A description of how the precondition failed. Developers can use this - /// description to understand how to fix the failure. + /// A description of how the precondition failed. Developers can use this + /// description to understand how to fix the failure. /// - /// For example: "Terms of service not accepted". + /// For example: "Terms of service not accepted". @$pb.TagNumber(3) $core.String get description => $_getSZ(2); @$pb.TagNumber(3) - set description($core.String v) { - $_setString(2, v); - } - + set description($core.String value) => $_setString(2, value); @$pb.TagNumber(3) $core.bool hasDescription() => $_has(2); @$pb.TagNumber(3) - void clearDescription() => clearField(3); + void clearDescription() => $_clearField(3); } -/// Describes what preconditions have failed. +/// Describes what preconditions have failed. /// -/// For example, if an RPC failed because it required the Terms of Service to be -/// acknowledged, it could list the terms of service violation in the -/// PreconditionFailure message. +/// For example, if an RPC failed because it required the Terms of Service to be +/// acknowledged, it could list the terms of service violation in the +/// PreconditionFailure message. class PreconditionFailure extends $pb.GeneratedMessage { factory PreconditionFailure({ $core.Iterable? violations, }) { final result = create(); - if (violations != null) { - result.violations.addAll(violations); - } + if (violations != null) result.violations.addAll(violations); return result; } - PreconditionFailure._() : super(); - factory PreconditionFailure.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory PreconditionFailure.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); + + PreconditionFailure._(); + + factory PreconditionFailure.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory PreconditionFailure.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); static final $pb.BuilderInfo _i = $pb.BuilderInfo( _omitMessageNames ? '' : 'PreconditionFailure', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.rpc'), createEmptyInstance: create) - ..pc( - 1, _omitFieldNames ? '' : 'violations', $pb.PbFieldType.PM, + ..pPM(1, _omitFieldNames ? '' : 'violations', subBuilder: PreconditionFailure_Violation.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') - PreconditionFailure clone() => PreconditionFailure()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + PreconditionFailure clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') PreconditionFailure copyWith(void Function(PreconditionFailure) updates) => super.copyWith((message) => updates(message as PreconditionFailure)) as PreconditionFailure; + @$core.override $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static PreconditionFailure create() => PreconditionFailure._(); + @$core.override PreconditionFailure createEmptyInstance() => create(); static $pb.PbList createRepeated() => $pb.PbList(); @@ -616,7 +562,7 @@ class PreconditionFailure extends $pb.GeneratedMessage { /// Describes all precondition violations. @$pb.TagNumber(1) - $core.List get violations => $_getList(0); + $pb.PbList get violations => $_getList(0); } /// A message type used to describe a single bad request field. @@ -626,21 +572,19 @@ class BadRequest_FieldViolation extends $pb.GeneratedMessage { $core.String? description, }) { final result = create(); - if (field_1 != null) { - result.field_1 = field_1; - } - if (description != null) { - result.description = description; - } + if (field_1 != null) result.field_1 = field_1; + if (description != null) result.description = description; return result; } - BadRequest_FieldViolation._() : super(); - factory BadRequest_FieldViolation.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory BadRequest_FieldViolation.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); + + BadRequest_FieldViolation._(); + + factory BadRequest_FieldViolation.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory BadRequest_FieldViolation.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); static final $pb.BuilderInfo _i = $pb.BuilderInfo( _omitMessageNames ? '' : 'BadRequest.FieldViolation', @@ -650,23 +594,20 @@ class BadRequest_FieldViolation extends $pb.GeneratedMessage { ..aOS(2, _omitFieldNames ? '' : 'description') ..hasRequiredFields = false; - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - BadRequest_FieldViolation clone() => - BadRequest_FieldViolation()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + BadRequest_FieldViolation clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') BadRequest_FieldViolation copyWith( void Function(BadRequest_FieldViolation) updates) => super.copyWith((message) => updates(message as BadRequest_FieldViolation)) as BadRequest_FieldViolation; + @$core.override $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static BadRequest_FieldViolation create() => BadRequest_FieldViolation._(); + @$core.override BadRequest_FieldViolation createEmptyInstance() => create(); static $pb.PbList createRepeated() => $pb.PbList(); @@ -681,27 +622,21 @@ class BadRequest_FieldViolation extends $pb.GeneratedMessage { @$pb.TagNumber(1) $core.String get field_1 => $_getSZ(0); @$pb.TagNumber(1) - set field_1($core.String v) { - $_setString(0, v); - } - + set field_1($core.String value) => $_setString(0, value); @$pb.TagNumber(1) $core.bool hasField_1() => $_has(0); @$pb.TagNumber(1) - void clearField_1() => clearField(1); + void clearField_1() => $_clearField(1); /// A description of why the request element is bad. @$pb.TagNumber(2) $core.String get description => $_getSZ(1); @$pb.TagNumber(2) - set description($core.String v) { - $_setString(1, v); - } - + set description($core.String value) => $_setString(1, value); @$pb.TagNumber(2) $core.bool hasDescription() => $_has(1); @$pb.TagNumber(2) - void clearDescription() => clearField(2); + void clearDescription() => $_clearField(2); } /// Describes violations in a client request. This error type focuses on the @@ -711,42 +646,40 @@ class BadRequest extends $pb.GeneratedMessage { $core.Iterable? fieldViolations, }) { final result = create(); - if (fieldViolations != null) { - result.fieldViolations.addAll(fieldViolations); - } + if (fieldViolations != null) result.fieldViolations.addAll(fieldViolations); return result; } - BadRequest._() : super(); - factory BadRequest.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory BadRequest.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); + + BadRequest._(); + + factory BadRequest.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory BadRequest.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); static final $pb.BuilderInfo _i = $pb.BuilderInfo( _omitMessageNames ? '' : 'BadRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.rpc'), createEmptyInstance: create) - ..pc( - 1, _omitFieldNames ? '' : 'fieldViolations', $pb.PbFieldType.PM, + ..pPM( + 1, _omitFieldNames ? '' : 'fieldViolations', subBuilder: BadRequest_FieldViolation.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') - BadRequest clone() => BadRequest()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + BadRequest clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') BadRequest copyWith(void Function(BadRequest) updates) => super.copyWith((message) => updates(message as BadRequest)) as BadRequest; + @$core.override $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static BadRequest create() => BadRequest._(); + @$core.override BadRequest createEmptyInstance() => create(); static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') @@ -756,7 +689,7 @@ class BadRequest extends $pb.GeneratedMessage { /// Describes all violations in a client request. @$pb.TagNumber(1) - $core.List get fieldViolations => $_getList(0); + $pb.PbList get fieldViolations => $_getList(0); } /// Contains metadata about the request that clients can attach when filing a bug @@ -767,21 +700,19 @@ class RequestInfo extends $pb.GeneratedMessage { $core.String? servingData, }) { final result = create(); - if (requestId != null) { - result.requestId = requestId; - } - if (servingData != null) { - result.servingData = servingData; - } + if (requestId != null) result.requestId = requestId; + if (servingData != null) result.servingData = servingData; return result; } - RequestInfo._() : super(); - factory RequestInfo.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory RequestInfo.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); + + RequestInfo._(); + + factory RequestInfo.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory RequestInfo.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); static final $pb.BuilderInfo _i = $pb.BuilderInfo( _omitMessageNames ? '' : 'RequestInfo', @@ -791,21 +722,19 @@ class RequestInfo extends $pb.GeneratedMessage { ..aOS(2, _omitFieldNames ? '' : 'servingData') ..hasRequiredFields = false; - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - RequestInfo clone() => RequestInfo()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + RequestInfo clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') RequestInfo copyWith(void Function(RequestInfo) updates) => super.copyWith((message) => updates(message as RequestInfo)) as RequestInfo; + @$core.override $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static RequestInfo create() => RequestInfo._(); + @$core.override RequestInfo createEmptyInstance() => create(); static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') @@ -818,28 +747,22 @@ class RequestInfo extends $pb.GeneratedMessage { @$pb.TagNumber(1) $core.String get requestId => $_getSZ(0); @$pb.TagNumber(1) - set requestId($core.String v) { - $_setString(0, v); - } - + set requestId($core.String value) => $_setString(0, value); @$pb.TagNumber(1) $core.bool hasRequestId() => $_has(0); @$pb.TagNumber(1) - void clearRequestId() => clearField(1); + void clearRequestId() => $_clearField(1); /// Any data that was used to serve this request. For example, an encrypted /// stack trace that can be sent back to the service provider for debugging. @$pb.TagNumber(2) $core.String get servingData => $_getSZ(1); @$pb.TagNumber(2) - set servingData($core.String v) { - $_setString(1, v); - } - + set servingData($core.String value) => $_setString(1, value); @$pb.TagNumber(2) $core.bool hasServingData() => $_has(1); @$pb.TagNumber(2) - void clearServingData() => clearField(2); + void clearServingData() => $_clearField(2); } /// Describes the resource that is being accessed. @@ -851,27 +774,21 @@ class ResourceInfo extends $pb.GeneratedMessage { $core.String? description, }) { final result = create(); - if (resourceType != null) { - result.resourceType = resourceType; - } - if (resourceName != null) { - result.resourceName = resourceName; - } - if (owner != null) { - result.owner = owner; - } - if (description != null) { - result.description = description; - } + if (resourceType != null) result.resourceType = resourceType; + if (resourceName != null) result.resourceName = resourceName; + if (owner != null) result.owner = owner; + if (description != null) result.description = description; return result; } - ResourceInfo._() : super(); - factory ResourceInfo.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory ResourceInfo.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); + + ResourceInfo._(); + + factory ResourceInfo.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory ResourceInfo.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); static final $pb.BuilderInfo _i = $pb.BuilderInfo( _omitMessageNames ? '' : 'ResourceInfo', @@ -883,21 +800,19 @@ class ResourceInfo extends $pb.GeneratedMessage { ..aOS(4, _omitFieldNames ? '' : 'description') ..hasRequiredFields = false; - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - ResourceInfo clone() => ResourceInfo()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ResourceInfo clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') ResourceInfo copyWith(void Function(ResourceInfo) updates) => super.copyWith((message) => updates(message as ResourceInfo)) as ResourceInfo; + @$core.override $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static ResourceInfo create() => ResourceInfo._(); + @$core.override ResourceInfo createEmptyInstance() => create(); static $pb.PbList createRepeated() => $pb.PbList(); @@ -912,14 +827,11 @@ class ResourceInfo extends $pb.GeneratedMessage { @$pb.TagNumber(1) $core.String get resourceType => $_getSZ(0); @$pb.TagNumber(1) - set resourceType($core.String v) { - $_setString(0, v); - } - + set resourceType($core.String value) => $_setString(0, value); @$pb.TagNumber(1) $core.bool hasResourceType() => $_has(0); @$pb.TagNumber(1) - void clearResourceType() => clearField(1); + void clearResourceType() => $_clearField(1); /// The name of the resource being accessed. For example, a shared calendar /// name: "example.com_4fghdhgsrgh@group.calendar.google.com", if the current @@ -927,14 +839,11 @@ class ResourceInfo extends $pb.GeneratedMessage { @$pb.TagNumber(2) $core.String get resourceName => $_getSZ(1); @$pb.TagNumber(2) - set resourceName($core.String v) { - $_setString(1, v); - } - + set resourceName($core.String value) => $_setString(1, value); @$pb.TagNumber(2) $core.bool hasResourceName() => $_has(1); @$pb.TagNumber(2) - void clearResourceName() => clearField(2); + void clearResourceName() => $_clearField(2); /// The owner of the resource (optional). /// For example, "user:" or "project: $_getSZ(2); @$pb.TagNumber(3) - set owner($core.String v) { - $_setString(2, v); - } - + set owner($core.String value) => $_setString(2, value); @$pb.TagNumber(3) $core.bool hasOwner() => $_has(2); @$pb.TagNumber(3) - void clearOwner() => clearField(3); + void clearOwner() => $_clearField(3); /// Describes what error is encountered when accessing this resource. /// For example, updating a cloud project may require the `writer` permission @@ -957,14 +863,11 @@ class ResourceInfo extends $pb.GeneratedMessage { @$pb.TagNumber(4) $core.String get description => $_getSZ(3); @$pb.TagNumber(4) - set description($core.String v) { - $_setString(3, v); - } - + set description($core.String value) => $_setString(3, value); @$pb.TagNumber(4) $core.bool hasDescription() => $_has(3); @$pb.TagNumber(4) - void clearDescription() => clearField(4); + void clearDescription() => $_clearField(4); } /// Describes a URL link. @@ -974,21 +877,19 @@ class Help_Link extends $pb.GeneratedMessage { $core.String? url, }) { final result = create(); - if (description != null) { - result.description = description; - } - if (url != null) { - result.url = url; - } + if (description != null) result.description = description; + if (url != null) result.url = url; return result; } - Help_Link._() : super(); - factory Help_Link.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory Help_Link.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); + + Help_Link._(); + + factory Help_Link.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory Help_Link.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); static final $pb.BuilderInfo _i = $pb.BuilderInfo( _omitMessageNames ? '' : 'Help.Link', @@ -998,20 +899,18 @@ class Help_Link extends $pb.GeneratedMessage { ..aOS(2, _omitFieldNames ? '' : 'url') ..hasRequiredFields = false; - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - Help_Link clone() => Help_Link()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Help_Link clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') Help_Link copyWith(void Function(Help_Link) updates) => super.copyWith((message) => updates(message as Help_Link)) as Help_Link; + @$core.override $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static Help_Link create() => Help_Link._(); + @$core.override Help_Link createEmptyInstance() => create(); static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') @@ -1023,74 +922,66 @@ class Help_Link extends $pb.GeneratedMessage { @$pb.TagNumber(1) $core.String get description => $_getSZ(0); @$pb.TagNumber(1) - set description($core.String v) { - $_setString(0, v); - } - + set description($core.String value) => $_setString(0, value); @$pb.TagNumber(1) $core.bool hasDescription() => $_has(0); @$pb.TagNumber(1) - void clearDescription() => clearField(1); + void clearDescription() => $_clearField(1); /// The URL of the link. @$pb.TagNumber(2) $core.String get url => $_getSZ(1); @$pb.TagNumber(2) - set url($core.String v) { - $_setString(1, v); - } - + set url($core.String value) => $_setString(1, value); @$pb.TagNumber(2) $core.bool hasUrl() => $_has(1); @$pb.TagNumber(2) - void clearUrl() => clearField(2); + void clearUrl() => $_clearField(2); } -/// Provides links to documentation or for performing an out of band action. +/// Provides links to documentation or for performing an out of band action. /// -/// For example, if a quota check failed with an error indicating the calling -/// project hasn't enabled the accessed service, this can contain a URL pointing -/// directly to the right place in the developer console to flip the bit. +/// For example, if a quota check failed with an error indicating the calling +/// project hasn't enabled the accessed service, this can contain a URL pointing +/// directly to the right place in the developer console to flip the bit. class Help extends $pb.GeneratedMessage { factory Help({ $core.Iterable? links, }) { final result = create(); - if (links != null) { - result.links.addAll(links); - } + if (links != null) result.links.addAll(links); return result; } - Help._() : super(); - factory Help.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory Help.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); + + Help._(); + + factory Help.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory Help.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); static final $pb.BuilderInfo _i = $pb.BuilderInfo( _omitMessageNames ? '' : 'Help', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.rpc'), createEmptyInstance: create) - ..pc(1, _omitFieldNames ? '' : 'links', $pb.PbFieldType.PM, + ..pPM(1, _omitFieldNames ? '' : 'links', subBuilder: Help_Link.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') - Help clone() => Help()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Help clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') Help copyWith(void Function(Help) updates) => super.copyWith((message) => updates(message as Help)) as Help; + @$core.override $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static Help create() => Help._(); + @$core.override Help createEmptyInstance() => create(); static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') @@ -1100,7 +991,7 @@ class Help extends $pb.GeneratedMessage { /// URL(s) pointing to additional information on handling the current error. @$pb.TagNumber(1) - $core.List get links => $_getList(0); + $pb.PbList get links => $_getList(0); } /// Provides a localized error message that is safe to return to the user @@ -1111,21 +1002,19 @@ class LocalizedMessage extends $pb.GeneratedMessage { $core.String? message, }) { final result = create(); - if (locale != null) { - result.locale = locale; - } - if (message != null) { - result.message = message; - } + if (locale != null) result.locale = locale; + if (message != null) result.message = message; return result; } - LocalizedMessage._() : super(); - factory LocalizedMessage.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory LocalizedMessage.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); + + LocalizedMessage._(); + + factory LocalizedMessage.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory LocalizedMessage.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); static final $pb.BuilderInfo _i = $pb.BuilderInfo( _omitMessageNames ? '' : 'LocalizedMessage', @@ -1135,21 +1024,19 @@ class LocalizedMessage extends $pb.GeneratedMessage { ..aOS(2, _omitFieldNames ? '' : 'message') ..hasRequiredFields = false; - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - LocalizedMessage clone() => LocalizedMessage()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + LocalizedMessage clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') LocalizedMessage copyWith(void Function(LocalizedMessage) updates) => super.copyWith((message) => updates(message as LocalizedMessage)) as LocalizedMessage; + @$core.override $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static LocalizedMessage create() => LocalizedMessage._(); + @$core.override LocalizedMessage createEmptyInstance() => create(); static $pb.PbList createRepeated() => $pb.PbList(); @@ -1164,29 +1051,24 @@ class LocalizedMessage extends $pb.GeneratedMessage { @$pb.TagNumber(1) $core.String get locale => $_getSZ(0); @$pb.TagNumber(1) - set locale($core.String v) { - $_setString(0, v); - } - + set locale($core.String value) => $_setString(0, value); @$pb.TagNumber(1) $core.bool hasLocale() => $_has(0); @$pb.TagNumber(1) - void clearLocale() => clearField(1); + void clearLocale() => $_clearField(1); /// The localized error message in the above locale. @$pb.TagNumber(2) $core.String get message => $_getSZ(1); @$pb.TagNumber(2) - set message($core.String v) { - $_setString(1, v); - } - + set message($core.String value) => $_setString(1, value); @$pb.TagNumber(2) $core.bool hasMessage() => $_has(1); @$pb.TagNumber(2) - void clearMessage() => clearField(2); + void clearMessage() => $_clearField(2); } -const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); -const _omitMessageNames = +const $core.bool _omitFieldNames = + $core.bool.fromEnvironment('protobuf.omit_field_names'); +const $core.bool _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/lib/src/generated/google/rpc/error_details.pbenum.dart b/lib/src/generated/google/rpc/error_details.pbenum.dart index 9b5bee16..3da84096 100644 --- a/lib/src/generated/google/rpc/error_details.pbenum.dart +++ b/lib/src/generated/google/rpc/error_details.pbenum.dart @@ -1,10 +1,11 @@ +// This is a generated file - do not edit. // -// Generated code. Do not modify. -// source: google/rpc/error_details.proto -// -// @dart = 2.12 +// Generated from google/rpc/error_details.proto. + +// @dart = 3.3 // ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names diff --git a/lib/src/generated/google/rpc/error_details.pbjson.dart b/lib/src/generated/google/rpc/error_details.pbjson.dart index d7c1f0ed..11c99b85 100644 --- a/lib/src/generated/google/rpc/error_details.pbjson.dart +++ b/lib/src/generated/google/rpc/error_details.pbjson.dart @@ -1,13 +1,14 @@ +// This is a generated file - do not edit. // -// Generated code. Do not modify. -// source: google/rpc/error_details.proto -// -// @dart = 2.12 +// Generated from google/rpc/error_details.proto. + +// @dart = 3.3 // ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names, unused_import import 'dart:convert' as $convert; import 'dart:core' as $core; diff --git a/lib/src/generated/google/rpc/status.pb.dart b/lib/src/generated/google/rpc/status.pb.dart index 35fbf1a9..5d2be386 100644 --- a/lib/src/generated/google/rpc/status.pb.dart +++ b/lib/src/generated/google/rpc/status.pb.dart @@ -1,13 +1,14 @@ +// This is a generated file - do not edit. // -// Generated code. Do not modify. -// source: google/rpc/status.proto -// -// @dart = 2.12 +// Generated from google/rpc/status.proto. + +// @dart = 3.3 // ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names import 'dart:core' as $core; @@ -15,13 +16,15 @@ import 'package:protobuf/protobuf.dart' as $pb; import '../protobuf/any.pb.dart' as $0; -/// The `Status` type defines a logical error model that is suitable for -/// different programming environments, including REST APIs and RPC APIs. It is -/// used by [gRPC](https://github.com/grpc). Each `Status` message contains -/// three pieces of data: error code, error message, and error details. +export 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions; + +/// The `Status` type defines a logical error model that is suitable for +/// different programming environments, including REST APIs and RPC APIs. It is +/// used by [gRPC](https://github.com/grpc). Each `Status` message contains +/// three pieces of data: error code, error message, and error details. /// -/// You can find out more about this error model and how to work with it in the -/// [API Design Guide](https://cloud.google.com/apis/design/errors). +/// You can find out more about this error model and how to work with it in the +/// [API Design Guide](https://cloud.google.com/apis/design/errors). class Status extends $pb.GeneratedMessage { factory Status({ $core.int? code, @@ -29,49 +32,43 @@ class Status extends $pb.GeneratedMessage { $core.Iterable<$0.Any>? details, }) { final result = create(); - if (code != null) { - result.code = code; - } - if (message != null) { - result.message = message; - } - if (details != null) { - result.details.addAll(details); - } + if (code != null) result.code = code; + if (message != null) result.message = message; + if (details != null) result.details.addAll(details); return result; } - Status._() : super(); - factory Status.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory Status.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); + + Status._(); + + factory Status.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory Status.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); static final $pb.BuilderInfo _i = $pb.BuilderInfo( _omitMessageNames ? '' : 'Status', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.rpc'), createEmptyInstance: create) - ..a<$core.int>(1, _omitFieldNames ? '' : 'code', $pb.PbFieldType.O3) + ..aI(1, _omitFieldNames ? '' : 'code') ..aOS(2, _omitFieldNames ? '' : 'message') - ..pc<$0.Any>(3, _omitFieldNames ? '' : 'details', $pb.PbFieldType.PM, + ..pPM<$0.Any>(3, _omitFieldNames ? '' : 'details', subBuilder: $0.Any.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') - Status clone() => Status()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Status clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') Status copyWith(void Function(Status) updates) => super.copyWith((message) => updates(message as Status)) as Status; + @$core.override $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static Status create() => Status._(); + @$core.override Status createEmptyInstance() => create(); static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') @@ -83,14 +80,11 @@ class Status extends $pb.GeneratedMessage { @$pb.TagNumber(1) $core.int get code => $_getIZ(0); @$pb.TagNumber(1) - set code($core.int v) { - $_setSignedInt32(0, v); - } - + set code($core.int value) => $_setSignedInt32(0, value); @$pb.TagNumber(1) $core.bool hasCode() => $_has(0); @$pb.TagNumber(1) - void clearCode() => clearField(1); + void clearCode() => $_clearField(1); /// A developer-facing error message, which should be in English. Any /// user-facing error message should be localized and sent in the @@ -98,21 +92,19 @@ class Status extends $pb.GeneratedMessage { @$pb.TagNumber(2) $core.String get message => $_getSZ(1); @$pb.TagNumber(2) - set message($core.String v) { - $_setString(1, v); - } - + set message($core.String value) => $_setString(1, value); @$pb.TagNumber(2) $core.bool hasMessage() => $_has(1); @$pb.TagNumber(2) - void clearMessage() => clearField(2); + void clearMessage() => $_clearField(2); /// A list of messages that carry the error details. There is a common set of /// message types for APIs to use. @$pb.TagNumber(3) - $core.List<$0.Any> get details => $_getList(2); + $pb.PbList<$0.Any> get details => $_getList(2); } -const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); -const _omitMessageNames = +const $core.bool _omitFieldNames = + $core.bool.fromEnvironment('protobuf.omit_field_names'); +const $core.bool _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/lib/src/generated/google/rpc/status.pbenum.dart b/lib/src/generated/google/rpc/status.pbenum.dart index aaf54bbc..646a13c5 100644 --- a/lib/src/generated/google/rpc/status.pbenum.dart +++ b/lib/src/generated/google/rpc/status.pbenum.dart @@ -1,10 +1,11 @@ +// This is a generated file - do not edit. // -// Generated code. Do not modify. -// source: google/rpc/status.proto -// -// @dart = 2.12 +// Generated from google/rpc/status.proto. + +// @dart = 3.3 // ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names diff --git a/lib/src/generated/google/rpc/status.pbjson.dart b/lib/src/generated/google/rpc/status.pbjson.dart index d7608ca4..98042466 100644 --- a/lib/src/generated/google/rpc/status.pbjson.dart +++ b/lib/src/generated/google/rpc/status.pbjson.dart @@ -1,13 +1,14 @@ +// This is a generated file - do not edit. // -// Generated code. Do not modify. -// source: google/rpc/status.proto -// -// @dart = 2.12 +// Generated from google/rpc/status.proto. + +// @dart = 3.3 // ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names, unused_import import 'dart:convert' as $convert; import 'dart:core' as $core; diff --git a/pubspec.yaml b/pubspec.yaml index bea5fa7d..88eedaba 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: grpc -version: 4.2.0 +version: 4.3.0 description: Dart implementation of gRPC, a high performance, open-source universal RPC framework. repository: https://github.com/grpc/grpc-dart @@ -27,7 +27,7 @@ dependencies: meta: ^1.17.0 http: ^1.4.0 http2: ^2.3.1 - protobuf: ^4.1.0 + protobuf: ^5.0.0 clock: ^1.1.2 web: ^1.1.1 diff --git a/test/src/generated/echo.pb.dart b/test/src/generated/echo.pb.dart index d9f8f129..17fc2633 100644 --- a/test/src/generated/echo.pb.dart +++ b/test/src/generated/echo.pb.dart @@ -1,35 +1,38 @@ +// This is a generated file - do not edit. // -// Generated code. Do not modify. -// source: echo.proto -// -// @dart = 2.12 +// Generated from echo.proto. + +// @dart = 3.3 // ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names import 'dart:core' as $core; import 'package:protobuf/protobuf.dart' as $pb; +export 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions; + class EchoRequest extends $pb.GeneratedMessage { factory EchoRequest({ $core.String? message, }) { final result = create(); - if (message != null) { - result.message = message; - } + if (message != null) result.message = message; return result; } - EchoRequest._() : super(); - factory EchoRequest.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory EchoRequest.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); + + EchoRequest._(); + + factory EchoRequest.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory EchoRequest.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); static final $pb.BuilderInfo _i = $pb.BuilderInfo( _omitMessageNames ? '' : 'EchoRequest', @@ -39,21 +42,19 @@ class EchoRequest extends $pb.GeneratedMessage { ..aOS(1, _omitFieldNames ? '' : 'message') ..hasRequiredFields = false; - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - EchoRequest clone() => EchoRequest()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + EchoRequest clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') EchoRequest copyWith(void Function(EchoRequest) updates) => super.copyWith((message) => updates(message as EchoRequest)) as EchoRequest; + @$core.override $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static EchoRequest create() => EchoRequest._(); + @$core.override EchoRequest createEmptyInstance() => create(); static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') @@ -64,14 +65,11 @@ class EchoRequest extends $pb.GeneratedMessage { @$pb.TagNumber(1) $core.String get message => $_getSZ(0); @$pb.TagNumber(1) - set message($core.String v) { - $_setString(0, v); - } - + set message($core.String value) => $_setString(0, value); @$pb.TagNumber(1) $core.bool hasMessage() => $_has(0); @$pb.TagNumber(1) - void clearMessage() => clearField(1); + void clearMessage() => $_clearField(1); } class EchoResponse extends $pb.GeneratedMessage { @@ -79,18 +77,18 @@ class EchoResponse extends $pb.GeneratedMessage { $core.String? message, }) { final result = create(); - if (message != null) { - result.message = message; - } + if (message != null) result.message = message; return result; } - EchoResponse._() : super(); - factory EchoResponse.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory EchoResponse.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); + + EchoResponse._(); + + factory EchoResponse.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory EchoResponse.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); static final $pb.BuilderInfo _i = $pb.BuilderInfo( _omitMessageNames ? '' : 'EchoResponse', @@ -100,21 +98,19 @@ class EchoResponse extends $pb.GeneratedMessage { ..aOS(1, _omitFieldNames ? '' : 'message') ..hasRequiredFields = false; - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - EchoResponse clone() => EchoResponse()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + EchoResponse clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') EchoResponse copyWith(void Function(EchoResponse) updates) => super.copyWith((message) => updates(message as EchoResponse)) as EchoResponse; + @$core.override $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static EchoResponse create() => EchoResponse._(); + @$core.override EchoResponse createEmptyInstance() => create(); static $pb.PbList createRepeated() => $pb.PbList(); @@ -126,14 +122,11 @@ class EchoResponse extends $pb.GeneratedMessage { @$pb.TagNumber(1) $core.String get message => $_getSZ(0); @$pb.TagNumber(1) - set message($core.String v) { - $_setString(0, v); - } - + set message($core.String value) => $_setString(0, value); @$pb.TagNumber(1) $core.bool hasMessage() => $_has(0); @$pb.TagNumber(1) - void clearMessage() => clearField(1); + void clearMessage() => $_clearField(1); } class ServerStreamingEchoRequest extends $pb.GeneratedMessage { @@ -143,24 +136,20 @@ class ServerStreamingEchoRequest extends $pb.GeneratedMessage { $core.int? messageInterval, }) { final result = create(); - if (message != null) { - result.message = message; - } - if (messageCount != null) { - result.messageCount = messageCount; - } - if (messageInterval != null) { - result.messageInterval = messageInterval; - } + if (message != null) result.message = message; + if (messageCount != null) result.messageCount = messageCount; + if (messageInterval != null) result.messageInterval = messageInterval; return result; } - ServerStreamingEchoRequest._() : super(); - factory ServerStreamingEchoRequest.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory ServerStreamingEchoRequest.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); + + ServerStreamingEchoRequest._(); + + factory ServerStreamingEchoRequest.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory ServerStreamingEchoRequest.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); static final $pb.BuilderInfo _i = $pb.BuilderInfo( _omitMessageNames ? '' : 'ServerStreamingEchoRequest', @@ -168,29 +157,25 @@ class ServerStreamingEchoRequest extends $pb.GeneratedMessage { _omitMessageNames ? '' : 'grpc.gateway.testing'), createEmptyInstance: create) ..aOS(1, _omitFieldNames ? '' : 'message') - ..a<$core.int>(2, _omitFieldNames ? '' : 'messageCount', $pb.PbFieldType.O3) - ..a<$core.int>( - 3, _omitFieldNames ? '' : 'messageInterval', $pb.PbFieldType.O3) + ..aI(2, _omitFieldNames ? '' : 'messageCount') + ..aI(3, _omitFieldNames ? '' : 'messageInterval') ..hasRequiredFields = false; - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - ServerStreamingEchoRequest clone() => - ServerStreamingEchoRequest()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ServerStreamingEchoRequest clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') ServerStreamingEchoRequest copyWith( void Function(ServerStreamingEchoRequest) updates) => super.copyWith( (message) => updates(message as ServerStreamingEchoRequest)) as ServerStreamingEchoRequest; + @$core.override $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static ServerStreamingEchoRequest create() => ServerStreamingEchoRequest._(); + @$core.override ServerStreamingEchoRequest createEmptyInstance() => create(); static $pb.PbList createRepeated() => $pb.PbList(); @@ -202,38 +187,29 @@ class ServerStreamingEchoRequest extends $pb.GeneratedMessage { @$pb.TagNumber(1) $core.String get message => $_getSZ(0); @$pb.TagNumber(1) - set message($core.String v) { - $_setString(0, v); - } - + set message($core.String value) => $_setString(0, value); @$pb.TagNumber(1) $core.bool hasMessage() => $_has(0); @$pb.TagNumber(1) - void clearMessage() => clearField(1); + void clearMessage() => $_clearField(1); @$pb.TagNumber(2) $core.int get messageCount => $_getIZ(1); @$pb.TagNumber(2) - set messageCount($core.int v) { - $_setSignedInt32(1, v); - } - + set messageCount($core.int value) => $_setSignedInt32(1, value); @$pb.TagNumber(2) $core.bool hasMessageCount() => $_has(1); @$pb.TagNumber(2) - void clearMessageCount() => clearField(2); + void clearMessageCount() => $_clearField(2); @$pb.TagNumber(3) $core.int get messageInterval => $_getIZ(2); @$pb.TagNumber(3) - set messageInterval($core.int v) { - $_setSignedInt32(2, v); - } - + set messageInterval($core.int value) => $_setSignedInt32(2, value); @$pb.TagNumber(3) $core.bool hasMessageInterval() => $_has(2); @$pb.TagNumber(3) - void clearMessageInterval() => clearField(3); + void clearMessageInterval() => $_clearField(3); } class ServerStreamingEchoResponse extends $pb.GeneratedMessage { @@ -241,18 +217,18 @@ class ServerStreamingEchoResponse extends $pb.GeneratedMessage { $core.String? message, }) { final result = create(); - if (message != null) { - result.message = message; - } + if (message != null) result.message = message; return result; } - ServerStreamingEchoResponse._() : super(); - factory ServerStreamingEchoResponse.fromBuffer($core.List<$core.int> i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(i, r); - factory ServerStreamingEchoResponse.fromJson($core.String i, - [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(i, r); + + ServerStreamingEchoResponse._(); + + factory ServerStreamingEchoResponse.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory ServerStreamingEchoResponse.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); static final $pb.BuilderInfo _i = $pb.BuilderInfo( _omitMessageNames ? '' : 'ServerStreamingEchoResponse', @@ -262,25 +238,22 @@ class ServerStreamingEchoResponse extends $pb.GeneratedMessage { ..aOS(1, _omitFieldNames ? '' : 'message') ..hasRequiredFields = false; - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - ServerStreamingEchoResponse clone() => - ServerStreamingEchoResponse()..mergeFromMessage(this); - @$core.Deprecated('Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ServerStreamingEchoResponse clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') ServerStreamingEchoResponse copyWith( void Function(ServerStreamingEchoResponse) updates) => super.copyWith( (message) => updates(message as ServerStreamingEchoResponse)) as ServerStreamingEchoResponse; + @$core.override $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') static ServerStreamingEchoResponse create() => ServerStreamingEchoResponse._(); + @$core.override ServerStreamingEchoResponse createEmptyInstance() => create(); static $pb.PbList createRepeated() => $pb.PbList(); @@ -292,16 +265,14 @@ class ServerStreamingEchoResponse extends $pb.GeneratedMessage { @$pb.TagNumber(1) $core.String get message => $_getSZ(0); @$pb.TagNumber(1) - set message($core.String v) { - $_setString(0, v); - } - + set message($core.String value) => $_setString(0, value); @$pb.TagNumber(1) $core.bool hasMessage() => $_has(0); @$pb.TagNumber(1) - void clearMessage() => clearField(1); + void clearMessage() => $_clearField(1); } -const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); -const _omitMessageNames = +const $core.bool _omitFieldNames = + $core.bool.fromEnvironment('protobuf.omit_field_names'); +const $core.bool _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/test/src/generated/echo.pbenum.dart b/test/src/generated/echo.pbenum.dart index 188daf28..f38e17c3 100644 --- a/test/src/generated/echo.pbenum.dart +++ b/test/src/generated/echo.pbenum.dart @@ -1,10 +1,11 @@ +// This is a generated file - do not edit. // -// Generated code. Do not modify. -// source: echo.proto -// -// @dart = 2.12 +// Generated from echo.proto. + +// @dart = 3.3 // ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names diff --git a/test/src/generated/echo.pbgrpc.dart b/test/src/generated/echo.pbgrpc.dart index 93ac0aa2..cbea5aa0 100644 --- a/test/src/generated/echo.pbgrpc.dart +++ b/test/src/generated/echo.pbgrpc.dart @@ -1,13 +1,14 @@ +// This is a generated file - do not edit. // -// Generated code. Do not modify. -// source: echo.proto -// -// @dart = 2.12 +// Generated from echo.proto. + +// @dart = 3.3 // ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names import 'dart:async' as $async; import 'dart:core' as $core; @@ -21,34 +22,43 @@ export 'echo.pb.dart'; @$pb.GrpcServiceName('grpc.gateway.testing.EchoService') class EchoServiceClient extends $grpc.Client { - static final _$echo = $grpc.ClientMethod<$0.EchoRequest, $0.EchoResponse>( - '/grpc.gateway.testing.EchoService/Echo', - ($0.EchoRequest value) => value.writeToBuffer(), - ($core.List<$core.int> value) => $0.EchoResponse.fromBuffer(value)); - static final _$serverStreamingEcho = $grpc.ClientMethod< - $0.ServerStreamingEchoRequest, $0.ServerStreamingEchoResponse>( - '/grpc.gateway.testing.EchoService/ServerStreamingEcho', - ($0.ServerStreamingEchoRequest value) => value.writeToBuffer(), - ($core.List<$core.int> value) => - $0.ServerStreamingEchoResponse.fromBuffer(value)); + /// The hostname for this service. + static const $core.String defaultHost = ''; - EchoServiceClient($grpc.ClientChannel channel, - {$grpc.CallOptions? options, - $core.Iterable<$grpc.ClientInterceptor>? interceptors}) - : super(channel, options: options, interceptors: interceptors); + /// OAuth scopes needed for the client. + static const $core.List<$core.String> oauthScopes = [ + '', + ]; - $grpc.ResponseFuture<$0.EchoResponse> echo($0.EchoRequest request, - {$grpc.CallOptions? options}) { + EchoServiceClient(super.channel, {super.options, super.interceptors}); + + $grpc.ResponseFuture<$0.EchoResponse> echo( + $0.EchoRequest request, { + $grpc.CallOptions? options, + }) { return $createUnaryCall(_$echo, request, options: options); } $grpc.ResponseStream<$0.ServerStreamingEchoResponse> serverStreamingEcho( - $0.ServerStreamingEchoRequest request, - {$grpc.CallOptions? options}) { + $0.ServerStreamingEchoRequest request, { + $grpc.CallOptions? options, + }) { return $createStreamingCall( _$serverStreamingEcho, $async.Stream.fromIterable([request]), options: options); } + + // method descriptors + + static final _$echo = $grpc.ClientMethod<$0.EchoRequest, $0.EchoResponse>( + '/grpc.gateway.testing.EchoService/Echo', + ($0.EchoRequest value) => value.writeToBuffer(), + $0.EchoResponse.fromBuffer); + static final _$serverStreamingEcho = $grpc.ClientMethod< + $0.ServerStreamingEchoRequest, $0.ServerStreamingEchoResponse>( + '/grpc.gateway.testing.EchoService/ServerStreamingEcho', + ($0.ServerStreamingEchoRequest value) => value.writeToBuffer(), + $0.ServerStreamingEchoResponse.fromBuffer); } @$pb.GrpcServiceName('grpc.gateway.testing.EchoService') @@ -75,18 +85,19 @@ abstract class EchoServiceBase extends $grpc.Service { } $async.Future<$0.EchoResponse> echo_Pre( - $grpc.ServiceCall call, $async.Future<$0.EchoRequest> request) async { - return echo(call, await request); + $grpc.ServiceCall $call, $async.Future<$0.EchoRequest> $request) async { + return echo($call, await $request); } + $async.Future<$0.EchoResponse> echo( + $grpc.ServiceCall call, $0.EchoRequest request); + $async.Stream<$0.ServerStreamingEchoResponse> serverStreamingEcho_Pre( - $grpc.ServiceCall call, - $async.Future<$0.ServerStreamingEchoRequest> request) async* { - yield* serverStreamingEcho(call, await request); + $grpc.ServiceCall $call, + $async.Future<$0.ServerStreamingEchoRequest> $request) async* { + yield* serverStreamingEcho($call, await $request); } - $async.Future<$0.EchoResponse> echo( - $grpc.ServiceCall call, $0.EchoRequest request); $async.Stream<$0.ServerStreamingEchoResponse> serverStreamingEcho( $grpc.ServiceCall call, $0.ServerStreamingEchoRequest request); } diff --git a/test/src/generated/echo.pbjson.dart b/test/src/generated/echo.pbjson.dart index 5d4c05ea..80334871 100644 --- a/test/src/generated/echo.pbjson.dart +++ b/test/src/generated/echo.pbjson.dart @@ -1,13 +1,14 @@ +// This is a generated file - do not edit. // -// Generated code. Do not modify. -// source: echo.proto -// -// @dart = 2.12 +// Generated from echo.proto. + +// @dart = 3.3 // ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import +// ignore_for_file: constant_identifier_names +// ignore_for_file: curly_braces_in_flow_control_structures +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names, unused_import import 'dart:convert' as $convert; import 'dart:core' as $core;