Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 4.3.0

- Require `package:protobuf` 5.0.0

## 4.2.0

- Export a protobuf generated symbol (`Any`)
Expand Down
88 changes: 37 additions & 51 deletions example/googleapis/lib/src/generated/google/api/label.pb.dart
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
// This is a generated file - do not edit.
//
// Generated code. Do not modify.
// source: google/api/label.proto
//
// @dart = 2.12
// Generated from google/api/label.proto.

// @dart = 3.3

// ignore_for_file: annotate_overrides, camel_case_types, comment_references
// ignore_for_file: constant_identifier_names, library_prefixes
// ignore_for_file: non_constant_identifier_names, prefer_final_fields
// ignore_for_file: unnecessary_import, unnecessary_this, unused_import
// ignore_for_file: constant_identifier_names
// ignore_for_file: curly_braces_in_flow_control_structures
// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes
// ignore_for_file: non_constant_identifier_names

import 'dart:core' as $core;

import 'package:protobuf/protobuf.dart' as $pb;

import 'label.pbenum.dart';

export 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions;

export 'label.pbenum.dart';

/// A description of a label.
Expand All @@ -25,53 +28,44 @@ class LabelDescriptor extends $pb.GeneratedMessage {
$core.String? description,
}) {
final result = create();
if (key != null) {
result.key = key;
}
if (valueType != null) {
result.valueType = valueType;
}
if (description != null) {
result.description = description;
}
if (key != null) result.key = key;
if (valueType != null) result.valueType = valueType;
if (description != null) result.description = description;
return result;
}
LabelDescriptor._() : super();
factory LabelDescriptor.fromBuffer($core.List<$core.int> i,
[$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) =>
create()..mergeFromBuffer(i, r);
factory LabelDescriptor.fromJson($core.String i,
[$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) =>
create()..mergeFromJson(i, r);

LabelDescriptor._();

factory LabelDescriptor.fromBuffer($core.List<$core.int> data,
[$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
create()..mergeFromBuffer(data, registry);
factory LabelDescriptor.fromJson($core.String json,
[$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
create()..mergeFromJson(json, registry);

static final $pb.BuilderInfo _i = $pb.BuilderInfo(
_omitMessageNames ? '' : 'LabelDescriptor',
package: const $pb.PackageName(_omitMessageNames ? '' : 'google.api'),
createEmptyInstance: create)
..aOS(1, _omitFieldNames ? '' : 'key')
..e<LabelDescriptor_ValueType>(
2, _omitFieldNames ? '' : 'valueType', $pb.PbFieldType.OE,
defaultOrMaker: LabelDescriptor_ValueType.STRING,
valueOf: LabelDescriptor_ValueType.valueOf,
..aE<LabelDescriptor_ValueType>(2, _omitFieldNames ? '' : 'valueType',
enumValues: LabelDescriptor_ValueType.values)
..aOS(3, _omitFieldNames ? '' : 'description')
..hasRequiredFields = false;

@$core.Deprecated('Using this can add significant overhead to your binary. '
'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
'Will be removed in next major version')
LabelDescriptor clone() => LabelDescriptor()..mergeFromMessage(this);
@$core.Deprecated('Using this can add significant overhead to your binary. '
'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
'Will be removed in next major version')
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
LabelDescriptor clone() => deepCopy();
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
LabelDescriptor copyWith(void Function(LabelDescriptor) updates) =>
super.copyWith((message) => updates(message as LabelDescriptor))
as LabelDescriptor;

@$core.override
$pb.BuilderInfo get info_ => _i;

@$core.pragma('dart2js:noInline')
static LabelDescriptor create() => LabelDescriptor._();
@$core.override
LabelDescriptor createEmptyInstance() => create();
static $pb.PbList<LabelDescriptor> createRepeated() =>
$pb.PbList<LabelDescriptor>();
Expand All @@ -84,42 +78,34 @@ class LabelDescriptor extends $pb.GeneratedMessage {
@$pb.TagNumber(1)
$core.String get key => $_getSZ(0);
@$pb.TagNumber(1)
set key($core.String v) {
$_setString(0, v);
}

set key($core.String value) => $_setString(0, value);
@$pb.TagNumber(1)
$core.bool hasKey() => $_has(0);
@$pb.TagNumber(1)
void clearKey() => clearField(1);
void clearKey() => $_clearField(1);

/// The type of data that can be assigned to the label.
@$pb.TagNumber(2)
LabelDescriptor_ValueType get valueType => $_getN(1);
@$pb.TagNumber(2)
set valueType(LabelDescriptor_ValueType v) {
setField(2, v);
}

set valueType(LabelDescriptor_ValueType value) => $_setField(2, value);
@$pb.TagNumber(2)
$core.bool hasValueType() => $_has(1);
@$pb.TagNumber(2)
void clearValueType() => clearField(2);
void clearValueType() => $_clearField(2);

/// A human-readable description for the label.
@$pb.TagNumber(3)
$core.String get description => $_getSZ(2);
@$pb.TagNumber(3)
set description($core.String v) {
$_setString(2, v);
}

set description($core.String value) => $_setString(2, value);
@$pb.TagNumber(3)
$core.bool hasDescription() => $_has(2);
@$pb.TagNumber(3)
void clearDescription() => clearField(3);
void clearDescription() => $_clearField(3);
}

const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names');
const _omitMessageNames =
const $core.bool _omitFieldNames =
$core.bool.fromEnvironment('protobuf.omit_field_names');
const $core.bool _omitMessageNames =
$core.bool.fromEnvironment('protobuf.omit_message_names');
32 changes: 20 additions & 12 deletions example/googleapis/lib/src/generated/google/api/label.pbenum.dart
Original file line number Diff line number Diff line change
@@ -1,24 +1,30 @@
// This is a generated file - do not edit.
//
// Generated code. Do not modify.
// source: google/api/label.proto
//
// @dart = 2.12
// Generated from google/api/label.proto.

// @dart = 3.3

// ignore_for_file: annotate_overrides, camel_case_types, comment_references
// ignore_for_file: constant_identifier_names, library_prefixes
// ignore_for_file: non_constant_identifier_names, prefer_final_fields
// ignore_for_file: unnecessary_import, unnecessary_this, unused_import
// ignore_for_file: constant_identifier_names
// ignore_for_file: curly_braces_in_flow_control_structures
// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes
// ignore_for_file: non_constant_identifier_names

import 'dart:core' as $core;

import 'package:protobuf/protobuf.dart' as $pb;

/// Value types that can be used as label values.
class LabelDescriptor_ValueType extends $pb.ProtobufEnum {
/// A variable-length string. This is the default.
static const LabelDescriptor_ValueType STRING =
LabelDescriptor_ValueType._(0, _omitEnumNames ? '' : 'STRING');

/// Boolean; true or false.
static const LabelDescriptor_ValueType BOOL =
LabelDescriptor_ValueType._(1, _omitEnumNames ? '' : 'BOOL');

/// A 64-bit signed integer.
static const LabelDescriptor_ValueType INT64 =
LabelDescriptor_ValueType._(2, _omitEnumNames ? '' : 'INT64');

Expand All @@ -29,11 +35,13 @@ class LabelDescriptor_ValueType extends $pb.ProtobufEnum {
INT64,
];

static final $core.Map<$core.int, LabelDescriptor_ValueType> _byValue =
$pb.ProtobufEnum.initByValue(values);
static LabelDescriptor_ValueType? valueOf($core.int value) => _byValue[value];
static final $core.List<LabelDescriptor_ValueType?> _byValue =
$pb.ProtobufEnum.$_initByValueList(values, 2);
static LabelDescriptor_ValueType? valueOf($core.int value) =>
value < 0 || value >= _byValue.length ? null : _byValue[value];

const LabelDescriptor_ValueType._($core.int v, $core.String n) : super(v, n);
const LabelDescriptor_ValueType._(super.value, super.name);
}

const _omitEnumNames = $core.bool.fromEnvironment('protobuf.omit_enum_names');
const $core.bool _omitEnumNames =
$core.bool.fromEnvironment('protobuf.omit_enum_names');
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
// This is a generated file - do not edit.
//
// Generated code. Do not modify.
// source: google/api/label.proto
//
// @dart = 2.12
// Generated from google/api/label.proto.

// @dart = 3.3

// ignore_for_file: annotate_overrides, camel_case_types, comment_references
// ignore_for_file: constant_identifier_names, library_prefixes
// ignore_for_file: non_constant_identifier_names, prefer_final_fields
// ignore_for_file: unnecessary_import, unnecessary_this, unused_import
// ignore_for_file: constant_identifier_names
// ignore_for_file: curly_braces_in_flow_control_structures
// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes
// ignore_for_file: non_constant_identifier_names, unused_import

import 'dart:convert' as $convert;
import 'dart:core' as $core;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
// This is a generated file - do not edit.
//
// Generated code. Do not modify.
// source: google/api/launch_stage.proto
//
// @dart = 2.12
// Generated from google/api/launch_stage.proto.

// @dart = 3.3

// ignore_for_file: annotate_overrides, camel_case_types, comment_references
// ignore_for_file: constant_identifier_names, library_prefixes
// ignore_for_file: non_constant_identifier_names, prefer_final_fields
// ignore_for_file: unnecessary_import, unnecessary_this, unused_import
// ignore_for_file: constant_identifier_names
// ignore_for_file: curly_braces_in_flow_control_structures
// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes
// ignore_for_file: non_constant_identifier_names

import 'dart:core' as $core;

export 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions;

export 'launch_stage.pbenum.dart';
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
// This is a generated file - do not edit.
//
// Generated code. Do not modify.
// source: google/api/launch_stage.proto
//
// @dart = 2.12
// Generated from google/api/launch_stage.proto.

// @dart = 3.3

// ignore_for_file: annotate_overrides, camel_case_types, comment_references
// ignore_for_file: constant_identifier_names, library_prefixes
// ignore_for_file: non_constant_identifier_names, prefer_final_fields
// ignore_for_file: unnecessary_import, unnecessary_this, unused_import
// ignore_for_file: constant_identifier_names
// ignore_for_file: curly_braces_in_flow_control_structures
// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes
// ignore_for_file: non_constant_identifier_names

import 'dart:core' as $core;

Expand All @@ -16,19 +17,55 @@ import 'package:protobuf/protobuf.dart' as $pb;
/// The launch stage as defined by [Google Cloud Platform
/// Launch Stages](https://cloud.google.com/terms/launch-stages).
class LaunchStage extends $pb.ProtobufEnum {
/// Do not use this default value.
static const LaunchStage LAUNCH_STAGE_UNSPECIFIED =
LaunchStage._(0, _omitEnumNames ? '' : 'LAUNCH_STAGE_UNSPECIFIED');

/// The feature is not yet implemented. Users can not use it.
static const LaunchStage UNIMPLEMENTED =
LaunchStage._(6, _omitEnumNames ? '' : 'UNIMPLEMENTED');

/// Prelaunch features are hidden from users and are only visible internally.
static const LaunchStage PRELAUNCH =
LaunchStage._(7, _omitEnumNames ? '' : 'PRELAUNCH');

/// Early Access features are limited to a closed group of testers. To use
/// these features, you must sign up in advance and sign a Trusted Tester
/// agreement (which includes confidentiality provisions). These features may
/// be unstable, changed in backward-incompatible ways, and are not
/// guaranteed to be released.
static const LaunchStage EARLY_ACCESS =
LaunchStage._(1, _omitEnumNames ? '' : 'EARLY_ACCESS');

/// Alpha is a limited availability test for releases before they are cleared
/// for widespread use. By Alpha, all significant design issues are resolved
/// and we are in the process of verifying functionality. Alpha customers
/// need to apply for access, agree to applicable terms, and have their
/// projects allowlisted. Alpha releases don't have to be feature complete,
/// no SLAs are provided, and there are no technical support obligations, but
/// they will be far enough along that customers can actually use them in
/// test environments or for limited-use tests -- just like they would in
/// normal production cases.
static const LaunchStage ALPHA =
LaunchStage._(2, _omitEnumNames ? '' : 'ALPHA');

/// Beta is the point at which we are ready to open a release for any
/// customer to use. There are no SLA or technical support obligations in a
/// Beta release. Products will be complete from a feature perspective, but
/// may have some open outstanding issues. Beta releases are suitable for
/// limited production use cases.
static const LaunchStage BETA =
LaunchStage._(3, _omitEnumNames ? '' : 'BETA');

/// GA features are open to all developers and are considered stable and
/// fully qualified for production use.
static const LaunchStage GA = LaunchStage._(4, _omitEnumNames ? '' : 'GA');

/// Deprecated features are scheduled to be shut down and removed. For more
/// information, see the "Deprecation Policy" section of our [Terms of
/// Service](https://cloud.google.com/terms/)
/// and the [Google Cloud Platform Subject to the Deprecation
/// Policy](https://cloud.google.com/terms/deprecation) documentation.
static const LaunchStage DEPRECATED =
LaunchStage._(5, _omitEnumNames ? '' : 'DEPRECATED');

Expand All @@ -43,11 +80,13 @@ class LaunchStage extends $pb.ProtobufEnum {
DEPRECATED,
];

static final $core.Map<$core.int, LaunchStage> _byValue =
$pb.ProtobufEnum.initByValue(values);
static LaunchStage? valueOf($core.int value) => _byValue[value];
static final $core.List<LaunchStage?> _byValue =
$pb.ProtobufEnum.$_initByValueList(values, 7);
static LaunchStage? valueOf($core.int value) =>
value < 0 || value >= _byValue.length ? null : _byValue[value];

const LaunchStage._($core.int v, $core.String n) : super(v, n);
const LaunchStage._(super.value, super.name);
}

const _omitEnumNames = $core.bool.fromEnvironment('protobuf.omit_enum_names');
const $core.bool _omitEnumNames =
$core.bool.fromEnvironment('protobuf.omit_enum_names');
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
// This is a generated file - do not edit.
//
// Generated code. Do not modify.
// source: google/api/launch_stage.proto
//
// @dart = 2.12
// Generated from google/api/launch_stage.proto.

// @dart = 3.3

// ignore_for_file: annotate_overrides, camel_case_types, comment_references
// ignore_for_file: constant_identifier_names, library_prefixes
// ignore_for_file: non_constant_identifier_names, prefer_final_fields
// ignore_for_file: unnecessary_import, unnecessary_this, unused_import
// ignore_for_file: constant_identifier_names
// ignore_for_file: curly_braces_in_flow_control_structures
// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes
// ignore_for_file: non_constant_identifier_names, unused_import

import 'dart:convert' as $convert;
import 'dart:core' as $core;
Expand Down
Loading