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 13c1f8d..805fc93 100644 --- a/example/googleapis/lib/src/generated/google/api/label.pb.dart +++ b/example/googleapis/lib/src/generated/google/api/label.pb.dart @@ -1,9 +1,13 @@ -/// +// // Generated code. Do not modify. // source: google/api/label.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + +// 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 import 'dart:core' as $core; @@ -13,61 +17,46 @@ import 'label.pbenum.dart'; export 'label.pbenum.dart'; +/// A description of a label. class LabelDescriptor extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'LabelDescriptor', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'google.api'), - createEmptyInstance: create) - ..aOS( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'key') - ..e( - 2, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'valueType', - $pb.PbFieldType.OE, - defaultOrMaker: LabelDescriptor_ValueType.STRING, - valueOf: LabelDescriptor_ValueType.valueOf, - enumValues: LabelDescriptor_ValueType.values) - ..aOS( - 3, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'description') - ..hasRequiredFields = false; - - LabelDescriptor._() : super(); factory LabelDescriptor({ $core.String? key, LabelDescriptor_ValueType? valueType, $core.String? description, }) { - final _result = create(); + final result = create(); if (key != null) { - _result.key = key; + result.key = key; } if (valueType != null) { - _result.valueType = valueType; + result.valueType = valueType; } if (description != null) { - _result.description = description; + result.description = description; } - return _result; + 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); + + 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, + 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') @@ -77,8 +66,10 @@ class LabelDescriptor extends $pb.GeneratedMessage { 'Will be removed in next major version') LabelDescriptor copyWith(void Function(LabelDescriptor) updates) => super.copyWith((message) => updates(message as LabelDescriptor)) - as LabelDescriptor; // ignore: deprecated_member_use + as LabelDescriptor; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static LabelDescriptor create() => LabelDescriptor._(); LabelDescriptor createEmptyInstance() => create(); @@ -89,6 +80,7 @@ class LabelDescriptor extends $pb.GeneratedMessage { $pb.GeneratedMessage.$_defaultFor(create); static LabelDescriptor? _defaultInstance; + /// The label key. @$pb.TagNumber(1) $core.String get key => $_getSZ(0); @$pb.TagNumber(1) @@ -101,6 +93,7 @@ class LabelDescriptor extends $pb.GeneratedMessage { @$pb.TagNumber(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) @@ -113,6 +106,7 @@ class LabelDescriptor extends $pb.GeneratedMessage { @$pb.TagNumber(2) void clearValueType() => clearField(2); + /// A human-readable description for the label. @$pb.TagNumber(3) $core.String get description => $_getSZ(2); @$pb.TagNumber(3) @@ -125,3 +119,7 @@ class LabelDescriptor extends $pb.GeneratedMessage { @$pb.TagNumber(3) void clearDescription() => clearField(3); } + +const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); +const _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 706975b..1dabf30 100644 --- a/example/googleapis/lib/src/generated/google/api/label.pbenum.dart +++ b/example/googleapis/lib/src/generated/google/api/label.pbenum.dart @@ -1,30 +1,26 @@ -/// +// // Generated code. Do not modify. // source: google/api/label.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name -// ignore_for_file: UNDEFINED_SHOWN_NAME +// 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 + import 'dart:core' as $core; + import 'package:protobuf/protobuf.dart' as $pb; +/// Value types that can be used as label values. class LabelDescriptor_ValueType extends $pb.ProtobufEnum { - static const LabelDescriptor_ValueType STRING = LabelDescriptor_ValueType._( - 0, - const $core.bool.fromEnvironment('protobuf.omit_enum_names') - ? '' - : 'STRING'); - static const LabelDescriptor_ValueType BOOL = LabelDescriptor_ValueType._( - 1, - const $core.bool.fromEnvironment('protobuf.omit_enum_names') - ? '' - : 'BOOL'); - static const LabelDescriptor_ValueType INT64 = LabelDescriptor_ValueType._( - 2, - const $core.bool.fromEnvironment('protobuf.omit_enum_names') - ? '' - : 'INT64'); + static const LabelDescriptor_ValueType STRING = + LabelDescriptor_ValueType._(0, _omitEnumNames ? '' : 'STRING'); + static const LabelDescriptor_ValueType BOOL = + LabelDescriptor_ValueType._(1, _omitEnumNames ? '' : 'BOOL'); + static const LabelDescriptor_ValueType INT64 = + LabelDescriptor_ValueType._(2, _omitEnumNames ? '' : 'INT64'); static const $core.List values = [ @@ -39,3 +35,5 @@ class LabelDescriptor_ValueType extends $pb.ProtobufEnum { const LabelDescriptor_ValueType._($core.int v, $core.String n) : super(v, n); } + +const _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 4adddaa..0c103ad 100644 --- a/example/googleapis/lib/src/generated/google/api/label.pbjson.dart +++ b/example/googleapis/lib/src/generated/google/api/label.pbjson.dart @@ -1,20 +1,24 @@ -/// +// // Generated code. Do not modify. // source: google/api/label.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,deprecated_member_use_from_same_package,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name -import 'dart:core' as $core; +// 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 + import 'dart:convert' as $convert; +import 'dart:core' as $core; import 'dart:typed_data' as $typed_data; @$core.Deprecated('Use labelDescriptorDescriptor instead') -const LabelDescriptor$json = const { +const LabelDescriptor$json = { '1': 'LabelDescriptor', - '2': const [ - const {'1': 'key', '3': 1, '4': 1, '5': 9, '10': 'key'}, - const { + '2': [ + {'1': 'key', '3': 1, '4': 1, '5': 9, '10': 'key'}, + { '1': 'value_type', '3': 2, '4': 1, @@ -22,21 +26,24 @@ const LabelDescriptor$json = const { '6': '.google.api.LabelDescriptor.ValueType', '10': 'valueType' }, - const {'1': 'description', '3': 3, '4': 1, '5': 9, '10': 'description'}, + {'1': 'description', '3': 3, '4': 1, '5': 9, '10': 'description'}, ], - '4': const [LabelDescriptor_ValueType$json], + '4': [LabelDescriptor_ValueType$json], }; @$core.Deprecated('Use labelDescriptorDescriptor instead') -const LabelDescriptor_ValueType$json = const { +const LabelDescriptor_ValueType$json = { '1': 'ValueType', - '2': const [ - const {'1': 'STRING', '2': 0}, - const {'1': 'BOOL', '2': 1}, - const {'1': 'INT64', '2': 2}, + '2': [ + {'1': 'STRING', '2': 0}, + {'1': 'BOOL', '2': 1}, + {'1': 'INT64', '2': 2}, ], }; /// Descriptor for `LabelDescriptor`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List labelDescriptorDescriptor = $convert.base64Decode( - 'Cg9MYWJlbERlc2NyaXB0b3ISEAoDa2V5GAEgASgJUgNrZXkSRAoKdmFsdWVfdHlwZRgCIAEoDjIlLmdvb2dsZS5hcGkuTGFiZWxEZXNjcmlwdG9yLlZhbHVlVHlwZVIJdmFsdWVUeXBlEiAKC2Rlc2NyaXB0aW9uGAMgASgJUgtkZXNjcmlwdGlvbiIsCglWYWx1ZVR5cGUSCgoGU1RSSU5HEAASCAoEQk9PTBABEgkKBUlOVDY0EAI='); + 'Cg9MYWJlbERlc2NyaXB0b3ISEAoDa2V5GAEgASgJUgNrZXkSRAoKdmFsdWVfdHlwZRgCIAEoDj' + 'IlLmdvb2dsZS5hcGkuTGFiZWxEZXNjcmlwdG9yLlZhbHVlVHlwZVIJdmFsdWVUeXBlEiAKC2Rl' + 'c2NyaXB0aW9uGAMgASgJUgtkZXNjcmlwdGlvbiIsCglWYWx1ZVR5cGUSCgoGU1RSSU5HEAASCA' + 'oEQk9PTBABEgkKBUlOVDY0EAI='); 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 24f7f2a..fe46438 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,9 +1,13 @@ -/// +// // Generated code. Do not modify. // source: google/api/launch_stage.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + +// 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 import 'dart:core' as $core; 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 230876a..3077f26 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,52 +1,36 @@ -/// +// // Generated code. Do not modify. // source: google/api/launch_stage.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name -// ignore_for_file: UNDEFINED_SHOWN_NAME +// 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 + import 'dart:core' as $core; + 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 { - static const LaunchStage LAUNCH_STAGE_UNSPECIFIED = LaunchStage._( - 0, - const $core.bool.fromEnvironment('protobuf.omit_enum_names') - ? '' - : 'LAUNCH_STAGE_UNSPECIFIED'); - static const LaunchStage UNIMPLEMENTED = LaunchStage._( - 6, - const $core.bool.fromEnvironment('protobuf.omit_enum_names') - ? '' - : 'UNIMPLEMENTED'); - static const LaunchStage PRELAUNCH = LaunchStage._( - 7, - const $core.bool.fromEnvironment('protobuf.omit_enum_names') - ? '' - : 'PRELAUNCH'); - static const LaunchStage EARLY_ACCESS = LaunchStage._( - 1, - const $core.bool.fromEnvironment('protobuf.omit_enum_names') - ? '' - : 'EARLY_ACCESS'); - static const LaunchStage ALPHA = LaunchStage._( - 2, - const $core.bool.fromEnvironment('protobuf.omit_enum_names') - ? '' - : 'ALPHA'); - static const LaunchStage BETA = LaunchStage._( - 3, - const $core.bool.fromEnvironment('protobuf.omit_enum_names') - ? '' - : 'BETA'); - static const LaunchStage GA = LaunchStage._(4, - const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'GA'); - static const LaunchStage DEPRECATED = LaunchStage._( - 5, - const $core.bool.fromEnvironment('protobuf.omit_enum_names') - ? '' - : 'DEPRECATED'); + static const LaunchStage LAUNCH_STAGE_UNSPECIFIED = + LaunchStage._(0, _omitEnumNames ? '' : 'LAUNCH_STAGE_UNSPECIFIED'); + static const LaunchStage UNIMPLEMENTED = + LaunchStage._(6, _omitEnumNames ? '' : 'UNIMPLEMENTED'); + static const LaunchStage PRELAUNCH = + LaunchStage._(7, _omitEnumNames ? '' : 'PRELAUNCH'); + static const LaunchStage EARLY_ACCESS = + LaunchStage._(1, _omitEnumNames ? '' : 'EARLY_ACCESS'); + static const LaunchStage ALPHA = + LaunchStage._(2, _omitEnumNames ? '' : 'ALPHA'); + static const LaunchStage BETA = + LaunchStage._(3, _omitEnumNames ? '' : 'BETA'); + static const LaunchStage GA = LaunchStage._(4, _omitEnumNames ? '' : 'GA'); + static const LaunchStage DEPRECATED = + LaunchStage._(5, _omitEnumNames ? '' : 'DEPRECATED'); static const $core.List values = [ LAUNCH_STAGE_UNSPECIFIED, @@ -65,3 +49,5 @@ class LaunchStage extends $pb.ProtobufEnum { const LaunchStage._($core.int v, $core.String n) : super(v, n); } + +const _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 4c273c3..d488a11 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,29 +1,35 @@ -/// +// // Generated code. Do not modify. // source: google/api/launch_stage.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,deprecated_member_use_from_same_package,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name -import 'dart:core' as $core; +// 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 + import 'dart:convert' as $convert; +import 'dart:core' as $core; import 'dart:typed_data' as $typed_data; @$core.Deprecated('Use launchStageDescriptor instead') -const LaunchStage$json = const { +const LaunchStage$json = { '1': 'LaunchStage', - '2': const [ - const {'1': 'LAUNCH_STAGE_UNSPECIFIED', '2': 0}, - const {'1': 'UNIMPLEMENTED', '2': 6}, - const {'1': 'PRELAUNCH', '2': 7}, - const {'1': 'EARLY_ACCESS', '2': 1}, - const {'1': 'ALPHA', '2': 2}, - const {'1': 'BETA', '2': 3}, - const {'1': 'GA', '2': 4}, - const {'1': 'DEPRECATED', '2': 5}, + '2': [ + {'1': 'LAUNCH_STAGE_UNSPECIFIED', '2': 0}, + {'1': 'UNIMPLEMENTED', '2': 6}, + {'1': 'PRELAUNCH', '2': 7}, + {'1': 'EARLY_ACCESS', '2': 1}, + {'1': 'ALPHA', '2': 2}, + {'1': 'BETA', '2': 3}, + {'1': 'GA', '2': 4}, + {'1': 'DEPRECATED', '2': 5}, ], }; /// Descriptor for `LaunchStage`. Decode as a `google.protobuf.EnumDescriptorProto`. final $typed_data.Uint8List launchStageDescriptor = $convert.base64Decode( - 'CgtMYXVuY2hTdGFnZRIcChhMQVVOQ0hfU1RBR0VfVU5TUEVDSUZJRUQQABIRCg1VTklNUExFTUVOVEVEEAYSDQoJUFJFTEFVTkNIEAcSEAoMRUFSTFlfQUNDRVNTEAESCQoFQUxQSEEQAhIICgRCRVRBEAMSBgoCR0EQBBIOCgpERVBSRUNBVEVEEAU='); + 'CgtMYXVuY2hTdGFnZRIcChhMQVVOQ0hfU1RBR0VfVU5TUEVDSUZJRUQQABIRCg1VTklNUExFTU' + 'VOVEVEEAYSDQoJUFJFTEFVTkNIEAcSEAoMRUFSTFlfQUNDRVNTEAESCQoFQUxQSEEQAhIICgRC' + 'RVRBEAMSBgoCR0EQBBIOCgpERVBSRUNBVEVEEAU='); 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 901acb6..412370c 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,68 +1,33 @@ -/// +// // Generated code. Do not modify. // source: google/api/monitored_resource.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + +// 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 import 'dart:core' as $core; import 'package:protobuf/protobuf.dart' as $pb; -import 'label.pb.dart' as $0; 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. +/// +/// 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 { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'MonitoredResourceDescriptor', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'google.api'), - createEmptyInstance: create) - ..aOS( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'type') - ..aOS( - 2, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'displayName') - ..aOS( - 3, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'description') - ..pc<$0.LabelDescriptor>( - 4, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'labels', - $pb.PbFieldType.PM, - subBuilder: $0.LabelDescriptor.create) - ..aOS( - 5, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'name') - ..e<$2.LaunchStage>( - 7, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'launchStage', - $pb.PbFieldType.OE, - defaultOrMaker: $2.LaunchStage.LAUNCH_STAGE_UNSPECIFIED, - valueOf: $2.LaunchStage.valueOf, - enumValues: $2.LaunchStage.values) - ..hasRequiredFields = false; - - MonitoredResourceDescriptor._() : super(); factory MonitoredResourceDescriptor({ $core.String? type, $core.String? displayName, @@ -71,33 +36,53 @@ class MonitoredResourceDescriptor extends $pb.GeneratedMessage { $core.String? name, $2.LaunchStage? launchStage, }) { - final _result = create(); + final result = create(); if (type != null) { - _result.type = type; + result.type = type; } if (displayName != null) { - _result.displayName = displayName; + result.displayName = displayName; } if (description != null) { - _result.description = description; + result.description = description; } if (labels != null) { - _result.labels.addAll(labels); + result.labels.addAll(labels); } if (name != null) { - _result.name = name; + result.name = name; } if (launchStage != null) { - _result.launchStage = launchStage; + result.launchStage = launchStage; } - return _result; + 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); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'MonitoredResourceDescriptor', + package: const $pb.PackageName(_omitMessageNames ? '' : 'google.api'), + createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'type') + ..aOS(2, _omitFieldNames ? '' : 'displayName') + ..aOS(3, _omitFieldNames ? '' : 'description') + ..pc<$0.LabelDescriptor>( + 4, _omitFieldNames ? '' : 'labels', $pb.PbFieldType.PM, + 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, + 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') @@ -110,8 +95,10 @@ class MonitoredResourceDescriptor extends $pb.GeneratedMessage { void Function(MonitoredResourceDescriptor) updates) => super.copyWith( (message) => updates(message as MonitoredResourceDescriptor)) - as MonitoredResourceDescriptor; // ignore: deprecated_member_use + as MonitoredResourceDescriptor; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static MonitoredResourceDescriptor create() => MonitoredResourceDescriptor._(); @@ -123,6 +110,12 @@ class MonitoredResourceDescriptor extends $pb.GeneratedMessage { $pb.GeneratedMessage.$_defaultFor(create); static MonitoredResourceDescriptor? _defaultInstance; + /// 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 + /// 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) @@ -135,6 +128,10 @@ class MonitoredResourceDescriptor extends $pb.GeneratedMessage { @$pb.TagNumber(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, + /// without any article or other determiners. For example, + /// `"Google Cloud SQL Database"`. @$pb.TagNumber(2) $core.String get displayName => $_getSZ(1); @$pb.TagNumber(2) @@ -147,6 +144,8 @@ class MonitoredResourceDescriptor extends $pb.GeneratedMessage { @$pb.TagNumber(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) @@ -159,9 +158,18 @@ class MonitoredResourceDescriptor extends $pb.GeneratedMessage { @$pb.TagNumber(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); + /// Optional. The resource name of the monitored resource descriptor: + /// `"projects/{project_id}/monitoredResourceDescriptors/{type}"` where + /// {type} is the value of the `type` field in this object and + /// {project_id} is a project ID that provides API-specific context for + /// accessing the type. APIs that do not use project information can use the + /// resource name format `"monitoredResourceDescriptors/{type}"`. @$pb.TagNumber(5) $core.String get name => $_getSZ(4); @$pb.TagNumber(5) @@ -174,6 +182,7 @@ class MonitoredResourceDescriptor extends $pb.GeneratedMessage { @$pb.TagNumber(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) @@ -187,52 +196,56 @@ class MonitoredResourceDescriptor extends $pb.GeneratedMessage { 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"`: +/// +/// { "type": "gce_instance", +/// "labels": { "project_id": "my-project", +/// "instance_id": "12345678901234", +/// "zone": "us-central1-a" }} class MonitoredResource extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'MonitoredResource', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'google.api'), - createEmptyInstance: create) - ..aOS( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'type') - ..m<$core.String, $core.String>( - 2, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'labels', - entryClassName: 'MonitoredResource.LabelsEntry', - keyFieldType: $pb.PbFieldType.OS, - valueFieldType: $pb.PbFieldType.OS, - packageName: const $pb.PackageName('google.api')) - ..hasRequiredFields = false; - - MonitoredResource._() : super(); factory MonitoredResource({ $core.String? type, $core.Map<$core.String, $core.String>? labels, }) { - final _result = create(); + final result = create(); if (type != null) { - _result.type = type; + result.type = type; } if (labels != null) { - _result.labels.addAll(labels); + result.labels.addAll(labels); } - return _result; + 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); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'MonitoredResource', + package: const $pb.PackageName(_omitMessageNames ? '' : 'google.api'), + createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'type') + ..m<$core.String, $core.String>(2, _omitFieldNames ? '' : 'labels', + entryClassName: 'MonitoredResource.LabelsEntry', + keyFieldType: $pb.PbFieldType.OS, + valueFieldType: $pb.PbFieldType.OS, + 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') @@ -242,8 +255,10 @@ class MonitoredResource extends $pb.GeneratedMessage { 'Will be removed in next major version') MonitoredResource copyWith(void Function(MonitoredResource) updates) => super.copyWith((message) => updates(message as MonitoredResource)) - as MonitoredResource; // ignore: deprecated_member_use + as MonitoredResource; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static MonitoredResource create() => MonitoredResource._(); MonitoredResource createEmptyInstance() => create(); @@ -254,6 +269,13 @@ class MonitoredResource extends $pb.GeneratedMessage { $pb.GeneratedMessage.$_defaultFor(create); static MonitoredResource? _defaultInstance; + /// Required. The monitored resource type. This field must match + /// the `type` field of a + /// [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor] + /// object. For example, the type of a Compute Engine VM instance is + /// `gce_instance`. Some descriptors include the service name in the type; for + /// example, the type of a Datastream stream is + /// `datastream.googleapis.com/Stream`. @$pb.TagNumber(1) $core.String get type => $_getSZ(0); @$pb.TagNumber(1) @@ -266,57 +288,54 @@ class MonitoredResource extends $pb.GeneratedMessage { @$pb.TagNumber(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); } +/// Auxiliary metadata for a [MonitoredResource][google.api.MonitoredResource] +/// object. [MonitoredResource][google.api.MonitoredResource] objects contain the +/// minimum set of information to uniquely identify a monitored resource +/// instance. There is some other useful auxiliary metadata. Monitoring and +/// Logging use an ingestion pipeline to extract metadata for cloud resources of +/// all types, and store the metadata in this message. class MonitoredResourceMetadata extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'MonitoredResourceMetadata', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'google.api'), - createEmptyInstance: create) - ..aOM<$1.Struct>( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'systemLabels', - subBuilder: $1.Struct.create) - ..m<$core.String, $core.String>( - 2, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'userLabels', - entryClassName: 'MonitoredResourceMetadata.UserLabelsEntry', - keyFieldType: $pb.PbFieldType.OS, - valueFieldType: $pb.PbFieldType.OS, - packageName: const $pb.PackageName('google.api')) - ..hasRequiredFields = false; - - MonitoredResourceMetadata._() : super(); factory MonitoredResourceMetadata({ $1.Struct? systemLabels, $core.Map<$core.String, $core.String>? userLabels, }) { - final _result = create(); + final result = create(); if (systemLabels != null) { - _result.systemLabels = systemLabels; + result.systemLabels = systemLabels; } if (userLabels != null) { - _result.userLabels.addAll(userLabels); + result.userLabels.addAll(userLabels); } - return _result; + 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); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'MonitoredResourceMetadata', + package: const $pb.PackageName(_omitMessageNames ? '' : 'google.api'), + createEmptyInstance: create) + ..aOM<$1.Struct>(1, _omitFieldNames ? '' : 'systemLabels', + subBuilder: $1.Struct.create) + ..m<$core.String, $core.String>(2, _omitFieldNames ? '' : 'userLabels', + entryClassName: 'MonitoredResourceMetadata.UserLabelsEntry', + keyFieldType: $pb.PbFieldType.OS, + valueFieldType: $pb.PbFieldType.OS, + 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') @@ -328,8 +347,10 @@ class MonitoredResourceMetadata extends $pb.GeneratedMessage { MonitoredResourceMetadata copyWith( void Function(MonitoredResourceMetadata) updates) => super.copyWith((message) => updates(message as MonitoredResourceMetadata)) - as MonitoredResourceMetadata; // ignore: deprecated_member_use + as MonitoredResourceMetadata; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static MonitoredResourceMetadata create() => MonitoredResourceMetadata._(); MonitoredResourceMetadata createEmptyInstance() => create(); @@ -340,6 +361,16 @@ 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: + /// + /// { "name": "my-test-instance", + /// "security_group": ["a", "b", "c"], + /// "spot_instance": false } @$pb.TagNumber(1) $1.Struct get systemLabels => $_getN(0); @$pb.TagNumber(1) @@ -354,6 +385,11 @@ class MonitoredResourceMetadata extends $pb.GeneratedMessage { @$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); } + +const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); +const _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 9b69635..c036a32 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,6 +1,10 @@ -/// +// // Generated code. Do not modify. // source: google/api/monitored_resource.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + +// 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 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 7e9db21..f51942b 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,23 +1,27 @@ -/// +// // Generated code. Do not modify. // source: google/api/monitored_resource.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,deprecated_member_use_from_same_package,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name -import 'dart:core' as $core; +// 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 + import 'dart:convert' as $convert; +import 'dart:core' as $core; import 'dart:typed_data' as $typed_data; @$core.Deprecated('Use monitoredResourceDescriptorDescriptor instead') -const MonitoredResourceDescriptor$json = const { +const MonitoredResourceDescriptor$json = { '1': 'MonitoredResourceDescriptor', - '2': const [ - const {'1': 'name', '3': 5, '4': 1, '5': 9, '10': 'name'}, - const {'1': 'type', '3': 1, '4': 1, '5': 9, '10': 'type'}, - const {'1': 'display_name', '3': 2, '4': 1, '5': 9, '10': 'displayName'}, - const {'1': 'description', '3': 3, '4': 1, '5': 9, '10': 'description'}, - const { + '2': [ + {'1': 'name', '3': 5, '4': 1, '5': 9, '10': 'name'}, + {'1': 'type', '3': 1, '4': 1, '5': 9, '10': 'type'}, + {'1': 'display_name', '3': 2, '4': 1, '5': 9, '10': 'displayName'}, + {'1': 'description', '3': 3, '4': 1, '5': 9, '10': 'description'}, + { '1': 'labels', '3': 4, '4': 3, @@ -25,7 +29,7 @@ const MonitoredResourceDescriptor$json = const { '6': '.google.api.LabelDescriptor', '10': 'labels' }, - const { + { '1': 'launch_stage', '3': 7, '4': 1, @@ -37,15 +41,19 @@ const MonitoredResourceDescriptor$json = const { }; /// Descriptor for `MonitoredResourceDescriptor`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List monitoredResourceDescriptorDescriptor = - $convert.base64Decode( - 'ChtNb25pdG9yZWRSZXNvdXJjZURlc2NyaXB0b3ISEgoEbmFtZRgFIAEoCVIEbmFtZRISCgR0eXBlGAEgASgJUgR0eXBlEiEKDGRpc3BsYXlfbmFtZRgCIAEoCVILZGlzcGxheU5hbWUSIAoLZGVzY3JpcHRpb24YAyABKAlSC2Rlc2NyaXB0aW9uEjMKBmxhYmVscxgEIAMoCzIbLmdvb2dsZS5hcGkuTGFiZWxEZXNjcmlwdG9yUgZsYWJlbHMSOgoMbGF1bmNoX3N0YWdlGAcgASgOMhcuZ29vZ2xlLmFwaS5MYXVuY2hTdGFnZVILbGF1bmNoU3RhZ2U='); +final $typed_data.Uint8List monitoredResourceDescriptorDescriptor = $convert.base64Decode( + 'ChtNb25pdG9yZWRSZXNvdXJjZURlc2NyaXB0b3ISEgoEbmFtZRgFIAEoCVIEbmFtZRISCgR0eX' + 'BlGAEgASgJUgR0eXBlEiEKDGRpc3BsYXlfbmFtZRgCIAEoCVILZGlzcGxheU5hbWUSIAoLZGVz' + 'Y3JpcHRpb24YAyABKAlSC2Rlc2NyaXB0aW9uEjMKBmxhYmVscxgEIAMoCzIbLmdvb2dsZS5hcG' + 'kuTGFiZWxEZXNjcmlwdG9yUgZsYWJlbHMSOgoMbGF1bmNoX3N0YWdlGAcgASgOMhcuZ29vZ2xl' + 'LmFwaS5MYXVuY2hTdGFnZVILbGF1bmNoU3RhZ2U='); + @$core.Deprecated('Use monitoredResourceDescriptor instead') -const MonitoredResource$json = const { +const MonitoredResource$json = { '1': 'MonitoredResource', - '2': const [ - const {'1': 'type', '3': 1, '4': 1, '5': 9, '10': 'type'}, - const { + '2': [ + {'1': 'type', '3': 1, '4': 1, '5': 9, '10': 'type'}, + { '1': 'labels', '3': 2, '4': 3, @@ -54,27 +62,30 @@ const MonitoredResource$json = const { '10': 'labels' }, ], - '3': const [MonitoredResource_LabelsEntry$json], + '3': [MonitoredResource_LabelsEntry$json], }; @$core.Deprecated('Use monitoredResourceDescriptor instead') -const MonitoredResource_LabelsEntry$json = const { +const MonitoredResource_LabelsEntry$json = { '1': 'LabelsEntry', - '2': const [ - const {'1': 'key', '3': 1, '4': 1, '5': 9, '10': 'key'}, - const {'1': 'value', '3': 2, '4': 1, '5': 9, '10': 'value'}, + '2': [ + {'1': 'key', '3': 1, '4': 1, '5': 9, '10': 'key'}, + {'1': 'value', '3': 2, '4': 1, '5': 9, '10': 'value'}, ], - '7': const {'7': true}, + '7': {'7': true}, }; /// Descriptor for `MonitoredResource`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List monitoredResourceDescriptor = $convert.base64Decode( - 'ChFNb25pdG9yZWRSZXNvdXJjZRISCgR0eXBlGAEgASgJUgR0eXBlEkEKBmxhYmVscxgCIAMoCzIpLmdvb2dsZS5hcGkuTW9uaXRvcmVkUmVzb3VyY2UuTGFiZWxzRW50cnlSBmxhYmVscxo5CgtMYWJlbHNFbnRyeRIQCgNrZXkYASABKAlSA2tleRIUCgV2YWx1ZRgCIAEoCVIFdmFsdWU6AjgB'); + 'ChFNb25pdG9yZWRSZXNvdXJjZRISCgR0eXBlGAEgASgJUgR0eXBlEkEKBmxhYmVscxgCIAMoCz' + 'IpLmdvb2dsZS5hcGkuTW9uaXRvcmVkUmVzb3VyY2UuTGFiZWxzRW50cnlSBmxhYmVscxo5CgtM' + 'YWJlbHNFbnRyeRIQCgNrZXkYASABKAlSA2tleRIUCgV2YWx1ZRgCIAEoCVIFdmFsdWU6AjgB'); + @$core.Deprecated('Use monitoredResourceMetadataDescriptor instead') -const MonitoredResourceMetadata$json = const { +const MonitoredResourceMetadata$json = { '1': 'MonitoredResourceMetadata', - '2': const [ - const { + '2': [ + { '1': 'system_labels', '3': 1, '4': 1, @@ -82,7 +93,7 @@ const MonitoredResourceMetadata$json = const { '6': '.google.protobuf.Struct', '10': 'systemLabels' }, - const { + { '1': 'user_labels', '3': 2, '4': 3, @@ -91,20 +102,23 @@ const MonitoredResourceMetadata$json = const { '10': 'userLabels' }, ], - '3': const [MonitoredResourceMetadata_UserLabelsEntry$json], + '3': [MonitoredResourceMetadata_UserLabelsEntry$json], }; @$core.Deprecated('Use monitoredResourceMetadataDescriptor instead') -const MonitoredResourceMetadata_UserLabelsEntry$json = const { +const MonitoredResourceMetadata_UserLabelsEntry$json = { '1': 'UserLabelsEntry', - '2': const [ - const {'1': 'key', '3': 1, '4': 1, '5': 9, '10': 'key'}, - const {'1': 'value', '3': 2, '4': 1, '5': 9, '10': 'value'}, + '2': [ + {'1': 'key', '3': 1, '4': 1, '5': 9, '10': 'key'}, + {'1': 'value', '3': 2, '4': 1, '5': 9, '10': 'value'}, ], - '7': const {'7': true}, + '7': {'7': true}, }; /// Descriptor for `MonitoredResourceMetadata`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List monitoredResourceMetadataDescriptor = - $convert.base64Decode( - 'ChlNb25pdG9yZWRSZXNvdXJjZU1ldGFkYXRhEjwKDXN5c3RlbV9sYWJlbHMYASABKAsyFy5nb29nbGUucHJvdG9idWYuU3RydWN0UgxzeXN0ZW1MYWJlbHMSVgoLdXNlcl9sYWJlbHMYAiADKAsyNS5nb29nbGUuYXBpLk1vbml0b3JlZFJlc291cmNlTWV0YWRhdGEuVXNlckxhYmVsc0VudHJ5Ugp1c2VyTGFiZWxzGj0KD1VzZXJMYWJlbHNFbnRyeRIQCgNrZXkYASABKAlSA2tleRIUCgV2YWx1ZRgCIAEoCVIFdmFsdWU6AjgB'); +final $typed_data.Uint8List monitoredResourceMetadataDescriptor = $convert.base64Decode( + 'ChlNb25pdG9yZWRSZXNvdXJjZU1ldGFkYXRhEjwKDXN5c3RlbV9sYWJlbHMYASABKAsyFy5nb2' + '9nbGUucHJvdG9idWYuU3RydWN0UgxzeXN0ZW1MYWJlbHMSVgoLdXNlcl9sYWJlbHMYAiADKAsy' + 'NS5nb29nbGUuYXBpLk1vbml0b3JlZFJlc291cmNlTWV0YWRhdGEuVXNlckxhYmVsc0VudHJ5Ug' + 'p1c2VyTGFiZWxzGj0KD1VzZXJMYWJlbHNFbnRyeRIQCgNrZXkYASABKAlSA2tleRIUCgV2YWx1' + 'ZRgCIAEoCVIFdmFsdWU6AjgB'); 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 92d8ec0..2e2bed9 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,9 +1,13 @@ -/// +// // Generated code. Do not modify. // source: google/logging/type/http_request.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + +// 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 import 'dart:core' as $core; @@ -12,96 +16,10 @@ import 'package:protobuf/protobuf.dart' as $pb; import '../../protobuf/duration.pb.dart' as $0; +/// 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. class HttpRequest extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'HttpRequest', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'google.logging.type'), - createEmptyInstance: create) - ..aOS( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'requestMethod') - ..aOS( - 2, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'requestUrl') - ..aInt64( - 3, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'requestSize') - ..a<$core.int>( - 4, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'status', - $pb.PbFieldType.O3) - ..aInt64( - 5, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'responseSize') - ..aOS( - 6, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'userAgent') - ..aOS( - 7, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'remoteIp') - ..aOS( - 8, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'referer') - ..aOB( - 9, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'cacheHit') - ..aOB( - 10, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'cacheValidatedWithOriginServer') - ..aOB( - 11, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'cacheLookup') - ..aInt64( - 12, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'cacheFillBytes') - ..aOS( - 13, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'serverIp') - ..aOM<$0.Duration>( - 14, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'latency', - subBuilder: $0.Duration.create) - ..aOS( - 15, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'protocol') - ..hasRequiredFields = false; - - HttpRequest._() : super(); factory HttpRequest({ $core.String? requestMethod, $core.String? requestUrl, @@ -119,60 +37,85 @@ class HttpRequest extends $pb.GeneratedMessage { $0.Duration? latency, $core.String? protocol, }) { - final _result = create(); + final result = create(); if (requestMethod != null) { - _result.requestMethod = requestMethod; + result.requestMethod = requestMethod; } if (requestUrl != null) { - _result.requestUrl = requestUrl; + result.requestUrl = requestUrl; } if (requestSize != null) { - _result.requestSize = requestSize; + result.requestSize = requestSize; } if (status != null) { - _result.status = status; + result.status = status; } if (responseSize != null) { - _result.responseSize = responseSize; + result.responseSize = responseSize; } if (userAgent != null) { - _result.userAgent = userAgent; + result.userAgent = userAgent; } if (remoteIp != null) { - _result.remoteIp = remoteIp; + result.remoteIp = remoteIp; } if (referer != null) { - _result.referer = referer; + result.referer = referer; } if (cacheHit != null) { - _result.cacheHit = cacheHit; + result.cacheHit = cacheHit; } if (cacheValidatedWithOriginServer != null) { - _result.cacheValidatedWithOriginServer = cacheValidatedWithOriginServer; + result.cacheValidatedWithOriginServer = cacheValidatedWithOriginServer; } if (cacheLookup != null) { - _result.cacheLookup = cacheLookup; + result.cacheLookup = cacheLookup; } if (cacheFillBytes != null) { - _result.cacheFillBytes = cacheFillBytes; + result.cacheFillBytes = cacheFillBytes; } if (serverIp != null) { - _result.serverIp = serverIp; + result.serverIp = serverIp; } if (latency != null) { - _result.latency = latency; + result.latency = latency; } if (protocol != null) { - _result.protocol = protocol; + result.protocol = protocol; } - return _result; + 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); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'HttpRequest', + package: + const $pb.PackageName(_omitMessageNames ? '' : 'google.logging.type'), + createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'requestMethod') + ..aOS(2, _omitFieldNames ? '' : 'requestUrl') + ..aInt64(3, _omitFieldNames ? '' : 'requestSize') + ..a<$core.int>(4, _omitFieldNames ? '' : 'status', $pb.PbFieldType.O3) + ..aInt64(5, _omitFieldNames ? '' : 'responseSize') + ..aOS(6, _omitFieldNames ? '' : 'userAgent') + ..aOS(7, _omitFieldNames ? '' : 'remoteIp') + ..aOS(8, _omitFieldNames ? '' : 'referer') + ..aOB(9, _omitFieldNames ? '' : 'cacheHit') + ..aOB(10, _omitFieldNames ? '' : 'cacheValidatedWithOriginServer') + ..aOB(11, _omitFieldNames ? '' : 'cacheLookup') + ..aInt64(12, _omitFieldNames ? '' : 'cacheFillBytes') + ..aOS(13, _omitFieldNames ? '' : 'serverIp') + ..aOM<$0.Duration>(14, _omitFieldNames ? '' : 'latency', + subBuilder: $0.Duration.create) + ..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') @@ -182,8 +125,10 @@ class HttpRequest extends $pb.GeneratedMessage { 'Will be removed in next major version') HttpRequest copyWith(void Function(HttpRequest) updates) => super.copyWith((message) => updates(message as HttpRequest)) - as HttpRequest; // ignore: deprecated_member_use + as HttpRequest; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static HttpRequest create() => HttpRequest._(); HttpRequest createEmptyInstance() => create(); @@ -193,6 +138,7 @@ class HttpRequest extends $pb.GeneratedMessage { $pb.GeneratedMessage.$_defaultFor(create); static HttpRequest? _defaultInstance; + /// The request method. Examples: `"GET"`, `"HEAD"`, `"PUT"`, `"POST"`. @$pb.TagNumber(1) $core.String get requestMethod => $_getSZ(0); @$pb.TagNumber(1) @@ -205,6 +151,9 @@ class HttpRequest extends $pb.GeneratedMessage { @$pb.TagNumber(1) void clearRequestMethod() => clearField(1); + /// The scheme (http, https), the host name, the path and the query + /// portion of the URL that was requested. + /// Example: `"http://example.com/some/info?color=red"`. @$pb.TagNumber(2) $core.String get requestUrl => $_getSZ(1); @$pb.TagNumber(2) @@ -217,6 +166,8 @@ class HttpRequest extends $pb.GeneratedMessage { @$pb.TagNumber(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) @@ -229,6 +180,8 @@ class HttpRequest extends $pb.GeneratedMessage { @$pb.TagNumber(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) @@ -241,6 +194,8 @@ class HttpRequest extends $pb.GeneratedMessage { @$pb.TagNumber(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) @@ -253,6 +208,9 @@ class HttpRequest extends $pb.GeneratedMessage { @$pb.TagNumber(5) void clearResponseSize() => clearField(5); + /// The user agent sent by the client. Example: + /// `"Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET + /// CLR 1.0.3705)"`. @$pb.TagNumber(6) $core.String get userAgent => $_getSZ(5); @$pb.TagNumber(6) @@ -265,6 +223,9 @@ class HttpRequest extends $pb.GeneratedMessage { @$pb.TagNumber(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: + /// `"192.168.1.1"`, `"10.0.0.1:80"`, `"FE80::0202:B3FF:FE1E:8329"`. @$pb.TagNumber(7) $core.String get remoteIp => $_getSZ(6); @$pb.TagNumber(7) @@ -277,6 +238,9 @@ class HttpRequest extends $pb.GeneratedMessage { @$pb.TagNumber(7) void clearRemoteIp() => clearField(7); + /// The referer URL of the request, as defined in + /// [HTTP/1.1 Header Field + /// Definitions](https://datatracker.ietf.org/doc/html/rfc2616#section-14.36). @$pb.TagNumber(8) $core.String get referer => $_getSZ(7); @$pb.TagNumber(8) @@ -289,6 +253,8 @@ class HttpRequest extends $pb.GeneratedMessage { @$pb.TagNumber(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) @@ -301,6 +267,9 @@ class HttpRequest extends $pb.GeneratedMessage { @$pb.TagNumber(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 + /// True. @$pb.TagNumber(10) $core.bool get cacheValidatedWithOriginServer => $_getBF(9); @$pb.TagNumber(10) @@ -313,6 +282,7 @@ class HttpRequest extends $pb.GeneratedMessage { @$pb.TagNumber(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) @@ -325,6 +295,8 @@ class HttpRequest extends $pb.GeneratedMessage { @$pb.TagNumber(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) @@ -337,6 +309,9 @@ class HttpRequest extends $pb.GeneratedMessage { @$pb.TagNumber(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: + /// `"192.168.1.1"`, `"10.0.0.1:80"`, `"FE80::0202:B3FF:FE1E:8329"`. @$pb.TagNumber(13) $core.String get serverIp => $_getSZ(12); @$pb.TagNumber(13) @@ -349,6 +324,8 @@ class HttpRequest extends $pb.GeneratedMessage { @$pb.TagNumber(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) @@ -363,6 +340,7 @@ class HttpRequest extends $pb.GeneratedMessage { @$pb.TagNumber(14) $0.Duration ensureLatency() => $_ensure(13); + /// Protocol used for the request. Examples: "HTTP/1.1", "HTTP/2", "websocket" @$pb.TagNumber(15) $core.String get protocol => $_getSZ(14); @$pb.TagNumber(15) @@ -375,3 +353,7 @@ class HttpRequest extends $pb.GeneratedMessage { @$pb.TagNumber(15) void clearProtocol() => clearField(15); } + +const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); +const _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 91e9440..fc82b41 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,6 +1,10 @@ -/// +// // Generated code. Do not modify. // source: google/logging/type/http_request.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + +// 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 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 fc1dd8e..8cb06df 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,34 +1,32 @@ -/// +// // Generated code. Do not modify. // source: google/logging/type/http_request.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,deprecated_member_use_from_same_package,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name -import 'dart:core' as $core; +// 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 + import 'dart:convert' as $convert; +import 'dart:core' as $core; import 'dart:typed_data' as $typed_data; @$core.Deprecated('Use httpRequestDescriptor instead') -const HttpRequest$json = const { +const HttpRequest$json = { '1': 'HttpRequest', - '2': const [ - const { - '1': 'request_method', - '3': 1, - '4': 1, - '5': 9, - '10': 'requestMethod' - }, - const {'1': 'request_url', '3': 2, '4': 1, '5': 9, '10': 'requestUrl'}, - const {'1': 'request_size', '3': 3, '4': 1, '5': 3, '10': 'requestSize'}, - const {'1': 'status', '3': 4, '4': 1, '5': 5, '10': 'status'}, - const {'1': 'response_size', '3': 5, '4': 1, '5': 3, '10': 'responseSize'}, - const {'1': 'user_agent', '3': 6, '4': 1, '5': 9, '10': 'userAgent'}, - const {'1': 'remote_ip', '3': 7, '4': 1, '5': 9, '10': 'remoteIp'}, - const {'1': 'server_ip', '3': 13, '4': 1, '5': 9, '10': 'serverIp'}, - const {'1': 'referer', '3': 8, '4': 1, '5': 9, '10': 'referer'}, - const { + '2': [ + {'1': 'request_method', '3': 1, '4': 1, '5': 9, '10': 'requestMethod'}, + {'1': 'request_url', '3': 2, '4': 1, '5': 9, '10': 'requestUrl'}, + {'1': 'request_size', '3': 3, '4': 1, '5': 3, '10': 'requestSize'}, + {'1': 'status', '3': 4, '4': 1, '5': 5, '10': 'status'}, + {'1': 'response_size', '3': 5, '4': 1, '5': 3, '10': 'responseSize'}, + {'1': 'user_agent', '3': 6, '4': 1, '5': 9, '10': 'userAgent'}, + {'1': 'remote_ip', '3': 7, '4': 1, '5': 9, '10': 'remoteIp'}, + {'1': 'server_ip', '3': 13, '4': 1, '5': 9, '10': 'serverIp'}, + {'1': 'referer', '3': 8, '4': 1, '5': 9, '10': 'referer'}, + { '1': 'latency', '3': 14, '4': 1, @@ -36,26 +34,30 @@ const HttpRequest$json = const { '6': '.google.protobuf.Duration', '10': 'latency' }, - const {'1': 'cache_lookup', '3': 11, '4': 1, '5': 8, '10': 'cacheLookup'}, - const {'1': 'cache_hit', '3': 9, '4': 1, '5': 8, '10': 'cacheHit'}, - const { + {'1': 'cache_lookup', '3': 11, '4': 1, '5': 8, '10': 'cacheLookup'}, + {'1': 'cache_hit', '3': 9, '4': 1, '5': 8, '10': 'cacheHit'}, + { '1': 'cache_validated_with_origin_server', '3': 10, '4': 1, '5': 8, '10': 'cacheValidatedWithOriginServer' }, - const { - '1': 'cache_fill_bytes', - '3': 12, - '4': 1, - '5': 3, - '10': 'cacheFillBytes' - }, - const {'1': 'protocol', '3': 15, '4': 1, '5': 9, '10': 'protocol'}, + {'1': 'cache_fill_bytes', '3': 12, '4': 1, '5': 3, '10': 'cacheFillBytes'}, + {'1': 'protocol', '3': 15, '4': 1, '5': 9, '10': 'protocol'}, ], }; /// Descriptor for `HttpRequest`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List httpRequestDescriptor = $convert.base64Decode( - 'CgtIdHRwUmVxdWVzdBIlCg5yZXF1ZXN0X21ldGhvZBgBIAEoCVINcmVxdWVzdE1ldGhvZBIfCgtyZXF1ZXN0X3VybBgCIAEoCVIKcmVxdWVzdFVybBIhCgxyZXF1ZXN0X3NpemUYAyABKANSC3JlcXVlc3RTaXplEhYKBnN0YXR1cxgEIAEoBVIGc3RhdHVzEiMKDXJlc3BvbnNlX3NpemUYBSABKANSDHJlc3BvbnNlU2l6ZRIdCgp1c2VyX2FnZW50GAYgASgJUgl1c2VyQWdlbnQSGwoJcmVtb3RlX2lwGAcgASgJUghyZW1vdGVJcBIbCglzZXJ2ZXJfaXAYDSABKAlSCHNlcnZlcklwEhgKB3JlZmVyZXIYCCABKAlSB3JlZmVyZXISMwoHbGF0ZW5jeRgOIAEoCzIZLmdvb2dsZS5wcm90b2J1Zi5EdXJhdGlvblIHbGF0ZW5jeRIhCgxjYWNoZV9sb29rdXAYCyABKAhSC2NhY2hlTG9va3VwEhsKCWNhY2hlX2hpdBgJIAEoCFIIY2FjaGVIaXQSSgoiY2FjaGVfdmFsaWRhdGVkX3dpdGhfb3JpZ2luX3NlcnZlchgKIAEoCFIeY2FjaGVWYWxpZGF0ZWRXaXRoT3JpZ2luU2VydmVyEigKEGNhY2hlX2ZpbGxfYnl0ZXMYDCABKANSDmNhY2hlRmlsbEJ5dGVzEhoKCHByb3RvY29sGA8gASgJUghwcm90b2NvbA=='); + 'CgtIdHRwUmVxdWVzdBIlCg5yZXF1ZXN0X21ldGhvZBgBIAEoCVINcmVxdWVzdE1ldGhvZBIfCg' + 'tyZXF1ZXN0X3VybBgCIAEoCVIKcmVxdWVzdFVybBIhCgxyZXF1ZXN0X3NpemUYAyABKANSC3Jl' + 'cXVlc3RTaXplEhYKBnN0YXR1cxgEIAEoBVIGc3RhdHVzEiMKDXJlc3BvbnNlX3NpemUYBSABKA' + 'NSDHJlc3BvbnNlU2l6ZRIdCgp1c2VyX2FnZW50GAYgASgJUgl1c2VyQWdlbnQSGwoJcmVtb3Rl' + 'X2lwGAcgASgJUghyZW1vdGVJcBIbCglzZXJ2ZXJfaXAYDSABKAlSCHNlcnZlcklwEhgKB3JlZm' + 'VyZXIYCCABKAlSB3JlZmVyZXISMwoHbGF0ZW5jeRgOIAEoCzIZLmdvb2dsZS5wcm90b2J1Zi5E' + 'dXJhdGlvblIHbGF0ZW5jeRIhCgxjYWNoZV9sb29rdXAYCyABKAhSC2NhY2hlTG9va3VwEhsKCW' + 'NhY2hlX2hpdBgJIAEoCFIIY2FjaGVIaXQSSgoiY2FjaGVfdmFsaWRhdGVkX3dpdGhfb3JpZ2lu' + 'X3NlcnZlchgKIAEoCFIeY2FjaGVWYWxpZGF0ZWRXaXRoT3JpZ2luU2VydmVyEigKEGNhY2hlX2' + 'ZpbGxfYnl0ZXMYDCABKANSDmNhY2hlRmlsbEJ5dGVzEhoKCHByb3RvY29sGA8gASgJUghwcm90' + 'b2NvbA=='); 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 7b5a945..da0684f 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,9 +1,13 @@ -/// +// // Generated code. Do not modify. // source: google/logging/type/log_severity.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + +// 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 import 'dart:core' as $core; 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 b36fcad..f9816c9 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,60 +1,52 @@ -/// +// // Generated code. Do not modify. // source: google/logging/type/log_severity.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name -// ignore_for_file: UNDEFINED_SHOWN_NAME +// 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 + 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. +/// +/// 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 +/// +/// 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 { - static const LogSeverity DEFAULT = LogSeverity._( - 0, - const $core.bool.fromEnvironment('protobuf.omit_enum_names') - ? '' - : 'DEFAULT'); - static const LogSeverity DEBUG = LogSeverity._( - 100, - const $core.bool.fromEnvironment('protobuf.omit_enum_names') - ? '' - : 'DEBUG'); - static const LogSeverity INFO = LogSeverity._( - 200, - const $core.bool.fromEnvironment('protobuf.omit_enum_names') - ? '' - : 'INFO'); - static const LogSeverity NOTICE = LogSeverity._( - 300, - const $core.bool.fromEnvironment('protobuf.omit_enum_names') - ? '' - : 'NOTICE'); - static const LogSeverity WARNING = LogSeverity._( - 400, - const $core.bool.fromEnvironment('protobuf.omit_enum_names') - ? '' - : 'WARNING'); - static const LogSeverity ERROR = LogSeverity._( - 500, - const $core.bool.fromEnvironment('protobuf.omit_enum_names') - ? '' - : 'ERROR'); - static const LogSeverity CRITICAL = LogSeverity._( - 600, - const $core.bool.fromEnvironment('protobuf.omit_enum_names') - ? '' - : 'CRITICAL'); - static const LogSeverity ALERT = LogSeverity._( - 700, - const $core.bool.fromEnvironment('protobuf.omit_enum_names') - ? '' - : 'ALERT'); - static const LogSeverity EMERGENCY = LogSeverity._( - 800, - const $core.bool.fromEnvironment('protobuf.omit_enum_names') - ? '' - : 'EMERGENCY'); + static const LogSeverity DEFAULT = + LogSeverity._(0, _omitEnumNames ? '' : 'DEFAULT'); + static const LogSeverity DEBUG = + LogSeverity._(100, _omitEnumNames ? '' : 'DEBUG'); + static const LogSeverity INFO = + LogSeverity._(200, _omitEnumNames ? '' : 'INFO'); + static const LogSeverity NOTICE = + LogSeverity._(300, _omitEnumNames ? '' : 'NOTICE'); + static const LogSeverity WARNING = + LogSeverity._(400, _omitEnumNames ? '' : 'WARNING'); + static const LogSeverity ERROR = + LogSeverity._(500, _omitEnumNames ? '' : 'ERROR'); + static const LogSeverity CRITICAL = + LogSeverity._(600, _omitEnumNames ? '' : 'CRITICAL'); + static const LogSeverity ALERT = + LogSeverity._(700, _omitEnumNames ? '' : 'ALERT'); + static const LogSeverity EMERGENCY = + LogSeverity._(800, _omitEnumNames ? '' : 'EMERGENCY'); static const $core.List values = [ DEFAULT, @@ -74,3 +66,5 @@ class LogSeverity extends $pb.ProtobufEnum { const LogSeverity._($core.int v, $core.String n) : super(v, n); } + +const _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 48bcaa5..37d3dfd 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,30 +1,36 @@ -/// +// // Generated code. Do not modify. // source: google/logging/type/log_severity.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,deprecated_member_use_from_same_package,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name -import 'dart:core' as $core; +// 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 + import 'dart:convert' as $convert; +import 'dart:core' as $core; import 'dart:typed_data' as $typed_data; @$core.Deprecated('Use logSeverityDescriptor instead') -const LogSeverity$json = const { +const LogSeverity$json = { '1': 'LogSeverity', - '2': const [ - const {'1': 'DEFAULT', '2': 0}, - const {'1': 'DEBUG', '2': 100}, - const {'1': 'INFO', '2': 200}, - const {'1': 'NOTICE', '2': 300}, - const {'1': 'WARNING', '2': 400}, - const {'1': 'ERROR', '2': 500}, - const {'1': 'CRITICAL', '2': 600}, - const {'1': 'ALERT', '2': 700}, - const {'1': 'EMERGENCY', '2': 800}, + '2': [ + {'1': 'DEFAULT', '2': 0}, + {'1': 'DEBUG', '2': 100}, + {'1': 'INFO', '2': 200}, + {'1': 'NOTICE', '2': 300}, + {'1': 'WARNING', '2': 400}, + {'1': 'ERROR', '2': 500}, + {'1': 'CRITICAL', '2': 600}, + {'1': 'ALERT', '2': 700}, + {'1': 'EMERGENCY', '2': 800}, ], }; /// Descriptor for `LogSeverity`. Decode as a `google.protobuf.EnumDescriptorProto`. final $typed_data.Uint8List logSeverityDescriptor = $convert.base64Decode( - 'CgtMb2dTZXZlcml0eRILCgdERUZBVUxUEAASCQoFREVCVUcQZBIJCgRJTkZPEMgBEgsKBk5PVElDRRCsAhIMCgdXQVJOSU5HEJADEgoKBUVSUk9SEPQDEg0KCENSSVRJQ0FMENgEEgoKBUFMRVJUELwFEg4KCUVNRVJHRU5DWRCgBg=='); + 'CgtMb2dTZXZlcml0eRILCgdERUZBVUxUEAASCQoFREVCVUcQZBIJCgRJTkZPEMgBEgsKBk5PVE' + 'lDRRCsAhIMCgdXQVJOSU5HEJADEgoKBUVSUk9SEPQDEg0KCENSSVRJQ0FMENgEEgoKBUFMRVJU' + 'ELwFEg4KCUVNRVJHRU5DWRCgBg=='); 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 b7ce578..e4a7104 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,147 +1,30 @@ -/// +// // Generated code. Do not modify. // source: google/logging/v2/log_entry.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + +// 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 import 'dart:core' as $core; import 'package:fixnum/fixnum.dart' as $fixnum; import 'package:protobuf/protobuf.dart' as $pb; +import '../../api/monitored_resource.pb.dart' as $3; import '../../protobuf/any.pb.dart' as $0; import '../../protobuf/struct.pb.dart' as $1; -import '../type/http_request.pb.dart' as $2; -import '../../api/monitored_resource.pb.dart' as $3; import '../../protobuf/timestamp.pb.dart' as $4; - +import '../type/http_request.pb.dart' as $2; import '../type/log_severity.pbenum.dart' as $5; enum LogEntry_Payload { protoPayload, textPayload, jsonPayload, notSet } +/// An individual entry in a log. class LogEntry extends $pb.GeneratedMessage { - static const $core.Map<$core.int, LogEntry_Payload> _LogEntry_PayloadByTag = { - 2: LogEntry_Payload.protoPayload, - 3: LogEntry_Payload.textPayload, - 6: LogEntry_Payload.jsonPayload, - 0: LogEntry_Payload.notSet - }; - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'LogEntry', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'google.logging.v2'), - createEmptyInstance: create) - ..oo(0, [2, 3, 6]) - ..aOM<$0.Any>( - 2, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'protoPayload', - subBuilder: $0.Any.create) - ..aOS( - 3, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'textPayload') - ..aOS( - 4, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'insertId') - ..aOM<$1.Struct>( - 6, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'jsonPayload', - subBuilder: $1.Struct.create) - ..aOM<$2.HttpRequest>( - 7, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'httpRequest', - subBuilder: $2.HttpRequest.create) - ..aOM<$3.MonitoredResource>( - 8, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'resource', - subBuilder: $3.MonitoredResource.create) - ..aOM<$4.Timestamp>( - 9, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'timestamp', - subBuilder: $4.Timestamp.create) - ..e<$5.LogSeverity>( - 10, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'severity', - $pb.PbFieldType.OE, - defaultOrMaker: $5.LogSeverity.DEFAULT, - valueOf: $5.LogSeverity.valueOf, - enumValues: $5.LogSeverity.values) - ..m<$core.String, $core.String>( - 11, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'labels', - entryClassName: 'LogEntry.LabelsEntry', - keyFieldType: $pb.PbFieldType.OS, - valueFieldType: $pb.PbFieldType.OS, - packageName: const $pb.PackageName('google.logging.v2')) - ..aOS( - 12, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'logName') - ..aOM( - 15, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'operation', - subBuilder: LogEntryOperation.create) - ..aOS( - 22, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'trace') - ..aOM( - 23, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'sourceLocation', - subBuilder: LogEntrySourceLocation.create) - ..aOM<$4.Timestamp>( - 24, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'receiveTimestamp', - subBuilder: $4.Timestamp.create) - ..aOS( - 27, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'spanId') - ..aOB( - 30, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'traceSampled') - ..aOM( - 35, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'split', - subBuilder: LogSplit.create) - ..hasRequiredFields = false; - - LogEntry._() : super(); factory LogEntry({ $0.Any? protoPayload, $core.String? textPayload, @@ -161,66 +44,116 @@ class LogEntry extends $pb.GeneratedMessage { $core.bool? traceSampled, LogSplit? split, }) { - final _result = create(); + final result = create(); if (protoPayload != null) { - _result.protoPayload = protoPayload; + result.protoPayload = protoPayload; } if (textPayload != null) { - _result.textPayload = textPayload; + result.textPayload = textPayload; } if (insertId != null) { - _result.insertId = insertId; + result.insertId = insertId; } if (jsonPayload != null) { - _result.jsonPayload = jsonPayload; + result.jsonPayload = jsonPayload; } if (httpRequest != null) { - _result.httpRequest = httpRequest; + result.httpRequest = httpRequest; } if (resource != null) { - _result.resource = resource; + result.resource = resource; } if (timestamp != null) { - _result.timestamp = timestamp; + result.timestamp = timestamp; } if (severity != null) { - _result.severity = severity; + result.severity = severity; } if (labels != null) { - _result.labels.addAll(labels); + result.labels.addAll(labels); } if (logName != null) { - _result.logName = logName; + result.logName = logName; } if (operation != null) { - _result.operation = operation; + result.operation = operation; } if (trace != null) { - _result.trace = trace; + result.trace = trace; } if (sourceLocation != null) { - _result.sourceLocation = sourceLocation; + result.sourceLocation = sourceLocation; } if (receiveTimestamp != null) { - _result.receiveTimestamp = receiveTimestamp; + result.receiveTimestamp = receiveTimestamp; } if (spanId != null) { - _result.spanId = spanId; + result.spanId = spanId; } if (traceSampled != null) { - _result.traceSampled = traceSampled; + result.traceSampled = traceSampled; } if (split != null) { - _result.split = split; + result.split = split; } - return _result; + 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); + + static const $core.Map<$core.int, LogEntry_Payload> _LogEntry_PayloadByTag = { + 2: LogEntry_Payload.protoPayload, + 3: LogEntry_Payload.textPayload, + 6: LogEntry_Payload.jsonPayload, + 0: LogEntry_Payload.notSet + }; + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'LogEntry', + package: + const $pb.PackageName(_omitMessageNames ? '' : 'google.logging.v2'), + createEmptyInstance: create) + ..oo(0, [2, 3, 6]) + ..aOM<$0.Any>(2, _omitFieldNames ? '' : 'protoPayload', + subBuilder: $0.Any.create) + ..aOS(3, _omitFieldNames ? '' : 'textPayload') + ..aOS(4, _omitFieldNames ? '' : 'insertId') + ..aOM<$1.Struct>(6, _omitFieldNames ? '' : 'jsonPayload', + subBuilder: $1.Struct.create) + ..aOM<$2.HttpRequest>(7, _omitFieldNames ? '' : 'httpRequest', + subBuilder: $2.HttpRequest.create) + ..aOM<$3.MonitoredResource>(8, _omitFieldNames ? '' : 'resource', + 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, + enumValues: $5.LogSeverity.values) + ..m<$core.String, $core.String>(11, _omitFieldNames ? '' : 'labels', + entryClassName: 'LogEntry.LabelsEntry', + keyFieldType: $pb.PbFieldType.OS, + valueFieldType: $pb.PbFieldType.OS, + packageName: const $pb.PackageName('google.logging.v2')) + ..aOS(12, _omitFieldNames ? '' : 'logName') + ..aOM(15, _omitFieldNames ? '' : 'operation', + subBuilder: LogEntryOperation.create) + ..aOS(22, _omitFieldNames ? '' : 'trace') + ..aOM(23, _omitFieldNames ? '' : 'sourceLocation', + subBuilder: LogEntrySourceLocation.create) + ..aOM<$4.Timestamp>(24, _omitFieldNames ? '' : 'receiveTimestamp', + subBuilder: $4.Timestamp.create) + ..aOS(27, _omitFieldNames ? '' : 'spanId') + ..aOB(30, _omitFieldNames ? '' : 'traceSampled') + ..aOM(35, _omitFieldNames ? '' : 'split', + 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') @@ -229,9 +162,10 @@ class LogEntry extends $pb.GeneratedMessage { 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') LogEntry copyWith(void Function(LogEntry) updates) => - super.copyWith((message) => updates(message as LogEntry)) - as LogEntry; // ignore: deprecated_member_use + super.copyWith((message) => updates(message as LogEntry)) as LogEntry; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static LogEntry create() => LogEntry._(); LogEntry createEmptyInstance() => create(); @@ -244,6 +178,14 @@ class LogEntry extends $pb.GeneratedMessage { LogEntry_Payload whichPayload() => _LogEntry_PayloadByTag[$_whichOneof(0)]!; 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 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" @$pb.TagNumber(2) $0.Any get protoPayload => $_getN(0); @$pb.TagNumber(2) @@ -258,6 +200,7 @@ class LogEntry extends $pb.GeneratedMessage { @$pb.TagNumber(2) $0.Any ensureProtoPayload() => $_ensure(0); + /// The log entry payload, represented as a Unicode string (UTF-8). @$pb.TagNumber(3) $core.String get textPayload => $_getSZ(1); @$pb.TagNumber(3) @@ -270,6 +213,17 @@ class LogEntry extends $pb.GeneratedMessage { @$pb.TagNumber(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. + /// + /// 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. @$pb.TagNumber(4) $core.String get insertId => $_getSZ(2); @$pb.TagNumber(4) @@ -282,6 +236,8 @@ class LogEntry extends $pb.GeneratedMessage { @$pb.TagNumber(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) @@ -296,6 +252,8 @@ class LogEntry extends $pb.GeneratedMessage { @$pb.TagNumber(6) $1.Struct ensureJsonPayload() => $_ensure(3); + /// Optional. Information about the HTTP request associated with this log + /// entry, if applicable. @$pb.TagNumber(7) $2.HttpRequest get httpRequest => $_getN(4); @$pb.TagNumber(7) @@ -310,6 +268,11 @@ class LogEntry extends $pb.GeneratedMessage { @$pb.TagNumber(7) $2.HttpRequest ensureHttpRequest() => $_ensure(4); + /// 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. @$pb.TagNumber(8) $3.MonitoredResource get resource => $_getN(5); @$pb.TagNumber(8) @@ -324,6 +287,18 @@ class LogEntry extends $pb.GeneratedMessage { @$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. + /// + /// 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) @@ -338,6 +313,8 @@ class LogEntry extends $pb.GeneratedMessage { @$pb.TagNumber(9) $4.Timestamp ensureTimestamp() => $_ensure(6); + /// Optional. The severity of the log entry. The default value is + /// `LogSeverity.DEFAULT`. @$pb.TagNumber(10) $5.LogSeverity get severity => $_getN(7); @$pb.TagNumber(10) @@ -350,9 +327,46 @@ class LogEntry extends $pb.GeneratedMessage { @$pb.TagNumber(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. + /// + /// 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`. + /// + /// 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); + /// 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]" + /// + /// 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 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. @$pb.TagNumber(12) $core.String get logName => $_getSZ(9); @$pb.TagNumber(12) @@ -365,6 +379,8 @@ class LogEntry extends $pb.GeneratedMessage { @$pb.TagNumber(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) @@ -379,6 +395,15 @@ class LogEntry extends $pb.GeneratedMessage { @$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". + /// + /// 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) @@ -391,6 +416,8 @@ class LogEntry extends $pb.GeneratedMessage { @$pb.TagNumber(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) @@ -405,6 +432,7 @@ class LogEntry extends $pb.GeneratedMessage { @$pb.TagNumber(23) LogEntrySourceLocation ensureSourceLocation() => $_ensure(12); + /// Output only. The time the log entry was received by Logging. @$pb.TagNumber(24) $4.Timestamp get receiveTimestamp => $_getN(13); @$pb.TagNumber(24) @@ -419,6 +447,36 @@ class LogEntry extends $pb.GeneratedMessage { @$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". + /// + /// 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. + /// + /// 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: + /// + /// - `000000000000004a` + /// - `7a2190356c3fc94b` + /// - `0000f00300090021` + /// - `d39223e101960076` @$pb.TagNumber(27) $core.String get spanId => $_getSZ(14); @$pb.TagNumber(27) @@ -431,6 +489,13 @@ class LogEntry extends $pb.GeneratedMessage { @$pb.TagNumber(27) void clearSpanId() => clearField(27); + /// 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. @$pb.TagNumber(30) $core.bool get traceSampled => $_getBF(15); @$pb.TagNumber(30) @@ -443,6 +508,8 @@ class LogEntry extends $pb.GeneratedMessage { @$pb.TagNumber(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) @@ -458,66 +525,49 @@ class LogEntry extends $pb.GeneratedMessage { LogSplit ensureSplit() => $_ensure(16); } +/// Additional information about a potentially long-running operation with which +/// a log entry is associated. class LogEntryOperation extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'LogEntryOperation', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'google.logging.v2'), - createEmptyInstance: create) - ..aOS( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'id') - ..aOS( - 2, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'producer') - ..aOB( - 3, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'first') - ..aOB( - 4, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'last') - ..hasRequiredFields = false; - - LogEntryOperation._() : super(); factory LogEntryOperation({ $core.String? id, $core.String? producer, $core.bool? first, $core.bool? last, }) { - final _result = create(); + final result = create(); if (id != null) { - _result.id = id; + result.id = id; } if (producer != null) { - _result.producer = producer; + result.producer = producer; } if (first != null) { - _result.first = first; + result.first = first; } if (last != null) { - _result.last = last; + result.last = last; } - return _result; + 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); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'LogEntryOperation', + package: + const $pb.PackageName(_omitMessageNames ? '' : 'google.logging.v2'), + createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'id') + ..aOS(2, _omitFieldNames ? '' : 'producer') + ..aOB(3, _omitFieldNames ? '' : 'first') + ..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') @@ -527,8 +577,10 @@ class LogEntryOperation extends $pb.GeneratedMessage { 'Will be removed in next major version') LogEntryOperation copyWith(void Function(LogEntryOperation) updates) => super.copyWith((message) => updates(message as LogEntryOperation)) - as LogEntryOperation; // ignore: deprecated_member_use + as LogEntryOperation; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static LogEntryOperation create() => LogEntryOperation._(); LogEntryOperation createEmptyInstance() => create(); @@ -539,6 +591,8 @@ class LogEntryOperation extends $pb.GeneratedMessage { $pb.GeneratedMessage.$_defaultFor(create); static LogEntryOperation? _defaultInstance; + /// Optional. An arbitrary operation identifier. Log entries with the same + /// identifier are assumed to be part of the same operation. @$pb.TagNumber(1) $core.String get id => $_getSZ(0); @$pb.TagNumber(1) @@ -551,6 +605,9 @@ class LogEntryOperation extends $pb.GeneratedMessage { @$pb.TagNumber(1) void clearId() => clearField(1); + /// Optional. An arbitrary producer identifier. The combination of `id` and + /// `producer` must be globally unique. Examples for `producer`: + /// `"MyDivision.MyBigCompany.com"`, `"github.com/MyProject/MyApplication"`. @$pb.TagNumber(2) $core.String get producer => $_getSZ(1); @$pb.TagNumber(2) @@ -563,6 +620,7 @@ class LogEntryOperation extends $pb.GeneratedMessage { @$pb.TagNumber(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) @@ -575,6 +633,7 @@ class LogEntryOperation extends $pb.GeneratedMessage { @$pb.TagNumber(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) @@ -588,57 +647,44 @@ class LogEntryOperation extends $pb.GeneratedMessage { void clearLast() => clearField(4); } +/// Additional information about the source code location that produced the log +/// entry. class LogEntrySourceLocation extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'LogEntrySourceLocation', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'google.logging.v2'), - createEmptyInstance: create) - ..aOS( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'file') - ..aInt64( - 2, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'line') - ..aOS( - 3, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'function') - ..hasRequiredFields = false; - - LogEntrySourceLocation._() : super(); factory LogEntrySourceLocation({ $core.String? file, $fixnum.Int64? line, $core.String? function, }) { - final _result = create(); + final result = create(); if (file != null) { - _result.file = file; + result.file = file; } if (line != null) { - _result.line = line; + result.line = line; } if (function != null) { - _result.function = function; + result.function = function; } - return _result; + 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); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'LogEntrySourceLocation', + package: + const $pb.PackageName(_omitMessageNames ? '' : 'google.logging.v2'), + createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'file') + ..aInt64(2, _omitFieldNames ? '' : 'line') + ..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') @@ -650,8 +696,10 @@ class LogEntrySourceLocation extends $pb.GeneratedMessage { LogEntrySourceLocation copyWith( void Function(LogEntrySourceLocation) updates) => super.copyWith((message) => updates(message as LogEntrySourceLocation)) - as LogEntrySourceLocation; // ignore: deprecated_member_use + as LogEntrySourceLocation; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static LogEntrySourceLocation create() => LogEntrySourceLocation._(); LogEntrySourceLocation createEmptyInstance() => create(); @@ -662,6 +710,8 @@ class LogEntrySourceLocation extends $pb.GeneratedMessage { $pb.GeneratedMessage.$_defaultFor(create); static LogEntrySourceLocation? _defaultInstance; + /// Optional. Source file name. Depending on the runtime environment, this + /// might be a simple name or a fully-qualified name. @$pb.TagNumber(1) $core.String get file => $_getSZ(0); @$pb.TagNumber(1) @@ -674,6 +724,8 @@ class LogEntrySourceLocation extends $pb.GeneratedMessage { @$pb.TagNumber(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) @@ -686,6 +738,12 @@ class LogEntrySourceLocation extends $pb.GeneratedMessage { @$pb.TagNumber(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 + /// used in contexts such as the logs viewer, where a file and line number are + /// less meaningful. The format can vary by language. For example: + /// `qual.if.ied.Class.method` (Java), `dir/package.func` (Go), `function` + /// (Python). @$pb.TagNumber(3) $core.String get function => $_getSZ(2); @$pb.TagNumber(3) @@ -699,59 +757,45 @@ class LogEntrySourceLocation extends $pb.GeneratedMessage { void clearFunction() => clearField(3); } +/// Additional information used to correlate multiple log entries. Used when a +/// single LogEntry would exceed the Google Cloud Logging size limit and is +/// split across multiple log entries. class LogSplit extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'LogSplit', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'google.logging.v2'), - createEmptyInstance: create) - ..aOS( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'uid') - ..a<$core.int>( - 2, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'index', - $pb.PbFieldType.O3) - ..a<$core.int>( - 3, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'totalSplits', - $pb.PbFieldType.O3) - ..hasRequiredFields = false; - - LogSplit._() : super(); factory LogSplit({ $core.String? uid, $core.int? index, $core.int? totalSplits, }) { - final _result = create(); + final result = create(); if (uid != null) { - _result.uid = uid; + result.uid = uid; } if (index != null) { - _result.index = index; + result.index = index; } if (totalSplits != null) { - _result.totalSplits = totalSplits; + result.totalSplits = totalSplits; } - return _result; + 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); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'LogSplit', + package: + 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) + ..hasRequiredFields = false; + @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') @@ -760,9 +804,10 @@ class LogSplit extends $pb.GeneratedMessage { 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') LogSplit copyWith(void Function(LogSplit) updates) => - super.copyWith((message) => updates(message as LogSplit)) - as LogSplit; // ignore: deprecated_member_use + super.copyWith((message) => updates(message as LogSplit)) as LogSplit; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static LogSplit create() => LogSplit._(); LogSplit createEmptyInstance() => create(); @@ -772,6 +817,9 @@ class LogSplit extends $pb.GeneratedMessage { _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static LogSplit? _defaultInstance; + /// A globally unique identifier for all log entries in a sequence of split log + /// entries. All log entries with the same |LogSplit.uid| are assumed to be + /// part of the same sequence of split log entries. @$pb.TagNumber(1) $core.String get uid => $_getSZ(0); @$pb.TagNumber(1) @@ -784,6 +832,9 @@ class LogSplit extends $pb.GeneratedMessage { @$pb.TagNumber(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 + /// entries. @$pb.TagNumber(2) $core.int get index => $_getIZ(1); @$pb.TagNumber(2) @@ -796,6 +847,7 @@ class LogSplit extends $pb.GeneratedMessage { @$pb.TagNumber(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) @@ -808,3 +860,7 @@ class LogSplit extends $pb.GeneratedMessage { @$pb.TagNumber(3) void clearTotalSplits() => clearField(3); } + +const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); +const _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 2491274..0219522 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,6 +1,10 @@ -/// +// // Generated code. Do not modify. // source: google/logging/v2/log_entry.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + +// 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 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 a152f83..4a54b3d 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,36 +1,33 @@ -/// +// // Generated code. Do not modify. // source: google/logging/v2/log_entry.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,deprecated_member_use_from_same_package,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name -import 'dart:core' as $core; +// 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 + import 'dart:convert' as $convert; +import 'dart:core' as $core; import 'dart:typed_data' as $typed_data; @$core.Deprecated('Use logEntryDescriptor instead') -const LogEntry$json = const { +const LogEntry$json = { '1': 'LogEntry', - '2': const [ - const { - '1': 'log_name', - '3': 12, - '4': 1, - '5': 9, - '8': const {}, - '10': 'logName' - }, - const { + '2': [ + {'1': 'log_name', '3': 12, '4': 1, '5': 9, '8': {}, '10': 'logName'}, + { '1': 'resource', '3': 8, '4': 1, '5': 11, '6': '.google.api.MonitoredResource', - '8': const {}, + '8': {}, '10': 'resource' }, - const { + { '1': 'proto_payload', '3': 2, '4': 1, @@ -39,15 +36,8 @@ const LogEntry$json = const { '9': 0, '10': 'protoPayload' }, - const { - '1': 'text_payload', - '3': 3, - '4': 1, - '5': 9, - '9': 0, - '10': 'textPayload' - }, - const { + {'1': 'text_payload', '3': 3, '4': 1, '5': 9, '9': 0, '10': 'textPayload'}, + { '1': 'json_payload', '3': 6, '4': 1, @@ -56,176 +46,176 @@ const LogEntry$json = const { '9': 0, '10': 'jsonPayload' }, - const { + { '1': 'timestamp', '3': 9, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', - '8': const {}, + '8': {}, '10': 'timestamp' }, - const { + { '1': 'receive_timestamp', '3': 24, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', - '8': const {}, + '8': {}, '10': 'receiveTimestamp' }, - const { + { '1': 'severity', '3': 10, '4': 1, '5': 14, '6': '.google.logging.type.LogSeverity', - '8': const {}, + '8': {}, '10': 'severity' }, - const { - '1': 'insert_id', - '3': 4, - '4': 1, - '5': 9, - '8': const {}, - '10': 'insertId' - }, - const { + {'1': 'insert_id', '3': 4, '4': 1, '5': 9, '8': {}, '10': 'insertId'}, + { '1': 'http_request', '3': 7, '4': 1, '5': 11, '6': '.google.logging.type.HttpRequest', - '8': const {}, + '8': {}, '10': 'httpRequest' }, - const { + { '1': 'labels', '3': 11, '4': 3, '5': 11, '6': '.google.logging.v2.LogEntry.LabelsEntry', - '8': const {}, + '8': {}, '10': 'labels' }, - const { + { '1': 'operation', '3': 15, '4': 1, '5': 11, '6': '.google.logging.v2.LogEntryOperation', - '8': const {}, + '8': {}, '10': 'operation' }, - const {'1': 'trace', '3': 22, '4': 1, '5': 9, '8': const {}, '10': 'trace'}, - const { - '1': 'span_id', - '3': 27, - '4': 1, - '5': 9, - '8': const {}, - '10': 'spanId' - }, - const { + {'1': 'trace', '3': 22, '4': 1, '5': 9, '8': {}, '10': 'trace'}, + {'1': 'span_id', '3': 27, '4': 1, '5': 9, '8': {}, '10': 'spanId'}, + { '1': 'trace_sampled', '3': 30, '4': 1, '5': 8, - '8': const {}, + '8': {}, '10': 'traceSampled' }, - const { + { '1': 'source_location', '3': 23, '4': 1, '5': 11, '6': '.google.logging.v2.LogEntrySourceLocation', - '8': const {}, + '8': {}, '10': 'sourceLocation' }, - const { + { '1': 'split', '3': 35, '4': 1, '5': 11, '6': '.google.logging.v2.LogSplit', - '8': const {}, + '8': {}, '10': 'split' }, ], - '3': const [LogEntry_LabelsEntry$json], - '7': const {}, - '8': const [ - const {'1': 'payload'}, + '3': [LogEntry_LabelsEntry$json], + '7': {}, + '8': [ + {'1': 'payload'}, ], }; @$core.Deprecated('Use logEntryDescriptor instead') -const LogEntry_LabelsEntry$json = const { +const LogEntry_LabelsEntry$json = { '1': 'LabelsEntry', - '2': const [ - const {'1': 'key', '3': 1, '4': 1, '5': 9, '10': 'key'}, - const {'1': 'value', '3': 2, '4': 1, '5': 9, '10': 'value'}, + '2': [ + {'1': 'key', '3': 1, '4': 1, '5': 9, '10': 'key'}, + {'1': 'value', '3': 2, '4': 1, '5': 9, '10': 'value'}, ], - '7': const {'7': true}, + '7': {'7': true}, }; /// Descriptor for `LogEntry`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List logEntryDescriptor = $convert.base64Decode( - 'CghMb2dFbnRyeRIeCghsb2dfbmFtZRgMIAEoCUID4EECUgdsb2dOYW1lEj4KCHJlc291cmNlGAggASgLMh0uZ29vZ2xlLmFwaS5Nb25pdG9yZWRSZXNvdXJjZUID4EECUghyZXNvdXJjZRI7Cg1wcm90b19wYXlsb2FkGAIgASgLMhQuZ29vZ2xlLnByb3RvYnVmLkFueUgAUgxwcm90b1BheWxvYWQSIwoMdGV4dF9wYXlsb2FkGAMgASgJSABSC3RleHRQYXlsb2FkEjwKDGpzb25fcGF5bG9hZBgGIAEoCzIXLmdvb2dsZS5wcm90b2J1Zi5TdHJ1Y3RIAFILanNvblBheWxvYWQSPQoJdGltZXN0YW1wGAkgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcEID4EEBUgl0aW1lc3RhbXASTAoRcmVjZWl2ZV90aW1lc3RhbXAYGCABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wQgPgQQNSEHJlY2VpdmVUaW1lc3RhbXASQQoIc2V2ZXJpdHkYCiABKA4yIC5nb29nbGUubG9nZ2luZy50eXBlLkxvZ1NldmVyaXR5QgPgQQFSCHNldmVyaXR5EiAKCWluc2VydF9pZBgEIAEoCUID4EEBUghpbnNlcnRJZBJICgxodHRwX3JlcXVlc3QYByABKAsyIC5nb29nbGUubG9nZ2luZy50eXBlLkh0dHBSZXF1ZXN0QgPgQQFSC2h0dHBSZXF1ZXN0EkQKBmxhYmVscxgLIAMoCzInLmdvb2dsZS5sb2dnaW5nLnYyLkxvZ0VudHJ5LkxhYmVsc0VudHJ5QgPgQQFSBmxhYmVscxJHCglvcGVyYXRpb24YDyABKAsyJC5nb29nbGUubG9nZ2luZy52Mi5Mb2dFbnRyeU9wZXJhdGlvbkID4EEBUglvcGVyYXRpb24SGQoFdHJhY2UYFiABKAlCA+BBAVIFdHJhY2USHAoHc3Bhbl9pZBgbIAEoCUID4EEBUgZzcGFuSWQSKAoNdHJhY2Vfc2FtcGxlZBgeIAEoCEID4EEBUgx0cmFjZVNhbXBsZWQSVwoPc291cmNlX2xvY2F0aW9uGBcgASgLMikuZ29vZ2xlLmxvZ2dpbmcudjIuTG9nRW50cnlTb3VyY2VMb2NhdGlvbkID4EEBUg5zb3VyY2VMb2NhdGlvbhI2CgVzcGxpdBgjIAEoCzIbLmdvb2dsZS5sb2dnaW5nLnYyLkxvZ1NwbGl0QgPgQQFSBXNwbGl0GjkKC0xhYmVsc0VudHJ5EhAKA2tleRgBIAEoCVIDa2V5EhQKBXZhbHVlGAIgASgJUgV2YWx1ZToCOAE6vQHqQbkBChpsb2dnaW5nLmdvb2dsZWFwaXMuY29tL0xvZxIdcHJvamVjdHMve3Byb2plY3R9L2xvZ3Mve2xvZ30SJ29yZ2FuaXphdGlvbnMve29yZ2FuaXphdGlvbn0vbG9ncy97bG9nfRIbZm9sZGVycy97Zm9sZGVyfS9sb2dzL3tsb2d9EixiaWxsaW5nQWNjb3VudHMve2JpbGxpbmdfYWNjb3VudH0vbG9ncy97bG9nfRoIbG9nX25hbWVCCQoHcGF5bG9hZA=='); + 'CghMb2dFbnRyeRIeCghsb2dfbmFtZRgMIAEoCUID4EECUgdsb2dOYW1lEj4KCHJlc291cmNlGA' + 'ggASgLMh0uZ29vZ2xlLmFwaS5Nb25pdG9yZWRSZXNvdXJjZUID4EECUghyZXNvdXJjZRI7Cg1w' + 'cm90b19wYXlsb2FkGAIgASgLMhQuZ29vZ2xlLnByb3RvYnVmLkFueUgAUgxwcm90b1BheWxvYW' + 'QSIwoMdGV4dF9wYXlsb2FkGAMgASgJSABSC3RleHRQYXlsb2FkEjwKDGpzb25fcGF5bG9hZBgG' + 'IAEoCzIXLmdvb2dsZS5wcm90b2J1Zi5TdHJ1Y3RIAFILanNvblBheWxvYWQSPQoJdGltZXN0YW' + '1wGAkgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcEID4EEBUgl0aW1lc3RhbXASTAoR' + 'cmVjZWl2ZV90aW1lc3RhbXAYGCABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wQgPgQQ' + 'NSEHJlY2VpdmVUaW1lc3RhbXASQQoIc2V2ZXJpdHkYCiABKA4yIC5nb29nbGUubG9nZ2luZy50' + 'eXBlLkxvZ1NldmVyaXR5QgPgQQFSCHNldmVyaXR5EiAKCWluc2VydF9pZBgEIAEoCUID4EEBUg' + 'hpbnNlcnRJZBJICgxodHRwX3JlcXVlc3QYByABKAsyIC5nb29nbGUubG9nZ2luZy50eXBlLkh0' + 'dHBSZXF1ZXN0QgPgQQFSC2h0dHBSZXF1ZXN0EkQKBmxhYmVscxgLIAMoCzInLmdvb2dsZS5sb2' + 'dnaW5nLnYyLkxvZ0VudHJ5LkxhYmVsc0VudHJ5QgPgQQFSBmxhYmVscxJHCglvcGVyYXRpb24Y' + 'DyABKAsyJC5nb29nbGUubG9nZ2luZy52Mi5Mb2dFbnRyeU9wZXJhdGlvbkID4EEBUglvcGVyYX' + 'Rpb24SGQoFdHJhY2UYFiABKAlCA+BBAVIFdHJhY2USHAoHc3Bhbl9pZBgbIAEoCUID4EEBUgZz' + 'cGFuSWQSKAoNdHJhY2Vfc2FtcGxlZBgeIAEoCEID4EEBUgx0cmFjZVNhbXBsZWQSVwoPc291cm' + 'NlX2xvY2F0aW9uGBcgASgLMikuZ29vZ2xlLmxvZ2dpbmcudjIuTG9nRW50cnlTb3VyY2VMb2Nh' + 'dGlvbkID4EEBUg5zb3VyY2VMb2NhdGlvbhI2CgVzcGxpdBgjIAEoCzIbLmdvb2dsZS5sb2dnaW' + '5nLnYyLkxvZ1NwbGl0QgPgQQFSBXNwbGl0GjkKC0xhYmVsc0VudHJ5EhAKA2tleRgBIAEoCVID' + 'a2V5EhQKBXZhbHVlGAIgASgJUgV2YWx1ZToCOAE6vQHqQbkBChpsb2dnaW5nLmdvb2dsZWFwaX' + 'MuY29tL0xvZxIdcHJvamVjdHMve3Byb2plY3R9L2xvZ3Mve2xvZ30SJ29yZ2FuaXphdGlvbnMv' + 'e29yZ2FuaXphdGlvbn0vbG9ncy97bG9nfRIbZm9sZGVycy97Zm9sZGVyfS9sb2dzL3tsb2d9Ei' + 'xiaWxsaW5nQWNjb3VudHMve2JpbGxpbmdfYWNjb3VudH0vbG9ncy97bG9nfRoIbG9nX25hbWVC' + 'CQoHcGF5bG9hZA=='); + @$core.Deprecated('Use logEntryOperationDescriptor instead') -const LogEntryOperation$json = const { +const LogEntryOperation$json = { '1': 'LogEntryOperation', - '2': const [ - const {'1': 'id', '3': 1, '4': 1, '5': 9, '8': const {}, '10': 'id'}, - const { - '1': 'producer', - '3': 2, - '4': 1, - '5': 9, - '8': const {}, - '10': 'producer' - }, - const {'1': 'first', '3': 3, '4': 1, '5': 8, '8': const {}, '10': 'first'}, - const {'1': 'last', '3': 4, '4': 1, '5': 8, '8': const {}, '10': 'last'}, + '2': [ + {'1': 'id', '3': 1, '4': 1, '5': 9, '8': {}, '10': 'id'}, + {'1': 'producer', '3': 2, '4': 1, '5': 9, '8': {}, '10': 'producer'}, + {'1': 'first', '3': 3, '4': 1, '5': 8, '8': {}, '10': 'first'}, + {'1': 'last', '3': 4, '4': 1, '5': 8, '8': {}, '10': 'last'}, ], }; /// Descriptor for `LogEntryOperation`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List logEntryOperationDescriptor = $convert.base64Decode( - 'ChFMb2dFbnRyeU9wZXJhdGlvbhITCgJpZBgBIAEoCUID4EEBUgJpZBIfCghwcm9kdWNlchgCIAEoCUID4EEBUghwcm9kdWNlchIZCgVmaXJzdBgDIAEoCEID4EEBUgVmaXJzdBIXCgRsYXN0GAQgASgIQgPgQQFSBGxhc3Q='); + 'ChFMb2dFbnRyeU9wZXJhdGlvbhITCgJpZBgBIAEoCUID4EEBUgJpZBIfCghwcm9kdWNlchgCIA' + 'EoCUID4EEBUghwcm9kdWNlchIZCgVmaXJzdBgDIAEoCEID4EEBUgVmaXJzdBIXCgRsYXN0GAQg' + 'ASgIQgPgQQFSBGxhc3Q='); + @$core.Deprecated('Use logEntrySourceLocationDescriptor instead') -const LogEntrySourceLocation$json = const { +const LogEntrySourceLocation$json = { '1': 'LogEntrySourceLocation', - '2': const [ - const {'1': 'file', '3': 1, '4': 1, '5': 9, '8': const {}, '10': 'file'}, - const {'1': 'line', '3': 2, '4': 1, '5': 3, '8': const {}, '10': 'line'}, - const { - '1': 'function', - '3': 3, - '4': 1, - '5': 9, - '8': const {}, - '10': 'function' - }, + '2': [ + {'1': 'file', '3': 1, '4': 1, '5': 9, '8': {}, '10': 'file'}, + {'1': 'line', '3': 2, '4': 1, '5': 3, '8': {}, '10': 'line'}, + {'1': 'function', '3': 3, '4': 1, '5': 9, '8': {}, '10': 'function'}, ], }; /// Descriptor for `LogEntrySourceLocation`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List logEntrySourceLocationDescriptor = - $convert.base64Decode( - 'ChZMb2dFbnRyeVNvdXJjZUxvY2F0aW9uEhcKBGZpbGUYASABKAlCA+BBAVIEZmlsZRIXCgRsaW5lGAIgASgDQgPgQQFSBGxpbmUSHwoIZnVuY3Rpb24YAyABKAlCA+BBAVIIZnVuY3Rpb24='); +final $typed_data.Uint8List logEntrySourceLocationDescriptor = $convert.base64Decode( + 'ChZMb2dFbnRyeVNvdXJjZUxvY2F0aW9uEhcKBGZpbGUYASABKAlCA+BBAVIEZmlsZRIXCgRsaW' + '5lGAIgASgDQgPgQQFSBGxpbmUSHwoIZnVuY3Rpb24YAyABKAlCA+BBAVIIZnVuY3Rpb24='); + @$core.Deprecated('Use logSplitDescriptor instead') -const LogSplit$json = const { +const LogSplit$json = { '1': 'LogSplit', - '2': const [ - const {'1': 'uid', '3': 1, '4': 1, '5': 9, '10': 'uid'}, - const {'1': 'index', '3': 2, '4': 1, '5': 5, '10': 'index'}, - const {'1': 'total_splits', '3': 3, '4': 1, '5': 5, '10': 'totalSplits'}, + '2': [ + {'1': 'uid', '3': 1, '4': 1, '5': 9, '10': 'uid'}, + {'1': 'index', '3': 2, '4': 1, '5': 5, '10': 'index'}, + {'1': 'total_splits', '3': 3, '4': 1, '5': 5, '10': 'totalSplits'}, ], }; /// Descriptor for `LogSplit`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List logSplitDescriptor = $convert.base64Decode( - 'CghMb2dTcGxpdBIQCgN1aWQYASABKAlSA3VpZBIUCgVpbmRleBgCIAEoBVIFaW5kZXgSIQoMdG90YWxfc3BsaXRzGAMgASgFUgt0b3RhbFNwbGl0cw=='); + 'CghMb2dTcGxpdBIQCgN1aWQYASABKAlSA3VpZBIUCgVpbmRleBgCIAEoBVIFaW5kZXgSIQoMdG' + '90YWxfc3BsaXRzGAMgASgFUgt0b3RhbFNwbGl0cw=='); 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 4e8db15..0346160 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,56 +1,53 @@ -/// +// // Generated code. Do not modify. // source: google/logging/v2/logging.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + +// 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 import 'dart:core' as $core; import 'package:protobuf/protobuf.dart' as $pb; import '../../api/monitored_resource.pb.dart' as $2; -import 'log_entry.pb.dart' as $3; -import '../../rpc/status.pb.dart' as $4; import '../../protobuf/duration.pb.dart' as $5; - +import '../../rpc/status.pb.dart' as $4; +import 'log_entry.pb.dart' as $3; import 'logging.pbenum.dart'; export 'logging.pbenum.dart'; +/// The parameters to DeleteLog. class DeleteLogRequest extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'DeleteLogRequest', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'google.logging.v2'), - createEmptyInstance: create) - ..aOS( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'logName') - ..hasRequiredFields = false; - - DeleteLogRequest._() : super(); factory DeleteLogRequest({ $core.String? logName, }) { - final _result = create(); + final result = create(); if (logName != null) { - _result.logName = logName; + result.logName = logName; } - return _result; + 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); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'DeleteLogRequest', + package: + const $pb.PackageName(_omitMessageNames ? '' : 'google.logging.v2'), + createEmptyInstance: create) + ..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') @@ -60,8 +57,10 @@ class DeleteLogRequest extends $pb.GeneratedMessage { 'Will be removed in next major version') DeleteLogRequest copyWith(void Function(DeleteLogRequest) updates) => super.copyWith((message) => updates(message as DeleteLogRequest)) - as DeleteLogRequest; // ignore: deprecated_member_use + as DeleteLogRequest; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static DeleteLogRequest create() => DeleteLogRequest._(); DeleteLogRequest createEmptyInstance() => create(); @@ -72,6 +71,19 @@ class DeleteLogRequest extends $pb.GeneratedMessage { $pb.GeneratedMessage.$_defaultFor(create); static DeleteLogRequest? _defaultInstance; + /// 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]` + /// + /// `[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]. @$pb.TagNumber(1) $core.String get logName => $_getSZ(0); @$pb.TagNumber(1) @@ -85,56 +97,8 @@ class DeleteLogRequest extends $pb.GeneratedMessage { void clearLogName() => clearField(1); } +/// The parameters to WriteLogEntries. class WriteLogEntriesRequest extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'WriteLogEntriesRequest', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'google.logging.v2'), - createEmptyInstance: create) - ..aOS( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'logName') - ..aOM<$2.MonitoredResource>( - 2, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'resource', - subBuilder: $2.MonitoredResource.create) - ..m<$core.String, $core.String>( - 3, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'labels', - entryClassName: 'WriteLogEntriesRequest.LabelsEntry', - keyFieldType: $pb.PbFieldType.OS, - valueFieldType: $pb.PbFieldType.OS, - packageName: const $pb.PackageName('google.logging.v2')) - ..pc<$3.LogEntry>( - 4, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'entries', - $pb.PbFieldType.PM, - subBuilder: $3.LogEntry.create) - ..aOB( - 5, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'partialSuccess') - ..aOB( - 6, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'dryRun') - ..hasRequiredFields = false; - - WriteLogEntriesRequest._() : super(); factory WriteLogEntriesRequest({ $core.String? logName, $2.MonitoredResource? resource, @@ -143,33 +107,54 @@ class WriteLogEntriesRequest extends $pb.GeneratedMessage { $core.bool? partialSuccess, $core.bool? dryRun, }) { - final _result = create(); + final result = create(); if (logName != null) { - _result.logName = logName; + result.logName = logName; } if (resource != null) { - _result.resource = resource; + result.resource = resource; } if (labels != null) { - _result.labels.addAll(labels); + result.labels.addAll(labels); } if (entries != null) { - _result.entries.addAll(entries); + result.entries.addAll(entries); } if (partialSuccess != null) { - _result.partialSuccess = partialSuccess; + result.partialSuccess = partialSuccess; } if (dryRun != null) { - _result.dryRun = dryRun; + result.dryRun = dryRun; } - return _result; + 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); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'WriteLogEntriesRequest', + package: + const $pb.PackageName(_omitMessageNames ? '' : 'google.logging.v2'), + createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'logName') + ..aOM<$2.MonitoredResource>(2, _omitFieldNames ? '' : 'resource', + subBuilder: $2.MonitoredResource.create) + ..m<$core.String, $core.String>(3, _omitFieldNames ? '' : 'labels', + entryClassName: 'WriteLogEntriesRequest.LabelsEntry', + keyFieldType: $pb.PbFieldType.OS, + valueFieldType: $pb.PbFieldType.OS, + packageName: const $pb.PackageName('google.logging.v2')) + ..pc<$3.LogEntry>(4, _omitFieldNames ? '' : 'entries', $pb.PbFieldType.PM, + 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') @@ -181,8 +166,10 @@ class WriteLogEntriesRequest extends $pb.GeneratedMessage { WriteLogEntriesRequest copyWith( void Function(WriteLogEntriesRequest) updates) => super.copyWith((message) => updates(message as WriteLogEntriesRequest)) - as WriteLogEntriesRequest; // ignore: deprecated_member_use + as WriteLogEntriesRequest; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static WriteLogEntriesRequest create() => WriteLogEntriesRequest._(); WriteLogEntriesRequest createEmptyInstance() => create(); @@ -193,6 +180,23 @@ 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`: + /// + /// * `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" + /// + /// 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) @@ -205,6 +209,14 @@ class WriteLogEntriesRequest extends $pb.GeneratedMessage { @$pb.TagNumber(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: + /// + /// { "type": "gce_instance", + /// "labels": { + /// "zone": "us-central1-a", "instance_id": "00000000000000000000" }} + /// + /// See [LogEntry][google.logging.v2.LogEntry]. @$pb.TagNumber(2) $2.MonitoredResource get resource => $_getN(1); @$pb.TagNumber(2) @@ -219,12 +231,47 @@ class WriteLogEntriesRequest extends $pb.GeneratedMessage { @$pb.TagNumber(2) $2.MonitoredResource ensureResource() => $_ensure(1); + /// Optional. Default labels that are added to the `labels` field of all log + /// entries in `entries`. If a log entry already has a label with the same key + /// 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. + /// + /// 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). + /// + /// 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); + /// 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 + /// PERMISSION_DENIED. If any entry failed, then the response status is the + /// response status of one of the failed entries. The response will include + /// error details in `WriteLogEntriesPartialErrors.log_entry_errors` keyed by + /// the entries' zero-based index in the `entries`. Failed requests for which + /// no entries are written will not include per-entry errors. @$pb.TagNumber(5) $core.bool get partialSuccess => $_getBF(4); @$pb.TagNumber(5) @@ -237,6 +284,9 @@ class WriteLogEntriesRequest extends $pb.GeneratedMessage { @$pb.TagNumber(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 + /// logging API endpoints are working properly before sending valuable data. @$pb.TagNumber(6) $core.bool get dryRun => $_getBF(5); @$pb.TagNumber(6) @@ -250,26 +300,24 @@ class WriteLogEntriesRequest extends $pb.GeneratedMessage { void clearDryRun() => clearField(6); } +/// Result returned from WriteLogEntries. class WriteLogEntriesResponse extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'WriteLogEntriesResponse', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'google.logging.v2'), - createEmptyInstance: create) - ..hasRequiredFields = false; - - WriteLogEntriesResponse._() : super(); 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); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'WriteLogEntriesResponse', + package: + const $pb.PackageName(_omitMessageNames ? '' : 'google.logging.v2'), + 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') @@ -281,8 +329,10 @@ class WriteLogEntriesResponse extends $pb.GeneratedMessage { WriteLogEntriesResponse copyWith( void Function(WriteLogEntriesResponse) updates) => super.copyWith((message) => updates(message as WriteLogEntriesResponse)) - as WriteLogEntriesResponse; // ignore: deprecated_member_use + as WriteLogEntriesResponse; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static WriteLogEntriesResponse create() => WriteLogEntriesResponse._(); WriteLogEntriesResponse createEmptyInstance() => create(); @@ -294,44 +344,39 @@ class WriteLogEntriesResponse extends $pb.GeneratedMessage { static WriteLogEntriesResponse? _defaultInstance; } +/// Error details for WriteLogEntries with partial success. class WriteLogEntriesPartialErrors extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'WriteLogEntriesPartialErrors', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'google.logging.v2'), - createEmptyInstance: create) - ..m<$core.int, $4.Status>( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'logEntryErrors', - entryClassName: 'WriteLogEntriesPartialErrors.LogEntryErrorsEntry', - keyFieldType: $pb.PbFieldType.O3, - valueFieldType: $pb.PbFieldType.OM, - valueCreator: $4.Status.create, - packageName: const $pb.PackageName('google.logging.v2')) - ..hasRequiredFields = false; - - WriteLogEntriesPartialErrors._() : super(); factory WriteLogEntriesPartialErrors({ $core.Map<$core.int, $4.Status>? logEntryErrors, }) { - final _result = create(); + final result = create(); if (logEntryErrors != null) { - _result.logEntryErrors.addAll(logEntryErrors); + result.logEntryErrors.addAll(logEntryErrors); } - return _result; + 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); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'WriteLogEntriesPartialErrors', + package: + const $pb.PackageName(_omitMessageNames ? '' : 'google.logging.v2'), + createEmptyInstance: create) + ..m<$core.int, $4.Status>(1, _omitFieldNames ? '' : 'logEntryErrors', + entryClassName: 'WriteLogEntriesPartialErrors.LogEntryErrorsEntry', + keyFieldType: $pb.PbFieldType.O3, + valueFieldType: $pb.PbFieldType.OM, + valueCreator: $4.Status.create, + valueDefaultOrMaker: $4.Status.getDefault, + 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') @@ -344,8 +389,10 @@ class WriteLogEntriesPartialErrors extends $pb.GeneratedMessage { void Function(WriteLogEntriesPartialErrors) updates) => super.copyWith( (message) => updates(message as WriteLogEntriesPartialErrors)) - as WriteLogEntriesPartialErrors; // ignore: deprecated_member_use + as WriteLogEntriesPartialErrors; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static WriteLogEntriesPartialErrors create() => WriteLogEntriesPartialErrors._(); @@ -357,49 +404,18 @@ 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`. + /// + /// 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); } +/// The parameters to `ListLogEntries`. class ListLogEntriesRequest extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'ListLogEntriesRequest', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'google.logging.v2'), - createEmptyInstance: create) - ..aOS( - 2, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'filter') - ..aOS( - 3, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'orderBy') - ..a<$core.int>( - 4, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'pageSize', - $pb.PbFieldType.O3) - ..aOS( - 5, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'pageToken') - ..pPS( - 8, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'resourceNames') - ..hasRequiredFields = false; - - ListLogEntriesRequest._() : super(); factory ListLogEntriesRequest({ $core.String? filter, $core.String? orderBy, @@ -407,30 +423,44 @@ class ListLogEntriesRequest extends $pb.GeneratedMessage { $core.String? pageToken, $core.Iterable<$core.String>? resourceNames, }) { - final _result = create(); + final result = create(); if (filter != null) { - _result.filter = filter; + result.filter = filter; } if (orderBy != null) { - _result.orderBy = orderBy; + result.orderBy = orderBy; } if (pageSize != null) { - _result.pageSize = pageSize; + result.pageSize = pageSize; } if (pageToken != null) { - _result.pageToken = pageToken; + result.pageToken = pageToken; } if (resourceNames != null) { - _result.resourceNames.addAll(resourceNames); + result.resourceNames.addAll(resourceNames); } - return _result; + 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); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'ListLogEntriesRequest', + package: + const $pb.PackageName(_omitMessageNames ? '' : 'google.logging.v2'), + createEmptyInstance: create) + ..aOS(2, _omitFieldNames ? '' : 'filter') + ..aOS(3, _omitFieldNames ? '' : 'orderBy') + ..a<$core.int>(4, _omitFieldNames ? '' : 'pageSize', $pb.PbFieldType.O3) + ..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') @@ -442,8 +472,10 @@ class ListLogEntriesRequest extends $pb.GeneratedMessage { ListLogEntriesRequest copyWith( void Function(ListLogEntriesRequest) updates) => super.copyWith((message) => updates(message as ListLogEntriesRequest)) - as ListLogEntriesRequest; // ignore: deprecated_member_use + as ListLogEntriesRequest; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static ListLogEntriesRequest create() => ListLogEntriesRequest._(); ListLogEntriesRequest createEmptyInstance() => create(); @@ -454,6 +486,11 @@ class ListLogEntriesRequest extends $pb.GeneratedMessage { $pb.GeneratedMessage.$_defaultFor(create); static ListLogEntriesRequest? _defaultInstance; + /// Optional. Only log entries that match the filter are returned. An empty + /// filter matches all log entries in the resources listed in `resource_names`. + /// Referencing a parent resource that is not listed in `resource_names` will + /// cause the filter to return no results. The maximum length of a filter is + /// 20,000 characters. @$pb.TagNumber(2) $core.String get filter => $_getSZ(0); @$pb.TagNumber(2) @@ -466,6 +503,12 @@ class ListLogEntriesRequest extends $pb.GeneratedMessage { @$pb.TagNumber(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 + /// option returns entries in order of increasing values of + /// `LogEntry.timestamp` (oldest first), and the second option returns entries + /// in order of decreasing timestamps (newest first). Entries with equal + /// timestamps are returned in order of their `insert_id` values. @$pb.TagNumber(3) $core.String get orderBy => $_getSZ(1); @$pb.TagNumber(3) @@ -478,6 +521,10 @@ class ListLogEntriesRequest extends $pb.GeneratedMessage { @$pb.TagNumber(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 + /// rejected. The presence of `next_page_token` in the response indicates that + /// more results might be available. @$pb.TagNumber(4) $core.int get pageSize => $_getIZ(2); @$pb.TagNumber(4) @@ -490,6 +537,10 @@ class ListLogEntriesRequest extends $pb.GeneratedMessage { @$pb.TagNumber(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 + /// `next_page_token` from the previous response. The values of other method + /// parameters should be identical to those in the previous call. @$pb.TagNumber(5) $core.String get pageToken => $_getSZ(3); @$pb.TagNumber(5) @@ -502,54 +553,60 @@ class ListLogEntriesRequest extends $pb.GeneratedMessage { @$pb.TagNumber(5) void clearPageToken() => clearField(5); + /// 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]` + /// + /// 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 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); } +/// Result returned from `ListLogEntries`. class ListLogEntriesResponse extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'ListLogEntriesResponse', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'google.logging.v2'), - createEmptyInstance: create) - ..pc<$3.LogEntry>( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'entries', - $pb.PbFieldType.PM, - subBuilder: $3.LogEntry.create) - ..aOS( - 2, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'nextPageToken') - ..hasRequiredFields = false; - - ListLogEntriesResponse._() : super(); factory ListLogEntriesResponse({ $core.Iterable<$3.LogEntry>? entries, $core.String? nextPageToken, }) { - final _result = create(); + final result = create(); if (entries != null) { - _result.entries.addAll(entries); + result.entries.addAll(entries); } if (nextPageToken != null) { - _result.nextPageToken = nextPageToken; + result.nextPageToken = nextPageToken; } - return _result; + 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); + + 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, + 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') @@ -561,8 +618,10 @@ class ListLogEntriesResponse extends $pb.GeneratedMessage { ListLogEntriesResponse copyWith( void Function(ListLogEntriesResponse) updates) => super.copyWith((message) => updates(message as ListLogEntriesResponse)) - as ListLogEntriesResponse; // ignore: deprecated_member_use + as ListLogEntriesResponse; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static ListLogEntriesResponse create() => ListLogEntriesResponse._(); ListLogEntriesResponse createEmptyInstance() => create(); @@ -573,9 +632,22 @@ class ListLogEntriesResponse extends $pb.GeneratedMessage { $pb.GeneratedMessage.$_defaultFor(create); static ListLogEntriesResponse? _defaultInstance; + /// A list of log entries. If `entries` is empty, `nextPageToken` may still be + /// returned, indicating that more entries may exist. See `nextPageToken` for + /// more information. @$pb.TagNumber(1) $core.List<$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 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) @@ -589,43 +661,22 @@ class ListLogEntriesResponse extends $pb.GeneratedMessage { void clearNextPageToken() => clearField(2); } +/// The parameters to ListMonitoredResourceDescriptors class ListMonitoredResourceDescriptorsRequest extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'ListMonitoredResourceDescriptorsRequest', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'google.logging.v2'), - createEmptyInstance: create) - ..a<$core.int>( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'pageSize', - $pb.PbFieldType.O3) - ..aOS( - 2, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'pageToken') - ..hasRequiredFields = false; - - ListMonitoredResourceDescriptorsRequest._() : super(); factory ListMonitoredResourceDescriptorsRequest({ $core.int? pageSize, $core.String? pageToken, }) { - final _result = create(); + final result = create(); if (pageSize != null) { - _result.pageSize = pageSize; + result.pageSize = pageSize; } if (pageToken != null) { - _result.pageToken = pageToken; + result.pageToken = pageToken; } - return _result; + return result; } + ListMonitoredResourceDescriptorsRequest._() : super(); factory ListMonitoredResourceDescriptorsRequest.fromBuffer( $core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => @@ -633,6 +684,16 @@ class ListMonitoredResourceDescriptorsRequest extends $pb.GeneratedMessage { factory ListMonitoredResourceDescriptorsRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + 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) + ..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') @@ -645,8 +706,10 @@ class ListMonitoredResourceDescriptorsRequest extends $pb.GeneratedMessage { void Function(ListMonitoredResourceDescriptorsRequest) updates) => super.copyWith((message) => updates(message as ListMonitoredResourceDescriptorsRequest)) - as ListMonitoredResourceDescriptorsRequest; // ignore: deprecated_member_use + as ListMonitoredResourceDescriptorsRequest; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static ListMonitoredResourceDescriptorsRequest create() => ListMonitoredResourceDescriptorsRequest._(); @@ -659,6 +722,9 @@ class ListMonitoredResourceDescriptorsRequest extends $pb.GeneratedMessage { ListMonitoredResourceDescriptorsRequest>(create); static ListMonitoredResourceDescriptorsRequest? _defaultInstance; + /// Optional. The maximum number of results to return from this request. + /// Non-positive values are ignored. The presence of `nextPageToken` in the + /// response indicates that more results might be available. @$pb.TagNumber(1) $core.int get pageSize => $_getIZ(0); @$pb.TagNumber(1) @@ -671,6 +737,10 @@ class ListMonitoredResourceDescriptorsRequest extends $pb.GeneratedMessage { @$pb.TagNumber(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 + /// `nextPageToken` from the previous response. The values of other method + /// parameters should be identical to those in the previous call. @$pb.TagNumber(2) $core.String get pageToken => $_getSZ(1); @$pb.TagNumber(2) @@ -684,44 +754,22 @@ class ListMonitoredResourceDescriptorsRequest extends $pb.GeneratedMessage { void clearPageToken() => clearField(2); } +/// Result returned from ListMonitoredResourceDescriptors. class ListMonitoredResourceDescriptorsResponse extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'ListMonitoredResourceDescriptorsResponse', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'google.logging.v2'), - createEmptyInstance: create) - ..pc<$2.MonitoredResourceDescriptor>( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'resourceDescriptors', - $pb.PbFieldType.PM, - subBuilder: $2.MonitoredResourceDescriptor.create) - ..aOS( - 2, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'nextPageToken') - ..hasRequiredFields = false; - - ListMonitoredResourceDescriptorsResponse._() : super(); factory ListMonitoredResourceDescriptorsResponse({ $core.Iterable<$2.MonitoredResourceDescriptor>? resourceDescriptors, $core.String? nextPageToken, }) { - final _result = create(); + final result = create(); if (resourceDescriptors != null) { - _result.resourceDescriptors.addAll(resourceDescriptors); + result.resourceDescriptors.addAll(resourceDescriptors); } if (nextPageToken != null) { - _result.nextPageToken = nextPageToken; + result.nextPageToken = nextPageToken; } - return _result; + return result; } + ListMonitoredResourceDescriptorsResponse._() : super(); factory ListMonitoredResourceDescriptorsResponse.fromBuffer( $core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => @@ -729,6 +777,18 @@ class ListMonitoredResourceDescriptorsResponse extends $pb.GeneratedMessage { factory ListMonitoredResourceDescriptorsResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + 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, + 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') @@ -741,8 +801,10 @@ class ListMonitoredResourceDescriptorsResponse extends $pb.GeneratedMessage { void Function(ListMonitoredResourceDescriptorsResponse) updates) => super.copyWith((message) => updates(message as ListMonitoredResourceDescriptorsResponse)) - as ListMonitoredResourceDescriptorsResponse; // ignore: deprecated_member_use + as ListMonitoredResourceDescriptorsResponse; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static ListMonitoredResourceDescriptorsResponse create() => ListMonitoredResourceDescriptorsResponse._(); @@ -756,10 +818,14 @@ class ListMonitoredResourceDescriptorsResponse extends $pb.GeneratedMessage { ListMonitoredResourceDescriptorsResponse>(create); static ListMonitoredResourceDescriptorsResponse? _defaultInstance; + /// A list of resource descriptors. @$pb.TagNumber(1) $core.List<$2.MonitoredResourceDescriptor> get resourceDescriptors => $_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`. @$pb.TagNumber(2) $core.String get nextPageToken => $_getSZ(1); @$pb.TagNumber(2) @@ -773,67 +839,48 @@ class ListMonitoredResourceDescriptorsResponse extends $pb.GeneratedMessage { void clearNextPageToken() => clearField(2); } +/// The parameters to ListLogs. class ListLogsRequest extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'ListLogsRequest', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'google.logging.v2'), - createEmptyInstance: create) - ..aOS( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'parent') - ..a<$core.int>( - 2, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'pageSize', - $pb.PbFieldType.O3) - ..aOS( - 3, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'pageToken') - ..pPS( - 8, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'resourceNames') - ..hasRequiredFields = false; - - ListLogsRequest._() : super(); factory ListLogsRequest({ $core.String? parent, $core.int? pageSize, $core.String? pageToken, $core.Iterable<$core.String>? resourceNames, }) { - final _result = create(); + final result = create(); if (parent != null) { - _result.parent = parent; + result.parent = parent; } if (pageSize != null) { - _result.pageSize = pageSize; + result.pageSize = pageSize; } if (pageToken != null) { - _result.pageToken = pageToken; + result.pageToken = pageToken; } if (resourceNames != null) { - _result.resourceNames.addAll(resourceNames); + result.resourceNames.addAll(resourceNames); } - return _result; + 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); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'ListLogsRequest', + package: + const $pb.PackageName(_omitMessageNames ? '' : 'google.logging.v2'), + createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'parent') + ..a<$core.int>(2, _omitFieldNames ? '' : 'pageSize', $pb.PbFieldType.O3) + ..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') @@ -843,8 +890,10 @@ class ListLogsRequest extends $pb.GeneratedMessage { 'Will be removed in next major version') ListLogsRequest copyWith(void Function(ListLogsRequest) updates) => super.copyWith((message) => updates(message as ListLogsRequest)) - as ListLogsRequest; // ignore: deprecated_member_use + as ListLogsRequest; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static ListLogsRequest create() => ListLogsRequest._(); ListLogsRequest createEmptyInstance() => create(); @@ -855,6 +904,12 @@ class ListLogsRequest extends $pb.GeneratedMessage { $pb.GeneratedMessage.$_defaultFor(create); static ListLogsRequest? _defaultInstance; + /// Required. The resource name to list logs for: + /// + /// * `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) @@ -867,6 +922,9 @@ class ListLogsRequest extends $pb.GeneratedMessage { @$pb.TagNumber(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 + /// response indicates that more results might be available. @$pb.TagNumber(2) $core.int get pageSize => $_getIZ(1); @$pb.TagNumber(2) @@ -879,6 +937,10 @@ class ListLogsRequest extends $pb.GeneratedMessage { @$pb.TagNumber(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 + /// `nextPageToken` from the previous response. The values of other method + /// parameters should be identical to those in the previous call. @$pb.TagNumber(3) $core.String get pageToken => $_getSZ(2); @$pb.TagNumber(3) @@ -891,52 +953,57 @@ class ListLogsRequest extends $pb.GeneratedMessage { @$pb.TagNumber(3) void clearPageToken() => clearField(3); + /// 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]` + /// + /// To support legacy queries, it could also be: + /// + /// * `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. @$pb.TagNumber(8) $core.List<$core.String> get resourceNames => $_getList(3); } +/// Result returned from ListLogs. class ListLogsResponse extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'ListLogsResponse', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'google.logging.v2'), - createEmptyInstance: create) - ..aOS( - 2, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'nextPageToken') - ..pPS( - 3, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'logNames') - ..hasRequiredFields = false; - - ListLogsResponse._() : super(); factory ListLogsResponse({ $core.String? nextPageToken, $core.Iterable<$core.String>? logNames, }) { - final _result = create(); + final result = create(); if (nextPageToken != null) { - _result.nextPageToken = nextPageToken; + result.nextPageToken = nextPageToken; } if (logNames != null) { - _result.logNames.addAll(logNames); + result.logNames.addAll(logNames); } - return _result; + 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); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'ListLogsResponse', + package: + const $pb.PackageName(_omitMessageNames ? '' : 'google.logging.v2'), + createEmptyInstance: create) + ..aOS(2, _omitFieldNames ? '' : 'nextPageToken') + ..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') @@ -946,8 +1013,10 @@ class ListLogsResponse extends $pb.GeneratedMessage { 'Will be removed in next major version') ListLogsResponse copyWith(void Function(ListLogsResponse) updates) => super.copyWith((message) => updates(message as ListLogsResponse)) - as ListLogsResponse; // ignore: deprecated_member_use + as ListLogsResponse; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static ListLogsResponse create() => ListLogsResponse._(); ListLogsResponse createEmptyInstance() => create(); @@ -958,6 +1027,9 @@ class ListLogsResponse extends $pb.GeneratedMessage { $pb.GeneratedMessage.$_defaultFor(create); static ListLogsResponse? _defaultInstance; + /// 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`. @$pb.TagNumber(2) $core.String get nextPageToken => $_getSZ(0); @$pb.TagNumber(2) @@ -970,62 +1042,51 @@ class ListLogsResponse extends $pb.GeneratedMessage { @$pb.TagNumber(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); } +/// The parameters to `TailLogEntries`. class TailLogEntriesRequest extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'TailLogEntriesRequest', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'google.logging.v2'), - createEmptyInstance: create) - ..pPS( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'resourceNames') - ..aOS( - 2, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'filter') - ..aOM<$5.Duration>( - 3, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'bufferWindow', - subBuilder: $5.Duration.create) - ..hasRequiredFields = false; - - TailLogEntriesRequest._() : super(); factory TailLogEntriesRequest({ $core.Iterable<$core.String>? resourceNames, $core.String? filter, $5.Duration? bufferWindow, }) { - final _result = create(); + final result = create(); if (resourceNames != null) { - _result.resourceNames.addAll(resourceNames); + result.resourceNames.addAll(resourceNames); } if (filter != null) { - _result.filter = filter; + result.filter = filter; } if (bufferWindow != null) { - _result.bufferWindow = bufferWindow; + result.bufferWindow = bufferWindow; } - return _result; + 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); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'TailLogEntriesRequest', + package: + const $pb.PackageName(_omitMessageNames ? '' : 'google.logging.v2'), + createEmptyInstance: create) + ..pPS(1, _omitFieldNames ? '' : 'resourceNames') + ..aOS(2, _omitFieldNames ? '' : 'filter') + ..aOM<$5.Duration>(3, _omitFieldNames ? '' : 'bufferWindow', + 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') @@ -1037,8 +1098,10 @@ class TailLogEntriesRequest extends $pb.GeneratedMessage { TailLogEntriesRequest copyWith( void Function(TailLogEntriesRequest) updates) => super.copyWith((message) => updates(message as TailLogEntriesRequest)) - as TailLogEntriesRequest; // ignore: deprecated_member_use + as TailLogEntriesRequest; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static TailLogEntriesRequest create() => TailLogEntriesRequest._(); TailLogEntriesRequest createEmptyInstance() => create(); @@ -1049,9 +1112,27 @@ class TailLogEntriesRequest extends $pb.GeneratedMessage { $pb.GeneratedMessage.$_defaultFor(create); static TailLogEntriesRequest? _defaultInstance; + /// 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]` + /// + /// 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]` @$pb.TagNumber(1) $core.List<$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`. + /// Referencing a parent resource that is not listed in `resource_names` will + /// cause the filter to return no results. The maximum length of a filter is + /// 20,000 characters. @$pb.TagNumber(2) $core.String get filter => $_getSZ(1); @$pb.TagNumber(2) @@ -1064,6 +1145,10 @@ class TailLogEntriesRequest extends $pb.GeneratedMessage { @$pb.TagNumber(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 + /// entries. Valid values are between 0-60000 milliseconds. Defaults to 2000 + /// milliseconds. @$pb.TagNumber(3) $5.Duration get bufferWindow => $_getN(2); @$pb.TagNumber(3) @@ -1079,48 +1164,22 @@ class TailLogEntriesRequest extends $pb.GeneratedMessage { $5.Duration ensureBufferWindow() => $_ensure(2); } +/// Information about entries that were omitted from the session. class TailLogEntriesResponse_SuppressionInfo extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'TailLogEntriesResponse.SuppressionInfo', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'google.logging.v2'), - createEmptyInstance: create) - ..e( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'reason', - $pb.PbFieldType.OE, - defaultOrMaker: - TailLogEntriesResponse_SuppressionInfo_Reason.REASON_UNSPECIFIED, - valueOf: TailLogEntriesResponse_SuppressionInfo_Reason.valueOf, - enumValues: TailLogEntriesResponse_SuppressionInfo_Reason.values) - ..a<$core.int>( - 2, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'suppressedCount', - $pb.PbFieldType.O3) - ..hasRequiredFields = false; - - TailLogEntriesResponse_SuppressionInfo._() : super(); factory TailLogEntriesResponse_SuppressionInfo({ TailLogEntriesResponse_SuppressionInfo_Reason? reason, $core.int? suppressedCount, }) { - final _result = create(); + final result = create(); if (reason != null) { - _result.reason = reason; + result.reason = reason; } if (suppressedCount != null) { - _result.suppressedCount = suppressedCount; + result.suppressedCount = suppressedCount; } - return _result; + return result; } + TailLogEntriesResponse_SuppressionInfo._() : super(); factory TailLogEntriesResponse_SuppressionInfo.fromBuffer( $core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => @@ -1128,6 +1187,22 @@ class TailLogEntriesResponse_SuppressionInfo extends $pb.GeneratedMessage { factory TailLogEntriesResponse_SuppressionInfo.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + 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, + enumValues: TailLogEntriesResponse_SuppressionInfo_Reason.values) + ..a<$core.int>( + 2, _omitFieldNames ? '' : 'suppressedCount', $pb.PbFieldType.O3) + ..hasRequiredFields = false; + @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') @@ -1140,8 +1215,10 @@ class TailLogEntriesResponse_SuppressionInfo extends $pb.GeneratedMessage { void Function(TailLogEntriesResponse_SuppressionInfo) updates) => super.copyWith((message) => updates(message as TailLogEntriesResponse_SuppressionInfo)) - as TailLogEntriesResponse_SuppressionInfo; // ignore: deprecated_member_use + as TailLogEntriesResponse_SuppressionInfo; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static TailLogEntriesResponse_SuppressionInfo create() => TailLogEntriesResponse_SuppressionInfo._(); @@ -1154,6 +1231,7 @@ class TailLogEntriesResponse_SuppressionInfo extends $pb.GeneratedMessage { TailLogEntriesResponse_SuppressionInfo>(create); static TailLogEntriesResponse_SuppressionInfo? _defaultInstance; + /// The reason that entries were omitted from the session. @$pb.TagNumber(1) TailLogEntriesResponse_SuppressionInfo_Reason get reason => $_getN(0); @$pb.TagNumber(1) @@ -1166,6 +1244,7 @@ class TailLogEntriesResponse_SuppressionInfo extends $pb.GeneratedMessage { @$pb.TagNumber(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) @@ -1179,52 +1258,41 @@ class TailLogEntriesResponse_SuppressionInfo extends $pb.GeneratedMessage { void clearSuppressedCount() => clearField(2); } +/// Result returned from `TailLogEntries`. class TailLogEntriesResponse extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'TailLogEntriesResponse', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'google.logging.v2'), - createEmptyInstance: create) - ..pc<$3.LogEntry>( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'entries', - $pb.PbFieldType.PM, - subBuilder: $3.LogEntry.create) - ..pc( - 2, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'suppressionInfo', - $pb.PbFieldType.PM, - subBuilder: TailLogEntriesResponse_SuppressionInfo.create) - ..hasRequiredFields = false; - - TailLogEntriesResponse._() : super(); factory TailLogEntriesResponse({ $core.Iterable<$3.LogEntry>? entries, $core.Iterable? suppressionInfo, }) { - final _result = create(); + final result = create(); if (entries != null) { - _result.entries.addAll(entries); + result.entries.addAll(entries); } if (suppressionInfo != null) { - _result.suppressionInfo.addAll(suppressionInfo); + result.suppressionInfo.addAll(suppressionInfo); } - return _result; + 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); + + 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, + subBuilder: $3.LogEntry.create) + ..pc( + 2, _omitFieldNames ? '' : 'suppressionInfo', $pb.PbFieldType.PM, + 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') @@ -1236,8 +1304,10 @@ class TailLogEntriesResponse extends $pb.GeneratedMessage { TailLogEntriesResponse copyWith( void Function(TailLogEntriesResponse) updates) => super.copyWith((message) => updates(message as TailLogEntriesResponse)) - as TailLogEntriesResponse; // ignore: deprecated_member_use + as TailLogEntriesResponse; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static TailLogEntriesResponse create() => TailLogEntriesResponse._(); TailLogEntriesResponse createEmptyInstance() => create(); @@ -1248,10 +1318,22 @@ class TailLogEntriesResponse extends $pb.GeneratedMessage { $pb.GeneratedMessage.$_defaultFor(create); static TailLogEntriesResponse? _defaultInstance; + /// A list of log entries. Each response in the stream will order entries with + /// increasing values of `LogEntry.timestamp`. Ordering is not guaranteed + /// between separate responses. @$pb.TagNumber(1) $core.List<$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 + /// session with the reason that they were not included. There will be at most + /// 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 => $_getList(1); } + +const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); +const _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 8c6ed1b..fbdb18e 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,33 +1,29 @@ -/// +// // Generated code. Do not modify. // source: google/logging/v2/logging.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name -// ignore_for_file: UNDEFINED_SHOWN_NAME +// 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 + import 'dart:core' as $core; + import 'package:protobuf/protobuf.dart' as $pb; +/// An indicator of why entries were omitted. class TailLogEntriesResponse_SuppressionInfo_Reason extends $pb.ProtobufEnum { static const TailLogEntriesResponse_SuppressionInfo_Reason REASON_UNSPECIFIED = TailLogEntriesResponse_SuppressionInfo_Reason._( - 0, - const $core.bool.fromEnvironment('protobuf.omit_enum_names') - ? '' - : 'REASON_UNSPECIFIED'); + 0, _omitEnumNames ? '' : 'REASON_UNSPECIFIED'); static const TailLogEntriesResponse_SuppressionInfo_Reason RATE_LIMIT = TailLogEntriesResponse_SuppressionInfo_Reason._( - 1, - const $core.bool.fromEnvironment('protobuf.omit_enum_names') - ? '' - : 'RATE_LIMIT'); + 1, _omitEnumNames ? '' : 'RATE_LIMIT'); static const TailLogEntriesResponse_SuppressionInfo_Reason NOT_CONSUMED = TailLogEntriesResponse_SuppressionInfo_Reason._( - 2, - const $core.bool.fromEnvironment('protobuf.omit_enum_names') - ? '' - : 'NOT_CONSUMED'); + 2, _omitEnumNames ? '' : 'NOT_CONSUMED'); static const $core.List values = [ @@ -47,3 +43,5 @@ class TailLogEntriesResponse_SuppressionInfo_Reason extends $pb.ProtobufEnum { $core.int v, $core.String n) : super(v, n); } + +const _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 0b83f72..5f612cb 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,19 +1,26 @@ -/// +// // Generated code. Do not modify. // source: google/logging/v2/logging.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + +// 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 import 'dart:async' as $async; - import 'dart:core' as $core; import 'package:grpc/service_api.dart' as $grpc; -import 'logging.pb.dart' as $0; +import 'package:protobuf/protobuf.dart' as $pb; + import '../../protobuf/empty.pb.dart' as $1; +import 'logging.pb.dart' as $0; + export 'logging.pb.dart'; +@$pb.GrpcServiceName('google.logging.v2.LoggingServiceV2') class LoggingServiceV2Client extends $grpc.Client { static final _$deleteLog = $grpc.ClientMethod<$0.DeleteLogRequest, $1.Empty>( '/google.logging.v2.LoggingServiceV2/DeleteLog', @@ -94,6 +101,7 @@ class LoggingServiceV2Client extends $grpc.Client { } } +@$pb.GrpcServiceName('google.logging.v2.LoggingServiceV2') abstract class LoggingServiceV2ServiceBase extends $grpc.Service { $core.String get $name => 'google.logging.v2.LoggingServiceV2'; 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 352b839..df191db 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,118 +1,111 @@ -/// +// // Generated code. Do not modify. // source: google/logging/v2/logging.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,deprecated_member_use_from_same_package,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name -import 'dart:core' as $core; +// 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 + import 'dart:convert' as $convert; +import 'dart:core' as $core; import 'dart:typed_data' as $typed_data; @$core.Deprecated('Use deleteLogRequestDescriptor instead') -const DeleteLogRequest$json = const { +const DeleteLogRequest$json = { '1': 'DeleteLogRequest', - '2': const [ - const { - '1': 'log_name', - '3': 1, - '4': 1, - '5': 9, - '8': const {}, - '10': 'logName' - }, + '2': [ + {'1': 'log_name', '3': 1, '4': 1, '5': 9, '8': {}, '10': 'logName'}, ], }; /// Descriptor for `DeleteLogRequest`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List deleteLogRequestDescriptor = $convert.base64Decode( - 'ChBEZWxldGVMb2dSZXF1ZXN0Ej0KCGxvZ19uYW1lGAEgASgJQiLgQQL6QRwKGmxvZ2dpbmcuZ29vZ2xlYXBpcy5jb20vTG9nUgdsb2dOYW1l'); + 'ChBEZWxldGVMb2dSZXF1ZXN0Ej0KCGxvZ19uYW1lGAEgASgJQiLgQQL6QRwKGmxvZ2dpbmcuZ2' + '9vZ2xlYXBpcy5jb20vTG9nUgdsb2dOYW1l'); + @$core.Deprecated('Use writeLogEntriesRequestDescriptor instead') -const WriteLogEntriesRequest$json = const { +const WriteLogEntriesRequest$json = { '1': 'WriteLogEntriesRequest', - '2': const [ - const { - '1': 'log_name', - '3': 1, - '4': 1, - '5': 9, - '8': const {}, - '10': 'logName' - }, - const { + '2': [ + {'1': 'log_name', '3': 1, '4': 1, '5': 9, '8': {}, '10': 'logName'}, + { '1': 'resource', '3': 2, '4': 1, '5': 11, '6': '.google.api.MonitoredResource', - '8': const {}, + '8': {}, '10': 'resource' }, - const { + { '1': 'labels', '3': 3, '4': 3, '5': 11, '6': '.google.logging.v2.WriteLogEntriesRequest.LabelsEntry', - '8': const {}, + '8': {}, '10': 'labels' }, - const { + { '1': 'entries', '3': 4, '4': 3, '5': 11, '6': '.google.logging.v2.LogEntry', - '8': const {}, + '8': {}, '10': 'entries' }, - const { + { '1': 'partial_success', '3': 5, '4': 1, '5': 8, - '8': const {}, + '8': {}, '10': 'partialSuccess' }, - const { - '1': 'dry_run', - '3': 6, - '4': 1, - '5': 8, - '8': const {}, - '10': 'dryRun' - }, + {'1': 'dry_run', '3': 6, '4': 1, '5': 8, '8': {}, '10': 'dryRun'}, ], - '3': const [WriteLogEntriesRequest_LabelsEntry$json], + '3': [WriteLogEntriesRequest_LabelsEntry$json], }; @$core.Deprecated('Use writeLogEntriesRequestDescriptor instead') -const WriteLogEntriesRequest_LabelsEntry$json = const { +const WriteLogEntriesRequest_LabelsEntry$json = { '1': 'LabelsEntry', - '2': const [ - const {'1': 'key', '3': 1, '4': 1, '5': 9, '10': 'key'}, - const {'1': 'value', '3': 2, '4': 1, '5': 9, '10': 'value'}, + '2': [ + {'1': 'key', '3': 1, '4': 1, '5': 9, '10': 'key'}, + {'1': 'value', '3': 2, '4': 1, '5': 9, '10': 'value'}, ], - '7': const {'7': true}, + '7': {'7': true}, }; /// Descriptor for `WriteLogEntriesRequest`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List writeLogEntriesRequestDescriptor = - $convert.base64Decode( - 'ChZXcml0ZUxvZ0VudHJpZXNSZXF1ZXN0Ej0KCGxvZ19uYW1lGAEgASgJQiLgQQH6QRwKGmxvZ2dpbmcuZ29vZ2xlYXBpcy5jb20vTG9nUgdsb2dOYW1lEj4KCHJlc291cmNlGAIgASgLMh0uZ29vZ2xlLmFwaS5Nb25pdG9yZWRSZXNvdXJjZUID4EEBUghyZXNvdXJjZRJSCgZsYWJlbHMYAyADKAsyNS5nb29nbGUubG9nZ2luZy52Mi5Xcml0ZUxvZ0VudHJpZXNSZXF1ZXN0LkxhYmVsc0VudHJ5QgPgQQFSBmxhYmVscxI6CgdlbnRyaWVzGAQgAygLMhsuZ29vZ2xlLmxvZ2dpbmcudjIuTG9nRW50cnlCA+BBAlIHZW50cmllcxIsCg9wYXJ0aWFsX3N1Y2Nlc3MYBSABKAhCA+BBAVIOcGFydGlhbFN1Y2Nlc3MSHAoHZHJ5X3J1bhgGIAEoCEID4EEBUgZkcnlSdW4aOQoLTGFiZWxzRW50cnkSEAoDa2V5GAEgASgJUgNrZXkSFAoFdmFsdWUYAiABKAlSBXZhbHVlOgI4AQ=='); +final $typed_data.Uint8List writeLogEntriesRequestDescriptor = $convert.base64Decode( + 'ChZXcml0ZUxvZ0VudHJpZXNSZXF1ZXN0Ej0KCGxvZ19uYW1lGAEgASgJQiLgQQH6QRwKGmxvZ2' + 'dpbmcuZ29vZ2xlYXBpcy5jb20vTG9nUgdsb2dOYW1lEj4KCHJlc291cmNlGAIgASgLMh0uZ29v' + 'Z2xlLmFwaS5Nb25pdG9yZWRSZXNvdXJjZUID4EEBUghyZXNvdXJjZRJSCgZsYWJlbHMYAyADKA' + 'syNS5nb29nbGUubG9nZ2luZy52Mi5Xcml0ZUxvZ0VudHJpZXNSZXF1ZXN0LkxhYmVsc0VudHJ5' + 'QgPgQQFSBmxhYmVscxI6CgdlbnRyaWVzGAQgAygLMhsuZ29vZ2xlLmxvZ2dpbmcudjIuTG9nRW' + '50cnlCA+BBAlIHZW50cmllcxIsCg9wYXJ0aWFsX3N1Y2Nlc3MYBSABKAhCA+BBAVIOcGFydGlh' + 'bFN1Y2Nlc3MSHAoHZHJ5X3J1bhgGIAEoCEID4EEBUgZkcnlSdW4aOQoLTGFiZWxzRW50cnkSEA' + 'oDa2V5GAEgASgJUgNrZXkSFAoFdmFsdWUYAiABKAlSBXZhbHVlOgI4AQ=='); + @$core.Deprecated('Use writeLogEntriesResponseDescriptor instead') -const WriteLogEntriesResponse$json = const { +const WriteLogEntriesResponse$json = { '1': 'WriteLogEntriesResponse', }; /// Descriptor for `WriteLogEntriesResponse`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List writeLogEntriesResponseDescriptor = $convert.base64Decode('ChdXcml0ZUxvZ0VudHJpZXNSZXNwb25zZQ=='); + @$core.Deprecated('Use writeLogEntriesPartialErrorsDescriptor instead') -const WriteLogEntriesPartialErrors$json = const { +const WriteLogEntriesPartialErrors$json = { '1': 'WriteLogEntriesPartialErrors', - '2': const [ - const { + '2': [ + { '1': 'log_entry_errors', '3': 1, '4': 3, @@ -122,15 +115,15 @@ const WriteLogEntriesPartialErrors$json = const { '10': 'logEntryErrors' }, ], - '3': const [WriteLogEntriesPartialErrors_LogEntryErrorsEntry$json], + '3': [WriteLogEntriesPartialErrors_LogEntryErrorsEntry$json], }; @$core.Deprecated('Use writeLogEntriesPartialErrorsDescriptor instead') -const WriteLogEntriesPartialErrors_LogEntryErrorsEntry$json = const { +const WriteLogEntriesPartialErrors_LogEntryErrorsEntry$json = { '1': 'LogEntryErrorsEntry', - '2': const [ - const {'1': 'key', '3': 1, '4': 1, '5': 5, '10': 'key'}, - const { + '2': [ + {'1': 'key', '3': 1, '4': 1, '5': 5, '10': 'key'}, + { '1': 'value', '3': 2, '4': 1, @@ -139,68 +132,49 @@ const WriteLogEntriesPartialErrors_LogEntryErrorsEntry$json = const { '10': 'value' }, ], - '7': const {'7': true}, + '7': {'7': true}, }; /// Descriptor for `WriteLogEntriesPartialErrors`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List writeLogEntriesPartialErrorsDescriptor = - $convert.base64Decode( - 'ChxXcml0ZUxvZ0VudHJpZXNQYXJ0aWFsRXJyb3JzEm0KEGxvZ19lbnRyeV9lcnJvcnMYASADKAsyQy5nb29nbGUubG9nZ2luZy52Mi5Xcml0ZUxvZ0VudHJpZXNQYXJ0aWFsRXJyb3JzLkxvZ0VudHJ5RXJyb3JzRW50cnlSDmxvZ0VudHJ5RXJyb3JzGlUKE0xvZ0VudHJ5RXJyb3JzRW50cnkSEAoDa2V5GAEgASgFUgNrZXkSKAoFdmFsdWUYAiABKAsyEi5nb29nbGUucnBjLlN0YXR1c1IFdmFsdWU6AjgB'); +final $typed_data.Uint8List writeLogEntriesPartialErrorsDescriptor = $convert.base64Decode( + 'ChxXcml0ZUxvZ0VudHJpZXNQYXJ0aWFsRXJyb3JzEm0KEGxvZ19lbnRyeV9lcnJvcnMYASADKA' + 'syQy5nb29nbGUubG9nZ2luZy52Mi5Xcml0ZUxvZ0VudHJpZXNQYXJ0aWFsRXJyb3JzLkxvZ0Vu' + 'dHJ5RXJyb3JzRW50cnlSDmxvZ0VudHJ5RXJyb3JzGlUKE0xvZ0VudHJ5RXJyb3JzRW50cnkSEA' + 'oDa2V5GAEgASgFUgNrZXkSKAoFdmFsdWUYAiABKAsyEi5nb29nbGUucnBjLlN0YXR1c1IFdmFs' + 'dWU6AjgB'); + @$core.Deprecated('Use listLogEntriesRequestDescriptor instead') -const ListLogEntriesRequest$json = const { +const ListLogEntriesRequest$json = { '1': 'ListLogEntriesRequest', - '2': const [ - const { + '2': [ + { '1': 'resource_names', '3': 8, '4': 3, '5': 9, - '8': const {}, + '8': {}, '10': 'resourceNames' }, - const { - '1': 'filter', - '3': 2, - '4': 1, - '5': 9, - '8': const {}, - '10': 'filter' - }, - const { - '1': 'order_by', - '3': 3, - '4': 1, - '5': 9, - '8': const {}, - '10': 'orderBy' - }, - const { - '1': 'page_size', - '3': 4, - '4': 1, - '5': 5, - '8': const {}, - '10': 'pageSize' - }, - const { - '1': 'page_token', - '3': 5, - '4': 1, - '5': 9, - '8': const {}, - '10': 'pageToken' - }, + {'1': 'filter', '3': 2, '4': 1, '5': 9, '8': {}, '10': 'filter'}, + {'1': 'order_by', '3': 3, '4': 1, '5': 9, '8': {}, '10': 'orderBy'}, + {'1': 'page_size', '3': 4, '4': 1, '5': 5, '8': {}, '10': 'pageSize'}, + {'1': 'page_token', '3': 5, '4': 1, '5': 9, '8': {}, '10': 'pageToken'}, ], }; /// Descriptor for `ListLogEntriesRequest`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List listLogEntriesRequestDescriptor = $convert.base64Decode( - 'ChVMaXN0TG9nRW50cmllc1JlcXVlc3QSSQoOcmVzb3VyY2VfbmFtZXMYCCADKAlCIuBBAvpBHBIabG9nZ2luZy5nb29nbGVhcGlzLmNvbS9Mb2dSDXJlc291cmNlTmFtZXMSGwoGZmlsdGVyGAIgASgJQgPgQQFSBmZpbHRlchIeCghvcmRlcl9ieRgDIAEoCUID4EEBUgdvcmRlckJ5EiAKCXBhZ2Vfc2l6ZRgEIAEoBUID4EEBUghwYWdlU2l6ZRIiCgpwYWdlX3Rva2VuGAUgASgJQgPgQQFSCXBhZ2VUb2tlbg=='); + 'ChVMaXN0TG9nRW50cmllc1JlcXVlc3QSSQoOcmVzb3VyY2VfbmFtZXMYCCADKAlCIuBBAvpBHB' + 'IabG9nZ2luZy5nb29nbGVhcGlzLmNvbS9Mb2dSDXJlc291cmNlTmFtZXMSGwoGZmlsdGVyGAIg' + 'ASgJQgPgQQFSBmZpbHRlchIeCghvcmRlcl9ieRgDIAEoCUID4EEBUgdvcmRlckJ5EiAKCXBhZ2' + 'Vfc2l6ZRgEIAEoBUID4EEBUghwYWdlU2l6ZRIiCgpwYWdlX3Rva2VuGAUgASgJQgPgQQFSCXBh' + 'Z2VUb2tlbg=='); + @$core.Deprecated('Use listLogEntriesResponseDescriptor instead') -const ListLogEntriesResponse$json = const { +const ListLogEntriesResponse$json = { '1': 'ListLogEntriesResponse', - '2': const [ - const { + '2': [ + { '1': 'entries', '3': 1, '4': 3, @@ -208,54 +182,38 @@ const ListLogEntriesResponse$json = const { '6': '.google.logging.v2.LogEntry', '10': 'entries' }, - const { - '1': 'next_page_token', - '3': 2, - '4': 1, - '5': 9, - '10': 'nextPageToken' - }, + {'1': 'next_page_token', '3': 2, '4': 1, '5': 9, '10': 'nextPageToken'}, ], }; /// Descriptor for `ListLogEntriesResponse`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List listLogEntriesResponseDescriptor = - $convert.base64Decode( - 'ChZMaXN0TG9nRW50cmllc1Jlc3BvbnNlEjUKB2VudHJpZXMYASADKAsyGy5nb29nbGUubG9nZ2luZy52Mi5Mb2dFbnRyeVIHZW50cmllcxImCg9uZXh0X3BhZ2VfdG9rZW4YAiABKAlSDW5leHRQYWdlVG9rZW4='); +final $typed_data.Uint8List listLogEntriesResponseDescriptor = $convert.base64Decode( + 'ChZMaXN0TG9nRW50cmllc1Jlc3BvbnNlEjUKB2VudHJpZXMYASADKAsyGy5nb29nbGUubG9nZ2' + 'luZy52Mi5Mb2dFbnRyeVIHZW50cmllcxImCg9uZXh0X3BhZ2VfdG9rZW4YAiABKAlSDW5leHRQ' + 'YWdlVG9rZW4='); + @$core .Deprecated('Use listMonitoredResourceDescriptorsRequestDescriptor instead') -const ListMonitoredResourceDescriptorsRequest$json = const { +const ListMonitoredResourceDescriptorsRequest$json = { '1': 'ListMonitoredResourceDescriptorsRequest', - '2': const [ - const { - '1': 'page_size', - '3': 1, - '4': 1, - '5': 5, - '8': const {}, - '10': 'pageSize' - }, - const { - '1': 'page_token', - '3': 2, - '4': 1, - '5': 9, - '8': const {}, - '10': 'pageToken' - }, + '2': [ + {'1': 'page_size', '3': 1, '4': 1, '5': 5, '8': {}, '10': 'pageSize'}, + {'1': 'page_token', '3': 2, '4': 1, '5': 9, '8': {}, '10': 'pageToken'}, ], }; /// Descriptor for `ListMonitoredResourceDescriptorsRequest`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List listMonitoredResourceDescriptorsRequestDescriptor = $convert.base64Decode( - 'CidMaXN0TW9uaXRvcmVkUmVzb3VyY2VEZXNjcmlwdG9yc1JlcXVlc3QSIAoJcGFnZV9zaXplGAEgASgFQgPgQQFSCHBhZ2VTaXplEiIKCnBhZ2VfdG9rZW4YAiABKAlCA+BBAVIJcGFnZVRva2Vu'); + 'CidMaXN0TW9uaXRvcmVkUmVzb3VyY2VEZXNjcmlwdG9yc1JlcXVlc3QSIAoJcGFnZV9zaXplGA' + 'EgASgFQgPgQQFSCHBhZ2VTaXplEiIKCnBhZ2VfdG9rZW4YAiABKAlCA+BBAVIJcGFnZVRva2Vu'); + @$core.Deprecated( 'Use listMonitoredResourceDescriptorsResponseDescriptor instead') -const ListMonitoredResourceDescriptorsResponse$json = const { +const ListMonitoredResourceDescriptorsResponse$json = { '1': 'ListMonitoredResourceDescriptorsResponse', - '2': const [ - const { + '2': [ + { '1': 'resource_descriptors', '3': 1, '4': 3, @@ -263,107 +221,77 @@ const ListMonitoredResourceDescriptorsResponse$json = const { '6': '.google.api.MonitoredResourceDescriptor', '10': 'resourceDescriptors' }, - const { - '1': 'next_page_token', - '3': 2, - '4': 1, - '5': 9, - '10': 'nextPageToken' - }, + {'1': 'next_page_token', '3': 2, '4': 1, '5': 9, '10': 'nextPageToken'}, ], }; /// Descriptor for `ListMonitoredResourceDescriptorsResponse`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List listMonitoredResourceDescriptorsResponseDescriptor = $convert.base64Decode( - 'CihMaXN0TW9uaXRvcmVkUmVzb3VyY2VEZXNjcmlwdG9yc1Jlc3BvbnNlEloKFHJlc291cmNlX2Rlc2NyaXB0b3JzGAEgAygLMicuZ29vZ2xlLmFwaS5Nb25pdG9yZWRSZXNvdXJjZURlc2NyaXB0b3JSE3Jlc291cmNlRGVzY3JpcHRvcnMSJgoPbmV4dF9wYWdlX3Rva2VuGAIgASgJUg1uZXh0UGFnZVRva2Vu'); + 'CihMaXN0TW9uaXRvcmVkUmVzb3VyY2VEZXNjcmlwdG9yc1Jlc3BvbnNlEloKFHJlc291cmNlX2' + 'Rlc2NyaXB0b3JzGAEgAygLMicuZ29vZ2xlLmFwaS5Nb25pdG9yZWRSZXNvdXJjZURlc2NyaXB0' + 'b3JSE3Jlc291cmNlRGVzY3JpcHRvcnMSJgoPbmV4dF9wYWdlX3Rva2VuGAIgASgJUg1uZXh0UG' + 'FnZVRva2Vu'); + @$core.Deprecated('Use listLogsRequestDescriptor instead') -const ListLogsRequest$json = const { +const ListLogsRequest$json = { '1': 'ListLogsRequest', - '2': const [ - const { - '1': 'parent', - '3': 1, - '4': 1, - '5': 9, - '8': const {}, - '10': 'parent' - }, - const { + '2': [ + {'1': 'parent', '3': 1, '4': 1, '5': 9, '8': {}, '10': 'parent'}, + { '1': 'resource_names', '3': 8, '4': 3, '5': 9, - '8': const {}, + '8': {}, '10': 'resourceNames' }, - const { - '1': 'page_size', - '3': 2, - '4': 1, - '5': 5, - '8': const {}, - '10': 'pageSize' - }, - const { - '1': 'page_token', - '3': 3, - '4': 1, - '5': 9, - '8': const {}, - '10': 'pageToken' - }, + {'1': 'page_size', '3': 2, '4': 1, '5': 5, '8': {}, '10': 'pageSize'}, + {'1': 'page_token', '3': 3, '4': 1, '5': 9, '8': {}, '10': 'pageToken'}, ], }; /// Descriptor for `ListLogsRequest`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List listLogsRequestDescriptor = $convert.base64Decode( - 'Cg9MaXN0TG9nc1JlcXVlc3QSOgoGcGFyZW50GAEgASgJQiLgQQL6QRwSGmxvZ2dpbmcuZ29vZ2xlYXBpcy5jb20vTG9nUgZwYXJlbnQSSQoOcmVzb3VyY2VfbmFtZXMYCCADKAlCIuBBAfpBHBIabG9nZ2luZy5nb29nbGVhcGlzLmNvbS9Mb2dSDXJlc291cmNlTmFtZXMSIAoJcGFnZV9zaXplGAIgASgFQgPgQQFSCHBhZ2VTaXplEiIKCnBhZ2VfdG9rZW4YAyABKAlCA+BBAVIJcGFnZVRva2Vu'); + 'Cg9MaXN0TG9nc1JlcXVlc3QSOgoGcGFyZW50GAEgASgJQiLgQQL6QRwSGmxvZ2dpbmcuZ29vZ2' + 'xlYXBpcy5jb20vTG9nUgZwYXJlbnQSSQoOcmVzb3VyY2VfbmFtZXMYCCADKAlCIuBBAfpBHBIa' + 'bG9nZ2luZy5nb29nbGVhcGlzLmNvbS9Mb2dSDXJlc291cmNlTmFtZXMSIAoJcGFnZV9zaXplGA' + 'IgASgFQgPgQQFSCHBhZ2VTaXplEiIKCnBhZ2VfdG9rZW4YAyABKAlCA+BBAVIJcGFnZVRva2Vu'); + @$core.Deprecated('Use listLogsResponseDescriptor instead') -const ListLogsResponse$json = const { +const ListLogsResponse$json = { '1': 'ListLogsResponse', - '2': const [ - const {'1': 'log_names', '3': 3, '4': 3, '5': 9, '10': 'logNames'}, - const { - '1': 'next_page_token', - '3': 2, - '4': 1, - '5': 9, - '10': 'nextPageToken' - }, + '2': [ + {'1': 'log_names', '3': 3, '4': 3, '5': 9, '10': 'logNames'}, + {'1': 'next_page_token', '3': 2, '4': 1, '5': 9, '10': 'nextPageToken'}, ], }; /// Descriptor for `ListLogsResponse`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List listLogsResponseDescriptor = $convert.base64Decode( - 'ChBMaXN0TG9nc1Jlc3BvbnNlEhsKCWxvZ19uYW1lcxgDIAMoCVIIbG9nTmFtZXMSJgoPbmV4dF9wYWdlX3Rva2VuGAIgASgJUg1uZXh0UGFnZVRva2Vu'); + 'ChBMaXN0TG9nc1Jlc3BvbnNlEhsKCWxvZ19uYW1lcxgDIAMoCVIIbG9nTmFtZXMSJgoPbmV4dF' + '9wYWdlX3Rva2VuGAIgASgJUg1uZXh0UGFnZVRva2Vu'); + @$core.Deprecated('Use tailLogEntriesRequestDescriptor instead') -const TailLogEntriesRequest$json = const { +const TailLogEntriesRequest$json = { '1': 'TailLogEntriesRequest', - '2': const [ - const { + '2': [ + { '1': 'resource_names', '3': 1, '4': 3, '5': 9, - '8': const {}, + '8': {}, '10': 'resourceNames' }, - const { - '1': 'filter', - '3': 2, - '4': 1, - '5': 9, - '8': const {}, - '10': 'filter' - }, - const { + {'1': 'filter', '3': 2, '4': 1, '5': 9, '8': {}, '10': 'filter'}, + { '1': 'buffer_window', '3': 3, '4': 1, '5': 11, '6': '.google.protobuf.Duration', - '8': const {}, + '8': {}, '10': 'bufferWindow' }, ], @@ -371,12 +299,15 @@ const TailLogEntriesRequest$json = const { /// Descriptor for `TailLogEntriesRequest`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List tailLogEntriesRequestDescriptor = $convert.base64Decode( - 'ChVUYWlsTG9nRW50cmllc1JlcXVlc3QSKgoOcmVzb3VyY2VfbmFtZXMYASADKAlCA+BBAlINcmVzb3VyY2VOYW1lcxIbCgZmaWx0ZXIYAiABKAlCA+BBAVIGZmlsdGVyEkMKDWJ1ZmZlcl93aW5kb3cYAyABKAsyGS5nb29nbGUucHJvdG9idWYuRHVyYXRpb25CA+BBAVIMYnVmZmVyV2luZG93'); + 'ChVUYWlsTG9nRW50cmllc1JlcXVlc3QSKgoOcmVzb3VyY2VfbmFtZXMYASADKAlCA+BBAlINcm' + 'Vzb3VyY2VOYW1lcxIbCgZmaWx0ZXIYAiABKAlCA+BBAVIGZmlsdGVyEkMKDWJ1ZmZlcl93aW5k' + 'b3cYAyABKAsyGS5nb29nbGUucHJvdG9idWYuRHVyYXRpb25CA+BBAVIMYnVmZmVyV2luZG93'); + @$core.Deprecated('Use tailLogEntriesResponseDescriptor instead') -const TailLogEntriesResponse$json = const { +const TailLogEntriesResponse$json = { '1': 'TailLogEntriesResponse', - '2': const [ - const { + '2': [ + { '1': 'entries', '3': 1, '4': 3, @@ -384,7 +315,7 @@ const TailLogEntriesResponse$json = const { '6': '.google.logging.v2.LogEntry', '10': 'entries' }, - const { + { '1': 'suppression_info', '3': 2, '4': 3, @@ -393,14 +324,14 @@ const TailLogEntriesResponse$json = const { '10': 'suppressionInfo' }, ], - '3': const [TailLogEntriesResponse_SuppressionInfo$json], + '3': [TailLogEntriesResponse_SuppressionInfo$json], }; @$core.Deprecated('Use tailLogEntriesResponseDescriptor instead') -const TailLogEntriesResponse_SuppressionInfo$json = const { +const TailLogEntriesResponse_SuppressionInfo$json = { '1': 'SuppressionInfo', - '2': const [ - const { + '2': [ + { '1': 'reason', '3': 1, '4': 1, @@ -408,28 +339,28 @@ const TailLogEntriesResponse_SuppressionInfo$json = const { '6': '.google.logging.v2.TailLogEntriesResponse.SuppressionInfo.Reason', '10': 'reason' }, - const { - '1': 'suppressed_count', - '3': 2, - '4': 1, - '5': 5, - '10': 'suppressedCount' - }, + {'1': 'suppressed_count', '3': 2, '4': 1, '5': 5, '10': 'suppressedCount'}, ], - '4': const [TailLogEntriesResponse_SuppressionInfo_Reason$json], + '4': [TailLogEntriesResponse_SuppressionInfo_Reason$json], }; @$core.Deprecated('Use tailLogEntriesResponseDescriptor instead') -const TailLogEntriesResponse_SuppressionInfo_Reason$json = const { +const TailLogEntriesResponse_SuppressionInfo_Reason$json = { '1': 'Reason', - '2': const [ - const {'1': 'REASON_UNSPECIFIED', '2': 0}, - const {'1': 'RATE_LIMIT', '2': 1}, - const {'1': 'NOT_CONSUMED', '2': 2}, + '2': [ + {'1': 'REASON_UNSPECIFIED', '2': 0}, + {'1': 'RATE_LIMIT', '2': 1}, + {'1': 'NOT_CONSUMED', '2': 2}, ], }; /// Descriptor for `TailLogEntriesResponse`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List tailLogEntriesResponseDescriptor = - $convert.base64Decode( - 'ChZUYWlsTG9nRW50cmllc1Jlc3BvbnNlEjUKB2VudHJpZXMYASADKAsyGy5nb29nbGUubG9nZ2luZy52Mi5Mb2dFbnRyeVIHZW50cmllcxJkChBzdXBwcmVzc2lvbl9pbmZvGAIgAygLMjkuZ29vZ2xlLmxvZ2dpbmcudjIuVGFpbExvZ0VudHJpZXNSZXNwb25zZS5TdXBwcmVzc2lvbkluZm9SD3N1cHByZXNzaW9uSW5mbxraAQoPU3VwcHJlc3Npb25JbmZvElgKBnJlYXNvbhgBIAEoDjJALmdvb2dsZS5sb2dnaW5nLnYyLlRhaWxMb2dFbnRyaWVzUmVzcG9uc2UuU3VwcHJlc3Npb25JbmZvLlJlYXNvblIGcmVhc29uEikKEHN1cHByZXNzZWRfY291bnQYAiABKAVSD3N1cHByZXNzZWRDb3VudCJCCgZSZWFzb24SFgoSUkVBU09OX1VOU1BFQ0lGSUVEEAASDgoKUkFURV9MSU1JVBABEhAKDE5PVF9DT05TVU1FRBAC'); +final $typed_data.Uint8List tailLogEntriesResponseDescriptor = $convert.base64Decode( + 'ChZUYWlsTG9nRW50cmllc1Jlc3BvbnNlEjUKB2VudHJpZXMYASADKAsyGy5nb29nbGUubG9nZ2' + 'luZy52Mi5Mb2dFbnRyeVIHZW50cmllcxJkChBzdXBwcmVzc2lvbl9pbmZvGAIgAygLMjkuZ29v' + 'Z2xlLmxvZ2dpbmcudjIuVGFpbExvZ0VudHJpZXNSZXNwb25zZS5TdXBwcmVzc2lvbkluZm9SD3' + 'N1cHByZXNzaW9uSW5mbxraAQoPU3VwcHJlc3Npb25JbmZvElgKBnJlYXNvbhgBIAEoDjJALmdv' + 'b2dsZS5sb2dnaW5nLnYyLlRhaWxMb2dFbnRyaWVzUmVzcG9uc2UuU3VwcHJlc3Npb25JbmZvLl' + 'JlYXNvblIGcmVhc29uEikKEHN1cHByZXNzZWRfY291bnQYAiABKAVSD3N1cHByZXNzZWRDb3Vu' + 'dCJCCgZSZWFzb24SFgoSUkVBU09OX1VOU1BFQ0lGSUVEEAASDgoKUkFURV9MSU1JVBABEhAKDE' + '5PVF9DT05TVU1FRBAC'); 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 9773573..1eac990 100644 --- a/example/googleapis/lib/src/generated/google/protobuf/any.pb.dart +++ b/example/googleapis/lib/src/generated/google/protobuf/any.pb.dart @@ -1,61 +1,138 @@ -/// +// // Generated code. Do not modify. // source: google/protobuf/any.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + +// 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 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. +/// +/// 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++. +/// +/// Foo foo = ...; +/// Any any; +/// any.PackFrom(foo); +/// ... +/// if (any.UnpackTo(&foo)) { +/// ... +/// } +/// +/// 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()); +/// } +/// +/// Example 3: Pack and unpack a message in Python. +/// +/// foo = Foo(...) +/// any = Any() +/// any.Pack(foo) +/// ... +/// if any.Is(Foo.DESCRIPTOR): +/// any.Unpack(foo) +/// ... +/// +/// 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; +/// } +/// +/// { +/// "@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 { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'Any', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'google.protobuf'), - createEmptyInstance: create, - toProto3Json: $mixin.AnyMixin.toProto3JsonHelper, - fromProto3Json: $mixin.AnyMixin.fromProto3JsonHelper) - ..aOS( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'typeUrl') - ..a<$core.List<$core.int>>( - 2, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'value', - $pb.PbFieldType.OY) - ..hasRequiredFields = false; - - Any._() : super(); factory Any({ $core.String? typeUrl, $core.List<$core.int>? value, }) { - final _result = create(); + final result = create(); if (typeUrl != null) { - _result.typeUrl = typeUrl; + result.typeUrl = typeUrl; } if (value != null) { - _result.value = value; + result.value = value; } - return _result; + 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); + + 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) + ..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') @@ -64,9 +141,10 @@ class Any extends $pb.GeneratedMessage with $mixin.AnyMixin { 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') Any copyWith(void Function(Any) updates) => - super.copyWith((message) => updates(message as Any)) - as Any; // ignore: deprecated_member_use + super.copyWith((message) => updates(message as Any)) as Any; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static Any create() => Any._(); Any createEmptyInstance() => create(); @@ -76,6 +154,34 @@ 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). + /// + /// 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.) + /// + /// 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. @$pb.TagNumber(1) $core.String get typeUrl => $_getSZ(0); @$pb.TagNumber(1) @@ -88,6 +194,7 @@ class Any extends $pb.GeneratedMessage with $mixin.AnyMixin { @$pb.TagNumber(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) @@ -111,3 +218,7 @@ class Any extends $pb.GeneratedMessage with $mixin.AnyMixin { return result; } } + +const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); +const _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 22fd9d8..3744f12 100644 --- a/example/googleapis/lib/src/generated/google/protobuf/any.pbenum.dart +++ b/example/googleapis/lib/src/generated/google/protobuf/any.pbenum.dart @@ -1,6 +1,10 @@ -/// +// // Generated code. Do not modify. // source: google/protobuf/any.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + +// 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 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 67187d0..eafbc6b 100644 --- a/example/googleapis/lib/src/generated/google/protobuf/any.pbjson.dart +++ b/example/googleapis/lib/src/generated/google/protobuf/any.pbjson.dart @@ -1,20 +1,24 @@ -/// +// // Generated code. Do not modify. // source: google/protobuf/any.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,deprecated_member_use_from_same_package,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name -import 'dart:core' as $core; +// 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 + import 'dart:convert' as $convert; +import 'dart:core' as $core; import 'dart:typed_data' as $typed_data; @$core.Deprecated('Use anyDescriptor instead') -const Any$json = const { +const Any$json = { '1': 'Any', - '2': const [ - const {'1': 'type_url', '3': 1, '4': 1, '5': 9, '10': 'typeUrl'}, - const {'1': 'value', '3': 2, '4': 1, '5': 12, '10': 'value'}, + '2': [ + {'1': 'type_url', '3': 1, '4': 1, '5': 9, '10': 'typeUrl'}, + {'1': 'value', '3': 2, '4': 1, '5': 12, '10': 'value'}, ], }; 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 4fe9747..2c225ac 100644 --- a/example/googleapis/lib/src/generated/google/protobuf/duration.pb.dart +++ b/example/googleapis/lib/src/generated/google/protobuf/duration.pb.dart @@ -1,62 +1,111 @@ -/// +// // Generated code. Do not modify. // source: google/protobuf/duration.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + +// 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 import 'dart:core' as $core; 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. +/// +/// # Examples +/// +/// Example 1: Compute Duration from two Timestamps in pseudo code. +/// +/// Timestamp start = ...; +/// Timestamp end = ...; +/// Duration duration = ...; +/// +/// 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; +/// } +/// +/// Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. +/// +/// Timestamp start = ...; +/// Duration duration = ...; +/// Timestamp end = ...; +/// +/// 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; +/// } +/// +/// Example 3: Compute Duration from datetime.timedelta in Python. +/// +/// td = datetime.timedelta(days=3, minutes=10) +/// duration = Duration() +/// duration.FromTimedelta(td) +/// +/// # 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". class Duration extends $pb.GeneratedMessage with $mixin.DurationMixin { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'Duration', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'google.protobuf'), - createEmptyInstance: create, - toProto3Json: $mixin.DurationMixin.toProto3JsonHelper, - fromProto3Json: $mixin.DurationMixin.fromProto3JsonHelper) - ..aInt64( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'seconds') - ..a<$core.int>( - 2, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'nanos', - $pb.PbFieldType.O3) - ..hasRequiredFields = false; - - Duration._() : super(); factory Duration({ $fixnum.Int64? seconds, $core.int? nanos, }) { - final _result = create(); + final result = create(); if (seconds != null) { - _result.seconds = seconds; + result.seconds = seconds; } if (nanos != null) { - _result.nanos = nanos; + result.nanos = nanos; } - return _result; + 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); + + 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) + ..aInt64(1, _omitFieldNames ? '' : 'seconds') + ..a<$core.int>(2, _omitFieldNames ? '' : 'nanos', $pb.PbFieldType.O3) + ..hasRequiredFields = false; + @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') @@ -65,9 +114,10 @@ class Duration extends $pb.GeneratedMessage with $mixin.DurationMixin { 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') Duration copyWith(void Function(Duration) updates) => - super.copyWith((message) => updates(message as Duration)) - as Duration; // ignore: deprecated_member_use + super.copyWith((message) => updates(message as Duration)) as Duration; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static Duration create() => Duration._(); Duration createEmptyInstance() => create(); @@ -77,6 +127,9 @@ class Duration extends $pb.GeneratedMessage with $mixin.DurationMixin { _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static Duration? _defaultInstance; + /// Signed seconds of the span of time. Must be from -315,576,000,000 + /// to +315,576,000,000 inclusive. Note: these bounds are computed from: + /// 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years @$pb.TagNumber(1) $fixnum.Int64 get seconds => $_getI64(0); @$pb.TagNumber(1) @@ -89,6 +142,12 @@ class Duration extends $pb.GeneratedMessage with $mixin.DurationMixin { @$pb.TagNumber(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 + /// `seconds` field and a positive or negative `nanos` field. For durations + /// of one second or more, a non-zero value for the `nanos` field must be + /// of the same sign as the `seconds` field. Must be from -999,999,999 + /// to +999,999,999 inclusive. @$pb.TagNumber(2) $core.int get nanos => $_getIZ(1); @$pb.TagNumber(2) @@ -101,3 +160,7 @@ class Duration extends $pb.GeneratedMessage with $mixin.DurationMixin { @$pb.TagNumber(2) void clearNanos() => clearField(2); } + +const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); +const _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 e4337cf..1a2c58d 100644 --- a/example/googleapis/lib/src/generated/google/protobuf/duration.pbenum.dart +++ b/example/googleapis/lib/src/generated/google/protobuf/duration.pbenum.dart @@ -1,6 +1,10 @@ -/// +// // Generated code. Do not modify. // source: google/protobuf/duration.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + +// 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 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 22edbac..5847acb 100644 --- a/example/googleapis/lib/src/generated/google/protobuf/duration.pbjson.dart +++ b/example/googleapis/lib/src/generated/google/protobuf/duration.pbjson.dart @@ -1,23 +1,28 @@ -/// +// // Generated code. Do not modify. // source: google/protobuf/duration.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,deprecated_member_use_from_same_package,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name -import 'dart:core' as $core; +// 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 + import 'dart:convert' as $convert; +import 'dart:core' as $core; import 'dart:typed_data' as $typed_data; @$core.Deprecated('Use durationDescriptor instead') -const Duration$json = const { +const Duration$json = { '1': 'Duration', - '2': const [ - const {'1': 'seconds', '3': 1, '4': 1, '5': 3, '10': 'seconds'}, - const {'1': 'nanos', '3': 2, '4': 1, '5': 5, '10': 'nanos'}, + '2': [ + {'1': 'seconds', '3': 1, '4': 1, '5': 3, '10': 'seconds'}, + {'1': 'nanos', '3': 2, '4': 1, '5': 5, '10': 'nanos'}, ], }; /// Descriptor for `Duration`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List durationDescriptor = $convert.base64Decode( - 'CghEdXJhdGlvbhIYCgdzZWNvbmRzGAEgASgDUgdzZWNvbmRzEhQKBW5hbm9zGAIgASgFUgVuYW5vcw=='); + 'CghEdXJhdGlvbhIYCgdzZWNvbmRzGAEgASgDUgdzZWNvbmRzEhQKBW5hbm9zGAIgASgFUgVuYW' + '5vcw=='); 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 bacdf8f..5c5ce50 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,42 @@ -/// +// // Generated code. Do not modify. // source: google/protobuf/empty.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + +// 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 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: +/// +/// service Foo { +/// rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); +/// } class Empty extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'Empty', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'google.protobuf'), - createEmptyInstance: create) - ..hasRequiredFields = false; - - Empty._() : super(); 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); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'Empty', + package: + const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), + 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') @@ -37,9 +45,10 @@ class Empty extends $pb.GeneratedMessage { 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') Empty copyWith(void Function(Empty) updates) => - super.copyWith((message) => updates(message as Empty)) - as Empty; // ignore: deprecated_member_use + super.copyWith((message) => updates(message as Empty)) as Empty; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static Empty create() => Empty._(); Empty createEmptyInstance() => create(); @@ -49,3 +58,6 @@ class Empty extends $pb.GeneratedMessage { _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static Empty? _defaultInstance; } + +const _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 5a3bcbf..2f2a761 100644 --- a/example/googleapis/lib/src/generated/google/protobuf/empty.pbenum.dart +++ b/example/googleapis/lib/src/generated/google/protobuf/empty.pbenum.dart @@ -1,6 +1,10 @@ -/// +// // Generated code. Do not modify. // source: google/protobuf/empty.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + +// 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 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 aa9a51d..35f6e2e 100644 --- a/example/googleapis/lib/src/generated/google/protobuf/empty.pbjson.dart +++ b/example/googleapis/lib/src/generated/google/protobuf/empty.pbjson.dart @@ -1,16 +1,20 @@ -/// +// // Generated code. Do not modify. // source: google/protobuf/empty.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,deprecated_member_use_from_same_package,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name -import 'dart:core' as $core; +// 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 + import 'dart:convert' as $convert; +import 'dart:core' as $core; import 'dart:typed_data' as $typed_data; @$core.Deprecated('Use emptyDescriptor instead') -const Empty$json = const { +const Empty$json = { '1': 'Empty', }; 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 f64ac49..fa1e3e7 100644 --- a/example/googleapis/lib/src/generated/google/protobuf/struct.pb.dart +++ b/example/googleapis/lib/src/generated/google/protobuf/struct.pb.dart @@ -1,60 +1,65 @@ -/// +// // Generated code. Do not modify. // source: google/protobuf/struct.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + +// 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 import 'dart:core' as $core; import 'package:protobuf/protobuf.dart' as $pb; - import 'package:protobuf/src/protobuf/mixins/well_known.dart' as $mixin; import 'struct.pbenum.dart'; 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. +/// +/// The JSON representation for `Struct` is JSON object. class Struct extends $pb.GeneratedMessage with $mixin.StructMixin { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'Struct', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'google.protobuf'), - createEmptyInstance: create, - toProto3Json: $mixin.StructMixin.toProto3JsonHelper, - fromProto3Json: $mixin.StructMixin.fromProto3JsonHelper) - ..m<$core.String, Value>( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'fields', - entryClassName: 'Struct.FieldsEntry', - keyFieldType: $pb.PbFieldType.OS, - valueFieldType: $pb.PbFieldType.OM, - valueCreator: Value.create, - packageName: const $pb.PackageName('google.protobuf')) - ..hasRequiredFields = false; - - Struct._() : super(); factory Struct({ $core.Map<$core.String, Value>? fields, }) { - final _result = create(); + final result = create(); if (fields != null) { - _result.fields.addAll(fields); + result.fields.addAll(fields); } - return _result; + 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); + + 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) + ..m<$core.String, Value>(1, _omitFieldNames ? '' : 'fields', + entryClassName: 'Struct.FieldsEntry', + keyFieldType: $pb.PbFieldType.OS, + valueFieldType: $pb.PbFieldType.OM, + valueCreator: Value.create, + valueDefaultOrMaker: Value.getDefault, + 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') @@ -63,9 +68,10 @@ class Struct extends $pb.GeneratedMessage with $mixin.StructMixin { 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') Struct copyWith(void Function(Struct) updates) => - super.copyWith((message) => updates(message as Struct)) - as Struct; // ignore: deprecated_member_use + super.copyWith((message) => updates(message as Struct)) as Struct; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static Struct create() => Struct._(); Struct createEmptyInstance() => create(); @@ -75,6 +81,7 @@ class Struct extends $pb.GeneratedMessage with $mixin.StructMixin { _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static Struct? _defaultInstance; + /// Unordered map of dynamically typed values. @$pb.TagNumber(1) $core.Map<$core.String, Value> get fields => $_getMap(0); } @@ -89,7 +96,50 @@ 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. +/// +/// The JSON representation for `Value` is JSON value. class Value extends $pb.GeneratedMessage with $mixin.ValueMixin { + factory Value({ + NullValue? nullValue, + $core.double? numberValue, + $core.String? stringValue, + $core.bool? boolValue, + Struct? structValue, + 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; + } + 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); + static const $core.Map<$core.int, Value_Kind> _Value_KindByTag = { 1: Value_Kind.nullValue, 2: Value_Kind.numberValue, @@ -100,92 +150,27 @@ class Value extends $pb.GeneratedMessage with $mixin.ValueMixin { 0: Value_Kind.notSet }; static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'Value', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'google.protobuf'), + _omitMessageNames ? '' : 'Value', + package: + const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), createEmptyInstance: create, toProto3Json: $mixin.ValueMixin.toProto3JsonHelper, fromProto3Json: $mixin.ValueMixin.fromProto3JsonHelper) ..oo(0, [1, 2, 3, 4, 5, 6]) - ..e( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'nullValue', - $pb.PbFieldType.OE, + ..e(1, _omitFieldNames ? '' : 'nullValue', $pb.PbFieldType.OE, defaultOrMaker: NullValue.NULL_VALUE, valueOf: NullValue.valueOf, enumValues: NullValue.values) ..a<$core.double>( - 2, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'numberValue', - $pb.PbFieldType.OD) - ..aOS( - 3, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'stringValue') - ..aOB( - 4, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'boolValue') - ..aOM( - 5, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'structValue', + 2, _omitFieldNames ? '' : 'numberValue', $pb.PbFieldType.OD) + ..aOS(3, _omitFieldNames ? '' : 'stringValue') + ..aOB(4, _omitFieldNames ? '' : 'boolValue') + ..aOM(5, _omitFieldNames ? '' : 'structValue', subBuilder: Struct.create) - ..aOM( - 6, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'listValue', + ..aOM(6, _omitFieldNames ? '' : 'listValue', subBuilder: ListValue.create) ..hasRequiredFields = false; - Value._() : super(); - factory Value({ - NullValue? nullValue, - $core.double? numberValue, - $core.String? stringValue, - $core.bool? boolValue, - Struct? structValue, - 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; - } - return _result; - } - 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); @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') @@ -194,9 +179,10 @@ class Value extends $pb.GeneratedMessage with $mixin.ValueMixin { 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') Value copyWith(void Function(Value) updates) => - super.copyWith((message) => updates(message as Value)) - as Value; // ignore: deprecated_member_use + super.copyWith((message) => updates(message as Value)) as Value; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static Value create() => Value._(); Value createEmptyInstance() => create(); @@ -209,6 +195,7 @@ class Value extends $pb.GeneratedMessage with $mixin.ValueMixin { Value_Kind whichKind() => _Value_KindByTag[$_whichOneof(0)]!; void clearKind() => clearField($_whichOneof(0)); + /// Represents a null value. @$pb.TagNumber(1) NullValue get nullValue => $_getN(0); @$pb.TagNumber(1) @@ -221,6 +208,7 @@ class Value extends $pb.GeneratedMessage with $mixin.ValueMixin { @$pb.TagNumber(1) void clearNullValue() => clearField(1); + /// Represents a double value. @$pb.TagNumber(2) $core.double get numberValue => $_getN(1); @$pb.TagNumber(2) @@ -233,6 +221,7 @@ class Value extends $pb.GeneratedMessage with $mixin.ValueMixin { @$pb.TagNumber(2) void clearNumberValue() => clearField(2); + /// Represents a string value. @$pb.TagNumber(3) $core.String get stringValue => $_getSZ(2); @$pb.TagNumber(3) @@ -245,6 +234,7 @@ class Value extends $pb.GeneratedMessage with $mixin.ValueMixin { @$pb.TagNumber(3) void clearStringValue() => clearField(3); + /// Represents a boolean value. @$pb.TagNumber(4) $core.bool get boolValue => $_getBF(3); @$pb.TagNumber(4) @@ -257,6 +247,7 @@ class Value extends $pb.GeneratedMessage with $mixin.ValueMixin { @$pb.TagNumber(4) void clearBoolValue() => clearField(4); + /// Represents a structured value. @$pb.TagNumber(5) Struct get structValue => $_getN(4); @$pb.TagNumber(5) @@ -271,6 +262,7 @@ class Value extends $pb.GeneratedMessage with $mixin.ValueMixin { @$pb.TagNumber(5) Struct ensureStructValue() => $_ensure(4); + /// Represents a repeated `Value`. @$pb.TagNumber(6) ListValue get listValue => $_getN(5); @$pb.TagNumber(6) @@ -286,43 +278,38 @@ class Value extends $pb.GeneratedMessage with $mixin.ValueMixin { ListValue ensureListValue() => $_ensure(5); } +/// `ListValue` is a wrapper around a repeated field of values. +/// +/// The JSON representation for `ListValue` is JSON array. class ListValue extends $pb.GeneratedMessage with $mixin.ListValueMixin { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'ListValue', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'google.protobuf'), - createEmptyInstance: create, - toProto3Json: $mixin.ListValueMixin.toProto3JsonHelper, - fromProto3Json: $mixin.ListValueMixin.fromProto3JsonHelper) - ..pc( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'values', - $pb.PbFieldType.PM, - subBuilder: Value.create) - ..hasRequiredFields = false; - - ListValue._() : super(); factory ListValue({ $core.Iterable? values, }) { - final _result = create(); + final result = create(); if (values != null) { - _result.values.addAll(values); + result.values.addAll(values); } - return _result; + 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); + + 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) + ..hasRequiredFields = false; + @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') @@ -331,9 +318,10 @@ class ListValue extends $pb.GeneratedMessage with $mixin.ListValueMixin { 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') ListValue copyWith(void Function(ListValue) updates) => - super.copyWith((message) => updates(message as ListValue)) - as ListValue; // ignore: deprecated_member_use + super.copyWith((message) => updates(message as ListValue)) as ListValue; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static ListValue create() => ListValue._(); ListValue createEmptyInstance() => create(); @@ -343,6 +331,11 @@ class ListValue extends $pb.GeneratedMessage with $mixin.ListValueMixin { _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static ListValue? _defaultInstance; + /// Repeated field of dynamically typed values. @$pb.TagNumber(1) $core.List get values => $_getList(0); } + +const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); +const _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 223f5f7..7f9bf0c 100644 --- a/example/googleapis/lib/src/generated/google/protobuf/struct.pbenum.dart +++ b/example/googleapis/lib/src/generated/google/protobuf/struct.pbenum.dart @@ -1,20 +1,25 @@ -/// +// // Generated code. Do not modify. // source: google/protobuf/struct.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name -// ignore_for_file: UNDEFINED_SHOWN_NAME +// 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 + 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. +/// +/// The JSON representation for `NullValue` is JSON `null`. class NullValue extends $pb.ProtobufEnum { - static const NullValue NULL_VALUE = NullValue._( - 0, - const $core.bool.fromEnvironment('protobuf.omit_enum_names') - ? '' - : 'NULL_VALUE'); + static const NullValue NULL_VALUE = + NullValue._(0, _omitEnumNames ? '' : 'NULL_VALUE'); static const $core.List values = [ NULL_VALUE, @@ -26,3 +31,5 @@ class NullValue extends $pb.ProtobufEnum { const NullValue._($core.int v, $core.String n) : super(v, n); } + +const _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 44c73d8..c0693f5 100644 --- a/example/googleapis/lib/src/generated/google/protobuf/struct.pbjson.dart +++ b/example/googleapis/lib/src/generated/google/protobuf/struct.pbjson.dart @@ -1,30 +1,35 @@ -/// +// // Generated code. Do not modify. // source: google/protobuf/struct.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,deprecated_member_use_from_same_package,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name -import 'dart:core' as $core; +// 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 + import 'dart:convert' as $convert; +import 'dart:core' as $core; import 'dart:typed_data' as $typed_data; @$core.Deprecated('Use nullValueDescriptor instead') -const NullValue$json = const { +const NullValue$json = { '1': 'NullValue', - '2': const [ - const {'1': 'NULL_VALUE', '2': 0}, + '2': [ + {'1': 'NULL_VALUE', '2': 0}, ], }; /// Descriptor for `NullValue`. Decode as a `google.protobuf.EnumDescriptorProto`. final $typed_data.Uint8List nullValueDescriptor = $convert.base64Decode('CglOdWxsVmFsdWUSDgoKTlVMTF9WQUxVRRAA'); + @$core.Deprecated('Use structDescriptor instead') -const Struct$json = const { +const Struct$json = { '1': 'Struct', - '2': const [ - const { + '2': [ + { '1': 'fields', '3': 1, '4': 3, @@ -33,15 +38,15 @@ const Struct$json = const { '10': 'fields' }, ], - '3': const [Struct_FieldsEntry$json], + '3': [Struct_FieldsEntry$json], }; @$core.Deprecated('Use structDescriptor instead') -const Struct_FieldsEntry$json = const { +const Struct_FieldsEntry$json = { '1': 'FieldsEntry', - '2': const [ - const {'1': 'key', '3': 1, '4': 1, '5': 9, '10': 'key'}, - const { + '2': [ + {'1': 'key', '3': 1, '4': 1, '5': 9, '10': 'key'}, + { '1': 'value', '3': 2, '4': 1, @@ -50,17 +55,20 @@ const Struct_FieldsEntry$json = const { '10': 'value' }, ], - '7': const {'7': true}, + '7': {'7': true}, }; /// Descriptor for `Struct`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List structDescriptor = $convert.base64Decode( - 'CgZTdHJ1Y3QSOwoGZmllbGRzGAEgAygLMiMuZ29vZ2xlLnByb3RvYnVmLlN0cnVjdC5GaWVsZHNFbnRyeVIGZmllbGRzGlEKC0ZpZWxkc0VudHJ5EhAKA2tleRgBIAEoCVIDa2V5EiwKBXZhbHVlGAIgASgLMhYuZ29vZ2xlLnByb3RvYnVmLlZhbHVlUgV2YWx1ZToCOAE='); + 'CgZTdHJ1Y3QSOwoGZmllbGRzGAEgAygLMiMuZ29vZ2xlLnByb3RvYnVmLlN0cnVjdC5GaWVsZH' + 'NFbnRyeVIGZmllbGRzGlEKC0ZpZWxkc0VudHJ5EhAKA2tleRgBIAEoCVIDa2V5EiwKBXZhbHVl' + 'GAIgASgLMhYuZ29vZ2xlLnByb3RvYnVmLlZhbHVlUgV2YWx1ZToCOAE='); + @$core.Deprecated('Use valueDescriptor instead') -const Value$json = const { +const Value$json = { '1': 'Value', - '2': const [ - const { + '2': [ + { '1': 'null_value', '3': 1, '4': 1, @@ -69,31 +77,10 @@ const Value$json = const { '9': 0, '10': 'nullValue' }, - const { - '1': 'number_value', - '3': 2, - '4': 1, - '5': 1, - '9': 0, - '10': 'numberValue' - }, - const { - '1': 'string_value', - '3': 3, - '4': 1, - '5': 9, - '9': 0, - '10': 'stringValue' - }, - const { - '1': 'bool_value', - '3': 4, - '4': 1, - '5': 8, - '9': 0, - '10': 'boolValue' - }, - const { + {'1': 'number_value', '3': 2, '4': 1, '5': 1, '9': 0, '10': 'numberValue'}, + {'1': 'string_value', '3': 3, '4': 1, '5': 9, '9': 0, '10': 'stringValue'}, + {'1': 'bool_value', '3': 4, '4': 1, '5': 8, '9': 0, '10': 'boolValue'}, + { '1': 'struct_value', '3': 5, '4': 1, @@ -102,7 +89,7 @@ const Value$json = const { '9': 0, '10': 'structValue' }, - const { + { '1': 'list_value', '3': 6, '4': 1, @@ -112,19 +99,25 @@ const Value$json = const { '10': 'listValue' }, ], - '8': const [ - const {'1': 'kind'}, + '8': [ + {'1': 'kind'}, ], }; /// Descriptor for `Value`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List valueDescriptor = $convert.base64Decode( - 'CgVWYWx1ZRI7CgpudWxsX3ZhbHVlGAEgASgOMhouZ29vZ2xlLnByb3RvYnVmLk51bGxWYWx1ZUgAUgludWxsVmFsdWUSIwoMbnVtYmVyX3ZhbHVlGAIgASgBSABSC251bWJlclZhbHVlEiMKDHN0cmluZ192YWx1ZRgDIAEoCUgAUgtzdHJpbmdWYWx1ZRIfCgpib29sX3ZhbHVlGAQgASgISABSCWJvb2xWYWx1ZRI8CgxzdHJ1Y3RfdmFsdWUYBSABKAsyFy5nb29nbGUucHJvdG9idWYuU3RydWN0SABSC3N0cnVjdFZhbHVlEjsKCmxpc3RfdmFsdWUYBiABKAsyGi5nb29nbGUucHJvdG9idWYuTGlzdFZhbHVlSABSCWxpc3RWYWx1ZUIGCgRraW5k'); + 'CgVWYWx1ZRI7CgpudWxsX3ZhbHVlGAEgASgOMhouZ29vZ2xlLnByb3RvYnVmLk51bGxWYWx1ZU' + 'gAUgludWxsVmFsdWUSIwoMbnVtYmVyX3ZhbHVlGAIgASgBSABSC251bWJlclZhbHVlEiMKDHN0' + 'cmluZ192YWx1ZRgDIAEoCUgAUgtzdHJpbmdWYWx1ZRIfCgpib29sX3ZhbHVlGAQgASgISABSCW' + 'Jvb2xWYWx1ZRI8CgxzdHJ1Y3RfdmFsdWUYBSABKAsyFy5nb29nbGUucHJvdG9idWYuU3RydWN0' + 'SABSC3N0cnVjdFZhbHVlEjsKCmxpc3RfdmFsdWUYBiABKAsyGi5nb29nbGUucHJvdG9idWYuTG' + 'lzdFZhbHVlSABSCWxpc3RWYWx1ZUIGCgRraW5k'); + @$core.Deprecated('Use listValueDescriptor instead') -const ListValue$json = const { +const ListValue$json = { '1': 'ListValue', - '2': const [ - const { + '2': [ + { '1': 'values', '3': 1, '4': 3, @@ -137,4 +130,5 @@ const ListValue$json = const { /// Descriptor for `ListValue`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List listValueDescriptor = $convert.base64Decode( - 'CglMaXN0VmFsdWUSLgoGdmFsdWVzGAEgAygLMhYuZ29vZ2xlLnByb3RvYnVmLlZhbHVlUgZ2YWx1ZXM='); + 'CglMaXN0VmFsdWUSLgoGdmFsdWVzGAEgAygLMhYuZ29vZ2xlLnByb3RvYnVmLlZhbHVlUgZ2YW' + 'x1ZXM='); 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 db830f1..3282fc2 100644 --- a/example/googleapis/lib/src/generated/google/protobuf/timestamp.pb.dart +++ b/example/googleapis/lib/src/generated/google/protobuf/timestamp.pb.dart @@ -1,62 +1,142 @@ -/// +// // Generated code. Do not modify. // source: google/protobuf/timestamp.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + +// 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 import 'dart:core' as $core; 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. +/// +/// 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. +/// +/// # Examples +/// +/// Example 1: Compute Timestamp from POSIX `time()`. +/// +/// Timestamp timestamp; +/// timestamp.set_seconds(time(NULL)); +/// timestamp.set_nanos(0); +/// +/// Example 2: Compute Timestamp from POSIX `gettimeofday()`. +/// +/// struct timeval tv; +/// gettimeofday(&tv, NULL); +/// +/// Timestamp timestamp; +/// timestamp.set_seconds(tv.tv_sec); +/// timestamp.set_nanos(tv.tv_usec * 1000); +/// +/// Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. +/// +/// 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)); +/// +/// Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. +/// +/// long millis = System.currentTimeMillis(); +/// +/// Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) +/// .setNanos((int) ((millis % 1000) * 1000000)).build(); +/// +/// Example 5: Compute Timestamp from Java `Instant.now()`. +/// +/// Instant now = Instant.now(); +/// +/// Timestamp timestamp = +/// Timestamp.newBuilder().setSeconds(now.getEpochSecond()) +/// .setNanos(now.getNano()).build(); +/// +/// Example 6: Compute Timestamp from current time in Python. +/// +/// timestamp = Timestamp() +/// timestamp.GetCurrentTime() +/// +/// # 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). +/// +/// 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. class Timestamp extends $pb.GeneratedMessage with $mixin.TimestampMixin { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'Timestamp', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'google.protobuf'), - createEmptyInstance: create, - toProto3Json: $mixin.TimestampMixin.toProto3JsonHelper, - fromProto3Json: $mixin.TimestampMixin.fromProto3JsonHelper) - ..aInt64( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'seconds') - ..a<$core.int>( - 2, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'nanos', - $pb.PbFieldType.O3) - ..hasRequiredFields = false; - - Timestamp._() : super(); factory Timestamp({ $fixnum.Int64? seconds, $core.int? nanos, }) { - final _result = create(); + final result = create(); if (seconds != null) { - _result.seconds = seconds; + result.seconds = seconds; } if (nanos != null) { - _result.nanos = nanos; + result.nanos = nanos; } - return _result; + 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); + + 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) + ..aInt64(1, _omitFieldNames ? '' : 'seconds') + ..a<$core.int>(2, _omitFieldNames ? '' : 'nanos', $pb.PbFieldType.O3) + ..hasRequiredFields = false; + @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') @@ -65,9 +145,10 @@ class Timestamp extends $pb.GeneratedMessage with $mixin.TimestampMixin { 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') Timestamp copyWith(void Function(Timestamp) updates) => - super.copyWith((message) => updates(message as Timestamp)) - as Timestamp; // ignore: deprecated_member_use + super.copyWith((message) => updates(message as Timestamp)) as Timestamp; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static Timestamp create() => Timestamp._(); Timestamp createEmptyInstance() => create(); @@ -77,6 +158,9 @@ 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. @$pb.TagNumber(1) $fixnum.Int64 get seconds => $_getI64(0); @$pb.TagNumber(1) @@ -89,6 +173,10 @@ class Timestamp extends $pb.GeneratedMessage with $mixin.TimestampMixin { @$pb.TagNumber(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 + /// inclusive. @$pb.TagNumber(2) $core.int get nanos => $_getIZ(1); @$pb.TagNumber(2) @@ -110,3 +198,7 @@ class Timestamp extends $pb.GeneratedMessage with $mixin.TimestampMixin { return result; } } + +const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); +const _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 5b33f42..a194b80 100644 --- a/example/googleapis/lib/src/generated/google/protobuf/timestamp.pbenum.dart +++ b/example/googleapis/lib/src/generated/google/protobuf/timestamp.pbenum.dart @@ -1,6 +1,10 @@ -/// +// // Generated code. Do not modify. // source: google/protobuf/timestamp.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + +// 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 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 b89d3cf..39ab20f 100644 --- a/example/googleapis/lib/src/generated/google/protobuf/timestamp.pbjson.dart +++ b/example/googleapis/lib/src/generated/google/protobuf/timestamp.pbjson.dart @@ -1,23 +1,28 @@ -/// +// // Generated code. Do not modify. // source: google/protobuf/timestamp.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,deprecated_member_use_from_same_package,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name -import 'dart:core' as $core; +// 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 + import 'dart:convert' as $convert; +import 'dart:core' as $core; import 'dart:typed_data' as $typed_data; @$core.Deprecated('Use timestampDescriptor instead') -const Timestamp$json = const { +const Timestamp$json = { '1': 'Timestamp', - '2': const [ - const {'1': 'seconds', '3': 1, '4': 1, '5': 3, '10': 'seconds'}, - const {'1': 'nanos', '3': 2, '4': 1, '5': 5, '10': 'nanos'}, + '2': [ + {'1': 'seconds', '3': 1, '4': 1, '5': 3, '10': 'seconds'}, + {'1': 'nanos', '3': 2, '4': 1, '5': 5, '10': 'nanos'}, ], }; /// Descriptor for `Timestamp`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List timestampDescriptor = $convert.base64Decode( - 'CglUaW1lc3RhbXASGAoHc2Vjb25kcxgBIAEoA1IHc2Vjb25kcxIUCgVuYW5vcxgCIAEoBVIFbmFub3M='); + 'CglUaW1lc3RhbXASGAoHc2Vjb25kcxgBIAEoA1IHc2Vjb25kcxIUCgVuYW5vcxgCIAEoBVIFbm' + 'Fub3M='); 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 84e13aa..3e43a52 100644 --- a/example/googleapis/lib/src/generated/google/rpc/status.pb.dart +++ b/example/googleapis/lib/src/generated/google/rpc/status.pb.dart @@ -1,9 +1,13 @@ -/// +// // Generated code. Do not modify. // source: google/rpc/status.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + +// 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 import 'dart:core' as $core; @@ -11,60 +15,49 @@ 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. +/// +/// 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 { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'Status', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'google.rpc'), - createEmptyInstance: create) - ..a<$core.int>( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'code', - $pb.PbFieldType.O3) - ..aOS( - 2, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'message') - ..pc<$0.Any>( - 3, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'details', - $pb.PbFieldType.PM, - subBuilder: $0.Any.create) - ..hasRequiredFields = false; - - Status._() : super(); factory Status({ $core.int? code, $core.String? message, $core.Iterable<$0.Any>? details, }) { - final _result = create(); + final result = create(); if (code != null) { - _result.code = code; + result.code = code; } if (message != null) { - _result.message = message; + result.message = message; } if (details != null) { - _result.details.addAll(details); + result.details.addAll(details); } - return _result; + 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); + + 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) + ..aOS(2, _omitFieldNames ? '' : 'message') + ..pc<$0.Any>(3, _omitFieldNames ? '' : 'details', $pb.PbFieldType.PM, + 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') @@ -73,9 +66,10 @@ class Status extends $pb.GeneratedMessage { 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') Status copyWith(void Function(Status) updates) => - super.copyWith((message) => updates(message as Status)) - as Status; // ignore: deprecated_member_use + super.copyWith((message) => updates(message as Status)) as Status; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static Status create() => Status._(); Status createEmptyInstance() => create(); @@ -85,6 +79,8 @@ class Status extends $pb.GeneratedMessage { _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static Status? _defaultInstance; + /// The status code, which should be an enum value of + /// [google.rpc.Code][google.rpc.Code]. @$pb.TagNumber(1) $core.int get code => $_getIZ(0); @$pb.TagNumber(1) @@ -97,6 +93,10 @@ class Status extends $pb.GeneratedMessage { @$pb.TagNumber(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 + /// [google.rpc.Status.details][google.rpc.Status.details] field, or localized + /// by the client. @$pb.TagNumber(2) $core.String get message => $_getSZ(1); @$pb.TagNumber(2) @@ -109,6 +109,12 @@ class Status extends $pb.GeneratedMessage { @$pb.TagNumber(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); } + +const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); +const _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 6ae5362..aaf54bb 100644 --- a/example/googleapis/lib/src/generated/google/rpc/status.pbenum.dart +++ b/example/googleapis/lib/src/generated/google/rpc/status.pbenum.dart @@ -1,6 +1,10 @@ -/// +// // Generated code. Do not modify. // source: google/rpc/status.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + +// 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 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 27c6caf..d7608ca 100644 --- a/example/googleapis/lib/src/generated/google/rpc/status.pbjson.dart +++ b/example/googleapis/lib/src/generated/google/rpc/status.pbjson.dart @@ -1,21 +1,25 @@ -/// +// // Generated code. Do not modify. // source: google/rpc/status.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,deprecated_member_use_from_same_package,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name -import 'dart:core' as $core; +// 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 + import 'dart:convert' as $convert; +import 'dart:core' as $core; import 'dart:typed_data' as $typed_data; @$core.Deprecated('Use statusDescriptor instead') -const Status$json = const { +const Status$json = { '1': 'Status', - '2': const [ - const {'1': 'code', '3': 1, '4': 1, '5': 5, '10': 'code'}, - const {'1': 'message', '3': 2, '4': 1, '5': 9, '10': 'message'}, - const { + '2': [ + {'1': 'code', '3': 1, '4': 1, '5': 5, '10': 'code'}, + {'1': 'message', '3': 2, '4': 1, '5': 9, '10': 'message'}, + { '1': 'details', '3': 3, '4': 3, @@ -28,4 +32,5 @@ const Status$json = const { /// Descriptor for `Status`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List statusDescriptor = $convert.base64Decode( - 'CgZTdGF0dXMSEgoEY29kZRgBIAEoBVIEY29kZRIYCgdtZXNzYWdlGAIgASgJUgdtZXNzYWdlEi4KB2RldGFpbHMYAyADKAsyFC5nb29nbGUucHJvdG9idWYuQW55UgdkZXRhaWxz'); + 'CgZTdGF0dXMSEgoEY29kZRgBIAEoBVIEY29kZRIYCgdtZXNzYWdlGAIgASgJUgdtZXNzYWdlEi' + '4KB2RldGFpbHMYAyADKAsyFC5nb29nbGUucHJvdG9idWYuQW55UgdkZXRhaWxz'); diff --git a/example/googleapis/pubspec.yaml b/example/googleapis/pubspec.yaml index ce28e53..b2c12db 100644 --- a/example/googleapis/pubspec.yaml +++ b/example/googleapis/pubspec.yaml @@ -10,7 +10,7 @@ dependencies: fixnum: grpc: path: ../../ - protobuf: ^2.0.0 + protobuf: ^3.0.0 dev_dependencies: lints: ^2.0.0 diff --git a/example/grpc-web/lib/src/generated/echo.pb.dart b/example/grpc-web/lib/src/generated/echo.pb.dart index 44512da..d9f8f12 100644 --- a/example/grpc-web/lib/src/generated/echo.pb.dart +++ b/example/grpc-web/lib/src/generated/echo.pb.dart @@ -1,47 +1,44 @@ -/// +// // Generated code. Do not modify. // source: echo.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + +// 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 import 'dart:core' as $core; import 'package:protobuf/protobuf.dart' as $pb; class EchoRequest extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'EchoRequest', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'grpc.gateway.testing'), - createEmptyInstance: create) - ..aOS( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'message') - ..hasRequiredFields = false; - - EchoRequest._() : super(); factory EchoRequest({ $core.String? message, }) { - final _result = create(); + final result = create(); if (message != null) { - _result.message = message; + result.message = message; } - return _result; + 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); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'EchoRequest', + package: const $pb.PackageName( + _omitMessageNames ? '' : 'grpc.gateway.testing'), + createEmptyInstance: create) + ..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') @@ -51,8 +48,10 @@ class EchoRequest extends $pb.GeneratedMessage { 'Will be removed in next major version') EchoRequest copyWith(void Function(EchoRequest) updates) => super.copyWith((message) => updates(message as EchoRequest)) - as EchoRequest; // ignore: deprecated_member_use + as EchoRequest; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static EchoRequest create() => EchoRequest._(); EchoRequest createEmptyInstance() => create(); @@ -76,38 +75,31 @@ class EchoRequest extends $pb.GeneratedMessage { } class EchoResponse extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'EchoResponse', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'grpc.gateway.testing'), - createEmptyInstance: create) - ..aOS( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'message') - ..hasRequiredFields = false; - - EchoResponse._() : super(); factory EchoResponse({ $core.String? message, }) { - final _result = create(); + final result = create(); if (message != null) { - _result.message = message; + result.message = message; } - return _result; + 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); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'EchoResponse', + package: const $pb.PackageName( + _omitMessageNames ? '' : 'grpc.gateway.testing'), + createEmptyInstance: create) + ..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') @@ -117,8 +109,10 @@ class EchoResponse extends $pb.GeneratedMessage { 'Will be removed in next major version') EchoResponse copyWith(void Function(EchoResponse) updates) => super.copyWith((message) => updates(message as EchoResponse)) - as EchoResponse; // ignore: deprecated_member_use + as EchoResponse; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static EchoResponse create() => EchoResponse._(); EchoResponse createEmptyInstance() => create(); @@ -143,58 +137,42 @@ class EchoResponse extends $pb.GeneratedMessage { } class ServerStreamingEchoRequest extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'ServerStreamingEchoRequest', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'grpc.gateway.testing'), - createEmptyInstance: create) - ..aOS( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'message') - ..a<$core.int>( - 2, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'messageCount', - $pb.PbFieldType.O3) - ..a<$core.int>( - 3, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'messageInterval', - $pb.PbFieldType.O3) - ..hasRequiredFields = false; - - ServerStreamingEchoRequest._() : super(); factory ServerStreamingEchoRequest({ $core.String? message, $core.int? messageCount, $core.int? messageInterval, }) { - final _result = create(); + final result = create(); if (message != null) { - _result.message = message; + result.message = message; } if (messageCount != null) { - _result.messageCount = messageCount; + result.messageCount = messageCount; } if (messageInterval != null) { - _result.messageInterval = messageInterval; + result.messageInterval = messageInterval; } - return _result; + 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); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'ServerStreamingEchoRequest', + package: const $pb.PackageName( + _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) + ..hasRequiredFields = false; + @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') @@ -207,8 +185,10 @@ class ServerStreamingEchoRequest extends $pb.GeneratedMessage { void Function(ServerStreamingEchoRequest) updates) => super.copyWith( (message) => updates(message as ServerStreamingEchoRequest)) - as ServerStreamingEchoRequest; // ignore: deprecated_member_use + as ServerStreamingEchoRequest; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static ServerStreamingEchoRequest create() => ServerStreamingEchoRequest._(); ServerStreamingEchoRequest createEmptyInstance() => create(); @@ -257,38 +237,31 @@ class ServerStreamingEchoRequest extends $pb.GeneratedMessage { } class ServerStreamingEchoResponse extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'ServerStreamingEchoResponse', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'grpc.gateway.testing'), - createEmptyInstance: create) - ..aOS( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'message') - ..hasRequiredFields = false; - - ServerStreamingEchoResponse._() : super(); factory ServerStreamingEchoResponse({ $core.String? message, }) { - final _result = create(); + final result = create(); if (message != null) { - _result.message = message; + result.message = message; } - return _result; + 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); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'ServerStreamingEchoResponse', + package: const $pb.PackageName( + _omitMessageNames ? '' : 'grpc.gateway.testing'), + createEmptyInstance: create) + ..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') @@ -301,8 +274,10 @@ class ServerStreamingEchoResponse extends $pb.GeneratedMessage { void Function(ServerStreamingEchoResponse) updates) => super.copyWith( (message) => updates(message as ServerStreamingEchoResponse)) - as ServerStreamingEchoResponse; // ignore: deprecated_member_use + as ServerStreamingEchoResponse; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static ServerStreamingEchoResponse create() => ServerStreamingEchoResponse._(); @@ -326,3 +301,7 @@ class ServerStreamingEchoResponse extends $pb.GeneratedMessage { @$pb.TagNumber(1) void clearMessage() => clearField(1); } + +const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); +const _omitMessageNames = + $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/example/grpc-web/lib/src/generated/echo.pbenum.dart b/example/grpc-web/lib/src/generated/echo.pbenum.dart index dae0422..188daf2 100644 --- a/example/grpc-web/lib/src/generated/echo.pbenum.dart +++ b/example/grpc-web/lib/src/generated/echo.pbenum.dart @@ -1,6 +1,10 @@ -/// +// // Generated code. Do not modify. // source: echo.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + +// 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 diff --git a/example/grpc-web/lib/src/generated/echo.pbgrpc.dart b/example/grpc-web/lib/src/generated/echo.pbgrpc.dart index e5c093e..93ac0aa 100644 --- a/example/grpc-web/lib/src/generated/echo.pbgrpc.dart +++ b/example/grpc-web/lib/src/generated/echo.pbgrpc.dart @@ -1,18 +1,25 @@ -/// +// // Generated code. Do not modify. // source: echo.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + +// 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 import 'dart:async' as $async; - import 'dart:core' as $core; import 'package:grpc/service_api.dart' as $grpc; +import 'package:protobuf/protobuf.dart' as $pb; + import 'echo.pb.dart' as $0; + 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', @@ -44,6 +51,7 @@ class EchoServiceClient extends $grpc.Client { } } +@$pb.GrpcServiceName('grpc.gateway.testing.EchoService') abstract class EchoServiceBase extends $grpc.Service { $core.String get $name => 'grpc.gateway.testing.EchoService'; diff --git a/example/grpc-web/lib/src/generated/echo.pbjson.dart b/example/grpc-web/lib/src/generated/echo.pbjson.dart index d1adba5..5d4c05e 100644 --- a/example/grpc-web/lib/src/generated/echo.pbjson.dart +++ b/example/grpc-web/lib/src/generated/echo.pbjson.dart @@ -1,65 +1,69 @@ -/// +// // Generated code. Do not modify. // source: echo.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,deprecated_member_use_from_same_package,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name -import 'dart:core' as $core; +// 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 + import 'dart:convert' as $convert; +import 'dart:core' as $core; import 'dart:typed_data' as $typed_data; @$core.Deprecated('Use echoRequestDescriptor instead') -const EchoRequest$json = const { +const EchoRequest$json = { '1': 'EchoRequest', - '2': const [ - const {'1': 'message', '3': 1, '4': 1, '5': 9, '10': 'message'}, + '2': [ + {'1': 'message', '3': 1, '4': 1, '5': 9, '10': 'message'}, ], }; /// Descriptor for `EchoRequest`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List echoRequestDescriptor = $convert .base64Decode('CgtFY2hvUmVxdWVzdBIYCgdtZXNzYWdlGAEgASgJUgdtZXNzYWdl'); + @$core.Deprecated('Use echoResponseDescriptor instead') -const EchoResponse$json = const { +const EchoResponse$json = { '1': 'EchoResponse', - '2': const [ - const {'1': 'message', '3': 1, '4': 1, '5': 9, '10': 'message'}, + '2': [ + {'1': 'message', '3': 1, '4': 1, '5': 9, '10': 'message'}, ], }; /// Descriptor for `EchoResponse`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List echoResponseDescriptor = $convert .base64Decode('CgxFY2hvUmVzcG9uc2USGAoHbWVzc2FnZRgBIAEoCVIHbWVzc2FnZQ=='); + @$core.Deprecated('Use serverStreamingEchoRequestDescriptor instead') -const ServerStreamingEchoRequest$json = const { +const ServerStreamingEchoRequest$json = { '1': 'ServerStreamingEchoRequest', - '2': const [ - const {'1': 'message', '3': 1, '4': 1, '5': 9, '10': 'message'}, - const {'1': 'message_count', '3': 2, '4': 1, '5': 5, '10': 'messageCount'}, - const { - '1': 'message_interval', - '3': 3, - '4': 1, - '5': 5, - '10': 'messageInterval' - }, + '2': [ + {'1': 'message', '3': 1, '4': 1, '5': 9, '10': 'message'}, + {'1': 'message_count', '3': 2, '4': 1, '5': 5, '10': 'messageCount'}, + {'1': 'message_interval', '3': 3, '4': 1, '5': 5, '10': 'messageInterval'}, ], }; /// Descriptor for `ServerStreamingEchoRequest`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List serverStreamingEchoRequestDescriptor = $convert.base64Decode( - 'ChpTZXJ2ZXJTdHJlYW1pbmdFY2hvUmVxdWVzdBIYCgdtZXNzYWdlGAEgASgJUgdtZXNzYWdlEiMKDW1lc3NhZ2VfY291bnQYAiABKAVSDG1lc3NhZ2VDb3VudBIpChBtZXNzYWdlX2ludGVydmFsGAMgASgFUg9tZXNzYWdlSW50ZXJ2YWw='); + 'ChpTZXJ2ZXJTdHJlYW1pbmdFY2hvUmVxdWVzdBIYCgdtZXNzYWdlGAEgASgJUgdtZXNzYWdlEi' + 'MKDW1lc3NhZ2VfY291bnQYAiABKAVSDG1lc3NhZ2VDb3VudBIpChBtZXNzYWdlX2ludGVydmFs' + 'GAMgASgFUg9tZXNzYWdlSW50ZXJ2YWw='); + @$core.Deprecated('Use serverStreamingEchoResponseDescriptor instead') -const ServerStreamingEchoResponse$json = const { +const ServerStreamingEchoResponse$json = { '1': 'ServerStreamingEchoResponse', - '2': const [ - const {'1': 'message', '3': 1, '4': 1, '5': 9, '10': 'message'}, + '2': [ + {'1': 'message', '3': 1, '4': 1, '5': 9, '10': 'message'}, ], }; /// Descriptor for `ServerStreamingEchoResponse`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List serverStreamingEchoResponseDescriptor = $convert.base64Decode( - 'ChtTZXJ2ZXJTdHJlYW1pbmdFY2hvUmVzcG9uc2USGAoHbWVzc2FnZRgBIAEoCVIHbWVzc2FnZQ=='); + 'ChtTZXJ2ZXJTdHJlYW1pbmdFY2hvUmVzcG9uc2USGAoHbWVzc2FnZRgBIAEoCVIHbWVzc2FnZQ' + '=='); diff --git a/example/grpc-web/pubspec.yaml b/example/grpc-web/pubspec.yaml index 7729def..e215c13 100644 --- a/example/grpc-web/pubspec.yaml +++ b/example/grpc-web/pubspec.yaml @@ -8,7 +8,7 @@ environment: dependencies: grpc: path: ../../ - protobuf: ^2.0.0 + protobuf: ^3.0.0 dev_dependencies: build_runner: ^2.0.0 diff --git a/example/helloworld/lib/src/generated/helloworld.pb.dart b/example/helloworld/lib/src/generated/helloworld.pb.dart index 03e55ed..7a33afb 100644 --- a/example/helloworld/lib/src/generated/helloworld.pb.dart +++ b/example/helloworld/lib/src/generated/helloworld.pb.dart @@ -1,47 +1,44 @@ -/// +// // Generated code. Do not modify. // source: helloworld.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + +// 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 import 'dart:core' as $core; import 'package:protobuf/protobuf.dart' as $pb; +/// The request message containing the user's name. class HelloRequest extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'HelloRequest', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'helloworld'), - createEmptyInstance: create) - ..aOS( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'name') - ..hasRequiredFields = false; - - HelloRequest._() : super(); factory HelloRequest({ $core.String? name, }) { - final _result = create(); + final result = create(); if (name != null) { - _result.name = name; + result.name = name; } - return _result; + return result; } + HelloRequest._() : super(); factory HelloRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory HelloRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'HelloRequest', + package: const $pb.PackageName(_omitMessageNames ? '' : 'helloworld'), + createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'name') + ..hasRequiredFields = false; + @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') @@ -51,8 +48,10 @@ class HelloRequest extends $pb.GeneratedMessage { 'Will be removed in next major version') HelloRequest copyWith(void Function(HelloRequest) updates) => super.copyWith((message) => updates(message as HelloRequest)) - as HelloRequest; // ignore: deprecated_member_use + as HelloRequest; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static HelloRequest create() => HelloRequest._(); HelloRequest createEmptyInstance() => create(); @@ -76,39 +75,32 @@ class HelloRequest extends $pb.GeneratedMessage { void clearName() => clearField(1); } +/// The response message containing the greetings class HelloReply extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'HelloReply', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'helloworld'), - createEmptyInstance: create) - ..aOS( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'message') - ..hasRequiredFields = false; - - HelloReply._() : super(); factory HelloReply({ $core.String? message, }) { - final _result = create(); + final result = create(); if (message != null) { - _result.message = message; + result.message = message; } - return _result; + return result; } + HelloReply._() : super(); factory HelloReply.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory HelloReply.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'HelloReply', + package: const $pb.PackageName(_omitMessageNames ? '' : 'helloworld'), + createEmptyInstance: create) + ..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') @@ -117,9 +109,10 @@ class HelloReply extends $pb.GeneratedMessage { 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') HelloReply copyWith(void Function(HelloReply) updates) => - super.copyWith((message) => updates(message as HelloReply)) - as HelloReply; // ignore: deprecated_member_use + super.copyWith((message) => updates(message as HelloReply)) as HelloReply; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static HelloReply create() => HelloReply._(); HelloReply createEmptyInstance() => create(); @@ -141,3 +134,7 @@ class HelloReply extends $pb.GeneratedMessage { @$pb.TagNumber(1) void clearMessage() => clearField(1); } + +const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); +const _omitMessageNames = + $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/example/helloworld/lib/src/generated/helloworld.pbenum.dart b/example/helloworld/lib/src/generated/helloworld.pbenum.dart index aa94153..a40c87b 100644 --- a/example/helloworld/lib/src/generated/helloworld.pbenum.dart +++ b/example/helloworld/lib/src/generated/helloworld.pbenum.dart @@ -1,6 +1,10 @@ -/// +// // Generated code. Do not modify. // source: helloworld.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + +// 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 diff --git a/example/helloworld/lib/src/generated/helloworld.pbgrpc.dart b/example/helloworld/lib/src/generated/helloworld.pbgrpc.dart index 9ba3aa3..bf69a89 100644 --- a/example/helloworld/lib/src/generated/helloworld.pbgrpc.dart +++ b/example/helloworld/lib/src/generated/helloworld.pbgrpc.dart @@ -1,18 +1,25 @@ -/// +// // Generated code. Do not modify. // source: helloworld.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + +// 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 import 'dart:async' as $async; - import 'dart:core' as $core; import 'package:grpc/service_api.dart' as $grpc; +import 'package:protobuf/protobuf.dart' as $pb; + import 'helloworld.pb.dart' as $0; + export 'helloworld.pb.dart'; +@$pb.GrpcServiceName('helloworld.Greeter') class GreeterClient extends $grpc.Client { static final _$sayHello = $grpc.ClientMethod<$0.HelloRequest, $0.HelloReply>( '/helloworld.Greeter/SayHello', @@ -30,6 +37,7 @@ class GreeterClient extends $grpc.Client { } } +@$pb.GrpcServiceName('helloworld.Greeter') abstract class GreeterServiceBase extends $grpc.Service { $core.String get $name => 'helloworld.Greeter'; diff --git a/example/helloworld/lib/src/generated/helloworld.pbjson.dart b/example/helloworld/lib/src/generated/helloworld.pbjson.dart index a4a9fc0..6807b18 100644 --- a/example/helloworld/lib/src/generated/helloworld.pbjson.dart +++ b/example/helloworld/lib/src/generated/helloworld.pbjson.dart @@ -1,30 +1,35 @@ -/// +// // Generated code. Do not modify. // source: helloworld.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,deprecated_member_use_from_same_package,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name -import 'dart:core' as $core; +// 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 + import 'dart:convert' as $convert; +import 'dart:core' as $core; import 'dart:typed_data' as $typed_data; @$core.Deprecated('Use helloRequestDescriptor instead') -const HelloRequest$json = const { +const HelloRequest$json = { '1': 'HelloRequest', - '2': const [ - const {'1': 'name', '3': 1, '4': 1, '5': 9, '10': 'name'}, + '2': [ + {'1': 'name', '3': 1, '4': 1, '5': 9, '10': 'name'}, ], }; /// Descriptor for `HelloRequest`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List helloRequestDescriptor = $convert.base64Decode('CgxIZWxsb1JlcXVlc3QSEgoEbmFtZRgBIAEoCVIEbmFtZQ=='); + @$core.Deprecated('Use helloReplyDescriptor instead') -const HelloReply$json = const { +const HelloReply$json = { '1': 'HelloReply', - '2': const [ - const {'1': 'message', '3': 1, '4': 1, '5': 9, '10': 'message'}, + '2': [ + {'1': 'message', '3': 1, '4': 1, '5': 9, '10': 'message'}, ], }; diff --git a/example/helloworld/pubspec.yaml b/example/helloworld/pubspec.yaml index cfb7063..33431c5 100644 --- a/example/helloworld/pubspec.yaml +++ b/example/helloworld/pubspec.yaml @@ -9,7 +9,7 @@ dependencies: async: ^2.2.0 grpc: path: ../../ - protobuf: ^2.0.0 + protobuf: ^3.0.0 dev_dependencies: lints: ^2.0.0 diff --git a/example/metadata/lib/src/generated/metadata.pb.dart b/example/metadata/lib/src/generated/metadata.pb.dart index ae06e73..f44b609 100644 --- a/example/metadata/lib/src/generated/metadata.pb.dart +++ b/example/metadata/lib/src/generated/metadata.pb.dart @@ -1,47 +1,44 @@ -/// +// // Generated code. Do not modify. // source: metadata.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + +// 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 import 'dart:core' as $core; import 'package:protobuf/protobuf.dart' as $pb; +/// A message containing a single string value. class Record extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'Record', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'grpc'), - createEmptyInstance: create) - ..aOS( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'value') - ..hasRequiredFields = false; - - Record._() : super(); factory Record({ $core.String? value, }) { - final _result = create(); + final result = create(); if (value != null) { - _result.value = value; + result.value = value; } - return _result; + return result; } + Record._() : super(); factory Record.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory Record.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'Record', + package: const $pb.PackageName(_omitMessageNames ? '' : 'grpc'), + createEmptyInstance: create) + ..aOS(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') @@ -50,9 +47,10 @@ class Record extends $pb.GeneratedMessage { 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') Record copyWith(void Function(Record) updates) => - super.copyWith((message) => updates(message as Record)) - as Record; // ignore: deprecated_member_use + super.copyWith((message) => updates(message as Record)) as Record; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static Record create() => Record._(); Record createEmptyInstance() => create(); @@ -75,40 +73,32 @@ class Record extends $pb.GeneratedMessage { void clearValue() => clearField(1); } +/// A message containing a single number. class Number extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'Number', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'grpc'), - createEmptyInstance: create) - ..a<$core.int>( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'value', - $pb.PbFieldType.O3) - ..hasRequiredFields = false; - - Number._() : super(); factory Number({ $core.int? value, }) { - final _result = create(); + final result = create(); if (value != null) { - _result.value = value; + result.value = value; } - return _result; + return result; } + Number._() : super(); factory Number.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory Number.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'Number', + package: const $pb.PackageName(_omitMessageNames ? '' : 'grpc'), + createEmptyInstance: create) + ..a<$core.int>(1, _omitFieldNames ? '' : 'value', $pb.PbFieldType.O3) + ..hasRequiredFields = false; + @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') @@ -117,9 +107,10 @@ class Number extends $pb.GeneratedMessage { 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') Number copyWith(void Function(Number) updates) => - super.copyWith((message) => updates(message as Number)) - as Number; // ignore: deprecated_member_use + super.copyWith((message) => updates(message as Number)) as Number; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static Number create() => Number._(); Number createEmptyInstance() => create(); @@ -142,26 +133,23 @@ class Number extends $pb.GeneratedMessage { void clearValue() => clearField(1); } +/// A message containing nothing. class Empty extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'Empty', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'grpc'), - createEmptyInstance: create) - ..hasRequiredFields = false; - - Empty._() : super(); 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); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'Empty', + package: const $pb.PackageName(_omitMessageNames ? '' : 'grpc'), + 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') @@ -170,9 +158,10 @@ class Empty extends $pb.GeneratedMessage { 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') Empty copyWith(void Function(Empty) updates) => - super.copyWith((message) => updates(message as Empty)) - as Empty; // ignore: deprecated_member_use + super.copyWith((message) => updates(message as Empty)) as Empty; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static Empty create() => Empty._(); Empty createEmptyInstance() => create(); @@ -182,3 +171,7 @@ class Empty extends $pb.GeneratedMessage { _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static Empty? _defaultInstance; } + +const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); +const _omitMessageNames = + $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/example/metadata/lib/src/generated/metadata.pbgrpc.dart b/example/metadata/lib/src/generated/metadata.pbgrpc.dart index ad24d0f..2c7a6c8 100644 --- a/example/metadata/lib/src/generated/metadata.pbgrpc.dart +++ b/example/metadata/lib/src/generated/metadata.pbgrpc.dart @@ -1,18 +1,25 @@ -/// +// // Generated code. Do not modify. // source: metadata.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + +// 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 import 'dart:async' as $async; - import 'dart:core' as $core; import 'package:grpc/service_api.dart' as $grpc; +import 'package:protobuf/protobuf.dart' as $pb; + import 'metadata.pb.dart' as $0; + export 'metadata.pb.dart'; +@$pb.GrpcServiceName('grpc.Metadata') class MetadataClient extends $grpc.Client { static final _$echo = $grpc.ClientMethod<$0.Record, $0.Record>( '/grpc.Metadata/Echo', @@ -50,6 +57,7 @@ class MetadataClient extends $grpc.Client { } } +@$pb.GrpcServiceName('grpc.Metadata') abstract class MetadataServiceBase extends $grpc.Service { $core.String get $name => 'grpc.Metadata'; diff --git a/example/metadata/pubspec.yaml b/example/metadata/pubspec.yaml index cf7bc07..61e0dc6 100644 --- a/example/metadata/pubspec.yaml +++ b/example/metadata/pubspec.yaml @@ -9,7 +9,7 @@ dependencies: async: ^2.2.0 grpc: path: ../../ - protobuf: ^2.0.0 + protobuf: ^3.0.0 dev_dependencies: lints: ^2.0.0 diff --git a/example/route_guide/lib/src/generated/route_guide.pb.dart b/example/route_guide/lib/src/generated/route_guide.pb.dart index af1b491..8b709f6 100644 --- a/example/route_guide/lib/src/generated/route_guide.pb.dart +++ b/example/route_guide/lib/src/generated/route_guide.pb.dart @@ -1,58 +1,52 @@ -/// +// // Generated code. Do not modify. // source: route_guide.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + +// 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 import 'dart:core' as $core; import 'package:protobuf/protobuf.dart' as $pb; +/// Points are represented as latitude-longitude pairs in the E7 representation +/// (degrees multiplied by 10**7 and rounded to the nearest integer). +/// Latitudes should be in the range +/- 90 degrees and longitude should be in +/// the range +/- 180 degrees (inclusive). class Point extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'Point', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'routeguide'), - createEmptyInstance: create) - ..a<$core.int>( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'latitude', - $pb.PbFieldType.O3) - ..a<$core.int>( - 2, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'longitude', - $pb.PbFieldType.O3) - ..hasRequiredFields = false; - - Point._() : super(); factory Point({ $core.int? latitude, $core.int? longitude, }) { - final _result = create(); + final result = create(); if (latitude != null) { - _result.latitude = latitude; + result.latitude = latitude; } if (longitude != null) { - _result.longitude = longitude; + result.longitude = longitude; } - return _result; + return result; } + Point._() : super(); factory Point.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory Point.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'Point', + package: const $pb.PackageName(_omitMessageNames ? '' : 'routeguide'), + createEmptyInstance: create) + ..a<$core.int>(1, _omitFieldNames ? '' : 'latitude', $pb.PbFieldType.O3) + ..a<$core.int>(2, _omitFieldNames ? '' : 'longitude', $pb.PbFieldType.O3) + ..hasRequiredFields = false; + @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') @@ -61,9 +55,10 @@ class Point extends $pb.GeneratedMessage { 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') Point copyWith(void Function(Point) updates) => - super.copyWith((message) => updates(message as Point)) - as Point; // ignore: deprecated_member_use + super.copyWith((message) => updates(message as Point)) as Point; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static Point create() => Point._(); Point createEmptyInstance() => create(); @@ -98,50 +93,38 @@ class Point extends $pb.GeneratedMessage { void clearLongitude() => clearField(2); } +/// A latitude-longitude rectangle, represented as two diagonally opposite +/// points "lo" and "hi". class Rectangle extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'Rectangle', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'routeguide'), - createEmptyInstance: create) - ..aOM( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'lo', - subBuilder: Point.create) - ..aOM( - 2, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'hi', - subBuilder: Point.create) - ..hasRequiredFields = false; - - Rectangle._() : super(); factory Rectangle({ Point? lo, Point? hi, }) { - final _result = create(); + final result = create(); if (lo != null) { - _result.lo = lo; + result.lo = lo; } if (hi != null) { - _result.hi = hi; + result.hi = hi; } - return _result; + return result; } + Rectangle._() : super(); factory Rectangle.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory Rectangle.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'Rectangle', + package: const $pb.PackageName(_omitMessageNames ? '' : 'routeguide'), + createEmptyInstance: create) + ..aOM(1, _omitFieldNames ? '' : 'lo', subBuilder: Point.create) + ..aOM(2, _omitFieldNames ? '' : 'hi', subBuilder: Point.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') @@ -150,9 +133,10 @@ class Rectangle extends $pb.GeneratedMessage { 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') Rectangle copyWith(void Function(Rectangle) updates) => - super.copyWith((message) => updates(message as Rectangle)) - as Rectangle; // ignore: deprecated_member_use + super.copyWith((message) => updates(message as Rectangle)) as Rectangle; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static Rectangle create() => Rectangle._(); Rectangle createEmptyInstance() => create(); @@ -162,6 +146,7 @@ class Rectangle extends $pb.GeneratedMessage { _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static Rectangle? _defaultInstance; + /// One corner of the rectangle. @$pb.TagNumber(1) Point get lo => $_getN(0); @$pb.TagNumber(1) @@ -176,6 +161,7 @@ class Rectangle extends $pb.GeneratedMessage { @$pb.TagNumber(1) Point ensureLo() => $_ensure(0); + /// The other corner of the rectangle. @$pb.TagNumber(2) Point get hi => $_getN(1); @$pb.TagNumber(2) @@ -191,49 +177,39 @@ class Rectangle extends $pb.GeneratedMessage { Point ensureHi() => $_ensure(1); } +/// A feature names something at a given point. +/// +/// If a feature could not be named, the name is empty. class Feature extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'Feature', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'routeguide'), - createEmptyInstance: create) - ..aOS( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'name') - ..aOM( - 2, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'location', - subBuilder: Point.create) - ..hasRequiredFields = false; - - Feature._() : super(); factory Feature({ $core.String? name, Point? location, }) { - final _result = create(); + final result = create(); if (name != null) { - _result.name = name; + result.name = name; } if (location != null) { - _result.location = location; + result.location = location; } - return _result; + return result; } + Feature._() : super(); factory Feature.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory Feature.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'Feature', + package: const $pb.PackageName(_omitMessageNames ? '' : 'routeguide'), + createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'name') + ..aOM(2, _omitFieldNames ? '' : 'location', subBuilder: Point.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') @@ -242,9 +218,10 @@ class Feature extends $pb.GeneratedMessage { 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') Feature copyWith(void Function(Feature) updates) => - super.copyWith((message) => updates(message as Feature)) - as Feature; // ignore: deprecated_member_use + super.copyWith((message) => updates(message as Feature)) as Feature; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static Feature create() => Feature._(); Feature createEmptyInstance() => create(); @@ -254,6 +231,7 @@ class Feature extends $pb.GeneratedMessage { _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static Feature? _defaultInstance; + /// The name of the feature. @$pb.TagNumber(1) $core.String get name => $_getSZ(0); @$pb.TagNumber(1) @@ -266,6 +244,7 @@ class Feature extends $pb.GeneratedMessage { @$pb.TagNumber(1) void clearName() => clearField(1); + /// The point where the feature is detected. @$pb.TagNumber(2) Point get location => $_getN(1); @$pb.TagNumber(2) @@ -281,49 +260,37 @@ class Feature extends $pb.GeneratedMessage { Point ensureLocation() => $_ensure(1); } +/// A RouteNote is a message sent while at a given point. class RouteNote extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'RouteNote', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'routeguide'), - createEmptyInstance: create) - ..aOM( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'location', - subBuilder: Point.create) - ..aOS( - 2, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'message') - ..hasRequiredFields = false; - - RouteNote._() : super(); factory RouteNote({ Point? location, $core.String? message, }) { - final _result = create(); + final result = create(); if (location != null) { - _result.location = location; + result.location = location; } if (message != null) { - _result.message = message; + result.message = message; } - return _result; + return result; } + RouteNote._() : super(); factory RouteNote.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory RouteNote.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'RouteNote', + package: const $pb.PackageName(_omitMessageNames ? '' : 'routeguide'), + createEmptyInstance: create) + ..aOM(1, _omitFieldNames ? '' : 'location', subBuilder: Point.create) + ..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') @@ -332,9 +299,10 @@ class RouteNote extends $pb.GeneratedMessage { 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') RouteNote copyWith(void Function(RouteNote) updates) => - super.copyWith((message) => updates(message as RouteNote)) - as RouteNote; // ignore: deprecated_member_use + super.copyWith((message) => updates(message as RouteNote)) as RouteNote; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static RouteNote create() => RouteNote._(); RouteNote createEmptyInstance() => create(); @@ -344,6 +312,7 @@ class RouteNote extends $pb.GeneratedMessage { _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static RouteNote? _defaultInstance; + /// The location from which the message is sent. @$pb.TagNumber(1) Point get location => $_getN(0); @$pb.TagNumber(1) @@ -358,6 +327,7 @@ class RouteNote extends $pb.GeneratedMessage { @$pb.TagNumber(1) Point ensureLocation() => $_ensure(0); + /// The message to be sent. @$pb.TagNumber(2) $core.String get message => $_getSZ(1); @$pb.TagNumber(2) @@ -371,70 +341,51 @@ class RouteNote extends $pb.GeneratedMessage { void clearMessage() => clearField(2); } +/// A RouteSummary is received in response to a RecordRoute rpc. +/// +/// It contains the number of individual points received, the number of +/// detected features, and the total distance covered as the cumulative sum of +/// the distance between each point. class RouteSummary extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'RouteSummary', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'routeguide'), - createEmptyInstance: create) - ..a<$core.int>( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'pointCount', - $pb.PbFieldType.O3) - ..a<$core.int>( - 2, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'featureCount', - $pb.PbFieldType.O3) - ..a<$core.int>( - 3, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'distance', - $pb.PbFieldType.O3) - ..a<$core.int>( - 4, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'elapsedTime', - $pb.PbFieldType.O3) - ..hasRequiredFields = false; - - RouteSummary._() : super(); factory RouteSummary({ $core.int? pointCount, $core.int? featureCount, $core.int? distance, $core.int? elapsedTime, }) { - final _result = create(); + final result = create(); if (pointCount != null) { - _result.pointCount = pointCount; + result.pointCount = pointCount; } if (featureCount != null) { - _result.featureCount = featureCount; + result.featureCount = featureCount; } if (distance != null) { - _result.distance = distance; + result.distance = distance; } if (elapsedTime != null) { - _result.elapsedTime = elapsedTime; + result.elapsedTime = elapsedTime; } - return _result; + return result; } + RouteSummary._() : super(); factory RouteSummary.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory RouteSummary.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'RouteSummary', + package: const $pb.PackageName(_omitMessageNames ? '' : 'routeguide'), + createEmptyInstance: create) + ..a<$core.int>(1, _omitFieldNames ? '' : 'pointCount', $pb.PbFieldType.O3) + ..a<$core.int>(2, _omitFieldNames ? '' : 'featureCount', $pb.PbFieldType.O3) + ..a<$core.int>(3, _omitFieldNames ? '' : 'distance', $pb.PbFieldType.O3) + ..a<$core.int>(4, _omitFieldNames ? '' : 'elapsedTime', $pb.PbFieldType.O3) + ..hasRequiredFields = false; + @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') @@ -444,8 +395,10 @@ class RouteSummary extends $pb.GeneratedMessage { 'Will be removed in next major version') RouteSummary copyWith(void Function(RouteSummary) updates) => super.copyWith((message) => updates(message as RouteSummary)) - as RouteSummary; // ignore: deprecated_member_use + as RouteSummary; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static RouteSummary create() => RouteSummary._(); RouteSummary createEmptyInstance() => create(); @@ -456,6 +409,7 @@ class RouteSummary extends $pb.GeneratedMessage { $pb.GeneratedMessage.$_defaultFor(create); static RouteSummary? _defaultInstance; + /// The number of points received. @$pb.TagNumber(1) $core.int get pointCount => $_getIZ(0); @$pb.TagNumber(1) @@ -468,6 +422,7 @@ class RouteSummary extends $pb.GeneratedMessage { @$pb.TagNumber(1) void clearPointCount() => clearField(1); + /// The number of known features passed while traversing the route. @$pb.TagNumber(2) $core.int get featureCount => $_getIZ(1); @$pb.TagNumber(2) @@ -480,6 +435,7 @@ class RouteSummary extends $pb.GeneratedMessage { @$pb.TagNumber(2) void clearFeatureCount() => clearField(2); + /// The distance covered in metres. @$pb.TagNumber(3) $core.int get distance => $_getIZ(2); @$pb.TagNumber(3) @@ -492,6 +448,7 @@ class RouteSummary extends $pb.GeneratedMessage { @$pb.TagNumber(3) void clearDistance() => clearField(3); + /// The duration of the traversal in seconds. @$pb.TagNumber(4) $core.int get elapsedTime => $_getIZ(3); @$pb.TagNumber(4) @@ -504,3 +461,7 @@ class RouteSummary extends $pb.GeneratedMessage { @$pb.TagNumber(4) void clearElapsedTime() => clearField(4); } + +const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); +const _omitMessageNames = + $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/example/route_guide/lib/src/generated/route_guide.pbenum.dart b/example/route_guide/lib/src/generated/route_guide.pbenum.dart index 5cafe25..82b5bf6 100644 --- a/example/route_guide/lib/src/generated/route_guide.pbenum.dart +++ b/example/route_guide/lib/src/generated/route_guide.pbenum.dart @@ -1,6 +1,10 @@ -/// +// // Generated code. Do not modify. // source: route_guide.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + +// 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 diff --git a/example/route_guide/lib/src/generated/route_guide.pbgrpc.dart b/example/route_guide/lib/src/generated/route_guide.pbgrpc.dart index 62d98a3..cd0494e 100644 --- a/example/route_guide/lib/src/generated/route_guide.pbgrpc.dart +++ b/example/route_guide/lib/src/generated/route_guide.pbgrpc.dart @@ -1,18 +1,25 @@ -/// +// // Generated code. Do not modify. // source: route_guide.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + +// 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 import 'dart:async' as $async; - import 'dart:core' as $core; import 'package:grpc/service_api.dart' as $grpc; +import 'package:protobuf/protobuf.dart' as $pb; + import 'route_guide.pb.dart' as $0; + export 'route_guide.pb.dart'; +@$pb.GrpcServiceName('routeguide.RouteGuide') class RouteGuideClient extends $grpc.Client { static final _$getFeature = $grpc.ClientMethod<$0.Point, $0.Feature>( '/routeguide.RouteGuide/GetFeature', @@ -62,6 +69,7 @@ class RouteGuideClient extends $grpc.Client { } } +@$pb.GrpcServiceName('routeguide.RouteGuide') abstract class RouteGuideServiceBase extends $grpc.Service { $core.String get $name => 'routeguide.RouteGuide'; diff --git a/example/route_guide/lib/src/generated/route_guide.pbjson.dart b/example/route_guide/lib/src/generated/route_guide.pbjson.dart index af8eb55..325f3c0 100644 --- a/example/route_guide/lib/src/generated/route_guide.pbjson.dart +++ b/example/route_guide/lib/src/generated/route_guide.pbjson.dart @@ -1,58 +1,52 @@ -/// +// // Generated code. Do not modify. // source: route_guide.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,deprecated_member_use_from_same_package,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name -import 'dart:core' as $core; +// 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 + import 'dart:convert' as $convert; +import 'dart:core' as $core; import 'dart:typed_data' as $typed_data; @$core.Deprecated('Use pointDescriptor instead') -const Point$json = const { +const Point$json = { '1': 'Point', - '2': const [ - const {'1': 'latitude', '3': 1, '4': 1, '5': 5, '10': 'latitude'}, - const {'1': 'longitude', '3': 2, '4': 1, '5': 5, '10': 'longitude'}, + '2': [ + {'1': 'latitude', '3': 1, '4': 1, '5': 5, '10': 'latitude'}, + {'1': 'longitude', '3': 2, '4': 1, '5': 5, '10': 'longitude'}, ], }; /// Descriptor for `Point`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List pointDescriptor = $convert.base64Decode( - 'CgVQb2ludBIaCghsYXRpdHVkZRgBIAEoBVIIbGF0aXR1ZGUSHAoJbG9uZ2l0dWRlGAIgASgFUglsb25naXR1ZGU='); + 'CgVQb2ludBIaCghsYXRpdHVkZRgBIAEoBVIIbGF0aXR1ZGUSHAoJbG9uZ2l0dWRlGAIgASgFUg' + 'lsb25naXR1ZGU='); + @$core.Deprecated('Use rectangleDescriptor instead') -const Rectangle$json = const { +const Rectangle$json = { '1': 'Rectangle', - '2': const [ - const { - '1': 'lo', - '3': 1, - '4': 1, - '5': 11, - '6': '.routeguide.Point', - '10': 'lo' - }, - const { - '1': 'hi', - '3': 2, - '4': 1, - '5': 11, - '6': '.routeguide.Point', - '10': 'hi' - }, + '2': [ + {'1': 'lo', '3': 1, '4': 1, '5': 11, '6': '.routeguide.Point', '10': 'lo'}, + {'1': 'hi', '3': 2, '4': 1, '5': 11, '6': '.routeguide.Point', '10': 'hi'}, ], }; /// Descriptor for `Rectangle`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List rectangleDescriptor = $convert.base64Decode( - 'CglSZWN0YW5nbGUSIQoCbG8YASABKAsyES5yb3V0ZWd1aWRlLlBvaW50UgJsbxIhCgJoaRgCIAEoCzIRLnJvdXRlZ3VpZGUuUG9pbnRSAmhp'); + 'CglSZWN0YW5nbGUSIQoCbG8YASABKAsyES5yb3V0ZWd1aWRlLlBvaW50UgJsbxIhCgJoaRgCIA' + 'EoCzIRLnJvdXRlZ3VpZGUuUG9pbnRSAmhp'); + @$core.Deprecated('Use featureDescriptor instead') -const Feature$json = const { +const Feature$json = { '1': 'Feature', - '2': const [ - const {'1': 'name', '3': 1, '4': 1, '5': 9, '10': 'name'}, - const { + '2': [ + {'1': 'name', '3': 1, '4': 1, '5': 9, '10': 'name'}, + { '1': 'location', '3': 2, '4': 1, @@ -65,12 +59,14 @@ const Feature$json = const { /// Descriptor for `Feature`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List featureDescriptor = $convert.base64Decode( - 'CgdGZWF0dXJlEhIKBG5hbWUYASABKAlSBG5hbWUSLQoIbG9jYXRpb24YAiABKAsyES5yb3V0ZWd1aWRlLlBvaW50Ughsb2NhdGlvbg=='); + 'CgdGZWF0dXJlEhIKBG5hbWUYASABKAlSBG5hbWUSLQoIbG9jYXRpb24YAiABKAsyES5yb3V0ZW' + 'd1aWRlLlBvaW50Ughsb2NhdGlvbg=='); + @$core.Deprecated('Use routeNoteDescriptor instead') -const RouteNote$json = const { +const RouteNote$json = { '1': 'RouteNote', - '2': const [ - const { + '2': [ + { '1': 'location', '3': 1, '4': 1, @@ -78,24 +74,28 @@ const RouteNote$json = const { '6': '.routeguide.Point', '10': 'location' }, - const {'1': 'message', '3': 2, '4': 1, '5': 9, '10': 'message'}, + {'1': 'message', '3': 2, '4': 1, '5': 9, '10': 'message'}, ], }; /// Descriptor for `RouteNote`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List routeNoteDescriptor = $convert.base64Decode( - 'CglSb3V0ZU5vdGUSLQoIbG9jYXRpb24YASABKAsyES5yb3V0ZWd1aWRlLlBvaW50Ughsb2NhdGlvbhIYCgdtZXNzYWdlGAIgASgJUgdtZXNzYWdl'); + 'CglSb3V0ZU5vdGUSLQoIbG9jYXRpb24YASABKAsyES5yb3V0ZWd1aWRlLlBvaW50Ughsb2NhdG' + 'lvbhIYCgdtZXNzYWdlGAIgASgJUgdtZXNzYWdl'); + @$core.Deprecated('Use routeSummaryDescriptor instead') -const RouteSummary$json = const { +const RouteSummary$json = { '1': 'RouteSummary', - '2': const [ - const {'1': 'point_count', '3': 1, '4': 1, '5': 5, '10': 'pointCount'}, - const {'1': 'feature_count', '3': 2, '4': 1, '5': 5, '10': 'featureCount'}, - const {'1': 'distance', '3': 3, '4': 1, '5': 5, '10': 'distance'}, - const {'1': 'elapsed_time', '3': 4, '4': 1, '5': 5, '10': 'elapsedTime'}, + '2': [ + {'1': 'point_count', '3': 1, '4': 1, '5': 5, '10': 'pointCount'}, + {'1': 'feature_count', '3': 2, '4': 1, '5': 5, '10': 'featureCount'}, + {'1': 'distance', '3': 3, '4': 1, '5': 5, '10': 'distance'}, + {'1': 'elapsed_time', '3': 4, '4': 1, '5': 5, '10': 'elapsedTime'}, ], }; /// Descriptor for `RouteSummary`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List routeSummaryDescriptor = $convert.base64Decode( - 'CgxSb3V0ZVN1bW1hcnkSHwoLcG9pbnRfY291bnQYASABKAVSCnBvaW50Q291bnQSIwoNZmVhdHVyZV9jb3VudBgCIAEoBVIMZmVhdHVyZUNvdW50EhoKCGRpc3RhbmNlGAMgASgFUghkaXN0YW5jZRIhCgxlbGFwc2VkX3RpbWUYBCABKAVSC2VsYXBzZWRUaW1l'); + 'CgxSb3V0ZVN1bW1hcnkSHwoLcG9pbnRfY291bnQYASABKAVSCnBvaW50Q291bnQSIwoNZmVhdH' + 'VyZV9jb3VudBgCIAEoBVIMZmVhdHVyZUNvdW50EhoKCGRpc3RhbmNlGAMgASgFUghkaXN0YW5j' + 'ZRIhCgxlbGFwc2VkX3RpbWUYBCABKAVSC2VsYXBzZWRUaW1l'); diff --git a/example/route_guide/pubspec.yaml b/example/route_guide/pubspec.yaml index 3a98742..164885f 100644 --- a/example/route_guide/pubspec.yaml +++ b/example/route_guide/pubspec.yaml @@ -9,7 +9,7 @@ dependencies: async: ^2.2.0 grpc: path: ../../ - protobuf: ^2.0.0 + protobuf: ^3.0.0 collection: ^1.15.0-nullsafety.4 dev_dependencies: diff --git a/interop/lib/src/generated/empty.pb.dart b/interop/lib/src/generated/empty.pb.dart index 1a07ec7..afe1522 100644 --- a/interop/lib/src/generated/empty.pb.dart +++ b/interop/lib/src/generated/empty.pb.dart @@ -1,34 +1,41 @@ -/// +// // Generated code. Do not modify. // source: empty.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + +// 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 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: +/// +/// service Foo { +/// rpc Bar (grpc.testing.Empty) returns (grpc.testing.Empty) { }; +/// }; class Empty extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'Empty', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'grpc.testing'), - createEmptyInstance: create) - ..hasRequiredFields = false; - - Empty._() : super(); 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); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'Empty', + package: const $pb.PackageName(_omitMessageNames ? '' : 'grpc.testing'), + 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') @@ -37,9 +44,10 @@ class Empty extends $pb.GeneratedMessage { 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') Empty copyWith(void Function(Empty) updates) => - super.copyWith((message) => updates(message as Empty)) - as Empty; // ignore: deprecated_member_use + super.copyWith((message) => updates(message as Empty)) as Empty; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static Empty create() => Empty._(); Empty createEmptyInstance() => create(); @@ -49,3 +57,6 @@ class Empty extends $pb.GeneratedMessage { _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static Empty? _defaultInstance; } + +const _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 7d54ce0..2983301 100644 --- a/interop/lib/src/generated/messages.pb.dart +++ b/interop/lib/src/generated/messages.pb.dart @@ -1,9 +1,13 @@ -/// +// // Generated code. Do not modify. // source: messages.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + +// 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 import 'dart:core' as $core; @@ -13,39 +17,34 @@ import 'messages.pbenum.dart'; export 'messages.pbenum.dart'; +/// TODO(dgq): Go back to using well-known types once +/// https://github.com/grpc/grpc/issues/6980 has been fixed. +/// import "google/protobuf/wrappers.proto"; class BoolValue extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'BoolValue', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'grpc.testing'), - createEmptyInstance: create) - ..aOB( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'value') - ..hasRequiredFields = false; - - BoolValue._() : super(); factory BoolValue({ $core.bool? value, }) { - final _result = create(); + final result = create(); if (value != null) { - _result.value = value; + result.value = value; } - return _result; + 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); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'BoolValue', + package: const $pb.PackageName(_omitMessageNames ? '' : 'grpc.testing'), + createEmptyInstance: create) + ..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') @@ -54,9 +53,10 @@ class BoolValue extends $pb.GeneratedMessage { 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') BoolValue copyWith(void Function(BoolValue) updates) => - super.copyWith((message) => updates(message as BoolValue)) - as BoolValue; // ignore: deprecated_member_use + super.copyWith((message) => updates(message as BoolValue)) as BoolValue; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static BoolValue create() => BoolValue._(); BoolValue createEmptyInstance() => create(); @@ -66,6 +66,7 @@ class BoolValue extends $pb.GeneratedMessage { _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static BoolValue? _defaultInstance; + /// The bool value. @$pb.TagNumber(1) $core.bool get value => $_getBF(0); @$pb.TagNumber(1) @@ -79,53 +80,41 @@ class BoolValue extends $pb.GeneratedMessage { void clearValue() => clearField(1); } +/// A block of data, to simply increase gRPC message size. class Payload extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'Payload', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'grpc.testing'), - createEmptyInstance: create) - ..e( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'type', - $pb.PbFieldType.OE, - defaultOrMaker: PayloadType.COMPRESSABLE, - valueOf: PayloadType.valueOf, - enumValues: PayloadType.values) - ..a<$core.List<$core.int>>( - 2, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'body', - $pb.PbFieldType.OY) - ..hasRequiredFields = false; - - Payload._() : super(); factory Payload({ PayloadType? type, $core.List<$core.int>? body, }) { - final _result = create(); + final result = create(); if (type != null) { - _result.type = type; + result.type = type; } if (body != null) { - _result.body = body; + result.body = body; } - return _result; + 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); + + 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, + 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') @@ -134,9 +123,10 @@ class Payload extends $pb.GeneratedMessage { 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') Payload copyWith(void Function(Payload) updates) => - super.copyWith((message) => updates(message as Payload)) - as Payload; // ignore: deprecated_member_use + super.copyWith((message) => updates(message as Payload)) as Payload; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static Payload create() => Payload._(); Payload createEmptyInstance() => create(); @@ -146,6 +136,8 @@ class Payload extends $pb.GeneratedMessage { _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static Payload? _defaultInstance; + /// DEPRECATED, don't use. To be removed shortly. + /// The type of data in body. @$pb.TagNumber(1) PayloadType get type => $_getN(0); @$pb.TagNumber(1) @@ -158,6 +150,7 @@ class Payload extends $pb.GeneratedMessage { @$pb.TagNumber(1) void clearType() => clearField(1); + /// Primary contents of payload. @$pb.TagNumber(2) $core.List<$core.int> get body => $_getN(1); @$pb.TagNumber(2) @@ -171,49 +164,38 @@ class Payload extends $pb.GeneratedMessage { void clearBody() => clearField(2); } +/// A protobuf representation for grpc status. This is used by test +/// clients to specify a status that the server should attempt to return. class EchoStatus extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'EchoStatus', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'grpc.testing'), - createEmptyInstance: create) - ..a<$core.int>( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'code', - $pb.PbFieldType.O3) - ..aOS( - 2, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'message') - ..hasRequiredFields = false; - - EchoStatus._() : super(); factory EchoStatus({ $core.int? code, $core.String? message, }) { - final _result = create(); + final result = create(); if (code != null) { - _result.code = code; + result.code = code; } if (message != null) { - _result.message = message; + result.message = message; } - return _result; + 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); + + 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) + ..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') @@ -222,9 +204,10 @@ class EchoStatus extends $pb.GeneratedMessage { 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') EchoStatus copyWith(void Function(EchoStatus) updates) => - super.copyWith((message) => updates(message as EchoStatus)) - as EchoStatus; // ignore: deprecated_member_use + super.copyWith((message) => updates(message as EchoStatus)) as EchoStatus; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static EchoStatus create() => EchoStatus._(); EchoStatus createEmptyInstance() => create(); @@ -259,68 +242,8 @@ class EchoStatus extends $pb.GeneratedMessage { void clearMessage() => clearField(2); } +/// Unary request. class SimpleRequest extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'SimpleRequest', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'grpc.testing'), - createEmptyInstance: create) - ..e( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'responseType', - $pb.PbFieldType.OE, - defaultOrMaker: PayloadType.COMPRESSABLE, - valueOf: PayloadType.valueOf, - enumValues: PayloadType.values) - ..a<$core.int>( - 2, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'responseSize', - $pb.PbFieldType.O3) - ..aOM( - 3, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'payload', - subBuilder: Payload.create) - ..aOB( - 4, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'fillUsername') - ..aOB( - 5, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'fillOauthScope') - ..aOM( - 6, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'responseCompressed', - subBuilder: BoolValue.create) - ..aOM( - 7, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'responseStatus', - subBuilder: EchoStatus.create) - ..aOM( - 8, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'expectCompressed', - subBuilder: BoolValue.create) - ..hasRequiredFields = false; - - SimpleRequest._() : super(); factory SimpleRequest({ PayloadType? responseType, $core.int? responseSize, @@ -331,39 +254,63 @@ class SimpleRequest extends $pb.GeneratedMessage { EchoStatus? responseStatus, BoolValue? expectCompressed, }) { - final _result = create(); + final result = create(); if (responseType != null) { - _result.responseType = responseType; + result.responseType = responseType; } if (responseSize != null) { - _result.responseSize = responseSize; + result.responseSize = responseSize; } if (payload != null) { - _result.payload = payload; + result.payload = payload; } if (fillUsername != null) { - _result.fillUsername = fillUsername; + result.fillUsername = fillUsername; } if (fillOauthScope != null) { - _result.fillOauthScope = fillOauthScope; + result.fillOauthScope = fillOauthScope; } if (responseCompressed != null) { - _result.responseCompressed = responseCompressed; + result.responseCompressed = responseCompressed; } if (responseStatus != null) { - _result.responseStatus = responseStatus; + result.responseStatus = responseStatus; } if (expectCompressed != null) { - _result.expectCompressed = expectCompressed; + result.expectCompressed = expectCompressed; } - return _result; + 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); + + 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, + enumValues: PayloadType.values) + ..a<$core.int>(2, _omitFieldNames ? '' : 'responseSize', $pb.PbFieldType.O3) + ..aOM(3, _omitFieldNames ? '' : 'payload', + subBuilder: Payload.create) + ..aOB(4, _omitFieldNames ? '' : 'fillUsername') + ..aOB(5, _omitFieldNames ? '' : 'fillOauthScope') + ..aOM(6, _omitFieldNames ? '' : 'responseCompressed', + subBuilder: BoolValue.create) + ..aOM(7, _omitFieldNames ? '' : 'responseStatus', + subBuilder: EchoStatus.create) + ..aOM(8, _omitFieldNames ? '' : 'expectCompressed', + 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') @@ -373,8 +320,10 @@ class SimpleRequest extends $pb.GeneratedMessage { 'Will be removed in next major version') SimpleRequest copyWith(void Function(SimpleRequest) updates) => super.copyWith((message) => updates(message as SimpleRequest)) - as SimpleRequest; // ignore: deprecated_member_use + as SimpleRequest; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static SimpleRequest create() => SimpleRequest._(); SimpleRequest createEmptyInstance() => create(); @@ -385,6 +334,9 @@ class SimpleRequest extends $pb.GeneratedMessage { $pb.GeneratedMessage.$_defaultFor(create); static SimpleRequest? _defaultInstance; + /// DEPRECATED, don't use. To be removed shortly. + /// Desired payload type in the response from the server. + /// If response_type is RANDOM, server randomly chooses one from other formats. @$pb.TagNumber(1) PayloadType get responseType => $_getN(0); @$pb.TagNumber(1) @@ -397,6 +349,7 @@ class SimpleRequest extends $pb.GeneratedMessage { @$pb.TagNumber(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) @@ -409,6 +362,7 @@ class SimpleRequest extends $pb.GeneratedMessage { @$pb.TagNumber(2) void clearResponseSize() => clearField(2); + /// Optional input payload sent along with the request. @$pb.TagNumber(3) Payload get payload => $_getN(2); @$pb.TagNumber(3) @@ -423,6 +377,7 @@ class SimpleRequest extends $pb.GeneratedMessage { @$pb.TagNumber(3) Payload ensurePayload() => $_ensure(2); + /// Whether SimpleResponse should include username. @$pb.TagNumber(4) $core.bool get fillUsername => $_getBF(3); @$pb.TagNumber(4) @@ -435,6 +390,7 @@ class SimpleRequest extends $pb.GeneratedMessage { @$pb.TagNumber(4) void clearFillUsername() => clearField(4); + /// Whether SimpleResponse should include OAuth scope. @$pb.TagNumber(5) $core.bool get fillOauthScope => $_getBF(4); @$pb.TagNumber(5) @@ -447,6 +403,10 @@ class SimpleRequest extends $pb.GeneratedMessage { @$pb.TagNumber(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 + /// implement the full compression tests by introspecting the call to verify + /// the response's compression status. @$pb.TagNumber(6) BoolValue get responseCompressed => $_getN(5); @$pb.TagNumber(6) @@ -461,6 +421,7 @@ class SimpleRequest extends $pb.GeneratedMessage { @$pb.TagNumber(6) BoolValue ensureResponseCompressed() => $_ensure(5); + /// Whether server should return a given status @$pb.TagNumber(7) EchoStatus get responseStatus => $_getN(6); @$pb.TagNumber(7) @@ -475,6 +436,7 @@ class SimpleRequest extends $pb.GeneratedMessage { @$pb.TagNumber(7) EchoStatus ensureResponseStatus() => $_ensure(6); + /// Whether the server should expect this request to be compressed. @$pb.TagNumber(8) BoolValue get expectCompressed => $_getN(7); @$pb.TagNumber(8) @@ -490,58 +452,43 @@ class SimpleRequest extends $pb.GeneratedMessage { BoolValue ensureExpectCompressed() => $_ensure(7); } +/// Unary response, as configured by the request. class SimpleResponse extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'SimpleResponse', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'grpc.testing'), - createEmptyInstance: create) - ..aOM( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'payload', - subBuilder: Payload.create) - ..aOS( - 2, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'username') - ..aOS( - 3, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'oauthScope') - ..hasRequiredFields = false; - - SimpleResponse._() : super(); factory SimpleResponse({ Payload? payload, $core.String? username, $core.String? oauthScope, }) { - final _result = create(); + final result = create(); if (payload != null) { - _result.payload = payload; + result.payload = payload; } if (username != null) { - _result.username = username; + result.username = username; } if (oauthScope != null) { - _result.oauthScope = oauthScope; + result.oauthScope = oauthScope; } - return _result; + 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); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'SimpleResponse', + package: const $pb.PackageName(_omitMessageNames ? '' : 'grpc.testing'), + createEmptyInstance: create) + ..aOM(1, _omitFieldNames ? '' : 'payload', + subBuilder: Payload.create) + ..aOS(2, _omitFieldNames ? '' : 'username') + ..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') @@ -551,8 +498,10 @@ class SimpleResponse extends $pb.GeneratedMessage { 'Will be removed in next major version') SimpleResponse copyWith(void Function(SimpleResponse) updates) => super.copyWith((message) => updates(message as SimpleResponse)) - as SimpleResponse; // ignore: deprecated_member_use + as SimpleResponse; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static SimpleResponse create() => SimpleResponse._(); SimpleResponse createEmptyInstance() => create(); @@ -563,6 +512,7 @@ class SimpleResponse extends $pb.GeneratedMessage { $pb.GeneratedMessage.$_defaultFor(create); static SimpleResponse? _defaultInstance; + /// Payload to increase message size. @$pb.TagNumber(1) Payload get payload => $_getN(0); @$pb.TagNumber(1) @@ -577,6 +527,8 @@ class SimpleResponse extends $pb.GeneratedMessage { @$pb.TagNumber(1) Payload ensurePayload() => $_ensure(0); + /// The user the request came from, for verifying authentication was + /// successful when the client expected it. @$pb.TagNumber(2) $core.String get username => $_getSZ(1); @$pb.TagNumber(2) @@ -589,6 +541,7 @@ class SimpleResponse extends $pb.GeneratedMessage { @$pb.TagNumber(2) void clearUsername() => clearField(2); + /// OAuth scope. @$pb.TagNumber(3) $core.String get oauthScope => $_getSZ(2); @$pb.TagNumber(3) @@ -602,50 +555,39 @@ class SimpleResponse extends $pb.GeneratedMessage { void clearOauthScope() => clearField(3); } +/// Client-streaming request. class StreamingInputCallRequest extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'StreamingInputCallRequest', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'grpc.testing'), - createEmptyInstance: create) - ..aOM( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'payload', - subBuilder: Payload.create) - ..aOM( - 2, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'expectCompressed', - subBuilder: BoolValue.create) - ..hasRequiredFields = false; - - StreamingInputCallRequest._() : super(); factory StreamingInputCallRequest({ Payload? payload, BoolValue? expectCompressed, }) { - final _result = create(); + final result = create(); if (payload != null) { - _result.payload = payload; + result.payload = payload; } if (expectCompressed != null) { - _result.expectCompressed = expectCompressed; + result.expectCompressed = expectCompressed; } - return _result; + 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); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'StreamingInputCallRequest', + package: const $pb.PackageName(_omitMessageNames ? '' : 'grpc.testing'), + createEmptyInstance: create) + ..aOM(1, _omitFieldNames ? '' : 'payload', + subBuilder: Payload.create) + ..aOM(2, _omitFieldNames ? '' : 'expectCompressed', + 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') @@ -657,8 +599,10 @@ class StreamingInputCallRequest extends $pb.GeneratedMessage { StreamingInputCallRequest copyWith( void Function(StreamingInputCallRequest) updates) => super.copyWith((message) => updates(message as StreamingInputCallRequest)) - as StreamingInputCallRequest; // ignore: deprecated_member_use + as StreamingInputCallRequest; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static StreamingInputCallRequest create() => StreamingInputCallRequest._(); StreamingInputCallRequest createEmptyInstance() => create(); @@ -669,6 +613,7 @@ class StreamingInputCallRequest extends $pb.GeneratedMessage { $pb.GeneratedMessage.$_defaultFor(create); static StreamingInputCallRequest? _defaultInstance; + /// Optional input payload sent along with the request. @$pb.TagNumber(1) Payload get payload => $_getN(0); @$pb.TagNumber(1) @@ -683,6 +628,10 @@ class StreamingInputCallRequest extends $pb.GeneratedMessage { @$pb.TagNumber(1) Payload ensurePayload() => $_ensure(0); + /// Whether the server should expect this request to be compressed. This field + /// is "nullable" in order to interoperate seamlessly with servers not able to + /// implement the full compression tests by introspecting the call to verify + /// the request's compression status. @$pb.TagNumber(2) BoolValue get expectCompressed => $_getN(1); @$pb.TagNumber(2) @@ -698,40 +647,33 @@ class StreamingInputCallRequest extends $pb.GeneratedMessage { BoolValue ensureExpectCompressed() => $_ensure(1); } +/// Client-streaming response. class StreamingInputCallResponse extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'StreamingInputCallResponse', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'grpc.testing'), - createEmptyInstance: create) - ..a<$core.int>( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'aggregatedPayloadSize', - $pb.PbFieldType.O3) - ..hasRequiredFields = false; - - StreamingInputCallResponse._() : super(); factory StreamingInputCallResponse({ $core.int? aggregatedPayloadSize, }) { - final _result = create(); + final result = create(); if (aggregatedPayloadSize != null) { - _result.aggregatedPayloadSize = aggregatedPayloadSize; + result.aggregatedPayloadSize = aggregatedPayloadSize; } - return _result; + 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); + + 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) + ..hasRequiredFields = false; + @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') @@ -744,8 +686,10 @@ class StreamingInputCallResponse extends $pb.GeneratedMessage { void Function(StreamingInputCallResponse) updates) => super.copyWith( (message) => updates(message as StreamingInputCallResponse)) - as StreamingInputCallResponse; // ignore: deprecated_member_use + as StreamingInputCallResponse; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static StreamingInputCallResponse create() => StreamingInputCallResponse._(); StreamingInputCallResponse createEmptyInstance() => create(); @@ -756,6 +700,7 @@ class StreamingInputCallResponse extends $pb.GeneratedMessage { $pb.GeneratedMessage.$_defaultFor(create); static StreamingInputCallResponse? _defaultInstance; + /// Aggregated size of payloads received from the client. @$pb.TagNumber(1) $core.int get aggregatedPayloadSize => $_getIZ(0); @$pb.TagNumber(1) @@ -769,60 +714,43 @@ class StreamingInputCallResponse extends $pb.GeneratedMessage { void clearAggregatedPayloadSize() => clearField(1); } +/// Configuration for a particular response. class ResponseParameters extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'ResponseParameters', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'grpc.testing'), - createEmptyInstance: create) - ..a<$core.int>( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'size', - $pb.PbFieldType.O3) - ..a<$core.int>( - 2, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'intervalUs', - $pb.PbFieldType.O3) - ..aOM( - 3, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'compressed', - subBuilder: BoolValue.create) - ..hasRequiredFields = false; - - ResponseParameters._() : super(); factory ResponseParameters({ $core.int? size, $core.int? intervalUs, BoolValue? compressed, }) { - final _result = create(); + final result = create(); if (size != null) { - _result.size = size; + result.size = size; } if (intervalUs != null) { - _result.intervalUs = intervalUs; + result.intervalUs = intervalUs; } if (compressed != null) { - _result.compressed = compressed; + result.compressed = compressed; } - return _result; + 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); + + 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) + ..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') @@ -832,8 +760,10 @@ class ResponseParameters extends $pb.GeneratedMessage { 'Will be removed in next major version') ResponseParameters copyWith(void Function(ResponseParameters) updates) => super.copyWith((message) => updates(message as ResponseParameters)) - as ResponseParameters; // ignore: deprecated_member_use + as ResponseParameters; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static ResponseParameters create() => ResponseParameters._(); ResponseParameters createEmptyInstance() => create(); @@ -844,6 +774,7 @@ class ResponseParameters extends $pb.GeneratedMessage { $pb.GeneratedMessage.$_defaultFor(create); static ResponseParameters? _defaultInstance; + /// Desired payload sizes in responses from the server. @$pb.TagNumber(1) $core.int get size => $_getIZ(0); @$pb.TagNumber(1) @@ -856,6 +787,8 @@ class ResponseParameters extends $pb.GeneratedMessage { @$pb.TagNumber(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) @@ -868,6 +801,10 @@ class ResponseParameters extends $pb.GeneratedMessage { @$pb.TagNumber(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 + /// implement the full compression tests by introspecting the call to verify + /// the response's compression status. @$pb.TagNumber(3) BoolValue get compressed => $_getN(2); @$pb.TagNumber(3) @@ -883,74 +820,55 @@ class ResponseParameters extends $pb.GeneratedMessage { BoolValue ensureCompressed() => $_ensure(2); } +/// Server-streaming request. class StreamingOutputCallRequest extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'StreamingOutputCallRequest', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'grpc.testing'), - createEmptyInstance: create) - ..e( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'responseType', - $pb.PbFieldType.OE, - defaultOrMaker: PayloadType.COMPRESSABLE, - valueOf: PayloadType.valueOf, - enumValues: PayloadType.values) - ..pc( - 2, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'responseParameters', - $pb.PbFieldType.PM, - subBuilder: ResponseParameters.create) - ..aOM( - 3, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'payload', - subBuilder: Payload.create) - ..aOM( - 7, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'responseStatus', - subBuilder: EchoStatus.create) - ..hasRequiredFields = false; - - StreamingOutputCallRequest._() : super(); factory StreamingOutputCallRequest({ PayloadType? responseType, $core.Iterable? responseParameters, Payload? payload, EchoStatus? responseStatus, }) { - final _result = create(); + final result = create(); if (responseType != null) { - _result.responseType = responseType; + result.responseType = responseType; } if (responseParameters != null) { - _result.responseParameters.addAll(responseParameters); + result.responseParameters.addAll(responseParameters); } if (payload != null) { - _result.payload = payload; + result.payload = payload; } if (responseStatus != null) { - _result.responseStatus = responseStatus; + result.responseStatus = responseStatus; } - return _result; + 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); + + 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, + enumValues: PayloadType.values) + ..pc( + 2, _omitFieldNames ? '' : 'responseParameters', $pb.PbFieldType.PM, + subBuilder: ResponseParameters.create) + ..aOM(3, _omitFieldNames ? '' : 'payload', + subBuilder: Payload.create) + ..aOM(7, _omitFieldNames ? '' : 'responseStatus', + 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') @@ -963,8 +881,10 @@ class StreamingOutputCallRequest extends $pb.GeneratedMessage { void Function(StreamingOutputCallRequest) updates) => super.copyWith( (message) => updates(message as StreamingOutputCallRequest)) - as StreamingOutputCallRequest; // ignore: deprecated_member_use + as StreamingOutputCallRequest; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static StreamingOutputCallRequest create() => StreamingOutputCallRequest._(); StreamingOutputCallRequest createEmptyInstance() => create(); @@ -975,6 +895,11 @@ class StreamingOutputCallRequest extends $pb.GeneratedMessage { $pb.GeneratedMessage.$_defaultFor(create); static StreamingOutputCallRequest? _defaultInstance; + /// DEPRECATED, don't use. To be removed shortly. + /// Desired payload type in the response from the server. + /// If response_type is RANDOM, the payload from each response in the stream + /// might be of different types. This is to simulate a mixed type of payload + /// stream. @$pb.TagNumber(1) PayloadType get responseType => $_getN(0); @$pb.TagNumber(1) @@ -987,9 +912,11 @@ class StreamingOutputCallRequest extends $pb.GeneratedMessage { @$pb.TagNumber(1) void clearResponseType() => clearField(1); + /// Configuration for each expected response message. @$pb.TagNumber(2) $core.List get responseParameters => $_getList(1); + /// Optional input payload sent along with the request. @$pb.TagNumber(3) Payload get payload => $_getN(2); @$pb.TagNumber(3) @@ -1004,6 +931,7 @@ class StreamingOutputCallRequest extends $pb.GeneratedMessage { @$pb.TagNumber(3) Payload ensurePayload() => $_ensure(2); + /// Whether server should return a given status. @$pb.TagNumber(7) EchoStatus get responseStatus => $_getN(3); @$pb.TagNumber(7) @@ -1019,40 +947,33 @@ class StreamingOutputCallRequest extends $pb.GeneratedMessage { EchoStatus ensureResponseStatus() => $_ensure(3); } +/// Server-streaming response, as configured by the request and parameters. class StreamingOutputCallResponse extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'StreamingOutputCallResponse', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'grpc.testing'), - createEmptyInstance: create) - ..aOM( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'payload', - subBuilder: Payload.create) - ..hasRequiredFields = false; - - StreamingOutputCallResponse._() : super(); factory StreamingOutputCallResponse({ Payload? payload, }) { - final _result = create(); + final result = create(); if (payload != null) { - _result.payload = payload; + result.payload = payload; } - return _result; + 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); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'StreamingOutputCallResponse', + package: const $pb.PackageName(_omitMessageNames ? '' : 'grpc.testing'), + createEmptyInstance: create) + ..aOM(1, _omitFieldNames ? '' : 'payload', + 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') @@ -1065,8 +986,10 @@ class StreamingOutputCallResponse extends $pb.GeneratedMessage { void Function(StreamingOutputCallResponse) updates) => super.copyWith( (message) => updates(message as StreamingOutputCallResponse)) - as StreamingOutputCallResponse; // ignore: deprecated_member_use + as StreamingOutputCallResponse; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static StreamingOutputCallResponse create() => StreamingOutputCallResponse._(); @@ -1078,6 +1001,7 @@ class StreamingOutputCallResponse extends $pb.GeneratedMessage { $pb.GeneratedMessage.$_defaultFor(create); static StreamingOutputCallResponse? _defaultInstance; + /// Payload to increase response size. @$pb.TagNumber(1) Payload get payload => $_getN(0); @$pb.TagNumber(1) @@ -1093,40 +1017,34 @@ class StreamingOutputCallResponse extends $pb.GeneratedMessage { Payload ensurePayload() => $_ensure(0); } +/// For reconnect interop test only. +/// Client tells server what reconnection parameters it used. class ReconnectParams extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'ReconnectParams', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'grpc.testing'), - createEmptyInstance: create) - ..a<$core.int>( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'maxReconnectBackoffMs', - $pb.PbFieldType.O3) - ..hasRequiredFields = false; - - ReconnectParams._() : super(); factory ReconnectParams({ $core.int? maxReconnectBackoffMs, }) { - final _result = create(); + final result = create(); if (maxReconnectBackoffMs != null) { - _result.maxReconnectBackoffMs = maxReconnectBackoffMs; + result.maxReconnectBackoffMs = maxReconnectBackoffMs; } - return _result; + 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); + + 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) + ..hasRequiredFields = false; + @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') @@ -1136,8 +1054,10 @@ class ReconnectParams extends $pb.GeneratedMessage { 'Will be removed in next major version') ReconnectParams copyWith(void Function(ReconnectParams) updates) => super.copyWith((message) => updates(message as ReconnectParams)) - as ReconnectParams; // ignore: deprecated_member_use + as ReconnectParams; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static ReconnectParams create() => ReconnectParams._(); ReconnectParams createEmptyInstance() => create(); @@ -1161,49 +1081,39 @@ class ReconnectParams extends $pb.GeneratedMessage { void clearMaxReconnectBackoffMs() => clearField(1); } +/// For reconnect interop test only. +/// Server tells client whether its reconnects are following the spec and the +/// reconnect backoffs it saw. class ReconnectInfo extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'ReconnectInfo', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'grpc.testing'), - createEmptyInstance: create) - ..aOB( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'passed') - ..p<$core.int>( - 2, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'backoffMs', - $pb.PbFieldType.K3) - ..hasRequiredFields = false; - - ReconnectInfo._() : super(); factory ReconnectInfo({ $core.bool? passed, $core.Iterable<$core.int>? backoffMs, }) { - final _result = create(); + final result = create(); if (passed != null) { - _result.passed = passed; + result.passed = passed; } if (backoffMs != null) { - _result.backoffMs.addAll(backoffMs); + result.backoffMs.addAll(backoffMs); } - return _result; + 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); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'ReconnectInfo', + package: const $pb.PackageName(_omitMessageNames ? '' : 'grpc.testing'), + createEmptyInstance: create) + ..aOB(1, _omitFieldNames ? '' : 'passed') + ..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') @@ -1213,8 +1123,10 @@ class ReconnectInfo extends $pb.GeneratedMessage { 'Will be removed in next major version') ReconnectInfo copyWith(void Function(ReconnectInfo) updates) => super.copyWith((message) => updates(message as ReconnectInfo)) - as ReconnectInfo; // ignore: deprecated_member_use + as ReconnectInfo; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static ReconnectInfo create() => ReconnectInfo._(); ReconnectInfo createEmptyInstance() => create(); @@ -1240,3 +1152,7 @@ class ReconnectInfo extends $pb.GeneratedMessage { @$pb.TagNumber(2) $core.List<$core.int> get backoffMs => $_getList(1); } + +const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); +const _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 9927b16..3bcce87 100644 --- a/interop/lib/src/generated/messages.pbenum.dart +++ b/interop/lib/src/generated/messages.pbenum.dart @@ -1,20 +1,23 @@ -/// +// // Generated code. Do not modify. // source: messages.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name -// ignore_for_file: UNDEFINED_SHOWN_NAME +// 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 + import 'dart:core' as $core; + 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 { - static const PayloadType COMPRESSABLE = PayloadType._( - 0, - const $core.bool.fromEnvironment('protobuf.omit_enum_names') - ? '' - : 'COMPRESSABLE'); + static const PayloadType COMPRESSABLE = + PayloadType._(0, _omitEnumNames ? '' : 'COMPRESSABLE'); static const $core.List values = [ COMPRESSABLE, @@ -26,3 +29,5 @@ class PayloadType extends $pb.ProtobufEnum { const PayloadType._($core.int v, $core.String n) : super(v, n); } + +const _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 f86430b..008b80e 100644 --- a/interop/lib/src/generated/test.pb.dart +++ b/interop/lib/src/generated/test.pb.dart @@ -1,8 +1,12 @@ -/// +// // Generated code. Do not modify. // source: test.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + +// 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 import 'dart:core' as $core; diff --git a/interop/lib/src/generated/test.pbgrpc.dart b/interop/lib/src/generated/test.pbgrpc.dart index 76c9521..74b2c7d 100644 --- a/interop/lib/src/generated/test.pbgrpc.dart +++ b/interop/lib/src/generated/test.pbgrpc.dart @@ -1,19 +1,26 @@ -/// +// // Generated code. Do not modify. // source: test.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + +// 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 import 'dart:async' as $async; - import 'dart:core' as $core; import 'package:grpc/service_api.dart' as $grpc; +import 'package:protobuf/protobuf.dart' as $pb; + import 'empty.pb.dart' as $0; import 'messages.pb.dart' as $1; + export 'test.pb.dart'; +@$pb.GrpcServiceName('grpc.testing.TestService') class TestServiceClient extends $grpc.Client { static final _$emptyCall = $grpc.ClientMethod<$0.Empty, $0.Empty>( '/grpc.testing.TestService/EmptyCall', @@ -112,6 +119,7 @@ class TestServiceClient extends $grpc.Client { } } +@$pb.GrpcServiceName('grpc.testing.TestService') abstract class TestServiceBase extends $grpc.Service { $core.String get $name => 'grpc.testing.TestService'; @@ -228,6 +236,7 @@ abstract class TestServiceBase extends $grpc.Service { $grpc.ServiceCall call, $0.Empty request); } +@$pb.GrpcServiceName('grpc.testing.UnimplementedService') class UnimplementedServiceClient extends $grpc.Client { static final _$unimplementedCall = $grpc.ClientMethod<$0.Empty, $0.Empty>( '/grpc.testing.UnimplementedService/UnimplementedCall', @@ -245,6 +254,7 @@ class UnimplementedServiceClient extends $grpc.Client { } } +@$pb.GrpcServiceName('grpc.testing.UnimplementedService') abstract class UnimplementedServiceBase extends $grpc.Service { $core.String get $name => 'grpc.testing.UnimplementedService'; @@ -267,6 +277,7 @@ abstract class UnimplementedServiceBase extends $grpc.Service { $grpc.ServiceCall call, $0.Empty request); } +@$pb.GrpcServiceName('grpc.testing.ReconnectService') class ReconnectServiceClient extends $grpc.Client { static final _$start = $grpc.ClientMethod<$1.ReconnectParams, $0.Empty>( '/grpc.testing.ReconnectService/Start', @@ -293,6 +304,7 @@ class ReconnectServiceClient extends $grpc.Client { } } +@$pb.GrpcServiceName('grpc.testing.ReconnectService') abstract class ReconnectServiceBase extends $grpc.Service { $core.String get $name => 'grpc.testing.ReconnectService'; diff --git a/lib/src/generated/google/protobuf/any.pb.dart b/lib/src/generated/google/protobuf/any.pb.dart index 9773573..a2d0d30 100644 --- a/lib/src/generated/google/protobuf/any.pb.dart +++ b/lib/src/generated/google/protobuf/any.pb.dart @@ -1,61 +1,135 @@ -/// +// // Generated code. Do not modify. // source: google/protobuf/any.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + +// 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 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. +/// +/// 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++. +/// +/// Foo foo = ...; +/// Any any; +/// any.PackFrom(foo); +/// ... +/// if (any.UnpackTo(&foo)) { +/// ... +/// } +/// +/// 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); +/// } +/// +/// Example 3: Pack and unpack a message in Python. +/// +/// foo = Foo(...) +/// any = Any() +/// any.Pack(foo) +/// ... +/// if any.Is(Foo.DESCRIPTOR): +/// any.Unpack(foo) +/// ... +/// +/// 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; +/// } +/// +/// { +/// "@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 { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'Any', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'google.protobuf'), - createEmptyInstance: create, - toProto3Json: $mixin.AnyMixin.toProto3JsonHelper, - fromProto3Json: $mixin.AnyMixin.fromProto3JsonHelper) - ..aOS( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'typeUrl') - ..a<$core.List<$core.int>>( - 2, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'value', - $pb.PbFieldType.OY) - ..hasRequiredFields = false; - - Any._() : super(); factory Any({ $core.String? typeUrl, $core.List<$core.int>? value, }) { - final _result = create(); + final result = create(); if (typeUrl != null) { - _result.typeUrl = typeUrl; + result.typeUrl = typeUrl; } if (value != null) { - _result.value = value; + result.value = value; } - return _result; + 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); + + 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) + ..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') @@ -64,9 +138,10 @@ class Any extends $pb.GeneratedMessage with $mixin.AnyMixin { 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') Any copyWith(void Function(Any) updates) => - super.copyWith((message) => updates(message as Any)) - as Any; // ignore: deprecated_member_use + super.copyWith((message) => updates(message as Any)) as Any; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static Any create() => Any._(); Any createEmptyInstance() => create(); @@ -76,6 +151,33 @@ 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). + /// + /// 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.) + /// + /// 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. @$pb.TagNumber(1) $core.String get typeUrl => $_getSZ(0); @$pb.TagNumber(1) @@ -88,6 +190,7 @@ class Any extends $pb.GeneratedMessage with $mixin.AnyMixin { @$pb.TagNumber(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) @@ -111,3 +214,7 @@ class Any extends $pb.GeneratedMessage with $mixin.AnyMixin { return result; } } + +const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); +const _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 22fd9d8..3744f12 100644 --- a/lib/src/generated/google/protobuf/any.pbenum.dart +++ b/lib/src/generated/google/protobuf/any.pbenum.dart @@ -1,6 +1,10 @@ -/// +// // Generated code. Do not modify. // source: google/protobuf/any.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + +// 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 diff --git a/lib/src/generated/google/protobuf/any.pbjson.dart b/lib/src/generated/google/protobuf/any.pbjson.dart index 67187d0..eafbc6b 100644 --- a/lib/src/generated/google/protobuf/any.pbjson.dart +++ b/lib/src/generated/google/protobuf/any.pbjson.dart @@ -1,20 +1,24 @@ -/// +// // Generated code. Do not modify. // source: google/protobuf/any.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,deprecated_member_use_from_same_package,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name -import 'dart:core' as $core; +// 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 + import 'dart:convert' as $convert; +import 'dart:core' as $core; import 'dart:typed_data' as $typed_data; @$core.Deprecated('Use anyDescriptor instead') -const Any$json = const { +const Any$json = { '1': 'Any', - '2': const [ - const {'1': 'type_url', '3': 1, '4': 1, '5': 9, '10': 'typeUrl'}, - const {'1': 'value', '3': 2, '4': 1, '5': 12, '10': 'value'}, + '2': [ + {'1': 'type_url', '3': 1, '4': 1, '5': 9, '10': 'typeUrl'}, + {'1': 'value', '3': 2, '4': 1, '5': 12, '10': 'value'}, ], }; diff --git a/lib/src/generated/google/protobuf/duration.pb.dart b/lib/src/generated/google/protobuf/duration.pb.dart index 4fe9747..2c225ac 100644 --- a/lib/src/generated/google/protobuf/duration.pb.dart +++ b/lib/src/generated/google/protobuf/duration.pb.dart @@ -1,62 +1,111 @@ -/// +// // Generated code. Do not modify. // source: google/protobuf/duration.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + +// 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 import 'dart:core' as $core; 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. +/// +/// # Examples +/// +/// Example 1: Compute Duration from two Timestamps in pseudo code. +/// +/// Timestamp start = ...; +/// Timestamp end = ...; +/// Duration duration = ...; +/// +/// 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; +/// } +/// +/// Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. +/// +/// Timestamp start = ...; +/// Duration duration = ...; +/// Timestamp end = ...; +/// +/// 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; +/// } +/// +/// Example 3: Compute Duration from datetime.timedelta in Python. +/// +/// td = datetime.timedelta(days=3, minutes=10) +/// duration = Duration() +/// duration.FromTimedelta(td) +/// +/// # 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". class Duration extends $pb.GeneratedMessage with $mixin.DurationMixin { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'Duration', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'google.protobuf'), - createEmptyInstance: create, - toProto3Json: $mixin.DurationMixin.toProto3JsonHelper, - fromProto3Json: $mixin.DurationMixin.fromProto3JsonHelper) - ..aInt64( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'seconds') - ..a<$core.int>( - 2, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'nanos', - $pb.PbFieldType.O3) - ..hasRequiredFields = false; - - Duration._() : super(); factory Duration({ $fixnum.Int64? seconds, $core.int? nanos, }) { - final _result = create(); + final result = create(); if (seconds != null) { - _result.seconds = seconds; + result.seconds = seconds; } if (nanos != null) { - _result.nanos = nanos; + result.nanos = nanos; } - return _result; + 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); + + 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) + ..aInt64(1, _omitFieldNames ? '' : 'seconds') + ..a<$core.int>(2, _omitFieldNames ? '' : 'nanos', $pb.PbFieldType.O3) + ..hasRequiredFields = false; + @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') @@ -65,9 +114,10 @@ class Duration extends $pb.GeneratedMessage with $mixin.DurationMixin { 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') Duration copyWith(void Function(Duration) updates) => - super.copyWith((message) => updates(message as Duration)) - as Duration; // ignore: deprecated_member_use + super.copyWith((message) => updates(message as Duration)) as Duration; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static Duration create() => Duration._(); Duration createEmptyInstance() => create(); @@ -77,6 +127,9 @@ class Duration extends $pb.GeneratedMessage with $mixin.DurationMixin { _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static Duration? _defaultInstance; + /// Signed seconds of the span of time. Must be from -315,576,000,000 + /// to +315,576,000,000 inclusive. Note: these bounds are computed from: + /// 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years @$pb.TagNumber(1) $fixnum.Int64 get seconds => $_getI64(0); @$pb.TagNumber(1) @@ -89,6 +142,12 @@ class Duration extends $pb.GeneratedMessage with $mixin.DurationMixin { @$pb.TagNumber(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 + /// `seconds` field and a positive or negative `nanos` field. For durations + /// of one second or more, a non-zero value for the `nanos` field must be + /// of the same sign as the `seconds` field. Must be from -999,999,999 + /// to +999,999,999 inclusive. @$pb.TagNumber(2) $core.int get nanos => $_getIZ(1); @$pb.TagNumber(2) @@ -101,3 +160,7 @@ class Duration extends $pb.GeneratedMessage with $mixin.DurationMixin { @$pb.TagNumber(2) void clearNanos() => clearField(2); } + +const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); +const _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 e4337cf..1a2c58d 100644 --- a/lib/src/generated/google/protobuf/duration.pbenum.dart +++ b/lib/src/generated/google/protobuf/duration.pbenum.dart @@ -1,6 +1,10 @@ -/// +// // Generated code. Do not modify. // source: google/protobuf/duration.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + +// 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 diff --git a/lib/src/generated/google/protobuf/duration.pbjson.dart b/lib/src/generated/google/protobuf/duration.pbjson.dart index 22edbac..5847acb 100644 --- a/lib/src/generated/google/protobuf/duration.pbjson.dart +++ b/lib/src/generated/google/protobuf/duration.pbjson.dart @@ -1,23 +1,28 @@ -/// +// // Generated code. Do not modify. // source: google/protobuf/duration.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,deprecated_member_use_from_same_package,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name -import 'dart:core' as $core; +// 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 + import 'dart:convert' as $convert; +import 'dart:core' as $core; import 'dart:typed_data' as $typed_data; @$core.Deprecated('Use durationDescriptor instead') -const Duration$json = const { +const Duration$json = { '1': 'Duration', - '2': const [ - const {'1': 'seconds', '3': 1, '4': 1, '5': 3, '10': 'seconds'}, - const {'1': 'nanos', '3': 2, '4': 1, '5': 5, '10': 'nanos'}, + '2': [ + {'1': 'seconds', '3': 1, '4': 1, '5': 3, '10': 'seconds'}, + {'1': 'nanos', '3': 2, '4': 1, '5': 5, '10': 'nanos'}, ], }; /// Descriptor for `Duration`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List durationDescriptor = $convert.base64Decode( - 'CghEdXJhdGlvbhIYCgdzZWNvbmRzGAEgASgDUgdzZWNvbmRzEhQKBW5hbm9zGAIgASgFUgVuYW5vcw=='); + 'CghEdXJhdGlvbhIYCgdzZWNvbmRzGAEgASgDUgdzZWNvbmRzEhQKBW5hbm9zGAIgASgFUgVuYW' + '5vcw=='); diff --git a/lib/src/generated/google/rpc/code.pb.dart b/lib/src/generated/google/rpc/code.pb.dart index 09b4296..6580226 100644 --- a/lib/src/generated/google/rpc/code.pb.dart +++ b/lib/src/generated/google/rpc/code.pb.dart @@ -1,9 +1,13 @@ -/// +// // Generated code. Do not modify. // source: google/rpc/code.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + +// 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 import 'dart:core' as $core; diff --git a/lib/src/generated/google/rpc/code.pbenum.dart b/lib/src/generated/google/rpc/code.pbenum.dart index 79bb671..f3d7bf3 100644 --- a/lib/src/generated/google/rpc/code.pbenum.dart +++ b/lib/src/generated/google/rpc/code.pbenum.dart @@ -1,97 +1,53 @@ -/// +// // Generated code. Do not modify. // source: google/rpc/code.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name -// ignore_for_file: UNDEFINED_SHOWN_NAME +// 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 + import 'dart:core' as $core; + import 'package:protobuf/protobuf.dart' as $pb; +/// The canonical error codes for gRPC APIs. +/// +/// +/// Sometimes multiple error codes may apply. Services should return +/// the most specific error code that applies. For example, prefer +/// `OUT_OF_RANGE` over `FAILED_PRECONDITION` if both codes apply. +/// Similarly prefer `NOT_FOUND` or `ALREADY_EXISTS` over `FAILED_PRECONDITION`. class Code extends $pb.ProtobufEnum { - static const Code OK = Code._(0, - const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'OK'); - static const Code CANCELLED = Code._( - 1, - const $core.bool.fromEnvironment('protobuf.omit_enum_names') - ? '' - : 'CANCELLED'); - static const Code UNKNOWN = Code._( - 2, - const $core.bool.fromEnvironment('protobuf.omit_enum_names') - ? '' - : 'UNKNOWN'); - static const Code INVALID_ARGUMENT = Code._( - 3, - const $core.bool.fromEnvironment('protobuf.omit_enum_names') - ? '' - : 'INVALID_ARGUMENT'); - static const Code DEADLINE_EXCEEDED = Code._( - 4, - const $core.bool.fromEnvironment('protobuf.omit_enum_names') - ? '' - : 'DEADLINE_EXCEEDED'); - static const Code NOT_FOUND = Code._( - 5, - const $core.bool.fromEnvironment('protobuf.omit_enum_names') - ? '' - : 'NOT_FOUND'); - static const Code ALREADY_EXISTS = Code._( - 6, - const $core.bool.fromEnvironment('protobuf.omit_enum_names') - ? '' - : 'ALREADY_EXISTS'); - static const Code PERMISSION_DENIED = Code._( - 7, - const $core.bool.fromEnvironment('protobuf.omit_enum_names') - ? '' - : 'PERMISSION_DENIED'); - static const Code UNAUTHENTICATED = Code._( - 16, - const $core.bool.fromEnvironment('protobuf.omit_enum_names') - ? '' - : 'UNAUTHENTICATED'); - static const Code RESOURCE_EXHAUSTED = Code._( - 8, - const $core.bool.fromEnvironment('protobuf.omit_enum_names') - ? '' - : 'RESOURCE_EXHAUSTED'); - static const Code FAILED_PRECONDITION = Code._( - 9, - const $core.bool.fromEnvironment('protobuf.omit_enum_names') - ? '' - : 'FAILED_PRECONDITION'); - static const Code ABORTED = Code._( - 10, - const $core.bool.fromEnvironment('protobuf.omit_enum_names') - ? '' - : 'ABORTED'); - static const Code OUT_OF_RANGE = Code._( - 11, - const $core.bool.fromEnvironment('protobuf.omit_enum_names') - ? '' - : 'OUT_OF_RANGE'); - static const Code UNIMPLEMENTED = Code._( - 12, - const $core.bool.fromEnvironment('protobuf.omit_enum_names') - ? '' - : 'UNIMPLEMENTED'); - static const Code INTERNAL = Code._( - 13, - const $core.bool.fromEnvironment('protobuf.omit_enum_names') - ? '' - : 'INTERNAL'); - static const Code UNAVAILABLE = Code._( - 14, - const $core.bool.fromEnvironment('protobuf.omit_enum_names') - ? '' - : 'UNAVAILABLE'); - static const Code DATA_LOSS = Code._( - 15, - const $core.bool.fromEnvironment('protobuf.omit_enum_names') - ? '' - : 'DATA_LOSS'); + static const Code OK = Code._(0, _omitEnumNames ? '' : 'OK'); + static const Code CANCELLED = Code._(1, _omitEnumNames ? '' : 'CANCELLED'); + static const Code UNKNOWN = Code._(2, _omitEnumNames ? '' : 'UNKNOWN'); + static const Code INVALID_ARGUMENT = + Code._(3, _omitEnumNames ? '' : 'INVALID_ARGUMENT'); + static const Code DEADLINE_EXCEEDED = + Code._(4, _omitEnumNames ? '' : 'DEADLINE_EXCEEDED'); + static const Code NOT_FOUND = Code._(5, _omitEnumNames ? '' : 'NOT_FOUND'); + static const Code ALREADY_EXISTS = + Code._(6, _omitEnumNames ? '' : 'ALREADY_EXISTS'); + static const Code PERMISSION_DENIED = + Code._(7, _omitEnumNames ? '' : 'PERMISSION_DENIED'); + static const Code UNAUTHENTICATED = + Code._(16, _omitEnumNames ? '' : 'UNAUTHENTICATED'); + static const Code RESOURCE_EXHAUSTED = + Code._(8, _omitEnumNames ? '' : 'RESOURCE_EXHAUSTED'); + static const Code FAILED_PRECONDITION = + Code._(9, _omitEnumNames ? '' : 'FAILED_PRECONDITION'); + static const Code ABORTED = Code._(10, _omitEnumNames ? '' : 'ABORTED'); + static const Code OUT_OF_RANGE = + Code._(11, _omitEnumNames ? '' : 'OUT_OF_RANGE'); + static const Code UNIMPLEMENTED = + Code._(12, _omitEnumNames ? '' : 'UNIMPLEMENTED'); + static const Code INTERNAL = Code._(13, _omitEnumNames ? '' : 'INTERNAL'); + static const Code UNAVAILABLE = + Code._(14, _omitEnumNames ? '' : 'UNAVAILABLE'); + static const Code DATA_LOSS = Code._(15, _omitEnumNames ? '' : 'DATA_LOSS'); static const $core.List values = [ OK, @@ -119,3 +75,5 @@ class Code extends $pb.ProtobufEnum { const Code._($core.int v, $core.String n) : super(v, n); } + +const _omitEnumNames = $core.bool.fromEnvironment('protobuf.omit_enum_names'); diff --git a/lib/src/generated/google/rpc/code.pbjson.dart b/lib/src/generated/google/rpc/code.pbjson.dart index 5c21c4f..3e9bd5a 100644 --- a/lib/src/generated/google/rpc/code.pbjson.dart +++ b/lib/src/generated/google/rpc/code.pbjson.dart @@ -1,38 +1,47 @@ -/// +// // Generated code. Do not modify. // source: google/rpc/code.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,deprecated_member_use_from_same_package,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name -import 'dart:core' as $core; +// 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 + import 'dart:convert' as $convert; +import 'dart:core' as $core; import 'dart:typed_data' as $typed_data; @$core.Deprecated('Use codeDescriptor instead') -const Code$json = const { +const Code$json = { '1': 'Code', - '2': const [ - const {'1': 'OK', '2': 0}, - const {'1': 'CANCELLED', '2': 1}, - const {'1': 'UNKNOWN', '2': 2}, - const {'1': 'INVALID_ARGUMENT', '2': 3}, - const {'1': 'DEADLINE_EXCEEDED', '2': 4}, - const {'1': 'NOT_FOUND', '2': 5}, - const {'1': 'ALREADY_EXISTS', '2': 6}, - const {'1': 'PERMISSION_DENIED', '2': 7}, - const {'1': 'UNAUTHENTICATED', '2': 16}, - const {'1': 'RESOURCE_EXHAUSTED', '2': 8}, - const {'1': 'FAILED_PRECONDITION', '2': 9}, - const {'1': 'ABORTED', '2': 10}, - const {'1': 'OUT_OF_RANGE', '2': 11}, - const {'1': 'UNIMPLEMENTED', '2': 12}, - const {'1': 'INTERNAL', '2': 13}, - const {'1': 'UNAVAILABLE', '2': 14}, - const {'1': 'DATA_LOSS', '2': 15}, + '2': [ + {'1': 'OK', '2': 0}, + {'1': 'CANCELLED', '2': 1}, + {'1': 'UNKNOWN', '2': 2}, + {'1': 'INVALID_ARGUMENT', '2': 3}, + {'1': 'DEADLINE_EXCEEDED', '2': 4}, + {'1': 'NOT_FOUND', '2': 5}, + {'1': 'ALREADY_EXISTS', '2': 6}, + {'1': 'PERMISSION_DENIED', '2': 7}, + {'1': 'UNAUTHENTICATED', '2': 16}, + {'1': 'RESOURCE_EXHAUSTED', '2': 8}, + {'1': 'FAILED_PRECONDITION', '2': 9}, + {'1': 'ABORTED', '2': 10}, + {'1': 'OUT_OF_RANGE', '2': 11}, + {'1': 'UNIMPLEMENTED', '2': 12}, + {'1': 'INTERNAL', '2': 13}, + {'1': 'UNAVAILABLE', '2': 14}, + {'1': 'DATA_LOSS', '2': 15}, ], }; /// Descriptor for `Code`. Decode as a `google.protobuf.EnumDescriptorProto`. final $typed_data.Uint8List codeDescriptor = $convert.base64Decode( - 'CgRDb2RlEgYKAk9LEAASDQoJQ0FOQ0VMTEVEEAESCwoHVU5LTk9XThACEhQKEElOVkFMSURfQVJHVU1FTlQQAxIVChFERUFETElORV9FWENFRURFRBAEEg0KCU5PVF9GT1VORBAFEhIKDkFMUkVBRFlfRVhJU1RTEAYSFQoRUEVSTUlTU0lPTl9ERU5JRUQQBxITCg9VTkFVVEhFTlRJQ0FURUQQEBIWChJSRVNPVVJDRV9FWEhBVVNURUQQCBIXChNGQUlMRURfUFJFQ09ORElUSU9OEAkSCwoHQUJPUlRFRBAKEhAKDE9VVF9PRl9SQU5HRRALEhEKDVVOSU1QTEVNRU5URUQQDBIMCghJTlRFUk5BTBANEg8KC1VOQVZBSUxBQkxFEA4SDQoJREFUQV9MT1NTEA8='); + 'CgRDb2RlEgYKAk9LEAASDQoJQ0FOQ0VMTEVEEAESCwoHVU5LTk9XThACEhQKEElOVkFMSURfQV' + 'JHVU1FTlQQAxIVChFERUFETElORV9FWENFRURFRBAEEg0KCU5PVF9GT1VORBAFEhIKDkFMUkVB' + 'RFlfRVhJU1RTEAYSFQoRUEVSTUlTU0lPTl9ERU5JRUQQBxITCg9VTkFVVEhFTlRJQ0FURUQQEB' + 'IWChJSRVNPVVJDRV9FWEhBVVNURUQQCBIXChNGQUlMRURfUFJFQ09ORElUSU9OEAkSCwoHQUJP' + 'UlRFRBAKEhAKDE9VVF9PRl9SQU5HRRALEhEKDVVOSU1QTEVNRU5URUQQDBIMCghJTlRFUk5BTB' + 'ANEg8KC1VOQVZBSUxBQkxFEA4SDQoJREFUQV9MT1NTEA8='); diff --git a/lib/src/generated/google/rpc/error_details.pb.dart b/lib/src/generated/google/rpc/error_details.pb.dart index 61b26a8..c8d99b2 100644 --- a/lib/src/generated/google/rpc/error_details.pb.dart +++ b/lib/src/generated/google/rpc/error_details.pb.dart @@ -1,9 +1,13 @@ -/// +// // Generated code. Do not modify. // source: google/rpc/error_details.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + +// 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 import 'dart:core' as $core; @@ -11,40 +15,45 @@ import 'package:protobuf/protobuf.dart' as $pb; import '../protobuf/duration.pb.dart' as $1; +/// 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. +/// +/// 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 { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'RetryInfo', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'google.rpc'), - createEmptyInstance: create) - ..aOM<$1.Duration>( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'retryDelay', - subBuilder: $1.Duration.create) - ..hasRequiredFields = false; - - RetryInfo._() : super(); factory RetryInfo({ $1.Duration? retryDelay, }) { - final _result = create(); + final result = create(); if (retryDelay != null) { - _result.retryDelay = retryDelay; + result.retryDelay = retryDelay; } - return _result; + 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); + + 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) + ..hasRequiredFields = false; + @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') @@ -53,9 +62,10 @@ class RetryInfo extends $pb.GeneratedMessage { 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') RetryInfo copyWith(void Function(RetryInfo) updates) => - super.copyWith((message) => updates(message as RetryInfo)) - as RetryInfo; // ignore: deprecated_member_use + super.copyWith((message) => updates(message as RetryInfo)) as RetryInfo; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static RetryInfo create() => RetryInfo._(); RetryInfo createEmptyInstance() => create(); @@ -65,6 +75,7 @@ class RetryInfo extends $pb.GeneratedMessage { _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static RetryInfo? _defaultInstance; + /// Clients should wait at least this long between retrying the same request. @$pb.TagNumber(1) $1.Duration get retryDelay => $_getN(0); @$pb.TagNumber(1) @@ -80,48 +91,37 @@ class RetryInfo extends $pb.GeneratedMessage { $1.Duration ensureRetryDelay() => $_ensure(0); } +/// Describes additional debugging info. class DebugInfo extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'DebugInfo', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'google.rpc'), - createEmptyInstance: create) - ..pPS( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'stackEntries') - ..aOS( - 2, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'detail') - ..hasRequiredFields = false; - - DebugInfo._() : super(); factory DebugInfo({ $core.Iterable<$core.String>? stackEntries, $core.String? detail, }) { - final _result = create(); + final result = create(); if (stackEntries != null) { - _result.stackEntries.addAll(stackEntries); + result.stackEntries.addAll(stackEntries); } if (detail != null) { - _result.detail = detail; + result.detail = detail; } - return _result; + 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); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'DebugInfo', + package: const $pb.PackageName(_omitMessageNames ? '' : 'google.rpc'), + createEmptyInstance: create) + ..pPS(1, _omitFieldNames ? '' : 'stackEntries') + ..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') @@ -130,9 +130,10 @@ class DebugInfo extends $pb.GeneratedMessage { 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') DebugInfo copyWith(void Function(DebugInfo) updates) => - super.copyWith((message) => updates(message as DebugInfo)) - as DebugInfo; // ignore: deprecated_member_use + super.copyWith((message) => updates(message as DebugInfo)) as DebugInfo; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static DebugInfo create() => DebugInfo._(); DebugInfo createEmptyInstance() => create(); @@ -142,9 +143,11 @@ class DebugInfo extends $pb.GeneratedMessage { _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static DebugInfo? _defaultInstance; + /// The stack trace entries indicating where the error occurred. @$pb.TagNumber(1) $core.List<$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) @@ -158,48 +161,38 @@ class DebugInfo extends $pb.GeneratedMessage { void clearDetail() => clearField(2); } +/// A message type used to describe a single quota violation. For example, a +/// daily quota or a custom quota that was exceeded. class QuotaFailure_Violation extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'QuotaFailure.Violation', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'google.rpc'), - createEmptyInstance: create) - ..aOS( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'subject') - ..aOS( - 2, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'description') - ..hasRequiredFields = false; - - QuotaFailure_Violation._() : super(); factory QuotaFailure_Violation({ $core.String? subject, $core.String? description, }) { - final _result = create(); + final result = create(); if (subject != null) { - _result.subject = subject; + result.subject = subject; } if (description != null) { - _result.description = description; + result.description = description; } - return _result; + 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); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'QuotaFailure.Violation', + package: const $pb.PackageName(_omitMessageNames ? '' : 'google.rpc'), + createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'subject') + ..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') @@ -211,8 +204,10 @@ class QuotaFailure_Violation extends $pb.GeneratedMessage { QuotaFailure_Violation copyWith( void Function(QuotaFailure_Violation) updates) => super.copyWith((message) => updates(message as QuotaFailure_Violation)) - as QuotaFailure_Violation; // ignore: deprecated_member_use + as QuotaFailure_Violation; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static QuotaFailure_Violation create() => QuotaFailure_Violation._(); QuotaFailure_Violation createEmptyInstance() => create(); @@ -223,6 +218,9 @@ class QuotaFailure_Violation extends $pb.GeneratedMessage { $pb.GeneratedMessage.$_defaultFor(create); static QuotaFailure_Violation? _defaultInstance; + /// The subject on which the quota check failed. + /// For example, "clientip:" or "project:". @$pb.TagNumber(1) $core.String get subject => $_getSZ(0); @$pb.TagNumber(1) @@ -235,6 +233,13 @@ class QuotaFailure_Violation extends $pb.GeneratedMessage { @$pb.TagNumber(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. + /// + /// For example: "Service disabled" or "Daily Limit for read operations + /// exceeded". @$pb.TagNumber(2) $core.String get description => $_getSZ(1); @$pb.TagNumber(2) @@ -248,41 +253,44 @@ class QuotaFailure_Violation extends $pb.GeneratedMessage { void clearDescription() => clearField(2); } +/// 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. +/// +/// Also see RetryInfo and Help types for other details about handling a +/// quota failure. class QuotaFailure extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'QuotaFailure', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'google.rpc'), - createEmptyInstance: create) - ..pc( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'violations', - $pb.PbFieldType.PM, - subBuilder: QuotaFailure_Violation.create) - ..hasRequiredFields = false; - - QuotaFailure._() : super(); factory QuotaFailure({ $core.Iterable? violations, }) { - final _result = create(); + final result = create(); if (violations != null) { - _result.violations.addAll(violations); + result.violations.addAll(violations); } - return _result; + 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); + + 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, + 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') @@ -292,8 +300,10 @@ class QuotaFailure extends $pb.GeneratedMessage { 'Will be removed in next major version') QuotaFailure copyWith(void Function(QuotaFailure) updates) => super.copyWith((message) => updates(message as QuotaFailure)) - as QuotaFailure; // ignore: deprecated_member_use + as QuotaFailure; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static QuotaFailure create() => QuotaFailure._(); QuotaFailure createEmptyInstance() => create(); @@ -304,65 +314,74 @@ class QuotaFailure extends $pb.GeneratedMessage { $pb.GeneratedMessage.$_defaultFor(create); static QuotaFailure? _defaultInstance; + /// Describes all quota violations. @$pb.TagNumber(1) $core.List get violations => $_getList(0); } +/// 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: +/// +/// { "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. +/// +/// 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" +/// } +/// } class ErrorInfo extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'ErrorInfo', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'google.rpc'), - createEmptyInstance: create) - ..aOS( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'reason') - ..aOS( - 2, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'domain') - ..m<$core.String, $core.String>( - 3, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'metadata', - entryClassName: 'ErrorInfo.MetadataEntry', - keyFieldType: $pb.PbFieldType.OS, - valueFieldType: $pb.PbFieldType.OS, - packageName: const $pb.PackageName('google.rpc')) - ..hasRequiredFields = false; - - ErrorInfo._() : super(); factory ErrorInfo({ $core.String? reason, $core.String? domain, $core.Map<$core.String, $core.String>? metadata, }) { - final _result = create(); + final result = create(); if (reason != null) { - _result.reason = reason; + result.reason = reason; } if (domain != null) { - _result.domain = domain; + result.domain = domain; } if (metadata != null) { - _result.metadata.addAll(metadata); + result.metadata.addAll(metadata); } - return _result; + 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); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'ErrorInfo', + package: const $pb.PackageName(_omitMessageNames ? '' : 'google.rpc'), + createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'reason') + ..aOS(2, _omitFieldNames ? '' : 'domain') + ..m<$core.String, $core.String>(3, _omitFieldNames ? '' : 'metadata', + entryClassName: 'ErrorInfo.MetadataEntry', + keyFieldType: $pb.PbFieldType.OS, + valueFieldType: $pb.PbFieldType.OS, + 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') @@ -371,9 +390,10 @@ class ErrorInfo extends $pb.GeneratedMessage { 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') ErrorInfo copyWith(void Function(ErrorInfo) updates) => - super.copyWith((message) => updates(message as ErrorInfo)) - as ErrorInfo; // ignore: deprecated_member_use + super.copyWith((message) => updates(message as ErrorInfo)) as ErrorInfo; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static ErrorInfo create() => ErrorInfo._(); ErrorInfo createEmptyInstance() => create(); @@ -383,6 +403,10 @@ class ErrorInfo extends $pb.GeneratedMessage { _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static ErrorInfo? _defaultInstance; + /// The reason of the error. This is a constant value that identifies the + /// proximate cause of the error. Error reasons are unique within a particular + /// domain of errors. This should be at most 63 characters and match + /// /[A-Z0-9_]+/. @$pb.TagNumber(1) $core.String get reason => $_getSZ(0); @$pb.TagNumber(1) @@ -395,6 +419,12 @@ class ErrorInfo extends $pb.GeneratedMessage { @$pb.TagNumber(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 + /// generates the error. Example: "pubsub.googleapis.com". If the error is + /// generated by some common infrastructure, the error domain must be a + /// globally unique value that identifies the infrastructure. For Google API + /// infrastructure, the error domain is "googleapis.com". @$pb.TagNumber(2) $core.String get domain => $_getSZ(1); @$pb.TagNumber(2) @@ -407,61 +437,54 @@ class ErrorInfo extends $pb.GeneratedMessage { @$pb.TagNumber(2) void clearDomain() => clearField(2); + /// 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. @$pb.TagNumber(3) $core.Map<$core.String, $core.String> get metadata => $_getMap(2); } +/// A message type used to describe a single precondition failure. class PreconditionFailure_Violation extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'PreconditionFailure.Violation', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'google.rpc'), - createEmptyInstance: create) - ..aOS( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'type') - ..aOS( - 2, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'subject') - ..aOS( - 3, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'description') - ..hasRequiredFields = false; - - PreconditionFailure_Violation._() : super(); factory PreconditionFailure_Violation({ $core.String? type, $core.String? subject, $core.String? description, }) { - final _result = create(); + final result = create(); if (type != null) { - _result.type = type; + result.type = type; } if (subject != null) { - _result.subject = subject; + result.subject = subject; } if (description != null) { - _result.description = description; + result.description = description; } - return _result; + 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); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'PreconditionFailure.Violation', + package: const $pb.PackageName(_omitMessageNames ? '' : 'google.rpc'), + createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'type') + ..aOS(2, _omitFieldNames ? '' : 'subject') + ..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') @@ -474,8 +497,10 @@ class PreconditionFailure_Violation extends $pb.GeneratedMessage { void Function(PreconditionFailure_Violation) updates) => super.copyWith( (message) => updates(message as PreconditionFailure_Violation)) - as PreconditionFailure_Violation; // ignore: deprecated_member_use + as PreconditionFailure_Violation; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static PreconditionFailure_Violation create() => PreconditionFailure_Violation._(); @@ -487,6 +512,9 @@ class PreconditionFailure_Violation extends $pb.GeneratedMessage { $pb.GeneratedMessage.$_defaultFor(create); static PreconditionFailure_Violation? _defaultInstance; + /// The type of PreconditionFailure. We recommend using a service-specific + /// enum type to define the supported precondition violation subjects. For + /// example, "TOS" for "Terms of Service violation". @$pb.TagNumber(1) $core.String get type => $_getSZ(0); @$pb.TagNumber(1) @@ -499,6 +527,9 @@ class PreconditionFailure_Violation extends $pb.GeneratedMessage { @$pb.TagNumber(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 + /// which terms of service is being referenced. @$pb.TagNumber(2) $core.String get subject => $_getSZ(1); @$pb.TagNumber(2) @@ -511,6 +542,10 @@ class PreconditionFailure_Violation extends $pb.GeneratedMessage { @$pb.TagNumber(2) void clearSubject() => clearField(2); + /// 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". @$pb.TagNumber(3) $core.String get description => $_getSZ(2); @$pb.TagNumber(3) @@ -524,41 +559,38 @@ class PreconditionFailure_Violation extends $pb.GeneratedMessage { void clearDescription() => clearField(3); } +/// 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. class PreconditionFailure extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'PreconditionFailure', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'google.rpc'), - createEmptyInstance: create) - ..pc( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'violations', - $pb.PbFieldType.PM, - subBuilder: PreconditionFailure_Violation.create) - ..hasRequiredFields = false; - - PreconditionFailure._() : super(); factory PreconditionFailure({ $core.Iterable? violations, }) { - final _result = create(); + final result = create(); if (violations != null) { - _result.violations.addAll(violations); + result.violations.addAll(violations); } - return _result; + 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); + + 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, + 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') @@ -568,8 +600,10 @@ class PreconditionFailure extends $pb.GeneratedMessage { 'Will be removed in next major version') PreconditionFailure copyWith(void Function(PreconditionFailure) updates) => super.copyWith((message) => updates(message as PreconditionFailure)) - as PreconditionFailure; // ignore: deprecated_member_use + as PreconditionFailure; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static PreconditionFailure create() => PreconditionFailure._(); PreconditionFailure createEmptyInstance() => create(); @@ -580,52 +614,42 @@ class PreconditionFailure extends $pb.GeneratedMessage { $pb.GeneratedMessage.$_defaultFor(create); static PreconditionFailure? _defaultInstance; + /// Describes all precondition violations. @$pb.TagNumber(1) $core.List get violations => $_getList(0); } +/// A message type used to describe a single bad request field. class BadRequest_FieldViolation extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'BadRequest.FieldViolation', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'google.rpc'), - createEmptyInstance: create) - ..aOS( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'field') - ..aOS( - 2, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'description') - ..hasRequiredFields = false; - - BadRequest_FieldViolation._() : super(); factory BadRequest_FieldViolation({ $core.String? field_1, $core.String? description, }) { - final _result = create(); + final result = create(); if (field_1 != null) { - _result.field_1 = field_1; + result.field_1 = field_1; } if (description != null) { - _result.description = description; + result.description = description; } - return _result; + 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); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'BadRequest.FieldViolation', + package: const $pb.PackageName(_omitMessageNames ? '' : 'google.rpc'), + createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'field') + ..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') @@ -637,8 +661,10 @@ class BadRequest_FieldViolation extends $pb.GeneratedMessage { BadRequest_FieldViolation copyWith( void Function(BadRequest_FieldViolation) updates) => super.copyWith((message) => updates(message as BadRequest_FieldViolation)) - as BadRequest_FieldViolation; // ignore: deprecated_member_use + as BadRequest_FieldViolation; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static BadRequest_FieldViolation create() => BadRequest_FieldViolation._(); BadRequest_FieldViolation createEmptyInstance() => create(); @@ -649,6 +675,9 @@ class BadRequest_FieldViolation extends $pb.GeneratedMessage { $pb.GeneratedMessage.$_defaultFor(create); static BadRequest_FieldViolation? _defaultInstance; + /// A path leading to a field in the request body. The value will be a + /// sequence of dot-separated identifiers that identify a protocol buffer + /// field. E.g., "field_violations.field" would identify this field. @$pb.TagNumber(1) $core.String get field_1 => $_getSZ(0); @$pb.TagNumber(1) @@ -661,6 +690,7 @@ class BadRequest_FieldViolation extends $pb.GeneratedMessage { @$pb.TagNumber(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) @@ -674,41 +704,35 @@ class BadRequest_FieldViolation extends $pb.GeneratedMessage { void clearDescription() => clearField(2); } +/// Describes violations in a client request. This error type focuses on the +/// syntactic aspects of the request. class BadRequest extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'BadRequest', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'google.rpc'), - createEmptyInstance: create) - ..pc( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'fieldViolations', - $pb.PbFieldType.PM, - subBuilder: BadRequest_FieldViolation.create) - ..hasRequiredFields = false; - - BadRequest._() : super(); factory BadRequest({ $core.Iterable? fieldViolations, }) { - final _result = create(); + final result = create(); if (fieldViolations != null) { - _result.fieldViolations.addAll(fieldViolations); + result.fieldViolations.addAll(fieldViolations); } - return _result; + 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); + + 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, + 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') @@ -717,9 +741,10 @@ class BadRequest extends $pb.GeneratedMessage { 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') BadRequest copyWith(void Function(BadRequest) updates) => - super.copyWith((message) => updates(message as BadRequest)) - as BadRequest; // ignore: deprecated_member_use + super.copyWith((message) => updates(message as BadRequest)) as BadRequest; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static BadRequest create() => BadRequest._(); BadRequest createEmptyInstance() => create(); @@ -729,52 +754,43 @@ class BadRequest extends $pb.GeneratedMessage { $pb.GeneratedMessage.$_defaultFor(create); static BadRequest? _defaultInstance; + /// Describes all violations in a client request. @$pb.TagNumber(1) $core.List get fieldViolations => $_getList(0); } +/// Contains metadata about the request that clients can attach when filing a bug +/// or providing other forms of feedback. class RequestInfo extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'RequestInfo', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'google.rpc'), - createEmptyInstance: create) - ..aOS( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'requestId') - ..aOS( - 2, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'servingData') - ..hasRequiredFields = false; - - RequestInfo._() : super(); factory RequestInfo({ $core.String? requestId, $core.String? servingData, }) { - final _result = create(); + final result = create(); if (requestId != null) { - _result.requestId = requestId; + result.requestId = requestId; } if (servingData != null) { - _result.servingData = servingData; + result.servingData = servingData; } - return _result; + 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); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'RequestInfo', + package: const $pb.PackageName(_omitMessageNames ? '' : 'google.rpc'), + createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'requestId') + ..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') @@ -784,8 +800,10 @@ class RequestInfo extends $pb.GeneratedMessage { 'Will be removed in next major version') RequestInfo copyWith(void Function(RequestInfo) updates) => super.copyWith((message) => updates(message as RequestInfo)) - as RequestInfo; // ignore: deprecated_member_use + as RequestInfo; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static RequestInfo create() => RequestInfo._(); RequestInfo createEmptyInstance() => create(); @@ -795,6 +813,8 @@ class RequestInfo extends $pb.GeneratedMessage { $pb.GeneratedMessage.$_defaultFor(create); static RequestInfo? _defaultInstance; + /// An opaque string that should only be interpreted by the service generating + /// it. For example, it can be used to identify requests in the service's logs. @$pb.TagNumber(1) $core.String get requestId => $_getSZ(0); @$pb.TagNumber(1) @@ -807,6 +827,8 @@ class RequestInfo extends $pb.GeneratedMessage { @$pb.TagNumber(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) @@ -820,66 +842,47 @@ class RequestInfo extends $pb.GeneratedMessage { void clearServingData() => clearField(2); } +/// Describes the resource that is being accessed. class ResourceInfo extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'ResourceInfo', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'google.rpc'), - createEmptyInstance: create) - ..aOS( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'resourceType') - ..aOS( - 2, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'resourceName') - ..aOS( - 3, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'owner') - ..aOS( - 4, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'description') - ..hasRequiredFields = false; - - ResourceInfo._() : super(); factory ResourceInfo({ $core.String? resourceType, $core.String? resourceName, $core.String? owner, $core.String? description, }) { - final _result = create(); + final result = create(); if (resourceType != null) { - _result.resourceType = resourceType; + result.resourceType = resourceType; } if (resourceName != null) { - _result.resourceName = resourceName; + result.resourceName = resourceName; } if (owner != null) { - _result.owner = owner; + result.owner = owner; } if (description != null) { - _result.description = description; + result.description = description; } - return _result; + 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); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'ResourceInfo', + package: const $pb.PackageName(_omitMessageNames ? '' : 'google.rpc'), + createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'resourceType') + ..aOS(2, _omitFieldNames ? '' : 'resourceName') + ..aOS(3, _omitFieldNames ? '' : 'owner') + ..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') @@ -889,8 +892,10 @@ class ResourceInfo extends $pb.GeneratedMessage { 'Will be removed in next major version') ResourceInfo copyWith(void Function(ResourceInfo) updates) => super.copyWith((message) => updates(message as ResourceInfo)) - as ResourceInfo; // ignore: deprecated_member_use + as ResourceInfo; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static ResourceInfo create() => ResourceInfo._(); ResourceInfo createEmptyInstance() => create(); @@ -901,6 +906,9 @@ class ResourceInfo extends $pb.GeneratedMessage { $pb.GeneratedMessage.$_defaultFor(create); static ResourceInfo? _defaultInstance; + /// A name for the type of resource being accessed, e.g. "sql table", + /// "cloud storage bucket", "file", "Google calendar"; or the type URL + /// of the resource: e.g. "type.googleapis.com/google.pubsub.v1.Topic". @$pb.TagNumber(1) $core.String get resourceType => $_getSZ(0); @$pb.TagNumber(1) @@ -913,6 +921,9 @@ class ResourceInfo extends $pb.GeneratedMessage { @$pb.TagNumber(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 + /// error is [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED]. @$pb.TagNumber(2) $core.String get resourceName => $_getSZ(1); @$pb.TagNumber(2) @@ -925,6 +936,9 @@ class ResourceInfo extends $pb.GeneratedMessage { @$pb.TagNumber(2) void clearResourceName() => clearField(2); + /// The owner of the resource (optional). + /// For example, "user:" or "project:". @$pb.TagNumber(3) $core.String get owner => $_getSZ(2); @$pb.TagNumber(3) @@ -937,6 +951,9 @@ class ResourceInfo extends $pb.GeneratedMessage { @$pb.TagNumber(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 + /// on the developer console project. @$pb.TagNumber(4) $core.String get description => $_getSZ(3); @$pb.TagNumber(4) @@ -950,48 +967,37 @@ class ResourceInfo extends $pb.GeneratedMessage { void clearDescription() => clearField(4); } +/// Describes a URL link. class Help_Link extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'Help.Link', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'google.rpc'), - createEmptyInstance: create) - ..aOS( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'description') - ..aOS( - 2, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'url') - ..hasRequiredFields = false; - - Help_Link._() : super(); factory Help_Link({ $core.String? description, $core.String? url, }) { - final _result = create(); + final result = create(); if (description != null) { - _result.description = description; + result.description = description; } if (url != null) { - _result.url = url; + result.url = url; } - return _result; + 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); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'Help.Link', + package: const $pb.PackageName(_omitMessageNames ? '' : 'google.rpc'), + createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'description') + ..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') @@ -1000,9 +1006,10 @@ class Help_Link extends $pb.GeneratedMessage { 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') Help_Link copyWith(void Function(Help_Link) updates) => - super.copyWith((message) => updates(message as Help_Link)) - as Help_Link; // ignore: deprecated_member_use + super.copyWith((message) => updates(message as Help_Link)) as Help_Link; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static Help_Link create() => Help_Link._(); Help_Link createEmptyInstance() => create(); @@ -1012,6 +1019,7 @@ class Help_Link extends $pb.GeneratedMessage { _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static Help_Link? _defaultInstance; + /// Describes what the link offers. @$pb.TagNumber(1) $core.String get description => $_getSZ(0); @$pb.TagNumber(1) @@ -1024,6 +1032,7 @@ class Help_Link extends $pb.GeneratedMessage { @$pb.TagNumber(1) void clearDescription() => clearField(1); + /// The URL of the link. @$pb.TagNumber(2) $core.String get url => $_getSZ(1); @$pb.TagNumber(2) @@ -1037,41 +1046,37 @@ class Help_Link extends $pb.GeneratedMessage { void clearUrl() => clearField(2); } +/// 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. class Help extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'Help', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'google.rpc'), - createEmptyInstance: create) - ..pc( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'links', - $pb.PbFieldType.PM, - subBuilder: Help_Link.create) - ..hasRequiredFields = false; - - Help._() : super(); factory Help({ $core.Iterable? links, }) { - final _result = create(); + final result = create(); if (links != null) { - _result.links.addAll(links); + result.links.addAll(links); } - return _result; + 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); + + 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, + 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') @@ -1080,9 +1085,10 @@ class Help extends $pb.GeneratedMessage { 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') Help copyWith(void Function(Help) updates) => - super.copyWith((message) => updates(message as Help)) - as Help; // ignore: deprecated_member_use + super.copyWith((message) => updates(message as Help)) as Help; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static Help create() => Help._(); Help createEmptyInstance() => create(); @@ -1092,52 +1098,43 @@ class Help extends $pb.GeneratedMessage { _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static Help? _defaultInstance; + /// URL(s) pointing to additional information on handling the current error. @$pb.TagNumber(1) $core.List get links => $_getList(0); } +/// Provides a localized error message that is safe to return to the user +/// which can be attached to an RPC error. class LocalizedMessage extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'LocalizedMessage', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'google.rpc'), - createEmptyInstance: create) - ..aOS( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'locale') - ..aOS( - 2, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'message') - ..hasRequiredFields = false; - - LocalizedMessage._() : super(); factory LocalizedMessage({ $core.String? locale, $core.String? message, }) { - final _result = create(); + final result = create(); if (locale != null) { - _result.locale = locale; + result.locale = locale; } if (message != null) { - _result.message = message; + result.message = message; } - return _result; + 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); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'LocalizedMessage', + package: const $pb.PackageName(_omitMessageNames ? '' : 'google.rpc'), + createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'locale') + ..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') @@ -1147,8 +1144,10 @@ class LocalizedMessage extends $pb.GeneratedMessage { 'Will be removed in next major version') LocalizedMessage copyWith(void Function(LocalizedMessage) updates) => super.copyWith((message) => updates(message as LocalizedMessage)) - as LocalizedMessage; // ignore: deprecated_member_use + as LocalizedMessage; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static LocalizedMessage create() => LocalizedMessage._(); LocalizedMessage createEmptyInstance() => create(); @@ -1159,6 +1158,9 @@ class LocalizedMessage extends $pb.GeneratedMessage { $pb.GeneratedMessage.$_defaultFor(create); static LocalizedMessage? _defaultInstance; + /// The locale used following the specification defined at + /// http://www.rfc-editor.org/rfc/bcp/bcp47.txt. + /// Examples are: "en-US", "fr-CH", "es-MX" @$pb.TagNumber(1) $core.String get locale => $_getSZ(0); @$pb.TagNumber(1) @@ -1171,6 +1173,7 @@ class LocalizedMessage extends $pb.GeneratedMessage { @$pb.TagNumber(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) @@ -1183,3 +1186,7 @@ class LocalizedMessage extends $pb.GeneratedMessage { @$pb.TagNumber(2) void clearMessage() => clearField(2); } + +const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); +const _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 33b1a93..9b5bee1 100644 --- a/lib/src/generated/google/rpc/error_details.pbenum.dart +++ b/lib/src/generated/google/rpc/error_details.pbenum.dart @@ -1,6 +1,10 @@ -/// +// // Generated code. Do not modify. // source: google/rpc/error_details.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + +// 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 diff --git a/lib/src/generated/google/rpc/error_details.pbjson.dart b/lib/src/generated/google/rpc/error_details.pbjson.dart index 7c36b19..d7c1f0e 100644 --- a/lib/src/generated/google/rpc/error_details.pbjson.dart +++ b/lib/src/generated/google/rpc/error_details.pbjson.dart @@ -1,19 +1,23 @@ -/// +// // Generated code. Do not modify. // source: google/rpc/error_details.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,deprecated_member_use_from_same_package,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name -import 'dart:core' as $core; +// 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 + import 'dart:convert' as $convert; +import 'dart:core' as $core; import 'dart:typed_data' as $typed_data; @$core.Deprecated('Use retryInfoDescriptor instead') -const RetryInfo$json = const { +const RetryInfo$json = { '1': 'RetryInfo', - '2': const [ - const { + '2': [ + { '1': 'retry_delay', '3': 1, '4': 1, @@ -26,24 +30,28 @@ const RetryInfo$json = const { /// Descriptor for `RetryInfo`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List retryInfoDescriptor = $convert.base64Decode( - 'CglSZXRyeUluZm8SOgoLcmV0cnlfZGVsYXkYASABKAsyGS5nb29nbGUucHJvdG9idWYuRHVyYXRpb25SCnJldHJ5RGVsYXk='); + 'CglSZXRyeUluZm8SOgoLcmV0cnlfZGVsYXkYASABKAsyGS5nb29nbGUucHJvdG9idWYuRHVyYX' + 'Rpb25SCnJldHJ5RGVsYXk='); + @$core.Deprecated('Use debugInfoDescriptor instead') -const DebugInfo$json = const { +const DebugInfo$json = { '1': 'DebugInfo', - '2': const [ - const {'1': 'stack_entries', '3': 1, '4': 3, '5': 9, '10': 'stackEntries'}, - const {'1': 'detail', '3': 2, '4': 1, '5': 9, '10': 'detail'}, + '2': [ + {'1': 'stack_entries', '3': 1, '4': 3, '5': 9, '10': 'stackEntries'}, + {'1': 'detail', '3': 2, '4': 1, '5': 9, '10': 'detail'}, ], }; /// Descriptor for `DebugInfo`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List debugInfoDescriptor = $convert.base64Decode( - 'CglEZWJ1Z0luZm8SIwoNc3RhY2tfZW50cmllcxgBIAMoCVIMc3RhY2tFbnRyaWVzEhYKBmRldGFpbBgCIAEoCVIGZGV0YWls'); + 'CglEZWJ1Z0luZm8SIwoNc3RhY2tfZW50cmllcxgBIAMoCVIMc3RhY2tFbnRyaWVzEhYKBmRldG' + 'FpbBgCIAEoCVIGZGV0YWls'); + @$core.Deprecated('Use quotaFailureDescriptor instead') -const QuotaFailure$json = const { +const QuotaFailure$json = { '1': 'QuotaFailure', - '2': const [ - const { + '2': [ + { '1': 'violations', '3': 1, '4': 3, @@ -52,28 +60,31 @@ const QuotaFailure$json = const { '10': 'violations' }, ], - '3': const [QuotaFailure_Violation$json], + '3': [QuotaFailure_Violation$json], }; @$core.Deprecated('Use quotaFailureDescriptor instead') -const QuotaFailure_Violation$json = const { +const QuotaFailure_Violation$json = { '1': 'Violation', - '2': const [ - const {'1': 'subject', '3': 1, '4': 1, '5': 9, '10': 'subject'}, - const {'1': 'description', '3': 2, '4': 1, '5': 9, '10': 'description'}, + '2': [ + {'1': 'subject', '3': 1, '4': 1, '5': 9, '10': 'subject'}, + {'1': 'description', '3': 2, '4': 1, '5': 9, '10': 'description'}, ], }; /// Descriptor for `QuotaFailure`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List quotaFailureDescriptor = $convert.base64Decode( - 'CgxRdW90YUZhaWx1cmUSQgoKdmlvbGF0aW9ucxgBIAMoCzIiLmdvb2dsZS5ycGMuUXVvdGFGYWlsdXJlLlZpb2xhdGlvblIKdmlvbGF0aW9ucxpHCglWaW9sYXRpb24SGAoHc3ViamVjdBgBIAEoCVIHc3ViamVjdBIgCgtkZXNjcmlwdGlvbhgCIAEoCVILZGVzY3JpcHRpb24='); + 'CgxRdW90YUZhaWx1cmUSQgoKdmlvbGF0aW9ucxgBIAMoCzIiLmdvb2dsZS5ycGMuUXVvdGFGYW' + 'lsdXJlLlZpb2xhdGlvblIKdmlvbGF0aW9ucxpHCglWaW9sYXRpb24SGAoHc3ViamVjdBgBIAEo' + 'CVIHc3ViamVjdBIgCgtkZXNjcmlwdGlvbhgCIAEoCVILZGVzY3JpcHRpb24='); + @$core.Deprecated('Use errorInfoDescriptor instead') -const ErrorInfo$json = const { +const ErrorInfo$json = { '1': 'ErrorInfo', - '2': const [ - const {'1': 'reason', '3': 1, '4': 1, '5': 9, '10': 'reason'}, - const {'1': 'domain', '3': 2, '4': 1, '5': 9, '10': 'domain'}, - const { + '2': [ + {'1': 'reason', '3': 1, '4': 1, '5': 9, '10': 'reason'}, + {'1': 'domain', '3': 2, '4': 1, '5': 9, '10': 'domain'}, + { '1': 'metadata', '3': 3, '4': 3, @@ -82,27 +93,31 @@ const ErrorInfo$json = const { '10': 'metadata' }, ], - '3': const [ErrorInfo_MetadataEntry$json], + '3': [ErrorInfo_MetadataEntry$json], }; @$core.Deprecated('Use errorInfoDescriptor instead') -const ErrorInfo_MetadataEntry$json = const { +const ErrorInfo_MetadataEntry$json = { '1': 'MetadataEntry', - '2': const [ - const {'1': 'key', '3': 1, '4': 1, '5': 9, '10': 'key'}, - const {'1': 'value', '3': 2, '4': 1, '5': 9, '10': 'value'}, + '2': [ + {'1': 'key', '3': 1, '4': 1, '5': 9, '10': 'key'}, + {'1': 'value', '3': 2, '4': 1, '5': 9, '10': 'value'}, ], - '7': const {'7': true}, + '7': {'7': true}, }; /// Descriptor for `ErrorInfo`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List errorInfoDescriptor = $convert.base64Decode( - 'CglFcnJvckluZm8SFgoGcmVhc29uGAEgASgJUgZyZWFzb24SFgoGZG9tYWluGAIgASgJUgZkb21haW4SPwoIbWV0YWRhdGEYAyADKAsyIy5nb29nbGUucnBjLkVycm9ySW5mby5NZXRhZGF0YUVudHJ5UghtZXRhZGF0YRo7Cg1NZXRhZGF0YUVudHJ5EhAKA2tleRgBIAEoCVIDa2V5EhQKBXZhbHVlGAIgASgJUgV2YWx1ZToCOAE='); + 'CglFcnJvckluZm8SFgoGcmVhc29uGAEgASgJUgZyZWFzb24SFgoGZG9tYWluGAIgASgJUgZkb2' + '1haW4SPwoIbWV0YWRhdGEYAyADKAsyIy5nb29nbGUucnBjLkVycm9ySW5mby5NZXRhZGF0YUVu' + 'dHJ5UghtZXRhZGF0YRo7Cg1NZXRhZGF0YUVudHJ5EhAKA2tleRgBIAEoCVIDa2V5EhQKBXZhbH' + 'VlGAIgASgJUgV2YWx1ZToCOAE='); + @$core.Deprecated('Use preconditionFailureDescriptor instead') -const PreconditionFailure$json = const { +const PreconditionFailure$json = { '1': 'PreconditionFailure', - '2': const [ - const { + '2': [ + { '1': 'violations', '3': 1, '4': 3, @@ -111,27 +126,31 @@ const PreconditionFailure$json = const { '10': 'violations' }, ], - '3': const [PreconditionFailure_Violation$json], + '3': [PreconditionFailure_Violation$json], }; @$core.Deprecated('Use preconditionFailureDescriptor instead') -const PreconditionFailure_Violation$json = const { +const PreconditionFailure_Violation$json = { '1': 'Violation', - '2': const [ - const {'1': 'type', '3': 1, '4': 1, '5': 9, '10': 'type'}, - const {'1': 'subject', '3': 2, '4': 1, '5': 9, '10': 'subject'}, - const {'1': 'description', '3': 3, '4': 1, '5': 9, '10': 'description'}, + '2': [ + {'1': 'type', '3': 1, '4': 1, '5': 9, '10': 'type'}, + {'1': 'subject', '3': 2, '4': 1, '5': 9, '10': 'subject'}, + {'1': 'description', '3': 3, '4': 1, '5': 9, '10': 'description'}, ], }; /// Descriptor for `PreconditionFailure`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List preconditionFailureDescriptor = $convert.base64Decode( - 'ChNQcmVjb25kaXRpb25GYWlsdXJlEkkKCnZpb2xhdGlvbnMYASADKAsyKS5nb29nbGUucnBjLlByZWNvbmRpdGlvbkZhaWx1cmUuVmlvbGF0aW9uUgp2aW9sYXRpb25zGlsKCVZpb2xhdGlvbhISCgR0eXBlGAEgASgJUgR0eXBlEhgKB3N1YmplY3QYAiABKAlSB3N1YmplY3QSIAoLZGVzY3JpcHRpb24YAyABKAlSC2Rlc2NyaXB0aW9u'); + 'ChNQcmVjb25kaXRpb25GYWlsdXJlEkkKCnZpb2xhdGlvbnMYASADKAsyKS5nb29nbGUucnBjLl' + 'ByZWNvbmRpdGlvbkZhaWx1cmUuVmlvbGF0aW9uUgp2aW9sYXRpb25zGlsKCVZpb2xhdGlvbhIS' + 'CgR0eXBlGAEgASgJUgR0eXBlEhgKB3N1YmplY3QYAiABKAlSB3N1YmplY3QSIAoLZGVzY3JpcH' + 'Rpb24YAyABKAlSC2Rlc2NyaXB0aW9u'); + @$core.Deprecated('Use badRequestDescriptor instead') -const BadRequest$json = const { +const BadRequest$json = { '1': 'BadRequest', - '2': const [ - const { + '2': [ + { '1': 'field_violations', '3': 1, '4': 3, @@ -140,52 +159,61 @@ const BadRequest$json = const { '10': 'fieldViolations' }, ], - '3': const [BadRequest_FieldViolation$json], + '3': [BadRequest_FieldViolation$json], }; @$core.Deprecated('Use badRequestDescriptor instead') -const BadRequest_FieldViolation$json = const { +const BadRequest_FieldViolation$json = { '1': 'FieldViolation', - '2': const [ - const {'1': 'field', '3': 1, '4': 1, '5': 9, '10': 'field'}, - const {'1': 'description', '3': 2, '4': 1, '5': 9, '10': 'description'}, + '2': [ + {'1': 'field', '3': 1, '4': 1, '5': 9, '10': 'field'}, + {'1': 'description', '3': 2, '4': 1, '5': 9, '10': 'description'}, ], }; /// Descriptor for `BadRequest`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List badRequestDescriptor = $convert.base64Decode( - 'CgpCYWRSZXF1ZXN0ElAKEGZpZWxkX3Zpb2xhdGlvbnMYASADKAsyJS5nb29nbGUucnBjLkJhZFJlcXVlc3QuRmllbGRWaW9sYXRpb25SD2ZpZWxkVmlvbGF0aW9ucxpICg5GaWVsZFZpb2xhdGlvbhIUCgVmaWVsZBgBIAEoCVIFZmllbGQSIAoLZGVzY3JpcHRpb24YAiABKAlSC2Rlc2NyaXB0aW9u'); + 'CgpCYWRSZXF1ZXN0ElAKEGZpZWxkX3Zpb2xhdGlvbnMYASADKAsyJS5nb29nbGUucnBjLkJhZF' + 'JlcXVlc3QuRmllbGRWaW9sYXRpb25SD2ZpZWxkVmlvbGF0aW9ucxpICg5GaWVsZFZpb2xhdGlv' + 'bhIUCgVmaWVsZBgBIAEoCVIFZmllbGQSIAoLZGVzY3JpcHRpb24YAiABKAlSC2Rlc2NyaXB0aW' + '9u'); + @$core.Deprecated('Use requestInfoDescriptor instead') -const RequestInfo$json = const { +const RequestInfo$json = { '1': 'RequestInfo', - '2': const [ - const {'1': 'request_id', '3': 1, '4': 1, '5': 9, '10': 'requestId'}, - const {'1': 'serving_data', '3': 2, '4': 1, '5': 9, '10': 'servingData'}, + '2': [ + {'1': 'request_id', '3': 1, '4': 1, '5': 9, '10': 'requestId'}, + {'1': 'serving_data', '3': 2, '4': 1, '5': 9, '10': 'servingData'}, ], }; /// Descriptor for `RequestInfo`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List requestInfoDescriptor = $convert.base64Decode( - 'CgtSZXF1ZXN0SW5mbxIdCgpyZXF1ZXN0X2lkGAEgASgJUglyZXF1ZXN0SWQSIQoMc2VydmluZ19kYXRhGAIgASgJUgtzZXJ2aW5nRGF0YQ=='); + 'CgtSZXF1ZXN0SW5mbxIdCgpyZXF1ZXN0X2lkGAEgASgJUglyZXF1ZXN0SWQSIQoMc2VydmluZ1' + '9kYXRhGAIgASgJUgtzZXJ2aW5nRGF0YQ=='); + @$core.Deprecated('Use resourceInfoDescriptor instead') -const ResourceInfo$json = const { +const ResourceInfo$json = { '1': 'ResourceInfo', - '2': const [ - const {'1': 'resource_type', '3': 1, '4': 1, '5': 9, '10': 'resourceType'}, - const {'1': 'resource_name', '3': 2, '4': 1, '5': 9, '10': 'resourceName'}, - const {'1': 'owner', '3': 3, '4': 1, '5': 9, '10': 'owner'}, - const {'1': 'description', '3': 4, '4': 1, '5': 9, '10': 'description'}, + '2': [ + {'1': 'resource_type', '3': 1, '4': 1, '5': 9, '10': 'resourceType'}, + {'1': 'resource_name', '3': 2, '4': 1, '5': 9, '10': 'resourceName'}, + {'1': 'owner', '3': 3, '4': 1, '5': 9, '10': 'owner'}, + {'1': 'description', '3': 4, '4': 1, '5': 9, '10': 'description'}, ], }; /// Descriptor for `ResourceInfo`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List resourceInfoDescriptor = $convert.base64Decode( - 'CgxSZXNvdXJjZUluZm8SIwoNcmVzb3VyY2VfdHlwZRgBIAEoCVIMcmVzb3VyY2VUeXBlEiMKDXJlc291cmNlX25hbWUYAiABKAlSDHJlc291cmNlTmFtZRIUCgVvd25lchgDIAEoCVIFb3duZXISIAoLZGVzY3JpcHRpb24YBCABKAlSC2Rlc2NyaXB0aW9u'); + 'CgxSZXNvdXJjZUluZm8SIwoNcmVzb3VyY2VfdHlwZRgBIAEoCVIMcmVzb3VyY2VUeXBlEiMKDX' + 'Jlc291cmNlX25hbWUYAiABKAlSDHJlc291cmNlTmFtZRIUCgVvd25lchgDIAEoCVIFb3duZXIS' + 'IAoLZGVzY3JpcHRpb24YBCABKAlSC2Rlc2NyaXB0aW9u'); + @$core.Deprecated('Use helpDescriptor instead') -const Help$json = const { +const Help$json = { '1': 'Help', - '2': const [ - const { + '2': [ + { '1': 'links', '3': 1, '4': 3, @@ -194,30 +222,33 @@ const Help$json = const { '10': 'links' }, ], - '3': const [Help_Link$json], + '3': [Help_Link$json], }; @$core.Deprecated('Use helpDescriptor instead') -const Help_Link$json = const { +const Help_Link$json = { '1': 'Link', - '2': const [ - const {'1': 'description', '3': 1, '4': 1, '5': 9, '10': 'description'}, - const {'1': 'url', '3': 2, '4': 1, '5': 9, '10': 'url'}, + '2': [ + {'1': 'description', '3': 1, '4': 1, '5': 9, '10': 'description'}, + {'1': 'url', '3': 2, '4': 1, '5': 9, '10': 'url'}, ], }; /// Descriptor for `Help`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List helpDescriptor = $convert.base64Decode( - 'CgRIZWxwEisKBWxpbmtzGAEgAygLMhUuZ29vZ2xlLnJwYy5IZWxwLkxpbmtSBWxpbmtzGjoKBExpbmsSIAoLZGVzY3JpcHRpb24YASABKAlSC2Rlc2NyaXB0aW9uEhAKA3VybBgCIAEoCVIDdXJs'); + 'CgRIZWxwEisKBWxpbmtzGAEgAygLMhUuZ29vZ2xlLnJwYy5IZWxwLkxpbmtSBWxpbmtzGjoKBE' + 'xpbmsSIAoLZGVzY3JpcHRpb24YASABKAlSC2Rlc2NyaXB0aW9uEhAKA3VybBgCIAEoCVIDdXJs'); + @$core.Deprecated('Use localizedMessageDescriptor instead') -const LocalizedMessage$json = const { +const LocalizedMessage$json = { '1': 'LocalizedMessage', - '2': const [ - const {'1': 'locale', '3': 1, '4': 1, '5': 9, '10': 'locale'}, - const {'1': 'message', '3': 2, '4': 1, '5': 9, '10': 'message'}, + '2': [ + {'1': 'locale', '3': 1, '4': 1, '5': 9, '10': 'locale'}, + {'1': 'message', '3': 2, '4': 1, '5': 9, '10': 'message'}, ], }; /// Descriptor for `LocalizedMessage`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List localizedMessageDescriptor = $convert.base64Decode( - 'ChBMb2NhbGl6ZWRNZXNzYWdlEhYKBmxvY2FsZRgBIAEoCVIGbG9jYWxlEhgKB21lc3NhZ2UYAiABKAlSB21lc3NhZ2U='); + 'ChBMb2NhbGl6ZWRNZXNzYWdlEhYKBmxvY2FsZRgBIAEoCVIGbG9jYWxlEhgKB21lc3NhZ2UYAi' + 'ABKAlSB21lc3NhZ2U='); diff --git a/lib/src/generated/google/rpc/status.pb.dart b/lib/src/generated/google/rpc/status.pb.dart index 84e13aa..35fbf1a 100644 --- a/lib/src/generated/google/rpc/status.pb.dart +++ b/lib/src/generated/google/rpc/status.pb.dart @@ -1,9 +1,13 @@ -/// +// // Generated code. Do not modify. // source: google/rpc/status.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + +// 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 import 'dart:core' as $core; @@ -11,60 +15,49 @@ 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. +/// +/// 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 { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'Status', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'google.rpc'), - createEmptyInstance: create) - ..a<$core.int>( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'code', - $pb.PbFieldType.O3) - ..aOS( - 2, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'message') - ..pc<$0.Any>( - 3, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'details', - $pb.PbFieldType.PM, - subBuilder: $0.Any.create) - ..hasRequiredFields = false; - - Status._() : super(); factory Status({ $core.int? code, $core.String? message, $core.Iterable<$0.Any>? details, }) { - final _result = create(); + final result = create(); if (code != null) { - _result.code = code; + result.code = code; } if (message != null) { - _result.message = message; + result.message = message; } if (details != null) { - _result.details.addAll(details); + result.details.addAll(details); } - return _result; + 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); + + 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) + ..aOS(2, _omitFieldNames ? '' : 'message') + ..pc<$0.Any>(3, _omitFieldNames ? '' : 'details', $pb.PbFieldType.PM, + 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') @@ -73,9 +66,10 @@ class Status extends $pb.GeneratedMessage { 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') Status copyWith(void Function(Status) updates) => - super.copyWith((message) => updates(message as Status)) - as Status; // ignore: deprecated_member_use + super.copyWith((message) => updates(message as Status)) as Status; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static Status create() => Status._(); Status createEmptyInstance() => create(); @@ -85,6 +79,7 @@ class Status extends $pb.GeneratedMessage { _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static Status? _defaultInstance; + /// The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. @$pb.TagNumber(1) $core.int get code => $_getIZ(0); @$pb.TagNumber(1) @@ -97,6 +92,9 @@ class Status extends $pb.GeneratedMessage { @$pb.TagNumber(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 + /// [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client. @$pb.TagNumber(2) $core.String get message => $_getSZ(1); @$pb.TagNumber(2) @@ -109,6 +107,12 @@ class Status extends $pb.GeneratedMessage { @$pb.TagNumber(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); } + +const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); +const _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 6ae5362..aaf54bb 100644 --- a/lib/src/generated/google/rpc/status.pbenum.dart +++ b/lib/src/generated/google/rpc/status.pbenum.dart @@ -1,6 +1,10 @@ -/// +// // Generated code. Do not modify. // source: google/rpc/status.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + +// 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 diff --git a/lib/src/generated/google/rpc/status.pbjson.dart b/lib/src/generated/google/rpc/status.pbjson.dart index 27c6caf..d7608ca 100644 --- a/lib/src/generated/google/rpc/status.pbjson.dart +++ b/lib/src/generated/google/rpc/status.pbjson.dart @@ -1,21 +1,25 @@ -/// +// // Generated code. Do not modify. // source: google/rpc/status.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,deprecated_member_use_from_same_package,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name -import 'dart:core' as $core; +// 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 + import 'dart:convert' as $convert; +import 'dart:core' as $core; import 'dart:typed_data' as $typed_data; @$core.Deprecated('Use statusDescriptor instead') -const Status$json = const { +const Status$json = { '1': 'Status', - '2': const [ - const {'1': 'code', '3': 1, '4': 1, '5': 5, '10': 'code'}, - const {'1': 'message', '3': 2, '4': 1, '5': 9, '10': 'message'}, - const { + '2': [ + {'1': 'code', '3': 1, '4': 1, '5': 5, '10': 'code'}, + {'1': 'message', '3': 2, '4': 1, '5': 9, '10': 'message'}, + { '1': 'details', '3': 3, '4': 3, @@ -28,4 +32,5 @@ const Status$json = const { /// Descriptor for `Status`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List statusDescriptor = $convert.base64Decode( - 'CgZTdGF0dXMSEgoEY29kZRgBIAEoBVIEY29kZRIYCgdtZXNzYWdlGAIgASgJUgdtZXNzYWdlEi4KB2RldGFpbHMYAyADKAsyFC5nb29nbGUucHJvdG9idWYuQW55UgdkZXRhaWxz'); + 'CgZTdGF0dXMSEgoEY29kZRgBIAEoBVIEY29kZRIYCgdtZXNzYWdlGAIgASgJUgdtZXNzYWdlEi' + '4KB2RldGFpbHMYAyADKAsyFC5nb29nbGUucHJvdG9idWYuQW55UgdkZXRhaWxz'); diff --git a/test/src/generated/echo.pb.dart b/test/src/generated/echo.pb.dart index 44512da..d9f8f12 100644 --- a/test/src/generated/echo.pb.dart +++ b/test/src/generated/echo.pb.dart @@ -1,47 +1,44 @@ -/// +// // Generated code. Do not modify. // source: echo.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + +// 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 import 'dart:core' as $core; import 'package:protobuf/protobuf.dart' as $pb; class EchoRequest extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'EchoRequest', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'grpc.gateway.testing'), - createEmptyInstance: create) - ..aOS( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'message') - ..hasRequiredFields = false; - - EchoRequest._() : super(); factory EchoRequest({ $core.String? message, }) { - final _result = create(); + final result = create(); if (message != null) { - _result.message = message; + result.message = message; } - return _result; + 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); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'EchoRequest', + package: const $pb.PackageName( + _omitMessageNames ? '' : 'grpc.gateway.testing'), + createEmptyInstance: create) + ..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') @@ -51,8 +48,10 @@ class EchoRequest extends $pb.GeneratedMessage { 'Will be removed in next major version') EchoRequest copyWith(void Function(EchoRequest) updates) => super.copyWith((message) => updates(message as EchoRequest)) - as EchoRequest; // ignore: deprecated_member_use + as EchoRequest; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static EchoRequest create() => EchoRequest._(); EchoRequest createEmptyInstance() => create(); @@ -76,38 +75,31 @@ class EchoRequest extends $pb.GeneratedMessage { } class EchoResponse extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'EchoResponse', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'grpc.gateway.testing'), - createEmptyInstance: create) - ..aOS( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'message') - ..hasRequiredFields = false; - - EchoResponse._() : super(); factory EchoResponse({ $core.String? message, }) { - final _result = create(); + final result = create(); if (message != null) { - _result.message = message; + result.message = message; } - return _result; + 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); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'EchoResponse', + package: const $pb.PackageName( + _omitMessageNames ? '' : 'grpc.gateway.testing'), + createEmptyInstance: create) + ..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') @@ -117,8 +109,10 @@ class EchoResponse extends $pb.GeneratedMessage { 'Will be removed in next major version') EchoResponse copyWith(void Function(EchoResponse) updates) => super.copyWith((message) => updates(message as EchoResponse)) - as EchoResponse; // ignore: deprecated_member_use + as EchoResponse; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static EchoResponse create() => EchoResponse._(); EchoResponse createEmptyInstance() => create(); @@ -143,58 +137,42 @@ class EchoResponse extends $pb.GeneratedMessage { } class ServerStreamingEchoRequest extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'ServerStreamingEchoRequest', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'grpc.gateway.testing'), - createEmptyInstance: create) - ..aOS( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'message') - ..a<$core.int>( - 2, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'messageCount', - $pb.PbFieldType.O3) - ..a<$core.int>( - 3, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'messageInterval', - $pb.PbFieldType.O3) - ..hasRequiredFields = false; - - ServerStreamingEchoRequest._() : super(); factory ServerStreamingEchoRequest({ $core.String? message, $core.int? messageCount, $core.int? messageInterval, }) { - final _result = create(); + final result = create(); if (message != null) { - _result.message = message; + result.message = message; } if (messageCount != null) { - _result.messageCount = messageCount; + result.messageCount = messageCount; } if (messageInterval != null) { - _result.messageInterval = messageInterval; + result.messageInterval = messageInterval; } - return _result; + 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); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'ServerStreamingEchoRequest', + package: const $pb.PackageName( + _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) + ..hasRequiredFields = false; + @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') @@ -207,8 +185,10 @@ class ServerStreamingEchoRequest extends $pb.GeneratedMessage { void Function(ServerStreamingEchoRequest) updates) => super.copyWith( (message) => updates(message as ServerStreamingEchoRequest)) - as ServerStreamingEchoRequest; // ignore: deprecated_member_use + as ServerStreamingEchoRequest; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static ServerStreamingEchoRequest create() => ServerStreamingEchoRequest._(); ServerStreamingEchoRequest createEmptyInstance() => create(); @@ -257,38 +237,31 @@ class ServerStreamingEchoRequest extends $pb.GeneratedMessage { } class ServerStreamingEchoResponse extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'ServerStreamingEchoResponse', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'grpc.gateway.testing'), - createEmptyInstance: create) - ..aOS( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'message') - ..hasRequiredFields = false; - - ServerStreamingEchoResponse._() : super(); factory ServerStreamingEchoResponse({ $core.String? message, }) { - final _result = create(); + final result = create(); if (message != null) { - _result.message = message; + result.message = message; } - return _result; + 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); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'ServerStreamingEchoResponse', + package: const $pb.PackageName( + _omitMessageNames ? '' : 'grpc.gateway.testing'), + createEmptyInstance: create) + ..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') @@ -301,8 +274,10 @@ class ServerStreamingEchoResponse extends $pb.GeneratedMessage { void Function(ServerStreamingEchoResponse) updates) => super.copyWith( (message) => updates(message as ServerStreamingEchoResponse)) - as ServerStreamingEchoResponse; // ignore: deprecated_member_use + as ServerStreamingEchoResponse; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static ServerStreamingEchoResponse create() => ServerStreamingEchoResponse._(); @@ -326,3 +301,7 @@ class ServerStreamingEchoResponse extends $pb.GeneratedMessage { @$pb.TagNumber(1) void clearMessage() => clearField(1); } + +const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); +const _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 dae0422..188daf2 100644 --- a/test/src/generated/echo.pbenum.dart +++ b/test/src/generated/echo.pbenum.dart @@ -1,6 +1,10 @@ -/// +// // Generated code. Do not modify. // source: echo.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + +// 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 diff --git a/test/src/generated/echo.pbgrpc.dart b/test/src/generated/echo.pbgrpc.dart index e5c093e..93ac0aa 100644 --- a/test/src/generated/echo.pbgrpc.dart +++ b/test/src/generated/echo.pbgrpc.dart @@ -1,18 +1,25 @@ -/// +// // Generated code. Do not modify. // source: echo.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + +// 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 import 'dart:async' as $async; - import 'dart:core' as $core; import 'package:grpc/service_api.dart' as $grpc; +import 'package:protobuf/protobuf.dart' as $pb; + import 'echo.pb.dart' as $0; + 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', @@ -44,6 +51,7 @@ class EchoServiceClient extends $grpc.Client { } } +@$pb.GrpcServiceName('grpc.gateway.testing.EchoService') abstract class EchoServiceBase extends $grpc.Service { $core.String get $name => 'grpc.gateway.testing.EchoService'; diff --git a/test/src/generated/echo.pbjson.dart b/test/src/generated/echo.pbjson.dart index d1adba5..5d4c05e 100644 --- a/test/src/generated/echo.pbjson.dart +++ b/test/src/generated/echo.pbjson.dart @@ -1,65 +1,69 @@ -/// +// // Generated code. Do not modify. // source: echo.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,deprecated_member_use_from_same_package,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name -import 'dart:core' as $core; +// 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 + import 'dart:convert' as $convert; +import 'dart:core' as $core; import 'dart:typed_data' as $typed_data; @$core.Deprecated('Use echoRequestDescriptor instead') -const EchoRequest$json = const { +const EchoRequest$json = { '1': 'EchoRequest', - '2': const [ - const {'1': 'message', '3': 1, '4': 1, '5': 9, '10': 'message'}, + '2': [ + {'1': 'message', '3': 1, '4': 1, '5': 9, '10': 'message'}, ], }; /// Descriptor for `EchoRequest`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List echoRequestDescriptor = $convert .base64Decode('CgtFY2hvUmVxdWVzdBIYCgdtZXNzYWdlGAEgASgJUgdtZXNzYWdl'); + @$core.Deprecated('Use echoResponseDescriptor instead') -const EchoResponse$json = const { +const EchoResponse$json = { '1': 'EchoResponse', - '2': const [ - const {'1': 'message', '3': 1, '4': 1, '5': 9, '10': 'message'}, + '2': [ + {'1': 'message', '3': 1, '4': 1, '5': 9, '10': 'message'}, ], }; /// Descriptor for `EchoResponse`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List echoResponseDescriptor = $convert .base64Decode('CgxFY2hvUmVzcG9uc2USGAoHbWVzc2FnZRgBIAEoCVIHbWVzc2FnZQ=='); + @$core.Deprecated('Use serverStreamingEchoRequestDescriptor instead') -const ServerStreamingEchoRequest$json = const { +const ServerStreamingEchoRequest$json = { '1': 'ServerStreamingEchoRequest', - '2': const [ - const {'1': 'message', '3': 1, '4': 1, '5': 9, '10': 'message'}, - const {'1': 'message_count', '3': 2, '4': 1, '5': 5, '10': 'messageCount'}, - const { - '1': 'message_interval', - '3': 3, - '4': 1, - '5': 5, - '10': 'messageInterval' - }, + '2': [ + {'1': 'message', '3': 1, '4': 1, '5': 9, '10': 'message'}, + {'1': 'message_count', '3': 2, '4': 1, '5': 5, '10': 'messageCount'}, + {'1': 'message_interval', '3': 3, '4': 1, '5': 5, '10': 'messageInterval'}, ], }; /// Descriptor for `ServerStreamingEchoRequest`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List serverStreamingEchoRequestDescriptor = $convert.base64Decode( - 'ChpTZXJ2ZXJTdHJlYW1pbmdFY2hvUmVxdWVzdBIYCgdtZXNzYWdlGAEgASgJUgdtZXNzYWdlEiMKDW1lc3NhZ2VfY291bnQYAiABKAVSDG1lc3NhZ2VDb3VudBIpChBtZXNzYWdlX2ludGVydmFsGAMgASgFUg9tZXNzYWdlSW50ZXJ2YWw='); + 'ChpTZXJ2ZXJTdHJlYW1pbmdFY2hvUmVxdWVzdBIYCgdtZXNzYWdlGAEgASgJUgdtZXNzYWdlEi' + 'MKDW1lc3NhZ2VfY291bnQYAiABKAVSDG1lc3NhZ2VDb3VudBIpChBtZXNzYWdlX2ludGVydmFs' + 'GAMgASgFUg9tZXNzYWdlSW50ZXJ2YWw='); + @$core.Deprecated('Use serverStreamingEchoResponseDescriptor instead') -const ServerStreamingEchoResponse$json = const { +const ServerStreamingEchoResponse$json = { '1': 'ServerStreamingEchoResponse', - '2': const [ - const {'1': 'message', '3': 1, '4': 1, '5': 9, '10': 'message'}, + '2': [ + {'1': 'message', '3': 1, '4': 1, '5': 9, '10': 'message'}, ], }; /// Descriptor for `ServerStreamingEchoResponse`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List serverStreamingEchoResponseDescriptor = $convert.base64Decode( - 'ChtTZXJ2ZXJTdHJlYW1pbmdFY2hvUmVzcG9uc2USGAoHbWVzc2FnZRgBIAEoCVIHbWVzc2FnZQ=='); + 'ChtTZXJ2ZXJTdHJlYW1pbmdFY2hvUmVzcG9uc2USGAoHbWVzc2FnZRgBIAEoCVIHbWVzc2FnZQ' + '==');