diff --git a/packages/corks/.gitignore b/packages/corks/.gitignore new file mode 100644 index 00000000..3cceda55 --- /dev/null +++ b/packages/corks/.gitignore @@ -0,0 +1,7 @@ +# https://dart.dev/guides/libraries/private-files +# Created by `dart pub` +.dart_tool/ + +# Avoid committing pubspec.lock for library packages; see +# https://dart.dev/guides/libraries/private-files#pubspeclock. +pubspec.lock diff --git a/packages/corks/CHANGELOG.md b/packages/corks/CHANGELOG.md new file mode 100644 index 00000000..a0712a79 --- /dev/null +++ b/packages/corks/CHANGELOG.md @@ -0,0 +1,3 @@ +## 0.1.0 + +- Initial version. diff --git a/packages/corks/README.md b/packages/corks/README.md new file mode 100644 index 00000000..9aa334dd --- /dev/null +++ b/packages/corks/README.md @@ -0,0 +1,13 @@ +# Corks + +Corks are authorization tokens which are based off Google's [Macaroons](https://research.google/pubs/macaroons-cookies-with-contextual-caveats-for-decentralized-authorization-in-the-cloud/) paper. They are bearer tokens which identify the entity possessing them, while providing a mechanism for embedding further restrictions via [Cedar](https://www.cedarpolicy.com/en) policy caveats. + +## Development + +Corks use Protobuf for serialization and deserialization of bearers and caveats. The proto definitions are located in the [proto](./proto) directory and the [Buf](https://buf.build) toolchain is used to generate Dart code from the Protobuf files. + +To generate the Dart code, install Buf then run the following command from the `proto/` directory: + +```sh +$ buf generate +``` diff --git a/packages/corks/analysis_options.yaml b/packages/corks/analysis_options.yaml new file mode 100644 index 00000000..8ea0c328 --- /dev/null +++ b/packages/corks/analysis_options.yaml @@ -0,0 +1,12 @@ +include: package:lints/recommended.yaml + +analyzer: + exclude: + - "**/*.g.dart" + - "**/*.pb.dart" + - "**/*.pbenum.dart" + - "**/*.pbjson.dart" + - "**/*.pbserver.dart" + errors: + implementation_imports: ignore + public_member_api_docs: ignore diff --git a/packages/corks/lib/corks.dart b/packages/corks/lib/corks.dart new file mode 100644 index 00000000..547cbd02 --- /dev/null +++ b/packages/corks/lib/corks.dart @@ -0,0 +1,9 @@ +/// Corks are authorization tokens which are based off Google's +/// [Macaroons](https://research.google/pubs/macaroons-cookies-with-contextual-caveats-for-decentralized-authorization-in-the-cloud/) +/// paper. They are bearer tokens which identify the entity possessing them, +/// while providing a mechanism for embedding further restrictions via +/// [Cedar](https://www.cedarpolicy.com/en) policy caveats. +library; + +export 'src/cork.dart'; +export 'src/signer.dart'; diff --git a/packages/corks/lib/corks_proto.dart b/packages/corks/lib/corks_proto.dart new file mode 100644 index 00000000..732b6ab8 --- /dev/null +++ b/packages/corks/lib/corks_proto.dart @@ -0,0 +1,28 @@ +export 'src/proto/cedar/v3/context.pb.dart'; +export 'src/proto/cedar/v3/context.pbenum.dart'; +export 'src/proto/cedar/v3/context.pbjson.dart'; +export 'src/proto/cedar/v3/context.pbserver.dart'; +export 'src/proto/cedar/v3/entity.pb.dart'; +export 'src/proto/cedar/v3/entity.pbenum.dart'; +export 'src/proto/cedar/v3/entity.pbjson.dart'; +export 'src/proto/cedar/v3/entity.pbserver.dart'; +export 'src/proto/cedar/v3/entity_id.pb.dart'; +export 'src/proto/cedar/v3/entity_id.pbenum.dart'; +export 'src/proto/cedar/v3/entity_id.pbjson.dart'; +export 'src/proto/cedar/v3/entity_id.pbserver.dart'; +export 'src/proto/cedar/v3/expr.pb.dart'; +export 'src/proto/cedar/v3/expr.pbenum.dart'; +export 'src/proto/cedar/v3/expr.pbjson.dart'; +export 'src/proto/cedar/v3/expr.pbserver.dart'; +export 'src/proto/cedar/v3/policy.pb.dart'; +export 'src/proto/cedar/v3/policy.pbenum.dart'; +export 'src/proto/cedar/v3/policy.pbjson.dart'; +export 'src/proto/cedar/v3/policy.pbserver.dart'; +export 'src/proto/cedar/v3/value.pb.dart'; +export 'src/proto/cedar/v3/value.pbenum.dart'; +export 'src/proto/cedar/v3/value.pbjson.dart'; +export 'src/proto/cedar/v3/value.pbserver.dart'; +export 'src/proto/corks/v1/cork.pb.dart'; +export 'src/proto/corks/v1/cork.pbenum.dart'; +export 'src/proto/corks/v1/cork.pbjson.dart'; +export 'src/proto/corks/v1/cork.pbserver.dart'; diff --git a/packages/corks/lib/src/cork.dart b/packages/corks/lib/src/cork.dart new file mode 100644 index 00000000..a87bdd69 --- /dev/null +++ b/packages/corks/lib/src/cork.dart @@ -0,0 +1,228 @@ +import 'dart:async'; +import 'dart:collection'; +import 'dart:convert'; +import 'dart:math'; +import 'dart:typed_data'; + +import 'package:cedar/cedar.dart' as cedar; +import 'package:corks/corks_proto.dart' as proto; +import 'package:corks/src/interop/proto_interop.dart'; +import 'package:corks/src/proto/google/protobuf/any.pb.dart' as proto; +import 'package:corks/src/signer.dart'; +import 'package:crypto/crypto.dart'; +import 'package:meta/meta.dart'; + +@immutable +final class Cork { + const Cork._({ + required this.id, + required this.keyId, + this.bearer, + required List caveats, + required this.signature, + }) : _caveats = caveats; + + factory Cork.parse(String base64) => Cork.decode(base64Url.decode(base64)); + + factory Cork.decode(Uint8List bytes) { + final message = proto.Cork.fromBuffer(bytes); + return Cork.fromProto(message); + } + + factory Cork.fromProto(proto.Cork proto) => Cork._( + id: Uint8List.fromList(proto.id), + keyId: Uint8List.fromList(proto.keyId), + bearer: proto.hasBearer() ? SignedBearer.fromProto(proto.bearer) : null, + caveats: [ + for (final caveat in proto.caveats) SignedCaveat.fromProto(caveat), + ], + signature: Uint8List.fromList(proto.signature), + ); + + static CorkBuilder builder({ + Uint8List? id, + Bearer? bearer, + }) => + CorkBuilder( + id: id, + bearer: bearer, + ); + + final Uint8List id; + final Uint8List keyId; + final SignedBearer? bearer; + final List _caveats; + List get caveats => UnmodifiableListView(_caveats); + final Uint8List signature; + + proto.Cork toProto() => proto.Cork( + id: id, + keyId: keyId, + bearer: bearer?.toProto(), + caveats: _caveats.map((caveat) => caveat.toProto()), + signature: signature, + ); + + Uint8List encode() => toProto().writeToBuffer(); + + Future verify(Signer signer) async { + if (Digest(signer.keyId) != Digest(keyId)) { + return false; + } + await signer.sign(id); + if (bearer != null) { + // TODO(dnys1): https://github.com/dart-lang/sdk/issues/54664 + if (!await bearer!.verify(signer)) { + return false; + } + } + for (final caveat in _caveats) { + if (!await caveat.verify(signer)) { + return false; + } + } + return Digest(await signer.close()) == Digest(signature); + } + + @override + String toString() => base64Url.encode(encode()); +} + +final class CorkBuilder { + factory CorkBuilder({ + Uint8List? id, + Bearer? bearer, + }) { + if (id == null) { + const nonceSize = 32; + id = Uint8List(nonceSize); + for (var i = 0; i < nonceSize; i++) { + id[i] = _secureRandom.nextInt(256); + } + } + return CorkBuilder._(id, bearer); + } + + CorkBuilder._( + this._id, + this._bearer, + ); + + static final _secureRandom = Random.secure(); + + final Uint8List _id; + final Bearer? _bearer; + final List _caveats = []; + + void addPolicyCaveat(cedar.CedarPolicy policy) { + if (policy.effect != cedar.CedarPolicyEffect.forbid) { + throw ArgumentError('Policy must have effect "forbid"'); + } + _caveats.add(Caveat.policy(policy: policy)); + } + + Future build(Signer signer) async { + await signer.sign(_id); + + SignedBearer? signedBearer; + if (_bearer case final bearer?) { + signedBearer = SignedBearer(await bearer.sign(signer)); + } + final signedCaveats = []; + for (final caveat in _caveats) { + signedCaveats.add(SignedCaveat(await caveat.sign(signer))); + } + return Cork._( + id: _id, + keyId: signer.keyId, + bearer: signedBearer, + caveats: signedCaveats, + signature: await signer.close(), + ); + } +} + +@immutable +sealed class Bearer with Signable { + const Bearer(); + + factory Bearer.entity({ + required cedar.CedarEntity entity, + }) => + EntityBearer(entity: entity); + + factory Bearer.entityId({ + required cedar.CedarEntityId entityId, + }) => + EntityBearer(entity: cedar.CedarEntity(id: entityId)); +} + +final class EntityBearer extends Bearer { + const EntityBearer({ + required this.entity, + }); + + final cedar.CedarEntity entity; + + @override + proto.Entity toProto() => entity.toProto(); +} + +extension type SignedBearer(SignedBlock _block) implements SignedBlock { + SignedBearer.fromProto(proto.SignedBlock proto) + : _block = SignedBlock.fromProto(proto); + + Bearer get bearer { + final any = proto.Any( + typeUrl: typeUrl, + value: block, + ); + final entity = proto.Entity(); + if (!any.canUnpackInto(entity)) { + throw ArgumentError('Invalid bearer type: $typeUrl'); + } + any.unpackInto(entity); + return Bearer.entity( + entity: entity.fromProto(), + ); + } +} + +@immutable +sealed class Caveat with Signable { + const Caveat(); + + factory Caveat.policy({ + required cedar.CedarPolicy policy, + }) => + PolicyCaveat(policy: policy); +} + +final class PolicyCaveat extends Caveat { + const PolicyCaveat({ + required this.policy, + }); + + final cedar.CedarPolicy policy; + + @override + proto.Policy toProto() => policy.toProto(); +} + +extension type SignedCaveat(SignedBlock _block) implements SignedBlock { + SignedCaveat.fromProto(proto.SignedBlock proto) + : _block = SignedBlock.fromProto(proto); + + Caveat get caveat { + final any = proto.Any( + typeUrl: typeUrl, + value: block, + ); + final policy = proto.Policy(); + if (!any.canUnpackInto(policy)) { + throw ArgumentError('Invalid caveat type: $typeUrl'); + } + any.unpackInto(policy); + return PolicyCaveat(policy: policy.fromProto()); + } +} diff --git a/packages/corks/lib/src/interop/proto_interop.dart b/packages/corks/lib/src/interop/proto_interop.dart new file mode 100644 index 00000000..59568535 --- /dev/null +++ b/packages/corks/lib/src/interop/proto_interop.dart @@ -0,0 +1,587 @@ +@internal +library; + +import 'dart:typed_data'; + +import 'package:cedar/cedar.dart' as cedar; +import 'package:corks/src/proto/cedar/v3/entity.pb.dart'; +import 'package:corks/src/proto/cedar/v3/entity_id.pb.dart'; +import 'package:corks/src/proto/cedar/v3/expr.pb.dart'; +import 'package:corks/src/proto/cedar/v3/policy.pb.dart'; +import 'package:corks/src/proto/cedar/v3/value.pb.dart'; +import 'package:fixnum/fixnum.dart'; +import 'package:meta/meta.dart'; + +extension type CedarPolicy._(cedar.CedarPolicy _policy) + implements cedar.CedarPolicy { + factory CedarPolicy.fromProto(Policy policy) => + CedarPolicy._(policy.fromProto()); + + factory CedarPolicy.fromJson(Map json) => + CedarPolicy._(cedar.CedarPolicy.fromJson(json)); + + factory CedarPolicy.fromProtoBuffer(Uint8List buffer) => + CedarPolicy._(Policy.fromBuffer(buffer).fromProto()); + + factory CedarPolicy.fromProtoJson(Map json) => + CedarPolicy._((Policy.create()..mergeFromProto3Json(json)).fromProto()); + + Policy toProto() => _policy.toProto(); + + Map toProtoJson() => + toProto().toProto3Json() as Map; + + Uint8List toProtoBuffer() => toProto().writeToBuffer(); +} + +extension PolicyOpFromProto on PolicyOp { + cedar.CedarPolicyOp fromProto() => switch (this) { + PolicyOp.POLICY_OP_ALL => cedar.CedarPolicyOp.all, + PolicyOp.POLICY_OP_EQUALS => cedar.CedarPolicyOp.equals, + PolicyOp.POLICY_OP_IN => cedar.CedarPolicyOp.in$, + PolicyOp.POLICY_OP_IS => cedar.CedarPolicyOp.is$, + PolicyOp.POLICY_OP_UNSPECIFIED => throw ArgumentError( + 'PolicyOp.POLICY_OP_UNSPECIFIED is not a valid PolicyOp', + ), + _ => throw UnimplementedError(), + }; +} + +extension PolicyOpToProto on cedar.CedarPolicyOp { + PolicyOp toProto() => switch (this) { + cedar.CedarPolicyOp.all => PolicyOp.POLICY_OP_ALL, + cedar.CedarPolicyOp.equals => PolicyOp.POLICY_OP_EQUALS, + cedar.CedarPolicyOp.in$ => PolicyOp.POLICY_OP_IN, + cedar.CedarPolicyOp.is$ => PolicyOp.POLICY_OP_IS, + _ => throw UnimplementedError(), + }; +} + +extension PolicyEffectFromProto on PolicyEffect { + cedar.CedarPolicyEffect fromProto() => switch (this) { + PolicyEffect.POLICY_EFFECT_FORBID => cedar.CedarPolicyEffect.forbid, + PolicyEffect.POLICY_EFFECT_PERMIT => cedar.CedarPolicyEffect.permit, + PolicyEffect.POLICY_EFFECT_UNSPECIFIED => throw ArgumentError( + 'PolicyEffect.POLICY_EFFECT_UNSPECIFIED is not a valid PolicyEffect', + ), + _ => throw UnimplementedError(), + }; +} + +extension PolicyEffectToProto on cedar.CedarPolicyEffect { + PolicyEffect toProto() => switch (this) { + cedar.CedarPolicyEffect.forbid => PolicyEffect.POLICY_EFFECT_FORBID, + cedar.CedarPolicyEffect.permit => PolicyEffect.POLICY_EFFECT_PERMIT, + _ => throw UnimplementedError(), + }; +} + +extension PolicyConditionKindFromProto on PolicyConditionKind { + cedar.CedarPolicyConditionKind fromProto() => switch (this) { + PolicyConditionKind.POLICY_CONDITION_KIND_WHEN => + cedar.CedarPolicyConditionKind.when, + PolicyConditionKind.POLICY_CONDITION_KIND_UNLESS => + cedar.CedarPolicyConditionKind.unless, + PolicyConditionKind.POLICY_CONDITION_KIND_UNSPECIFIED => + throw ArgumentError( + 'PolicyConditionKind.POLICY_CONDITION_KIND_UNSPECIFIED is not a valid PolicyConditionKind', + ), + _ => throw UnimplementedError(), + }; +} + +extension PolicyConditionKindToProto on cedar.CedarPolicyConditionKind { + PolicyConditionKind toProto() => switch (this) { + cedar.CedarPolicyConditionKind.when => + PolicyConditionKind.POLICY_CONDITION_KIND_WHEN, + cedar.CedarPolicyConditionKind.unless => + PolicyConditionKind.POLICY_CONDITION_KIND_UNLESS, + _ => throw UnimplementedError(), + }; +} + +extension PolicyFromProto on Policy { + cedar.CedarPolicy fromProto() => cedar.CedarPolicy( + effect: effect.fromProto(), + principal: cedar.CedarPolicyPrincipal( + op: principal.op.fromProto(), + entity: principal.hasEntity() ? principal.entity.fromProto() : null, + entityType: principal.hasEntityType() ? principal.entityType : null, + ), + action: cedar.CedarPolicyAction( + op: action.op.fromProto(), + entity: action.hasEntity() ? action.entity.fromProto() : null, + entities: action.hasEntity() + ? null + : [ + for (final entity in action.entities) entity.fromProto(), + ], + ), + resource: cedar.CedarPolicyResource( + op: resource.op.fromProto(), + entity: resource.hasEntity() ? resource.entity.fromProto() : null, + entityType: resource.hasEntityType() ? resource.entityType : null, + ), + conditions: [ + for (final condition in conditions) condition.fromProto(), + ], + annotations: annotations.isNotEmpty ? annotations : null, + ); +} + +extension PolicyToProto on cedar.CedarPolicy { + Policy toProto() => Policy( + effect: effect.toProto(), + principal: PolicyPrincipal( + op: principal.op.toProto(), + entity: principal.entity?.toProto(), + entityType: principal.entityType, + ), + action: PolicyAction( + op: action.op.toProto(), + entity: action.entity?.toProto(), + entities: action.entities == null + ? null + : [for (final entity in action.entities!) entity.toProto()], + ), + resource: PolicyResource( + op: resource.op.toProto(), + entity: resource.entity?.toProto(), + entityType: resource.entityType, + ), + conditions: [ + for (final condition in conditions) condition.toProto(), + ], + annotations: annotations?.toMap(), + ); +} + +extension PolicyConditionFromProto on PolicyCondition { + cedar.CedarPolicyCondition fromProto() => cedar.CedarPolicyCondition( + kind: kind.fromProto(), + body: body.fromProto(), + ); +} + +extension PolicyConditionToProto on cedar.CedarPolicyCondition { + PolicyCondition toProto() => PolicyCondition( + kind: kind.toProto(), + body: body.toProto(), + ); +} + +extension EntityIdFromProto on EntityId { + cedar.CedarEntityId fromProto() => cedar.CedarEntityId(type, id); +} + +extension EntityIdToProto on cedar.CedarEntityId { + EntityId toProto() => EntityId(type: type, id: id); +} + +extension EntityFromProto on Entity { + cedar.CedarEntity fromProto() => cedar.CedarEntity( + id: uid.fromProto(), + parents: [for (final parent in parents) parent.fromProto()], + attributes: attributes.map((k, v) => MapEntry(k, v.fromProto())), + ); +} + +extension EntityToProto on cedar.CedarEntity { + Entity toProto() => Entity( + uid: id.toProto(), + parents: [for (final parent in parents) parent.toProto()], + attributes: attributes.asMap().map((k, v) => MapEntry(k, v.toProto())), + ); +} + +extension type CedarExpr._(cedar.JsonExpr _expr) implements cedar.JsonExpr { + factory CedarExpr.fromProtoJson(Map json) { + final message = Expr.create()..mergeFromProto3Json(json); + return CedarExpr._(message.fromProto()); + } + + factory CedarExpr.fromProtoBuffer(Uint8List buffer) { + final message = Expr.fromBuffer(buffer); + return CedarExpr._(message.fromProto()); + } + + factory CedarExpr.fromJson(Map json) => + CedarExpr._(cedar.JsonExpr.fromJson(json)); + + Expr toProto() => _expr.toProto(); + + Map toProtoJson() => + toProto().toProto3Json() as Map; + + Uint8List toProtoBuffer() => toProto().writeToBuffer(); +} + +extension ValueFromProto on Value { + cedar.CedarValueJson fromProto() => switch (whichValue()) { + Value_Value.bool_3 => cedar.CedarValueJson.bool(bool_3), + Value_Value.entity => + cedar.CedarValueJson.entity(entity.uid.fromProto()), + Value_Value.extension_6 => cedar.CedarValueJson.extension( + cedar.CedarExtensionInvocation( + fn: extension_6.fn, + arg: extension_6.arg.fromProto(), + ), + ), + Value_Value.long => cedar.CedarValueJson.long(long.toInt()), + Value_Value.record => cedar.CedarValueJson.record( + record.values.map((key, value) => MapEntry(key, value.fromProto())), + ), + Value_Value.set => cedar.CedarValueJson.set([ + for (final value in set.values) value.fromProto(), + ]), + Value_Value.string => cedar.CedarValueJson.string(string), + Value_Value.notSet => throw ArgumentError.value( + whichValue(), + 'value', + 'An unset value is not allowed', + ), + }; +} + +extension ValueToProto on cedar.CedarValueJson { + Value toProto() => switch (this) { + cedar.CedarValueBool(:final value) => Value(bool_3: value), + cedar.CedarValueEntity(:final entityId) => + Value(entity: EntityValue(uid: entityId.toProto())), + cedar.CedarValueExtension(:final extension) => Value( + extension_6: ExtensionValue( + fn: extension.fn, + arg: extension.arg.toProto(), + ), + ), + cedar.CedarValueLong(:final value) => Value(long: Int64(value)), + cedar.CedarValueRecord(:final attributes) => Value( + record: RecordValue( + values: attributes + .map((key, value) => MapEntry(key, value.toProto())), + ), + ), + cedar.CedarValueSet(:final elements) => Value( + set: SetValue( + values: [for (final value in elements) value.toProto()], + ), + ), + cedar.CedarValueString(:final value) => Value(string: value), + }; +} + +extension ExprFromProto on Expr { + cedar.JsonExpr fromProto() => switch (whichExpr()) { + Expr_Expr.and => cedar.JsonExpr.and( + and.left.fromProto(), + and.right.fromProto(), + ), + Expr_Expr.contains => cedar.JsonExpr.contains( + contains.left.fromProto(), + contains.right.fromProto(), + ), + Expr_Expr.containsAll => cedar.JsonExpr.containsAll( + containsAll.left.fromProto(), + containsAll.right.fromProto(), + ), + Expr_Expr.containsAny => cedar.JsonExpr.containsAny( + containsAny.left.fromProto(), + containsAny.right.fromProto(), + ), + Expr_Expr.equals => cedar.JsonExpr.equals( + equals.left.fromProto(), + equals.right.fromProto(), + ), + Expr_Expr.funcCall => cedar.JsonExpr.funcCall( + cedar.JsonExprOpFunc(funcCall.fn), + [for (final arg in funcCall.args) arg.fromProto()], + ), + Expr_Expr.getAttribute => cedar.JsonExpr.getAttribute( + getAttribute.left.fromProto(), + getAttribute.attr, + ), + Expr_Expr.greaterThan => cedar.JsonExpr.greaterThan( + greaterThan.left.fromProto(), + greaterThan.right.fromProto(), + ), + Expr_Expr.greaterThanOrEquals => cedar.JsonExpr.greaterThanOrEquals( + greaterThanOrEquals.left.fromProto(), + greaterThanOrEquals.right.fromProto(), + ), + Expr_Expr.hasAttribute => cedar.JsonExpr.hasAttribute( + hasAttribute.left.fromProto(), + hasAttribute.attr, + ), + Expr_Expr.ifThenElse => cedar.JsonExpr.ifThenElse( + cond: ifThenElse.if_.fromProto(), + then: ifThenElse.then.fromProto(), + else$: ifThenElse.else_.fromProto(), + ), + Expr_Expr.in_ => cedar.JsonExpr.in$( + in_.left.fromProto(), + in_.right.fromProto(), + ), + Expr_Expr.is_ => cedar.JsonExpr.is$( + is_.left.fromProto(), + is_.entityType, + is_.hasIn_() ? is_.in_.fromProto() : null, + ), + Expr_Expr.lessThan => cedar.JsonExpr.lessThan( + lessThan.left.fromProto(), + lessThan.right.fromProto(), + ), + Expr_Expr.lessThanOrEquals => cedar.JsonExpr.lessThanOrEquals( + lessThanOrEquals.left.fromProto(), + lessThanOrEquals.right.fromProto(), + ), + Expr_Expr.like => cedar.JsonExpr.like( + like.left.fromProto(), + like.pattern, + ), + Expr_Expr.minus => cedar.JsonExpr.minus( + minus.left.fromProto(), + minus.right.fromProto(), + ), + Expr_Expr.neg => cedar.JsonExpr.neg(neg.expr.fromProto()), + Expr_Expr.not => cedar.JsonExpr.not(not.expr.fromProto()), + Expr_Expr.notEquals => cedar.JsonExpr.notEquals( + notEquals.left.fromProto(), + notEquals.right.fromProto(), + ), + Expr_Expr.or => cedar.JsonExpr.or( + or.left.fromProto(), + or.right.fromProto(), + ), + Expr_Expr.plus => cedar.JsonExpr.plus( + plus.left.fromProto(), + plus.right.fromProto(), + ), + Expr_Expr.record => cedar.JsonExpr.record( + record.attributes + .map((key, value) => MapEntry(key, value.fromProto())), + ), + Expr_Expr.set => cedar.JsonExpr.set([ + for (final value in set.expressions) value.fromProto(), + ]), + Expr_Expr.slot => cedar.JsonExpr.slot( + switch (slot.slotId) { + SlotId.SLOT_ID_PRINCIPAL => cedar.CedarSlotId.principal, + SlotId.SLOT_ID_RESOURCE => cedar.CedarSlotId.resource, + SlotId.SLOT_ID_UNSPECIFIED => throw ArgumentError.value( + slot.slotId, + 'slot', + 'SlotId.SLOT_ID_UNSPECIFIED is not allowed', + ), + _ => throw UnimplementedError(), + }, + ), + Expr_Expr.times => cedar.JsonExpr.times( + times.left.fromProto(), + times.right.fromProto(), + ), + Expr_Expr.unknown => cedar.JsonExpr.unknown(unknown.name), + Expr_Expr.value => cedar.JsonExpr.value(value.value.fromProto()), + Expr_Expr.var_ => cedar.JsonExpr.variable( + switch (var_.variable) { + Variable.VARIABLE_ACTION => cedar.CedarVariable.action, + Variable.VARIABLE_CONTEXT => cedar.CedarVariable.context, + Variable.VARIABLE_PRINCIPAL => cedar.CedarVariable.principal, + Variable.VARIABLE_RESOURCE => cedar.CedarVariable.resource, + Variable.VARIABLE_UNSPECIFIED => throw ArgumentError.value( + var_.variable, + 'var_2', + 'Variable.VARIABLE_UNSPECIFIED is not allowed', + ), + _ => throw UnimplementedError(), + }, + ), + Expr_Expr.notSet => throw ArgumentError.value( + whichExpr(), + 'expr', + 'An unset expression is not allowed', + ), + }; +} + +extension ExprToProto on cedar.JsonExpr { + Expr toProto() => switch (this) { + cedar.JsonExprAnd(:final left, :final right) => Expr( + and: ExprAnd( + left: left.toProto(), + right: right.toProto(), + ), + ), + cedar.JsonExprContains(:final left, :final right) => Expr( + contains: ExprContains( + left: left.toProto(), + right: right.toProto(), + ), + ), + cedar.JsonExprContainsAll(:final left, :final right) => Expr( + containsAll: ExprContainsAll( + left: left.toProto(), + right: right.toProto(), + ), + ), + cedar.JsonExprContainsAny(:final left, :final right) => Expr( + containsAny: ExprContainsAny( + left: left.toProto(), + right: right.toProto(), + ), + ), + cedar.JsonExprEquals(:final left, :final right) => Expr( + equals: ExprEquals( + left: left.toProto(), + right: right.toProto(), + ), + ), + cedar.JsonExprFuncCall(:final fn, :final args) => Expr( + funcCall: ExprFuncCall( + fn: fn.name, + args: [for (final arg in args) arg.toProto()], + ), + ), + cedar.JsonExprGetAttribute(:final left, :final attr) => Expr( + getAttribute: ExprGetAttribute( + left: left.toProto(), + attr: attr, + ), + ), + cedar.JsonExprGreaterThan(:final left, :final right) => Expr( + greaterThan: ExprGreaterThan( + left: left.toProto(), + right: right.toProto(), + ), + ), + cedar.JsonExprGreaterThanOrEquals(:final left, :final right) => Expr( + greaterThanOrEquals: ExprGreaterThanOrEquals( + left: left.toProto(), + right: right.toProto(), + ), + ), + cedar.JsonExprHasAttribute(:final left, :final attr) => Expr( + hasAttribute: ExprHasAttribute( + left: left.toProto(), + attr: attr, + ), + ), + cedar.JsonExprIfThenElse(:final cond, :final then, :final else$) => + Expr( + ifThenElse: ExprIfThenElse( + if_: cond.toProto(), + then: then.toProto(), + else_: else$.toProto(), + ), + ), + cedar.JsonExprIn(:final left, :final right) => Expr( + in_: ExprIn( + left: left.toProto(), + right: right.toProto(), + ), + ), + cedar.JsonExprIs(:final left, :final entityType, :final inExpr) => Expr( + is_: ExprIs( + left: left.toProto(), + entityType: entityType, + in_: inExpr?.toProto(), + ), + ), + cedar.JsonExprLessThan(:final left, :final right) => Expr( + lessThan: ExprLessThan( + left: left.toProto(), + right: right.toProto(), + ), + ), + cedar.JsonExprLessThanOrEquals(:final left, :final right) => Expr( + lessThanOrEquals: ExprLessThanOrEquals( + left: left.toProto(), + right: right.toProto(), + ), + ), + cedar.JsonExprLike(:final left, :final pattern) => Expr( + like: ExprLike( + left: left.toProto(), + pattern: pattern, + ), + ), + cedar.JsonExprMinus(:final left, :final right) => Expr( + minus: ExprMinus( + left: left.toProto(), + right: right.toProto(), + ), + ), + cedar.JsonExprNeg(:final arg) => Expr( + neg: ExprNeg( + expr: arg.toProto(), + ), + ), + cedar.JsonExprNot(:final arg) => Expr( + not: ExprNot( + expr: arg.toProto(), + ), + ), + cedar.JsonExprNotEquals(:final left, :final right) => Expr( + notEquals: ExprNotEquals( + left: left.toProto(), + right: right.toProto(), + ), + ), + cedar.JsonExprOr(:final left, :final right) => Expr( + or: ExprOr( + left: left.toProto(), + right: right.toProto(), + ), + ), + cedar.JsonExprPlus(:final left, :final right) => Expr( + plus: ExprPlus( + left: left.toProto(), + right: right.toProto(), + ), + ), + cedar.JsonExprRecord(:final attributes) => Expr( + record: ExprRecord( + attributes: attributes + .map((key, value) => MapEntry(key, value.toProto())), + ), + ), + cedar.JsonExprSet(:final expressions) => Expr( + set: ExprSet( + expressions: [for (final value in expressions) value.toProto()], + ), + ), + cedar.JsonExprSlot(:final slotId) => Expr( + slot: ExprSlot( + slotId: switch (slotId) { + cedar.CedarSlotId.principal => SlotId.SLOT_ID_PRINCIPAL, + cedar.CedarSlotId.resource => SlotId.SLOT_ID_RESOURCE, + }, + ), + ), + cedar.JsonExprTimes(:final left, :final right) => Expr( + times: ExprTimes( + left: left.toProto(), + right: right.toProto(), + ), + ), + cedar.JsonExprUnknown(:final name) => Expr( + unknown: ExprUnknown( + name: name, + ), + ), + cedar.JsonExprValue(:final value) => Expr( + value: ExprValue( + value: value.toProto(), + ), + ), + cedar.JsonExprVariable(:final variable) => Expr( + var_: ExprVar( + variable: switch (variable) { + cedar.CedarVariable.action => Variable.VARIABLE_ACTION, + cedar.CedarVariable.context => Variable.VARIABLE_CONTEXT, + cedar.CedarVariable.principal => Variable.VARIABLE_PRINCIPAL, + cedar.CedarVariable.resource => Variable.VARIABLE_RESOURCE, + }, + ), + ), + }; +} diff --git a/packages/corks/lib/src/interop/to_proto.dart b/packages/corks/lib/src/interop/to_proto.dart new file mode 100644 index 00000000..9cc8b7af --- /dev/null +++ b/packages/corks/lib/src/interop/to_proto.dart @@ -0,0 +1,5 @@ +import 'package:protobuf/protobuf.dart' as proto; + +abstract interface class ToProto { + M toProto(); +} diff --git a/packages/corks/lib/src/proto/cedar/v3/context.pb.dart b/packages/corks/lib/src/proto/cedar/v3/context.pb.dart new file mode 100644 index 00000000..30a958f6 --- /dev/null +++ b/packages/corks/lib/src/proto/cedar/v3/context.pb.dart @@ -0,0 +1,64 @@ +// +// Generated code. Do not modify. +// source: cedar/v3/context.proto +// +// @dart = 2.12 + +// 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 'value.pb.dart' as $1; + +class Context extends $pb.GeneratedMessage { + factory Context({ + $core.Map<$core.String, $1.Value>? values, + }) { + final $result = create(); + if (values != null) { + $result.values.addAll(values); + } + return $result; + } + Context._() : super(); + factory Context.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory Context.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Context', package: const $pb.PackageName(_omitMessageNames ? '' : 'cedar.v3'), createEmptyInstance: create) + ..m<$core.String, $1.Value>(1, _omitFieldNames ? '' : 'values', entryClassName: 'Context.ValuesEntry', keyFieldType: $pb.PbFieldType.OS, valueFieldType: $pb.PbFieldType.OM, valueCreator: $1.Value.create, valueDefaultOrMaker: $1.Value.getDefault, packageName: const $pb.PackageName('cedar.v3')) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + Context clone() => Context()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + Context copyWith(void Function(Context) updates) => super.copyWith((message) => updates(message as Context)) as Context; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static Context create() => Context._(); + Context createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static Context getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static Context? _defaultInstance; + + @$pb.TagNumber(1) + $core.Map<$core.String, $1.Value> get values => $_getMap(0); +} + + +const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); +const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/packages/corks/lib/src/proto/cedar/v3/context.pbenum.dart b/packages/corks/lib/src/proto/cedar/v3/context.pbenum.dart new file mode 100644 index 00000000..b9f8c102 --- /dev/null +++ b/packages/corks/lib/src/proto/cedar/v3/context.pbenum.dart @@ -0,0 +1,11 @@ +// +// Generated code. Do not modify. +// source: cedar/v3/context.proto +// +// @dart = 2.12 + +// 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/packages/corks/lib/src/proto/cedar/v3/context.pbjson.dart b/packages/corks/lib/src/proto/cedar/v3/context.pbjson.dart new file mode 100644 index 00000000..a1fc81de --- /dev/null +++ b/packages/corks/lib/src/proto/cedar/v3/context.pbjson.dart @@ -0,0 +1,40 @@ +// +// Generated code. Do not modify. +// source: cedar/v3/context.proto +// +// @dart = 2.12 + +// 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 contextDescriptor instead') +const Context$json = { + '1': 'Context', + '2': [ + {'1': 'values', '3': 1, '4': 3, '5': 11, '6': '.cedar.v3.Context.ValuesEntry', '10': 'values'}, + ], + '3': [Context_ValuesEntry$json], +}; + +@$core.Deprecated('Use contextDescriptor instead') +const Context_ValuesEntry$json = { + '1': 'ValuesEntry', + '2': [ + {'1': 'key', '3': 1, '4': 1, '5': 9, '10': 'key'}, + {'1': 'value', '3': 2, '4': 1, '5': 11, '6': '.cedar.v3.Value', '10': 'value'}, + ], + '7': {'7': true}, +}; + +/// Descriptor for `Context`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List contextDescriptor = $convert.base64Decode( + 'CgdDb250ZXh0EjUKBnZhbHVlcxgBIAMoCzIdLmNlZGFyLnYzLkNvbnRleHQuVmFsdWVzRW50cn' + 'lSBnZhbHVlcxpKCgtWYWx1ZXNFbnRyeRIQCgNrZXkYASABKAlSA2tleRIlCgV2YWx1ZRgCIAEo' + 'CzIPLmNlZGFyLnYzLlZhbHVlUgV2YWx1ZToCOAE='); + diff --git a/packages/corks/lib/src/proto/cedar/v3/context.pbserver.dart b/packages/corks/lib/src/proto/cedar/v3/context.pbserver.dart new file mode 100644 index 00000000..34032a02 --- /dev/null +++ b/packages/corks/lib/src/proto/cedar/v3/context.pbserver.dart @@ -0,0 +1,14 @@ +// +// Generated code. Do not modify. +// source: cedar/v3/context.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +export 'context.pb.dart'; + diff --git a/packages/corks/lib/src/proto/cedar/v3/entity.pb.dart b/packages/corks/lib/src/proto/cedar/v3/entity.pb.dart new file mode 100644 index 00000000..f75b7f32 --- /dev/null +++ b/packages/corks/lib/src/proto/cedar/v3/entity.pb.dart @@ -0,0 +1,89 @@ +// +// Generated code. Do not modify. +// source: cedar/v3/entity.proto +// +// @dart = 2.12 + +// 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 'entity_id.pb.dart' as $0; +import 'value.pb.dart' as $1; + +class Entity extends $pb.GeneratedMessage { + factory Entity({ + $0.EntityId? uid, + $core.Iterable<$0.EntityId>? parents, + $core.Map<$core.String, $1.Value>? attributes, + }) { + final $result = create(); + if (uid != null) { + $result.uid = uid; + } + if (parents != null) { + $result.parents.addAll(parents); + } + if (attributes != null) { + $result.attributes.addAll(attributes); + } + return $result; + } + Entity._() : super(); + factory Entity.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory Entity.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Entity', package: const $pb.PackageName(_omitMessageNames ? '' : 'cedar.v3'), createEmptyInstance: create) + ..aOM<$0.EntityId>(1, _omitFieldNames ? '' : 'uid', subBuilder: $0.EntityId.create) + ..pc<$0.EntityId>(2, _omitFieldNames ? '' : 'parents', $pb.PbFieldType.PM, subBuilder: $0.EntityId.create) + ..m<$core.String, $1.Value>(3, _omitFieldNames ? '' : 'attributes', entryClassName: 'Entity.AttributesEntry', keyFieldType: $pb.PbFieldType.OS, valueFieldType: $pb.PbFieldType.OM, valueCreator: $1.Value.create, valueDefaultOrMaker: $1.Value.getDefault, packageName: const $pb.PackageName('cedar.v3')) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + Entity clone() => Entity()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + Entity copyWith(void Function(Entity) updates) => super.copyWith((message) => updates(message as Entity)) as Entity; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static Entity create() => Entity._(); + Entity createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static Entity getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static Entity? _defaultInstance; + + @$pb.TagNumber(1) + $0.EntityId get uid => $_getN(0); + @$pb.TagNumber(1) + set uid($0.EntityId v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasUid() => $_has(0); + @$pb.TagNumber(1) + void clearUid() => clearField(1); + @$pb.TagNumber(1) + $0.EntityId ensureUid() => $_ensure(0); + + @$pb.TagNumber(2) + $core.List<$0.EntityId> get parents => $_getList(1); + + @$pb.TagNumber(3) + $core.Map<$core.String, $1.Value> get attributes => $_getMap(2); +} + + +const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); +const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/packages/corks/lib/src/proto/cedar/v3/entity.pbenum.dart b/packages/corks/lib/src/proto/cedar/v3/entity.pbenum.dart new file mode 100644 index 00000000..da437543 --- /dev/null +++ b/packages/corks/lib/src/proto/cedar/v3/entity.pbenum.dart @@ -0,0 +1,11 @@ +// +// Generated code. Do not modify. +// source: cedar/v3/entity.proto +// +// @dart = 2.12 + +// 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/packages/corks/lib/src/proto/cedar/v3/entity.pbjson.dart b/packages/corks/lib/src/proto/cedar/v3/entity.pbjson.dart new file mode 100644 index 00000000..3a463ed3 --- /dev/null +++ b/packages/corks/lib/src/proto/cedar/v3/entity.pbjson.dart @@ -0,0 +1,44 @@ +// +// Generated code. Do not modify. +// source: cedar/v3/entity.proto +// +// @dart = 2.12 + +// 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 entityDescriptor instead') +const Entity$json = { + '1': 'Entity', + '2': [ + {'1': 'uid', '3': 1, '4': 1, '5': 11, '6': '.cedar.v3.EntityId', '10': 'uid'}, + {'1': 'parents', '3': 2, '4': 3, '5': 11, '6': '.cedar.v3.EntityId', '10': 'parents'}, + {'1': 'attributes', '3': 3, '4': 3, '5': 11, '6': '.cedar.v3.Entity.AttributesEntry', '10': 'attributes'}, + ], + '3': [Entity_AttributesEntry$json], +}; + +@$core.Deprecated('Use entityDescriptor instead') +const Entity_AttributesEntry$json = { + '1': 'AttributesEntry', + '2': [ + {'1': 'key', '3': 1, '4': 1, '5': 9, '10': 'key'}, + {'1': 'value', '3': 2, '4': 1, '5': 11, '6': '.cedar.v3.Value', '10': 'value'}, + ], + '7': {'7': true}, +}; + +/// Descriptor for `Entity`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List entityDescriptor = $convert.base64Decode( + 'CgZFbnRpdHkSJAoDdWlkGAEgASgLMhIuY2VkYXIudjMuRW50aXR5SWRSA3VpZBIsCgdwYXJlbn' + 'RzGAIgAygLMhIuY2VkYXIudjMuRW50aXR5SWRSB3BhcmVudHMSQAoKYXR0cmlidXRlcxgDIAMo' + 'CzIgLmNlZGFyLnYzLkVudGl0eS5BdHRyaWJ1dGVzRW50cnlSCmF0dHJpYnV0ZXMaTgoPQXR0cm' + 'lidXRlc0VudHJ5EhAKA2tleRgBIAEoCVIDa2V5EiUKBXZhbHVlGAIgASgLMg8uY2VkYXIudjMu' + 'VmFsdWVSBXZhbHVlOgI4AQ=='); + diff --git a/packages/corks/lib/src/proto/cedar/v3/entity.pbserver.dart b/packages/corks/lib/src/proto/cedar/v3/entity.pbserver.dart new file mode 100644 index 00000000..b012dd63 --- /dev/null +++ b/packages/corks/lib/src/proto/cedar/v3/entity.pbserver.dart @@ -0,0 +1,14 @@ +// +// Generated code. Do not modify. +// source: cedar/v3/entity.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +export 'entity.pb.dart'; + diff --git a/packages/corks/lib/src/proto/cedar/v3/entity_id.pb.dart b/packages/corks/lib/src/proto/cedar/v3/entity_id.pb.dart new file mode 100644 index 00000000..af1db677 --- /dev/null +++ b/packages/corks/lib/src/proto/cedar/v3/entity_id.pb.dart @@ -0,0 +1,82 @@ +// +// Generated code. Do not modify. +// source: cedar/v3/entity_id.proto +// +// @dart = 2.12 + +// 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 EntityId extends $pb.GeneratedMessage { + factory EntityId({ + $core.String? type, + $core.String? id, + }) { + final $result = create(); + if (type != null) { + $result.type = type; + } + if (id != null) { + $result.id = id; + } + return $result; + } + EntityId._() : super(); + factory EntityId.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory EntityId.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'EntityId', package: const $pb.PackageName(_omitMessageNames ? '' : 'cedar.v3'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'type') + ..aOS(2, _omitFieldNames ? '' : 'id') + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + EntityId clone() => EntityId()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + EntityId copyWith(void Function(EntityId) updates) => super.copyWith((message) => updates(message as EntityId)) as EntityId; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static EntityId create() => EntityId._(); + EntityId createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static EntityId getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static EntityId? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get type => $_getSZ(0); + @$pb.TagNumber(1) + set type($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasType() => $_has(0); + @$pb.TagNumber(1) + void clearType() => clearField(1); + + @$pb.TagNumber(2) + $core.String get id => $_getSZ(1); + @$pb.TagNumber(2) + set id($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasId() => $_has(1); + @$pb.TagNumber(2) + void clearId() => clearField(2); +} + + +const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); +const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/packages/corks/lib/src/proto/cedar/v3/entity_id.pbenum.dart b/packages/corks/lib/src/proto/cedar/v3/entity_id.pbenum.dart new file mode 100644 index 00000000..6c57285a --- /dev/null +++ b/packages/corks/lib/src/proto/cedar/v3/entity_id.pbenum.dart @@ -0,0 +1,11 @@ +// +// Generated code. Do not modify. +// source: cedar/v3/entity_id.proto +// +// @dart = 2.12 + +// 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/packages/corks/lib/src/proto/cedar/v3/entity_id.pbjson.dart b/packages/corks/lib/src/proto/cedar/v3/entity_id.pbjson.dart new file mode 100644 index 00000000..73f0cd15 --- /dev/null +++ b/packages/corks/lib/src/proto/cedar/v3/entity_id.pbjson.dart @@ -0,0 +1,28 @@ +// +// Generated code. Do not modify. +// source: cedar/v3/entity_id.proto +// +// @dart = 2.12 + +// 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 entityIdDescriptor instead') +const EntityId$json = { + '1': 'EntityId', + '2': [ + {'1': 'type', '3': 1, '4': 1, '5': 9, '10': 'type'}, + {'1': 'id', '3': 2, '4': 1, '5': 9, '10': 'id'}, + ], +}; + +/// Descriptor for `EntityId`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List entityIdDescriptor = $convert.base64Decode( + 'CghFbnRpdHlJZBISCgR0eXBlGAEgASgJUgR0eXBlEg4KAmlkGAIgASgJUgJpZA=='); + diff --git a/packages/corks/lib/src/proto/cedar/v3/entity_id.pbserver.dart b/packages/corks/lib/src/proto/cedar/v3/entity_id.pbserver.dart new file mode 100644 index 00000000..c6f0083f --- /dev/null +++ b/packages/corks/lib/src/proto/cedar/v3/entity_id.pbserver.dart @@ -0,0 +1,14 @@ +// +// Generated code. Do not modify. +// source: cedar/v3/entity_id.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +export 'entity_id.pb.dart'; + diff --git a/packages/corks/lib/src/proto/cedar/v3/expr.pb.dart b/packages/corks/lib/src/proto/cedar/v3/expr.pb.dart new file mode 100644 index 00000000..fa62bf65 --- /dev/null +++ b/packages/corks/lib/src/proto/cedar/v3/expr.pb.dart @@ -0,0 +1,2428 @@ +// +// Generated code. Do not modify. +// source: cedar/v3/expr.proto +// +// @dart = 2.12 + +// 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 'expr.pbenum.dart'; +import 'value.pb.dart' as $1; + +export 'expr.pbenum.dart'; + +enum Expr_Expr { + value, + var_, + slot, + unknown, + not, + neg, + equals, + notEquals, + in_, + lessThan, + lessThanOrEquals, + greaterThan, + greaterThanOrEquals, + and, + or, + plus, + minus, + times, + contains, + containsAll, + containsAny, + getAttribute, + hasAttribute, + like, + is_, + ifThenElse, + set, + record, + funcCall, + notSet +} + +class Expr extends $pb.GeneratedMessage { + factory Expr({ + ExprValue? value, + ExprVar? var_, + ExprSlot? slot, + ExprUnknown? unknown, + ExprNot? not, + ExprNeg? neg, + ExprEquals? equals, + ExprNotEquals? notEquals, + ExprIn? in_, + ExprLessThan? lessThan, + ExprLessThanOrEquals? lessThanOrEquals, + ExprGreaterThan? greaterThan, + ExprGreaterThanOrEquals? greaterThanOrEquals, + ExprAnd? and, + ExprOr? or, + ExprPlus? plus, + ExprMinus? minus, + ExprTimes? times, + ExprContains? contains, + ExprContainsAll? containsAll, + ExprContainsAny? containsAny, + ExprGetAttribute? getAttribute, + ExprHasAttribute? hasAttribute, + ExprLike? like, + ExprIs? is_, + ExprIfThenElse? ifThenElse, + ExprSet? set, + ExprRecord? record, + ExprFuncCall? funcCall, + }) { + final $result = create(); + if (value != null) { + $result.value = value; + } + if (var_ != null) { + $result.var_ = var_; + } + if (slot != null) { + $result.slot = slot; + } + if (unknown != null) { + $result.unknown = unknown; + } + if (not != null) { + $result.not = not; + } + if (neg != null) { + $result.neg = neg; + } + if (equals != null) { + $result.equals = equals; + } + if (notEquals != null) { + $result.notEquals = notEquals; + } + if (in_ != null) { + $result.in_ = in_; + } + if (lessThan != null) { + $result.lessThan = lessThan; + } + if (lessThanOrEquals != null) { + $result.lessThanOrEquals = lessThanOrEquals; + } + if (greaterThan != null) { + $result.greaterThan = greaterThan; + } + if (greaterThanOrEquals != null) { + $result.greaterThanOrEquals = greaterThanOrEquals; + } + if (and != null) { + $result.and = and; + } + if (or != null) { + $result.or = or; + } + if (plus != null) { + $result.plus = plus; + } + if (minus != null) { + $result.minus = minus; + } + if (times != null) { + $result.times = times; + } + if (contains != null) { + $result.contains = contains; + } + if (containsAll != null) { + $result.containsAll = containsAll; + } + if (containsAny != null) { + $result.containsAny = containsAny; + } + if (getAttribute != null) { + $result.getAttribute = getAttribute; + } + if (hasAttribute != null) { + $result.hasAttribute = hasAttribute; + } + if (like != null) { + $result.like = like; + } + if (is_ != null) { + $result.is_ = is_; + } + if (ifThenElse != null) { + $result.ifThenElse = ifThenElse; + } + if (set != null) { + $result.set = set; + } + if (record != null) { + $result.record = record; + } + if (funcCall != null) { + $result.funcCall = funcCall; + } + return $result; + } + Expr._() : super(); + factory Expr.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory Expr.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static const $core.Map<$core.int, Expr_Expr> _Expr_ExprByTag = { + 1 : Expr_Expr.value, + 2 : Expr_Expr.var_, + 3 : Expr_Expr.slot, + 4 : Expr_Expr.unknown, + 5 : Expr_Expr.not, + 6 : Expr_Expr.neg, + 7 : Expr_Expr.equals, + 8 : Expr_Expr.notEquals, + 9 : Expr_Expr.in_, + 10 : Expr_Expr.lessThan, + 11 : Expr_Expr.lessThanOrEquals, + 12 : Expr_Expr.greaterThan, + 13 : Expr_Expr.greaterThanOrEquals, + 14 : Expr_Expr.and, + 15 : Expr_Expr.or, + 16 : Expr_Expr.plus, + 17 : Expr_Expr.minus, + 18 : Expr_Expr.times, + 19 : Expr_Expr.contains, + 20 : Expr_Expr.containsAll, + 21 : Expr_Expr.containsAny, + 22 : Expr_Expr.getAttribute, + 23 : Expr_Expr.hasAttribute, + 24 : Expr_Expr.like, + 25 : Expr_Expr.is_, + 26 : Expr_Expr.ifThenElse, + 27 : Expr_Expr.set, + 28 : Expr_Expr.record, + 29 : Expr_Expr.funcCall, + 0 : Expr_Expr.notSet + }; + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Expr', package: const $pb.PackageName(_omitMessageNames ? '' : 'cedar.v3'), createEmptyInstance: create) + ..oo(0, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29]) + ..aOM(1, _omitFieldNames ? '' : 'value', subBuilder: ExprValue.create) + ..aOM(2, _omitFieldNames ? '' : 'var', subBuilder: ExprVar.create) + ..aOM(3, _omitFieldNames ? '' : 'slot', subBuilder: ExprSlot.create) + ..aOM(4, _omitFieldNames ? '' : 'unknown', subBuilder: ExprUnknown.create) + ..aOM(5, _omitFieldNames ? '' : 'not', subBuilder: ExprNot.create) + ..aOM(6, _omitFieldNames ? '' : 'neg', subBuilder: ExprNeg.create) + ..aOM(7, _omitFieldNames ? '' : 'equals', subBuilder: ExprEquals.create) + ..aOM(8, _omitFieldNames ? '' : 'notEquals', subBuilder: ExprNotEquals.create) + ..aOM(9, _omitFieldNames ? '' : 'in', subBuilder: ExprIn.create) + ..aOM(10, _omitFieldNames ? '' : 'lessThan', subBuilder: ExprLessThan.create) + ..aOM(11, _omitFieldNames ? '' : 'lessThanOrEquals', subBuilder: ExprLessThanOrEquals.create) + ..aOM(12, _omitFieldNames ? '' : 'greaterThan', subBuilder: ExprGreaterThan.create) + ..aOM(13, _omitFieldNames ? '' : 'greaterThanOrEquals', subBuilder: ExprGreaterThanOrEquals.create) + ..aOM(14, _omitFieldNames ? '' : 'and', subBuilder: ExprAnd.create) + ..aOM(15, _omitFieldNames ? '' : 'or', subBuilder: ExprOr.create) + ..aOM(16, _omitFieldNames ? '' : 'plus', subBuilder: ExprPlus.create) + ..aOM(17, _omitFieldNames ? '' : 'minus', subBuilder: ExprMinus.create) + ..aOM(18, _omitFieldNames ? '' : 'times', subBuilder: ExprTimes.create) + ..aOM(19, _omitFieldNames ? '' : 'contains', subBuilder: ExprContains.create) + ..aOM(20, _omitFieldNames ? '' : 'containsAll', subBuilder: ExprContainsAll.create) + ..aOM(21, _omitFieldNames ? '' : 'containsAny', subBuilder: ExprContainsAny.create) + ..aOM(22, _omitFieldNames ? '' : 'getAttribute', subBuilder: ExprGetAttribute.create) + ..aOM(23, _omitFieldNames ? '' : 'hasAttribute', subBuilder: ExprHasAttribute.create) + ..aOM(24, _omitFieldNames ? '' : 'like', subBuilder: ExprLike.create) + ..aOM(25, _omitFieldNames ? '' : 'is', subBuilder: ExprIs.create) + ..aOM(26, _omitFieldNames ? '' : 'ifThenElse', subBuilder: ExprIfThenElse.create) + ..aOM(27, _omitFieldNames ? '' : 'set', subBuilder: ExprSet.create) + ..aOM(28, _omitFieldNames ? '' : 'record', subBuilder: ExprRecord.create) + ..aOM(29, _omitFieldNames ? '' : 'funcCall', subBuilder: ExprFuncCall.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') + Expr clone() => Expr()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + Expr copyWith(void Function(Expr) updates) => super.copyWith((message) => updates(message as Expr)) as Expr; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static Expr create() => Expr._(); + Expr createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static Expr getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static Expr? _defaultInstance; + + Expr_Expr whichExpr() => _Expr_ExprByTag[$_whichOneof(0)]!; + void clearExpr() => clearField($_whichOneof(0)); + + @$pb.TagNumber(1) + ExprValue get value => $_getN(0); + @$pb.TagNumber(1) + set value(ExprValue v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasValue() => $_has(0); + @$pb.TagNumber(1) + void clearValue() => clearField(1); + @$pb.TagNumber(1) + ExprValue ensureValue() => $_ensure(0); + + @$pb.TagNumber(2) + ExprVar get var_ => $_getN(1); + @$pb.TagNumber(2) + set var_(ExprVar v) { setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasVar_() => $_has(1); + @$pb.TagNumber(2) + void clearVar_() => clearField(2); + @$pb.TagNumber(2) + ExprVar ensureVar_() => $_ensure(1); + + @$pb.TagNumber(3) + ExprSlot get slot => $_getN(2); + @$pb.TagNumber(3) + set slot(ExprSlot v) { setField(3, v); } + @$pb.TagNumber(3) + $core.bool hasSlot() => $_has(2); + @$pb.TagNumber(3) + void clearSlot() => clearField(3); + @$pb.TagNumber(3) + ExprSlot ensureSlot() => $_ensure(2); + + @$pb.TagNumber(4) + ExprUnknown get unknown => $_getN(3); + @$pb.TagNumber(4) + set unknown(ExprUnknown v) { setField(4, v); } + @$pb.TagNumber(4) + $core.bool hasUnknown() => $_has(3); + @$pb.TagNumber(4) + void clearUnknown() => clearField(4); + @$pb.TagNumber(4) + ExprUnknown ensureUnknown() => $_ensure(3); + + @$pb.TagNumber(5) + ExprNot get not => $_getN(4); + @$pb.TagNumber(5) + set not(ExprNot v) { setField(5, v); } + @$pb.TagNumber(5) + $core.bool hasNot() => $_has(4); + @$pb.TagNumber(5) + void clearNot() => clearField(5); + @$pb.TagNumber(5) + ExprNot ensureNot() => $_ensure(4); + + @$pb.TagNumber(6) + ExprNeg get neg => $_getN(5); + @$pb.TagNumber(6) + set neg(ExprNeg v) { setField(6, v); } + @$pb.TagNumber(6) + $core.bool hasNeg() => $_has(5); + @$pb.TagNumber(6) + void clearNeg() => clearField(6); + @$pb.TagNumber(6) + ExprNeg ensureNeg() => $_ensure(5); + + @$pb.TagNumber(7) + ExprEquals get equals => $_getN(6); + @$pb.TagNumber(7) + set equals(ExprEquals v) { setField(7, v); } + @$pb.TagNumber(7) + $core.bool hasEquals() => $_has(6); + @$pb.TagNumber(7) + void clearEquals() => clearField(7); + @$pb.TagNumber(7) + ExprEquals ensureEquals() => $_ensure(6); + + @$pb.TagNumber(8) + ExprNotEquals get notEquals => $_getN(7); + @$pb.TagNumber(8) + set notEquals(ExprNotEquals v) { setField(8, v); } + @$pb.TagNumber(8) + $core.bool hasNotEquals() => $_has(7); + @$pb.TagNumber(8) + void clearNotEquals() => clearField(8); + @$pb.TagNumber(8) + ExprNotEquals ensureNotEquals() => $_ensure(7); + + @$pb.TagNumber(9) + ExprIn get in_ => $_getN(8); + @$pb.TagNumber(9) + set in_(ExprIn v) { setField(9, v); } + @$pb.TagNumber(9) + $core.bool hasIn_() => $_has(8); + @$pb.TagNumber(9) + void clearIn_() => clearField(9); + @$pb.TagNumber(9) + ExprIn ensureIn_() => $_ensure(8); + + @$pb.TagNumber(10) + ExprLessThan get lessThan => $_getN(9); + @$pb.TagNumber(10) + set lessThan(ExprLessThan v) { setField(10, v); } + @$pb.TagNumber(10) + $core.bool hasLessThan() => $_has(9); + @$pb.TagNumber(10) + void clearLessThan() => clearField(10); + @$pb.TagNumber(10) + ExprLessThan ensureLessThan() => $_ensure(9); + + @$pb.TagNumber(11) + ExprLessThanOrEquals get lessThanOrEquals => $_getN(10); + @$pb.TagNumber(11) + set lessThanOrEquals(ExprLessThanOrEquals v) { setField(11, v); } + @$pb.TagNumber(11) + $core.bool hasLessThanOrEquals() => $_has(10); + @$pb.TagNumber(11) + void clearLessThanOrEquals() => clearField(11); + @$pb.TagNumber(11) + ExprLessThanOrEquals ensureLessThanOrEquals() => $_ensure(10); + + @$pb.TagNumber(12) + ExprGreaterThan get greaterThan => $_getN(11); + @$pb.TagNumber(12) + set greaterThan(ExprGreaterThan v) { setField(12, v); } + @$pb.TagNumber(12) + $core.bool hasGreaterThan() => $_has(11); + @$pb.TagNumber(12) + void clearGreaterThan() => clearField(12); + @$pb.TagNumber(12) + ExprGreaterThan ensureGreaterThan() => $_ensure(11); + + @$pb.TagNumber(13) + ExprGreaterThanOrEquals get greaterThanOrEquals => $_getN(12); + @$pb.TagNumber(13) + set greaterThanOrEquals(ExprGreaterThanOrEquals v) { setField(13, v); } + @$pb.TagNumber(13) + $core.bool hasGreaterThanOrEquals() => $_has(12); + @$pb.TagNumber(13) + void clearGreaterThanOrEquals() => clearField(13); + @$pb.TagNumber(13) + ExprGreaterThanOrEquals ensureGreaterThanOrEquals() => $_ensure(12); + + @$pb.TagNumber(14) + ExprAnd get and => $_getN(13); + @$pb.TagNumber(14) + set and(ExprAnd v) { setField(14, v); } + @$pb.TagNumber(14) + $core.bool hasAnd() => $_has(13); + @$pb.TagNumber(14) + void clearAnd() => clearField(14); + @$pb.TagNumber(14) + ExprAnd ensureAnd() => $_ensure(13); + + @$pb.TagNumber(15) + ExprOr get or => $_getN(14); + @$pb.TagNumber(15) + set or(ExprOr v) { setField(15, v); } + @$pb.TagNumber(15) + $core.bool hasOr() => $_has(14); + @$pb.TagNumber(15) + void clearOr() => clearField(15); + @$pb.TagNumber(15) + ExprOr ensureOr() => $_ensure(14); + + @$pb.TagNumber(16) + ExprPlus get plus => $_getN(15); + @$pb.TagNumber(16) + set plus(ExprPlus v) { setField(16, v); } + @$pb.TagNumber(16) + $core.bool hasPlus() => $_has(15); + @$pb.TagNumber(16) + void clearPlus() => clearField(16); + @$pb.TagNumber(16) + ExprPlus ensurePlus() => $_ensure(15); + + @$pb.TagNumber(17) + ExprMinus get minus => $_getN(16); + @$pb.TagNumber(17) + set minus(ExprMinus v) { setField(17, v); } + @$pb.TagNumber(17) + $core.bool hasMinus() => $_has(16); + @$pb.TagNumber(17) + void clearMinus() => clearField(17); + @$pb.TagNumber(17) + ExprMinus ensureMinus() => $_ensure(16); + + @$pb.TagNumber(18) + ExprTimes get times => $_getN(17); + @$pb.TagNumber(18) + set times(ExprTimes v) { setField(18, v); } + @$pb.TagNumber(18) + $core.bool hasTimes() => $_has(17); + @$pb.TagNumber(18) + void clearTimes() => clearField(18); + @$pb.TagNumber(18) + ExprTimes ensureTimes() => $_ensure(17); + + @$pb.TagNumber(19) + ExprContains get contains => $_getN(18); + @$pb.TagNumber(19) + set contains(ExprContains v) { setField(19, v); } + @$pb.TagNumber(19) + $core.bool hasContains() => $_has(18); + @$pb.TagNumber(19) + void clearContains() => clearField(19); + @$pb.TagNumber(19) + ExprContains ensureContains() => $_ensure(18); + + @$pb.TagNumber(20) + ExprContainsAll get containsAll => $_getN(19); + @$pb.TagNumber(20) + set containsAll(ExprContainsAll v) { setField(20, v); } + @$pb.TagNumber(20) + $core.bool hasContainsAll() => $_has(19); + @$pb.TagNumber(20) + void clearContainsAll() => clearField(20); + @$pb.TagNumber(20) + ExprContainsAll ensureContainsAll() => $_ensure(19); + + @$pb.TagNumber(21) + ExprContainsAny get containsAny => $_getN(20); + @$pb.TagNumber(21) + set containsAny(ExprContainsAny v) { setField(21, v); } + @$pb.TagNumber(21) + $core.bool hasContainsAny() => $_has(20); + @$pb.TagNumber(21) + void clearContainsAny() => clearField(21); + @$pb.TagNumber(21) + ExprContainsAny ensureContainsAny() => $_ensure(20); + + @$pb.TagNumber(22) + ExprGetAttribute get getAttribute => $_getN(21); + @$pb.TagNumber(22) + set getAttribute(ExprGetAttribute v) { setField(22, v); } + @$pb.TagNumber(22) + $core.bool hasGetAttribute() => $_has(21); + @$pb.TagNumber(22) + void clearGetAttribute() => clearField(22); + @$pb.TagNumber(22) + ExprGetAttribute ensureGetAttribute() => $_ensure(21); + + @$pb.TagNumber(23) + ExprHasAttribute get hasAttribute => $_getN(22); + @$pb.TagNumber(23) + set hasAttribute(ExprHasAttribute v) { setField(23, v); } + @$pb.TagNumber(23) + $core.bool hasHasAttribute() => $_has(22); + @$pb.TagNumber(23) + void clearHasAttribute() => clearField(23); + @$pb.TagNumber(23) + ExprHasAttribute ensureHasAttribute() => $_ensure(22); + + @$pb.TagNumber(24) + ExprLike get like => $_getN(23); + @$pb.TagNumber(24) + set like(ExprLike v) { setField(24, v); } + @$pb.TagNumber(24) + $core.bool hasLike() => $_has(23); + @$pb.TagNumber(24) + void clearLike() => clearField(24); + @$pb.TagNumber(24) + ExprLike ensureLike() => $_ensure(23); + + @$pb.TagNumber(25) + ExprIs get is_ => $_getN(24); + @$pb.TagNumber(25) + set is_(ExprIs v) { setField(25, v); } + @$pb.TagNumber(25) + $core.bool hasIs_() => $_has(24); + @$pb.TagNumber(25) + void clearIs_() => clearField(25); + @$pb.TagNumber(25) + ExprIs ensureIs_() => $_ensure(24); + + @$pb.TagNumber(26) + ExprIfThenElse get ifThenElse => $_getN(25); + @$pb.TagNumber(26) + set ifThenElse(ExprIfThenElse v) { setField(26, v); } + @$pb.TagNumber(26) + $core.bool hasIfThenElse() => $_has(25); + @$pb.TagNumber(26) + void clearIfThenElse() => clearField(26); + @$pb.TagNumber(26) + ExprIfThenElse ensureIfThenElse() => $_ensure(25); + + @$pb.TagNumber(27) + ExprSet get set => $_getN(26); + @$pb.TagNumber(27) + set set(ExprSet v) { setField(27, v); } + @$pb.TagNumber(27) + $core.bool hasSet() => $_has(26); + @$pb.TagNumber(27) + void clearSet() => clearField(27); + @$pb.TagNumber(27) + ExprSet ensureSet() => $_ensure(26); + + @$pb.TagNumber(28) + ExprRecord get record => $_getN(27); + @$pb.TagNumber(28) + set record(ExprRecord v) { setField(28, v); } + @$pb.TagNumber(28) + $core.bool hasRecord() => $_has(27); + @$pb.TagNumber(28) + void clearRecord() => clearField(28); + @$pb.TagNumber(28) + ExprRecord ensureRecord() => $_ensure(27); + + @$pb.TagNumber(29) + ExprFuncCall get funcCall => $_getN(28); + @$pb.TagNumber(29) + set funcCall(ExprFuncCall v) { setField(29, v); } + @$pb.TagNumber(29) + $core.bool hasFuncCall() => $_has(28); + @$pb.TagNumber(29) + void clearFuncCall() => clearField(29); + @$pb.TagNumber(29) + ExprFuncCall ensureFuncCall() => $_ensure(28); +} + +class ExprValue extends $pb.GeneratedMessage { + factory ExprValue({ + $1.Value? value, + }) { + final $result = create(); + if (value != null) { + $result.value = value; + } + return $result; + } + ExprValue._() : super(); + factory ExprValue.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ExprValue.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ExprValue', package: const $pb.PackageName(_omitMessageNames ? '' : 'cedar.v3'), createEmptyInstance: create) + ..aOM<$1.Value>(1, _omitFieldNames ? '' : 'value', subBuilder: $1.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') + ExprValue clone() => ExprValue()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + ExprValue copyWith(void Function(ExprValue) updates) => super.copyWith((message) => updates(message as ExprValue)) as ExprValue; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static ExprValue create() => ExprValue._(); + ExprValue createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static ExprValue getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static ExprValue? _defaultInstance; + + @$pb.TagNumber(1) + $1.Value get value => $_getN(0); + @$pb.TagNumber(1) + set value($1.Value v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasValue() => $_has(0); + @$pb.TagNumber(1) + void clearValue() => clearField(1); + @$pb.TagNumber(1) + $1.Value ensureValue() => $_ensure(0); +} + +class ExprVar extends $pb.GeneratedMessage { + factory ExprVar({ + Variable? variable, + }) { + final $result = create(); + if (variable != null) { + $result.variable = variable; + } + return $result; + } + ExprVar._() : super(); + factory ExprVar.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ExprVar.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ExprVar', package: const $pb.PackageName(_omitMessageNames ? '' : 'cedar.v3'), createEmptyInstance: create) + ..e(1, _omitFieldNames ? '' : 'variable', $pb.PbFieldType.OE, defaultOrMaker: Variable.VARIABLE_UNSPECIFIED, valueOf: Variable.valueOf, enumValues: Variable.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') + ExprVar clone() => ExprVar()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + ExprVar copyWith(void Function(ExprVar) updates) => super.copyWith((message) => updates(message as ExprVar)) as ExprVar; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static ExprVar create() => ExprVar._(); + ExprVar createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static ExprVar getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static ExprVar? _defaultInstance; + + @$pb.TagNumber(1) + Variable get variable => $_getN(0); + @$pb.TagNumber(1) + set variable(Variable v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasVariable() => $_has(0); + @$pb.TagNumber(1) + void clearVariable() => clearField(1); +} + +class ExprSlot extends $pb.GeneratedMessage { + factory ExprSlot({ + SlotId? slotId, + }) { + final $result = create(); + if (slotId != null) { + $result.slotId = slotId; + } + return $result; + } + ExprSlot._() : super(); + factory ExprSlot.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ExprSlot.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ExprSlot', package: const $pb.PackageName(_omitMessageNames ? '' : 'cedar.v3'), createEmptyInstance: create) + ..e(1, _omitFieldNames ? '' : 'slotId', $pb.PbFieldType.OE, defaultOrMaker: SlotId.SLOT_ID_UNSPECIFIED, valueOf: SlotId.valueOf, enumValues: SlotId.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') + ExprSlot clone() => ExprSlot()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + ExprSlot copyWith(void Function(ExprSlot) updates) => super.copyWith((message) => updates(message as ExprSlot)) as ExprSlot; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static ExprSlot create() => ExprSlot._(); + ExprSlot createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static ExprSlot getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static ExprSlot? _defaultInstance; + + @$pb.TagNumber(1) + SlotId get slotId => $_getN(0); + @$pb.TagNumber(1) + set slotId(SlotId v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasSlotId() => $_has(0); + @$pb.TagNumber(1) + void clearSlotId() => clearField(1); +} + +class ExprUnknown extends $pb.GeneratedMessage { + factory ExprUnknown({ + $core.String? name, + }) { + final $result = create(); + if (name != null) { + $result.name = name; + } + return $result; + } + ExprUnknown._() : super(); + factory ExprUnknown.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ExprUnknown.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ExprUnknown', package: const $pb.PackageName(_omitMessageNames ? '' : 'cedar.v3'), 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') + ExprUnknown clone() => ExprUnknown()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + ExprUnknown copyWith(void Function(ExprUnknown) updates) => super.copyWith((message) => updates(message as ExprUnknown)) as ExprUnknown; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static ExprUnknown create() => ExprUnknown._(); + ExprUnknown createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static ExprUnknown getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static ExprUnknown? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get name => $_getSZ(0); + @$pb.TagNumber(1) + set name($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasName() => $_has(0); + @$pb.TagNumber(1) + void clearName() => clearField(1); +} + +class ExprNot extends $pb.GeneratedMessage { + factory ExprNot({ + Expr? expr, + }) { + final $result = create(); + if (expr != null) { + $result.expr = expr; + } + return $result; + } + ExprNot._() : super(); + factory ExprNot.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ExprNot.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ExprNot', package: const $pb.PackageName(_omitMessageNames ? '' : 'cedar.v3'), createEmptyInstance: create) + ..aOM(1, _omitFieldNames ? '' : 'expr', subBuilder: Expr.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') + ExprNot clone() => ExprNot()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + ExprNot copyWith(void Function(ExprNot) updates) => super.copyWith((message) => updates(message as ExprNot)) as ExprNot; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static ExprNot create() => ExprNot._(); + ExprNot createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static ExprNot getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static ExprNot? _defaultInstance; + + @$pb.TagNumber(1) + Expr get expr => $_getN(0); + @$pb.TagNumber(1) + set expr(Expr v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasExpr() => $_has(0); + @$pb.TagNumber(1) + void clearExpr() => clearField(1); + @$pb.TagNumber(1) + Expr ensureExpr() => $_ensure(0); +} + +class ExprNeg extends $pb.GeneratedMessage { + factory ExprNeg({ + Expr? expr, + }) { + final $result = create(); + if (expr != null) { + $result.expr = expr; + } + return $result; + } + ExprNeg._() : super(); + factory ExprNeg.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ExprNeg.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ExprNeg', package: const $pb.PackageName(_omitMessageNames ? '' : 'cedar.v3'), createEmptyInstance: create) + ..aOM(1, _omitFieldNames ? '' : 'expr', subBuilder: Expr.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') + ExprNeg clone() => ExprNeg()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + ExprNeg copyWith(void Function(ExprNeg) updates) => super.copyWith((message) => updates(message as ExprNeg)) as ExprNeg; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static ExprNeg create() => ExprNeg._(); + ExprNeg createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static ExprNeg getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static ExprNeg? _defaultInstance; + + @$pb.TagNumber(1) + Expr get expr => $_getN(0); + @$pb.TagNumber(1) + set expr(Expr v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasExpr() => $_has(0); + @$pb.TagNumber(1) + void clearExpr() => clearField(1); + @$pb.TagNumber(1) + Expr ensureExpr() => $_ensure(0); +} + +class ExprEquals extends $pb.GeneratedMessage { + factory ExprEquals({ + Expr? left, + Expr? right, + }) { + final $result = create(); + if (left != null) { + $result.left = left; + } + if (right != null) { + $result.right = right; + } + return $result; + } + ExprEquals._() : super(); + factory ExprEquals.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ExprEquals.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ExprEquals', package: const $pb.PackageName(_omitMessageNames ? '' : 'cedar.v3'), createEmptyInstance: create) + ..aOM(1, _omitFieldNames ? '' : 'left', subBuilder: Expr.create) + ..aOM(2, _omitFieldNames ? '' : 'right', subBuilder: Expr.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') + ExprEquals clone() => ExprEquals()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + ExprEquals copyWith(void Function(ExprEquals) updates) => super.copyWith((message) => updates(message as ExprEquals)) as ExprEquals; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static ExprEquals create() => ExprEquals._(); + ExprEquals createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static ExprEquals getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static ExprEquals? _defaultInstance; + + @$pb.TagNumber(1) + Expr get left => $_getN(0); + @$pb.TagNumber(1) + set left(Expr v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasLeft() => $_has(0); + @$pb.TagNumber(1) + void clearLeft() => clearField(1); + @$pb.TagNumber(1) + Expr ensureLeft() => $_ensure(0); + + @$pb.TagNumber(2) + Expr get right => $_getN(1); + @$pb.TagNumber(2) + set right(Expr v) { setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasRight() => $_has(1); + @$pb.TagNumber(2) + void clearRight() => clearField(2); + @$pb.TagNumber(2) + Expr ensureRight() => $_ensure(1); +} + +class ExprNotEquals extends $pb.GeneratedMessage { + factory ExprNotEquals({ + Expr? left, + Expr? right, + }) { + final $result = create(); + if (left != null) { + $result.left = left; + } + if (right != null) { + $result.right = right; + } + return $result; + } + ExprNotEquals._() : super(); + factory ExprNotEquals.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ExprNotEquals.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ExprNotEquals', package: const $pb.PackageName(_omitMessageNames ? '' : 'cedar.v3'), createEmptyInstance: create) + ..aOM(1, _omitFieldNames ? '' : 'left', subBuilder: Expr.create) + ..aOM(2, _omitFieldNames ? '' : 'right', subBuilder: Expr.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') + ExprNotEquals clone() => ExprNotEquals()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + ExprNotEquals copyWith(void Function(ExprNotEquals) updates) => super.copyWith((message) => updates(message as ExprNotEquals)) as ExprNotEquals; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static ExprNotEquals create() => ExprNotEquals._(); + ExprNotEquals createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static ExprNotEquals getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static ExprNotEquals? _defaultInstance; + + @$pb.TagNumber(1) + Expr get left => $_getN(0); + @$pb.TagNumber(1) + set left(Expr v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasLeft() => $_has(0); + @$pb.TagNumber(1) + void clearLeft() => clearField(1); + @$pb.TagNumber(1) + Expr ensureLeft() => $_ensure(0); + + @$pb.TagNumber(2) + Expr get right => $_getN(1); + @$pb.TagNumber(2) + set right(Expr v) { setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasRight() => $_has(1); + @$pb.TagNumber(2) + void clearRight() => clearField(2); + @$pb.TagNumber(2) + Expr ensureRight() => $_ensure(1); +} + +class ExprIn extends $pb.GeneratedMessage { + factory ExprIn({ + Expr? left, + Expr? right, + }) { + final $result = create(); + if (left != null) { + $result.left = left; + } + if (right != null) { + $result.right = right; + } + return $result; + } + ExprIn._() : super(); + factory ExprIn.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ExprIn.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ExprIn', package: const $pb.PackageName(_omitMessageNames ? '' : 'cedar.v3'), createEmptyInstance: create) + ..aOM(1, _omitFieldNames ? '' : 'left', subBuilder: Expr.create) + ..aOM(2, _omitFieldNames ? '' : 'right', subBuilder: Expr.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') + ExprIn clone() => ExprIn()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + ExprIn copyWith(void Function(ExprIn) updates) => super.copyWith((message) => updates(message as ExprIn)) as ExprIn; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static ExprIn create() => ExprIn._(); + ExprIn createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static ExprIn getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static ExprIn? _defaultInstance; + + @$pb.TagNumber(1) + Expr get left => $_getN(0); + @$pb.TagNumber(1) + set left(Expr v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasLeft() => $_has(0); + @$pb.TagNumber(1) + void clearLeft() => clearField(1); + @$pb.TagNumber(1) + Expr ensureLeft() => $_ensure(0); + + @$pb.TagNumber(2) + Expr get right => $_getN(1); + @$pb.TagNumber(2) + set right(Expr v) { setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasRight() => $_has(1); + @$pb.TagNumber(2) + void clearRight() => clearField(2); + @$pb.TagNumber(2) + Expr ensureRight() => $_ensure(1); +} + +class ExprLessThan extends $pb.GeneratedMessage { + factory ExprLessThan({ + Expr? left, + Expr? right, + }) { + final $result = create(); + if (left != null) { + $result.left = left; + } + if (right != null) { + $result.right = right; + } + return $result; + } + ExprLessThan._() : super(); + factory ExprLessThan.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ExprLessThan.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ExprLessThan', package: const $pb.PackageName(_omitMessageNames ? '' : 'cedar.v3'), createEmptyInstance: create) + ..aOM(1, _omitFieldNames ? '' : 'left', subBuilder: Expr.create) + ..aOM(2, _omitFieldNames ? '' : 'right', subBuilder: Expr.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') + ExprLessThan clone() => ExprLessThan()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + ExprLessThan copyWith(void Function(ExprLessThan) updates) => super.copyWith((message) => updates(message as ExprLessThan)) as ExprLessThan; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static ExprLessThan create() => ExprLessThan._(); + ExprLessThan createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static ExprLessThan getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static ExprLessThan? _defaultInstance; + + @$pb.TagNumber(1) + Expr get left => $_getN(0); + @$pb.TagNumber(1) + set left(Expr v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasLeft() => $_has(0); + @$pb.TagNumber(1) + void clearLeft() => clearField(1); + @$pb.TagNumber(1) + Expr ensureLeft() => $_ensure(0); + + @$pb.TagNumber(2) + Expr get right => $_getN(1); + @$pb.TagNumber(2) + set right(Expr v) { setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasRight() => $_has(1); + @$pb.TagNumber(2) + void clearRight() => clearField(2); + @$pb.TagNumber(2) + Expr ensureRight() => $_ensure(1); +} + +class ExprLessThanOrEquals extends $pb.GeneratedMessage { + factory ExprLessThanOrEquals({ + Expr? left, + Expr? right, + }) { + final $result = create(); + if (left != null) { + $result.left = left; + } + if (right != null) { + $result.right = right; + } + return $result; + } + ExprLessThanOrEquals._() : super(); + factory ExprLessThanOrEquals.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ExprLessThanOrEquals.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ExprLessThanOrEquals', package: const $pb.PackageName(_omitMessageNames ? '' : 'cedar.v3'), createEmptyInstance: create) + ..aOM(1, _omitFieldNames ? '' : 'left', subBuilder: Expr.create) + ..aOM(2, _omitFieldNames ? '' : 'right', subBuilder: Expr.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') + ExprLessThanOrEquals clone() => ExprLessThanOrEquals()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + ExprLessThanOrEquals copyWith(void Function(ExprLessThanOrEquals) updates) => super.copyWith((message) => updates(message as ExprLessThanOrEquals)) as ExprLessThanOrEquals; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static ExprLessThanOrEquals create() => ExprLessThanOrEquals._(); + ExprLessThanOrEquals createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static ExprLessThanOrEquals getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static ExprLessThanOrEquals? _defaultInstance; + + @$pb.TagNumber(1) + Expr get left => $_getN(0); + @$pb.TagNumber(1) + set left(Expr v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasLeft() => $_has(0); + @$pb.TagNumber(1) + void clearLeft() => clearField(1); + @$pb.TagNumber(1) + Expr ensureLeft() => $_ensure(0); + + @$pb.TagNumber(2) + Expr get right => $_getN(1); + @$pb.TagNumber(2) + set right(Expr v) { setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasRight() => $_has(1); + @$pb.TagNumber(2) + void clearRight() => clearField(2); + @$pb.TagNumber(2) + Expr ensureRight() => $_ensure(1); +} + +class ExprGreaterThan extends $pb.GeneratedMessage { + factory ExprGreaterThan({ + Expr? left, + Expr? right, + }) { + final $result = create(); + if (left != null) { + $result.left = left; + } + if (right != null) { + $result.right = right; + } + return $result; + } + ExprGreaterThan._() : super(); + factory ExprGreaterThan.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ExprGreaterThan.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ExprGreaterThan', package: const $pb.PackageName(_omitMessageNames ? '' : 'cedar.v3'), createEmptyInstance: create) + ..aOM(1, _omitFieldNames ? '' : 'left', subBuilder: Expr.create) + ..aOM(2, _omitFieldNames ? '' : 'right', subBuilder: Expr.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') + ExprGreaterThan clone() => ExprGreaterThan()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + ExprGreaterThan copyWith(void Function(ExprGreaterThan) updates) => super.copyWith((message) => updates(message as ExprGreaterThan)) as ExprGreaterThan; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static ExprGreaterThan create() => ExprGreaterThan._(); + ExprGreaterThan createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static ExprGreaterThan getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static ExprGreaterThan? _defaultInstance; + + @$pb.TagNumber(1) + Expr get left => $_getN(0); + @$pb.TagNumber(1) + set left(Expr v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasLeft() => $_has(0); + @$pb.TagNumber(1) + void clearLeft() => clearField(1); + @$pb.TagNumber(1) + Expr ensureLeft() => $_ensure(0); + + @$pb.TagNumber(2) + Expr get right => $_getN(1); + @$pb.TagNumber(2) + set right(Expr v) { setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasRight() => $_has(1); + @$pb.TagNumber(2) + void clearRight() => clearField(2); + @$pb.TagNumber(2) + Expr ensureRight() => $_ensure(1); +} + +class ExprGreaterThanOrEquals extends $pb.GeneratedMessage { + factory ExprGreaterThanOrEquals({ + Expr? left, + Expr? right, + }) { + final $result = create(); + if (left != null) { + $result.left = left; + } + if (right != null) { + $result.right = right; + } + return $result; + } + ExprGreaterThanOrEquals._() : super(); + factory ExprGreaterThanOrEquals.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ExprGreaterThanOrEquals.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ExprGreaterThanOrEquals', package: const $pb.PackageName(_omitMessageNames ? '' : 'cedar.v3'), createEmptyInstance: create) + ..aOM(1, _omitFieldNames ? '' : 'left', subBuilder: Expr.create) + ..aOM(2, _omitFieldNames ? '' : 'right', subBuilder: Expr.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') + ExprGreaterThanOrEquals clone() => ExprGreaterThanOrEquals()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + ExprGreaterThanOrEquals copyWith(void Function(ExprGreaterThanOrEquals) updates) => super.copyWith((message) => updates(message as ExprGreaterThanOrEquals)) as ExprGreaterThanOrEquals; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static ExprGreaterThanOrEquals create() => ExprGreaterThanOrEquals._(); + ExprGreaterThanOrEquals createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static ExprGreaterThanOrEquals getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static ExprGreaterThanOrEquals? _defaultInstance; + + @$pb.TagNumber(1) + Expr get left => $_getN(0); + @$pb.TagNumber(1) + set left(Expr v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasLeft() => $_has(0); + @$pb.TagNumber(1) + void clearLeft() => clearField(1); + @$pb.TagNumber(1) + Expr ensureLeft() => $_ensure(0); + + @$pb.TagNumber(2) + Expr get right => $_getN(1); + @$pb.TagNumber(2) + set right(Expr v) { setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasRight() => $_has(1); + @$pb.TagNumber(2) + void clearRight() => clearField(2); + @$pb.TagNumber(2) + Expr ensureRight() => $_ensure(1); +} + +class ExprAnd extends $pb.GeneratedMessage { + factory ExprAnd({ + Expr? left, + Expr? right, + }) { + final $result = create(); + if (left != null) { + $result.left = left; + } + if (right != null) { + $result.right = right; + } + return $result; + } + ExprAnd._() : super(); + factory ExprAnd.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ExprAnd.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ExprAnd', package: const $pb.PackageName(_omitMessageNames ? '' : 'cedar.v3'), createEmptyInstance: create) + ..aOM(1, _omitFieldNames ? '' : 'left', subBuilder: Expr.create) + ..aOM(2, _omitFieldNames ? '' : 'right', subBuilder: Expr.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') + ExprAnd clone() => ExprAnd()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + ExprAnd copyWith(void Function(ExprAnd) updates) => super.copyWith((message) => updates(message as ExprAnd)) as ExprAnd; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static ExprAnd create() => ExprAnd._(); + ExprAnd createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static ExprAnd getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static ExprAnd? _defaultInstance; + + @$pb.TagNumber(1) + Expr get left => $_getN(0); + @$pb.TagNumber(1) + set left(Expr v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasLeft() => $_has(0); + @$pb.TagNumber(1) + void clearLeft() => clearField(1); + @$pb.TagNumber(1) + Expr ensureLeft() => $_ensure(0); + + @$pb.TagNumber(2) + Expr get right => $_getN(1); + @$pb.TagNumber(2) + set right(Expr v) { setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasRight() => $_has(1); + @$pb.TagNumber(2) + void clearRight() => clearField(2); + @$pb.TagNumber(2) + Expr ensureRight() => $_ensure(1); +} + +class ExprOr extends $pb.GeneratedMessage { + factory ExprOr({ + Expr? left, + Expr? right, + }) { + final $result = create(); + if (left != null) { + $result.left = left; + } + if (right != null) { + $result.right = right; + } + return $result; + } + ExprOr._() : super(); + factory ExprOr.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ExprOr.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ExprOr', package: const $pb.PackageName(_omitMessageNames ? '' : 'cedar.v3'), createEmptyInstance: create) + ..aOM(1, _omitFieldNames ? '' : 'left', subBuilder: Expr.create) + ..aOM(2, _omitFieldNames ? '' : 'right', subBuilder: Expr.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') + ExprOr clone() => ExprOr()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + ExprOr copyWith(void Function(ExprOr) updates) => super.copyWith((message) => updates(message as ExprOr)) as ExprOr; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static ExprOr create() => ExprOr._(); + ExprOr createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static ExprOr getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static ExprOr? _defaultInstance; + + @$pb.TagNumber(1) + Expr get left => $_getN(0); + @$pb.TagNumber(1) + set left(Expr v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasLeft() => $_has(0); + @$pb.TagNumber(1) + void clearLeft() => clearField(1); + @$pb.TagNumber(1) + Expr ensureLeft() => $_ensure(0); + + @$pb.TagNumber(2) + Expr get right => $_getN(1); + @$pb.TagNumber(2) + set right(Expr v) { setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasRight() => $_has(1); + @$pb.TagNumber(2) + void clearRight() => clearField(2); + @$pb.TagNumber(2) + Expr ensureRight() => $_ensure(1); +} + +class ExprPlus extends $pb.GeneratedMessage { + factory ExprPlus({ + Expr? left, + Expr? right, + }) { + final $result = create(); + if (left != null) { + $result.left = left; + } + if (right != null) { + $result.right = right; + } + return $result; + } + ExprPlus._() : super(); + factory ExprPlus.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ExprPlus.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ExprPlus', package: const $pb.PackageName(_omitMessageNames ? '' : 'cedar.v3'), createEmptyInstance: create) + ..aOM(1, _omitFieldNames ? '' : 'left', subBuilder: Expr.create) + ..aOM(2, _omitFieldNames ? '' : 'right', subBuilder: Expr.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') + ExprPlus clone() => ExprPlus()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + ExprPlus copyWith(void Function(ExprPlus) updates) => super.copyWith((message) => updates(message as ExprPlus)) as ExprPlus; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static ExprPlus create() => ExprPlus._(); + ExprPlus createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static ExprPlus getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static ExprPlus? _defaultInstance; + + @$pb.TagNumber(1) + Expr get left => $_getN(0); + @$pb.TagNumber(1) + set left(Expr v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasLeft() => $_has(0); + @$pb.TagNumber(1) + void clearLeft() => clearField(1); + @$pb.TagNumber(1) + Expr ensureLeft() => $_ensure(0); + + @$pb.TagNumber(2) + Expr get right => $_getN(1); + @$pb.TagNumber(2) + set right(Expr v) { setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasRight() => $_has(1); + @$pb.TagNumber(2) + void clearRight() => clearField(2); + @$pb.TagNumber(2) + Expr ensureRight() => $_ensure(1); +} + +class ExprMinus extends $pb.GeneratedMessage { + factory ExprMinus({ + Expr? left, + Expr? right, + }) { + final $result = create(); + if (left != null) { + $result.left = left; + } + if (right != null) { + $result.right = right; + } + return $result; + } + ExprMinus._() : super(); + factory ExprMinus.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ExprMinus.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ExprMinus', package: const $pb.PackageName(_omitMessageNames ? '' : 'cedar.v3'), createEmptyInstance: create) + ..aOM(1, _omitFieldNames ? '' : 'left', subBuilder: Expr.create) + ..aOM(2, _omitFieldNames ? '' : 'right', subBuilder: Expr.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') + ExprMinus clone() => ExprMinus()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + ExprMinus copyWith(void Function(ExprMinus) updates) => super.copyWith((message) => updates(message as ExprMinus)) as ExprMinus; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static ExprMinus create() => ExprMinus._(); + ExprMinus createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static ExprMinus getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static ExprMinus? _defaultInstance; + + @$pb.TagNumber(1) + Expr get left => $_getN(0); + @$pb.TagNumber(1) + set left(Expr v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasLeft() => $_has(0); + @$pb.TagNumber(1) + void clearLeft() => clearField(1); + @$pb.TagNumber(1) + Expr ensureLeft() => $_ensure(0); + + @$pb.TagNumber(2) + Expr get right => $_getN(1); + @$pb.TagNumber(2) + set right(Expr v) { setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasRight() => $_has(1); + @$pb.TagNumber(2) + void clearRight() => clearField(2); + @$pb.TagNumber(2) + Expr ensureRight() => $_ensure(1); +} + +class ExprTimes extends $pb.GeneratedMessage { + factory ExprTimes({ + Expr? left, + Expr? right, + }) { + final $result = create(); + if (left != null) { + $result.left = left; + } + if (right != null) { + $result.right = right; + } + return $result; + } + ExprTimes._() : super(); + factory ExprTimes.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ExprTimes.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ExprTimes', package: const $pb.PackageName(_omitMessageNames ? '' : 'cedar.v3'), createEmptyInstance: create) + ..aOM(1, _omitFieldNames ? '' : 'left', subBuilder: Expr.create) + ..aOM(2, _omitFieldNames ? '' : 'right', subBuilder: Expr.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') + ExprTimes clone() => ExprTimes()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + ExprTimes copyWith(void Function(ExprTimes) updates) => super.copyWith((message) => updates(message as ExprTimes)) as ExprTimes; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static ExprTimes create() => ExprTimes._(); + ExprTimes createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static ExprTimes getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static ExprTimes? _defaultInstance; + + @$pb.TagNumber(1) + Expr get left => $_getN(0); + @$pb.TagNumber(1) + set left(Expr v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasLeft() => $_has(0); + @$pb.TagNumber(1) + void clearLeft() => clearField(1); + @$pb.TagNumber(1) + Expr ensureLeft() => $_ensure(0); + + @$pb.TagNumber(2) + Expr get right => $_getN(1); + @$pb.TagNumber(2) + set right(Expr v) { setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasRight() => $_has(1); + @$pb.TagNumber(2) + void clearRight() => clearField(2); + @$pb.TagNumber(2) + Expr ensureRight() => $_ensure(1); +} + +class ExprContains extends $pb.GeneratedMessage { + factory ExprContains({ + Expr? left, + Expr? right, + }) { + final $result = create(); + if (left != null) { + $result.left = left; + } + if (right != null) { + $result.right = right; + } + return $result; + } + ExprContains._() : super(); + factory ExprContains.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ExprContains.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ExprContains', package: const $pb.PackageName(_omitMessageNames ? '' : 'cedar.v3'), createEmptyInstance: create) + ..aOM(1, _omitFieldNames ? '' : 'left', subBuilder: Expr.create) + ..aOM(2, _omitFieldNames ? '' : 'right', subBuilder: Expr.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') + ExprContains clone() => ExprContains()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + ExprContains copyWith(void Function(ExprContains) updates) => super.copyWith((message) => updates(message as ExprContains)) as ExprContains; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static ExprContains create() => ExprContains._(); + ExprContains createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static ExprContains getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static ExprContains? _defaultInstance; + + @$pb.TagNumber(1) + Expr get left => $_getN(0); + @$pb.TagNumber(1) + set left(Expr v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasLeft() => $_has(0); + @$pb.TagNumber(1) + void clearLeft() => clearField(1); + @$pb.TagNumber(1) + Expr ensureLeft() => $_ensure(0); + + @$pb.TagNumber(2) + Expr get right => $_getN(1); + @$pb.TagNumber(2) + set right(Expr v) { setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasRight() => $_has(1); + @$pb.TagNumber(2) + void clearRight() => clearField(2); + @$pb.TagNumber(2) + Expr ensureRight() => $_ensure(1); +} + +class ExprContainsAll extends $pb.GeneratedMessage { + factory ExprContainsAll({ + Expr? left, + Expr? right, + }) { + final $result = create(); + if (left != null) { + $result.left = left; + } + if (right != null) { + $result.right = right; + } + return $result; + } + ExprContainsAll._() : super(); + factory ExprContainsAll.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ExprContainsAll.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ExprContainsAll', package: const $pb.PackageName(_omitMessageNames ? '' : 'cedar.v3'), createEmptyInstance: create) + ..aOM(1, _omitFieldNames ? '' : 'left', subBuilder: Expr.create) + ..aOM(2, _omitFieldNames ? '' : 'right', subBuilder: Expr.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') + ExprContainsAll clone() => ExprContainsAll()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + ExprContainsAll copyWith(void Function(ExprContainsAll) updates) => super.copyWith((message) => updates(message as ExprContainsAll)) as ExprContainsAll; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static ExprContainsAll create() => ExprContainsAll._(); + ExprContainsAll createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static ExprContainsAll getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static ExprContainsAll? _defaultInstance; + + @$pb.TagNumber(1) + Expr get left => $_getN(0); + @$pb.TagNumber(1) + set left(Expr v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasLeft() => $_has(0); + @$pb.TagNumber(1) + void clearLeft() => clearField(1); + @$pb.TagNumber(1) + Expr ensureLeft() => $_ensure(0); + + @$pb.TagNumber(2) + Expr get right => $_getN(1); + @$pb.TagNumber(2) + set right(Expr v) { setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasRight() => $_has(1); + @$pb.TagNumber(2) + void clearRight() => clearField(2); + @$pb.TagNumber(2) + Expr ensureRight() => $_ensure(1); +} + +class ExprContainsAny extends $pb.GeneratedMessage { + factory ExprContainsAny({ + Expr? left, + Expr? right, + }) { + final $result = create(); + if (left != null) { + $result.left = left; + } + if (right != null) { + $result.right = right; + } + return $result; + } + ExprContainsAny._() : super(); + factory ExprContainsAny.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ExprContainsAny.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ExprContainsAny', package: const $pb.PackageName(_omitMessageNames ? '' : 'cedar.v3'), createEmptyInstance: create) + ..aOM(1, _omitFieldNames ? '' : 'left', subBuilder: Expr.create) + ..aOM(2, _omitFieldNames ? '' : 'right', subBuilder: Expr.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') + ExprContainsAny clone() => ExprContainsAny()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + ExprContainsAny copyWith(void Function(ExprContainsAny) updates) => super.copyWith((message) => updates(message as ExprContainsAny)) as ExprContainsAny; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static ExprContainsAny create() => ExprContainsAny._(); + ExprContainsAny createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static ExprContainsAny getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static ExprContainsAny? _defaultInstance; + + @$pb.TagNumber(1) + Expr get left => $_getN(0); + @$pb.TagNumber(1) + set left(Expr v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasLeft() => $_has(0); + @$pb.TagNumber(1) + void clearLeft() => clearField(1); + @$pb.TagNumber(1) + Expr ensureLeft() => $_ensure(0); + + @$pb.TagNumber(2) + Expr get right => $_getN(1); + @$pb.TagNumber(2) + set right(Expr v) { setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasRight() => $_has(1); + @$pb.TagNumber(2) + void clearRight() => clearField(2); + @$pb.TagNumber(2) + Expr ensureRight() => $_ensure(1); +} + +class ExprGetAttribute extends $pb.GeneratedMessage { + factory ExprGetAttribute({ + Expr? left, + $core.String? attr, + }) { + final $result = create(); + if (left != null) { + $result.left = left; + } + if (attr != null) { + $result.attr = attr; + } + return $result; + } + ExprGetAttribute._() : super(); + factory ExprGetAttribute.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ExprGetAttribute.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ExprGetAttribute', package: const $pb.PackageName(_omitMessageNames ? '' : 'cedar.v3'), createEmptyInstance: create) + ..aOM(1, _omitFieldNames ? '' : 'left', subBuilder: Expr.create) + ..aOS(2, _omitFieldNames ? '' : 'attr') + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + ExprGetAttribute clone() => ExprGetAttribute()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + ExprGetAttribute copyWith(void Function(ExprGetAttribute) updates) => super.copyWith((message) => updates(message as ExprGetAttribute)) as ExprGetAttribute; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static ExprGetAttribute create() => ExprGetAttribute._(); + ExprGetAttribute createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static ExprGetAttribute getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static ExprGetAttribute? _defaultInstance; + + @$pb.TagNumber(1) + Expr get left => $_getN(0); + @$pb.TagNumber(1) + set left(Expr v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasLeft() => $_has(0); + @$pb.TagNumber(1) + void clearLeft() => clearField(1); + @$pb.TagNumber(1) + Expr ensureLeft() => $_ensure(0); + + @$pb.TagNumber(2) + $core.String get attr => $_getSZ(1); + @$pb.TagNumber(2) + set attr($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasAttr() => $_has(1); + @$pb.TagNumber(2) + void clearAttr() => clearField(2); +} + +class ExprHasAttribute extends $pb.GeneratedMessage { + factory ExprHasAttribute({ + Expr? left, + $core.String? attr, + }) { + final $result = create(); + if (left != null) { + $result.left = left; + } + if (attr != null) { + $result.attr = attr; + } + return $result; + } + ExprHasAttribute._() : super(); + factory ExprHasAttribute.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ExprHasAttribute.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ExprHasAttribute', package: const $pb.PackageName(_omitMessageNames ? '' : 'cedar.v3'), createEmptyInstance: create) + ..aOM(1, _omitFieldNames ? '' : 'left', subBuilder: Expr.create) + ..aOS(2, _omitFieldNames ? '' : 'attr') + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + ExprHasAttribute clone() => ExprHasAttribute()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + ExprHasAttribute copyWith(void Function(ExprHasAttribute) updates) => super.copyWith((message) => updates(message as ExprHasAttribute)) as ExprHasAttribute; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static ExprHasAttribute create() => ExprHasAttribute._(); + ExprHasAttribute createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static ExprHasAttribute getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static ExprHasAttribute? _defaultInstance; + + @$pb.TagNumber(1) + Expr get left => $_getN(0); + @$pb.TagNumber(1) + set left(Expr v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasLeft() => $_has(0); + @$pb.TagNumber(1) + void clearLeft() => clearField(1); + @$pb.TagNumber(1) + Expr ensureLeft() => $_ensure(0); + + @$pb.TagNumber(2) + $core.String get attr => $_getSZ(1); + @$pb.TagNumber(2) + set attr($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasAttr() => $_has(1); + @$pb.TagNumber(2) + void clearAttr() => clearField(2); +} + +class ExprLike extends $pb.GeneratedMessage { + factory ExprLike({ + Expr? left, + $core.String? pattern, + }) { + final $result = create(); + if (left != null) { + $result.left = left; + } + if (pattern != null) { + $result.pattern = pattern; + } + return $result; + } + ExprLike._() : super(); + factory ExprLike.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ExprLike.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ExprLike', package: const $pb.PackageName(_omitMessageNames ? '' : 'cedar.v3'), createEmptyInstance: create) + ..aOM(1, _omitFieldNames ? '' : 'left', subBuilder: Expr.create) + ..aOS(2, _omitFieldNames ? '' : 'pattern') + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + ExprLike clone() => ExprLike()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + ExprLike copyWith(void Function(ExprLike) updates) => super.copyWith((message) => updates(message as ExprLike)) as ExprLike; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static ExprLike create() => ExprLike._(); + ExprLike createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static ExprLike getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static ExprLike? _defaultInstance; + + @$pb.TagNumber(1) + Expr get left => $_getN(0); + @$pb.TagNumber(1) + set left(Expr v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasLeft() => $_has(0); + @$pb.TagNumber(1) + void clearLeft() => clearField(1); + @$pb.TagNumber(1) + Expr ensureLeft() => $_ensure(0); + + @$pb.TagNumber(2) + $core.String get pattern => $_getSZ(1); + @$pb.TagNumber(2) + set pattern($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasPattern() => $_has(1); + @$pb.TagNumber(2) + void clearPattern() => clearField(2); +} + +class ExprIs extends $pb.GeneratedMessage { + factory ExprIs({ + Expr? left, + $core.String? entityType, + Expr? in_, + }) { + final $result = create(); + if (left != null) { + $result.left = left; + } + if (entityType != null) { + $result.entityType = entityType; + } + if (in_ != null) { + $result.in_ = in_; + } + return $result; + } + ExprIs._() : super(); + factory ExprIs.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ExprIs.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ExprIs', package: const $pb.PackageName(_omitMessageNames ? '' : 'cedar.v3'), createEmptyInstance: create) + ..aOM(1, _omitFieldNames ? '' : 'left', subBuilder: Expr.create) + ..aOS(2, _omitFieldNames ? '' : 'entityType') + ..aOM(3, _omitFieldNames ? '' : 'in', subBuilder: Expr.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') + ExprIs clone() => ExprIs()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + ExprIs copyWith(void Function(ExprIs) updates) => super.copyWith((message) => updates(message as ExprIs)) as ExprIs; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static ExprIs create() => ExprIs._(); + ExprIs createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static ExprIs getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static ExprIs? _defaultInstance; + + @$pb.TagNumber(1) + Expr get left => $_getN(0); + @$pb.TagNumber(1) + set left(Expr v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasLeft() => $_has(0); + @$pb.TagNumber(1) + void clearLeft() => clearField(1); + @$pb.TagNumber(1) + Expr ensureLeft() => $_ensure(0); + + @$pb.TagNumber(2) + $core.String get entityType => $_getSZ(1); + @$pb.TagNumber(2) + set entityType($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasEntityType() => $_has(1); + @$pb.TagNumber(2) + void clearEntityType() => clearField(2); + + @$pb.TagNumber(3) + Expr get in_ => $_getN(2); + @$pb.TagNumber(3) + set in_(Expr v) { setField(3, v); } + @$pb.TagNumber(3) + $core.bool hasIn_() => $_has(2); + @$pb.TagNumber(3) + void clearIn_() => clearField(3); + @$pb.TagNumber(3) + Expr ensureIn_() => $_ensure(2); +} + +class ExprIfThenElse extends $pb.GeneratedMessage { + factory ExprIfThenElse({ + Expr? if_, + Expr? then, + Expr? else_, + }) { + final $result = create(); + if (if_ != null) { + $result.if_ = if_; + } + if (then != null) { + $result.then = then; + } + if (else_ != null) { + $result.else_ = else_; + } + return $result; + } + ExprIfThenElse._() : super(); + factory ExprIfThenElse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ExprIfThenElse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ExprIfThenElse', package: const $pb.PackageName(_omitMessageNames ? '' : 'cedar.v3'), createEmptyInstance: create) + ..aOM(1, _omitFieldNames ? '' : 'if', subBuilder: Expr.create) + ..aOM(2, _omitFieldNames ? '' : 'then', subBuilder: Expr.create) + ..aOM(3, _omitFieldNames ? '' : 'else', subBuilder: Expr.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') + ExprIfThenElse clone() => ExprIfThenElse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + ExprIfThenElse copyWith(void Function(ExprIfThenElse) updates) => super.copyWith((message) => updates(message as ExprIfThenElse)) as ExprIfThenElse; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static ExprIfThenElse create() => ExprIfThenElse._(); + ExprIfThenElse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static ExprIfThenElse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static ExprIfThenElse? _defaultInstance; + + @$pb.TagNumber(1) + Expr get if_ => $_getN(0); + @$pb.TagNumber(1) + set if_(Expr v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasIf_() => $_has(0); + @$pb.TagNumber(1) + void clearIf_() => clearField(1); + @$pb.TagNumber(1) + Expr ensureIf_() => $_ensure(0); + + @$pb.TagNumber(2) + Expr get then => $_getN(1); + @$pb.TagNumber(2) + set then(Expr v) { setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasThen() => $_has(1); + @$pb.TagNumber(2) + void clearThen() => clearField(2); + @$pb.TagNumber(2) + Expr ensureThen() => $_ensure(1); + + @$pb.TagNumber(3) + Expr get else_ => $_getN(2); + @$pb.TagNumber(3) + set else_(Expr v) { setField(3, v); } + @$pb.TagNumber(3) + $core.bool hasElse_() => $_has(2); + @$pb.TagNumber(3) + void clearElse_() => clearField(3); + @$pb.TagNumber(3) + Expr ensureElse_() => $_ensure(2); +} + +class ExprSet extends $pb.GeneratedMessage { + factory ExprSet({ + $core.Iterable? expressions, + }) { + final $result = create(); + if (expressions != null) { + $result.expressions.addAll(expressions); + } + return $result; + } + ExprSet._() : super(); + factory ExprSet.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ExprSet.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ExprSet', package: const $pb.PackageName(_omitMessageNames ? '' : 'cedar.v3'), createEmptyInstance: create) + ..pc(1, _omitFieldNames ? '' : 'expressions', $pb.PbFieldType.PM, subBuilder: Expr.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') + ExprSet clone() => ExprSet()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + ExprSet copyWith(void Function(ExprSet) updates) => super.copyWith((message) => updates(message as ExprSet)) as ExprSet; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static ExprSet create() => ExprSet._(); + ExprSet createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static ExprSet getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static ExprSet? _defaultInstance; + + @$pb.TagNumber(1) + $core.List get expressions => $_getList(0); +} + +class ExprRecord extends $pb.GeneratedMessage { + factory ExprRecord({ + $core.Map<$core.String, Expr>? attributes, + }) { + final $result = create(); + if (attributes != null) { + $result.attributes.addAll(attributes); + } + return $result; + } + ExprRecord._() : super(); + factory ExprRecord.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ExprRecord.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ExprRecord', package: const $pb.PackageName(_omitMessageNames ? '' : 'cedar.v3'), createEmptyInstance: create) + ..m<$core.String, Expr>(1, _omitFieldNames ? '' : 'attributes', entryClassName: 'ExprRecord.AttributesEntry', keyFieldType: $pb.PbFieldType.OS, valueFieldType: $pb.PbFieldType.OM, valueCreator: Expr.create, valueDefaultOrMaker: Expr.getDefault, packageName: const $pb.PackageName('cedar.v3')) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + ExprRecord clone() => ExprRecord()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + ExprRecord copyWith(void Function(ExprRecord) updates) => super.copyWith((message) => updates(message as ExprRecord)) as ExprRecord; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static ExprRecord create() => ExprRecord._(); + ExprRecord createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static ExprRecord getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static ExprRecord? _defaultInstance; + + @$pb.TagNumber(1) + $core.Map<$core.String, Expr> get attributes => $_getMap(0); +} + +class ExprFuncCall extends $pb.GeneratedMessage { + factory ExprFuncCall({ + $core.String? fn, + $core.Iterable? args, + }) { + final $result = create(); + if (fn != null) { + $result.fn = fn; + } + if (args != null) { + $result.args.addAll(args); + } + return $result; + } + ExprFuncCall._() : super(); + factory ExprFuncCall.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ExprFuncCall.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ExprFuncCall', package: const $pb.PackageName(_omitMessageNames ? '' : 'cedar.v3'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'fn') + ..pc(2, _omitFieldNames ? '' : 'args', $pb.PbFieldType.PM, subBuilder: Expr.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') + ExprFuncCall clone() => ExprFuncCall()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + ExprFuncCall copyWith(void Function(ExprFuncCall) updates) => super.copyWith((message) => updates(message as ExprFuncCall)) as ExprFuncCall; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static ExprFuncCall create() => ExprFuncCall._(); + ExprFuncCall createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static ExprFuncCall getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static ExprFuncCall? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get fn => $_getSZ(0); + @$pb.TagNumber(1) + set fn($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasFn() => $_has(0); + @$pb.TagNumber(1) + void clearFn() => clearField(1); + + @$pb.TagNumber(2) + $core.List get args => $_getList(1); +} + + +const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); +const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/packages/corks/lib/src/proto/cedar/v3/expr.pbenum.dart b/packages/corks/lib/src/proto/cedar/v3/expr.pbenum.dart new file mode 100644 index 00000000..06035e2d --- /dev/null +++ b/packages/corks/lib/src/proto/cedar/v3/expr.pbenum.dart @@ -0,0 +1,55 @@ +// +// Generated code. Do not modify. +// source: cedar/v3/expr.proto +// +// @dart = 2.12 + +// 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 Variable extends $pb.ProtobufEnum { + static const Variable VARIABLE_UNSPECIFIED = Variable._(0, _omitEnumNames ? '' : 'VARIABLE_UNSPECIFIED'); + static const Variable VARIABLE_PRINCIPAL = Variable._(1, _omitEnumNames ? '' : 'VARIABLE_PRINCIPAL'); + static const Variable VARIABLE_ACTION = Variable._(2, _omitEnumNames ? '' : 'VARIABLE_ACTION'); + static const Variable VARIABLE_RESOURCE = Variable._(3, _omitEnumNames ? '' : 'VARIABLE_RESOURCE'); + static const Variable VARIABLE_CONTEXT = Variable._(4, _omitEnumNames ? '' : 'VARIABLE_CONTEXT'); + + static const $core.List values = [ + VARIABLE_UNSPECIFIED, + VARIABLE_PRINCIPAL, + VARIABLE_ACTION, + VARIABLE_RESOURCE, + VARIABLE_CONTEXT, + ]; + + static final $core.Map<$core.int, Variable> _byValue = $pb.ProtobufEnum.initByValue(values); + static Variable? valueOf($core.int value) => _byValue[value]; + + const Variable._($core.int v, $core.String n) : super(v, n); +} + +class SlotId extends $pb.ProtobufEnum { + static const SlotId SLOT_ID_UNSPECIFIED = SlotId._(0, _omitEnumNames ? '' : 'SLOT_ID_UNSPECIFIED'); + static const SlotId SLOT_ID_PRINCIPAL = SlotId._(1, _omitEnumNames ? '' : 'SLOT_ID_PRINCIPAL'); + static const SlotId SLOT_ID_RESOURCE = SlotId._(2, _omitEnumNames ? '' : 'SLOT_ID_RESOURCE'); + + static const $core.List values = [ + SLOT_ID_UNSPECIFIED, + SLOT_ID_PRINCIPAL, + SLOT_ID_RESOURCE, + ]; + + static final $core.Map<$core.int, SlotId> _byValue = $pb.ProtobufEnum.initByValue(values); + static SlotId? valueOf($core.int value) => _byValue[value]; + + const SlotId._($core.int v, $core.String n) : super(v, n); +} + + +const _omitEnumNames = $core.bool.fromEnvironment('protobuf.omit_enum_names'); diff --git a/packages/corks/lib/src/proto/cedar/v3/expr.pbjson.dart b/packages/corks/lib/src/proto/cedar/v3/expr.pbjson.dart new file mode 100644 index 00000000..f78334eb --- /dev/null +++ b/packages/corks/lib/src/proto/cedar/v3/expr.pbjson.dart @@ -0,0 +1,583 @@ +// +// Generated code. Do not modify. +// source: cedar/v3/expr.proto +// +// @dart = 2.12 + +// 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 variableDescriptor instead') +const Variable$json = { + '1': 'Variable', + '2': [ + {'1': 'VARIABLE_UNSPECIFIED', '2': 0}, + {'1': 'VARIABLE_PRINCIPAL', '2': 1}, + {'1': 'VARIABLE_ACTION', '2': 2}, + {'1': 'VARIABLE_RESOURCE', '2': 3}, + {'1': 'VARIABLE_CONTEXT', '2': 4}, + ], +}; + +/// Descriptor for `Variable`. Decode as a `google.protobuf.EnumDescriptorProto`. +final $typed_data.Uint8List variableDescriptor = $convert.base64Decode( + 'CghWYXJpYWJsZRIYChRWQVJJQUJMRV9VTlNQRUNJRklFRBAAEhYKElZBUklBQkxFX1BSSU5DSV' + 'BBTBABEhMKD1ZBUklBQkxFX0FDVElPThACEhUKEVZBUklBQkxFX1JFU09VUkNFEAMSFAoQVkFS' + 'SUFCTEVfQ09OVEVYVBAE'); + +@$core.Deprecated('Use slotIdDescriptor instead') +const SlotId$json = { + '1': 'SlotId', + '2': [ + {'1': 'SLOT_ID_UNSPECIFIED', '2': 0}, + {'1': 'SLOT_ID_PRINCIPAL', '2': 1}, + {'1': 'SLOT_ID_RESOURCE', '2': 2}, + ], +}; + +/// Descriptor for `SlotId`. Decode as a `google.protobuf.EnumDescriptorProto`. +final $typed_data.Uint8List slotIdDescriptor = $convert.base64Decode( + 'CgZTbG90SWQSFwoTU0xPVF9JRF9VTlNQRUNJRklFRBAAEhUKEVNMT1RfSURfUFJJTkNJUEFMEA' + 'ESFAoQU0xPVF9JRF9SRVNPVVJDRRAC'); + +@$core.Deprecated('Use exprDescriptor instead') +const Expr$json = { + '1': 'Expr', + '2': [ + {'1': 'value', '3': 1, '4': 1, '5': 11, '6': '.cedar.v3.ExprValue', '9': 0, '10': 'value'}, + { + '1': 'var', + '3': 2, + '4': 1, + '5': 11, + '6': '.cedar.v3.ExprVar', + '8': {'28700919': 'var_'}, + '9': 0, + '10': 'var', + }, + {'1': 'slot', '3': 3, '4': 1, '5': 11, '6': '.cedar.v3.ExprSlot', '9': 0, '10': 'slot'}, + {'1': 'unknown', '3': 4, '4': 1, '5': 11, '6': '.cedar.v3.ExprUnknown', '9': 0, '10': 'unknown'}, + {'1': 'not', '3': 5, '4': 1, '5': 11, '6': '.cedar.v3.ExprNot', '9': 0, '10': 'not'}, + {'1': 'neg', '3': 6, '4': 1, '5': 11, '6': '.cedar.v3.ExprNeg', '9': 0, '10': 'neg'}, + {'1': 'equals', '3': 7, '4': 1, '5': 11, '6': '.cedar.v3.ExprEquals', '9': 0, '10': 'equals'}, + {'1': 'not_equals', '3': 8, '4': 1, '5': 11, '6': '.cedar.v3.ExprNotEquals', '9': 0, '10': 'notEquals'}, + { + '1': 'in', + '3': 9, + '4': 1, + '5': 11, + '6': '.cedar.v3.ExprIn', + '8': {'28700919': 'in_'}, + '9': 0, + '10': 'in', + }, + {'1': 'less_than', '3': 10, '4': 1, '5': 11, '6': '.cedar.v3.ExprLessThan', '9': 0, '10': 'lessThan'}, + {'1': 'less_than_or_equals', '3': 11, '4': 1, '5': 11, '6': '.cedar.v3.ExprLessThanOrEquals', '9': 0, '10': 'lessThanOrEquals'}, + {'1': 'greater_than', '3': 12, '4': 1, '5': 11, '6': '.cedar.v3.ExprGreaterThan', '9': 0, '10': 'greaterThan'}, + {'1': 'greater_than_or_equals', '3': 13, '4': 1, '5': 11, '6': '.cedar.v3.ExprGreaterThanOrEquals', '9': 0, '10': 'greaterThanOrEquals'}, + {'1': 'and', '3': 14, '4': 1, '5': 11, '6': '.cedar.v3.ExprAnd', '9': 0, '10': 'and'}, + {'1': 'or', '3': 15, '4': 1, '5': 11, '6': '.cedar.v3.ExprOr', '9': 0, '10': 'or'}, + {'1': 'plus', '3': 16, '4': 1, '5': 11, '6': '.cedar.v3.ExprPlus', '9': 0, '10': 'plus'}, + {'1': 'minus', '3': 17, '4': 1, '5': 11, '6': '.cedar.v3.ExprMinus', '9': 0, '10': 'minus'}, + {'1': 'times', '3': 18, '4': 1, '5': 11, '6': '.cedar.v3.ExprTimes', '9': 0, '10': 'times'}, + {'1': 'contains', '3': 19, '4': 1, '5': 11, '6': '.cedar.v3.ExprContains', '9': 0, '10': 'contains'}, + {'1': 'contains_all', '3': 20, '4': 1, '5': 11, '6': '.cedar.v3.ExprContainsAll', '9': 0, '10': 'containsAll'}, + {'1': 'contains_any', '3': 21, '4': 1, '5': 11, '6': '.cedar.v3.ExprContainsAny', '9': 0, '10': 'containsAny'}, + {'1': 'get_attribute', '3': 22, '4': 1, '5': 11, '6': '.cedar.v3.ExprGetAttribute', '9': 0, '10': 'getAttribute'}, + {'1': 'has_attribute', '3': 23, '4': 1, '5': 11, '6': '.cedar.v3.ExprHasAttribute', '9': 0, '10': 'hasAttribute'}, + {'1': 'like', '3': 24, '4': 1, '5': 11, '6': '.cedar.v3.ExprLike', '9': 0, '10': 'like'}, + { + '1': 'is', + '3': 25, + '4': 1, + '5': 11, + '6': '.cedar.v3.ExprIs', + '8': {'28700919': 'is_'}, + '9': 0, + '10': 'is', + }, + {'1': 'if_then_else', '3': 26, '4': 1, '5': 11, '6': '.cedar.v3.ExprIfThenElse', '9': 0, '10': 'ifThenElse'}, + {'1': 'set', '3': 27, '4': 1, '5': 11, '6': '.cedar.v3.ExprSet', '9': 0, '10': 'set'}, + {'1': 'record', '3': 28, '4': 1, '5': 11, '6': '.cedar.v3.ExprRecord', '9': 0, '10': 'record'}, + {'1': 'func_call', '3': 29, '4': 1, '5': 11, '6': '.cedar.v3.ExprFuncCall', '9': 0, '10': 'funcCall'}, + ], + '8': [ + {'1': 'expr'}, + ], +}; + +/// Descriptor for `Expr`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List exprDescriptor = $convert.base64Decode( + 'CgRFeHByEisKBXZhbHVlGAEgASgLMhMuY2VkYXIudjMuRXhwclZhbHVlSABSBXZhbHVlEjAKA3' + 'ZhchgCIAEoCzIRLmNlZGFyLnYzLkV4cHJWYXJCCbqPvm0EdmFyX0gAUgN2YXISKAoEc2xvdBgD' + 'IAEoCzISLmNlZGFyLnYzLkV4cHJTbG90SABSBHNsb3QSMQoHdW5rbm93bhgEIAEoCzIVLmNlZG' + 'FyLnYzLkV4cHJVbmtub3duSABSB3Vua25vd24SJQoDbm90GAUgASgLMhEuY2VkYXIudjMuRXhw' + 'ck5vdEgAUgNub3QSJQoDbmVnGAYgASgLMhEuY2VkYXIudjMuRXhwck5lZ0gAUgNuZWcSLgoGZX' + 'F1YWxzGAcgASgLMhQuY2VkYXIudjMuRXhwckVxdWFsc0gAUgZlcXVhbHMSOAoKbm90X2VxdWFs' + 'cxgIIAEoCzIXLmNlZGFyLnYzLkV4cHJOb3RFcXVhbHNIAFIJbm90RXF1YWxzEiwKAmluGAkgAS' + 'gLMhAuY2VkYXIudjMuRXhwckluQgi6j75tA2luX0gAUgJpbhI1CglsZXNzX3RoYW4YCiABKAsy' + 'Fi5jZWRhci52My5FeHByTGVzc1RoYW5IAFIIbGVzc1RoYW4STwoTbGVzc190aGFuX29yX2VxdW' + 'FscxgLIAEoCzIeLmNlZGFyLnYzLkV4cHJMZXNzVGhhbk9yRXF1YWxzSABSEGxlc3NUaGFuT3JF' + 'cXVhbHMSPgoMZ3JlYXRlcl90aGFuGAwgASgLMhkuY2VkYXIudjMuRXhwckdyZWF0ZXJUaGFuSA' + 'BSC2dyZWF0ZXJUaGFuElgKFmdyZWF0ZXJfdGhhbl9vcl9lcXVhbHMYDSABKAsyIS5jZWRhci52' + 'My5FeHByR3JlYXRlclRoYW5PckVxdWFsc0gAUhNncmVhdGVyVGhhbk9yRXF1YWxzEiUKA2FuZB' + 'gOIAEoCzIRLmNlZGFyLnYzLkV4cHJBbmRIAFIDYW5kEiIKAm9yGA8gASgLMhAuY2VkYXIudjMu' + 'RXhwck9ySABSAm9yEigKBHBsdXMYECABKAsyEi5jZWRhci52My5FeHByUGx1c0gAUgRwbHVzEi' + 'sKBW1pbnVzGBEgASgLMhMuY2VkYXIudjMuRXhwck1pbnVzSABSBW1pbnVzEisKBXRpbWVzGBIg' + 'ASgLMhMuY2VkYXIudjMuRXhwclRpbWVzSABSBXRpbWVzEjQKCGNvbnRhaW5zGBMgASgLMhYuY2' + 'VkYXIudjMuRXhwckNvbnRhaW5zSABSCGNvbnRhaW5zEj4KDGNvbnRhaW5zX2FsbBgUIAEoCzIZ' + 'LmNlZGFyLnYzLkV4cHJDb250YWluc0FsbEgAUgtjb250YWluc0FsbBI+Cgxjb250YWluc19hbn' + 'kYFSABKAsyGS5jZWRhci52My5FeHByQ29udGFpbnNBbnlIAFILY29udGFpbnNBbnkSQQoNZ2V0' + 'X2F0dHJpYnV0ZRgWIAEoCzIaLmNlZGFyLnYzLkV4cHJHZXRBdHRyaWJ1dGVIAFIMZ2V0QXR0cm' + 'lidXRlEkEKDWhhc19hdHRyaWJ1dGUYFyABKAsyGi5jZWRhci52My5FeHBySGFzQXR0cmlidXRl' + 'SABSDGhhc0F0dHJpYnV0ZRIoCgRsaWtlGBggASgLMhIuY2VkYXIudjMuRXhwckxpa2VIAFIEbG' + 'lrZRIsCgJpcxgZIAEoCzIQLmNlZGFyLnYzLkV4cHJJc0IIuo++bQNpc19IAFICaXMSPAoMaWZf' + 'dGhlbl9lbHNlGBogASgLMhguY2VkYXIudjMuRXhwcklmVGhlbkVsc2VIAFIKaWZUaGVuRWxzZR' + 'IlCgNzZXQYGyABKAsyES5jZWRhci52My5FeHByU2V0SABSA3NldBIuCgZyZWNvcmQYHCABKAsy' + 'FC5jZWRhci52My5FeHByUmVjb3JkSABSBnJlY29yZBI1CglmdW5jX2NhbGwYHSABKAsyFi5jZW' + 'Rhci52My5FeHByRnVuY0NhbGxIAFIIZnVuY0NhbGxCBgoEZXhwcg=='); + +@$core.Deprecated('Use exprValueDescriptor instead') +const ExprValue$json = { + '1': 'ExprValue', + '2': [ + {'1': 'value', '3': 1, '4': 1, '5': 11, '6': '.cedar.v3.Value', '10': 'value'}, + ], +}; + +/// Descriptor for `ExprValue`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List exprValueDescriptor = $convert.base64Decode( + 'CglFeHByVmFsdWUSJQoFdmFsdWUYASABKAsyDy5jZWRhci52My5WYWx1ZVIFdmFsdWU='); + +@$core.Deprecated('Use exprVarDescriptor instead') +const ExprVar$json = { + '1': 'ExprVar', + '2': [ + {'1': 'variable', '3': 1, '4': 1, '5': 14, '6': '.cedar.v3.Variable', '10': 'variable'}, + ], +}; + +/// Descriptor for `ExprVar`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List exprVarDescriptor = $convert.base64Decode( + 'CgdFeHByVmFyEi4KCHZhcmlhYmxlGAEgASgOMhIuY2VkYXIudjMuVmFyaWFibGVSCHZhcmlhYm' + 'xl'); + +@$core.Deprecated('Use exprSlotDescriptor instead') +const ExprSlot$json = { + '1': 'ExprSlot', + '2': [ + {'1': 'slot_id', '3': 1, '4': 1, '5': 14, '6': '.cedar.v3.SlotId', '10': 'slotId'}, + ], +}; + +/// Descriptor for `ExprSlot`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List exprSlotDescriptor = $convert.base64Decode( + 'CghFeHByU2xvdBIpCgdzbG90X2lkGAEgASgOMhAuY2VkYXIudjMuU2xvdElkUgZzbG90SWQ='); + +@$core.Deprecated('Use exprUnknownDescriptor instead') +const ExprUnknown$json = { + '1': 'ExprUnknown', + '2': [ + {'1': 'name', '3': 1, '4': 1, '5': 9, '10': 'name'}, + ], +}; + +/// Descriptor for `ExprUnknown`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List exprUnknownDescriptor = $convert.base64Decode( + 'CgtFeHByVW5rbm93bhISCgRuYW1lGAEgASgJUgRuYW1l'); + +@$core.Deprecated('Use exprNotDescriptor instead') +const ExprNot$json = { + '1': 'ExprNot', + '2': [ + {'1': 'expr', '3': 1, '4': 1, '5': 11, '6': '.cedar.v3.Expr', '10': 'expr'}, + ], +}; + +/// Descriptor for `ExprNot`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List exprNotDescriptor = $convert.base64Decode( + 'CgdFeHByTm90EiIKBGV4cHIYASABKAsyDi5jZWRhci52My5FeHByUgRleHBy'); + +@$core.Deprecated('Use exprNegDescriptor instead') +const ExprNeg$json = { + '1': 'ExprNeg', + '2': [ + {'1': 'expr', '3': 1, '4': 1, '5': 11, '6': '.cedar.v3.Expr', '10': 'expr'}, + ], +}; + +/// Descriptor for `ExprNeg`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List exprNegDescriptor = $convert.base64Decode( + 'CgdFeHByTmVnEiIKBGV4cHIYASABKAsyDi5jZWRhci52My5FeHByUgRleHBy'); + +@$core.Deprecated('Use exprEqualsDescriptor instead') +const ExprEquals$json = { + '1': 'ExprEquals', + '2': [ + {'1': 'left', '3': 1, '4': 1, '5': 11, '6': '.cedar.v3.Expr', '10': 'left'}, + {'1': 'right', '3': 2, '4': 1, '5': 11, '6': '.cedar.v3.Expr', '10': 'right'}, + ], +}; + +/// Descriptor for `ExprEquals`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List exprEqualsDescriptor = $convert.base64Decode( + 'CgpFeHByRXF1YWxzEiIKBGxlZnQYASABKAsyDi5jZWRhci52My5FeHByUgRsZWZ0EiQKBXJpZ2' + 'h0GAIgASgLMg4uY2VkYXIudjMuRXhwclIFcmlnaHQ='); + +@$core.Deprecated('Use exprNotEqualsDescriptor instead') +const ExprNotEquals$json = { + '1': 'ExprNotEquals', + '2': [ + {'1': 'left', '3': 1, '4': 1, '5': 11, '6': '.cedar.v3.Expr', '10': 'left'}, + {'1': 'right', '3': 2, '4': 1, '5': 11, '6': '.cedar.v3.Expr', '10': 'right'}, + ], +}; + +/// Descriptor for `ExprNotEquals`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List exprNotEqualsDescriptor = $convert.base64Decode( + 'Cg1FeHByTm90RXF1YWxzEiIKBGxlZnQYASABKAsyDi5jZWRhci52My5FeHByUgRsZWZ0EiQKBX' + 'JpZ2h0GAIgASgLMg4uY2VkYXIudjMuRXhwclIFcmlnaHQ='); + +@$core.Deprecated('Use exprInDescriptor instead') +const ExprIn$json = { + '1': 'ExprIn', + '2': [ + {'1': 'left', '3': 1, '4': 1, '5': 11, '6': '.cedar.v3.Expr', '10': 'left'}, + {'1': 'right', '3': 2, '4': 1, '5': 11, '6': '.cedar.v3.Expr', '10': 'right'}, + ], +}; + +/// Descriptor for `ExprIn`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List exprInDescriptor = $convert.base64Decode( + 'CgZFeHBySW4SIgoEbGVmdBgBIAEoCzIOLmNlZGFyLnYzLkV4cHJSBGxlZnQSJAoFcmlnaHQYAi' + 'ABKAsyDi5jZWRhci52My5FeHByUgVyaWdodA=='); + +@$core.Deprecated('Use exprLessThanDescriptor instead') +const ExprLessThan$json = { + '1': 'ExprLessThan', + '2': [ + {'1': 'left', '3': 1, '4': 1, '5': 11, '6': '.cedar.v3.Expr', '10': 'left'}, + {'1': 'right', '3': 2, '4': 1, '5': 11, '6': '.cedar.v3.Expr', '10': 'right'}, + ], +}; + +/// Descriptor for `ExprLessThan`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List exprLessThanDescriptor = $convert.base64Decode( + 'CgxFeHByTGVzc1RoYW4SIgoEbGVmdBgBIAEoCzIOLmNlZGFyLnYzLkV4cHJSBGxlZnQSJAoFcm' + 'lnaHQYAiABKAsyDi5jZWRhci52My5FeHByUgVyaWdodA=='); + +@$core.Deprecated('Use exprLessThanOrEqualsDescriptor instead') +const ExprLessThanOrEquals$json = { + '1': 'ExprLessThanOrEquals', + '2': [ + {'1': 'left', '3': 1, '4': 1, '5': 11, '6': '.cedar.v3.Expr', '10': 'left'}, + {'1': 'right', '3': 2, '4': 1, '5': 11, '6': '.cedar.v3.Expr', '10': 'right'}, + ], +}; + +/// Descriptor for `ExprLessThanOrEquals`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List exprLessThanOrEqualsDescriptor = $convert.base64Decode( + 'ChRFeHByTGVzc1RoYW5PckVxdWFscxIiCgRsZWZ0GAEgASgLMg4uY2VkYXIudjMuRXhwclIEbG' + 'VmdBIkCgVyaWdodBgCIAEoCzIOLmNlZGFyLnYzLkV4cHJSBXJpZ2h0'); + +@$core.Deprecated('Use exprGreaterThanDescriptor instead') +const ExprGreaterThan$json = { + '1': 'ExprGreaterThan', + '2': [ + {'1': 'left', '3': 1, '4': 1, '5': 11, '6': '.cedar.v3.Expr', '10': 'left'}, + {'1': 'right', '3': 2, '4': 1, '5': 11, '6': '.cedar.v3.Expr', '10': 'right'}, + ], +}; + +/// Descriptor for `ExprGreaterThan`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List exprGreaterThanDescriptor = $convert.base64Decode( + 'Cg9FeHByR3JlYXRlclRoYW4SIgoEbGVmdBgBIAEoCzIOLmNlZGFyLnYzLkV4cHJSBGxlZnQSJA' + 'oFcmlnaHQYAiABKAsyDi5jZWRhci52My5FeHByUgVyaWdodA=='); + +@$core.Deprecated('Use exprGreaterThanOrEqualsDescriptor instead') +const ExprGreaterThanOrEquals$json = { + '1': 'ExprGreaterThanOrEquals', + '2': [ + {'1': 'left', '3': 1, '4': 1, '5': 11, '6': '.cedar.v3.Expr', '10': 'left'}, + {'1': 'right', '3': 2, '4': 1, '5': 11, '6': '.cedar.v3.Expr', '10': 'right'}, + ], +}; + +/// Descriptor for `ExprGreaterThanOrEquals`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List exprGreaterThanOrEqualsDescriptor = $convert.base64Decode( + 'ChdFeHByR3JlYXRlclRoYW5PckVxdWFscxIiCgRsZWZ0GAEgASgLMg4uY2VkYXIudjMuRXhwcl' + 'IEbGVmdBIkCgVyaWdodBgCIAEoCzIOLmNlZGFyLnYzLkV4cHJSBXJpZ2h0'); + +@$core.Deprecated('Use exprAndDescriptor instead') +const ExprAnd$json = { + '1': 'ExprAnd', + '2': [ + {'1': 'left', '3': 1, '4': 1, '5': 11, '6': '.cedar.v3.Expr', '10': 'left'}, + {'1': 'right', '3': 2, '4': 1, '5': 11, '6': '.cedar.v3.Expr', '10': 'right'}, + ], +}; + +/// Descriptor for `ExprAnd`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List exprAndDescriptor = $convert.base64Decode( + 'CgdFeHByQW5kEiIKBGxlZnQYASABKAsyDi5jZWRhci52My5FeHByUgRsZWZ0EiQKBXJpZ2h0GA' + 'IgASgLMg4uY2VkYXIudjMuRXhwclIFcmlnaHQ='); + +@$core.Deprecated('Use exprOrDescriptor instead') +const ExprOr$json = { + '1': 'ExprOr', + '2': [ + {'1': 'left', '3': 1, '4': 1, '5': 11, '6': '.cedar.v3.Expr', '10': 'left'}, + {'1': 'right', '3': 2, '4': 1, '5': 11, '6': '.cedar.v3.Expr', '10': 'right'}, + ], +}; + +/// Descriptor for `ExprOr`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List exprOrDescriptor = $convert.base64Decode( + 'CgZFeHByT3ISIgoEbGVmdBgBIAEoCzIOLmNlZGFyLnYzLkV4cHJSBGxlZnQSJAoFcmlnaHQYAi' + 'ABKAsyDi5jZWRhci52My5FeHByUgVyaWdodA=='); + +@$core.Deprecated('Use exprPlusDescriptor instead') +const ExprPlus$json = { + '1': 'ExprPlus', + '2': [ + {'1': 'left', '3': 1, '4': 1, '5': 11, '6': '.cedar.v3.Expr', '10': 'left'}, + {'1': 'right', '3': 2, '4': 1, '5': 11, '6': '.cedar.v3.Expr', '10': 'right'}, + ], +}; + +/// Descriptor for `ExprPlus`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List exprPlusDescriptor = $convert.base64Decode( + 'CghFeHByUGx1cxIiCgRsZWZ0GAEgASgLMg4uY2VkYXIudjMuRXhwclIEbGVmdBIkCgVyaWdodB' + 'gCIAEoCzIOLmNlZGFyLnYzLkV4cHJSBXJpZ2h0'); + +@$core.Deprecated('Use exprMinusDescriptor instead') +const ExprMinus$json = { + '1': 'ExprMinus', + '2': [ + {'1': 'left', '3': 1, '4': 1, '5': 11, '6': '.cedar.v3.Expr', '10': 'left'}, + {'1': 'right', '3': 2, '4': 1, '5': 11, '6': '.cedar.v3.Expr', '10': 'right'}, + ], +}; + +/// Descriptor for `ExprMinus`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List exprMinusDescriptor = $convert.base64Decode( + 'CglFeHByTWludXMSIgoEbGVmdBgBIAEoCzIOLmNlZGFyLnYzLkV4cHJSBGxlZnQSJAoFcmlnaH' + 'QYAiABKAsyDi5jZWRhci52My5FeHByUgVyaWdodA=='); + +@$core.Deprecated('Use exprTimesDescriptor instead') +const ExprTimes$json = { + '1': 'ExprTimes', + '2': [ + {'1': 'left', '3': 1, '4': 1, '5': 11, '6': '.cedar.v3.Expr', '10': 'left'}, + {'1': 'right', '3': 2, '4': 1, '5': 11, '6': '.cedar.v3.Expr', '10': 'right'}, + ], +}; + +/// Descriptor for `ExprTimes`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List exprTimesDescriptor = $convert.base64Decode( + 'CglFeHByVGltZXMSIgoEbGVmdBgBIAEoCzIOLmNlZGFyLnYzLkV4cHJSBGxlZnQSJAoFcmlnaH' + 'QYAiABKAsyDi5jZWRhci52My5FeHByUgVyaWdodA=='); + +@$core.Deprecated('Use exprContainsDescriptor instead') +const ExprContains$json = { + '1': 'ExprContains', + '2': [ + {'1': 'left', '3': 1, '4': 1, '5': 11, '6': '.cedar.v3.Expr', '10': 'left'}, + {'1': 'right', '3': 2, '4': 1, '5': 11, '6': '.cedar.v3.Expr', '10': 'right'}, + ], +}; + +/// Descriptor for `ExprContains`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List exprContainsDescriptor = $convert.base64Decode( + 'CgxFeHByQ29udGFpbnMSIgoEbGVmdBgBIAEoCzIOLmNlZGFyLnYzLkV4cHJSBGxlZnQSJAoFcm' + 'lnaHQYAiABKAsyDi5jZWRhci52My5FeHByUgVyaWdodA=='); + +@$core.Deprecated('Use exprContainsAllDescriptor instead') +const ExprContainsAll$json = { + '1': 'ExprContainsAll', + '2': [ + {'1': 'left', '3': 1, '4': 1, '5': 11, '6': '.cedar.v3.Expr', '10': 'left'}, + {'1': 'right', '3': 2, '4': 1, '5': 11, '6': '.cedar.v3.Expr', '10': 'right'}, + ], +}; + +/// Descriptor for `ExprContainsAll`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List exprContainsAllDescriptor = $convert.base64Decode( + 'Cg9FeHByQ29udGFpbnNBbGwSIgoEbGVmdBgBIAEoCzIOLmNlZGFyLnYzLkV4cHJSBGxlZnQSJA' + 'oFcmlnaHQYAiABKAsyDi5jZWRhci52My5FeHByUgVyaWdodA=='); + +@$core.Deprecated('Use exprContainsAnyDescriptor instead') +const ExprContainsAny$json = { + '1': 'ExprContainsAny', + '2': [ + {'1': 'left', '3': 1, '4': 1, '5': 11, '6': '.cedar.v3.Expr', '10': 'left'}, + {'1': 'right', '3': 2, '4': 1, '5': 11, '6': '.cedar.v3.Expr', '10': 'right'}, + ], +}; + +/// Descriptor for `ExprContainsAny`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List exprContainsAnyDescriptor = $convert.base64Decode( + 'Cg9FeHByQ29udGFpbnNBbnkSIgoEbGVmdBgBIAEoCzIOLmNlZGFyLnYzLkV4cHJSBGxlZnQSJA' + 'oFcmlnaHQYAiABKAsyDi5jZWRhci52My5FeHByUgVyaWdodA=='); + +@$core.Deprecated('Use exprGetAttributeDescriptor instead') +const ExprGetAttribute$json = { + '1': 'ExprGetAttribute', + '2': [ + {'1': 'left', '3': 1, '4': 1, '5': 11, '6': '.cedar.v3.Expr', '10': 'left'}, + {'1': 'attr', '3': 2, '4': 1, '5': 9, '10': 'attr'}, + ], +}; + +/// Descriptor for `ExprGetAttribute`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List exprGetAttributeDescriptor = $convert.base64Decode( + 'ChBFeHByR2V0QXR0cmlidXRlEiIKBGxlZnQYASABKAsyDi5jZWRhci52My5FeHByUgRsZWZ0Eh' + 'IKBGF0dHIYAiABKAlSBGF0dHI='); + +@$core.Deprecated('Use exprHasAttributeDescriptor instead') +const ExprHasAttribute$json = { + '1': 'ExprHasAttribute', + '2': [ + {'1': 'left', '3': 1, '4': 1, '5': 11, '6': '.cedar.v3.Expr', '10': 'left'}, + {'1': 'attr', '3': 2, '4': 1, '5': 9, '10': 'attr'}, + ], +}; + +/// Descriptor for `ExprHasAttribute`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List exprHasAttributeDescriptor = $convert.base64Decode( + 'ChBFeHBySGFzQXR0cmlidXRlEiIKBGxlZnQYASABKAsyDi5jZWRhci52My5FeHByUgRsZWZ0Eh' + 'IKBGF0dHIYAiABKAlSBGF0dHI='); + +@$core.Deprecated('Use exprLikeDescriptor instead') +const ExprLike$json = { + '1': 'ExprLike', + '2': [ + {'1': 'left', '3': 1, '4': 1, '5': 11, '6': '.cedar.v3.Expr', '10': 'left'}, + {'1': 'pattern', '3': 2, '4': 1, '5': 9, '10': 'pattern'}, + ], +}; + +/// Descriptor for `ExprLike`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List exprLikeDescriptor = $convert.base64Decode( + 'CghFeHByTGlrZRIiCgRsZWZ0GAEgASgLMg4uY2VkYXIudjMuRXhwclIEbGVmdBIYCgdwYXR0ZX' + 'JuGAIgASgJUgdwYXR0ZXJu'); + +@$core.Deprecated('Use exprIsDescriptor instead') +const ExprIs$json = { + '1': 'ExprIs', + '2': [ + {'1': 'left', '3': 1, '4': 1, '5': 11, '6': '.cedar.v3.Expr', '10': 'left'}, + {'1': 'entity_type', '3': 2, '4': 1, '5': 9, '10': 'entityType'}, + { + '1': 'in', + '3': 3, + '4': 1, + '5': 11, + '6': '.cedar.v3.Expr', + '8': {'28700919': 'in_'}, + '9': 0, + '10': 'in', + '17': true, + }, + ], + '8': [ + {'1': '_in'}, + ], +}; + +/// Descriptor for `ExprIs`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List exprIsDescriptor = $convert.base64Decode( + 'CgZFeHBySXMSIgoEbGVmdBgBIAEoCzIOLmNlZGFyLnYzLkV4cHJSBGxlZnQSHwoLZW50aXR5X3' + 'R5cGUYAiABKAlSCmVudGl0eVR5cGUSLQoCaW4YAyABKAsyDi5jZWRhci52My5FeHByQgi6j75t' + 'A2luX0gAUgJpbogBAUIFCgNfaW4='); + +@$core.Deprecated('Use exprIfThenElseDescriptor instead') +const ExprIfThenElse$json = { + '1': 'ExprIfThenElse', + '2': [ + { + '1': 'if', + '3': 1, + '4': 1, + '5': 11, + '6': '.cedar.v3.Expr', + '8': {'28700919': 'if_'}, + '10': 'if', + }, + {'1': 'then', '3': 2, '4': 1, '5': 11, '6': '.cedar.v3.Expr', '10': 'then'}, + { + '1': 'else', + '3': 3, + '4': 1, + '5': 11, + '6': '.cedar.v3.Expr', + '8': {'28700919': 'else_'}, + '10': 'else', + }, + ], +}; + +/// Descriptor for `ExprIfThenElse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List exprIfThenElseDescriptor = $convert.base64Decode( + 'Cg5FeHBySWZUaGVuRWxzZRIoCgJpZhgBIAEoCzIOLmNlZGFyLnYzLkV4cHJCCLqPvm0DaWZfUg' + 'JpZhIiCgR0aGVuGAIgASgLMg4uY2VkYXIudjMuRXhwclIEdGhlbhIuCgRlbHNlGAMgASgLMg4u' + 'Y2VkYXIudjMuRXhwckIKuo++bQVlbHNlX1IEZWxzZQ=='); + +@$core.Deprecated('Use exprSetDescriptor instead') +const ExprSet$json = { + '1': 'ExprSet', + '2': [ + {'1': 'expressions', '3': 1, '4': 3, '5': 11, '6': '.cedar.v3.Expr', '10': 'expressions'}, + ], +}; + +/// Descriptor for `ExprSet`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List exprSetDescriptor = $convert.base64Decode( + 'CgdFeHByU2V0EjAKC2V4cHJlc3Npb25zGAEgAygLMg4uY2VkYXIudjMuRXhwclILZXhwcmVzc2' + 'lvbnM='); + +@$core.Deprecated('Use exprRecordDescriptor instead') +const ExprRecord$json = { + '1': 'ExprRecord', + '2': [ + {'1': 'attributes', '3': 1, '4': 3, '5': 11, '6': '.cedar.v3.ExprRecord.AttributesEntry', '10': 'attributes'}, + ], + '3': [ExprRecord_AttributesEntry$json], +}; + +@$core.Deprecated('Use exprRecordDescriptor instead') +const ExprRecord_AttributesEntry$json = { + '1': 'AttributesEntry', + '2': [ + {'1': 'key', '3': 1, '4': 1, '5': 9, '10': 'key'}, + {'1': 'value', '3': 2, '4': 1, '5': 11, '6': '.cedar.v3.Expr', '10': 'value'}, + ], + '7': {'7': true}, +}; + +/// Descriptor for `ExprRecord`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List exprRecordDescriptor = $convert.base64Decode( + 'CgpFeHByUmVjb3JkEkQKCmF0dHJpYnV0ZXMYASADKAsyJC5jZWRhci52My5FeHByUmVjb3JkLk' + 'F0dHJpYnV0ZXNFbnRyeVIKYXR0cmlidXRlcxpNCg9BdHRyaWJ1dGVzRW50cnkSEAoDa2V5GAEg' + 'ASgJUgNrZXkSJAoFdmFsdWUYAiABKAsyDi5jZWRhci52My5FeHByUgV2YWx1ZToCOAE='); + +@$core.Deprecated('Use exprFuncCallDescriptor instead') +const ExprFuncCall$json = { + '1': 'ExprFuncCall', + '2': [ + {'1': 'fn', '3': 1, '4': 1, '5': 9, '10': 'fn'}, + {'1': 'args', '3': 2, '4': 3, '5': 11, '6': '.cedar.v3.Expr', '10': 'args'}, + ], +}; + +/// Descriptor for `ExprFuncCall`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List exprFuncCallDescriptor = $convert.base64Decode( + 'CgxFeHByRnVuY0NhbGwSDgoCZm4YASABKAlSAmZuEiIKBGFyZ3MYAiADKAsyDi5jZWRhci52My' + '5FeHByUgRhcmdz'); + diff --git a/packages/corks/lib/src/proto/cedar/v3/expr.pbserver.dart b/packages/corks/lib/src/proto/cedar/v3/expr.pbserver.dart new file mode 100644 index 00000000..9b92c137 --- /dev/null +++ b/packages/corks/lib/src/proto/cedar/v3/expr.pbserver.dart @@ -0,0 +1,14 @@ +// +// Generated code. Do not modify. +// source: cedar/v3/expr.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +export 'expr.pb.dart'; + diff --git a/packages/corks/lib/src/proto/cedar/v3/policy.pb.dart b/packages/corks/lib/src/proto/cedar/v3/policy.pb.dart new file mode 100644 index 00000000..06805e0a --- /dev/null +++ b/packages/corks/lib/src/proto/cedar/v3/policy.pb.dart @@ -0,0 +1,452 @@ +// +// Generated code. Do not modify. +// source: cedar/v3/policy.proto +// +// @dart = 2.12 + +// 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 'entity_id.pb.dart' as $0; +import 'expr.pb.dart' as $3; +import 'policy.pbenum.dart'; + +export 'policy.pbenum.dart'; + +class Policy extends $pb.GeneratedMessage { + factory Policy({ + $core.String? id, + PolicyEffect? effect, + PolicyPrincipal? principal, + PolicyAction? action, + PolicyResource? resource, + $core.Iterable? conditions, + $core.Map<$core.String, $core.String>? annotations, + }) { + final $result = create(); + if (id != null) { + $result.id = id; + } + if (effect != null) { + $result.effect = effect; + } + if (principal != null) { + $result.principal = principal; + } + if (action != null) { + $result.action = action; + } + if (resource != null) { + $result.resource = resource; + } + if (conditions != null) { + $result.conditions.addAll(conditions); + } + if (annotations != null) { + $result.annotations.addAll(annotations); + } + return $result; + } + Policy._() : super(); + factory Policy.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory Policy.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Policy', package: const $pb.PackageName(_omitMessageNames ? '' : 'cedar.v3'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'id') + ..e(2, _omitFieldNames ? '' : 'effect', $pb.PbFieldType.OE, defaultOrMaker: PolicyEffect.POLICY_EFFECT_UNSPECIFIED, valueOf: PolicyEffect.valueOf, enumValues: PolicyEffect.values) + ..aOM(3, _omitFieldNames ? '' : 'principal', subBuilder: PolicyPrincipal.create) + ..aOM(4, _omitFieldNames ? '' : 'action', subBuilder: PolicyAction.create) + ..aOM(5, _omitFieldNames ? '' : 'resource', subBuilder: PolicyResource.create) + ..pc(6, _omitFieldNames ? '' : 'conditions', $pb.PbFieldType.PM, subBuilder: PolicyCondition.create) + ..m<$core.String, $core.String>(7, _omitFieldNames ? '' : 'annotations', entryClassName: 'Policy.AnnotationsEntry', keyFieldType: $pb.PbFieldType.OS, valueFieldType: $pb.PbFieldType.OS, packageName: const $pb.PackageName('cedar.v3')) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + Policy clone() => Policy()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + Policy copyWith(void Function(Policy) updates) => super.copyWith((message) => updates(message as Policy)) as Policy; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static Policy create() => Policy._(); + Policy createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static Policy getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static Policy? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get id => $_getSZ(0); + @$pb.TagNumber(1) + set id($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasId() => $_has(0); + @$pb.TagNumber(1) + void clearId() => clearField(1); + + @$pb.TagNumber(2) + PolicyEffect get effect => $_getN(1); + @$pb.TagNumber(2) + set effect(PolicyEffect v) { setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasEffect() => $_has(1); + @$pb.TagNumber(2) + void clearEffect() => clearField(2); + + @$pb.TagNumber(3) + PolicyPrincipal get principal => $_getN(2); + @$pb.TagNumber(3) + set principal(PolicyPrincipal v) { setField(3, v); } + @$pb.TagNumber(3) + $core.bool hasPrincipal() => $_has(2); + @$pb.TagNumber(3) + void clearPrincipal() => clearField(3); + @$pb.TagNumber(3) + PolicyPrincipal ensurePrincipal() => $_ensure(2); + + @$pb.TagNumber(4) + PolicyAction get action => $_getN(3); + @$pb.TagNumber(4) + set action(PolicyAction v) { setField(4, v); } + @$pb.TagNumber(4) + $core.bool hasAction() => $_has(3); + @$pb.TagNumber(4) + void clearAction() => clearField(4); + @$pb.TagNumber(4) + PolicyAction ensureAction() => $_ensure(3); + + @$pb.TagNumber(5) + PolicyResource get resource => $_getN(4); + @$pb.TagNumber(5) + set resource(PolicyResource v) { setField(5, v); } + @$pb.TagNumber(5) + $core.bool hasResource() => $_has(4); + @$pb.TagNumber(5) + void clearResource() => clearField(5); + @$pb.TagNumber(5) + PolicyResource ensureResource() => $_ensure(4); + + @$pb.TagNumber(6) + $core.List get conditions => $_getList(5); + + @$pb.TagNumber(7) + $core.Map<$core.String, $core.String> get annotations => $_getMap(6); +} + +class PolicyPrincipal extends $pb.GeneratedMessage { + factory PolicyPrincipal({ + PolicyOp? op, + $0.EntityId? entity, + $core.String? entityType, + }) { + final $result = create(); + if (op != null) { + $result.op = op; + } + if (entity != null) { + $result.entity = entity; + } + if (entityType != null) { + $result.entityType = entityType; + } + return $result; + } + PolicyPrincipal._() : super(); + factory PolicyPrincipal.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory PolicyPrincipal.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'PolicyPrincipal', package: const $pb.PackageName(_omitMessageNames ? '' : 'cedar.v3'), createEmptyInstance: create) + ..e(1, _omitFieldNames ? '' : 'op', $pb.PbFieldType.OE, defaultOrMaker: PolicyOp.POLICY_OP_UNSPECIFIED, valueOf: PolicyOp.valueOf, enumValues: PolicyOp.values) + ..aOM<$0.EntityId>(2, _omitFieldNames ? '' : 'entity', subBuilder: $0.EntityId.create) + ..aOS(3, _omitFieldNames ? '' : 'entityType') + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + PolicyPrincipal clone() => PolicyPrincipal()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + PolicyPrincipal copyWith(void Function(PolicyPrincipal) updates) => super.copyWith((message) => updates(message as PolicyPrincipal)) as PolicyPrincipal; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static PolicyPrincipal create() => PolicyPrincipal._(); + PolicyPrincipal createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static PolicyPrincipal getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static PolicyPrincipal? _defaultInstance; + + @$pb.TagNumber(1) + PolicyOp get op => $_getN(0); + @$pb.TagNumber(1) + set op(PolicyOp v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasOp() => $_has(0); + @$pb.TagNumber(1) + void clearOp() => clearField(1); + + @$pb.TagNumber(2) + $0.EntityId get entity => $_getN(1); + @$pb.TagNumber(2) + set entity($0.EntityId v) { setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasEntity() => $_has(1); + @$pb.TagNumber(2) + void clearEntity() => clearField(2); + @$pb.TagNumber(2) + $0.EntityId ensureEntity() => $_ensure(1); + + @$pb.TagNumber(3) + $core.String get entityType => $_getSZ(2); + @$pb.TagNumber(3) + set entityType($core.String v) { $_setString(2, v); } + @$pb.TagNumber(3) + $core.bool hasEntityType() => $_has(2); + @$pb.TagNumber(3) + void clearEntityType() => clearField(3); +} + +class PolicyAction extends $pb.GeneratedMessage { + factory PolicyAction({ + PolicyOp? op, + $0.EntityId? entity, + $core.Iterable<$0.EntityId>? entities, + }) { + final $result = create(); + if (op != null) { + $result.op = op; + } + if (entity != null) { + $result.entity = entity; + } + if (entities != null) { + $result.entities.addAll(entities); + } + return $result; + } + PolicyAction._() : super(); + factory PolicyAction.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory PolicyAction.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'PolicyAction', package: const $pb.PackageName(_omitMessageNames ? '' : 'cedar.v3'), createEmptyInstance: create) + ..e(1, _omitFieldNames ? '' : 'op', $pb.PbFieldType.OE, defaultOrMaker: PolicyOp.POLICY_OP_UNSPECIFIED, valueOf: PolicyOp.valueOf, enumValues: PolicyOp.values) + ..aOM<$0.EntityId>(2, _omitFieldNames ? '' : 'entity', subBuilder: $0.EntityId.create) + ..pc<$0.EntityId>(3, _omitFieldNames ? '' : 'entities', $pb.PbFieldType.PM, subBuilder: $0.EntityId.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') + PolicyAction clone() => PolicyAction()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + PolicyAction copyWith(void Function(PolicyAction) updates) => super.copyWith((message) => updates(message as PolicyAction)) as PolicyAction; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static PolicyAction create() => PolicyAction._(); + PolicyAction createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static PolicyAction getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static PolicyAction? _defaultInstance; + + @$pb.TagNumber(1) + PolicyOp get op => $_getN(0); + @$pb.TagNumber(1) + set op(PolicyOp v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasOp() => $_has(0); + @$pb.TagNumber(1) + void clearOp() => clearField(1); + + @$pb.TagNumber(2) + $0.EntityId get entity => $_getN(1); + @$pb.TagNumber(2) + set entity($0.EntityId v) { setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasEntity() => $_has(1); + @$pb.TagNumber(2) + void clearEntity() => clearField(2); + @$pb.TagNumber(2) + $0.EntityId ensureEntity() => $_ensure(1); + + @$pb.TagNumber(3) + $core.List<$0.EntityId> get entities => $_getList(2); +} + +class PolicyResource extends $pb.GeneratedMessage { + factory PolicyResource({ + PolicyOp? op, + $0.EntityId? entity, + $core.String? entityType, + }) { + final $result = create(); + if (op != null) { + $result.op = op; + } + if (entity != null) { + $result.entity = entity; + } + if (entityType != null) { + $result.entityType = entityType; + } + return $result; + } + PolicyResource._() : super(); + factory PolicyResource.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory PolicyResource.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'PolicyResource', package: const $pb.PackageName(_omitMessageNames ? '' : 'cedar.v3'), createEmptyInstance: create) + ..e(1, _omitFieldNames ? '' : 'op', $pb.PbFieldType.OE, defaultOrMaker: PolicyOp.POLICY_OP_UNSPECIFIED, valueOf: PolicyOp.valueOf, enumValues: PolicyOp.values) + ..aOM<$0.EntityId>(2, _omitFieldNames ? '' : 'entity', subBuilder: $0.EntityId.create) + ..aOS(3, _omitFieldNames ? '' : 'entityType') + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + PolicyResource clone() => PolicyResource()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + PolicyResource copyWith(void Function(PolicyResource) updates) => super.copyWith((message) => updates(message as PolicyResource)) as PolicyResource; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static PolicyResource create() => PolicyResource._(); + PolicyResource createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static PolicyResource getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static PolicyResource? _defaultInstance; + + @$pb.TagNumber(1) + PolicyOp get op => $_getN(0); + @$pb.TagNumber(1) + set op(PolicyOp v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasOp() => $_has(0); + @$pb.TagNumber(1) + void clearOp() => clearField(1); + + @$pb.TagNumber(2) + $0.EntityId get entity => $_getN(1); + @$pb.TagNumber(2) + set entity($0.EntityId v) { setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasEntity() => $_has(1); + @$pb.TagNumber(2) + void clearEntity() => clearField(2); + @$pb.TagNumber(2) + $0.EntityId ensureEntity() => $_ensure(1); + + @$pb.TagNumber(3) + $core.String get entityType => $_getSZ(2); + @$pb.TagNumber(3) + set entityType($core.String v) { $_setString(2, v); } + @$pb.TagNumber(3) + $core.bool hasEntityType() => $_has(2); + @$pb.TagNumber(3) + void clearEntityType() => clearField(3); +} + +class PolicyCondition extends $pb.GeneratedMessage { + factory PolicyCondition({ + PolicyConditionKind? kind, + $3.Expr? body, + }) { + final $result = create(); + if (kind != null) { + $result.kind = kind; + } + if (body != null) { + $result.body = body; + } + return $result; + } + PolicyCondition._() : super(); + factory PolicyCondition.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory PolicyCondition.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'PolicyCondition', package: const $pb.PackageName(_omitMessageNames ? '' : 'cedar.v3'), createEmptyInstance: create) + ..e(1, _omitFieldNames ? '' : 'kind', $pb.PbFieldType.OE, defaultOrMaker: PolicyConditionKind.POLICY_CONDITION_KIND_UNSPECIFIED, valueOf: PolicyConditionKind.valueOf, enumValues: PolicyConditionKind.values) + ..aOM<$3.Expr>(2, _omitFieldNames ? '' : 'body', subBuilder: $3.Expr.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') + PolicyCondition clone() => PolicyCondition()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + PolicyCondition copyWith(void Function(PolicyCondition) updates) => super.copyWith((message) => updates(message as PolicyCondition)) as PolicyCondition; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static PolicyCondition create() => PolicyCondition._(); + PolicyCondition createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static PolicyCondition getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static PolicyCondition? _defaultInstance; + + @$pb.TagNumber(1) + PolicyConditionKind get kind => $_getN(0); + @$pb.TagNumber(1) + set kind(PolicyConditionKind v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasKind() => $_has(0); + @$pb.TagNumber(1) + void clearKind() => clearField(1); + + @$pb.TagNumber(2) + $3.Expr get body => $_getN(1); + @$pb.TagNumber(2) + set body($3.Expr v) { setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasBody() => $_has(1); + @$pb.TagNumber(2) + void clearBody() => clearField(2); + @$pb.TagNumber(2) + $3.Expr ensureBody() => $_ensure(1); +} + + +const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); +const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/packages/corks/lib/src/proto/cedar/v3/policy.pbenum.dart b/packages/corks/lib/src/proto/cedar/v3/policy.pbenum.dart new file mode 100644 index 00000000..c7d69b36 --- /dev/null +++ b/packages/corks/lib/src/proto/cedar/v3/policy.pbenum.dart @@ -0,0 +1,72 @@ +// +// Generated code. Do not modify. +// source: cedar/v3/policy.proto +// +// @dart = 2.12 + +// 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 PolicyEffect extends $pb.ProtobufEnum { + static const PolicyEffect POLICY_EFFECT_UNSPECIFIED = PolicyEffect._(0, _omitEnumNames ? '' : 'POLICY_EFFECT_UNSPECIFIED'); + static const PolicyEffect POLICY_EFFECT_PERMIT = PolicyEffect._(1, _omitEnumNames ? '' : 'POLICY_EFFECT_PERMIT'); + static const PolicyEffect POLICY_EFFECT_FORBID = PolicyEffect._(2, _omitEnumNames ? '' : 'POLICY_EFFECT_FORBID'); + + static const $core.List values = [ + POLICY_EFFECT_UNSPECIFIED, + POLICY_EFFECT_PERMIT, + POLICY_EFFECT_FORBID, + ]; + + static final $core.Map<$core.int, PolicyEffect> _byValue = $pb.ProtobufEnum.initByValue(values); + static PolicyEffect? valueOf($core.int value) => _byValue[value]; + + const PolicyEffect._($core.int v, $core.String n) : super(v, n); +} + +class PolicyOp extends $pb.ProtobufEnum { + static const PolicyOp POLICY_OP_UNSPECIFIED = PolicyOp._(0, _omitEnumNames ? '' : 'POLICY_OP_UNSPECIFIED'); + static const PolicyOp POLICY_OP_ALL = PolicyOp._(1, _omitEnumNames ? '' : 'POLICY_OP_ALL'); + static const PolicyOp POLICY_OP_EQUALS = PolicyOp._(2, _omitEnumNames ? '' : 'POLICY_OP_EQUALS'); + static const PolicyOp POLICY_OP_IN = PolicyOp._(3, _omitEnumNames ? '' : 'POLICY_OP_IN'); + static const PolicyOp POLICY_OP_IS = PolicyOp._(4, _omitEnumNames ? '' : 'POLICY_OP_IS'); + + static const $core.List values = [ + POLICY_OP_UNSPECIFIED, + POLICY_OP_ALL, + POLICY_OP_EQUALS, + POLICY_OP_IN, + POLICY_OP_IS, + ]; + + static final $core.Map<$core.int, PolicyOp> _byValue = $pb.ProtobufEnum.initByValue(values); + static PolicyOp? valueOf($core.int value) => _byValue[value]; + + const PolicyOp._($core.int v, $core.String n) : super(v, n); +} + +class PolicyConditionKind extends $pb.ProtobufEnum { + static const PolicyConditionKind POLICY_CONDITION_KIND_UNSPECIFIED = PolicyConditionKind._(0, _omitEnumNames ? '' : 'POLICY_CONDITION_KIND_UNSPECIFIED'); + static const PolicyConditionKind POLICY_CONDITION_KIND_WHEN = PolicyConditionKind._(1, _omitEnumNames ? '' : 'POLICY_CONDITION_KIND_WHEN'); + static const PolicyConditionKind POLICY_CONDITION_KIND_UNLESS = PolicyConditionKind._(2, _omitEnumNames ? '' : 'POLICY_CONDITION_KIND_UNLESS'); + + static const $core.List values = [ + POLICY_CONDITION_KIND_UNSPECIFIED, + POLICY_CONDITION_KIND_WHEN, + POLICY_CONDITION_KIND_UNLESS, + ]; + + static final $core.Map<$core.int, PolicyConditionKind> _byValue = $pb.ProtobufEnum.initByValue(values); + static PolicyConditionKind? valueOf($core.int value) => _byValue[value]; + + const PolicyConditionKind._($core.int v, $core.String n) : super(v, n); +} + + +const _omitEnumNames = $core.bool.fromEnvironment('protobuf.omit_enum_names'); diff --git a/packages/corks/lib/src/proto/cedar/v3/policy.pbjson.dart b/packages/corks/lib/src/proto/cedar/v3/policy.pbjson.dart new file mode 100644 index 00000000..3e29400a --- /dev/null +++ b/packages/corks/lib/src/proto/cedar/v3/policy.pbjson.dart @@ -0,0 +1,178 @@ +// +// Generated code. Do not modify. +// source: cedar/v3/policy.proto +// +// @dart = 2.12 + +// 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 policyEffectDescriptor instead') +const PolicyEffect$json = { + '1': 'PolicyEffect', + '2': [ + {'1': 'POLICY_EFFECT_UNSPECIFIED', '2': 0}, + {'1': 'POLICY_EFFECT_PERMIT', '2': 1}, + {'1': 'POLICY_EFFECT_FORBID', '2': 2}, + ], +}; + +/// Descriptor for `PolicyEffect`. Decode as a `google.protobuf.EnumDescriptorProto`. +final $typed_data.Uint8List policyEffectDescriptor = $convert.base64Decode( + 'CgxQb2xpY3lFZmZlY3QSHQoZUE9MSUNZX0VGRkVDVF9VTlNQRUNJRklFRBAAEhgKFFBPTElDWV' + '9FRkZFQ1RfUEVSTUlUEAESGAoUUE9MSUNZX0VGRkVDVF9GT1JCSUQQAg=='); + +@$core.Deprecated('Use policyOpDescriptor instead') +const PolicyOp$json = { + '1': 'PolicyOp', + '2': [ + {'1': 'POLICY_OP_UNSPECIFIED', '2': 0}, + {'1': 'POLICY_OP_ALL', '2': 1}, + {'1': 'POLICY_OP_EQUALS', '2': 2}, + {'1': 'POLICY_OP_IN', '2': 3}, + {'1': 'POLICY_OP_IS', '2': 4}, + ], +}; + +/// Descriptor for `PolicyOp`. Decode as a `google.protobuf.EnumDescriptorProto`. +final $typed_data.Uint8List policyOpDescriptor = $convert.base64Decode( + 'CghQb2xpY3lPcBIZChVQT0xJQ1lfT1BfVU5TUEVDSUZJRUQQABIRCg1QT0xJQ1lfT1BfQUxMEA' + 'ESFAoQUE9MSUNZX09QX0VRVUFMUxACEhAKDFBPTElDWV9PUF9JThADEhAKDFBPTElDWV9PUF9J' + 'UxAE'); + +@$core.Deprecated('Use policyConditionKindDescriptor instead') +const PolicyConditionKind$json = { + '1': 'PolicyConditionKind', + '2': [ + {'1': 'POLICY_CONDITION_KIND_UNSPECIFIED', '2': 0}, + {'1': 'POLICY_CONDITION_KIND_WHEN', '2': 1}, + {'1': 'POLICY_CONDITION_KIND_UNLESS', '2': 2}, + ], +}; + +/// Descriptor for `PolicyConditionKind`. Decode as a `google.protobuf.EnumDescriptorProto`. +final $typed_data.Uint8List policyConditionKindDescriptor = $convert.base64Decode( + 'ChNQb2xpY3lDb25kaXRpb25LaW5kEiUKIVBPTElDWV9DT05ESVRJT05fS0lORF9VTlNQRUNJRk' + 'lFRBAAEh4KGlBPTElDWV9DT05ESVRJT05fS0lORF9XSEVOEAESIAocUE9MSUNZX0NPTkRJVElP' + 'Tl9LSU5EX1VOTEVTUxAC'); + +@$core.Deprecated('Use policyDescriptor instead') +const Policy$json = { + '1': 'Policy', + '2': [ + {'1': 'id', '3': 1, '4': 1, '5': 9, '9': 0, '10': 'id', '17': true}, + {'1': 'effect', '3': 2, '4': 1, '5': 14, '6': '.cedar.v3.PolicyEffect', '10': 'effect'}, + {'1': 'principal', '3': 3, '4': 1, '5': 11, '6': '.cedar.v3.PolicyPrincipal', '10': 'principal'}, + {'1': 'action', '3': 4, '4': 1, '5': 11, '6': '.cedar.v3.PolicyAction', '10': 'action'}, + {'1': 'resource', '3': 5, '4': 1, '5': 11, '6': '.cedar.v3.PolicyResource', '10': 'resource'}, + {'1': 'conditions', '3': 6, '4': 3, '5': 11, '6': '.cedar.v3.PolicyCondition', '10': 'conditions'}, + {'1': 'annotations', '3': 7, '4': 3, '5': 11, '6': '.cedar.v3.Policy.AnnotationsEntry', '10': 'annotations'}, + ], + '3': [Policy_AnnotationsEntry$json], + '8': [ + {'1': '_id'}, + ], +}; + +@$core.Deprecated('Use policyDescriptor instead') +const Policy_AnnotationsEntry$json = { + '1': 'AnnotationsEntry', + '2': [ + {'1': 'key', '3': 1, '4': 1, '5': 9, '10': 'key'}, + {'1': 'value', '3': 2, '4': 1, '5': 9, '10': 'value'}, + ], + '7': {'7': true}, +}; + +/// Descriptor for `Policy`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List policyDescriptor = $convert.base64Decode( + 'CgZQb2xpY3kSEwoCaWQYASABKAlIAFICaWSIAQESLgoGZWZmZWN0GAIgASgOMhYuY2VkYXIudj' + 'MuUG9saWN5RWZmZWN0UgZlZmZlY3QSNwoJcHJpbmNpcGFsGAMgASgLMhkuY2VkYXIudjMuUG9s' + 'aWN5UHJpbmNpcGFsUglwcmluY2lwYWwSLgoGYWN0aW9uGAQgASgLMhYuY2VkYXIudjMuUG9saW' + 'N5QWN0aW9uUgZhY3Rpb24SNAoIcmVzb3VyY2UYBSABKAsyGC5jZWRhci52My5Qb2xpY3lSZXNv' + 'dXJjZVIIcmVzb3VyY2USOQoKY29uZGl0aW9ucxgGIAMoCzIZLmNlZGFyLnYzLlBvbGljeUNvbm' + 'RpdGlvblIKY29uZGl0aW9ucxJDCgthbm5vdGF0aW9ucxgHIAMoCzIhLmNlZGFyLnYzLlBvbGlj' + 'eS5Bbm5vdGF0aW9uc0VudHJ5Ugthbm5vdGF0aW9ucxo+ChBBbm5vdGF0aW9uc0VudHJ5EhAKA2' + 'tleRgBIAEoCVIDa2V5EhQKBXZhbHVlGAIgASgJUgV2YWx1ZToCOAFCBQoDX2lk'); + +@$core.Deprecated('Use policyPrincipalDescriptor instead') +const PolicyPrincipal$json = { + '1': 'PolicyPrincipal', + '2': [ + {'1': 'op', '3': 1, '4': 1, '5': 14, '6': '.cedar.v3.PolicyOp', '10': 'op'}, + {'1': 'entity', '3': 2, '4': 1, '5': 11, '6': '.cedar.v3.EntityId', '9': 0, '10': 'entity', '17': true}, + {'1': 'entity_type', '3': 3, '4': 1, '5': 9, '9': 1, '10': 'entityType', '17': true}, + ], + '8': [ + {'1': '_entity'}, + {'1': '_entity_type'}, + ], +}; + +/// Descriptor for `PolicyPrincipal`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List policyPrincipalDescriptor = $convert.base64Decode( + 'Cg9Qb2xpY3lQcmluY2lwYWwSIgoCb3AYASABKA4yEi5jZWRhci52My5Qb2xpY3lPcFICb3ASLw' + 'oGZW50aXR5GAIgASgLMhIuY2VkYXIudjMuRW50aXR5SWRIAFIGZW50aXR5iAEBEiQKC2VudGl0' + 'eV90eXBlGAMgASgJSAFSCmVudGl0eVR5cGWIAQFCCQoHX2VudGl0eUIOCgxfZW50aXR5X3R5cG' + 'U='); + +@$core.Deprecated('Use policyActionDescriptor instead') +const PolicyAction$json = { + '1': 'PolicyAction', + '2': [ + {'1': 'op', '3': 1, '4': 1, '5': 14, '6': '.cedar.v3.PolicyOp', '10': 'op'}, + {'1': 'entity', '3': 2, '4': 1, '5': 11, '6': '.cedar.v3.EntityId', '9': 0, '10': 'entity', '17': true}, + {'1': 'entities', '3': 3, '4': 3, '5': 11, '6': '.cedar.v3.EntityId', '10': 'entities'}, + ], + '8': [ + {'1': '_entity'}, + ], +}; + +/// Descriptor for `PolicyAction`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List policyActionDescriptor = $convert.base64Decode( + 'CgxQb2xpY3lBY3Rpb24SIgoCb3AYASABKA4yEi5jZWRhci52My5Qb2xpY3lPcFICb3ASLwoGZW' + '50aXR5GAIgASgLMhIuY2VkYXIudjMuRW50aXR5SWRIAFIGZW50aXR5iAEBEi4KCGVudGl0aWVz' + 'GAMgAygLMhIuY2VkYXIudjMuRW50aXR5SWRSCGVudGl0aWVzQgkKB19lbnRpdHk='); + +@$core.Deprecated('Use policyResourceDescriptor instead') +const PolicyResource$json = { + '1': 'PolicyResource', + '2': [ + {'1': 'op', '3': 1, '4': 1, '5': 14, '6': '.cedar.v3.PolicyOp', '10': 'op'}, + {'1': 'entity', '3': 2, '4': 1, '5': 11, '6': '.cedar.v3.EntityId', '9': 0, '10': 'entity', '17': true}, + {'1': 'entity_type', '3': 3, '4': 1, '5': 9, '9': 1, '10': 'entityType', '17': true}, + ], + '8': [ + {'1': '_entity'}, + {'1': '_entity_type'}, + ], +}; + +/// Descriptor for `PolicyResource`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List policyResourceDescriptor = $convert.base64Decode( + 'Cg5Qb2xpY3lSZXNvdXJjZRIiCgJvcBgBIAEoDjISLmNlZGFyLnYzLlBvbGljeU9wUgJvcBIvCg' + 'ZlbnRpdHkYAiABKAsyEi5jZWRhci52My5FbnRpdHlJZEgAUgZlbnRpdHmIAQESJAoLZW50aXR5' + 'X3R5cGUYAyABKAlIAVIKZW50aXR5VHlwZYgBAUIJCgdfZW50aXR5Qg4KDF9lbnRpdHlfdHlwZQ' + '=='); + +@$core.Deprecated('Use policyConditionDescriptor instead') +const PolicyCondition$json = { + '1': 'PolicyCondition', + '2': [ + {'1': 'kind', '3': 1, '4': 1, '5': 14, '6': '.cedar.v3.PolicyConditionKind', '10': 'kind'}, + {'1': 'body', '3': 2, '4': 1, '5': 11, '6': '.cedar.v3.Expr', '10': 'body'}, + ], +}; + +/// Descriptor for `PolicyCondition`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List policyConditionDescriptor = $convert.base64Decode( + 'Cg9Qb2xpY3lDb25kaXRpb24SMQoEa2luZBgBIAEoDjIdLmNlZGFyLnYzLlBvbGljeUNvbmRpdG' + 'lvbktpbmRSBGtpbmQSIgoEYm9keRgCIAEoCzIOLmNlZGFyLnYzLkV4cHJSBGJvZHk='); + diff --git a/packages/corks/lib/src/proto/cedar/v3/policy.pbserver.dart b/packages/corks/lib/src/proto/cedar/v3/policy.pbserver.dart new file mode 100644 index 00000000..600f60cf --- /dev/null +++ b/packages/corks/lib/src/proto/cedar/v3/policy.pbserver.dart @@ -0,0 +1,14 @@ +// +// Generated code. Do not modify. +// source: cedar/v3/policy.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +export 'policy.pb.dart'; + diff --git a/packages/corks/lib/src/proto/cedar/v3/value.pb.dart b/packages/corks/lib/src/proto/cedar/v3/value.pb.dart new file mode 100644 index 00000000..d6550120 --- /dev/null +++ b/packages/corks/lib/src/proto/cedar/v3/value.pb.dart @@ -0,0 +1,394 @@ +// +// Generated code. Do not modify. +// source: cedar/v3/value.proto +// +// @dart = 2.12 + +// 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 'entity_id.pb.dart' as $0; + +enum Value_Value { + string, + long, + bool_3, + set, + record, + extension_6, + entity, + notSet +} + +class Value extends $pb.GeneratedMessage { + factory Value({ + $core.String? string, + $fixnum.Int64? long, + $core.bool? bool_3, + SetValue? set, + RecordValue? record, + ExtensionValue? extension_6, + EntityValue? entity, + }) { + final $result = create(); + if (string != null) { + $result.string = string; + } + if (long != null) { + $result.long = long; + } + if (bool_3 != null) { + $result.bool_3 = bool_3; + } + if (set != null) { + $result.set = set; + } + if (record != null) { + $result.record = record; + } + if (extension_6 != null) { + $result.extension_6 = extension_6; + } + if (entity != null) { + $result.entity = entity; + } + 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_Value> _Value_ValueByTag = { + 1 : Value_Value.string, + 2 : Value_Value.long, + 3 : Value_Value.bool_3, + 4 : Value_Value.set, + 5 : Value_Value.record, + 6 : Value_Value.extension_6, + 7 : Value_Value.entity, + 0 : Value_Value.notSet + }; + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Value', package: const $pb.PackageName(_omitMessageNames ? '' : 'cedar.v3'), createEmptyInstance: create) + ..oo(0, [1, 2, 3, 4, 5, 6, 7]) + ..aOS(1, _omitFieldNames ? '' : 'string') + ..aInt64(2, _omitFieldNames ? '' : 'long') + ..aOB(3, _omitFieldNames ? '' : 'bool') + ..aOM(4, _omitFieldNames ? '' : 'set', subBuilder: SetValue.create) + ..aOM(5, _omitFieldNames ? '' : 'record', subBuilder: RecordValue.create) + ..aOM(6, _omitFieldNames ? '' : 'extension', subBuilder: ExtensionValue.create) + ..aOM(7, _omitFieldNames ? '' : 'entity', subBuilder: EntityValue.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + Value clone() => Value()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + Value copyWith(void Function(Value) updates) => 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(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static Value getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static Value? _defaultInstance; + + Value_Value whichValue() => _Value_ValueByTag[$_whichOneof(0)]!; + void clearValue() => clearField($_whichOneof(0)); + + @$pb.TagNumber(1) + $core.String get string => $_getSZ(0); + @$pb.TagNumber(1) + set string($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasString() => $_has(0); + @$pb.TagNumber(1) + void clearString() => clearField(1); + + @$pb.TagNumber(2) + $fixnum.Int64 get long => $_getI64(1); + @$pb.TagNumber(2) + set long($fixnum.Int64 v) { $_setInt64(1, v); } + @$pb.TagNumber(2) + $core.bool hasLong() => $_has(1); + @$pb.TagNumber(2) + void clearLong() => clearField(2); + + @$pb.TagNumber(3) + $core.bool get bool_3 => $_getBF(2); + @$pb.TagNumber(3) + set bool_3($core.bool v) { $_setBool(2, v); } + @$pb.TagNumber(3) + $core.bool hasBool_3() => $_has(2); + @$pb.TagNumber(3) + void clearBool_3() => clearField(3); + + @$pb.TagNumber(4) + SetValue get set => $_getN(3); + @$pb.TagNumber(4) + set set(SetValue v) { setField(4, v); } + @$pb.TagNumber(4) + $core.bool hasSet() => $_has(3); + @$pb.TagNumber(4) + void clearSet() => clearField(4); + @$pb.TagNumber(4) + SetValue ensureSet() => $_ensure(3); + + @$pb.TagNumber(5) + RecordValue get record => $_getN(4); + @$pb.TagNumber(5) + set record(RecordValue v) { setField(5, v); } + @$pb.TagNumber(5) + $core.bool hasRecord() => $_has(4); + @$pb.TagNumber(5) + void clearRecord() => clearField(5); + @$pb.TagNumber(5) + RecordValue ensureRecord() => $_ensure(4); + + @$pb.TagNumber(6) + ExtensionValue get extension_6 => $_getN(5); + @$pb.TagNumber(6) + set extension_6(ExtensionValue v) { setField(6, v); } + @$pb.TagNumber(6) + $core.bool hasExtension_6() => $_has(5); + @$pb.TagNumber(6) + void clearExtension_6() => clearField(6); + @$pb.TagNumber(6) + ExtensionValue ensureExtension_6() => $_ensure(5); + + @$pb.TagNumber(7) + EntityValue get entity => $_getN(6); + @$pb.TagNumber(7) + set entity(EntityValue v) { setField(7, v); } + @$pb.TagNumber(7) + $core.bool hasEntity() => $_has(6); + @$pb.TagNumber(7) + void clearEntity() => clearField(7); + @$pb.TagNumber(7) + EntityValue ensureEntity() => $_ensure(6); +} + +class SetValue extends $pb.GeneratedMessage { + factory SetValue({ + $core.Iterable? values, + }) { + final $result = create(); + if (values != null) { + $result.values.addAll(values); + } + return $result; + } + SetValue._() : super(); + factory SetValue.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory SetValue.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'SetValue', package: const $pb.PackageName(_omitMessageNames ? '' : 'cedar.v3'), createEmptyInstance: create) + ..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') + SetValue clone() => SetValue()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + SetValue copyWith(void Function(SetValue) updates) => super.copyWith((message) => updates(message as SetValue)) as SetValue; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static SetValue create() => SetValue._(); + SetValue createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static SetValue getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static SetValue? _defaultInstance; + + @$pb.TagNumber(1) + $core.List get values => $_getList(0); +} + +class RecordValue extends $pb.GeneratedMessage { + factory RecordValue({ + $core.Map<$core.String, Value>? values, + }) { + final $result = create(); + if (values != null) { + $result.values.addAll(values); + } + return $result; + } + RecordValue._() : super(); + factory RecordValue.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory RecordValue.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'RecordValue', package: const $pb.PackageName(_omitMessageNames ? '' : 'cedar.v3'), createEmptyInstance: create) + ..m<$core.String, Value>(1, _omitFieldNames ? '' : 'values', entryClassName: 'RecordValue.ValuesEntry', keyFieldType: $pb.PbFieldType.OS, valueFieldType: $pb.PbFieldType.OM, valueCreator: Value.create, valueDefaultOrMaker: Value.getDefault, packageName: const $pb.PackageName('cedar.v3')) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + RecordValue clone() => RecordValue()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + RecordValue copyWith(void Function(RecordValue) updates) => super.copyWith((message) => updates(message as RecordValue)) as RecordValue; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static RecordValue create() => RecordValue._(); + RecordValue createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static RecordValue getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static RecordValue? _defaultInstance; + + @$pb.TagNumber(1) + $core.Map<$core.String, Value> get values => $_getMap(0); +} + +class ExtensionValue extends $pb.GeneratedMessage { + factory ExtensionValue({ + $core.String? fn, + Value? arg, + }) { + final $result = create(); + if (fn != null) { + $result.fn = fn; + } + if (arg != null) { + $result.arg = arg; + } + return $result; + } + ExtensionValue._() : super(); + factory ExtensionValue.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ExtensionValue.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ExtensionValue', package: const $pb.PackageName(_omitMessageNames ? '' : 'cedar.v3'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'fn') + ..aOM(2, _omitFieldNames ? '' : 'arg', 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') + ExtensionValue clone() => ExtensionValue()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + ExtensionValue copyWith(void Function(ExtensionValue) updates) => super.copyWith((message) => updates(message as ExtensionValue)) as ExtensionValue; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static ExtensionValue create() => ExtensionValue._(); + ExtensionValue createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static ExtensionValue getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static ExtensionValue? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get fn => $_getSZ(0); + @$pb.TagNumber(1) + set fn($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasFn() => $_has(0); + @$pb.TagNumber(1) + void clearFn() => clearField(1); + + @$pb.TagNumber(2) + Value get arg => $_getN(1); + @$pb.TagNumber(2) + set arg(Value v) { setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasArg() => $_has(1); + @$pb.TagNumber(2) + void clearArg() => clearField(2); + @$pb.TagNumber(2) + Value ensureArg() => $_ensure(1); +} + +class EntityValue extends $pb.GeneratedMessage { + factory EntityValue({ + $0.EntityId? uid, + }) { + final $result = create(); + if (uid != null) { + $result.uid = uid; + } + return $result; + } + EntityValue._() : super(); + factory EntityValue.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory EntityValue.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'EntityValue', package: const $pb.PackageName(_omitMessageNames ? '' : 'cedar.v3'), createEmptyInstance: create) + ..aOM<$0.EntityId>(1, _omitFieldNames ? '' : 'uid', subBuilder: $0.EntityId.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') + EntityValue clone() => EntityValue()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + EntityValue copyWith(void Function(EntityValue) updates) => super.copyWith((message) => updates(message as EntityValue)) as EntityValue; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static EntityValue create() => EntityValue._(); + EntityValue createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static EntityValue getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static EntityValue? _defaultInstance; + + @$pb.TagNumber(1) + $0.EntityId get uid => $_getN(0); + @$pb.TagNumber(1) + set uid($0.EntityId v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasUid() => $_has(0); + @$pb.TagNumber(1) + void clearUid() => clearField(1); + @$pb.TagNumber(1) + $0.EntityId ensureUid() => $_ensure(0); +} + + +const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); +const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/packages/corks/lib/src/proto/cedar/v3/value.pbenum.dart b/packages/corks/lib/src/proto/cedar/v3/value.pbenum.dart new file mode 100644 index 00000000..bed60914 --- /dev/null +++ b/packages/corks/lib/src/proto/cedar/v3/value.pbenum.dart @@ -0,0 +1,11 @@ +// +// Generated code. Do not modify. +// source: cedar/v3/value.proto +// +// @dart = 2.12 + +// 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/packages/corks/lib/src/proto/cedar/v3/value.pbjson.dart b/packages/corks/lib/src/proto/cedar/v3/value.pbjson.dart new file mode 100644 index 00000000..832f54d3 --- /dev/null +++ b/packages/corks/lib/src/proto/cedar/v3/value.pbjson.dart @@ -0,0 +1,104 @@ +// +// Generated code. Do not modify. +// source: cedar/v3/value.proto +// +// @dart = 2.12 + +// 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 valueDescriptor instead') +const Value$json = { + '1': 'Value', + '2': [ + {'1': 'string', '3': 1, '4': 1, '5': 9, '9': 0, '10': 'string'}, + {'1': 'long', '3': 2, '4': 1, '5': 3, '9': 0, '10': 'long'}, + {'1': 'bool', '3': 3, '4': 1, '5': 8, '9': 0, '10': 'bool'}, + {'1': 'set', '3': 4, '4': 1, '5': 11, '6': '.cedar.v3.SetValue', '9': 0, '10': 'set'}, + {'1': 'record', '3': 5, '4': 1, '5': 11, '6': '.cedar.v3.RecordValue', '9': 0, '10': 'record'}, + {'1': 'extension', '3': 6, '4': 1, '5': 11, '6': '.cedar.v3.ExtensionValue', '9': 0, '10': 'extension'}, + {'1': 'entity', '3': 7, '4': 1, '5': 11, '6': '.cedar.v3.EntityValue', '9': 0, '10': 'entity'}, + ], + '8': [ + {'1': 'value'}, + ], +}; + +/// Descriptor for `Value`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List valueDescriptor = $convert.base64Decode( + 'CgVWYWx1ZRIYCgZzdHJpbmcYASABKAlIAFIGc3RyaW5nEhQKBGxvbmcYAiABKANIAFIEbG9uZx' + 'IUCgRib29sGAMgASgISABSBGJvb2wSJgoDc2V0GAQgASgLMhIuY2VkYXIudjMuU2V0VmFsdWVI' + 'AFIDc2V0Ei8KBnJlY29yZBgFIAEoCzIVLmNlZGFyLnYzLlJlY29yZFZhbHVlSABSBnJlY29yZB' + 'I4CglleHRlbnNpb24YBiABKAsyGC5jZWRhci52My5FeHRlbnNpb25WYWx1ZUgAUglleHRlbnNp' + 'b24SLwoGZW50aXR5GAcgASgLMhUuY2VkYXIudjMuRW50aXR5VmFsdWVIAFIGZW50aXR5QgcKBX' + 'ZhbHVl'); + +@$core.Deprecated('Use setValueDescriptor instead') +const SetValue$json = { + '1': 'SetValue', + '2': [ + {'1': 'values', '3': 1, '4': 3, '5': 11, '6': '.cedar.v3.Value', '10': 'values'}, + ], +}; + +/// Descriptor for `SetValue`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List setValueDescriptor = $convert.base64Decode( + 'CghTZXRWYWx1ZRInCgZ2YWx1ZXMYASADKAsyDy5jZWRhci52My5WYWx1ZVIGdmFsdWVz'); + +@$core.Deprecated('Use recordValueDescriptor instead') +const RecordValue$json = { + '1': 'RecordValue', + '2': [ + {'1': 'values', '3': 1, '4': 3, '5': 11, '6': '.cedar.v3.RecordValue.ValuesEntry', '10': 'values'}, + ], + '3': [RecordValue_ValuesEntry$json], +}; + +@$core.Deprecated('Use recordValueDescriptor instead') +const RecordValue_ValuesEntry$json = { + '1': 'ValuesEntry', + '2': [ + {'1': 'key', '3': 1, '4': 1, '5': 9, '10': 'key'}, + {'1': 'value', '3': 2, '4': 1, '5': 11, '6': '.cedar.v3.Value', '10': 'value'}, + ], + '7': {'7': true}, +}; + +/// Descriptor for `RecordValue`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List recordValueDescriptor = $convert.base64Decode( + 'CgtSZWNvcmRWYWx1ZRI5CgZ2YWx1ZXMYASADKAsyIS5jZWRhci52My5SZWNvcmRWYWx1ZS5WYW' + 'x1ZXNFbnRyeVIGdmFsdWVzGkoKC1ZhbHVlc0VudHJ5EhAKA2tleRgBIAEoCVIDa2V5EiUKBXZh' + 'bHVlGAIgASgLMg8uY2VkYXIudjMuVmFsdWVSBXZhbHVlOgI4AQ=='); + +@$core.Deprecated('Use extensionValueDescriptor instead') +const ExtensionValue$json = { + '1': 'ExtensionValue', + '2': [ + {'1': 'fn', '3': 1, '4': 1, '5': 9, '10': 'fn'}, + {'1': 'arg', '3': 2, '4': 1, '5': 11, '6': '.cedar.v3.Value', '10': 'arg'}, + ], +}; + +/// Descriptor for `ExtensionValue`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List extensionValueDescriptor = $convert.base64Decode( + 'Cg5FeHRlbnNpb25WYWx1ZRIOCgJmbhgBIAEoCVICZm4SIQoDYXJnGAIgASgLMg8uY2VkYXIudj' + 'MuVmFsdWVSA2FyZw=='); + +@$core.Deprecated('Use entityValueDescriptor instead') +const EntityValue$json = { + '1': 'EntityValue', + '2': [ + {'1': 'uid', '3': 1, '4': 1, '5': 11, '6': '.cedar.v3.EntityId', '10': 'uid'}, + ], +}; + +/// Descriptor for `EntityValue`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List entityValueDescriptor = $convert.base64Decode( + 'CgtFbnRpdHlWYWx1ZRIkCgN1aWQYASABKAsyEi5jZWRhci52My5FbnRpdHlJZFIDdWlk'); + diff --git a/packages/corks/lib/src/proto/cedar/v3/value.pbserver.dart b/packages/corks/lib/src/proto/cedar/v3/value.pbserver.dart new file mode 100644 index 00000000..1417e467 --- /dev/null +++ b/packages/corks/lib/src/proto/cedar/v3/value.pbserver.dart @@ -0,0 +1,14 @@ +// +// Generated code. Do not modify. +// source: cedar/v3/value.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +export 'value.pb.dart'; + diff --git a/packages/corks/lib/src/proto/corks/v1/cork.pb.dart b/packages/corks/lib/src/proto/corks/v1/cork.pb.dart new file mode 100644 index 00000000..b4c15a56 --- /dev/null +++ b/packages/corks/lib/src/proto/corks/v1/cork.pb.dart @@ -0,0 +1,198 @@ +// +// Generated code. Do not modify. +// source: corks/v1/cork.proto +// +// @dart = 2.12 + +// 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 Cork extends $pb.GeneratedMessage { + factory Cork({ + $core.List<$core.int>? id, + $core.List<$core.int>? keyId, + SignedBlock? bearer, + $core.Iterable? caveats, + $core.List<$core.int>? signature, + }) { + final $result = create(); + if (id != null) { + $result.id = id; + } + if (keyId != null) { + $result.keyId = keyId; + } + if (bearer != null) { + $result.bearer = bearer; + } + if (caveats != null) { + $result.caveats.addAll(caveats); + } + if (signature != null) { + $result.signature = signature; + } + return $result; + } + Cork._() : super(); + factory Cork.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory Cork.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Cork', package: const $pb.PackageName(_omitMessageNames ? '' : 'corks.v1'), createEmptyInstance: create) + ..a<$core.List<$core.int>>(1, _omitFieldNames ? '' : 'id', $pb.PbFieldType.OY) + ..a<$core.List<$core.int>>(2, _omitFieldNames ? '' : 'keyId', $pb.PbFieldType.OY) + ..aOM(3, _omitFieldNames ? '' : 'bearer', subBuilder: SignedBlock.create) + ..pc(4, _omitFieldNames ? '' : 'caveats', $pb.PbFieldType.PM, subBuilder: SignedBlock.create) + ..a<$core.List<$core.int>>(5, _omitFieldNames ? '' : 'signature', $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') + Cork clone() => Cork()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + Cork copyWith(void Function(Cork) updates) => super.copyWith((message) => updates(message as Cork)) as Cork; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static Cork create() => Cork._(); + Cork createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static Cork getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static Cork? _defaultInstance; + + @$pb.TagNumber(1) + $core.List<$core.int> get id => $_getN(0); + @$pb.TagNumber(1) + set id($core.List<$core.int> v) { $_setBytes(0, v); } + @$pb.TagNumber(1) + $core.bool hasId() => $_has(0); + @$pb.TagNumber(1) + void clearId() => clearField(1); + + @$pb.TagNumber(2) + $core.List<$core.int> get keyId => $_getN(1); + @$pb.TagNumber(2) + set keyId($core.List<$core.int> v) { $_setBytes(1, v); } + @$pb.TagNumber(2) + $core.bool hasKeyId() => $_has(1); + @$pb.TagNumber(2) + void clearKeyId() => clearField(2); + + @$pb.TagNumber(3) + SignedBlock get bearer => $_getN(2); + @$pb.TagNumber(3) + set bearer(SignedBlock v) { setField(3, v); } + @$pb.TagNumber(3) + $core.bool hasBearer() => $_has(2); + @$pb.TagNumber(3) + void clearBearer() => clearField(3); + @$pb.TagNumber(3) + SignedBlock ensureBearer() => $_ensure(2); + + @$pb.TagNumber(4) + $core.List get caveats => $_getList(3); + + @$pb.TagNumber(5) + $core.List<$core.int> get signature => $_getN(4); + @$pb.TagNumber(5) + set signature($core.List<$core.int> v) { $_setBytes(4, v); } + @$pb.TagNumber(5) + $core.bool hasSignature() => $_has(4); + @$pb.TagNumber(5) + void clearSignature() => clearField(5); +} + +class SignedBlock extends $pb.GeneratedMessage { + factory SignedBlock({ + $core.List<$core.int>? block, + $core.List<$core.int>? typeUrl, + $core.List<$core.int>? signature, + }) { + final $result = create(); + if (block != null) { + $result.block = block; + } + if (typeUrl != null) { + $result.typeUrl = typeUrl; + } + if (signature != null) { + $result.signature = signature; + } + return $result; + } + SignedBlock._() : super(); + factory SignedBlock.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory SignedBlock.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'SignedBlock', package: const $pb.PackageName(_omitMessageNames ? '' : 'corks.v1'), createEmptyInstance: create) + ..a<$core.List<$core.int>>(1, _omitFieldNames ? '' : 'block', $pb.PbFieldType.OY) + ..a<$core.List<$core.int>>(2, _omitFieldNames ? '' : 'typeUrl', $pb.PbFieldType.OY) + ..a<$core.List<$core.int>>(3, _omitFieldNames ? '' : 'signature', $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') + SignedBlock clone() => SignedBlock()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + SignedBlock copyWith(void Function(SignedBlock) updates) => super.copyWith((message) => updates(message as SignedBlock)) as SignedBlock; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static SignedBlock create() => SignedBlock._(); + SignedBlock createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static SignedBlock getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static SignedBlock? _defaultInstance; + + @$pb.TagNumber(1) + $core.List<$core.int> get block => $_getN(0); + @$pb.TagNumber(1) + set block($core.List<$core.int> v) { $_setBytes(0, v); } + @$pb.TagNumber(1) + $core.bool hasBlock() => $_has(0); + @$pb.TagNumber(1) + void clearBlock() => clearField(1); + + @$pb.TagNumber(2) + $core.List<$core.int> get typeUrl => $_getN(1); + @$pb.TagNumber(2) + set typeUrl($core.List<$core.int> v) { $_setBytes(1, v); } + @$pb.TagNumber(2) + $core.bool hasTypeUrl() => $_has(1); + @$pb.TagNumber(2) + void clearTypeUrl() => clearField(2); + + @$pb.TagNumber(3) + $core.List<$core.int> get signature => $_getN(2); + @$pb.TagNumber(3) + set signature($core.List<$core.int> v) { $_setBytes(2, v); } + @$pb.TagNumber(3) + $core.bool hasSignature() => $_has(2); + @$pb.TagNumber(3) + void clearSignature() => clearField(3); +} + + +const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); +const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/packages/corks/lib/src/proto/corks/v1/cork.pbenum.dart b/packages/corks/lib/src/proto/corks/v1/cork.pbenum.dart new file mode 100644 index 00000000..c5bd364e --- /dev/null +++ b/packages/corks/lib/src/proto/corks/v1/cork.pbenum.dart @@ -0,0 +1,11 @@ +// +// Generated code. Do not modify. +// source: corks/v1/cork.proto +// +// @dart = 2.12 + +// 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/packages/corks/lib/src/proto/corks/v1/cork.pbjson.dart b/packages/corks/lib/src/proto/corks/v1/cork.pbjson.dart new file mode 100644 index 00000000..edcbef9e --- /dev/null +++ b/packages/corks/lib/src/proto/corks/v1/cork.pbjson.dart @@ -0,0 +1,52 @@ +// +// Generated code. Do not modify. +// source: corks/v1/cork.proto +// +// @dart = 2.12 + +// 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 corkDescriptor instead') +const Cork$json = { + '1': 'Cork', + '2': [ + {'1': 'id', '3': 1, '4': 1, '5': 12, '10': 'id'}, + {'1': 'key_id', '3': 2, '4': 1, '5': 12, '10': 'keyId'}, + {'1': 'bearer', '3': 3, '4': 1, '5': 11, '6': '.corks.v1.SignedBlock', '9': 0, '10': 'bearer', '17': true}, + {'1': 'caveats', '3': 4, '4': 3, '5': 11, '6': '.corks.v1.SignedBlock', '10': 'caveats'}, + {'1': 'signature', '3': 5, '4': 1, '5': 12, '10': 'signature'}, + ], + '8': [ + {'1': '_bearer'}, + ], +}; + +/// Descriptor for `Cork`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List corkDescriptor = $convert.base64Decode( + 'CgRDb3JrEg4KAmlkGAEgASgMUgJpZBIVCgZrZXlfaWQYAiABKAxSBWtleUlkEjIKBmJlYXJlch' + 'gDIAEoCzIVLmNvcmtzLnYxLlNpZ25lZEJsb2NrSABSBmJlYXJlcogBARIvCgdjYXZlYXRzGAQg' + 'AygLMhUuY29ya3MudjEuU2lnbmVkQmxvY2tSB2NhdmVhdHMSHAoJc2lnbmF0dXJlGAUgASgMUg' + 'lzaWduYXR1cmVCCQoHX2JlYXJlcg=='); + +@$core.Deprecated('Use signedBlockDescriptor instead') +const SignedBlock$json = { + '1': 'SignedBlock', + '2': [ + {'1': 'block', '3': 1, '4': 1, '5': 12, '10': 'block'}, + {'1': 'type_url', '3': 2, '4': 1, '5': 12, '10': 'typeUrl'}, + {'1': 'signature', '3': 3, '4': 1, '5': 12, '10': 'signature'}, + ], +}; + +/// Descriptor for `SignedBlock`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List signedBlockDescriptor = $convert.base64Decode( + 'CgtTaWduZWRCbG9jaxIUCgVibG9jaxgBIAEoDFIFYmxvY2sSGQoIdHlwZV91cmwYAiABKAxSB3' + 'R5cGVVcmwSHAoJc2lnbmF0dXJlGAMgASgMUglzaWduYXR1cmU='); + diff --git a/packages/corks/lib/src/proto/corks/v1/cork.pbserver.dart b/packages/corks/lib/src/proto/corks/v1/cork.pbserver.dart new file mode 100644 index 00000000..22f9438b --- /dev/null +++ b/packages/corks/lib/src/proto/corks/v1/cork.pbserver.dart @@ -0,0 +1,14 @@ +// +// Generated code. Do not modify. +// source: corks/v1/cork.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +export 'cork.pb.dart'; + diff --git a/packages/corks/lib/src/proto/dart/dart_options.pb.dart b/packages/corks/lib/src/proto/dart/dart_options.pb.dart new file mode 100644 index 00000000..fe78ea84 --- /dev/null +++ b/packages/corks/lib/src/proto/dart/dart_options.pb.dart @@ -0,0 +1,178 @@ +// +// Generated code. Do not modify. +// source: dart/dart_options.proto +// +// @dart = 2.12 + +// 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 mixin that can be used in the 'with' clause of the generated Dart class +/// for a proto message. +class DartMixin extends $pb.GeneratedMessage { + factory DartMixin({ + $core.String? name, + $core.String? importFrom, + $core.String? parent, + }) { + final $result = create(); + if (name != null) { + $result.name = name; + } + if (importFrom != null) { + $result.importFrom = importFrom; + } + if (parent != null) { + $result.parent = parent; + } + return $result; + } + DartMixin._() : super(); + factory DartMixin.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory DartMixin.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'DartMixin', package: const $pb.PackageName(_omitMessageNames ? '' : 'dart_options'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'name') + ..aOS(2, _omitFieldNames ? '' : 'importFrom') + ..aOS(3, _omitFieldNames ? '' : 'parent') + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + DartMixin clone() => DartMixin()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + DartMixin copyWith(void Function(DartMixin) updates) => super.copyWith((message) => updates(message as DartMixin)) as DartMixin; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static DartMixin create() => DartMixin._(); + DartMixin createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static DartMixin getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static DartMixin? _defaultInstance; + + /// The name of the mixin class. + @$pb.TagNumber(1) + $core.String get name => $_getSZ(0); + @$pb.TagNumber(1) + set name($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasName() => $_has(0); + @$pb.TagNumber(1) + void clearName() => clearField(1); + + /// A URI pointing to the Dart library that defines the mixin. + /// The generated Dart code will use this in an import statement. + @$pb.TagNumber(2) + $core.String get importFrom => $_getSZ(1); + @$pb.TagNumber(2) + set importFrom($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasImportFrom() => $_has(1); + @$pb.TagNumber(2) + void clearImportFrom() => clearField(2); + + /// The name of another mixin to be applied ahead of this one. + /// The generated class for the message will inherit from all mixins + /// in the parent chain. + @$pb.TagNumber(3) + $core.String get parent => $_getSZ(2); + @$pb.TagNumber(3) + set parent($core.String v) { $_setString(2, v); } + @$pb.TagNumber(3) + $core.bool hasParent() => $_has(2); + @$pb.TagNumber(3) + void clearParent() => clearField(3); +} + +/// Defines additional Dart imports to be used with messages in this file. +class Imports extends $pb.GeneratedMessage { + factory Imports({ + $core.Iterable? mixins, + }) { + final $result = create(); + if (mixins != null) { + $result.mixins.addAll(mixins); + } + return $result; + } + Imports._() : super(); + factory Imports.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory Imports.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Imports', package: const $pb.PackageName(_omitMessageNames ? '' : 'dart_options'), createEmptyInstance: create) + ..pc(1, _omitFieldNames ? '' : 'mixins', $pb.PbFieldType.PM, subBuilder: DartMixin.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') + Imports clone() => Imports()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + Imports copyWith(void Function(Imports) updates) => super.copyWith((message) => updates(message as Imports)) as Imports; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static Imports create() => Imports._(); + Imports createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static Imports getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static Imports? _defaultInstance; + + /// Mixins to be used on messages in this file. + /// These mixins are in addition to internally defined mixins (e.g PbMapMixin) + /// and may override them. + /// + /// Warning: mixins are experimental. The protoc Dart plugin doesn't check + /// for name conflicts between mixin class members and generated class members, + /// so the generated code may contain errors. Therefore, running dartanalyzer + /// on the generated file is a good idea. + @$pb.TagNumber(1) + $core.List get mixins => $_getList(0); +} + +class Dart_options { + static final imports = $pb.Extension(_omitMessageNames ? '' : 'google.protobuf.FileOptions', _omitFieldNames ? '' : 'imports', 28125061, $pb.PbFieldType.OM, defaultOrMaker: Imports.getDefault, subBuilder: Imports.create); + static final defaultMixin = $pb.Extension<$core.String>(_omitMessageNames ? '' : 'google.protobuf.FileOptions', _omitFieldNames ? '' : 'defaultMixin', 96128839, $pb.PbFieldType.OS); + static final mixin = $pb.Extension<$core.String>(_omitMessageNames ? '' : 'google.protobuf.MessageOptions', _omitFieldNames ? '' : 'mixin', 96128839, $pb.PbFieldType.OS); + static final overrideGetter = $pb.Extension<$core.bool>(_omitMessageNames ? '' : 'google.protobuf.FieldOptions', _omitFieldNames ? '' : 'overrideGetter', 28205290, $pb.PbFieldType.OB); + static final overrideSetter = $pb.Extension<$core.bool>(_omitMessageNames ? '' : 'google.protobuf.FieldOptions', _omitFieldNames ? '' : 'overrideSetter', 28937366, $pb.PbFieldType.OB); + static final overrideHasMethod = $pb.Extension<$core.bool>(_omitMessageNames ? '' : 'google.protobuf.FieldOptions', _omitFieldNames ? '' : 'overrideHasMethod', 28937461, $pb.PbFieldType.OB); + static final overrideClearMethod = $pb.Extension<$core.bool>(_omitMessageNames ? '' : 'google.protobuf.FieldOptions', _omitFieldNames ? '' : 'overrideClearMethod', 28907907, $pb.PbFieldType.OB); + static final dartName = $pb.Extension<$core.String>(_omitMessageNames ? '' : 'google.protobuf.FieldOptions', _omitFieldNames ? '' : 'dartName', 28700919, $pb.PbFieldType.OS); + static void registerAllExtensions($pb.ExtensionRegistry registry) { + registry.add(imports); + registry.add(defaultMixin); + registry.add(mixin); + registry.add(overrideGetter); + registry.add(overrideSetter); + registry.add(overrideHasMethod); + registry.add(overrideClearMethod); + registry.add(dartName); + } +} + + +const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); +const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/packages/corks/lib/src/proto/dart/dart_options.pbenum.dart b/packages/corks/lib/src/proto/dart/dart_options.pbenum.dart new file mode 100644 index 00000000..8193ea48 --- /dev/null +++ b/packages/corks/lib/src/proto/dart/dart_options.pbenum.dart @@ -0,0 +1,11 @@ +// +// Generated code. Do not modify. +// source: dart/dart_options.proto +// +// @dart = 2.12 + +// 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/packages/corks/lib/src/proto/dart/dart_options.pbjson.dart b/packages/corks/lib/src/proto/dart/dart_options.pbjson.dart new file mode 100644 index 00000000..e858a6b2 --- /dev/null +++ b/packages/corks/lib/src/proto/dart/dart_options.pbjson.dart @@ -0,0 +1,43 @@ +// +// Generated code. Do not modify. +// source: dart/dart_options.proto +// +// @dart = 2.12 + +// 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 dartMixinDescriptor instead') +const DartMixin$json = { + '1': 'DartMixin', + '2': [ + {'1': 'name', '3': 1, '4': 1, '5': 9, '10': 'name'}, + {'1': 'import_from', '3': 2, '4': 1, '5': 9, '10': 'importFrom'}, + {'1': 'parent', '3': 3, '4': 1, '5': 9, '10': 'parent'}, + ], +}; + +/// Descriptor for `DartMixin`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List dartMixinDescriptor = $convert.base64Decode( + 'CglEYXJ0TWl4aW4SEgoEbmFtZRgBIAEoCVIEbmFtZRIfCgtpbXBvcnRfZnJvbRgCIAEoCVIKaW' + '1wb3J0RnJvbRIWCgZwYXJlbnQYAyABKAlSBnBhcmVudA=='); + +@$core.Deprecated('Use importsDescriptor instead') +const Imports$json = { + '1': 'Imports', + '2': [ + {'1': 'mixins', '3': 1, '4': 3, '5': 11, '6': '.dart_options.DartMixin', '10': 'mixins'}, + ], +}; + +/// Descriptor for `Imports`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List importsDescriptor = $convert.base64Decode( + 'CgdJbXBvcnRzEi8KBm1peGlucxgBIAMoCzIXLmRhcnRfb3B0aW9ucy5EYXJ0TWl4aW5SBm1peG' + 'lucw=='); + diff --git a/packages/corks/lib/src/proto/dart/dart_options.pbserver.dart b/packages/corks/lib/src/proto/dart/dart_options.pbserver.dart new file mode 100644 index 00000000..c3bb25e5 --- /dev/null +++ b/packages/corks/lib/src/proto/dart/dart_options.pbserver.dart @@ -0,0 +1,14 @@ +// +// Generated code. Do not modify. +// source: dart/dart_options.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +export 'dart_options.pb.dart'; + diff --git a/packages/corks/lib/src/proto/google/protobuf/any.pb.dart b/packages/corks/lib/src/proto/google/protobuf/any.pb.dart new file mode 100644 index 00000000..212e7c74 --- /dev/null +++ b/packages/corks/lib/src/proto/google/protobuf/any.pb.dart @@ -0,0 +1,208 @@ +// +// Generated code. Do not modify. +// source: google/protobuf/any.proto +// +// @dart = 2.12 + +// 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 { + factory Any({ + $core.String? typeUrl, + $core.List<$core.int>? value, + }) { + final $result = create(); + if (typeUrl != null) { + $result.typeUrl = typeUrl; + } + if (value != null) { + $result.value = value; + } + 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') + Any clone() => Any()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + Any copyWith(void Function(Any) updates) => super.copyWith((message) => updates(message as Any)) as Any; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static Any create() => Any._(); + Any createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static Any getDefault() => _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) + set typeUrl($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasTypeUrl() => $_has(0); + @$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) + set value($core.List<$core.int> v) { $_setBytes(1, v); } + @$pb.TagNumber(2) + $core.bool hasValue() => $_has(1); + @$pb.TagNumber(2) + void clearValue() => clearField(2); + /// Creates a new [Any] encoding [message]. + /// + /// The [typeUrl] will be [typeUrlPrefix]/`fullName` where `fullName` is + /// the fully qualified name of the type of [message]. + static Any pack($pb.GeneratedMessage message, + {$core.String typeUrlPrefix = 'type.googleapis.com'}) { + final result = create(); + $mixin.AnyMixin.packIntoAny(result, message, + typeUrlPrefix: typeUrlPrefix); + return result; + } +} + + +const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); +const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/packages/corks/lib/src/proto/google/protobuf/any.pbenum.dart b/packages/corks/lib/src/proto/google/protobuf/any.pbenum.dart new file mode 100644 index 00000000..effdb475 --- /dev/null +++ b/packages/corks/lib/src/proto/google/protobuf/any.pbenum.dart @@ -0,0 +1,11 @@ +// +// Generated code. Do not modify. +// source: google/protobuf/any.proto +// +// @dart = 2.12 + +// 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/packages/corks/lib/src/proto/google/protobuf/any.pbjson.dart b/packages/corks/lib/src/proto/google/protobuf/any.pbjson.dart new file mode 100644 index 00000000..beaeb5fa --- /dev/null +++ b/packages/corks/lib/src/proto/google/protobuf/any.pbjson.dart @@ -0,0 +1,28 @@ +// +// Generated code. Do not modify. +// source: google/protobuf/any.proto +// +// @dart = 2.12 + +// 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 = { + '1': 'Any', + '2': [ + {'1': 'type_url', '3': 1, '4': 1, '5': 9, '10': 'typeUrl'}, + {'1': 'value', '3': 2, '4': 1, '5': 12, '10': 'value'}, + ], +}; + +/// Descriptor for `Any`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List anyDescriptor = $convert.base64Decode( + 'CgNBbnkSGQoIdHlwZV91cmwYASABKAlSB3R5cGVVcmwSFAoFdmFsdWUYAiABKAxSBXZhbHVl'); + diff --git a/packages/corks/lib/src/proto/google/protobuf/any.pbserver.dart b/packages/corks/lib/src/proto/google/protobuf/any.pbserver.dart new file mode 100644 index 00000000..b332b59d --- /dev/null +++ b/packages/corks/lib/src/proto/google/protobuf/any.pbserver.dart @@ -0,0 +1,14 @@ +// +// Generated code. Do not modify. +// source: google/protobuf/any.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +export 'any.pb.dart'; + diff --git a/packages/corks/lib/src/proto/google/protobuf/descriptor.pb.dart b/packages/corks/lib/src/proto/google/protobuf/descriptor.pb.dart new file mode 100644 index 00000000..4aaf3191 --- /dev/null +++ b/packages/corks/lib/src/proto/google/protobuf/descriptor.pb.dart @@ -0,0 +1,3767 @@ +// +// Generated code. Do not modify. +// source: google/protobuf/descriptor.proto +// +// @dart = 2.12 + +// 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 'descriptor.pbenum.dart'; + +export 'descriptor.pbenum.dart'; + +/// The protocol compiler can output a FileDescriptorSet containing the .proto +/// files it parses. +class FileDescriptorSet extends $pb.GeneratedMessage { + factory FileDescriptorSet({ + $core.Iterable? file, + }) { + final $result = create(); + if (file != null) { + $result.file.addAll(file); + } + return $result; + } + FileDescriptorSet._() : super(); + factory FileDescriptorSet.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory FileDescriptorSet.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'FileDescriptorSet', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), createEmptyInstance: create) + ..pc(1, _omitFieldNames ? '' : 'file', $pb.PbFieldType.PM, subBuilder: FileDescriptorProto.create) + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + FileDescriptorSet clone() => FileDescriptorSet()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + FileDescriptorSet copyWith(void Function(FileDescriptorSet) updates) => super.copyWith((message) => updates(message as FileDescriptorSet)) as FileDescriptorSet; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static FileDescriptorSet create() => FileDescriptorSet._(); + FileDescriptorSet createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static FileDescriptorSet getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static FileDescriptorSet? _defaultInstance; + + @$pb.TagNumber(1) + $core.List get file => $_getList(0); +} + +/// Describes a complete .proto file. +class FileDescriptorProto extends $pb.GeneratedMessage { + factory FileDescriptorProto({ + $core.String? name, + $core.String? package, + $core.Iterable<$core.String>? dependency, + $core.Iterable? messageType, + $core.Iterable? enumType, + $core.Iterable? service, + $core.Iterable? extension, + FileOptions? options, + SourceCodeInfo? sourceCodeInfo, + $core.Iterable<$core.int>? publicDependency, + $core.Iterable<$core.int>? weakDependency, + $core.String? syntax, + Edition? edition, + }) { + final $result = create(); + if (name != null) { + $result.name = name; + } + if (package != null) { + $result.package = package; + } + if (dependency != null) { + $result.dependency.addAll(dependency); + } + if (messageType != null) { + $result.messageType.addAll(messageType); + } + if (enumType != null) { + $result.enumType.addAll(enumType); + } + if (service != null) { + $result.service.addAll(service); + } + if (extension != null) { + $result.extension.addAll(extension); + } + if (options != null) { + $result.options = options; + } + if (sourceCodeInfo != null) { + $result.sourceCodeInfo = sourceCodeInfo; + } + if (publicDependency != null) { + $result.publicDependency.addAll(publicDependency); + } + if (weakDependency != null) { + $result.weakDependency.addAll(weakDependency); + } + if (syntax != null) { + $result.syntax = syntax; + } + if (edition != null) { + $result.edition = edition; + } + return $result; + } + FileDescriptorProto._() : super(); + factory FileDescriptorProto.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory FileDescriptorProto.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'FileDescriptorProto', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'name') + ..aOS(2, _omitFieldNames ? '' : 'package') + ..pPS(3, _omitFieldNames ? '' : 'dependency') + ..pc(4, _omitFieldNames ? '' : 'messageType', $pb.PbFieldType.PM, subBuilder: DescriptorProto.create) + ..pc(5, _omitFieldNames ? '' : 'enumType', $pb.PbFieldType.PM, subBuilder: EnumDescriptorProto.create) + ..pc(6, _omitFieldNames ? '' : 'service', $pb.PbFieldType.PM, subBuilder: ServiceDescriptorProto.create) + ..pc(7, _omitFieldNames ? '' : 'extension', $pb.PbFieldType.PM, subBuilder: FieldDescriptorProto.create) + ..aOM(8, _omitFieldNames ? '' : 'options', subBuilder: FileOptions.create) + ..aOM(9, _omitFieldNames ? '' : 'sourceCodeInfo', subBuilder: SourceCodeInfo.create) + ..p<$core.int>(10, _omitFieldNames ? '' : 'publicDependency', $pb.PbFieldType.P3) + ..p<$core.int>(11, _omitFieldNames ? '' : 'weakDependency', $pb.PbFieldType.P3) + ..aOS(12, _omitFieldNames ? '' : 'syntax') + ..e(14, _omitFieldNames ? '' : 'edition', $pb.PbFieldType.OE, defaultOrMaker: Edition.EDITION_UNKNOWN, valueOf: Edition.valueOf, enumValues: Edition.values) + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + FileDescriptorProto clone() => FileDescriptorProto()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + FileDescriptorProto copyWith(void Function(FileDescriptorProto) updates) => super.copyWith((message) => updates(message as FileDescriptorProto)) as FileDescriptorProto; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static FileDescriptorProto create() => FileDescriptorProto._(); + FileDescriptorProto createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static FileDescriptorProto getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static FileDescriptorProto? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get name => $_getSZ(0); + @$pb.TagNumber(1) + set name($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasName() => $_has(0); + @$pb.TagNumber(1) + void clearName() => clearField(1); + + @$pb.TagNumber(2) + $core.String get package => $_getSZ(1); + @$pb.TagNumber(2) + set package($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasPackage() => $_has(1); + @$pb.TagNumber(2) + void clearPackage() => clearField(2); + + /// Names of files imported by this file. + @$pb.TagNumber(3) + $core.List<$core.String> get dependency => $_getList(2); + + /// All top-level definitions in this file. + @$pb.TagNumber(4) + $core.List get messageType => $_getList(3); + + @$pb.TagNumber(5) + $core.List get enumType => $_getList(4); + + @$pb.TagNumber(6) + $core.List get service => $_getList(5); + + @$pb.TagNumber(7) + $core.List get extension => $_getList(6); + + @$pb.TagNumber(8) + FileOptions get options => $_getN(7); + @$pb.TagNumber(8) + set options(FileOptions v) { setField(8, v); } + @$pb.TagNumber(8) + $core.bool hasOptions() => $_has(7); + @$pb.TagNumber(8) + void clearOptions() => clearField(8); + @$pb.TagNumber(8) + FileOptions ensureOptions() => $_ensure(7); + + /// This field contains optional information about the original source code. + /// You may safely remove this entire field without harming runtime + /// functionality of the descriptors -- the information is needed only by + /// development tools. + @$pb.TagNumber(9) + SourceCodeInfo get sourceCodeInfo => $_getN(8); + @$pb.TagNumber(9) + set sourceCodeInfo(SourceCodeInfo v) { setField(9, v); } + @$pb.TagNumber(9) + $core.bool hasSourceCodeInfo() => $_has(8); + @$pb.TagNumber(9) + void clearSourceCodeInfo() => clearField(9); + @$pb.TagNumber(9) + SourceCodeInfo ensureSourceCodeInfo() => $_ensure(8); + + /// Indexes of the public imported files in the dependency list above. + @$pb.TagNumber(10) + $core.List<$core.int> get publicDependency => $_getList(9); + + /// Indexes of the weak imported files in the dependency list. + /// For Google-internal migration only. Do not use. + @$pb.TagNumber(11) + $core.List<$core.int> get weakDependency => $_getList(10); + + /// The syntax of the proto file. + /// The supported values are "proto2", "proto3", and "editions". + /// + /// If `edition` is present, this value must be "editions". + @$pb.TagNumber(12) + $core.String get syntax => $_getSZ(11); + @$pb.TagNumber(12) + set syntax($core.String v) { $_setString(11, v); } + @$pb.TagNumber(12) + $core.bool hasSyntax() => $_has(11); + @$pb.TagNumber(12) + void clearSyntax() => clearField(12); + + /// The edition of the proto file. + @$pb.TagNumber(14) + Edition get edition => $_getN(12); + @$pb.TagNumber(14) + set edition(Edition v) { setField(14, v); } + @$pb.TagNumber(14) + $core.bool hasEdition() => $_has(12); + @$pb.TagNumber(14) + void clearEdition() => clearField(14); +} + +class DescriptorProto_ExtensionRange extends $pb.GeneratedMessage { + factory DescriptorProto_ExtensionRange({ + $core.int? start, + $core.int? end, + ExtensionRangeOptions? options, + }) { + final $result = create(); + if (start != null) { + $result.start = start; + } + if (end != null) { + $result.end = end; + } + if (options != null) { + $result.options = options; + } + return $result; + } + DescriptorProto_ExtensionRange._() : super(); + factory DescriptorProto_ExtensionRange.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory DescriptorProto_ExtensionRange.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'DescriptorProto.ExtensionRange', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), createEmptyInstance: create) + ..a<$core.int>(1, _omitFieldNames ? '' : 'start', $pb.PbFieldType.O3) + ..a<$core.int>(2, _omitFieldNames ? '' : 'end', $pb.PbFieldType.O3) + ..aOM(3, _omitFieldNames ? '' : 'options', subBuilder: ExtensionRangeOptions.create) + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + DescriptorProto_ExtensionRange clone() => DescriptorProto_ExtensionRange()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + DescriptorProto_ExtensionRange copyWith(void Function(DescriptorProto_ExtensionRange) updates) => super.copyWith((message) => updates(message as DescriptorProto_ExtensionRange)) as DescriptorProto_ExtensionRange; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static DescriptorProto_ExtensionRange create() => DescriptorProto_ExtensionRange._(); + DescriptorProto_ExtensionRange createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static DescriptorProto_ExtensionRange getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static DescriptorProto_ExtensionRange? _defaultInstance; + + @$pb.TagNumber(1) + $core.int get start => $_getIZ(0); + @$pb.TagNumber(1) + set start($core.int v) { $_setSignedInt32(0, v); } + @$pb.TagNumber(1) + $core.bool hasStart() => $_has(0); + @$pb.TagNumber(1) + void clearStart() => clearField(1); + + @$pb.TagNumber(2) + $core.int get end => $_getIZ(1); + @$pb.TagNumber(2) + set end($core.int v) { $_setSignedInt32(1, v); } + @$pb.TagNumber(2) + $core.bool hasEnd() => $_has(1); + @$pb.TagNumber(2) + void clearEnd() => clearField(2); + + @$pb.TagNumber(3) + ExtensionRangeOptions get options => $_getN(2); + @$pb.TagNumber(3) + set options(ExtensionRangeOptions v) { setField(3, v); } + @$pb.TagNumber(3) + $core.bool hasOptions() => $_has(2); + @$pb.TagNumber(3) + void clearOptions() => clearField(3); + @$pb.TagNumber(3) + ExtensionRangeOptions ensureOptions() => $_ensure(2); +} + +/// Range of reserved tag numbers. Reserved tag numbers may not be used by +/// fields or extension ranges in the same message. Reserved ranges may +/// not overlap. +class DescriptorProto_ReservedRange extends $pb.GeneratedMessage { + factory DescriptorProto_ReservedRange({ + $core.int? start, + $core.int? end, + }) { + final $result = create(); + if (start != null) { + $result.start = start; + } + if (end != null) { + $result.end = end; + } + return $result; + } + DescriptorProto_ReservedRange._() : super(); + factory DescriptorProto_ReservedRange.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory DescriptorProto_ReservedRange.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'DescriptorProto.ReservedRange', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), createEmptyInstance: create) + ..a<$core.int>(1, _omitFieldNames ? '' : 'start', $pb.PbFieldType.O3) + ..a<$core.int>(2, _omitFieldNames ? '' : 'end', $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') + DescriptorProto_ReservedRange clone() => DescriptorProto_ReservedRange()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + DescriptorProto_ReservedRange copyWith(void Function(DescriptorProto_ReservedRange) updates) => super.copyWith((message) => updates(message as DescriptorProto_ReservedRange)) as DescriptorProto_ReservedRange; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static DescriptorProto_ReservedRange create() => DescriptorProto_ReservedRange._(); + DescriptorProto_ReservedRange createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static DescriptorProto_ReservedRange getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static DescriptorProto_ReservedRange? _defaultInstance; + + @$pb.TagNumber(1) + $core.int get start => $_getIZ(0); + @$pb.TagNumber(1) + set start($core.int v) { $_setSignedInt32(0, v); } + @$pb.TagNumber(1) + $core.bool hasStart() => $_has(0); + @$pb.TagNumber(1) + void clearStart() => clearField(1); + + @$pb.TagNumber(2) + $core.int get end => $_getIZ(1); + @$pb.TagNumber(2) + set end($core.int v) { $_setSignedInt32(1, v); } + @$pb.TagNumber(2) + $core.bool hasEnd() => $_has(1); + @$pb.TagNumber(2) + void clearEnd() => clearField(2); +} + +/// Describes a message type. +class DescriptorProto extends $pb.GeneratedMessage { + factory DescriptorProto({ + $core.String? name, + $core.Iterable? field, + $core.Iterable? nestedType, + $core.Iterable? enumType, + $core.Iterable? extensionRange, + $core.Iterable? extension, + MessageOptions? options, + $core.Iterable? oneofDecl, + $core.Iterable? reservedRange, + $core.Iterable<$core.String>? reservedName, + }) { + final $result = create(); + if (name != null) { + $result.name = name; + } + if (field != null) { + $result.field.addAll(field); + } + if (nestedType != null) { + $result.nestedType.addAll(nestedType); + } + if (enumType != null) { + $result.enumType.addAll(enumType); + } + if (extensionRange != null) { + $result.extensionRange.addAll(extensionRange); + } + if (extension != null) { + $result.extension.addAll(extension); + } + if (options != null) { + $result.options = options; + } + if (oneofDecl != null) { + $result.oneofDecl.addAll(oneofDecl); + } + if (reservedRange != null) { + $result.reservedRange.addAll(reservedRange); + } + if (reservedName != null) { + $result.reservedName.addAll(reservedName); + } + return $result; + } + DescriptorProto._() : super(); + factory DescriptorProto.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory DescriptorProto.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'DescriptorProto', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'name') + ..pc(2, _omitFieldNames ? '' : 'field', $pb.PbFieldType.PM, subBuilder: FieldDescriptorProto.create) + ..pc(3, _omitFieldNames ? '' : 'nestedType', $pb.PbFieldType.PM, subBuilder: DescriptorProto.create) + ..pc(4, _omitFieldNames ? '' : 'enumType', $pb.PbFieldType.PM, subBuilder: EnumDescriptorProto.create) + ..pc(5, _omitFieldNames ? '' : 'extensionRange', $pb.PbFieldType.PM, subBuilder: DescriptorProto_ExtensionRange.create) + ..pc(6, _omitFieldNames ? '' : 'extension', $pb.PbFieldType.PM, subBuilder: FieldDescriptorProto.create) + ..aOM(7, _omitFieldNames ? '' : 'options', subBuilder: MessageOptions.create) + ..pc(8, _omitFieldNames ? '' : 'oneofDecl', $pb.PbFieldType.PM, subBuilder: OneofDescriptorProto.create) + ..pc(9, _omitFieldNames ? '' : 'reservedRange', $pb.PbFieldType.PM, subBuilder: DescriptorProto_ReservedRange.create) + ..pPS(10, _omitFieldNames ? '' : 'reservedName') + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + DescriptorProto clone() => DescriptorProto()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + DescriptorProto copyWith(void Function(DescriptorProto) updates) => super.copyWith((message) => updates(message as DescriptorProto)) as DescriptorProto; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static DescriptorProto create() => DescriptorProto._(); + DescriptorProto createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static DescriptorProto getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static DescriptorProto? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get name => $_getSZ(0); + @$pb.TagNumber(1) + set name($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasName() => $_has(0); + @$pb.TagNumber(1) + void clearName() => clearField(1); + + @$pb.TagNumber(2) + $core.List get field => $_getList(1); + + @$pb.TagNumber(3) + $core.List get nestedType => $_getList(2); + + @$pb.TagNumber(4) + $core.List get enumType => $_getList(3); + + @$pb.TagNumber(5) + $core.List get extensionRange => $_getList(4); + + @$pb.TagNumber(6) + $core.List get extension => $_getList(5); + + @$pb.TagNumber(7) + MessageOptions get options => $_getN(6); + @$pb.TagNumber(7) + set options(MessageOptions v) { setField(7, v); } + @$pb.TagNumber(7) + $core.bool hasOptions() => $_has(6); + @$pb.TagNumber(7) + void clearOptions() => clearField(7); + @$pb.TagNumber(7) + MessageOptions ensureOptions() => $_ensure(6); + + @$pb.TagNumber(8) + $core.List get oneofDecl => $_getList(7); + + @$pb.TagNumber(9) + $core.List get reservedRange => $_getList(8); + + /// Reserved field names, which may not be used by fields in the same message. + /// A given name may only be reserved once. + @$pb.TagNumber(10) + $core.List<$core.String> get reservedName => $_getList(9); +} + +class ExtensionRangeOptions_Declaration extends $pb.GeneratedMessage { + factory ExtensionRangeOptions_Declaration({ + $core.int? number, + $core.String? fullName, + $core.String? type, + $core.bool? reserved, + $core.bool? repeated, + }) { + final $result = create(); + if (number != null) { + $result.number = number; + } + if (fullName != null) { + $result.fullName = fullName; + } + if (type != null) { + $result.type = type; + } + if (reserved != null) { + $result.reserved = reserved; + } + if (repeated != null) { + $result.repeated = repeated; + } + return $result; + } + ExtensionRangeOptions_Declaration._() : super(); + factory ExtensionRangeOptions_Declaration.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ExtensionRangeOptions_Declaration.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ExtensionRangeOptions.Declaration', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), createEmptyInstance: create) + ..a<$core.int>(1, _omitFieldNames ? '' : 'number', $pb.PbFieldType.O3) + ..aOS(2, _omitFieldNames ? '' : 'fullName') + ..aOS(3, _omitFieldNames ? '' : 'type') + ..aOB(5, _omitFieldNames ? '' : 'reserved') + ..aOB(6, _omitFieldNames ? '' : 'repeated') + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + ExtensionRangeOptions_Declaration clone() => ExtensionRangeOptions_Declaration()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + ExtensionRangeOptions_Declaration copyWith(void Function(ExtensionRangeOptions_Declaration) updates) => super.copyWith((message) => updates(message as ExtensionRangeOptions_Declaration)) as ExtensionRangeOptions_Declaration; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static ExtensionRangeOptions_Declaration create() => ExtensionRangeOptions_Declaration._(); + ExtensionRangeOptions_Declaration createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static ExtensionRangeOptions_Declaration getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static ExtensionRangeOptions_Declaration? _defaultInstance; + + /// The extension number declared within the extension range. + @$pb.TagNumber(1) + $core.int get number => $_getIZ(0); + @$pb.TagNumber(1) + set number($core.int v) { $_setSignedInt32(0, v); } + @$pb.TagNumber(1) + $core.bool hasNumber() => $_has(0); + @$pb.TagNumber(1) + void clearNumber() => clearField(1); + + /// The fully-qualified name of the extension field. There must be a leading + /// dot in front of the full name. + @$pb.TagNumber(2) + $core.String get fullName => $_getSZ(1); + @$pb.TagNumber(2) + set fullName($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasFullName() => $_has(1); + @$pb.TagNumber(2) + void clearFullName() => clearField(2); + + /// The fully-qualified type name of the extension field. Unlike + /// Metadata.type, Declaration.type must have a leading dot for messages + /// and enums. + @$pb.TagNumber(3) + $core.String get type => $_getSZ(2); + @$pb.TagNumber(3) + set type($core.String v) { $_setString(2, v); } + @$pb.TagNumber(3) + $core.bool hasType() => $_has(2); + @$pb.TagNumber(3) + void clearType() => clearField(3); + + /// If true, indicates that the number is reserved in the extension range, + /// and any extension field with the number will fail to compile. Set this + /// when a declared extension field is deleted. + @$pb.TagNumber(5) + $core.bool get reserved => $_getBF(3); + @$pb.TagNumber(5) + set reserved($core.bool v) { $_setBool(3, v); } + @$pb.TagNumber(5) + $core.bool hasReserved() => $_has(3); + @$pb.TagNumber(5) + void clearReserved() => clearField(5); + + /// If true, indicates that the extension must be defined as repeated. + /// Otherwise the extension must be defined as optional. + @$pb.TagNumber(6) + $core.bool get repeated => $_getBF(4); + @$pb.TagNumber(6) + set repeated($core.bool v) { $_setBool(4, v); } + @$pb.TagNumber(6) + $core.bool hasRepeated() => $_has(4); + @$pb.TagNumber(6) + void clearRepeated() => clearField(6); +} + +class ExtensionRangeOptions extends $pb.GeneratedMessage { + factory ExtensionRangeOptions({ + $core.Iterable? declaration, + ExtensionRangeOptions_VerificationState? verification, + FeatureSet? features, + $core.Iterable? uninterpretedOption, + }) { + final $result = create(); + if (declaration != null) { + $result.declaration.addAll(declaration); + } + if (verification != null) { + $result.verification = verification; + } + if (features != null) { + $result.features = features; + } + if (uninterpretedOption != null) { + $result.uninterpretedOption.addAll(uninterpretedOption); + } + return $result; + } + ExtensionRangeOptions._() : super(); + factory ExtensionRangeOptions.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ExtensionRangeOptions.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ExtensionRangeOptions', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), createEmptyInstance: create) + ..pc(2, _omitFieldNames ? '' : 'declaration', $pb.PbFieldType.PM, subBuilder: ExtensionRangeOptions_Declaration.create) + ..e(3, _omitFieldNames ? '' : 'verification', $pb.PbFieldType.OE, defaultOrMaker: ExtensionRangeOptions_VerificationState.UNVERIFIED, valueOf: ExtensionRangeOptions_VerificationState.valueOf, enumValues: ExtensionRangeOptions_VerificationState.values) + ..aOM(50, _omitFieldNames ? '' : 'features', subBuilder: FeatureSet.create) + ..pc(999, _omitFieldNames ? '' : 'uninterpretedOption', $pb.PbFieldType.PM, subBuilder: UninterpretedOption.create) + ..hasExtensions = true + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + ExtensionRangeOptions clone() => ExtensionRangeOptions()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + ExtensionRangeOptions copyWith(void Function(ExtensionRangeOptions) updates) => super.copyWith((message) => updates(message as ExtensionRangeOptions)) as ExtensionRangeOptions; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static ExtensionRangeOptions create() => ExtensionRangeOptions._(); + ExtensionRangeOptions createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static ExtensionRangeOptions getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static ExtensionRangeOptions? _defaultInstance; + + /// For external users: DO NOT USE. We are in the process of open sourcing + /// extension declaration and executing internal cleanups before it can be + /// used externally. + @$pb.TagNumber(2) + $core.List get declaration => $_getList(0); + + /// The verification state of the range. + /// TODO: flip the default to DECLARATION once all empty ranges + /// are marked as UNVERIFIED. + @$pb.TagNumber(3) + ExtensionRangeOptions_VerificationState get verification => $_getN(1); + @$pb.TagNumber(3) + set verification(ExtensionRangeOptions_VerificationState v) { setField(3, v); } + @$pb.TagNumber(3) + $core.bool hasVerification() => $_has(1); + @$pb.TagNumber(3) + void clearVerification() => clearField(3); + + /// Any features defined in the specific edition. + @$pb.TagNumber(50) + FeatureSet get features => $_getN(2); + @$pb.TagNumber(50) + set features(FeatureSet v) { setField(50, v); } + @$pb.TagNumber(50) + $core.bool hasFeatures() => $_has(2); + @$pb.TagNumber(50) + void clearFeatures() => clearField(50); + @$pb.TagNumber(50) + FeatureSet ensureFeatures() => $_ensure(2); + + /// The parser stores options it doesn't recognize here. See above. + @$pb.TagNumber(999) + $core.List get uninterpretedOption => $_getList(3); +} + +/// Describes a field within a message. +class FieldDescriptorProto extends $pb.GeneratedMessage { + factory FieldDescriptorProto({ + $core.String? name, + $core.String? extendee, + $core.int? number, + FieldDescriptorProto_Label? label, + FieldDescriptorProto_Type? type, + $core.String? typeName, + $core.String? defaultValue, + FieldOptions? options, + $core.int? oneofIndex, + $core.String? jsonName, + $core.bool? proto3Optional, + }) { + final $result = create(); + if (name != null) { + $result.name = name; + } + if (extendee != null) { + $result.extendee = extendee; + } + if (number != null) { + $result.number = number; + } + if (label != null) { + $result.label = label; + } + if (type != null) { + $result.type = type; + } + if (typeName != null) { + $result.typeName = typeName; + } + if (defaultValue != null) { + $result.defaultValue = defaultValue; + } + if (options != null) { + $result.options = options; + } + if (oneofIndex != null) { + $result.oneofIndex = oneofIndex; + } + if (jsonName != null) { + $result.jsonName = jsonName; + } + if (proto3Optional != null) { + $result.proto3Optional = proto3Optional; + } + return $result; + } + FieldDescriptorProto._() : super(); + factory FieldDescriptorProto.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory FieldDescriptorProto.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'FieldDescriptorProto', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'name') + ..aOS(2, _omitFieldNames ? '' : 'extendee') + ..a<$core.int>(3, _omitFieldNames ? '' : 'number', $pb.PbFieldType.O3) + ..e(4, _omitFieldNames ? '' : 'label', $pb.PbFieldType.OE, defaultOrMaker: FieldDescriptorProto_Label.LABEL_OPTIONAL, valueOf: FieldDescriptorProto_Label.valueOf, enumValues: FieldDescriptorProto_Label.values) + ..e(5, _omitFieldNames ? '' : 'type', $pb.PbFieldType.OE, defaultOrMaker: FieldDescriptorProto_Type.TYPE_DOUBLE, valueOf: FieldDescriptorProto_Type.valueOf, enumValues: FieldDescriptorProto_Type.values) + ..aOS(6, _omitFieldNames ? '' : 'typeName') + ..aOS(7, _omitFieldNames ? '' : 'defaultValue') + ..aOM(8, _omitFieldNames ? '' : 'options', subBuilder: FieldOptions.create) + ..a<$core.int>(9, _omitFieldNames ? '' : 'oneofIndex', $pb.PbFieldType.O3) + ..aOS(10, _omitFieldNames ? '' : 'jsonName') + ..aOB(17, _omitFieldNames ? '' : 'proto3Optional') + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + FieldDescriptorProto clone() => FieldDescriptorProto()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + FieldDescriptorProto copyWith(void Function(FieldDescriptorProto) updates) => super.copyWith((message) => updates(message as FieldDescriptorProto)) as FieldDescriptorProto; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static FieldDescriptorProto create() => FieldDescriptorProto._(); + FieldDescriptorProto createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static FieldDescriptorProto getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static FieldDescriptorProto? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get name => $_getSZ(0); + @$pb.TagNumber(1) + set name($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasName() => $_has(0); + @$pb.TagNumber(1) + void clearName() => clearField(1); + + /// For extensions, this is the name of the type being extended. It is + /// resolved in the same manner as type_name. + @$pb.TagNumber(2) + $core.String get extendee => $_getSZ(1); + @$pb.TagNumber(2) + set extendee($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasExtendee() => $_has(1); + @$pb.TagNumber(2) + void clearExtendee() => clearField(2); + + @$pb.TagNumber(3) + $core.int get number => $_getIZ(2); + @$pb.TagNumber(3) + set number($core.int v) { $_setSignedInt32(2, v); } + @$pb.TagNumber(3) + $core.bool hasNumber() => $_has(2); + @$pb.TagNumber(3) + void clearNumber() => clearField(3); + + @$pb.TagNumber(4) + FieldDescriptorProto_Label get label => $_getN(3); + @$pb.TagNumber(4) + set label(FieldDescriptorProto_Label v) { setField(4, v); } + @$pb.TagNumber(4) + $core.bool hasLabel() => $_has(3); + @$pb.TagNumber(4) + void clearLabel() => clearField(4); + + /// If type_name is set, this need not be set. If both this and type_name + /// are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. + @$pb.TagNumber(5) + FieldDescriptorProto_Type get type => $_getN(4); + @$pb.TagNumber(5) + set type(FieldDescriptorProto_Type v) { setField(5, v); } + @$pb.TagNumber(5) + $core.bool hasType() => $_has(4); + @$pb.TagNumber(5) + void clearType() => clearField(5); + + /// For message and enum types, this is the name of the type. If the name + /// starts with a '.', it is fully-qualified. Otherwise, C++-like scoping + /// rules are used to find the type (i.e. first the nested types within this + /// message are searched, then within the parent, on up to the root + /// namespace). + @$pb.TagNumber(6) + $core.String get typeName => $_getSZ(5); + @$pb.TagNumber(6) + set typeName($core.String v) { $_setString(5, v); } + @$pb.TagNumber(6) + $core.bool hasTypeName() => $_has(5); + @$pb.TagNumber(6) + void clearTypeName() => clearField(6); + + /// For numeric types, contains the original text representation of the value. + /// For booleans, "true" or "false". + /// For strings, contains the default text contents (not escaped in any way). + /// For bytes, contains the C escaped value. All bytes >= 128 are escaped. + @$pb.TagNumber(7) + $core.String get defaultValue => $_getSZ(6); + @$pb.TagNumber(7) + set defaultValue($core.String v) { $_setString(6, v); } + @$pb.TagNumber(7) + $core.bool hasDefaultValue() => $_has(6); + @$pb.TagNumber(7) + void clearDefaultValue() => clearField(7); + + @$pb.TagNumber(8) + FieldOptions get options => $_getN(7); + @$pb.TagNumber(8) + set options(FieldOptions v) { setField(8, v); } + @$pb.TagNumber(8) + $core.bool hasOptions() => $_has(7); + @$pb.TagNumber(8) + void clearOptions() => clearField(8); + @$pb.TagNumber(8) + FieldOptions ensureOptions() => $_ensure(7); + + /// If set, gives the index of a oneof in the containing type's oneof_decl + /// list. This field is a member of that oneof. + @$pb.TagNumber(9) + $core.int get oneofIndex => $_getIZ(8); + @$pb.TagNumber(9) + set oneofIndex($core.int v) { $_setSignedInt32(8, v); } + @$pb.TagNumber(9) + $core.bool hasOneofIndex() => $_has(8); + @$pb.TagNumber(9) + void clearOneofIndex() => clearField(9); + + /// JSON name of this field. The value is set by protocol compiler. If the + /// user has set a "json_name" option on this field, that option's value + /// will be used. Otherwise, it's deduced from the field's name by converting + /// it to camelCase. + @$pb.TagNumber(10) + $core.String get jsonName => $_getSZ(9); + @$pb.TagNumber(10) + set jsonName($core.String v) { $_setString(9, v); } + @$pb.TagNumber(10) + $core.bool hasJsonName() => $_has(9); + @$pb.TagNumber(10) + void clearJsonName() => clearField(10); + + /// If true, this is a proto3 "optional". When a proto3 field is optional, it + /// tracks presence regardless of field type. + /// + /// When proto3_optional is true, this field must be belong to a oneof to + /// signal to old proto3 clients that presence is tracked for this field. This + /// oneof is known as a "synthetic" oneof, and this field must be its sole + /// member (each proto3 optional field gets its own synthetic oneof). Synthetic + /// oneofs exist in the descriptor only, and do not generate any API. Synthetic + /// oneofs must be ordered after all "real" oneofs. + /// + /// For message fields, proto3_optional doesn't create any semantic change, + /// since non-repeated message fields always track presence. However it still + /// indicates the semantic detail of whether the user wrote "optional" or not. + /// This can be useful for round-tripping the .proto file. For consistency we + /// give message fields a synthetic oneof also, even though it is not required + /// to track presence. This is especially important because the parser can't + /// tell if a field is a message or an enum, so it must always create a + /// synthetic oneof. + /// + /// Proto2 optional fields do not set this flag, because they already indicate + /// optional with `LABEL_OPTIONAL`. + @$pb.TagNumber(17) + $core.bool get proto3Optional => $_getBF(10); + @$pb.TagNumber(17) + set proto3Optional($core.bool v) { $_setBool(10, v); } + @$pb.TagNumber(17) + $core.bool hasProto3Optional() => $_has(10); + @$pb.TagNumber(17) + void clearProto3Optional() => clearField(17); +} + +/// Describes a oneof. +class OneofDescriptorProto extends $pb.GeneratedMessage { + factory OneofDescriptorProto({ + $core.String? name, + OneofOptions? options, + }) { + final $result = create(); + if (name != null) { + $result.name = name; + } + if (options != null) { + $result.options = options; + } + return $result; + } + OneofDescriptorProto._() : super(); + factory OneofDescriptorProto.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory OneofDescriptorProto.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'OneofDescriptorProto', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'name') + ..aOM(2, _omitFieldNames ? '' : 'options', subBuilder: OneofOptions.create) + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + OneofDescriptorProto clone() => OneofDescriptorProto()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + OneofDescriptorProto copyWith(void Function(OneofDescriptorProto) updates) => super.copyWith((message) => updates(message as OneofDescriptorProto)) as OneofDescriptorProto; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static OneofDescriptorProto create() => OneofDescriptorProto._(); + OneofDescriptorProto createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static OneofDescriptorProto getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static OneofDescriptorProto? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get name => $_getSZ(0); + @$pb.TagNumber(1) + set name($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasName() => $_has(0); + @$pb.TagNumber(1) + void clearName() => clearField(1); + + @$pb.TagNumber(2) + OneofOptions get options => $_getN(1); + @$pb.TagNumber(2) + set options(OneofOptions v) { setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasOptions() => $_has(1); + @$pb.TagNumber(2) + void clearOptions() => clearField(2); + @$pb.TagNumber(2) + OneofOptions ensureOptions() => $_ensure(1); +} + +/// Range of reserved numeric values. Reserved values may not be used by +/// entries in the same enum. Reserved ranges may not overlap. +/// +/// Note that this is distinct from DescriptorProto.ReservedRange in that it +/// is inclusive such that it can appropriately represent the entire int32 +/// domain. +class EnumDescriptorProto_EnumReservedRange extends $pb.GeneratedMessage { + factory EnumDescriptorProto_EnumReservedRange({ + $core.int? start, + $core.int? end, + }) { + final $result = create(); + if (start != null) { + $result.start = start; + } + if (end != null) { + $result.end = end; + } + return $result; + } + EnumDescriptorProto_EnumReservedRange._() : super(); + factory EnumDescriptorProto_EnumReservedRange.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory EnumDescriptorProto_EnumReservedRange.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'EnumDescriptorProto.EnumReservedRange', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), createEmptyInstance: create) + ..a<$core.int>(1, _omitFieldNames ? '' : 'start', $pb.PbFieldType.O3) + ..a<$core.int>(2, _omitFieldNames ? '' : 'end', $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') + EnumDescriptorProto_EnumReservedRange clone() => EnumDescriptorProto_EnumReservedRange()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + EnumDescriptorProto_EnumReservedRange copyWith(void Function(EnumDescriptorProto_EnumReservedRange) updates) => super.copyWith((message) => updates(message as EnumDescriptorProto_EnumReservedRange)) as EnumDescriptorProto_EnumReservedRange; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static EnumDescriptorProto_EnumReservedRange create() => EnumDescriptorProto_EnumReservedRange._(); + EnumDescriptorProto_EnumReservedRange createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static EnumDescriptorProto_EnumReservedRange getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static EnumDescriptorProto_EnumReservedRange? _defaultInstance; + + @$pb.TagNumber(1) + $core.int get start => $_getIZ(0); + @$pb.TagNumber(1) + set start($core.int v) { $_setSignedInt32(0, v); } + @$pb.TagNumber(1) + $core.bool hasStart() => $_has(0); + @$pb.TagNumber(1) + void clearStart() => clearField(1); + + @$pb.TagNumber(2) + $core.int get end => $_getIZ(1); + @$pb.TagNumber(2) + set end($core.int v) { $_setSignedInt32(1, v); } + @$pb.TagNumber(2) + $core.bool hasEnd() => $_has(1); + @$pb.TagNumber(2) + void clearEnd() => clearField(2); +} + +/// Describes an enum type. +class EnumDescriptorProto extends $pb.GeneratedMessage { + factory EnumDescriptorProto({ + $core.String? name, + $core.Iterable? value, + EnumOptions? options, + $core.Iterable? reservedRange, + $core.Iterable<$core.String>? reservedName, + }) { + final $result = create(); + if (name != null) { + $result.name = name; + } + if (value != null) { + $result.value.addAll(value); + } + if (options != null) { + $result.options = options; + } + if (reservedRange != null) { + $result.reservedRange.addAll(reservedRange); + } + if (reservedName != null) { + $result.reservedName.addAll(reservedName); + } + return $result; + } + EnumDescriptorProto._() : super(); + factory EnumDescriptorProto.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory EnumDescriptorProto.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'EnumDescriptorProto', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'name') + ..pc(2, _omitFieldNames ? '' : 'value', $pb.PbFieldType.PM, subBuilder: EnumValueDescriptorProto.create) + ..aOM(3, _omitFieldNames ? '' : 'options', subBuilder: EnumOptions.create) + ..pc(4, _omitFieldNames ? '' : 'reservedRange', $pb.PbFieldType.PM, subBuilder: EnumDescriptorProto_EnumReservedRange.create) + ..pPS(5, _omitFieldNames ? '' : 'reservedName') + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + EnumDescriptorProto clone() => EnumDescriptorProto()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + EnumDescriptorProto copyWith(void Function(EnumDescriptorProto) updates) => super.copyWith((message) => updates(message as EnumDescriptorProto)) as EnumDescriptorProto; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static EnumDescriptorProto create() => EnumDescriptorProto._(); + EnumDescriptorProto createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static EnumDescriptorProto getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static EnumDescriptorProto? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get name => $_getSZ(0); + @$pb.TagNumber(1) + set name($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasName() => $_has(0); + @$pb.TagNumber(1) + void clearName() => clearField(1); + + @$pb.TagNumber(2) + $core.List get value => $_getList(1); + + @$pb.TagNumber(3) + EnumOptions get options => $_getN(2); + @$pb.TagNumber(3) + set options(EnumOptions v) { setField(3, v); } + @$pb.TagNumber(3) + $core.bool hasOptions() => $_has(2); + @$pb.TagNumber(3) + void clearOptions() => clearField(3); + @$pb.TagNumber(3) + EnumOptions ensureOptions() => $_ensure(2); + + /// Range of reserved numeric values. Reserved numeric values may not be used + /// by enum values in the same enum declaration. Reserved ranges may not + /// overlap. + @$pb.TagNumber(4) + $core.List get reservedRange => $_getList(3); + + /// Reserved enum value names, which may not be reused. A given name may only + /// be reserved once. + @$pb.TagNumber(5) + $core.List<$core.String> get reservedName => $_getList(4); +} + +/// Describes a value within an enum. +class EnumValueDescriptorProto extends $pb.GeneratedMessage { + factory EnumValueDescriptorProto({ + $core.String? name, + $core.int? number, + EnumValueOptions? options, + }) { + final $result = create(); + if (name != null) { + $result.name = name; + } + if (number != null) { + $result.number = number; + } + if (options != null) { + $result.options = options; + } + return $result; + } + EnumValueDescriptorProto._() : super(); + factory EnumValueDescriptorProto.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory EnumValueDescriptorProto.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'EnumValueDescriptorProto', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'name') + ..a<$core.int>(2, _omitFieldNames ? '' : 'number', $pb.PbFieldType.O3) + ..aOM(3, _omitFieldNames ? '' : 'options', subBuilder: EnumValueOptions.create) + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + EnumValueDescriptorProto clone() => EnumValueDescriptorProto()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + EnumValueDescriptorProto copyWith(void Function(EnumValueDescriptorProto) updates) => super.copyWith((message) => updates(message as EnumValueDescriptorProto)) as EnumValueDescriptorProto; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static EnumValueDescriptorProto create() => EnumValueDescriptorProto._(); + EnumValueDescriptorProto createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static EnumValueDescriptorProto getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static EnumValueDescriptorProto? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get name => $_getSZ(0); + @$pb.TagNumber(1) + set name($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasName() => $_has(0); + @$pb.TagNumber(1) + void clearName() => clearField(1); + + @$pb.TagNumber(2) + $core.int get number => $_getIZ(1); + @$pb.TagNumber(2) + set number($core.int v) { $_setSignedInt32(1, v); } + @$pb.TagNumber(2) + $core.bool hasNumber() => $_has(1); + @$pb.TagNumber(2) + void clearNumber() => clearField(2); + + @$pb.TagNumber(3) + EnumValueOptions get options => $_getN(2); + @$pb.TagNumber(3) + set options(EnumValueOptions v) { setField(3, v); } + @$pb.TagNumber(3) + $core.bool hasOptions() => $_has(2); + @$pb.TagNumber(3) + void clearOptions() => clearField(3); + @$pb.TagNumber(3) + EnumValueOptions ensureOptions() => $_ensure(2); +} + +/// Describes a service. +class ServiceDescriptorProto extends $pb.GeneratedMessage { + factory ServiceDescriptorProto({ + $core.String? name, + $core.Iterable? method, + ServiceOptions? options, + }) { + final $result = create(); + if (name != null) { + $result.name = name; + } + if (method != null) { + $result.method.addAll(method); + } + if (options != null) { + $result.options = options; + } + return $result; + } + ServiceDescriptorProto._() : super(); + factory ServiceDescriptorProto.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ServiceDescriptorProto.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ServiceDescriptorProto', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'name') + ..pc(2, _omitFieldNames ? '' : 'method', $pb.PbFieldType.PM, subBuilder: MethodDescriptorProto.create) + ..aOM(3, _omitFieldNames ? '' : 'options', subBuilder: ServiceOptions.create) + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + ServiceDescriptorProto clone() => ServiceDescriptorProto()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + ServiceDescriptorProto copyWith(void Function(ServiceDescriptorProto) updates) => super.copyWith((message) => updates(message as ServiceDescriptorProto)) as ServiceDescriptorProto; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static ServiceDescriptorProto create() => ServiceDescriptorProto._(); + ServiceDescriptorProto createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static ServiceDescriptorProto getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static ServiceDescriptorProto? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get name => $_getSZ(0); + @$pb.TagNumber(1) + set name($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasName() => $_has(0); + @$pb.TagNumber(1) + void clearName() => clearField(1); + + @$pb.TagNumber(2) + $core.List get method => $_getList(1); + + @$pb.TagNumber(3) + ServiceOptions get options => $_getN(2); + @$pb.TagNumber(3) + set options(ServiceOptions v) { setField(3, v); } + @$pb.TagNumber(3) + $core.bool hasOptions() => $_has(2); + @$pb.TagNumber(3) + void clearOptions() => clearField(3); + @$pb.TagNumber(3) + ServiceOptions ensureOptions() => $_ensure(2); +} + +/// Describes a method of a service. +class MethodDescriptorProto extends $pb.GeneratedMessage { + factory MethodDescriptorProto({ + $core.String? name, + $core.String? inputType, + $core.String? outputType, + MethodOptions? options, + $core.bool? clientStreaming, + $core.bool? serverStreaming, + }) { + final $result = create(); + if (name != null) { + $result.name = name; + } + if (inputType != null) { + $result.inputType = inputType; + } + if (outputType != null) { + $result.outputType = outputType; + } + if (options != null) { + $result.options = options; + } + if (clientStreaming != null) { + $result.clientStreaming = clientStreaming; + } + if (serverStreaming != null) { + $result.serverStreaming = serverStreaming; + } + return $result; + } + MethodDescriptorProto._() : super(); + factory MethodDescriptorProto.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory MethodDescriptorProto.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'MethodDescriptorProto', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'name') + ..aOS(2, _omitFieldNames ? '' : 'inputType') + ..aOS(3, _omitFieldNames ? '' : 'outputType') + ..aOM(4, _omitFieldNames ? '' : 'options', subBuilder: MethodOptions.create) + ..aOB(5, _omitFieldNames ? '' : 'clientStreaming') + ..aOB(6, _omitFieldNames ? '' : 'serverStreaming') + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + MethodDescriptorProto clone() => MethodDescriptorProto()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + MethodDescriptorProto copyWith(void Function(MethodDescriptorProto) updates) => super.copyWith((message) => updates(message as MethodDescriptorProto)) as MethodDescriptorProto; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static MethodDescriptorProto create() => MethodDescriptorProto._(); + MethodDescriptorProto createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static MethodDescriptorProto getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static MethodDescriptorProto? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get name => $_getSZ(0); + @$pb.TagNumber(1) + set name($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasName() => $_has(0); + @$pb.TagNumber(1) + void clearName() => clearField(1); + + /// Input and output type names. These are resolved in the same way as + /// FieldDescriptorProto.type_name, but must refer to a message type. + @$pb.TagNumber(2) + $core.String get inputType => $_getSZ(1); + @$pb.TagNumber(2) + set inputType($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasInputType() => $_has(1); + @$pb.TagNumber(2) + void clearInputType() => clearField(2); + + @$pb.TagNumber(3) + $core.String get outputType => $_getSZ(2); + @$pb.TagNumber(3) + set outputType($core.String v) { $_setString(2, v); } + @$pb.TagNumber(3) + $core.bool hasOutputType() => $_has(2); + @$pb.TagNumber(3) + void clearOutputType() => clearField(3); + + @$pb.TagNumber(4) + MethodOptions get options => $_getN(3); + @$pb.TagNumber(4) + set options(MethodOptions v) { setField(4, v); } + @$pb.TagNumber(4) + $core.bool hasOptions() => $_has(3); + @$pb.TagNumber(4) + void clearOptions() => clearField(4); + @$pb.TagNumber(4) + MethodOptions ensureOptions() => $_ensure(3); + + /// Identifies if client streams multiple client messages + @$pb.TagNumber(5) + $core.bool get clientStreaming => $_getBF(4); + @$pb.TagNumber(5) + set clientStreaming($core.bool v) { $_setBool(4, v); } + @$pb.TagNumber(5) + $core.bool hasClientStreaming() => $_has(4); + @$pb.TagNumber(5) + void clearClientStreaming() => clearField(5); + + /// Identifies if server streams multiple server messages + @$pb.TagNumber(6) + $core.bool get serverStreaming => $_getBF(5); + @$pb.TagNumber(6) + set serverStreaming($core.bool v) { $_setBool(5, v); } + @$pb.TagNumber(6) + $core.bool hasServerStreaming() => $_has(5); + @$pb.TagNumber(6) + void clearServerStreaming() => clearField(6); +} + +class FileOptions extends $pb.GeneratedMessage { + factory FileOptions({ + $core.String? javaPackage, + $core.String? javaOuterClassname, + FileOptions_OptimizeMode? optimizeFor, + $core.bool? javaMultipleFiles, + $core.String? goPackage, + $core.bool? ccGenericServices, + $core.bool? javaGenericServices, + $core.bool? pyGenericServices, + @$core.Deprecated('This field is deprecated.') + $core.bool? javaGenerateEqualsAndHash, + $core.bool? deprecated, + $core.bool? javaStringCheckUtf8, + $core.bool? ccEnableArenas, + $core.String? objcClassPrefix, + $core.String? csharpNamespace, + $core.String? swiftPrefix, + $core.String? phpClassPrefix, + $core.String? phpNamespace, + $core.bool? phpGenericServices, + $core.String? phpMetadataNamespace, + $core.String? rubyPackage, + FeatureSet? features, + $core.Iterable? uninterpretedOption, + }) { + final $result = create(); + if (javaPackage != null) { + $result.javaPackage = javaPackage; + } + if (javaOuterClassname != null) { + $result.javaOuterClassname = javaOuterClassname; + } + if (optimizeFor != null) { + $result.optimizeFor = optimizeFor; + } + if (javaMultipleFiles != null) { + $result.javaMultipleFiles = javaMultipleFiles; + } + if (goPackage != null) { + $result.goPackage = goPackage; + } + if (ccGenericServices != null) { + $result.ccGenericServices = ccGenericServices; + } + if (javaGenericServices != null) { + $result.javaGenericServices = javaGenericServices; + } + if (pyGenericServices != null) { + $result.pyGenericServices = pyGenericServices; + } + if (javaGenerateEqualsAndHash != null) { + // ignore: deprecated_member_use_from_same_package + $result.javaGenerateEqualsAndHash = javaGenerateEqualsAndHash; + } + if (deprecated != null) { + $result.deprecated = deprecated; + } + if (javaStringCheckUtf8 != null) { + $result.javaStringCheckUtf8 = javaStringCheckUtf8; + } + if (ccEnableArenas != null) { + $result.ccEnableArenas = ccEnableArenas; + } + if (objcClassPrefix != null) { + $result.objcClassPrefix = objcClassPrefix; + } + if (csharpNamespace != null) { + $result.csharpNamespace = csharpNamespace; + } + if (swiftPrefix != null) { + $result.swiftPrefix = swiftPrefix; + } + if (phpClassPrefix != null) { + $result.phpClassPrefix = phpClassPrefix; + } + if (phpNamespace != null) { + $result.phpNamespace = phpNamespace; + } + if (phpGenericServices != null) { + $result.phpGenericServices = phpGenericServices; + } + if (phpMetadataNamespace != null) { + $result.phpMetadataNamespace = phpMetadataNamespace; + } + if (rubyPackage != null) { + $result.rubyPackage = rubyPackage; + } + if (features != null) { + $result.features = features; + } + if (uninterpretedOption != null) { + $result.uninterpretedOption.addAll(uninterpretedOption); + } + return $result; + } + FileOptions._() : super(); + factory FileOptions.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory FileOptions.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'FileOptions', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'javaPackage') + ..aOS(8, _omitFieldNames ? '' : 'javaOuterClassname') + ..e(9, _omitFieldNames ? '' : 'optimizeFor', $pb.PbFieldType.OE, defaultOrMaker: FileOptions_OptimizeMode.SPEED, valueOf: FileOptions_OptimizeMode.valueOf, enumValues: FileOptions_OptimizeMode.values) + ..aOB(10, _omitFieldNames ? '' : 'javaMultipleFiles') + ..aOS(11, _omitFieldNames ? '' : 'goPackage') + ..aOB(16, _omitFieldNames ? '' : 'ccGenericServices') + ..aOB(17, _omitFieldNames ? '' : 'javaGenericServices') + ..aOB(18, _omitFieldNames ? '' : 'pyGenericServices') + ..aOB(20, _omitFieldNames ? '' : 'javaGenerateEqualsAndHash') + ..aOB(23, _omitFieldNames ? '' : 'deprecated') + ..aOB(27, _omitFieldNames ? '' : 'javaStringCheckUtf8') + ..a<$core.bool>(31, _omitFieldNames ? '' : 'ccEnableArenas', $pb.PbFieldType.OB, defaultOrMaker: true) + ..aOS(36, _omitFieldNames ? '' : 'objcClassPrefix') + ..aOS(37, _omitFieldNames ? '' : 'csharpNamespace') + ..aOS(39, _omitFieldNames ? '' : 'swiftPrefix') + ..aOS(40, _omitFieldNames ? '' : 'phpClassPrefix') + ..aOS(41, _omitFieldNames ? '' : 'phpNamespace') + ..aOB(42, _omitFieldNames ? '' : 'phpGenericServices') + ..aOS(44, _omitFieldNames ? '' : 'phpMetadataNamespace') + ..aOS(45, _omitFieldNames ? '' : 'rubyPackage') + ..aOM(50, _omitFieldNames ? '' : 'features', subBuilder: FeatureSet.create) + ..pc(999, _omitFieldNames ? '' : 'uninterpretedOption', $pb.PbFieldType.PM, subBuilder: UninterpretedOption.create) + ..hasExtensions = true + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + FileOptions clone() => FileOptions()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + FileOptions copyWith(void Function(FileOptions) updates) => super.copyWith((message) => updates(message as FileOptions)) as FileOptions; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static FileOptions create() => FileOptions._(); + FileOptions createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static FileOptions getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static FileOptions? _defaultInstance; + + /// Sets the Java package where classes generated from this .proto will be + /// placed. By default, the proto package is used, but this is often + /// inappropriate because proto packages do not normally start with backwards + /// domain names. + @$pb.TagNumber(1) + $core.String get javaPackage => $_getSZ(0); + @$pb.TagNumber(1) + set javaPackage($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasJavaPackage() => $_has(0); + @$pb.TagNumber(1) + void clearJavaPackage() => clearField(1); + + /// Controls the name of the wrapper Java class generated for the .proto file. + /// That class will always contain the .proto file's getDescriptor() method as + /// well as any top-level extensions defined in the .proto file. + /// If java_multiple_files is disabled, then all the other classes from the + /// .proto file will be nested inside the single wrapper outer class. + @$pb.TagNumber(8) + $core.String get javaOuterClassname => $_getSZ(1); + @$pb.TagNumber(8) + set javaOuterClassname($core.String v) { $_setString(1, v); } + @$pb.TagNumber(8) + $core.bool hasJavaOuterClassname() => $_has(1); + @$pb.TagNumber(8) + void clearJavaOuterClassname() => clearField(8); + + @$pb.TagNumber(9) + FileOptions_OptimizeMode get optimizeFor => $_getN(2); + @$pb.TagNumber(9) + set optimizeFor(FileOptions_OptimizeMode v) { setField(9, v); } + @$pb.TagNumber(9) + $core.bool hasOptimizeFor() => $_has(2); + @$pb.TagNumber(9) + void clearOptimizeFor() => clearField(9); + + /// If enabled, then the Java code generator will generate a separate .java + /// file for each top-level message, enum, and service defined in the .proto + /// file. Thus, these types will *not* be nested inside the wrapper class + /// named by java_outer_classname. However, the wrapper class will still be + /// generated to contain the file's getDescriptor() method as well as any + /// top-level extensions defined in the file. + @$pb.TagNumber(10) + $core.bool get javaMultipleFiles => $_getBF(3); + @$pb.TagNumber(10) + set javaMultipleFiles($core.bool v) { $_setBool(3, v); } + @$pb.TagNumber(10) + $core.bool hasJavaMultipleFiles() => $_has(3); + @$pb.TagNumber(10) + void clearJavaMultipleFiles() => clearField(10); + + /// Sets the Go package where structs generated from this .proto will be + /// placed. If omitted, the Go package will be derived from the following: + /// - The basename of the package import path, if provided. + /// - Otherwise, the package statement in the .proto file, if present. + /// - Otherwise, the basename of the .proto file, without extension. + @$pb.TagNumber(11) + $core.String get goPackage => $_getSZ(4); + @$pb.TagNumber(11) + set goPackage($core.String v) { $_setString(4, v); } + @$pb.TagNumber(11) + $core.bool hasGoPackage() => $_has(4); + @$pb.TagNumber(11) + void clearGoPackage() => clearField(11); + + /// Should generic services be generated in each language? "Generic" services + /// are not specific to any particular RPC system. They are generated by the + /// main code generators in each language (without additional plugins). + /// Generic services were the only kind of service generation supported by + /// early versions of google.protobuf. + /// + /// Generic services are now considered deprecated in favor of using plugins + /// that generate code specific to your particular RPC system. Therefore, + /// these default to false. Old code which depends on generic services should + /// explicitly set them to true. + @$pb.TagNumber(16) + $core.bool get ccGenericServices => $_getBF(5); + @$pb.TagNumber(16) + set ccGenericServices($core.bool v) { $_setBool(5, v); } + @$pb.TagNumber(16) + $core.bool hasCcGenericServices() => $_has(5); + @$pb.TagNumber(16) + void clearCcGenericServices() => clearField(16); + + @$pb.TagNumber(17) + $core.bool get javaGenericServices => $_getBF(6); + @$pb.TagNumber(17) + set javaGenericServices($core.bool v) { $_setBool(6, v); } + @$pb.TagNumber(17) + $core.bool hasJavaGenericServices() => $_has(6); + @$pb.TagNumber(17) + void clearJavaGenericServices() => clearField(17); + + @$pb.TagNumber(18) + $core.bool get pyGenericServices => $_getBF(7); + @$pb.TagNumber(18) + set pyGenericServices($core.bool v) { $_setBool(7, v); } + @$pb.TagNumber(18) + $core.bool hasPyGenericServices() => $_has(7); + @$pb.TagNumber(18) + void clearPyGenericServices() => clearField(18); + + /// This option does nothing. + @$core.Deprecated('This field is deprecated.') + @$pb.TagNumber(20) + $core.bool get javaGenerateEqualsAndHash => $_getBF(8); + @$core.Deprecated('This field is deprecated.') + @$pb.TagNumber(20) + set javaGenerateEqualsAndHash($core.bool v) { $_setBool(8, v); } + @$core.Deprecated('This field is deprecated.') + @$pb.TagNumber(20) + $core.bool hasJavaGenerateEqualsAndHash() => $_has(8); + @$core.Deprecated('This field is deprecated.') + @$pb.TagNumber(20) + void clearJavaGenerateEqualsAndHash() => clearField(20); + + /// Is this file deprecated? + /// Depending on the target platform, this can emit Deprecated annotations + /// for everything in the file, or it will be completely ignored; in the very + /// least, this is a formalization for deprecating files. + @$pb.TagNumber(23) + $core.bool get deprecated => $_getBF(9); + @$pb.TagNumber(23) + set deprecated($core.bool v) { $_setBool(9, v); } + @$pb.TagNumber(23) + $core.bool hasDeprecated() => $_has(9); + @$pb.TagNumber(23) + void clearDeprecated() => clearField(23); + + /// If set true, then the Java2 code generator will generate code that + /// throws an exception whenever an attempt is made to assign a non-UTF-8 + /// byte sequence to a string field. + /// Message reflection will do the same. + /// However, an extension field still accepts non-UTF-8 byte sequences. + /// This option has no effect on when used with the lite runtime. + @$pb.TagNumber(27) + $core.bool get javaStringCheckUtf8 => $_getBF(10); + @$pb.TagNumber(27) + set javaStringCheckUtf8($core.bool v) { $_setBool(10, v); } + @$pb.TagNumber(27) + $core.bool hasJavaStringCheckUtf8() => $_has(10); + @$pb.TagNumber(27) + void clearJavaStringCheckUtf8() => clearField(27); + + /// Enables the use of arenas for the proto messages in this file. This applies + /// only to generated classes for C++. + @$pb.TagNumber(31) + $core.bool get ccEnableArenas => $_getB(11, true); + @$pb.TagNumber(31) + set ccEnableArenas($core.bool v) { $_setBool(11, v); } + @$pb.TagNumber(31) + $core.bool hasCcEnableArenas() => $_has(11); + @$pb.TagNumber(31) + void clearCcEnableArenas() => clearField(31); + + /// Sets the objective c class prefix which is prepended to all objective c + /// generated classes from this .proto. There is no default. + @$pb.TagNumber(36) + $core.String get objcClassPrefix => $_getSZ(12); + @$pb.TagNumber(36) + set objcClassPrefix($core.String v) { $_setString(12, v); } + @$pb.TagNumber(36) + $core.bool hasObjcClassPrefix() => $_has(12); + @$pb.TagNumber(36) + void clearObjcClassPrefix() => clearField(36); + + /// Namespace for generated classes; defaults to the package. + @$pb.TagNumber(37) + $core.String get csharpNamespace => $_getSZ(13); + @$pb.TagNumber(37) + set csharpNamespace($core.String v) { $_setString(13, v); } + @$pb.TagNumber(37) + $core.bool hasCsharpNamespace() => $_has(13); + @$pb.TagNumber(37) + void clearCsharpNamespace() => clearField(37); + + /// By default Swift generators will take the proto package and CamelCase it + /// replacing '.' with underscore and use that to prefix the types/symbols + /// defined. When this options is provided, they will use this value instead + /// to prefix the types/symbols defined. + @$pb.TagNumber(39) + $core.String get swiftPrefix => $_getSZ(14); + @$pb.TagNumber(39) + set swiftPrefix($core.String v) { $_setString(14, v); } + @$pb.TagNumber(39) + $core.bool hasSwiftPrefix() => $_has(14); + @$pb.TagNumber(39) + void clearSwiftPrefix() => clearField(39); + + /// Sets the php class prefix which is prepended to all php generated classes + /// from this .proto. Default is empty. + @$pb.TagNumber(40) + $core.String get phpClassPrefix => $_getSZ(15); + @$pb.TagNumber(40) + set phpClassPrefix($core.String v) { $_setString(15, v); } + @$pb.TagNumber(40) + $core.bool hasPhpClassPrefix() => $_has(15); + @$pb.TagNumber(40) + void clearPhpClassPrefix() => clearField(40); + + /// Use this option to change the namespace of php generated classes. Default + /// is empty. When this option is empty, the package name will be used for + /// determining the namespace. + @$pb.TagNumber(41) + $core.String get phpNamespace => $_getSZ(16); + @$pb.TagNumber(41) + set phpNamespace($core.String v) { $_setString(16, v); } + @$pb.TagNumber(41) + $core.bool hasPhpNamespace() => $_has(16); + @$pb.TagNumber(41) + void clearPhpNamespace() => clearField(41); + + @$pb.TagNumber(42) + $core.bool get phpGenericServices => $_getBF(17); + @$pb.TagNumber(42) + set phpGenericServices($core.bool v) { $_setBool(17, v); } + @$pb.TagNumber(42) + $core.bool hasPhpGenericServices() => $_has(17); + @$pb.TagNumber(42) + void clearPhpGenericServices() => clearField(42); + + /// Use this option to change the namespace of php generated metadata classes. + /// Default is empty. When this option is empty, the proto file name will be + /// used for determining the namespace. + @$pb.TagNumber(44) + $core.String get phpMetadataNamespace => $_getSZ(18); + @$pb.TagNumber(44) + set phpMetadataNamespace($core.String v) { $_setString(18, v); } + @$pb.TagNumber(44) + $core.bool hasPhpMetadataNamespace() => $_has(18); + @$pb.TagNumber(44) + void clearPhpMetadataNamespace() => clearField(44); + + /// Use this option to change the package of ruby generated classes. Default + /// is empty. When this option is not set, the package name will be used for + /// determining the ruby package. + @$pb.TagNumber(45) + $core.String get rubyPackage => $_getSZ(19); + @$pb.TagNumber(45) + set rubyPackage($core.String v) { $_setString(19, v); } + @$pb.TagNumber(45) + $core.bool hasRubyPackage() => $_has(19); + @$pb.TagNumber(45) + void clearRubyPackage() => clearField(45); + + /// Any features defined in the specific edition. + @$pb.TagNumber(50) + FeatureSet get features => $_getN(20); + @$pb.TagNumber(50) + set features(FeatureSet v) { setField(50, v); } + @$pb.TagNumber(50) + $core.bool hasFeatures() => $_has(20); + @$pb.TagNumber(50) + void clearFeatures() => clearField(50); + @$pb.TagNumber(50) + FeatureSet ensureFeatures() => $_ensure(20); + + /// The parser stores options it doesn't recognize here. + /// See the documentation for the "Options" section above. + @$pb.TagNumber(999) + $core.List get uninterpretedOption => $_getList(21); +} + +class MessageOptions extends $pb.GeneratedMessage { + factory MessageOptions({ + $core.bool? messageSetWireFormat, + $core.bool? noStandardDescriptorAccessor, + $core.bool? deprecated, + $core.bool? mapEntry, + @$core.Deprecated('This field is deprecated.') + $core.bool? deprecatedLegacyJsonFieldConflicts, + FeatureSet? features, + $core.Iterable? uninterpretedOption, + }) { + final $result = create(); + if (messageSetWireFormat != null) { + $result.messageSetWireFormat = messageSetWireFormat; + } + if (noStandardDescriptorAccessor != null) { + $result.noStandardDescriptorAccessor = noStandardDescriptorAccessor; + } + if (deprecated != null) { + $result.deprecated = deprecated; + } + if (mapEntry != null) { + $result.mapEntry = mapEntry; + } + if (deprecatedLegacyJsonFieldConflicts != null) { + // ignore: deprecated_member_use_from_same_package + $result.deprecatedLegacyJsonFieldConflicts = deprecatedLegacyJsonFieldConflicts; + } + if (features != null) { + $result.features = features; + } + if (uninterpretedOption != null) { + $result.uninterpretedOption.addAll(uninterpretedOption); + } + return $result; + } + MessageOptions._() : super(); + factory MessageOptions.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory MessageOptions.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'MessageOptions', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), createEmptyInstance: create) + ..aOB(1, _omitFieldNames ? '' : 'messageSetWireFormat') + ..aOB(2, _omitFieldNames ? '' : 'noStandardDescriptorAccessor') + ..aOB(3, _omitFieldNames ? '' : 'deprecated') + ..aOB(7, _omitFieldNames ? '' : 'mapEntry') + ..aOB(11, _omitFieldNames ? '' : 'deprecatedLegacyJsonFieldConflicts') + ..aOM(12, _omitFieldNames ? '' : 'features', subBuilder: FeatureSet.create) + ..pc(999, _omitFieldNames ? '' : 'uninterpretedOption', $pb.PbFieldType.PM, subBuilder: UninterpretedOption.create) + ..hasExtensions = true + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + MessageOptions clone() => MessageOptions()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + MessageOptions copyWith(void Function(MessageOptions) updates) => super.copyWith((message) => updates(message as MessageOptions)) as MessageOptions; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static MessageOptions create() => MessageOptions._(); + MessageOptions createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static MessageOptions getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static MessageOptions? _defaultInstance; + + /// Set true to use the old proto1 MessageSet wire format for extensions. + /// This is provided for backwards-compatibility with the MessageSet wire + /// format. You should not use this for any other reason: It's less + /// efficient, has fewer features, and is more complicated. + /// + /// The message must be defined exactly as follows: + /// message Foo { + /// option message_set_wire_format = true; + /// extensions 4 to max; + /// } + /// Note that the message cannot have any defined fields; MessageSets only + /// have extensions. + /// + /// All extensions of your type must be singular messages; e.g. they cannot + /// be int32s, enums, or repeated messages. + /// + /// Because this is an option, the above two restrictions are not enforced by + /// the protocol compiler. + @$pb.TagNumber(1) + $core.bool get messageSetWireFormat => $_getBF(0); + @$pb.TagNumber(1) + set messageSetWireFormat($core.bool v) { $_setBool(0, v); } + @$pb.TagNumber(1) + $core.bool hasMessageSetWireFormat() => $_has(0); + @$pb.TagNumber(1) + void clearMessageSetWireFormat() => clearField(1); + + /// Disables the generation of the standard "descriptor()" accessor, which can + /// conflict with a field of the same name. This is meant to make migration + /// from proto1 easier; new code should avoid fields named "descriptor". + @$pb.TagNumber(2) + $core.bool get noStandardDescriptorAccessor => $_getBF(1); + @$pb.TagNumber(2) + set noStandardDescriptorAccessor($core.bool v) { $_setBool(1, v); } + @$pb.TagNumber(2) + $core.bool hasNoStandardDescriptorAccessor() => $_has(1); + @$pb.TagNumber(2) + void clearNoStandardDescriptorAccessor() => clearField(2); + + /// Is this message deprecated? + /// Depending on the target platform, this can emit Deprecated annotations + /// for the message, or it will be completely ignored; in the very least, + /// this is a formalization for deprecating messages. + @$pb.TagNumber(3) + $core.bool get deprecated => $_getBF(2); + @$pb.TagNumber(3) + set deprecated($core.bool v) { $_setBool(2, v); } + @$pb.TagNumber(3) + $core.bool hasDeprecated() => $_has(2); + @$pb.TagNumber(3) + void clearDeprecated() => clearField(3); + + /// NOTE: Do not set the option in .proto files. Always use the maps syntax + /// instead. The option should only be implicitly set by the proto compiler + /// parser. + /// + /// Whether the message is an automatically generated map entry type for the + /// maps field. + /// + /// For maps fields: + /// map map_field = 1; + /// The parsed descriptor looks like: + /// message MapFieldEntry { + /// option map_entry = true; + /// optional KeyType key = 1; + /// optional ValueType value = 2; + /// } + /// repeated MapFieldEntry map_field = 1; + /// + /// Implementations may choose not to generate the map_entry=true message, but + /// use a native map in the target language to hold the keys and values. + /// The reflection APIs in such implementations still need to work as + /// if the field is a repeated message field. + @$pb.TagNumber(7) + $core.bool get mapEntry => $_getBF(3); + @$pb.TagNumber(7) + set mapEntry($core.bool v) { $_setBool(3, v); } + @$pb.TagNumber(7) + $core.bool hasMapEntry() => $_has(3); + @$pb.TagNumber(7) + void clearMapEntry() => clearField(7); + + /// Enable the legacy handling of JSON field name conflicts. This lowercases + /// and strips underscored from the fields before comparison in proto3 only. + /// The new behavior takes `json_name` into account and applies to proto2 as + /// well. + /// + /// This should only be used as a temporary measure against broken builds due + /// to the change in behavior for JSON field name conflicts. + /// + /// TODO This is legacy behavior we plan to remove once downstream + /// teams have had time to migrate. + @$core.Deprecated('This field is deprecated.') + @$pb.TagNumber(11) + $core.bool get deprecatedLegacyJsonFieldConflicts => $_getBF(4); + @$core.Deprecated('This field is deprecated.') + @$pb.TagNumber(11) + set deprecatedLegacyJsonFieldConflicts($core.bool v) { $_setBool(4, v); } + @$core.Deprecated('This field is deprecated.') + @$pb.TagNumber(11) + $core.bool hasDeprecatedLegacyJsonFieldConflicts() => $_has(4); + @$core.Deprecated('This field is deprecated.') + @$pb.TagNumber(11) + void clearDeprecatedLegacyJsonFieldConflicts() => clearField(11); + + /// Any features defined in the specific edition. + @$pb.TagNumber(12) + FeatureSet get features => $_getN(5); + @$pb.TagNumber(12) + set features(FeatureSet v) { setField(12, v); } + @$pb.TagNumber(12) + $core.bool hasFeatures() => $_has(5); + @$pb.TagNumber(12) + void clearFeatures() => clearField(12); + @$pb.TagNumber(12) + FeatureSet ensureFeatures() => $_ensure(5); + + /// The parser stores options it doesn't recognize here. See above. + @$pb.TagNumber(999) + $core.List get uninterpretedOption => $_getList(6); +} + +class FieldOptions_EditionDefault extends $pb.GeneratedMessage { + factory FieldOptions_EditionDefault({ + $core.String? value, + Edition? edition, + }) { + final $result = create(); + if (value != null) { + $result.value = value; + } + if (edition != null) { + $result.edition = edition; + } + return $result; + } + FieldOptions_EditionDefault._() : super(); + factory FieldOptions_EditionDefault.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory FieldOptions_EditionDefault.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'FieldOptions.EditionDefault', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), createEmptyInstance: create) + ..aOS(2, _omitFieldNames ? '' : 'value') + ..e(3, _omitFieldNames ? '' : 'edition', $pb.PbFieldType.OE, defaultOrMaker: Edition.EDITION_UNKNOWN, valueOf: Edition.valueOf, enumValues: Edition.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') + FieldOptions_EditionDefault clone() => FieldOptions_EditionDefault()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + FieldOptions_EditionDefault copyWith(void Function(FieldOptions_EditionDefault) updates) => super.copyWith((message) => updates(message as FieldOptions_EditionDefault)) as FieldOptions_EditionDefault; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static FieldOptions_EditionDefault create() => FieldOptions_EditionDefault._(); + FieldOptions_EditionDefault createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static FieldOptions_EditionDefault getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static FieldOptions_EditionDefault? _defaultInstance; + + @$pb.TagNumber(2) + $core.String get value => $_getSZ(0); + @$pb.TagNumber(2) + set value($core.String v) { $_setString(0, v); } + @$pb.TagNumber(2) + $core.bool hasValue() => $_has(0); + @$pb.TagNumber(2) + void clearValue() => clearField(2); + + @$pb.TagNumber(3) + Edition get edition => $_getN(1); + @$pb.TagNumber(3) + set edition(Edition v) { setField(3, v); } + @$pb.TagNumber(3) + $core.bool hasEdition() => $_has(1); + @$pb.TagNumber(3) + void clearEdition() => clearField(3); +} + +class FieldOptions extends $pb.GeneratedMessage { + factory FieldOptions({ + FieldOptions_CType? ctype, + $core.bool? packed, + $core.bool? deprecated, + $core.bool? lazy, + FieldOptions_JSType? jstype, + $core.bool? weak, + $core.bool? unverifiedLazy, + $core.bool? debugRedact, + FieldOptions_OptionRetention? retention, + $core.Iterable? targets, + $core.Iterable? editionDefaults, + FeatureSet? features, + $core.Iterable? uninterpretedOption, + }) { + final $result = create(); + if (ctype != null) { + $result.ctype = ctype; + } + if (packed != null) { + $result.packed = packed; + } + if (deprecated != null) { + $result.deprecated = deprecated; + } + if (lazy != null) { + $result.lazy = lazy; + } + if (jstype != null) { + $result.jstype = jstype; + } + if (weak != null) { + $result.weak = weak; + } + if (unverifiedLazy != null) { + $result.unverifiedLazy = unverifiedLazy; + } + if (debugRedact != null) { + $result.debugRedact = debugRedact; + } + if (retention != null) { + $result.retention = retention; + } + if (targets != null) { + $result.targets.addAll(targets); + } + if (editionDefaults != null) { + $result.editionDefaults.addAll(editionDefaults); + } + if (features != null) { + $result.features = features; + } + if (uninterpretedOption != null) { + $result.uninterpretedOption.addAll(uninterpretedOption); + } + return $result; + } + FieldOptions._() : super(); + factory FieldOptions.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory FieldOptions.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'FieldOptions', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), createEmptyInstance: create) + ..e(1, _omitFieldNames ? '' : 'ctype', $pb.PbFieldType.OE, defaultOrMaker: FieldOptions_CType.STRING, valueOf: FieldOptions_CType.valueOf, enumValues: FieldOptions_CType.values) + ..aOB(2, _omitFieldNames ? '' : 'packed') + ..aOB(3, _omitFieldNames ? '' : 'deprecated') + ..aOB(5, _omitFieldNames ? '' : 'lazy') + ..e(6, _omitFieldNames ? '' : 'jstype', $pb.PbFieldType.OE, defaultOrMaker: FieldOptions_JSType.JS_NORMAL, valueOf: FieldOptions_JSType.valueOf, enumValues: FieldOptions_JSType.values) + ..aOB(10, _omitFieldNames ? '' : 'weak') + ..aOB(15, _omitFieldNames ? '' : 'unverifiedLazy') + ..aOB(16, _omitFieldNames ? '' : 'debugRedact') + ..e(17, _omitFieldNames ? '' : 'retention', $pb.PbFieldType.OE, defaultOrMaker: FieldOptions_OptionRetention.RETENTION_UNKNOWN, valueOf: FieldOptions_OptionRetention.valueOf, enumValues: FieldOptions_OptionRetention.values) + ..pc(19, _omitFieldNames ? '' : 'targets', $pb.PbFieldType.PE, valueOf: FieldOptions_OptionTargetType.valueOf, enumValues: FieldOptions_OptionTargetType.values, defaultEnumValue: FieldOptions_OptionTargetType.TARGET_TYPE_UNKNOWN) + ..pc(20, _omitFieldNames ? '' : 'editionDefaults', $pb.PbFieldType.PM, subBuilder: FieldOptions_EditionDefault.create) + ..aOM(21, _omitFieldNames ? '' : 'features', subBuilder: FeatureSet.create) + ..pc(999, _omitFieldNames ? '' : 'uninterpretedOption', $pb.PbFieldType.PM, subBuilder: UninterpretedOption.create) + ..hasExtensions = true + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + FieldOptions clone() => FieldOptions()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + FieldOptions copyWith(void Function(FieldOptions) updates) => super.copyWith((message) => updates(message as FieldOptions)) as FieldOptions; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static FieldOptions create() => FieldOptions._(); + FieldOptions createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static FieldOptions getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static FieldOptions? _defaultInstance; + + /// The ctype option instructs the C++ code generator to use a different + /// representation of the field than it normally would. See the specific + /// options below. This option is only implemented to support use of + /// [ctype=CORD] and [ctype=STRING] (the default) on non-repeated fields of + /// type "bytes" in the open source release -- sorry, we'll try to include + /// other types in a future version! + @$pb.TagNumber(1) + FieldOptions_CType get ctype => $_getN(0); + @$pb.TagNumber(1) + set ctype(FieldOptions_CType v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasCtype() => $_has(0); + @$pb.TagNumber(1) + void clearCtype() => clearField(1); + + /// The packed option can be enabled for repeated primitive fields to enable + /// a more efficient representation on the wire. Rather than repeatedly + /// writing the tag and type for each element, the entire array is encoded as + /// a single length-delimited blob. In proto3, only explicit setting it to + /// false will avoid using packed encoding. This option is prohibited in + /// Editions, but the `repeated_field_encoding` feature can be used to control + /// the behavior. + @$pb.TagNumber(2) + $core.bool get packed => $_getBF(1); + @$pb.TagNumber(2) + set packed($core.bool v) { $_setBool(1, v); } + @$pb.TagNumber(2) + $core.bool hasPacked() => $_has(1); + @$pb.TagNumber(2) + void clearPacked() => clearField(2); + + /// Is this field deprecated? + /// Depending on the target platform, this can emit Deprecated annotations + /// for accessors, or it will be completely ignored; in the very least, this + /// is a formalization for deprecating fields. + @$pb.TagNumber(3) + $core.bool get deprecated => $_getBF(2); + @$pb.TagNumber(3) + set deprecated($core.bool v) { $_setBool(2, v); } + @$pb.TagNumber(3) + $core.bool hasDeprecated() => $_has(2); + @$pb.TagNumber(3) + void clearDeprecated() => clearField(3); + + /// Should this field be parsed lazily? Lazy applies only to message-type + /// fields. It means that when the outer message is initially parsed, the + /// inner message's contents will not be parsed but instead stored in encoded + /// form. The inner message will actually be parsed when it is first accessed. + /// + /// This is only a hint. Implementations are free to choose whether to use + /// eager or lazy parsing regardless of the value of this option. However, + /// setting this option true suggests that the protocol author believes that + /// using lazy parsing on this field is worth the additional bookkeeping + /// overhead typically needed to implement it. + /// + /// This option does not affect the public interface of any generated code; + /// all method signatures remain the same. Furthermore, thread-safety of the + /// interface is not affected by this option; const methods remain safe to + /// call from multiple threads concurrently, while non-const methods continue + /// to require exclusive access. + /// + /// Note that implementations may choose not to check required fields within + /// a lazy sub-message. That is, calling IsInitialized() on the outer message + /// may return true even if the inner message has missing required fields. + /// This is necessary because otherwise the inner message would have to be + /// parsed in order to perform the check, defeating the purpose of lazy + /// parsing. An implementation which chooses not to check required fields + /// must be consistent about it. That is, for any particular sub-message, the + /// implementation must either *always* check its required fields, or *never* + /// check its required fields, regardless of whether or not the message has + /// been parsed. + /// + /// As of May 2022, lazy verifies the contents of the byte stream during + /// parsing. An invalid byte stream will cause the overall parsing to fail. + @$pb.TagNumber(5) + $core.bool get lazy => $_getBF(3); + @$pb.TagNumber(5) + set lazy($core.bool v) { $_setBool(3, v); } + @$pb.TagNumber(5) + $core.bool hasLazy() => $_has(3); + @$pb.TagNumber(5) + void clearLazy() => clearField(5); + + /// The jstype option determines the JavaScript type used for values of the + /// field. The option is permitted only for 64 bit integral and fixed types + /// (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING + /// is represented as JavaScript string, which avoids loss of precision that + /// can happen when a large value is converted to a floating point JavaScript. + /// Specifying JS_NUMBER for the jstype causes the generated JavaScript code to + /// use the JavaScript "number" type. The behavior of the default option + /// JS_NORMAL is implementation dependent. + /// + /// This option is an enum to permit additional types to be added, e.g. + /// goog.math.Integer. + @$pb.TagNumber(6) + FieldOptions_JSType get jstype => $_getN(4); + @$pb.TagNumber(6) + set jstype(FieldOptions_JSType v) { setField(6, v); } + @$pb.TagNumber(6) + $core.bool hasJstype() => $_has(4); + @$pb.TagNumber(6) + void clearJstype() => clearField(6); + + /// For Google-internal migration only. Do not use. + @$pb.TagNumber(10) + $core.bool get weak => $_getBF(5); + @$pb.TagNumber(10) + set weak($core.bool v) { $_setBool(5, v); } + @$pb.TagNumber(10) + $core.bool hasWeak() => $_has(5); + @$pb.TagNumber(10) + void clearWeak() => clearField(10); + + /// unverified_lazy does no correctness checks on the byte stream. This should + /// only be used where lazy with verification is prohibitive for performance + /// reasons. + @$pb.TagNumber(15) + $core.bool get unverifiedLazy => $_getBF(6); + @$pb.TagNumber(15) + set unverifiedLazy($core.bool v) { $_setBool(6, v); } + @$pb.TagNumber(15) + $core.bool hasUnverifiedLazy() => $_has(6); + @$pb.TagNumber(15) + void clearUnverifiedLazy() => clearField(15); + + /// Indicate that the field value should not be printed out when using debug + /// formats, e.g. when the field contains sensitive credentials. + @$pb.TagNumber(16) + $core.bool get debugRedact => $_getBF(7); + @$pb.TagNumber(16) + set debugRedact($core.bool v) { $_setBool(7, v); } + @$pb.TagNumber(16) + $core.bool hasDebugRedact() => $_has(7); + @$pb.TagNumber(16) + void clearDebugRedact() => clearField(16); + + @$pb.TagNumber(17) + FieldOptions_OptionRetention get retention => $_getN(8); + @$pb.TagNumber(17) + set retention(FieldOptions_OptionRetention v) { setField(17, v); } + @$pb.TagNumber(17) + $core.bool hasRetention() => $_has(8); + @$pb.TagNumber(17) + void clearRetention() => clearField(17); + + @$pb.TagNumber(19) + $core.List get targets => $_getList(9); + + @$pb.TagNumber(20) + $core.List get editionDefaults => $_getList(10); + + /// Any features defined in the specific edition. + @$pb.TagNumber(21) + FeatureSet get features => $_getN(11); + @$pb.TagNumber(21) + set features(FeatureSet v) { setField(21, v); } + @$pb.TagNumber(21) + $core.bool hasFeatures() => $_has(11); + @$pb.TagNumber(21) + void clearFeatures() => clearField(21); + @$pb.TagNumber(21) + FeatureSet ensureFeatures() => $_ensure(11); + + /// The parser stores options it doesn't recognize here. See above. + @$pb.TagNumber(999) + $core.List get uninterpretedOption => $_getList(12); +} + +class OneofOptions extends $pb.GeneratedMessage { + factory OneofOptions({ + FeatureSet? features, + $core.Iterable? uninterpretedOption, + }) { + final $result = create(); + if (features != null) { + $result.features = features; + } + if (uninterpretedOption != null) { + $result.uninterpretedOption.addAll(uninterpretedOption); + } + return $result; + } + OneofOptions._() : super(); + factory OneofOptions.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory OneofOptions.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'OneofOptions', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), createEmptyInstance: create) + ..aOM(1, _omitFieldNames ? '' : 'features', subBuilder: FeatureSet.create) + ..pc(999, _omitFieldNames ? '' : 'uninterpretedOption', $pb.PbFieldType.PM, subBuilder: UninterpretedOption.create) + ..hasExtensions = true + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + OneofOptions clone() => OneofOptions()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + OneofOptions copyWith(void Function(OneofOptions) updates) => super.copyWith((message) => updates(message as OneofOptions)) as OneofOptions; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static OneofOptions create() => OneofOptions._(); + OneofOptions createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static OneofOptions getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static OneofOptions? _defaultInstance; + + /// Any features defined in the specific edition. + @$pb.TagNumber(1) + FeatureSet get features => $_getN(0); + @$pb.TagNumber(1) + set features(FeatureSet v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasFeatures() => $_has(0); + @$pb.TagNumber(1) + void clearFeatures() => clearField(1); + @$pb.TagNumber(1) + FeatureSet ensureFeatures() => $_ensure(0); + + /// The parser stores options it doesn't recognize here. See above. + @$pb.TagNumber(999) + $core.List get uninterpretedOption => $_getList(1); +} + +class EnumOptions extends $pb.GeneratedMessage { + factory EnumOptions({ + $core.bool? allowAlias, + $core.bool? deprecated, + @$core.Deprecated('This field is deprecated.') + $core.bool? deprecatedLegacyJsonFieldConflicts, + FeatureSet? features, + $core.Iterable? uninterpretedOption, + }) { + final $result = create(); + if (allowAlias != null) { + $result.allowAlias = allowAlias; + } + if (deprecated != null) { + $result.deprecated = deprecated; + } + if (deprecatedLegacyJsonFieldConflicts != null) { + // ignore: deprecated_member_use_from_same_package + $result.deprecatedLegacyJsonFieldConflicts = deprecatedLegacyJsonFieldConflicts; + } + if (features != null) { + $result.features = features; + } + if (uninterpretedOption != null) { + $result.uninterpretedOption.addAll(uninterpretedOption); + } + return $result; + } + EnumOptions._() : super(); + factory EnumOptions.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory EnumOptions.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'EnumOptions', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), createEmptyInstance: create) + ..aOB(2, _omitFieldNames ? '' : 'allowAlias') + ..aOB(3, _omitFieldNames ? '' : 'deprecated') + ..aOB(6, _omitFieldNames ? '' : 'deprecatedLegacyJsonFieldConflicts') + ..aOM(7, _omitFieldNames ? '' : 'features', subBuilder: FeatureSet.create) + ..pc(999, _omitFieldNames ? '' : 'uninterpretedOption', $pb.PbFieldType.PM, subBuilder: UninterpretedOption.create) + ..hasExtensions = true + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + EnumOptions clone() => EnumOptions()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + EnumOptions copyWith(void Function(EnumOptions) updates) => super.copyWith((message) => updates(message as EnumOptions)) as EnumOptions; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static EnumOptions create() => EnumOptions._(); + EnumOptions createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static EnumOptions getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static EnumOptions? _defaultInstance; + + /// Set this option to true to allow mapping different tag names to the same + /// value. + @$pb.TagNumber(2) + $core.bool get allowAlias => $_getBF(0); + @$pb.TagNumber(2) + set allowAlias($core.bool v) { $_setBool(0, v); } + @$pb.TagNumber(2) + $core.bool hasAllowAlias() => $_has(0); + @$pb.TagNumber(2) + void clearAllowAlias() => clearField(2); + + /// Is this enum deprecated? + /// Depending on the target platform, this can emit Deprecated annotations + /// for the enum, or it will be completely ignored; in the very least, this + /// is a formalization for deprecating enums. + @$pb.TagNumber(3) + $core.bool get deprecated => $_getBF(1); + @$pb.TagNumber(3) + set deprecated($core.bool v) { $_setBool(1, v); } + @$pb.TagNumber(3) + $core.bool hasDeprecated() => $_has(1); + @$pb.TagNumber(3) + void clearDeprecated() => clearField(3); + + /// Enable the legacy handling of JSON field name conflicts. This lowercases + /// and strips underscored from the fields before comparison in proto3 only. + /// The new behavior takes `json_name` into account and applies to proto2 as + /// well. + /// TODO Remove this legacy behavior once downstream teams have + /// had time to migrate. + @$core.Deprecated('This field is deprecated.') + @$pb.TagNumber(6) + $core.bool get deprecatedLegacyJsonFieldConflicts => $_getBF(2); + @$core.Deprecated('This field is deprecated.') + @$pb.TagNumber(6) + set deprecatedLegacyJsonFieldConflicts($core.bool v) { $_setBool(2, v); } + @$core.Deprecated('This field is deprecated.') + @$pb.TagNumber(6) + $core.bool hasDeprecatedLegacyJsonFieldConflicts() => $_has(2); + @$core.Deprecated('This field is deprecated.') + @$pb.TagNumber(6) + void clearDeprecatedLegacyJsonFieldConflicts() => clearField(6); + + /// Any features defined in the specific edition. + @$pb.TagNumber(7) + FeatureSet get features => $_getN(3); + @$pb.TagNumber(7) + set features(FeatureSet v) { setField(7, v); } + @$pb.TagNumber(7) + $core.bool hasFeatures() => $_has(3); + @$pb.TagNumber(7) + void clearFeatures() => clearField(7); + @$pb.TagNumber(7) + FeatureSet ensureFeatures() => $_ensure(3); + + /// The parser stores options it doesn't recognize here. See above. + @$pb.TagNumber(999) + $core.List get uninterpretedOption => $_getList(4); +} + +class EnumValueOptions extends $pb.GeneratedMessage { + factory EnumValueOptions({ + $core.bool? deprecated, + FeatureSet? features, + $core.bool? debugRedact, + $core.Iterable? uninterpretedOption, + }) { + final $result = create(); + if (deprecated != null) { + $result.deprecated = deprecated; + } + if (features != null) { + $result.features = features; + } + if (debugRedact != null) { + $result.debugRedact = debugRedact; + } + if (uninterpretedOption != null) { + $result.uninterpretedOption.addAll(uninterpretedOption); + } + return $result; + } + EnumValueOptions._() : super(); + factory EnumValueOptions.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory EnumValueOptions.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'EnumValueOptions', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), createEmptyInstance: create) + ..aOB(1, _omitFieldNames ? '' : 'deprecated') + ..aOM(2, _omitFieldNames ? '' : 'features', subBuilder: FeatureSet.create) + ..aOB(3, _omitFieldNames ? '' : 'debugRedact') + ..pc(999, _omitFieldNames ? '' : 'uninterpretedOption', $pb.PbFieldType.PM, subBuilder: UninterpretedOption.create) + ..hasExtensions = true + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + EnumValueOptions clone() => EnumValueOptions()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + EnumValueOptions copyWith(void Function(EnumValueOptions) updates) => super.copyWith((message) => updates(message as EnumValueOptions)) as EnumValueOptions; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static EnumValueOptions create() => EnumValueOptions._(); + EnumValueOptions createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static EnumValueOptions getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static EnumValueOptions? _defaultInstance; + + /// Is this enum value deprecated? + /// Depending on the target platform, this can emit Deprecated annotations + /// for the enum value, or it will be completely ignored; in the very least, + /// this is a formalization for deprecating enum values. + @$pb.TagNumber(1) + $core.bool get deprecated => $_getBF(0); + @$pb.TagNumber(1) + set deprecated($core.bool v) { $_setBool(0, v); } + @$pb.TagNumber(1) + $core.bool hasDeprecated() => $_has(0); + @$pb.TagNumber(1) + void clearDeprecated() => clearField(1); + + /// Any features defined in the specific edition. + @$pb.TagNumber(2) + FeatureSet get features => $_getN(1); + @$pb.TagNumber(2) + set features(FeatureSet v) { setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasFeatures() => $_has(1); + @$pb.TagNumber(2) + void clearFeatures() => clearField(2); + @$pb.TagNumber(2) + FeatureSet ensureFeatures() => $_ensure(1); + + /// Indicate that fields annotated with this enum value should not be printed + /// out when using debug formats, e.g. when the field contains sensitive + /// credentials. + @$pb.TagNumber(3) + $core.bool get debugRedact => $_getBF(2); + @$pb.TagNumber(3) + set debugRedact($core.bool v) { $_setBool(2, v); } + @$pb.TagNumber(3) + $core.bool hasDebugRedact() => $_has(2); + @$pb.TagNumber(3) + void clearDebugRedact() => clearField(3); + + /// The parser stores options it doesn't recognize here. See above. + @$pb.TagNumber(999) + $core.List get uninterpretedOption => $_getList(3); +} + +class ServiceOptions extends $pb.GeneratedMessage { + factory ServiceOptions({ + $core.bool? deprecated, + FeatureSet? features, + $core.Iterable? uninterpretedOption, + }) { + final $result = create(); + if (deprecated != null) { + $result.deprecated = deprecated; + } + if (features != null) { + $result.features = features; + } + if (uninterpretedOption != null) { + $result.uninterpretedOption.addAll(uninterpretedOption); + } + return $result; + } + ServiceOptions._() : super(); + factory ServiceOptions.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ServiceOptions.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ServiceOptions', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), createEmptyInstance: create) + ..aOB(33, _omitFieldNames ? '' : 'deprecated') + ..aOM(34, _omitFieldNames ? '' : 'features', subBuilder: FeatureSet.create) + ..pc(999, _omitFieldNames ? '' : 'uninterpretedOption', $pb.PbFieldType.PM, subBuilder: UninterpretedOption.create) + ..hasExtensions = true + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + ServiceOptions clone() => ServiceOptions()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + ServiceOptions copyWith(void Function(ServiceOptions) updates) => super.copyWith((message) => updates(message as ServiceOptions)) as ServiceOptions; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static ServiceOptions create() => ServiceOptions._(); + ServiceOptions createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static ServiceOptions getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static ServiceOptions? _defaultInstance; + + /// Is this service deprecated? + /// Depending on the target platform, this can emit Deprecated annotations + /// for the service, or it will be completely ignored; in the very least, + /// this is a formalization for deprecating services. + @$pb.TagNumber(33) + $core.bool get deprecated => $_getBF(0); + @$pb.TagNumber(33) + set deprecated($core.bool v) { $_setBool(0, v); } + @$pb.TagNumber(33) + $core.bool hasDeprecated() => $_has(0); + @$pb.TagNumber(33) + void clearDeprecated() => clearField(33); + + /// Any features defined in the specific edition. + @$pb.TagNumber(34) + FeatureSet get features => $_getN(1); + @$pb.TagNumber(34) + set features(FeatureSet v) { setField(34, v); } + @$pb.TagNumber(34) + $core.bool hasFeatures() => $_has(1); + @$pb.TagNumber(34) + void clearFeatures() => clearField(34); + @$pb.TagNumber(34) + FeatureSet ensureFeatures() => $_ensure(1); + + /// The parser stores options it doesn't recognize here. See above. + @$pb.TagNumber(999) + $core.List get uninterpretedOption => $_getList(2); +} + +class MethodOptions extends $pb.GeneratedMessage { + factory MethodOptions({ + $core.bool? deprecated, + MethodOptions_IdempotencyLevel? idempotencyLevel, + FeatureSet? features, + $core.Iterable? uninterpretedOption, + }) { + final $result = create(); + if (deprecated != null) { + $result.deprecated = deprecated; + } + if (idempotencyLevel != null) { + $result.idempotencyLevel = idempotencyLevel; + } + if (features != null) { + $result.features = features; + } + if (uninterpretedOption != null) { + $result.uninterpretedOption.addAll(uninterpretedOption); + } + return $result; + } + MethodOptions._() : super(); + factory MethodOptions.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory MethodOptions.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'MethodOptions', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), createEmptyInstance: create) + ..aOB(33, _omitFieldNames ? '' : 'deprecated') + ..e(34, _omitFieldNames ? '' : 'idempotencyLevel', $pb.PbFieldType.OE, defaultOrMaker: MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN, valueOf: MethodOptions_IdempotencyLevel.valueOf, enumValues: MethodOptions_IdempotencyLevel.values) + ..aOM(35, _omitFieldNames ? '' : 'features', subBuilder: FeatureSet.create) + ..pc(999, _omitFieldNames ? '' : 'uninterpretedOption', $pb.PbFieldType.PM, subBuilder: UninterpretedOption.create) + ..hasExtensions = true + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + MethodOptions clone() => MethodOptions()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + MethodOptions copyWith(void Function(MethodOptions) updates) => super.copyWith((message) => updates(message as MethodOptions)) as MethodOptions; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static MethodOptions create() => MethodOptions._(); + MethodOptions createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static MethodOptions getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static MethodOptions? _defaultInstance; + + /// Is this method deprecated? + /// Depending on the target platform, this can emit Deprecated annotations + /// for the method, or it will be completely ignored; in the very least, + /// this is a formalization for deprecating methods. + @$pb.TagNumber(33) + $core.bool get deprecated => $_getBF(0); + @$pb.TagNumber(33) + set deprecated($core.bool v) { $_setBool(0, v); } + @$pb.TagNumber(33) + $core.bool hasDeprecated() => $_has(0); + @$pb.TagNumber(33) + void clearDeprecated() => clearField(33); + + @$pb.TagNumber(34) + MethodOptions_IdempotencyLevel get idempotencyLevel => $_getN(1); + @$pb.TagNumber(34) + set idempotencyLevel(MethodOptions_IdempotencyLevel v) { setField(34, v); } + @$pb.TagNumber(34) + $core.bool hasIdempotencyLevel() => $_has(1); + @$pb.TagNumber(34) + void clearIdempotencyLevel() => clearField(34); + + /// Any features defined in the specific edition. + @$pb.TagNumber(35) + FeatureSet get features => $_getN(2); + @$pb.TagNumber(35) + set features(FeatureSet v) { setField(35, v); } + @$pb.TagNumber(35) + $core.bool hasFeatures() => $_has(2); + @$pb.TagNumber(35) + void clearFeatures() => clearField(35); + @$pb.TagNumber(35) + FeatureSet ensureFeatures() => $_ensure(2); + + /// The parser stores options it doesn't recognize here. See above. + @$pb.TagNumber(999) + $core.List get uninterpretedOption => $_getList(3); +} + +/// The name of the uninterpreted option. Each string represents a segment in +/// a dot-separated name. is_extension is true iff a segment represents an +/// extension (denoted with parentheses in options specs in .proto files). +/// E.g.,{ ["foo", false], ["bar.baz", true], ["moo", false] } represents +/// "foo.(bar.baz).moo". +class UninterpretedOption_NamePart extends $pb.GeneratedMessage { + factory UninterpretedOption_NamePart({ + $core.String? namePart, + $core.bool? isExtension, + }) { + final $result = create(); + if (namePart != null) { + $result.namePart = namePart; + } + if (isExtension != null) { + $result.isExtension = isExtension; + } + return $result; + } + UninterpretedOption_NamePart._() : super(); + factory UninterpretedOption_NamePart.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory UninterpretedOption_NamePart.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'UninterpretedOption.NamePart', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), createEmptyInstance: create) + ..aQS(1, _omitFieldNames ? '' : 'namePart') + ..a<$core.bool>(2, _omitFieldNames ? '' : 'isExtension', $pb.PbFieldType.QB) + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + UninterpretedOption_NamePart clone() => UninterpretedOption_NamePart()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + UninterpretedOption_NamePart copyWith(void Function(UninterpretedOption_NamePart) updates) => super.copyWith((message) => updates(message as UninterpretedOption_NamePart)) as UninterpretedOption_NamePart; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static UninterpretedOption_NamePart create() => UninterpretedOption_NamePart._(); + UninterpretedOption_NamePart createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static UninterpretedOption_NamePart getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static UninterpretedOption_NamePart? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get namePart => $_getSZ(0); + @$pb.TagNumber(1) + set namePart($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasNamePart() => $_has(0); + @$pb.TagNumber(1) + void clearNamePart() => clearField(1); + + @$pb.TagNumber(2) + $core.bool get isExtension => $_getBF(1); + @$pb.TagNumber(2) + set isExtension($core.bool v) { $_setBool(1, v); } + @$pb.TagNumber(2) + $core.bool hasIsExtension() => $_has(1); + @$pb.TagNumber(2) + void clearIsExtension() => clearField(2); +} + +/// A message representing a option the parser does not recognize. This only +/// appears in options protos created by the compiler::Parser class. +/// DescriptorPool resolves these when building Descriptor objects. Therefore, +/// options protos in descriptor objects (e.g. returned by Descriptor::options(), +/// or produced by Descriptor::CopyTo()) will never have UninterpretedOptions +/// in them. +class UninterpretedOption extends $pb.GeneratedMessage { + factory UninterpretedOption({ + $core.Iterable? name, + $core.String? identifierValue, + $fixnum.Int64? positiveIntValue, + $fixnum.Int64? negativeIntValue, + $core.double? doubleValue, + $core.List<$core.int>? stringValue, + $core.String? aggregateValue, + }) { + final $result = create(); + if (name != null) { + $result.name.addAll(name); + } + if (identifierValue != null) { + $result.identifierValue = identifierValue; + } + if (positiveIntValue != null) { + $result.positiveIntValue = positiveIntValue; + } + if (negativeIntValue != null) { + $result.negativeIntValue = negativeIntValue; + } + if (doubleValue != null) { + $result.doubleValue = doubleValue; + } + if (stringValue != null) { + $result.stringValue = stringValue; + } + if (aggregateValue != null) { + $result.aggregateValue = aggregateValue; + } + return $result; + } + UninterpretedOption._() : super(); + factory UninterpretedOption.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory UninterpretedOption.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'UninterpretedOption', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), createEmptyInstance: create) + ..pc(2, _omitFieldNames ? '' : 'name', $pb.PbFieldType.PM, subBuilder: UninterpretedOption_NamePart.create) + ..aOS(3, _omitFieldNames ? '' : 'identifierValue') + ..a<$fixnum.Int64>(4, _omitFieldNames ? '' : 'positiveIntValue', $pb.PbFieldType.OU6, defaultOrMaker: $fixnum.Int64.ZERO) + ..aInt64(5, _omitFieldNames ? '' : 'negativeIntValue') + ..a<$core.double>(6, _omitFieldNames ? '' : 'doubleValue', $pb.PbFieldType.OD) + ..a<$core.List<$core.int>>(7, _omitFieldNames ? '' : 'stringValue', $pb.PbFieldType.OY) + ..aOS(8, _omitFieldNames ? '' : 'aggregateValue') + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + UninterpretedOption clone() => UninterpretedOption()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + UninterpretedOption copyWith(void Function(UninterpretedOption) updates) => super.copyWith((message) => updates(message as UninterpretedOption)) as UninterpretedOption; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static UninterpretedOption create() => UninterpretedOption._(); + UninterpretedOption createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static UninterpretedOption getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static UninterpretedOption? _defaultInstance; + + @$pb.TagNumber(2) + $core.List get name => $_getList(0); + + /// The value of the uninterpreted option, in whatever type the tokenizer + /// identified it as during parsing. Exactly one of these should be set. + @$pb.TagNumber(3) + $core.String get identifierValue => $_getSZ(1); + @$pb.TagNumber(3) + set identifierValue($core.String v) { $_setString(1, v); } + @$pb.TagNumber(3) + $core.bool hasIdentifierValue() => $_has(1); + @$pb.TagNumber(3) + void clearIdentifierValue() => clearField(3); + + @$pb.TagNumber(4) + $fixnum.Int64 get positiveIntValue => $_getI64(2); + @$pb.TagNumber(4) + set positiveIntValue($fixnum.Int64 v) { $_setInt64(2, v); } + @$pb.TagNumber(4) + $core.bool hasPositiveIntValue() => $_has(2); + @$pb.TagNumber(4) + void clearPositiveIntValue() => clearField(4); + + @$pb.TagNumber(5) + $fixnum.Int64 get negativeIntValue => $_getI64(3); + @$pb.TagNumber(5) + set negativeIntValue($fixnum.Int64 v) { $_setInt64(3, v); } + @$pb.TagNumber(5) + $core.bool hasNegativeIntValue() => $_has(3); + @$pb.TagNumber(5) + void clearNegativeIntValue() => clearField(5); + + @$pb.TagNumber(6) + $core.double get doubleValue => $_getN(4); + @$pb.TagNumber(6) + set doubleValue($core.double v) { $_setDouble(4, v); } + @$pb.TagNumber(6) + $core.bool hasDoubleValue() => $_has(4); + @$pb.TagNumber(6) + void clearDoubleValue() => clearField(6); + + @$pb.TagNumber(7) + $core.List<$core.int> get stringValue => $_getN(5); + @$pb.TagNumber(7) + set stringValue($core.List<$core.int> v) { $_setBytes(5, v); } + @$pb.TagNumber(7) + $core.bool hasStringValue() => $_has(5); + @$pb.TagNumber(7) + void clearStringValue() => clearField(7); + + @$pb.TagNumber(8) + $core.String get aggregateValue => $_getSZ(6); + @$pb.TagNumber(8) + set aggregateValue($core.String v) { $_setString(6, v); } + @$pb.TagNumber(8) + $core.bool hasAggregateValue() => $_has(6); + @$pb.TagNumber(8) + void clearAggregateValue() => clearField(8); +} + +/// TODO Enums in C++ gencode (and potentially other languages) are +/// not well scoped. This means that each of the feature enums below can clash +/// with each other. The short names we've chosen maximize call-site +/// readability, but leave us very open to this scenario. A future feature will +/// be designed and implemented to handle this, hopefully before we ever hit a +/// conflict here. +class FeatureSet extends $pb.GeneratedMessage { + factory FeatureSet({ + FeatureSet_FieldPresence? fieldPresence, + FeatureSet_EnumType? enumType, + FeatureSet_RepeatedFieldEncoding? repeatedFieldEncoding, + FeatureSet_Utf8Validation? utf8Validation, + FeatureSet_MessageEncoding? messageEncoding, + FeatureSet_JsonFormat? jsonFormat, + }) { + final $result = create(); + if (fieldPresence != null) { + $result.fieldPresence = fieldPresence; + } + if (enumType != null) { + $result.enumType = enumType; + } + if (repeatedFieldEncoding != null) { + $result.repeatedFieldEncoding = repeatedFieldEncoding; + } + if (utf8Validation != null) { + $result.utf8Validation = utf8Validation; + } + if (messageEncoding != null) { + $result.messageEncoding = messageEncoding; + } + if (jsonFormat != null) { + $result.jsonFormat = jsonFormat; + } + return $result; + } + FeatureSet._() : super(); + factory FeatureSet.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory FeatureSet.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'FeatureSet', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), createEmptyInstance: create) + ..e(1, _omitFieldNames ? '' : 'fieldPresence', $pb.PbFieldType.OE, defaultOrMaker: FeatureSet_FieldPresence.FIELD_PRESENCE_UNKNOWN, valueOf: FeatureSet_FieldPresence.valueOf, enumValues: FeatureSet_FieldPresence.values) + ..e(2, _omitFieldNames ? '' : 'enumType', $pb.PbFieldType.OE, defaultOrMaker: FeatureSet_EnumType.ENUM_TYPE_UNKNOWN, valueOf: FeatureSet_EnumType.valueOf, enumValues: FeatureSet_EnumType.values) + ..e(3, _omitFieldNames ? '' : 'repeatedFieldEncoding', $pb.PbFieldType.OE, defaultOrMaker: FeatureSet_RepeatedFieldEncoding.REPEATED_FIELD_ENCODING_UNKNOWN, valueOf: FeatureSet_RepeatedFieldEncoding.valueOf, enumValues: FeatureSet_RepeatedFieldEncoding.values) + ..e(4, _omitFieldNames ? '' : 'utf8Validation', $pb.PbFieldType.OE, defaultOrMaker: FeatureSet_Utf8Validation.UTF8_VALIDATION_UNKNOWN, valueOf: FeatureSet_Utf8Validation.valueOf, enumValues: FeatureSet_Utf8Validation.values) + ..e(5, _omitFieldNames ? '' : 'messageEncoding', $pb.PbFieldType.OE, defaultOrMaker: FeatureSet_MessageEncoding.MESSAGE_ENCODING_UNKNOWN, valueOf: FeatureSet_MessageEncoding.valueOf, enumValues: FeatureSet_MessageEncoding.values) + ..e(6, _omitFieldNames ? '' : 'jsonFormat', $pb.PbFieldType.OE, defaultOrMaker: FeatureSet_JsonFormat.JSON_FORMAT_UNKNOWN, valueOf: FeatureSet_JsonFormat.valueOf, enumValues: FeatureSet_JsonFormat.values) + ..hasExtensions = true + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + FeatureSet clone() => FeatureSet()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + FeatureSet copyWith(void Function(FeatureSet) updates) => super.copyWith((message) => updates(message as FeatureSet)) as FeatureSet; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static FeatureSet create() => FeatureSet._(); + FeatureSet createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static FeatureSet getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static FeatureSet? _defaultInstance; + + @$pb.TagNumber(1) + FeatureSet_FieldPresence get fieldPresence => $_getN(0); + @$pb.TagNumber(1) + set fieldPresence(FeatureSet_FieldPresence v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasFieldPresence() => $_has(0); + @$pb.TagNumber(1) + void clearFieldPresence() => clearField(1); + + @$pb.TagNumber(2) + FeatureSet_EnumType get enumType => $_getN(1); + @$pb.TagNumber(2) + set enumType(FeatureSet_EnumType v) { setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasEnumType() => $_has(1); + @$pb.TagNumber(2) + void clearEnumType() => clearField(2); + + @$pb.TagNumber(3) + FeatureSet_RepeatedFieldEncoding get repeatedFieldEncoding => $_getN(2); + @$pb.TagNumber(3) + set repeatedFieldEncoding(FeatureSet_RepeatedFieldEncoding v) { setField(3, v); } + @$pb.TagNumber(3) + $core.bool hasRepeatedFieldEncoding() => $_has(2); + @$pb.TagNumber(3) + void clearRepeatedFieldEncoding() => clearField(3); + + @$pb.TagNumber(4) + FeatureSet_Utf8Validation get utf8Validation => $_getN(3); + @$pb.TagNumber(4) + set utf8Validation(FeatureSet_Utf8Validation v) { setField(4, v); } + @$pb.TagNumber(4) + $core.bool hasUtf8Validation() => $_has(3); + @$pb.TagNumber(4) + void clearUtf8Validation() => clearField(4); + + @$pb.TagNumber(5) + FeatureSet_MessageEncoding get messageEncoding => $_getN(4); + @$pb.TagNumber(5) + set messageEncoding(FeatureSet_MessageEncoding v) { setField(5, v); } + @$pb.TagNumber(5) + $core.bool hasMessageEncoding() => $_has(4); + @$pb.TagNumber(5) + void clearMessageEncoding() => clearField(5); + + @$pb.TagNumber(6) + FeatureSet_JsonFormat get jsonFormat => $_getN(5); + @$pb.TagNumber(6) + set jsonFormat(FeatureSet_JsonFormat v) { setField(6, v); } + @$pb.TagNumber(6) + $core.bool hasJsonFormat() => $_has(5); + @$pb.TagNumber(6) + void clearJsonFormat() => clearField(6); +} + +/// A map from every known edition with a unique set of defaults to its +/// defaults. Not all editions may be contained here. For a given edition, +/// the defaults at the closest matching edition ordered at or before it should +/// be used. This field must be in strict ascending order by edition. +class FeatureSetDefaults_FeatureSetEditionDefault extends $pb.GeneratedMessage { + factory FeatureSetDefaults_FeatureSetEditionDefault({ + FeatureSet? features, + Edition? edition, + }) { + final $result = create(); + if (features != null) { + $result.features = features; + } + if (edition != null) { + $result.edition = edition; + } + return $result; + } + FeatureSetDefaults_FeatureSetEditionDefault._() : super(); + factory FeatureSetDefaults_FeatureSetEditionDefault.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory FeatureSetDefaults_FeatureSetEditionDefault.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'FeatureSetDefaults.FeatureSetEditionDefault', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), createEmptyInstance: create) + ..aOM(2, _omitFieldNames ? '' : 'features', subBuilder: FeatureSet.create) + ..e(3, _omitFieldNames ? '' : 'edition', $pb.PbFieldType.OE, defaultOrMaker: Edition.EDITION_UNKNOWN, valueOf: Edition.valueOf, enumValues: Edition.values) + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + FeatureSetDefaults_FeatureSetEditionDefault clone() => FeatureSetDefaults_FeatureSetEditionDefault()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + FeatureSetDefaults_FeatureSetEditionDefault copyWith(void Function(FeatureSetDefaults_FeatureSetEditionDefault) updates) => super.copyWith((message) => updates(message as FeatureSetDefaults_FeatureSetEditionDefault)) as FeatureSetDefaults_FeatureSetEditionDefault; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static FeatureSetDefaults_FeatureSetEditionDefault create() => FeatureSetDefaults_FeatureSetEditionDefault._(); + FeatureSetDefaults_FeatureSetEditionDefault createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static FeatureSetDefaults_FeatureSetEditionDefault getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static FeatureSetDefaults_FeatureSetEditionDefault? _defaultInstance; + + @$pb.TagNumber(2) + FeatureSet get features => $_getN(0); + @$pb.TagNumber(2) + set features(FeatureSet v) { setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasFeatures() => $_has(0); + @$pb.TagNumber(2) + void clearFeatures() => clearField(2); + @$pb.TagNumber(2) + FeatureSet ensureFeatures() => $_ensure(0); + + @$pb.TagNumber(3) + Edition get edition => $_getN(1); + @$pb.TagNumber(3) + set edition(Edition v) { setField(3, v); } + @$pb.TagNumber(3) + $core.bool hasEdition() => $_has(1); + @$pb.TagNumber(3) + void clearEdition() => clearField(3); +} + +/// A compiled specification for the defaults of a set of features. These +/// messages are generated from FeatureSet extensions and can be used to seed +/// feature resolution. The resolution with this object becomes a simple search +/// for the closest matching edition, followed by proto merges. +class FeatureSetDefaults extends $pb.GeneratedMessage { + factory FeatureSetDefaults({ + $core.Iterable? defaults, + Edition? minimumEdition, + Edition? maximumEdition, + }) { + final $result = create(); + if (defaults != null) { + $result.defaults.addAll(defaults); + } + if (minimumEdition != null) { + $result.minimumEdition = minimumEdition; + } + if (maximumEdition != null) { + $result.maximumEdition = maximumEdition; + } + return $result; + } + FeatureSetDefaults._() : super(); + factory FeatureSetDefaults.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory FeatureSetDefaults.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'FeatureSetDefaults', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), createEmptyInstance: create) + ..pc(1, _omitFieldNames ? '' : 'defaults', $pb.PbFieldType.PM, subBuilder: FeatureSetDefaults_FeatureSetEditionDefault.create) + ..e(4, _omitFieldNames ? '' : 'minimumEdition', $pb.PbFieldType.OE, defaultOrMaker: Edition.EDITION_UNKNOWN, valueOf: Edition.valueOf, enumValues: Edition.values) + ..e(5, _omitFieldNames ? '' : 'maximumEdition', $pb.PbFieldType.OE, defaultOrMaker: Edition.EDITION_UNKNOWN, valueOf: Edition.valueOf, enumValues: Edition.values) + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + FeatureSetDefaults clone() => FeatureSetDefaults()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + FeatureSetDefaults copyWith(void Function(FeatureSetDefaults) updates) => super.copyWith((message) => updates(message as FeatureSetDefaults)) as FeatureSetDefaults; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static FeatureSetDefaults create() => FeatureSetDefaults._(); + FeatureSetDefaults createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static FeatureSetDefaults getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static FeatureSetDefaults? _defaultInstance; + + @$pb.TagNumber(1) + $core.List get defaults => $_getList(0); + + /// The minimum supported edition (inclusive) when this was constructed. + /// Editions before this will not have defaults. + @$pb.TagNumber(4) + Edition get minimumEdition => $_getN(1); + @$pb.TagNumber(4) + set minimumEdition(Edition v) { setField(4, v); } + @$pb.TagNumber(4) + $core.bool hasMinimumEdition() => $_has(1); + @$pb.TagNumber(4) + void clearMinimumEdition() => clearField(4); + + /// The maximum known edition (inclusive) when this was constructed. Editions + /// after this will not have reliable defaults. + @$pb.TagNumber(5) + Edition get maximumEdition => $_getN(2); + @$pb.TagNumber(5) + set maximumEdition(Edition v) { setField(5, v); } + @$pb.TagNumber(5) + $core.bool hasMaximumEdition() => $_has(2); + @$pb.TagNumber(5) + void clearMaximumEdition() => clearField(5); +} + +class SourceCodeInfo_Location extends $pb.GeneratedMessage { + factory SourceCodeInfo_Location({ + $core.Iterable<$core.int>? path, + $core.Iterable<$core.int>? span, + $core.String? leadingComments, + $core.String? trailingComments, + $core.Iterable<$core.String>? leadingDetachedComments, + }) { + final $result = create(); + if (path != null) { + $result.path.addAll(path); + } + if (span != null) { + $result.span.addAll(span); + } + if (leadingComments != null) { + $result.leadingComments = leadingComments; + } + if (trailingComments != null) { + $result.trailingComments = trailingComments; + } + if (leadingDetachedComments != null) { + $result.leadingDetachedComments.addAll(leadingDetachedComments); + } + return $result; + } + SourceCodeInfo_Location._() : super(); + factory SourceCodeInfo_Location.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory SourceCodeInfo_Location.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'SourceCodeInfo.Location', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), createEmptyInstance: create) + ..p<$core.int>(1, _omitFieldNames ? '' : 'path', $pb.PbFieldType.K3) + ..p<$core.int>(2, _omitFieldNames ? '' : 'span', $pb.PbFieldType.K3) + ..aOS(3, _omitFieldNames ? '' : 'leadingComments') + ..aOS(4, _omitFieldNames ? '' : 'trailingComments') + ..pPS(6, _omitFieldNames ? '' : 'leadingDetachedComments') + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + SourceCodeInfo_Location clone() => SourceCodeInfo_Location()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + SourceCodeInfo_Location copyWith(void Function(SourceCodeInfo_Location) updates) => super.copyWith((message) => updates(message as SourceCodeInfo_Location)) as SourceCodeInfo_Location; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static SourceCodeInfo_Location create() => SourceCodeInfo_Location._(); + SourceCodeInfo_Location createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static SourceCodeInfo_Location getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static SourceCodeInfo_Location? _defaultInstance; + + /// Identifies which part of the FileDescriptorProto was defined at this + /// location. + /// + /// Each element is a field number or an index. They form a path from + /// the root FileDescriptorProto to the place where the definition occurs. + /// For example, this path: + /// [ 4, 3, 2, 7, 1 ] + /// refers to: + /// file.message_type(3) // 4, 3 + /// .field(7) // 2, 7 + /// .name() // 1 + /// This is because FileDescriptorProto.message_type has field number 4: + /// repeated DescriptorProto message_type = 4; + /// and DescriptorProto.field has field number 2: + /// repeated FieldDescriptorProto field = 2; + /// and FieldDescriptorProto.name has field number 1: + /// optional string name = 1; + /// + /// Thus, the above path gives the location of a field name. If we removed + /// the last element: + /// [ 4, 3, 2, 7 ] + /// this path refers to the whole field declaration (from the beginning + /// of the label to the terminating semicolon). + @$pb.TagNumber(1) + $core.List<$core.int> get path => $_getList(0); + + /// Always has exactly three or four elements: start line, start column, + /// end line (optional, otherwise assumed same as start line), end column. + /// These are packed into a single field for efficiency. Note that line + /// and column numbers are zero-based -- typically you will want to add + /// 1 to each before displaying to a user. + @$pb.TagNumber(2) + $core.List<$core.int> get span => $_getList(1); + + /// If this SourceCodeInfo represents a complete declaration, these are any + /// comments appearing before and after the declaration which appear to be + /// attached to the declaration. + /// + /// A series of line comments appearing on consecutive lines, with no other + /// tokens appearing on those lines, will be treated as a single comment. + /// + /// leading_detached_comments will keep paragraphs of comments that appear + /// before (but not connected to) the current element. Each paragraph, + /// separated by empty lines, will be one comment element in the repeated + /// field. + /// + /// Only the comment content is provided; comment markers (e.g. //) are + /// stripped out. For block comments, leading whitespace and an asterisk + /// will be stripped from the beginning of each line other than the first. + /// Newlines are included in the output. + /// + /// Examples: + /// + /// optional int32 foo = 1; // Comment attached to foo. + /// // Comment attached to bar. + /// optional int32 bar = 2; + /// + /// optional string baz = 3; + /// // Comment attached to baz. + /// // Another line attached to baz. + /// + /// // Comment attached to moo. + /// // + /// // Another line attached to moo. + /// optional double moo = 4; + /// + /// // Detached comment for corge. This is not leading or trailing comments + /// // to moo or corge because there are blank lines separating it from + /// // both. + /// + /// // Detached comment for corge paragraph 2. + /// + /// optional string corge = 5; + /// /* Block comment attached + /// * to corge. Leading asterisks + /// * will be removed. */ + /// /* Block comment attached to + /// * grault. */ + /// optional int32 grault = 6; + /// + /// // ignored detached comments. + @$pb.TagNumber(3) + $core.String get leadingComments => $_getSZ(2); + @$pb.TagNumber(3) + set leadingComments($core.String v) { $_setString(2, v); } + @$pb.TagNumber(3) + $core.bool hasLeadingComments() => $_has(2); + @$pb.TagNumber(3) + void clearLeadingComments() => clearField(3); + + @$pb.TagNumber(4) + $core.String get trailingComments => $_getSZ(3); + @$pb.TagNumber(4) + set trailingComments($core.String v) { $_setString(3, v); } + @$pb.TagNumber(4) + $core.bool hasTrailingComments() => $_has(3); + @$pb.TagNumber(4) + void clearTrailingComments() => clearField(4); + + @$pb.TagNumber(6) + $core.List<$core.String> get leadingDetachedComments => $_getList(4); +} + +/// Encapsulates information about the original source file from which a +/// FileDescriptorProto was generated. +class SourceCodeInfo extends $pb.GeneratedMessage { + factory SourceCodeInfo({ + $core.Iterable? location, + }) { + final $result = create(); + if (location != null) { + $result.location.addAll(location); + } + return $result; + } + SourceCodeInfo._() : super(); + factory SourceCodeInfo.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory SourceCodeInfo.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'SourceCodeInfo', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), createEmptyInstance: create) + ..pc(1, _omitFieldNames ? '' : 'location', $pb.PbFieldType.PM, subBuilder: SourceCodeInfo_Location.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') + SourceCodeInfo clone() => SourceCodeInfo()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + SourceCodeInfo copyWith(void Function(SourceCodeInfo) updates) => super.copyWith((message) => updates(message as SourceCodeInfo)) as SourceCodeInfo; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static SourceCodeInfo create() => SourceCodeInfo._(); + SourceCodeInfo createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static SourceCodeInfo getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static SourceCodeInfo? _defaultInstance; + + /// A Location identifies a piece of source code in a .proto file which + /// corresponds to a particular definition. This information is intended + /// to be useful to IDEs, code indexers, documentation generators, and similar + /// tools. + /// + /// For example, say we have a file like: + /// message Foo { + /// optional string foo = 1; + /// } + /// Let's look at just the field definition: + /// optional string foo = 1; + /// ^ ^^ ^^ ^ ^^^ + /// a bc de f ghi + /// We have the following locations: + /// span path represents + /// [a,i) [ 4, 0, 2, 0 ] The whole field definition. + /// [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). + /// [c,d) [ 4, 0, 2, 0, 5 ] The type (string). + /// [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). + /// [g,h) [ 4, 0, 2, 0, 3 ] The number (1). + /// + /// Notes: + /// - A location may refer to a repeated field itself (i.e. not to any + /// particular index within it). This is used whenever a set of elements are + /// logically enclosed in a single code segment. For example, an entire + /// extend block (possibly containing multiple extension definitions) will + /// have an outer location whose path refers to the "extensions" repeated + /// field without an index. + /// - Multiple locations may have the same path. This happens when a single + /// logical declaration is spread out across multiple places. The most + /// obvious example is the "extend" block again -- there may be multiple + /// extend blocks in the same scope, each of which will have the same path. + /// - A location's span is not always a subset of its parent's span. For + /// example, the "extendee" of an extension declaration appears at the + /// beginning of the "extend" block and is shared by all extensions within + /// the block. + /// - Just because a location's span is a subset of some other location's span + /// does not mean that it is a descendant. For example, a "group" defines + /// both a type and a field in a single declaration. Thus, the locations + /// corresponding to the type and field and their components will overlap. + /// - Code which tries to interpret locations should probably be designed to + /// ignore those that it doesn't understand, as more types of locations could + /// be recorded in the future. + @$pb.TagNumber(1) + $core.List get location => $_getList(0); +} + +class GeneratedCodeInfo_Annotation extends $pb.GeneratedMessage { + factory GeneratedCodeInfo_Annotation({ + $core.Iterable<$core.int>? path, + $core.String? sourceFile, + $core.int? begin, + $core.int? end, + GeneratedCodeInfo_Annotation_Semantic? semantic, + }) { + final $result = create(); + if (path != null) { + $result.path.addAll(path); + } + if (sourceFile != null) { + $result.sourceFile = sourceFile; + } + if (begin != null) { + $result.begin = begin; + } + if (end != null) { + $result.end = end; + } + if (semantic != null) { + $result.semantic = semantic; + } + return $result; + } + GeneratedCodeInfo_Annotation._() : super(); + factory GeneratedCodeInfo_Annotation.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GeneratedCodeInfo_Annotation.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GeneratedCodeInfo.Annotation', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), createEmptyInstance: create) + ..p<$core.int>(1, _omitFieldNames ? '' : 'path', $pb.PbFieldType.K3) + ..aOS(2, _omitFieldNames ? '' : 'sourceFile') + ..a<$core.int>(3, _omitFieldNames ? '' : 'begin', $pb.PbFieldType.O3) + ..a<$core.int>(4, _omitFieldNames ? '' : 'end', $pb.PbFieldType.O3) + ..e(5, _omitFieldNames ? '' : 'semantic', $pb.PbFieldType.OE, defaultOrMaker: GeneratedCodeInfo_Annotation_Semantic.NONE, valueOf: GeneratedCodeInfo_Annotation_Semantic.valueOf, enumValues: GeneratedCodeInfo_Annotation_Semantic.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') + GeneratedCodeInfo_Annotation clone() => GeneratedCodeInfo_Annotation()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GeneratedCodeInfo_Annotation copyWith(void Function(GeneratedCodeInfo_Annotation) updates) => super.copyWith((message) => updates(message as GeneratedCodeInfo_Annotation)) as GeneratedCodeInfo_Annotation; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static GeneratedCodeInfo_Annotation create() => GeneratedCodeInfo_Annotation._(); + GeneratedCodeInfo_Annotation createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GeneratedCodeInfo_Annotation getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GeneratedCodeInfo_Annotation? _defaultInstance; + + /// Identifies the element in the original source .proto file. This field + /// is formatted the same as SourceCodeInfo.Location.path. + @$pb.TagNumber(1) + $core.List<$core.int> get path => $_getList(0); + + /// Identifies the filesystem path to the original source .proto. + @$pb.TagNumber(2) + $core.String get sourceFile => $_getSZ(1); + @$pb.TagNumber(2) + set sourceFile($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasSourceFile() => $_has(1); + @$pb.TagNumber(2) + void clearSourceFile() => clearField(2); + + /// Identifies the starting offset in bytes in the generated code + /// that relates to the identified object. + @$pb.TagNumber(3) + $core.int get begin => $_getIZ(2); + @$pb.TagNumber(3) + set begin($core.int v) { $_setSignedInt32(2, v); } + @$pb.TagNumber(3) + $core.bool hasBegin() => $_has(2); + @$pb.TagNumber(3) + void clearBegin() => clearField(3); + + /// Identifies the ending offset in bytes in the generated code that + /// relates to the identified object. The end offset should be one past + /// the last relevant byte (so the length of the text = end - begin). + @$pb.TagNumber(4) + $core.int get end => $_getIZ(3); + @$pb.TagNumber(4) + set end($core.int v) { $_setSignedInt32(3, v); } + @$pb.TagNumber(4) + $core.bool hasEnd() => $_has(3); + @$pb.TagNumber(4) + void clearEnd() => clearField(4); + + @$pb.TagNumber(5) + GeneratedCodeInfo_Annotation_Semantic get semantic => $_getN(4); + @$pb.TagNumber(5) + set semantic(GeneratedCodeInfo_Annotation_Semantic v) { setField(5, v); } + @$pb.TagNumber(5) + $core.bool hasSemantic() => $_has(4); + @$pb.TagNumber(5) + void clearSemantic() => clearField(5); +} + +/// Describes the relationship between generated code and its original source +/// file. A GeneratedCodeInfo message is associated with only one generated +/// source file, but may contain references to different source .proto files. +class GeneratedCodeInfo extends $pb.GeneratedMessage { + factory GeneratedCodeInfo({ + $core.Iterable? annotation, + }) { + final $result = create(); + if (annotation != null) { + $result.annotation.addAll(annotation); + } + return $result; + } + GeneratedCodeInfo._() : super(); + factory GeneratedCodeInfo.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GeneratedCodeInfo.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GeneratedCodeInfo', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), createEmptyInstance: create) + ..pc(1, _omitFieldNames ? '' : 'annotation', $pb.PbFieldType.PM, subBuilder: GeneratedCodeInfo_Annotation.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') + GeneratedCodeInfo clone() => GeneratedCodeInfo()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GeneratedCodeInfo copyWith(void Function(GeneratedCodeInfo) updates) => super.copyWith((message) => updates(message as GeneratedCodeInfo)) as GeneratedCodeInfo; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static GeneratedCodeInfo create() => GeneratedCodeInfo._(); + GeneratedCodeInfo createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GeneratedCodeInfo getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GeneratedCodeInfo? _defaultInstance; + + /// An Annotation connects some span of text in generated code to an element + /// of its generating .proto file. + @$pb.TagNumber(1) + $core.List get annotation => $_getList(0); +} + + +const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); +const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/packages/corks/lib/src/proto/google/protobuf/descriptor.pbenum.dart b/packages/corks/lib/src/proto/google/protobuf/descriptor.pbenum.dart new file mode 100644 index 00000000..3e18c030 --- /dev/null +++ b/packages/corks/lib/src/proto/google/protobuf/descriptor.pbenum.dart @@ -0,0 +1,377 @@ +// +// Generated code. Do not modify. +// source: google/protobuf/descriptor.proto +// +// @dart = 2.12 + +// 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 full set of known editions. +class Edition extends $pb.ProtobufEnum { + static const Edition EDITION_UNKNOWN = Edition._(0, _omitEnumNames ? '' : 'EDITION_UNKNOWN'); + static const Edition EDITION_PROTO2 = Edition._(998, _omitEnumNames ? '' : 'EDITION_PROTO2'); + static const Edition EDITION_PROTO3 = Edition._(999, _omitEnumNames ? '' : 'EDITION_PROTO3'); + static const Edition EDITION_2023 = Edition._(1000, _omitEnumNames ? '' : 'EDITION_2023'); + static const Edition EDITION_1_TEST_ONLY = Edition._(1, _omitEnumNames ? '' : 'EDITION_1_TEST_ONLY'); + static const Edition EDITION_2_TEST_ONLY = Edition._(2, _omitEnumNames ? '' : 'EDITION_2_TEST_ONLY'); + static const Edition EDITION_99997_TEST_ONLY = Edition._(99997, _omitEnumNames ? '' : 'EDITION_99997_TEST_ONLY'); + static const Edition EDITION_99998_TEST_ONLY = Edition._(99998, _omitEnumNames ? '' : 'EDITION_99998_TEST_ONLY'); + static const Edition EDITION_99999_TEST_ONLY = Edition._(99999, _omitEnumNames ? '' : 'EDITION_99999_TEST_ONLY'); + + static const $core.List values = [ + EDITION_UNKNOWN, + EDITION_PROTO2, + EDITION_PROTO3, + EDITION_2023, + EDITION_1_TEST_ONLY, + EDITION_2_TEST_ONLY, + EDITION_99997_TEST_ONLY, + EDITION_99998_TEST_ONLY, + EDITION_99999_TEST_ONLY, + ]; + + static final $core.Map<$core.int, Edition> _byValue = $pb.ProtobufEnum.initByValue(values); + static Edition? valueOf($core.int value) => _byValue[value]; + + const Edition._($core.int v, $core.String n) : super(v, n); +} + +/// The verification state of the extension range. +class ExtensionRangeOptions_VerificationState extends $pb.ProtobufEnum { + static const ExtensionRangeOptions_VerificationState DECLARATION = ExtensionRangeOptions_VerificationState._(0, _omitEnumNames ? '' : 'DECLARATION'); + static const ExtensionRangeOptions_VerificationState UNVERIFIED = ExtensionRangeOptions_VerificationState._(1, _omitEnumNames ? '' : 'UNVERIFIED'); + + static const $core.List values = [ + DECLARATION, + UNVERIFIED, + ]; + + static final $core.Map<$core.int, ExtensionRangeOptions_VerificationState> _byValue = $pb.ProtobufEnum.initByValue(values); + static ExtensionRangeOptions_VerificationState? valueOf($core.int value) => _byValue[value]; + + const ExtensionRangeOptions_VerificationState._($core.int v, $core.String n) : super(v, n); +} + +class FieldDescriptorProto_Type extends $pb.ProtobufEnum { + static const FieldDescriptorProto_Type TYPE_DOUBLE = FieldDescriptorProto_Type._(1, _omitEnumNames ? '' : 'TYPE_DOUBLE'); + static const FieldDescriptorProto_Type TYPE_FLOAT = FieldDescriptorProto_Type._(2, _omitEnumNames ? '' : 'TYPE_FLOAT'); + static const FieldDescriptorProto_Type TYPE_INT64 = FieldDescriptorProto_Type._(3, _omitEnumNames ? '' : 'TYPE_INT64'); + static const FieldDescriptorProto_Type TYPE_UINT64 = FieldDescriptorProto_Type._(4, _omitEnumNames ? '' : 'TYPE_UINT64'); + static const FieldDescriptorProto_Type TYPE_INT32 = FieldDescriptorProto_Type._(5, _omitEnumNames ? '' : 'TYPE_INT32'); + static const FieldDescriptorProto_Type TYPE_FIXED64 = FieldDescriptorProto_Type._(6, _omitEnumNames ? '' : 'TYPE_FIXED64'); + static const FieldDescriptorProto_Type TYPE_FIXED32 = FieldDescriptorProto_Type._(7, _omitEnumNames ? '' : 'TYPE_FIXED32'); + static const FieldDescriptorProto_Type TYPE_BOOL = FieldDescriptorProto_Type._(8, _omitEnumNames ? '' : 'TYPE_BOOL'); + static const FieldDescriptorProto_Type TYPE_STRING = FieldDescriptorProto_Type._(9, _omitEnumNames ? '' : 'TYPE_STRING'); + static const FieldDescriptorProto_Type TYPE_GROUP = FieldDescriptorProto_Type._(10, _omitEnumNames ? '' : 'TYPE_GROUP'); + static const FieldDescriptorProto_Type TYPE_MESSAGE = FieldDescriptorProto_Type._(11, _omitEnumNames ? '' : 'TYPE_MESSAGE'); + static const FieldDescriptorProto_Type TYPE_BYTES = FieldDescriptorProto_Type._(12, _omitEnumNames ? '' : 'TYPE_BYTES'); + static const FieldDescriptorProto_Type TYPE_UINT32 = FieldDescriptorProto_Type._(13, _omitEnumNames ? '' : 'TYPE_UINT32'); + static const FieldDescriptorProto_Type TYPE_ENUM = FieldDescriptorProto_Type._(14, _omitEnumNames ? '' : 'TYPE_ENUM'); + static const FieldDescriptorProto_Type TYPE_SFIXED32 = FieldDescriptorProto_Type._(15, _omitEnumNames ? '' : 'TYPE_SFIXED32'); + static const FieldDescriptorProto_Type TYPE_SFIXED64 = FieldDescriptorProto_Type._(16, _omitEnumNames ? '' : 'TYPE_SFIXED64'); + static const FieldDescriptorProto_Type TYPE_SINT32 = FieldDescriptorProto_Type._(17, _omitEnumNames ? '' : 'TYPE_SINT32'); + static const FieldDescriptorProto_Type TYPE_SINT64 = FieldDescriptorProto_Type._(18, _omitEnumNames ? '' : 'TYPE_SINT64'); + + static const $core.List values = [ + TYPE_DOUBLE, + TYPE_FLOAT, + TYPE_INT64, + TYPE_UINT64, + TYPE_INT32, + TYPE_FIXED64, + TYPE_FIXED32, + TYPE_BOOL, + TYPE_STRING, + TYPE_GROUP, + TYPE_MESSAGE, + TYPE_BYTES, + TYPE_UINT32, + TYPE_ENUM, + TYPE_SFIXED32, + TYPE_SFIXED64, + TYPE_SINT32, + TYPE_SINT64, + ]; + + static final $core.Map<$core.int, FieldDescriptorProto_Type> _byValue = $pb.ProtobufEnum.initByValue(values); + static FieldDescriptorProto_Type? valueOf($core.int value) => _byValue[value]; + + const FieldDescriptorProto_Type._($core.int v, $core.String n) : super(v, n); +} + +class FieldDescriptorProto_Label extends $pb.ProtobufEnum { + static const FieldDescriptorProto_Label LABEL_OPTIONAL = FieldDescriptorProto_Label._(1, _omitEnumNames ? '' : 'LABEL_OPTIONAL'); + static const FieldDescriptorProto_Label LABEL_REPEATED = FieldDescriptorProto_Label._(3, _omitEnumNames ? '' : 'LABEL_REPEATED'); + static const FieldDescriptorProto_Label LABEL_REQUIRED = FieldDescriptorProto_Label._(2, _omitEnumNames ? '' : 'LABEL_REQUIRED'); + + static const $core.List values = [ + LABEL_OPTIONAL, + LABEL_REPEATED, + LABEL_REQUIRED, + ]; + + static final $core.Map<$core.int, FieldDescriptorProto_Label> _byValue = $pb.ProtobufEnum.initByValue(values); + static FieldDescriptorProto_Label? valueOf($core.int value) => _byValue[value]; + + const FieldDescriptorProto_Label._($core.int v, $core.String n) : super(v, n); +} + +/// Generated classes can be optimized for speed or code size. +class FileOptions_OptimizeMode extends $pb.ProtobufEnum { + static const FileOptions_OptimizeMode SPEED = FileOptions_OptimizeMode._(1, _omitEnumNames ? '' : 'SPEED'); + static const FileOptions_OptimizeMode CODE_SIZE = FileOptions_OptimizeMode._(2, _omitEnumNames ? '' : 'CODE_SIZE'); + static const FileOptions_OptimizeMode LITE_RUNTIME = FileOptions_OptimizeMode._(3, _omitEnumNames ? '' : 'LITE_RUNTIME'); + + static const $core.List values = [ + SPEED, + CODE_SIZE, + LITE_RUNTIME, + ]; + + static final $core.Map<$core.int, FileOptions_OptimizeMode> _byValue = $pb.ProtobufEnum.initByValue(values); + static FileOptions_OptimizeMode? valueOf($core.int value) => _byValue[value]; + + const FileOptions_OptimizeMode._($core.int v, $core.String n) : super(v, n); +} + +class FieldOptions_CType extends $pb.ProtobufEnum { + static const FieldOptions_CType STRING = FieldOptions_CType._(0, _omitEnumNames ? '' : 'STRING'); + static const FieldOptions_CType CORD = FieldOptions_CType._(1, _omitEnumNames ? '' : 'CORD'); + static const FieldOptions_CType STRING_PIECE = FieldOptions_CType._(2, _omitEnumNames ? '' : 'STRING_PIECE'); + + static const $core.List values = [ + STRING, + CORD, + STRING_PIECE, + ]; + + static final $core.Map<$core.int, FieldOptions_CType> _byValue = $pb.ProtobufEnum.initByValue(values); + static FieldOptions_CType? valueOf($core.int value) => _byValue[value]; + + const FieldOptions_CType._($core.int v, $core.String n) : super(v, n); +} + +class FieldOptions_JSType extends $pb.ProtobufEnum { + static const FieldOptions_JSType JS_NORMAL = FieldOptions_JSType._(0, _omitEnumNames ? '' : 'JS_NORMAL'); + static const FieldOptions_JSType JS_STRING = FieldOptions_JSType._(1, _omitEnumNames ? '' : 'JS_STRING'); + static const FieldOptions_JSType JS_NUMBER = FieldOptions_JSType._(2, _omitEnumNames ? '' : 'JS_NUMBER'); + + static const $core.List values = [ + JS_NORMAL, + JS_STRING, + JS_NUMBER, + ]; + + static final $core.Map<$core.int, FieldOptions_JSType> _byValue = $pb.ProtobufEnum.initByValue(values); + static FieldOptions_JSType? valueOf($core.int value) => _byValue[value]; + + const FieldOptions_JSType._($core.int v, $core.String n) : super(v, n); +} + +/// If set to RETENTION_SOURCE, the option will be omitted from the binary. +/// Note: as of January 2023, support for this is in progress and does not yet +/// have an effect (b/264593489). +class FieldOptions_OptionRetention extends $pb.ProtobufEnum { + static const FieldOptions_OptionRetention RETENTION_UNKNOWN = FieldOptions_OptionRetention._(0, _omitEnumNames ? '' : 'RETENTION_UNKNOWN'); + static const FieldOptions_OptionRetention RETENTION_RUNTIME = FieldOptions_OptionRetention._(1, _omitEnumNames ? '' : 'RETENTION_RUNTIME'); + static const FieldOptions_OptionRetention RETENTION_SOURCE = FieldOptions_OptionRetention._(2, _omitEnumNames ? '' : 'RETENTION_SOURCE'); + + static const $core.List values = [ + RETENTION_UNKNOWN, + RETENTION_RUNTIME, + RETENTION_SOURCE, + ]; + + static final $core.Map<$core.int, FieldOptions_OptionRetention> _byValue = $pb.ProtobufEnum.initByValue(values); + static FieldOptions_OptionRetention? valueOf($core.int value) => _byValue[value]; + + const FieldOptions_OptionRetention._($core.int v, $core.String n) : super(v, n); +} + +/// This indicates the types of entities that the field may apply to when used +/// as an option. If it is unset, then the field may be freely used as an +/// option on any kind of entity. Note: as of January 2023, support for this is +/// in progress and does not yet have an effect (b/264593489). +class FieldOptions_OptionTargetType extends $pb.ProtobufEnum { + static const FieldOptions_OptionTargetType TARGET_TYPE_UNKNOWN = FieldOptions_OptionTargetType._(0, _omitEnumNames ? '' : 'TARGET_TYPE_UNKNOWN'); + static const FieldOptions_OptionTargetType TARGET_TYPE_FILE = FieldOptions_OptionTargetType._(1, _omitEnumNames ? '' : 'TARGET_TYPE_FILE'); + static const FieldOptions_OptionTargetType TARGET_TYPE_EXTENSION_RANGE = FieldOptions_OptionTargetType._(2, _omitEnumNames ? '' : 'TARGET_TYPE_EXTENSION_RANGE'); + static const FieldOptions_OptionTargetType TARGET_TYPE_MESSAGE = FieldOptions_OptionTargetType._(3, _omitEnumNames ? '' : 'TARGET_TYPE_MESSAGE'); + static const FieldOptions_OptionTargetType TARGET_TYPE_FIELD = FieldOptions_OptionTargetType._(4, _omitEnumNames ? '' : 'TARGET_TYPE_FIELD'); + static const FieldOptions_OptionTargetType TARGET_TYPE_ONEOF = FieldOptions_OptionTargetType._(5, _omitEnumNames ? '' : 'TARGET_TYPE_ONEOF'); + static const FieldOptions_OptionTargetType TARGET_TYPE_ENUM = FieldOptions_OptionTargetType._(6, _omitEnumNames ? '' : 'TARGET_TYPE_ENUM'); + static const FieldOptions_OptionTargetType TARGET_TYPE_ENUM_ENTRY = FieldOptions_OptionTargetType._(7, _omitEnumNames ? '' : 'TARGET_TYPE_ENUM_ENTRY'); + static const FieldOptions_OptionTargetType TARGET_TYPE_SERVICE = FieldOptions_OptionTargetType._(8, _omitEnumNames ? '' : 'TARGET_TYPE_SERVICE'); + static const FieldOptions_OptionTargetType TARGET_TYPE_METHOD = FieldOptions_OptionTargetType._(9, _omitEnumNames ? '' : 'TARGET_TYPE_METHOD'); + + static const $core.List values = [ + TARGET_TYPE_UNKNOWN, + TARGET_TYPE_FILE, + TARGET_TYPE_EXTENSION_RANGE, + TARGET_TYPE_MESSAGE, + TARGET_TYPE_FIELD, + TARGET_TYPE_ONEOF, + TARGET_TYPE_ENUM, + TARGET_TYPE_ENUM_ENTRY, + TARGET_TYPE_SERVICE, + TARGET_TYPE_METHOD, + ]; + + static final $core.Map<$core.int, FieldOptions_OptionTargetType> _byValue = $pb.ProtobufEnum.initByValue(values); + static FieldOptions_OptionTargetType? valueOf($core.int value) => _byValue[value]; + + const FieldOptions_OptionTargetType._($core.int v, $core.String n) : super(v, n); +} + +/// Is this method side-effect-free (or safe in HTTP parlance), or idempotent, +/// or neither? HTTP based RPC implementation may choose GET verb for safe +/// methods, and PUT verb for idempotent methods instead of the default POST. +class MethodOptions_IdempotencyLevel extends $pb.ProtobufEnum { + static const MethodOptions_IdempotencyLevel IDEMPOTENCY_UNKNOWN = MethodOptions_IdempotencyLevel._(0, _omitEnumNames ? '' : 'IDEMPOTENCY_UNKNOWN'); + static const MethodOptions_IdempotencyLevel NO_SIDE_EFFECTS = MethodOptions_IdempotencyLevel._(1, _omitEnumNames ? '' : 'NO_SIDE_EFFECTS'); + static const MethodOptions_IdempotencyLevel IDEMPOTENT = MethodOptions_IdempotencyLevel._(2, _omitEnumNames ? '' : 'IDEMPOTENT'); + + static const $core.List values = [ + IDEMPOTENCY_UNKNOWN, + NO_SIDE_EFFECTS, + IDEMPOTENT, + ]; + + static final $core.Map<$core.int, MethodOptions_IdempotencyLevel> _byValue = $pb.ProtobufEnum.initByValue(values); + static MethodOptions_IdempotencyLevel? valueOf($core.int value) => _byValue[value]; + + const MethodOptions_IdempotencyLevel._($core.int v, $core.String n) : super(v, n); +} + +class FeatureSet_FieldPresence extends $pb.ProtobufEnum { + static const FeatureSet_FieldPresence FIELD_PRESENCE_UNKNOWN = FeatureSet_FieldPresence._(0, _omitEnumNames ? '' : 'FIELD_PRESENCE_UNKNOWN'); + static const FeatureSet_FieldPresence EXPLICIT = FeatureSet_FieldPresence._(1, _omitEnumNames ? '' : 'EXPLICIT'); + static const FeatureSet_FieldPresence IMPLICIT = FeatureSet_FieldPresence._(2, _omitEnumNames ? '' : 'IMPLICIT'); + static const FeatureSet_FieldPresence LEGACY_REQUIRED = FeatureSet_FieldPresence._(3, _omitEnumNames ? '' : 'LEGACY_REQUIRED'); + + static const $core.List values = [ + FIELD_PRESENCE_UNKNOWN, + EXPLICIT, + IMPLICIT, + LEGACY_REQUIRED, + ]; + + static final $core.Map<$core.int, FeatureSet_FieldPresence> _byValue = $pb.ProtobufEnum.initByValue(values); + static FeatureSet_FieldPresence? valueOf($core.int value) => _byValue[value]; + + const FeatureSet_FieldPresence._($core.int v, $core.String n) : super(v, n); +} + +class FeatureSet_EnumType extends $pb.ProtobufEnum { + static const FeatureSet_EnumType ENUM_TYPE_UNKNOWN = FeatureSet_EnumType._(0, _omitEnumNames ? '' : 'ENUM_TYPE_UNKNOWN'); + static const FeatureSet_EnumType OPEN = FeatureSet_EnumType._(1, _omitEnumNames ? '' : 'OPEN'); + static const FeatureSet_EnumType CLOSED = FeatureSet_EnumType._(2, _omitEnumNames ? '' : 'CLOSED'); + + static const $core.List values = [ + ENUM_TYPE_UNKNOWN, + OPEN, + CLOSED, + ]; + + static final $core.Map<$core.int, FeatureSet_EnumType> _byValue = $pb.ProtobufEnum.initByValue(values); + static FeatureSet_EnumType? valueOf($core.int value) => _byValue[value]; + + const FeatureSet_EnumType._($core.int v, $core.String n) : super(v, n); +} + +class FeatureSet_RepeatedFieldEncoding extends $pb.ProtobufEnum { + static const FeatureSet_RepeatedFieldEncoding REPEATED_FIELD_ENCODING_UNKNOWN = FeatureSet_RepeatedFieldEncoding._(0, _omitEnumNames ? '' : 'REPEATED_FIELD_ENCODING_UNKNOWN'); + static const FeatureSet_RepeatedFieldEncoding PACKED = FeatureSet_RepeatedFieldEncoding._(1, _omitEnumNames ? '' : 'PACKED'); + static const FeatureSet_RepeatedFieldEncoding EXPANDED = FeatureSet_RepeatedFieldEncoding._(2, _omitEnumNames ? '' : 'EXPANDED'); + + static const $core.List values = [ + REPEATED_FIELD_ENCODING_UNKNOWN, + PACKED, + EXPANDED, + ]; + + static final $core.Map<$core.int, FeatureSet_RepeatedFieldEncoding> _byValue = $pb.ProtobufEnum.initByValue(values); + static FeatureSet_RepeatedFieldEncoding? valueOf($core.int value) => _byValue[value]; + + const FeatureSet_RepeatedFieldEncoding._($core.int v, $core.String n) : super(v, n); +} + +class FeatureSet_Utf8Validation extends $pb.ProtobufEnum { + static const FeatureSet_Utf8Validation UTF8_VALIDATION_UNKNOWN = FeatureSet_Utf8Validation._(0, _omitEnumNames ? '' : 'UTF8_VALIDATION_UNKNOWN'); + static const FeatureSet_Utf8Validation NONE = FeatureSet_Utf8Validation._(1, _omitEnumNames ? '' : 'NONE'); + static const FeatureSet_Utf8Validation VERIFY = FeatureSet_Utf8Validation._(2, _omitEnumNames ? '' : 'VERIFY'); + + static const $core.List values = [ + UTF8_VALIDATION_UNKNOWN, + NONE, + VERIFY, + ]; + + static final $core.Map<$core.int, FeatureSet_Utf8Validation> _byValue = $pb.ProtobufEnum.initByValue(values); + static FeatureSet_Utf8Validation? valueOf($core.int value) => _byValue[value]; + + const FeatureSet_Utf8Validation._($core.int v, $core.String n) : super(v, n); +} + +class FeatureSet_MessageEncoding extends $pb.ProtobufEnum { + static const FeatureSet_MessageEncoding MESSAGE_ENCODING_UNKNOWN = FeatureSet_MessageEncoding._(0, _omitEnumNames ? '' : 'MESSAGE_ENCODING_UNKNOWN'); + static const FeatureSet_MessageEncoding LENGTH_PREFIXED = FeatureSet_MessageEncoding._(1, _omitEnumNames ? '' : 'LENGTH_PREFIXED'); + static const FeatureSet_MessageEncoding DELIMITED = FeatureSet_MessageEncoding._(2, _omitEnumNames ? '' : 'DELIMITED'); + + static const $core.List values = [ + MESSAGE_ENCODING_UNKNOWN, + LENGTH_PREFIXED, + DELIMITED, + ]; + + static final $core.Map<$core.int, FeatureSet_MessageEncoding> _byValue = $pb.ProtobufEnum.initByValue(values); + static FeatureSet_MessageEncoding? valueOf($core.int value) => _byValue[value]; + + const FeatureSet_MessageEncoding._($core.int v, $core.String n) : super(v, n); +} + +class FeatureSet_JsonFormat extends $pb.ProtobufEnum { + static const FeatureSet_JsonFormat JSON_FORMAT_UNKNOWN = FeatureSet_JsonFormat._(0, _omitEnumNames ? '' : 'JSON_FORMAT_UNKNOWN'); + static const FeatureSet_JsonFormat ALLOW = FeatureSet_JsonFormat._(1, _omitEnumNames ? '' : 'ALLOW'); + static const FeatureSet_JsonFormat LEGACY_BEST_EFFORT = FeatureSet_JsonFormat._(2, _omitEnumNames ? '' : 'LEGACY_BEST_EFFORT'); + + static const $core.List values = [ + JSON_FORMAT_UNKNOWN, + ALLOW, + LEGACY_BEST_EFFORT, + ]; + + static final $core.Map<$core.int, FeatureSet_JsonFormat> _byValue = $pb.ProtobufEnum.initByValue(values); + static FeatureSet_JsonFormat? valueOf($core.int value) => _byValue[value]; + + const FeatureSet_JsonFormat._($core.int v, $core.String n) : super(v, n); +} + +/// Represents the identified object's effect on the element in the original +/// .proto file. +class GeneratedCodeInfo_Annotation_Semantic extends $pb.ProtobufEnum { + static const GeneratedCodeInfo_Annotation_Semantic NONE = GeneratedCodeInfo_Annotation_Semantic._(0, _omitEnumNames ? '' : 'NONE'); + static const GeneratedCodeInfo_Annotation_Semantic SET = GeneratedCodeInfo_Annotation_Semantic._(1, _omitEnumNames ? '' : 'SET'); + static const GeneratedCodeInfo_Annotation_Semantic ALIAS = GeneratedCodeInfo_Annotation_Semantic._(2, _omitEnumNames ? '' : 'ALIAS'); + + static const $core.List values = [ + NONE, + SET, + ALIAS, + ]; + + static final $core.Map<$core.int, GeneratedCodeInfo_Annotation_Semantic> _byValue = $pb.ProtobufEnum.initByValue(values); + static GeneratedCodeInfo_Annotation_Semantic? valueOf($core.int value) => _byValue[value]; + + const GeneratedCodeInfo_Annotation_Semantic._($core.int v, $core.String n) : super(v, n); +} + + +const _omitEnumNames = $core.bool.fromEnvironment('protobuf.omit_enum_names'); diff --git a/packages/corks/lib/src/proto/google/protobuf/descriptor.pbjson.dart b/packages/corks/lib/src/proto/google/protobuf/descriptor.pbjson.dart new file mode 100644 index 00000000..58f4f727 --- /dev/null +++ b/packages/corks/lib/src/proto/google/protobuf/descriptor.pbjson.dart @@ -0,0 +1,1004 @@ +// +// Generated code. Do not modify. +// source: google/protobuf/descriptor.proto +// +// @dart = 2.12 + +// 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 editionDescriptor instead') +const Edition$json = { + '1': 'Edition', + '2': [ + {'1': 'EDITION_UNKNOWN', '2': 0}, + {'1': 'EDITION_PROTO2', '2': 998}, + {'1': 'EDITION_PROTO3', '2': 999}, + {'1': 'EDITION_2023', '2': 1000}, + {'1': 'EDITION_1_TEST_ONLY', '2': 1}, + {'1': 'EDITION_2_TEST_ONLY', '2': 2}, + {'1': 'EDITION_99997_TEST_ONLY', '2': 99997}, + {'1': 'EDITION_99998_TEST_ONLY', '2': 99998}, + {'1': 'EDITION_99999_TEST_ONLY', '2': 99999}, + ], +}; + +/// Descriptor for `Edition`. Decode as a `google.protobuf.EnumDescriptorProto`. +final $typed_data.Uint8List editionDescriptor = $convert.base64Decode( + 'CgdFZGl0aW9uEhMKD0VESVRJT05fVU5LTk9XThAAEhMKDkVESVRJT05fUFJPVE8yEOYHEhMKDk' + 'VESVRJT05fUFJPVE8zEOcHEhEKDEVESVRJT05fMjAyMxDoBxIXChNFRElUSU9OXzFfVEVTVF9P' + 'TkxZEAESFwoTRURJVElPTl8yX1RFU1RfT05MWRACEh0KF0VESVRJT05fOTk5OTdfVEVTVF9PTk' + 'xZEJ2NBhIdChdFRElUSU9OXzk5OTk4X1RFU1RfT05MWRCejQYSHQoXRURJVElPTl85OTk5OV9U' + 'RVNUX09OTFkQn40G'); + +@$core.Deprecated('Use fileDescriptorSetDescriptor instead') +const FileDescriptorSet$json = { + '1': 'FileDescriptorSet', + '2': [ + {'1': 'file', '3': 1, '4': 3, '5': 11, '6': '.google.protobuf.FileDescriptorProto', '10': 'file'}, + ], +}; + +/// Descriptor for `FileDescriptorSet`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List fileDescriptorSetDescriptor = $convert.base64Decode( + 'ChFGaWxlRGVzY3JpcHRvclNldBI4CgRmaWxlGAEgAygLMiQuZ29vZ2xlLnByb3RvYnVmLkZpbG' + 'VEZXNjcmlwdG9yUHJvdG9SBGZpbGU='); + +@$core.Deprecated('Use fileDescriptorProtoDescriptor instead') +const FileDescriptorProto$json = { + '1': 'FileDescriptorProto', + '2': [ + {'1': 'name', '3': 1, '4': 1, '5': 9, '10': 'name'}, + {'1': 'package', '3': 2, '4': 1, '5': 9, '10': 'package'}, + {'1': 'dependency', '3': 3, '4': 3, '5': 9, '10': 'dependency'}, + {'1': 'public_dependency', '3': 10, '4': 3, '5': 5, '10': 'publicDependency'}, + {'1': 'weak_dependency', '3': 11, '4': 3, '5': 5, '10': 'weakDependency'}, + {'1': 'message_type', '3': 4, '4': 3, '5': 11, '6': '.google.protobuf.DescriptorProto', '10': 'messageType'}, + {'1': 'enum_type', '3': 5, '4': 3, '5': 11, '6': '.google.protobuf.EnumDescriptorProto', '10': 'enumType'}, + {'1': 'service', '3': 6, '4': 3, '5': 11, '6': '.google.protobuf.ServiceDescriptorProto', '10': 'service'}, + {'1': 'extension', '3': 7, '4': 3, '5': 11, '6': '.google.protobuf.FieldDescriptorProto', '10': 'extension'}, + {'1': 'options', '3': 8, '4': 1, '5': 11, '6': '.google.protobuf.FileOptions', '10': 'options'}, + {'1': 'source_code_info', '3': 9, '4': 1, '5': 11, '6': '.google.protobuf.SourceCodeInfo', '10': 'sourceCodeInfo'}, + {'1': 'syntax', '3': 12, '4': 1, '5': 9, '10': 'syntax'}, + {'1': 'edition', '3': 14, '4': 1, '5': 14, '6': '.google.protobuf.Edition', '10': 'edition'}, + ], +}; + +/// Descriptor for `FileDescriptorProto`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List fileDescriptorProtoDescriptor = $convert.base64Decode( + 'ChNGaWxlRGVzY3JpcHRvclByb3RvEhIKBG5hbWUYASABKAlSBG5hbWUSGAoHcGFja2FnZRgCIA' + 'EoCVIHcGFja2FnZRIeCgpkZXBlbmRlbmN5GAMgAygJUgpkZXBlbmRlbmN5EisKEXB1YmxpY19k' + 'ZXBlbmRlbmN5GAogAygFUhBwdWJsaWNEZXBlbmRlbmN5EicKD3dlYWtfZGVwZW5kZW5jeRgLIA' + 'MoBVIOd2Vha0RlcGVuZGVuY3kSQwoMbWVzc2FnZV90eXBlGAQgAygLMiAuZ29vZ2xlLnByb3Rv' + 'YnVmLkRlc2NyaXB0b3JQcm90b1ILbWVzc2FnZVR5cGUSQQoJZW51bV90eXBlGAUgAygLMiQuZ2' + '9vZ2xlLnByb3RvYnVmLkVudW1EZXNjcmlwdG9yUHJvdG9SCGVudW1UeXBlEkEKB3NlcnZpY2UY' + 'BiADKAsyJy5nb29nbGUucHJvdG9idWYuU2VydmljZURlc2NyaXB0b3JQcm90b1IHc2VydmljZR' + 'JDCglleHRlbnNpb24YByADKAsyJS5nb29nbGUucHJvdG9idWYuRmllbGREZXNjcmlwdG9yUHJv' + 'dG9SCWV4dGVuc2lvbhI2CgdvcHRpb25zGAggASgLMhwuZ29vZ2xlLnByb3RvYnVmLkZpbGVPcH' + 'Rpb25zUgdvcHRpb25zEkkKEHNvdXJjZV9jb2RlX2luZm8YCSABKAsyHy5nb29nbGUucHJvdG9i' + 'dWYuU291cmNlQ29kZUluZm9SDnNvdXJjZUNvZGVJbmZvEhYKBnN5bnRheBgMIAEoCVIGc3ludG' + 'F4EjIKB2VkaXRpb24YDiABKA4yGC5nb29nbGUucHJvdG9idWYuRWRpdGlvblIHZWRpdGlvbg=='); + +@$core.Deprecated('Use descriptorProtoDescriptor instead') +const DescriptorProto$json = { + '1': 'DescriptorProto', + '2': [ + {'1': 'name', '3': 1, '4': 1, '5': 9, '10': 'name'}, + {'1': 'field', '3': 2, '4': 3, '5': 11, '6': '.google.protobuf.FieldDescriptorProto', '10': 'field'}, + {'1': 'extension', '3': 6, '4': 3, '5': 11, '6': '.google.protobuf.FieldDescriptorProto', '10': 'extension'}, + {'1': 'nested_type', '3': 3, '4': 3, '5': 11, '6': '.google.protobuf.DescriptorProto', '10': 'nestedType'}, + {'1': 'enum_type', '3': 4, '4': 3, '5': 11, '6': '.google.protobuf.EnumDescriptorProto', '10': 'enumType'}, + {'1': 'extension_range', '3': 5, '4': 3, '5': 11, '6': '.google.protobuf.DescriptorProto.ExtensionRange', '10': 'extensionRange'}, + {'1': 'oneof_decl', '3': 8, '4': 3, '5': 11, '6': '.google.protobuf.OneofDescriptorProto', '10': 'oneofDecl'}, + {'1': 'options', '3': 7, '4': 1, '5': 11, '6': '.google.protobuf.MessageOptions', '10': 'options'}, + {'1': 'reserved_range', '3': 9, '4': 3, '5': 11, '6': '.google.protobuf.DescriptorProto.ReservedRange', '10': 'reservedRange'}, + {'1': 'reserved_name', '3': 10, '4': 3, '5': 9, '10': 'reservedName'}, + ], + '3': [DescriptorProto_ExtensionRange$json, DescriptorProto_ReservedRange$json], +}; + +@$core.Deprecated('Use descriptorProtoDescriptor instead') +const DescriptorProto_ExtensionRange$json = { + '1': 'ExtensionRange', + '2': [ + {'1': 'start', '3': 1, '4': 1, '5': 5, '10': 'start'}, + {'1': 'end', '3': 2, '4': 1, '5': 5, '10': 'end'}, + {'1': 'options', '3': 3, '4': 1, '5': 11, '6': '.google.protobuf.ExtensionRangeOptions', '10': 'options'}, + ], +}; + +@$core.Deprecated('Use descriptorProtoDescriptor instead') +const DescriptorProto_ReservedRange$json = { + '1': 'ReservedRange', + '2': [ + {'1': 'start', '3': 1, '4': 1, '5': 5, '10': 'start'}, + {'1': 'end', '3': 2, '4': 1, '5': 5, '10': 'end'}, + ], +}; + +/// Descriptor for `DescriptorProto`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List descriptorProtoDescriptor = $convert.base64Decode( + 'Cg9EZXNjcmlwdG9yUHJvdG8SEgoEbmFtZRgBIAEoCVIEbmFtZRI7CgVmaWVsZBgCIAMoCzIlLm' + 'dvb2dsZS5wcm90b2J1Zi5GaWVsZERlc2NyaXB0b3JQcm90b1IFZmllbGQSQwoJZXh0ZW5zaW9u' + 'GAYgAygLMiUuZ29vZ2xlLnByb3RvYnVmLkZpZWxkRGVzY3JpcHRvclByb3RvUglleHRlbnNpb2' + '4SQQoLbmVzdGVkX3R5cGUYAyADKAsyIC5nb29nbGUucHJvdG9idWYuRGVzY3JpcHRvclByb3Rv' + 'UgpuZXN0ZWRUeXBlEkEKCWVudW1fdHlwZRgEIAMoCzIkLmdvb2dsZS5wcm90b2J1Zi5FbnVtRG' + 'VzY3JpcHRvclByb3RvUghlbnVtVHlwZRJYCg9leHRlbnNpb25fcmFuZ2UYBSADKAsyLy5nb29n' + 'bGUucHJvdG9idWYuRGVzY3JpcHRvclByb3RvLkV4dGVuc2lvblJhbmdlUg5leHRlbnNpb25SYW' + '5nZRJECgpvbmVvZl9kZWNsGAggAygLMiUuZ29vZ2xlLnByb3RvYnVmLk9uZW9mRGVzY3JpcHRv' + 'clByb3RvUglvbmVvZkRlY2wSOQoHb3B0aW9ucxgHIAEoCzIfLmdvb2dsZS5wcm90b2J1Zi5NZX' + 'NzYWdlT3B0aW9uc1IHb3B0aW9ucxJVCg5yZXNlcnZlZF9yYW5nZRgJIAMoCzIuLmdvb2dsZS5w' + 'cm90b2J1Zi5EZXNjcmlwdG9yUHJvdG8uUmVzZXJ2ZWRSYW5nZVINcmVzZXJ2ZWRSYW5nZRIjCg' + '1yZXNlcnZlZF9uYW1lGAogAygJUgxyZXNlcnZlZE5hbWUaegoORXh0ZW5zaW9uUmFuZ2USFAoF' + 'c3RhcnQYASABKAVSBXN0YXJ0EhAKA2VuZBgCIAEoBVIDZW5kEkAKB29wdGlvbnMYAyABKAsyJi' + '5nb29nbGUucHJvdG9idWYuRXh0ZW5zaW9uUmFuZ2VPcHRpb25zUgdvcHRpb25zGjcKDVJlc2Vy' + 'dmVkUmFuZ2USFAoFc3RhcnQYASABKAVSBXN0YXJ0EhAKA2VuZBgCIAEoBVIDZW5k'); + +@$core.Deprecated('Use extensionRangeOptionsDescriptor instead') +const ExtensionRangeOptions$json = { + '1': 'ExtensionRangeOptions', + '2': [ + {'1': 'uninterpreted_option', '3': 999, '4': 3, '5': 11, '6': '.google.protobuf.UninterpretedOption', '10': 'uninterpretedOption'}, + {'1': 'declaration', '3': 2, '4': 3, '5': 11, '6': '.google.protobuf.ExtensionRangeOptions.Declaration', '8': {}, '10': 'declaration'}, + {'1': 'features', '3': 50, '4': 1, '5': 11, '6': '.google.protobuf.FeatureSet', '10': 'features'}, + {'1': 'verification', '3': 3, '4': 1, '5': 14, '6': '.google.protobuf.ExtensionRangeOptions.VerificationState', '7': 'UNVERIFIED', '10': 'verification'}, + ], + '3': [ExtensionRangeOptions_Declaration$json], + '4': [ExtensionRangeOptions_VerificationState$json], + '5': [ + {'1': 1000, '2': 536870912}, + ], +}; + +@$core.Deprecated('Use extensionRangeOptionsDescriptor instead') +const ExtensionRangeOptions_Declaration$json = { + '1': 'Declaration', + '2': [ + {'1': 'number', '3': 1, '4': 1, '5': 5, '10': 'number'}, + {'1': 'full_name', '3': 2, '4': 1, '5': 9, '10': 'fullName'}, + {'1': 'type', '3': 3, '4': 1, '5': 9, '10': 'type'}, + {'1': 'reserved', '3': 5, '4': 1, '5': 8, '10': 'reserved'}, + {'1': 'repeated', '3': 6, '4': 1, '5': 8, '10': 'repeated'}, + ], + '9': [ + {'1': 4, '2': 5}, + ], +}; + +@$core.Deprecated('Use extensionRangeOptionsDescriptor instead') +const ExtensionRangeOptions_VerificationState$json = { + '1': 'VerificationState', + '2': [ + {'1': 'DECLARATION', '2': 0}, + {'1': 'UNVERIFIED', '2': 1}, + ], +}; + +/// Descriptor for `ExtensionRangeOptions`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List extensionRangeOptionsDescriptor = $convert.base64Decode( + 'ChVFeHRlbnNpb25SYW5nZU9wdGlvbnMSWAoUdW5pbnRlcnByZXRlZF9vcHRpb24Y5wcgAygLMi' + 'QuZ29vZ2xlLnByb3RvYnVmLlVuaW50ZXJwcmV0ZWRPcHRpb25SE3VuaW50ZXJwcmV0ZWRPcHRp' + 'b24SWQoLZGVjbGFyYXRpb24YAiADKAsyMi5nb29nbGUucHJvdG9idWYuRXh0ZW5zaW9uUmFuZ2' + 'VPcHRpb25zLkRlY2xhcmF0aW9uQgOIAQJSC2RlY2xhcmF0aW9uEjcKCGZlYXR1cmVzGDIgASgL' + 'MhsuZ29vZ2xlLnByb3RvYnVmLkZlYXR1cmVTZXRSCGZlYXR1cmVzEmgKDHZlcmlmaWNhdGlvbh' + 'gDIAEoDjI4Lmdvb2dsZS5wcm90b2J1Zi5FeHRlbnNpb25SYW5nZU9wdGlvbnMuVmVyaWZpY2F0' + 'aW9uU3RhdGU6ClVOVkVSSUZJRURSDHZlcmlmaWNhdGlvbhqUAQoLRGVjbGFyYXRpb24SFgoGbn' + 'VtYmVyGAEgASgFUgZudW1iZXISGwoJZnVsbF9uYW1lGAIgASgJUghmdWxsTmFtZRISCgR0eXBl' + 'GAMgASgJUgR0eXBlEhoKCHJlc2VydmVkGAUgASgIUghyZXNlcnZlZBIaCghyZXBlYXRlZBgGIA' + 'EoCFIIcmVwZWF0ZWRKBAgEEAUiNAoRVmVyaWZpY2F0aW9uU3RhdGUSDwoLREVDTEFSQVRJT04Q' + 'ABIOCgpVTlZFUklGSUVEEAEqCQjoBxCAgICAAg=='); + +@$core.Deprecated('Use fieldDescriptorProtoDescriptor instead') +const FieldDescriptorProto$json = { + '1': 'FieldDescriptorProto', + '2': [ + {'1': 'name', '3': 1, '4': 1, '5': 9, '10': 'name'}, + {'1': 'number', '3': 3, '4': 1, '5': 5, '10': 'number'}, + {'1': 'label', '3': 4, '4': 1, '5': 14, '6': '.google.protobuf.FieldDescriptorProto.Label', '10': 'label'}, + {'1': 'type', '3': 5, '4': 1, '5': 14, '6': '.google.protobuf.FieldDescriptorProto.Type', '10': 'type'}, + {'1': 'type_name', '3': 6, '4': 1, '5': 9, '10': 'typeName'}, + {'1': 'extendee', '3': 2, '4': 1, '5': 9, '10': 'extendee'}, + {'1': 'default_value', '3': 7, '4': 1, '5': 9, '10': 'defaultValue'}, + {'1': 'oneof_index', '3': 9, '4': 1, '5': 5, '10': 'oneofIndex'}, + {'1': 'json_name', '3': 10, '4': 1, '5': 9, '10': 'jsonName'}, + {'1': 'options', '3': 8, '4': 1, '5': 11, '6': '.google.protobuf.FieldOptions', '10': 'options'}, + {'1': 'proto3_optional', '3': 17, '4': 1, '5': 8, '10': 'proto3Optional'}, + ], + '4': [FieldDescriptorProto_Type$json, FieldDescriptorProto_Label$json], +}; + +@$core.Deprecated('Use fieldDescriptorProtoDescriptor instead') +const FieldDescriptorProto_Type$json = { + '1': 'Type', + '2': [ + {'1': 'TYPE_DOUBLE', '2': 1}, + {'1': 'TYPE_FLOAT', '2': 2}, + {'1': 'TYPE_INT64', '2': 3}, + {'1': 'TYPE_UINT64', '2': 4}, + {'1': 'TYPE_INT32', '2': 5}, + {'1': 'TYPE_FIXED64', '2': 6}, + {'1': 'TYPE_FIXED32', '2': 7}, + {'1': 'TYPE_BOOL', '2': 8}, + {'1': 'TYPE_STRING', '2': 9}, + {'1': 'TYPE_GROUP', '2': 10}, + {'1': 'TYPE_MESSAGE', '2': 11}, + {'1': 'TYPE_BYTES', '2': 12}, + {'1': 'TYPE_UINT32', '2': 13}, + {'1': 'TYPE_ENUM', '2': 14}, + {'1': 'TYPE_SFIXED32', '2': 15}, + {'1': 'TYPE_SFIXED64', '2': 16}, + {'1': 'TYPE_SINT32', '2': 17}, + {'1': 'TYPE_SINT64', '2': 18}, + ], +}; + +@$core.Deprecated('Use fieldDescriptorProtoDescriptor instead') +const FieldDescriptorProto_Label$json = { + '1': 'Label', + '2': [ + {'1': 'LABEL_OPTIONAL', '2': 1}, + {'1': 'LABEL_REPEATED', '2': 3}, + {'1': 'LABEL_REQUIRED', '2': 2}, + ], +}; + +/// Descriptor for `FieldDescriptorProto`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List fieldDescriptorProtoDescriptor = $convert.base64Decode( + 'ChRGaWVsZERlc2NyaXB0b3JQcm90bxISCgRuYW1lGAEgASgJUgRuYW1lEhYKBm51bWJlchgDIA' + 'EoBVIGbnVtYmVyEkEKBWxhYmVsGAQgASgOMisuZ29vZ2xlLnByb3RvYnVmLkZpZWxkRGVzY3Jp' + 'cHRvclByb3RvLkxhYmVsUgVsYWJlbBI+CgR0eXBlGAUgASgOMiouZ29vZ2xlLnByb3RvYnVmLk' + 'ZpZWxkRGVzY3JpcHRvclByb3RvLlR5cGVSBHR5cGUSGwoJdHlwZV9uYW1lGAYgASgJUgh0eXBl' + 'TmFtZRIaCghleHRlbmRlZRgCIAEoCVIIZXh0ZW5kZWUSIwoNZGVmYXVsdF92YWx1ZRgHIAEoCV' + 'IMZGVmYXVsdFZhbHVlEh8KC29uZW9mX2luZGV4GAkgASgFUgpvbmVvZkluZGV4EhsKCWpzb25f' + 'bmFtZRgKIAEoCVIIanNvbk5hbWUSNwoHb3B0aW9ucxgIIAEoCzIdLmdvb2dsZS5wcm90b2J1Zi' + '5GaWVsZE9wdGlvbnNSB29wdGlvbnMSJwoPcHJvdG8zX29wdGlvbmFsGBEgASgIUg5wcm90bzNP' + 'cHRpb25hbCK2AgoEVHlwZRIPCgtUWVBFX0RPVUJMRRABEg4KClRZUEVfRkxPQVQQAhIOCgpUWV' + 'BFX0lOVDY0EAMSDwoLVFlQRV9VSU5UNjQQBBIOCgpUWVBFX0lOVDMyEAUSEAoMVFlQRV9GSVhF' + 'RDY0EAYSEAoMVFlQRV9GSVhFRDMyEAcSDQoJVFlQRV9CT09MEAgSDwoLVFlQRV9TVFJJTkcQCR' + 'IOCgpUWVBFX0dST1VQEAoSEAoMVFlQRV9NRVNTQUdFEAsSDgoKVFlQRV9CWVRFUxAMEg8KC1RZ' + 'UEVfVUlOVDMyEA0SDQoJVFlQRV9FTlVNEA4SEQoNVFlQRV9TRklYRUQzMhAPEhEKDVRZUEVfU0' + 'ZJWEVENjQQEBIPCgtUWVBFX1NJTlQzMhAREg8KC1RZUEVfU0lOVDY0EBIiQwoFTGFiZWwSEgoO' + 'TEFCRUxfT1BUSU9OQUwQARISCg5MQUJFTF9SRVBFQVRFRBADEhIKDkxBQkVMX1JFUVVJUkVEEA' + 'I='); + +@$core.Deprecated('Use oneofDescriptorProtoDescriptor instead') +const OneofDescriptorProto$json = { + '1': 'OneofDescriptorProto', + '2': [ + {'1': 'name', '3': 1, '4': 1, '5': 9, '10': 'name'}, + {'1': 'options', '3': 2, '4': 1, '5': 11, '6': '.google.protobuf.OneofOptions', '10': 'options'}, + ], +}; + +/// Descriptor for `OneofDescriptorProto`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List oneofDescriptorProtoDescriptor = $convert.base64Decode( + 'ChRPbmVvZkRlc2NyaXB0b3JQcm90bxISCgRuYW1lGAEgASgJUgRuYW1lEjcKB29wdGlvbnMYAi' + 'ABKAsyHS5nb29nbGUucHJvdG9idWYuT25lb2ZPcHRpb25zUgdvcHRpb25z'); + +@$core.Deprecated('Use enumDescriptorProtoDescriptor instead') +const EnumDescriptorProto$json = { + '1': 'EnumDescriptorProto', + '2': [ + {'1': 'name', '3': 1, '4': 1, '5': 9, '10': 'name'}, + {'1': 'value', '3': 2, '4': 3, '5': 11, '6': '.google.protobuf.EnumValueDescriptorProto', '10': 'value'}, + {'1': 'options', '3': 3, '4': 1, '5': 11, '6': '.google.protobuf.EnumOptions', '10': 'options'}, + {'1': 'reserved_range', '3': 4, '4': 3, '5': 11, '6': '.google.protobuf.EnumDescriptorProto.EnumReservedRange', '10': 'reservedRange'}, + {'1': 'reserved_name', '3': 5, '4': 3, '5': 9, '10': 'reservedName'}, + ], + '3': [EnumDescriptorProto_EnumReservedRange$json], +}; + +@$core.Deprecated('Use enumDescriptorProtoDescriptor instead') +const EnumDescriptorProto_EnumReservedRange$json = { + '1': 'EnumReservedRange', + '2': [ + {'1': 'start', '3': 1, '4': 1, '5': 5, '10': 'start'}, + {'1': 'end', '3': 2, '4': 1, '5': 5, '10': 'end'}, + ], +}; + +/// Descriptor for `EnumDescriptorProto`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List enumDescriptorProtoDescriptor = $convert.base64Decode( + 'ChNFbnVtRGVzY3JpcHRvclByb3RvEhIKBG5hbWUYASABKAlSBG5hbWUSPwoFdmFsdWUYAiADKA' + 'syKS5nb29nbGUucHJvdG9idWYuRW51bVZhbHVlRGVzY3JpcHRvclByb3RvUgV2YWx1ZRI2Cgdv' + 'cHRpb25zGAMgASgLMhwuZ29vZ2xlLnByb3RvYnVmLkVudW1PcHRpb25zUgdvcHRpb25zEl0KDn' + 'Jlc2VydmVkX3JhbmdlGAQgAygLMjYuZ29vZ2xlLnByb3RvYnVmLkVudW1EZXNjcmlwdG9yUHJv' + 'dG8uRW51bVJlc2VydmVkUmFuZ2VSDXJlc2VydmVkUmFuZ2USIwoNcmVzZXJ2ZWRfbmFtZRgFIA' + 'MoCVIMcmVzZXJ2ZWROYW1lGjsKEUVudW1SZXNlcnZlZFJhbmdlEhQKBXN0YXJ0GAEgASgFUgVz' + 'dGFydBIQCgNlbmQYAiABKAVSA2VuZA=='); + +@$core.Deprecated('Use enumValueDescriptorProtoDescriptor instead') +const EnumValueDescriptorProto$json = { + '1': 'EnumValueDescriptorProto', + '2': [ + {'1': 'name', '3': 1, '4': 1, '5': 9, '10': 'name'}, + {'1': 'number', '3': 2, '4': 1, '5': 5, '10': 'number'}, + {'1': 'options', '3': 3, '4': 1, '5': 11, '6': '.google.protobuf.EnumValueOptions', '10': 'options'}, + ], +}; + +/// Descriptor for `EnumValueDescriptorProto`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List enumValueDescriptorProtoDescriptor = $convert.base64Decode( + 'ChhFbnVtVmFsdWVEZXNjcmlwdG9yUHJvdG8SEgoEbmFtZRgBIAEoCVIEbmFtZRIWCgZudW1iZX' + 'IYAiABKAVSBm51bWJlchI7CgdvcHRpb25zGAMgASgLMiEuZ29vZ2xlLnByb3RvYnVmLkVudW1W' + 'YWx1ZU9wdGlvbnNSB29wdGlvbnM='); + +@$core.Deprecated('Use serviceDescriptorProtoDescriptor instead') +const ServiceDescriptorProto$json = { + '1': 'ServiceDescriptorProto', + '2': [ + {'1': 'name', '3': 1, '4': 1, '5': 9, '10': 'name'}, + {'1': 'method', '3': 2, '4': 3, '5': 11, '6': '.google.protobuf.MethodDescriptorProto', '10': 'method'}, + {'1': 'options', '3': 3, '4': 1, '5': 11, '6': '.google.protobuf.ServiceOptions', '10': 'options'}, + ], +}; + +/// Descriptor for `ServiceDescriptorProto`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List serviceDescriptorProtoDescriptor = $convert.base64Decode( + 'ChZTZXJ2aWNlRGVzY3JpcHRvclByb3RvEhIKBG5hbWUYASABKAlSBG5hbWUSPgoGbWV0aG9kGA' + 'IgAygLMiYuZ29vZ2xlLnByb3RvYnVmLk1ldGhvZERlc2NyaXB0b3JQcm90b1IGbWV0aG9kEjkK' + 'B29wdGlvbnMYAyABKAsyHy5nb29nbGUucHJvdG9idWYuU2VydmljZU9wdGlvbnNSB29wdGlvbn' + 'M='); + +@$core.Deprecated('Use methodDescriptorProtoDescriptor instead') +const MethodDescriptorProto$json = { + '1': 'MethodDescriptorProto', + '2': [ + {'1': 'name', '3': 1, '4': 1, '5': 9, '10': 'name'}, + {'1': 'input_type', '3': 2, '4': 1, '5': 9, '10': 'inputType'}, + {'1': 'output_type', '3': 3, '4': 1, '5': 9, '10': 'outputType'}, + {'1': 'options', '3': 4, '4': 1, '5': 11, '6': '.google.protobuf.MethodOptions', '10': 'options'}, + {'1': 'client_streaming', '3': 5, '4': 1, '5': 8, '7': 'false', '10': 'clientStreaming'}, + {'1': 'server_streaming', '3': 6, '4': 1, '5': 8, '7': 'false', '10': 'serverStreaming'}, + ], +}; + +/// Descriptor for `MethodDescriptorProto`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List methodDescriptorProtoDescriptor = $convert.base64Decode( + 'ChVNZXRob2REZXNjcmlwdG9yUHJvdG8SEgoEbmFtZRgBIAEoCVIEbmFtZRIdCgppbnB1dF90eX' + 'BlGAIgASgJUglpbnB1dFR5cGUSHwoLb3V0cHV0X3R5cGUYAyABKAlSCm91dHB1dFR5cGUSOAoH' + 'b3B0aW9ucxgEIAEoCzIeLmdvb2dsZS5wcm90b2J1Zi5NZXRob2RPcHRpb25zUgdvcHRpb25zEj' + 'AKEGNsaWVudF9zdHJlYW1pbmcYBSABKAg6BWZhbHNlUg9jbGllbnRTdHJlYW1pbmcSMAoQc2Vy' + 'dmVyX3N0cmVhbWluZxgGIAEoCDoFZmFsc2VSD3NlcnZlclN0cmVhbWluZw=='); + +@$core.Deprecated('Use fileOptionsDescriptor instead') +const FileOptions$json = { + '1': 'FileOptions', + '2': [ + {'1': 'java_package', '3': 1, '4': 1, '5': 9, '10': 'javaPackage'}, + {'1': 'java_outer_classname', '3': 8, '4': 1, '5': 9, '10': 'javaOuterClassname'}, + {'1': 'java_multiple_files', '3': 10, '4': 1, '5': 8, '7': 'false', '10': 'javaMultipleFiles'}, + { + '1': 'java_generate_equals_and_hash', + '3': 20, + '4': 1, + '5': 8, + '8': {'3': true}, + '10': 'javaGenerateEqualsAndHash', + }, + {'1': 'java_string_check_utf8', '3': 27, '4': 1, '5': 8, '7': 'false', '10': 'javaStringCheckUtf8'}, + {'1': 'optimize_for', '3': 9, '4': 1, '5': 14, '6': '.google.protobuf.FileOptions.OptimizeMode', '7': 'SPEED', '10': 'optimizeFor'}, + {'1': 'go_package', '3': 11, '4': 1, '5': 9, '10': 'goPackage'}, + {'1': 'cc_generic_services', '3': 16, '4': 1, '5': 8, '7': 'false', '10': 'ccGenericServices'}, + {'1': 'java_generic_services', '3': 17, '4': 1, '5': 8, '7': 'false', '10': 'javaGenericServices'}, + {'1': 'py_generic_services', '3': 18, '4': 1, '5': 8, '7': 'false', '10': 'pyGenericServices'}, + {'1': 'php_generic_services', '3': 42, '4': 1, '5': 8, '7': 'false', '10': 'phpGenericServices'}, + {'1': 'deprecated', '3': 23, '4': 1, '5': 8, '7': 'false', '10': 'deprecated'}, + {'1': 'cc_enable_arenas', '3': 31, '4': 1, '5': 8, '7': 'true', '10': 'ccEnableArenas'}, + {'1': 'objc_class_prefix', '3': 36, '4': 1, '5': 9, '10': 'objcClassPrefix'}, + {'1': 'csharp_namespace', '3': 37, '4': 1, '5': 9, '10': 'csharpNamespace'}, + {'1': 'swift_prefix', '3': 39, '4': 1, '5': 9, '10': 'swiftPrefix'}, + {'1': 'php_class_prefix', '3': 40, '4': 1, '5': 9, '10': 'phpClassPrefix'}, + {'1': 'php_namespace', '3': 41, '4': 1, '5': 9, '10': 'phpNamespace'}, + {'1': 'php_metadata_namespace', '3': 44, '4': 1, '5': 9, '10': 'phpMetadataNamespace'}, + {'1': 'ruby_package', '3': 45, '4': 1, '5': 9, '10': 'rubyPackage'}, + {'1': 'features', '3': 50, '4': 1, '5': 11, '6': '.google.protobuf.FeatureSet', '10': 'features'}, + {'1': 'uninterpreted_option', '3': 999, '4': 3, '5': 11, '6': '.google.protobuf.UninterpretedOption', '10': 'uninterpretedOption'}, + ], + '4': [FileOptions_OptimizeMode$json], + '5': [ + {'1': 1000, '2': 536870912}, + ], + '9': [ + {'1': 38, '2': 39}, + ], +}; + +@$core.Deprecated('Use fileOptionsDescriptor instead') +const FileOptions_OptimizeMode$json = { + '1': 'OptimizeMode', + '2': [ + {'1': 'SPEED', '2': 1}, + {'1': 'CODE_SIZE', '2': 2}, + {'1': 'LITE_RUNTIME', '2': 3}, + ], +}; + +/// Descriptor for `FileOptions`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List fileOptionsDescriptor = $convert.base64Decode( + 'CgtGaWxlT3B0aW9ucxIhCgxqYXZhX3BhY2thZ2UYASABKAlSC2phdmFQYWNrYWdlEjAKFGphdm' + 'Ffb3V0ZXJfY2xhc3NuYW1lGAggASgJUhJqYXZhT3V0ZXJDbGFzc25hbWUSNQoTamF2YV9tdWx0' + 'aXBsZV9maWxlcxgKIAEoCDoFZmFsc2VSEWphdmFNdWx0aXBsZUZpbGVzEkQKHWphdmFfZ2VuZX' + 'JhdGVfZXF1YWxzX2FuZF9oYXNoGBQgASgIQgIYAVIZamF2YUdlbmVyYXRlRXF1YWxzQW5kSGFz' + 'aBI6ChZqYXZhX3N0cmluZ19jaGVja191dGY4GBsgASgIOgVmYWxzZVITamF2YVN0cmluZ0NoZW' + 'NrVXRmOBJTCgxvcHRpbWl6ZV9mb3IYCSABKA4yKS5nb29nbGUucHJvdG9idWYuRmlsZU9wdGlv' + 'bnMuT3B0aW1pemVNb2RlOgVTUEVFRFILb3B0aW1pemVGb3ISHQoKZ29fcGFja2FnZRgLIAEoCV' + 'IJZ29QYWNrYWdlEjUKE2NjX2dlbmVyaWNfc2VydmljZXMYECABKAg6BWZhbHNlUhFjY0dlbmVy' + 'aWNTZXJ2aWNlcxI5ChVqYXZhX2dlbmVyaWNfc2VydmljZXMYESABKAg6BWZhbHNlUhNqYXZhR2' + 'VuZXJpY1NlcnZpY2VzEjUKE3B5X2dlbmVyaWNfc2VydmljZXMYEiABKAg6BWZhbHNlUhFweUdl' + 'bmVyaWNTZXJ2aWNlcxI3ChRwaHBfZ2VuZXJpY19zZXJ2aWNlcxgqIAEoCDoFZmFsc2VSEnBocE' + 'dlbmVyaWNTZXJ2aWNlcxIlCgpkZXByZWNhdGVkGBcgASgIOgVmYWxzZVIKZGVwcmVjYXRlZBIu' + 'ChBjY19lbmFibGVfYXJlbmFzGB8gASgIOgR0cnVlUg5jY0VuYWJsZUFyZW5hcxIqChFvYmpjX2' + 'NsYXNzX3ByZWZpeBgkIAEoCVIPb2JqY0NsYXNzUHJlZml4EikKEGNzaGFycF9uYW1lc3BhY2UY' + 'JSABKAlSD2NzaGFycE5hbWVzcGFjZRIhCgxzd2lmdF9wcmVmaXgYJyABKAlSC3N3aWZ0UHJlZm' + 'l4EigKEHBocF9jbGFzc19wcmVmaXgYKCABKAlSDnBocENsYXNzUHJlZml4EiMKDXBocF9uYW1l' + 'c3BhY2UYKSABKAlSDHBocE5hbWVzcGFjZRI0ChZwaHBfbWV0YWRhdGFfbmFtZXNwYWNlGCwgAS' + 'gJUhRwaHBNZXRhZGF0YU5hbWVzcGFjZRIhCgxydWJ5X3BhY2thZ2UYLSABKAlSC3J1YnlQYWNr' + 'YWdlEjcKCGZlYXR1cmVzGDIgASgLMhsuZ29vZ2xlLnByb3RvYnVmLkZlYXR1cmVTZXRSCGZlYX' + 'R1cmVzElgKFHVuaW50ZXJwcmV0ZWRfb3B0aW9uGOcHIAMoCzIkLmdvb2dsZS5wcm90b2J1Zi5V' + 'bmludGVycHJldGVkT3B0aW9uUhN1bmludGVycHJldGVkT3B0aW9uIjoKDE9wdGltaXplTW9kZR' + 'IJCgVTUEVFRBABEg0KCUNPREVfU0laRRACEhAKDExJVEVfUlVOVElNRRADKgkI6AcQgICAgAJK' + 'BAgmECc='); + +@$core.Deprecated('Use messageOptionsDescriptor instead') +const MessageOptions$json = { + '1': 'MessageOptions', + '2': [ + {'1': 'message_set_wire_format', '3': 1, '4': 1, '5': 8, '7': 'false', '10': 'messageSetWireFormat'}, + {'1': 'no_standard_descriptor_accessor', '3': 2, '4': 1, '5': 8, '7': 'false', '10': 'noStandardDescriptorAccessor'}, + {'1': 'deprecated', '3': 3, '4': 1, '5': 8, '7': 'false', '10': 'deprecated'}, + {'1': 'map_entry', '3': 7, '4': 1, '5': 8, '10': 'mapEntry'}, + { + '1': 'deprecated_legacy_json_field_conflicts', + '3': 11, + '4': 1, + '5': 8, + '8': {'3': true}, + '10': 'deprecatedLegacyJsonFieldConflicts', + }, + {'1': 'features', '3': 12, '4': 1, '5': 11, '6': '.google.protobuf.FeatureSet', '10': 'features'}, + {'1': 'uninterpreted_option', '3': 999, '4': 3, '5': 11, '6': '.google.protobuf.UninterpretedOption', '10': 'uninterpretedOption'}, + ], + '5': [ + {'1': 1000, '2': 536870912}, + ], + '9': [ + {'1': 4, '2': 5}, + {'1': 5, '2': 6}, + {'1': 6, '2': 7}, + {'1': 8, '2': 9}, + {'1': 9, '2': 10}, + ], +}; + +/// Descriptor for `MessageOptions`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List messageOptionsDescriptor = $convert.base64Decode( + 'Cg5NZXNzYWdlT3B0aW9ucxI8ChdtZXNzYWdlX3NldF93aXJlX2Zvcm1hdBgBIAEoCDoFZmFsc2' + 'VSFG1lc3NhZ2VTZXRXaXJlRm9ybWF0EkwKH25vX3N0YW5kYXJkX2Rlc2NyaXB0b3JfYWNjZXNz' + 'b3IYAiABKAg6BWZhbHNlUhxub1N0YW5kYXJkRGVzY3JpcHRvckFjY2Vzc29yEiUKCmRlcHJlY2' + 'F0ZWQYAyABKAg6BWZhbHNlUgpkZXByZWNhdGVkEhsKCW1hcF9lbnRyeRgHIAEoCFIIbWFwRW50' + 'cnkSVgomZGVwcmVjYXRlZF9sZWdhY3lfanNvbl9maWVsZF9jb25mbGljdHMYCyABKAhCAhgBUi' + 'JkZXByZWNhdGVkTGVnYWN5SnNvbkZpZWxkQ29uZmxpY3RzEjcKCGZlYXR1cmVzGAwgASgLMhsu' + 'Z29vZ2xlLnByb3RvYnVmLkZlYXR1cmVTZXRSCGZlYXR1cmVzElgKFHVuaW50ZXJwcmV0ZWRfb3' + 'B0aW9uGOcHIAMoCzIkLmdvb2dsZS5wcm90b2J1Zi5VbmludGVycHJldGVkT3B0aW9uUhN1bmlu' + 'dGVycHJldGVkT3B0aW9uKgkI6AcQgICAgAJKBAgEEAVKBAgFEAZKBAgGEAdKBAgIEAlKBAgJEA' + 'o='); + +@$core.Deprecated('Use fieldOptionsDescriptor instead') +const FieldOptions$json = { + '1': 'FieldOptions', + '2': [ + {'1': 'ctype', '3': 1, '4': 1, '5': 14, '6': '.google.protobuf.FieldOptions.CType', '7': 'STRING', '10': 'ctype'}, + {'1': 'packed', '3': 2, '4': 1, '5': 8, '10': 'packed'}, + {'1': 'jstype', '3': 6, '4': 1, '5': 14, '6': '.google.protobuf.FieldOptions.JSType', '7': 'JS_NORMAL', '10': 'jstype'}, + {'1': 'lazy', '3': 5, '4': 1, '5': 8, '7': 'false', '10': 'lazy'}, + {'1': 'unverified_lazy', '3': 15, '4': 1, '5': 8, '7': 'false', '10': 'unverifiedLazy'}, + {'1': 'deprecated', '3': 3, '4': 1, '5': 8, '7': 'false', '10': 'deprecated'}, + {'1': 'weak', '3': 10, '4': 1, '5': 8, '7': 'false', '10': 'weak'}, + {'1': 'debug_redact', '3': 16, '4': 1, '5': 8, '7': 'false', '10': 'debugRedact'}, + {'1': 'retention', '3': 17, '4': 1, '5': 14, '6': '.google.protobuf.FieldOptions.OptionRetention', '10': 'retention'}, + {'1': 'targets', '3': 19, '4': 3, '5': 14, '6': '.google.protobuf.FieldOptions.OptionTargetType', '10': 'targets'}, + {'1': 'edition_defaults', '3': 20, '4': 3, '5': 11, '6': '.google.protobuf.FieldOptions.EditionDefault', '10': 'editionDefaults'}, + {'1': 'features', '3': 21, '4': 1, '5': 11, '6': '.google.protobuf.FeatureSet', '10': 'features'}, + {'1': 'uninterpreted_option', '3': 999, '4': 3, '5': 11, '6': '.google.protobuf.UninterpretedOption', '10': 'uninterpretedOption'}, + ], + '3': [FieldOptions_EditionDefault$json], + '4': [FieldOptions_CType$json, FieldOptions_JSType$json, FieldOptions_OptionRetention$json, FieldOptions_OptionTargetType$json], + '5': [ + {'1': 1000, '2': 536870912}, + ], + '9': [ + {'1': 4, '2': 5}, + {'1': 18, '2': 19}, + ], +}; + +@$core.Deprecated('Use fieldOptionsDescriptor instead') +const FieldOptions_EditionDefault$json = { + '1': 'EditionDefault', + '2': [ + {'1': 'edition', '3': 3, '4': 1, '5': 14, '6': '.google.protobuf.Edition', '10': 'edition'}, + {'1': 'value', '3': 2, '4': 1, '5': 9, '10': 'value'}, + ], +}; + +@$core.Deprecated('Use fieldOptionsDescriptor instead') +const FieldOptions_CType$json = { + '1': 'CType', + '2': [ + {'1': 'STRING', '2': 0}, + {'1': 'CORD', '2': 1}, + {'1': 'STRING_PIECE', '2': 2}, + ], +}; + +@$core.Deprecated('Use fieldOptionsDescriptor instead') +const FieldOptions_JSType$json = { + '1': 'JSType', + '2': [ + {'1': 'JS_NORMAL', '2': 0}, + {'1': 'JS_STRING', '2': 1}, + {'1': 'JS_NUMBER', '2': 2}, + ], +}; + +@$core.Deprecated('Use fieldOptionsDescriptor instead') +const FieldOptions_OptionRetention$json = { + '1': 'OptionRetention', + '2': [ + {'1': 'RETENTION_UNKNOWN', '2': 0}, + {'1': 'RETENTION_RUNTIME', '2': 1}, + {'1': 'RETENTION_SOURCE', '2': 2}, + ], +}; + +@$core.Deprecated('Use fieldOptionsDescriptor instead') +const FieldOptions_OptionTargetType$json = { + '1': 'OptionTargetType', + '2': [ + {'1': 'TARGET_TYPE_UNKNOWN', '2': 0}, + {'1': 'TARGET_TYPE_FILE', '2': 1}, + {'1': 'TARGET_TYPE_EXTENSION_RANGE', '2': 2}, + {'1': 'TARGET_TYPE_MESSAGE', '2': 3}, + {'1': 'TARGET_TYPE_FIELD', '2': 4}, + {'1': 'TARGET_TYPE_ONEOF', '2': 5}, + {'1': 'TARGET_TYPE_ENUM', '2': 6}, + {'1': 'TARGET_TYPE_ENUM_ENTRY', '2': 7}, + {'1': 'TARGET_TYPE_SERVICE', '2': 8}, + {'1': 'TARGET_TYPE_METHOD', '2': 9}, + ], +}; + +/// Descriptor for `FieldOptions`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List fieldOptionsDescriptor = $convert.base64Decode( + 'CgxGaWVsZE9wdGlvbnMSQQoFY3R5cGUYASABKA4yIy5nb29nbGUucHJvdG9idWYuRmllbGRPcH' + 'Rpb25zLkNUeXBlOgZTVFJJTkdSBWN0eXBlEhYKBnBhY2tlZBgCIAEoCFIGcGFja2VkEkcKBmpz' + 'dHlwZRgGIAEoDjIkLmdvb2dsZS5wcm90b2J1Zi5GaWVsZE9wdGlvbnMuSlNUeXBlOglKU19OT1' + 'JNQUxSBmpzdHlwZRIZCgRsYXp5GAUgASgIOgVmYWxzZVIEbGF6eRIuCg91bnZlcmlmaWVkX2xh' + 'enkYDyABKAg6BWZhbHNlUg51bnZlcmlmaWVkTGF6eRIlCgpkZXByZWNhdGVkGAMgASgIOgVmYW' + 'xzZVIKZGVwcmVjYXRlZBIZCgR3ZWFrGAogASgIOgVmYWxzZVIEd2VhaxIoCgxkZWJ1Z19yZWRh' + 'Y3QYECABKAg6BWZhbHNlUgtkZWJ1Z1JlZGFjdBJLCglyZXRlbnRpb24YESABKA4yLS5nb29nbG' + 'UucHJvdG9idWYuRmllbGRPcHRpb25zLk9wdGlvblJldGVudGlvblIJcmV0ZW50aW9uEkgKB3Rh' + 'cmdldHMYEyADKA4yLi5nb29nbGUucHJvdG9idWYuRmllbGRPcHRpb25zLk9wdGlvblRhcmdldF' + 'R5cGVSB3RhcmdldHMSVwoQZWRpdGlvbl9kZWZhdWx0cxgUIAMoCzIsLmdvb2dsZS5wcm90b2J1' + 'Zi5GaWVsZE9wdGlvbnMuRWRpdGlvbkRlZmF1bHRSD2VkaXRpb25EZWZhdWx0cxI3CghmZWF0dX' + 'JlcxgVIAEoCzIbLmdvb2dsZS5wcm90b2J1Zi5GZWF0dXJlU2V0UghmZWF0dXJlcxJYChR1bmlu' + 'dGVycHJldGVkX29wdGlvbhjnByADKAsyJC5nb29nbGUucHJvdG9idWYuVW5pbnRlcnByZXRlZE' + '9wdGlvblITdW5pbnRlcnByZXRlZE9wdGlvbhpaCg5FZGl0aW9uRGVmYXVsdBIyCgdlZGl0aW9u' + 'GAMgASgOMhguZ29vZ2xlLnByb3RvYnVmLkVkaXRpb25SB2VkaXRpb24SFAoFdmFsdWUYAiABKA' + 'lSBXZhbHVlIi8KBUNUeXBlEgoKBlNUUklORxAAEggKBENPUkQQARIQCgxTVFJJTkdfUElFQ0UQ' + 'AiI1CgZKU1R5cGUSDQoJSlNfTk9STUFMEAASDQoJSlNfU1RSSU5HEAESDQoJSlNfTlVNQkVSEA' + 'IiVQoPT3B0aW9uUmV0ZW50aW9uEhUKEVJFVEVOVElPTl9VTktOT1dOEAASFQoRUkVURU5USU9O' + 'X1JVTlRJTUUQARIUChBSRVRFTlRJT05fU09VUkNFEAIijAIKEE9wdGlvblRhcmdldFR5cGUSFw' + 'oTVEFSR0VUX1RZUEVfVU5LTk9XThAAEhQKEFRBUkdFVF9UWVBFX0ZJTEUQARIfChtUQVJHRVRf' + 'VFlQRV9FWFRFTlNJT05fUkFOR0UQAhIXChNUQVJHRVRfVFlQRV9NRVNTQUdFEAMSFQoRVEFSR0' + 'VUX1RZUEVfRklFTEQQBBIVChFUQVJHRVRfVFlQRV9PTkVPRhAFEhQKEFRBUkdFVF9UWVBFX0VO' + 'VU0QBhIaChZUQVJHRVRfVFlQRV9FTlVNX0VOVFJZEAcSFwoTVEFSR0VUX1RZUEVfU0VSVklDRR' + 'AIEhYKElRBUkdFVF9UWVBFX01FVEhPRBAJKgkI6AcQgICAgAJKBAgEEAVKBAgSEBM='); + +@$core.Deprecated('Use oneofOptionsDescriptor instead') +const OneofOptions$json = { + '1': 'OneofOptions', + '2': [ + {'1': 'features', '3': 1, '4': 1, '5': 11, '6': '.google.protobuf.FeatureSet', '10': 'features'}, + {'1': 'uninterpreted_option', '3': 999, '4': 3, '5': 11, '6': '.google.protobuf.UninterpretedOption', '10': 'uninterpretedOption'}, + ], + '5': [ + {'1': 1000, '2': 536870912}, + ], +}; + +/// Descriptor for `OneofOptions`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List oneofOptionsDescriptor = $convert.base64Decode( + 'CgxPbmVvZk9wdGlvbnMSNwoIZmVhdHVyZXMYASABKAsyGy5nb29nbGUucHJvdG9idWYuRmVhdH' + 'VyZVNldFIIZmVhdHVyZXMSWAoUdW5pbnRlcnByZXRlZF9vcHRpb24Y5wcgAygLMiQuZ29vZ2xl' + 'LnByb3RvYnVmLlVuaW50ZXJwcmV0ZWRPcHRpb25SE3VuaW50ZXJwcmV0ZWRPcHRpb24qCQjoBx' + 'CAgICAAg=='); + +@$core.Deprecated('Use enumOptionsDescriptor instead') +const EnumOptions$json = { + '1': 'EnumOptions', + '2': [ + {'1': 'allow_alias', '3': 2, '4': 1, '5': 8, '10': 'allowAlias'}, + {'1': 'deprecated', '3': 3, '4': 1, '5': 8, '7': 'false', '10': 'deprecated'}, + { + '1': 'deprecated_legacy_json_field_conflicts', + '3': 6, + '4': 1, + '5': 8, + '8': {'3': true}, + '10': 'deprecatedLegacyJsonFieldConflicts', + }, + {'1': 'features', '3': 7, '4': 1, '5': 11, '6': '.google.protobuf.FeatureSet', '10': 'features'}, + {'1': 'uninterpreted_option', '3': 999, '4': 3, '5': 11, '6': '.google.protobuf.UninterpretedOption', '10': 'uninterpretedOption'}, + ], + '5': [ + {'1': 1000, '2': 536870912}, + ], + '9': [ + {'1': 5, '2': 6}, + ], +}; + +/// Descriptor for `EnumOptions`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List enumOptionsDescriptor = $convert.base64Decode( + 'CgtFbnVtT3B0aW9ucxIfCgthbGxvd19hbGlhcxgCIAEoCFIKYWxsb3dBbGlhcxIlCgpkZXByZW' + 'NhdGVkGAMgASgIOgVmYWxzZVIKZGVwcmVjYXRlZBJWCiZkZXByZWNhdGVkX2xlZ2FjeV9qc29u' + 'X2ZpZWxkX2NvbmZsaWN0cxgGIAEoCEICGAFSImRlcHJlY2F0ZWRMZWdhY3lKc29uRmllbGRDb2' + '5mbGljdHMSNwoIZmVhdHVyZXMYByABKAsyGy5nb29nbGUucHJvdG9idWYuRmVhdHVyZVNldFII' + 'ZmVhdHVyZXMSWAoUdW5pbnRlcnByZXRlZF9vcHRpb24Y5wcgAygLMiQuZ29vZ2xlLnByb3RvYn' + 'VmLlVuaW50ZXJwcmV0ZWRPcHRpb25SE3VuaW50ZXJwcmV0ZWRPcHRpb24qCQjoBxCAgICAAkoE' + 'CAUQBg=='); + +@$core.Deprecated('Use enumValueOptionsDescriptor instead') +const EnumValueOptions$json = { + '1': 'EnumValueOptions', + '2': [ + {'1': 'deprecated', '3': 1, '4': 1, '5': 8, '7': 'false', '10': 'deprecated'}, + {'1': 'features', '3': 2, '4': 1, '5': 11, '6': '.google.protobuf.FeatureSet', '10': 'features'}, + {'1': 'debug_redact', '3': 3, '4': 1, '5': 8, '7': 'false', '10': 'debugRedact'}, + {'1': 'uninterpreted_option', '3': 999, '4': 3, '5': 11, '6': '.google.protobuf.UninterpretedOption', '10': 'uninterpretedOption'}, + ], + '5': [ + {'1': 1000, '2': 536870912}, + ], +}; + +/// Descriptor for `EnumValueOptions`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List enumValueOptionsDescriptor = $convert.base64Decode( + 'ChBFbnVtVmFsdWVPcHRpb25zEiUKCmRlcHJlY2F0ZWQYASABKAg6BWZhbHNlUgpkZXByZWNhdG' + 'VkEjcKCGZlYXR1cmVzGAIgASgLMhsuZ29vZ2xlLnByb3RvYnVmLkZlYXR1cmVTZXRSCGZlYXR1' + 'cmVzEigKDGRlYnVnX3JlZGFjdBgDIAEoCDoFZmFsc2VSC2RlYnVnUmVkYWN0ElgKFHVuaW50ZX' + 'JwcmV0ZWRfb3B0aW9uGOcHIAMoCzIkLmdvb2dsZS5wcm90b2J1Zi5VbmludGVycHJldGVkT3B0' + 'aW9uUhN1bmludGVycHJldGVkT3B0aW9uKgkI6AcQgICAgAI='); + +@$core.Deprecated('Use serviceOptionsDescriptor instead') +const ServiceOptions$json = { + '1': 'ServiceOptions', + '2': [ + {'1': 'features', '3': 34, '4': 1, '5': 11, '6': '.google.protobuf.FeatureSet', '10': 'features'}, + {'1': 'deprecated', '3': 33, '4': 1, '5': 8, '7': 'false', '10': 'deprecated'}, + {'1': 'uninterpreted_option', '3': 999, '4': 3, '5': 11, '6': '.google.protobuf.UninterpretedOption', '10': 'uninterpretedOption'}, + ], + '5': [ + {'1': 1000, '2': 536870912}, + ], +}; + +/// Descriptor for `ServiceOptions`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List serviceOptionsDescriptor = $convert.base64Decode( + 'Cg5TZXJ2aWNlT3B0aW9ucxI3CghmZWF0dXJlcxgiIAEoCzIbLmdvb2dsZS5wcm90b2J1Zi5GZW' + 'F0dXJlU2V0UghmZWF0dXJlcxIlCgpkZXByZWNhdGVkGCEgASgIOgVmYWxzZVIKZGVwcmVjYXRl' + 'ZBJYChR1bmludGVycHJldGVkX29wdGlvbhjnByADKAsyJC5nb29nbGUucHJvdG9idWYuVW5pbn' + 'RlcnByZXRlZE9wdGlvblITdW5pbnRlcnByZXRlZE9wdGlvbioJCOgHEICAgIAC'); + +@$core.Deprecated('Use methodOptionsDescriptor instead') +const MethodOptions$json = { + '1': 'MethodOptions', + '2': [ + {'1': 'deprecated', '3': 33, '4': 1, '5': 8, '7': 'false', '10': 'deprecated'}, + {'1': 'idempotency_level', '3': 34, '4': 1, '5': 14, '6': '.google.protobuf.MethodOptions.IdempotencyLevel', '7': 'IDEMPOTENCY_UNKNOWN', '10': 'idempotencyLevel'}, + {'1': 'features', '3': 35, '4': 1, '5': 11, '6': '.google.protobuf.FeatureSet', '10': 'features'}, + {'1': 'uninterpreted_option', '3': 999, '4': 3, '5': 11, '6': '.google.protobuf.UninterpretedOption', '10': 'uninterpretedOption'}, + ], + '4': [MethodOptions_IdempotencyLevel$json], + '5': [ + {'1': 1000, '2': 536870912}, + ], +}; + +@$core.Deprecated('Use methodOptionsDescriptor instead') +const MethodOptions_IdempotencyLevel$json = { + '1': 'IdempotencyLevel', + '2': [ + {'1': 'IDEMPOTENCY_UNKNOWN', '2': 0}, + {'1': 'NO_SIDE_EFFECTS', '2': 1}, + {'1': 'IDEMPOTENT', '2': 2}, + ], +}; + +/// Descriptor for `MethodOptions`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List methodOptionsDescriptor = $convert.base64Decode( + 'Cg1NZXRob2RPcHRpb25zEiUKCmRlcHJlY2F0ZWQYISABKAg6BWZhbHNlUgpkZXByZWNhdGVkEn' + 'EKEWlkZW1wb3RlbmN5X2xldmVsGCIgASgOMi8uZ29vZ2xlLnByb3RvYnVmLk1ldGhvZE9wdGlv' + 'bnMuSWRlbXBvdGVuY3lMZXZlbDoTSURFTVBPVEVOQ1lfVU5LTk9XTlIQaWRlbXBvdGVuY3lMZX' + 'ZlbBI3CghmZWF0dXJlcxgjIAEoCzIbLmdvb2dsZS5wcm90b2J1Zi5GZWF0dXJlU2V0UghmZWF0' + 'dXJlcxJYChR1bmludGVycHJldGVkX29wdGlvbhjnByADKAsyJC5nb29nbGUucHJvdG9idWYuVW' + '5pbnRlcnByZXRlZE9wdGlvblITdW5pbnRlcnByZXRlZE9wdGlvbiJQChBJZGVtcG90ZW5jeUxl' + 'dmVsEhcKE0lERU1QT1RFTkNZX1VOS05PV04QABITCg9OT19TSURFX0VGRkVDVFMQARIOCgpJRE' + 'VNUE9URU5UEAIqCQjoBxCAgICAAg=='); + +@$core.Deprecated('Use uninterpretedOptionDescriptor instead') +const UninterpretedOption$json = { + '1': 'UninterpretedOption', + '2': [ + {'1': 'name', '3': 2, '4': 3, '5': 11, '6': '.google.protobuf.UninterpretedOption.NamePart', '10': 'name'}, + {'1': 'identifier_value', '3': 3, '4': 1, '5': 9, '10': 'identifierValue'}, + {'1': 'positive_int_value', '3': 4, '4': 1, '5': 4, '10': 'positiveIntValue'}, + {'1': 'negative_int_value', '3': 5, '4': 1, '5': 3, '10': 'negativeIntValue'}, + {'1': 'double_value', '3': 6, '4': 1, '5': 1, '10': 'doubleValue'}, + {'1': 'string_value', '3': 7, '4': 1, '5': 12, '10': 'stringValue'}, + {'1': 'aggregate_value', '3': 8, '4': 1, '5': 9, '10': 'aggregateValue'}, + ], + '3': [UninterpretedOption_NamePart$json], +}; + +@$core.Deprecated('Use uninterpretedOptionDescriptor instead') +const UninterpretedOption_NamePart$json = { + '1': 'NamePart', + '2': [ + {'1': 'name_part', '3': 1, '4': 2, '5': 9, '10': 'namePart'}, + {'1': 'is_extension', '3': 2, '4': 2, '5': 8, '10': 'isExtension'}, + ], +}; + +/// Descriptor for `UninterpretedOption`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List uninterpretedOptionDescriptor = $convert.base64Decode( + 'ChNVbmludGVycHJldGVkT3B0aW9uEkEKBG5hbWUYAiADKAsyLS5nb29nbGUucHJvdG9idWYuVW' + '5pbnRlcnByZXRlZE9wdGlvbi5OYW1lUGFydFIEbmFtZRIpChBpZGVudGlmaWVyX3ZhbHVlGAMg' + 'ASgJUg9pZGVudGlmaWVyVmFsdWUSLAoScG9zaXRpdmVfaW50X3ZhbHVlGAQgASgEUhBwb3NpdG' + 'l2ZUludFZhbHVlEiwKEm5lZ2F0aXZlX2ludF92YWx1ZRgFIAEoA1IQbmVnYXRpdmVJbnRWYWx1' + 'ZRIhCgxkb3VibGVfdmFsdWUYBiABKAFSC2RvdWJsZVZhbHVlEiEKDHN0cmluZ192YWx1ZRgHIA' + 'EoDFILc3RyaW5nVmFsdWUSJwoPYWdncmVnYXRlX3ZhbHVlGAggASgJUg5hZ2dyZWdhdGVWYWx1' + 'ZRpKCghOYW1lUGFydBIbCgluYW1lX3BhcnQYASACKAlSCG5hbWVQYXJ0EiEKDGlzX2V4dGVuc2' + 'lvbhgCIAIoCFILaXNFeHRlbnNpb24='); + +@$core.Deprecated('Use featureSetDescriptor instead') +const FeatureSet$json = { + '1': 'FeatureSet', + '2': [ + {'1': 'field_presence', '3': 1, '4': 1, '5': 14, '6': '.google.protobuf.FeatureSet.FieldPresence', '8': {}, '10': 'fieldPresence'}, + {'1': 'enum_type', '3': 2, '4': 1, '5': 14, '6': '.google.protobuf.FeatureSet.EnumType', '8': {}, '10': 'enumType'}, + {'1': 'repeated_field_encoding', '3': 3, '4': 1, '5': 14, '6': '.google.protobuf.FeatureSet.RepeatedFieldEncoding', '8': {}, '10': 'repeatedFieldEncoding'}, + {'1': 'utf8_validation', '3': 4, '4': 1, '5': 14, '6': '.google.protobuf.FeatureSet.Utf8Validation', '8': {}, '10': 'utf8Validation'}, + {'1': 'message_encoding', '3': 5, '4': 1, '5': 14, '6': '.google.protobuf.FeatureSet.MessageEncoding', '8': {}, '10': 'messageEncoding'}, + {'1': 'json_format', '3': 6, '4': 1, '5': 14, '6': '.google.protobuf.FeatureSet.JsonFormat', '8': {}, '10': 'jsonFormat'}, + ], + '4': [FeatureSet_FieldPresence$json, FeatureSet_EnumType$json, FeatureSet_RepeatedFieldEncoding$json, FeatureSet_Utf8Validation$json, FeatureSet_MessageEncoding$json, FeatureSet_JsonFormat$json], + '5': [ + {'1': 1000, '2': 1001}, + {'1': 1001, '2': 1002}, + {'1': 9995, '2': 10000}, + ], + '9': [ + {'1': 999, '2': 1000}, + ], +}; + +@$core.Deprecated('Use featureSetDescriptor instead') +const FeatureSet_FieldPresence$json = { + '1': 'FieldPresence', + '2': [ + {'1': 'FIELD_PRESENCE_UNKNOWN', '2': 0}, + {'1': 'EXPLICIT', '2': 1}, + {'1': 'IMPLICIT', '2': 2}, + {'1': 'LEGACY_REQUIRED', '2': 3}, + ], +}; + +@$core.Deprecated('Use featureSetDescriptor instead') +const FeatureSet_EnumType$json = { + '1': 'EnumType', + '2': [ + {'1': 'ENUM_TYPE_UNKNOWN', '2': 0}, + {'1': 'OPEN', '2': 1}, + {'1': 'CLOSED', '2': 2}, + ], +}; + +@$core.Deprecated('Use featureSetDescriptor instead') +const FeatureSet_RepeatedFieldEncoding$json = { + '1': 'RepeatedFieldEncoding', + '2': [ + {'1': 'REPEATED_FIELD_ENCODING_UNKNOWN', '2': 0}, + {'1': 'PACKED', '2': 1}, + {'1': 'EXPANDED', '2': 2}, + ], +}; + +@$core.Deprecated('Use featureSetDescriptor instead') +const FeatureSet_Utf8Validation$json = { + '1': 'Utf8Validation', + '2': [ + {'1': 'UTF8_VALIDATION_UNKNOWN', '2': 0}, + {'1': 'NONE', '2': 1}, + {'1': 'VERIFY', '2': 2}, + ], +}; + +@$core.Deprecated('Use featureSetDescriptor instead') +const FeatureSet_MessageEncoding$json = { + '1': 'MessageEncoding', + '2': [ + {'1': 'MESSAGE_ENCODING_UNKNOWN', '2': 0}, + {'1': 'LENGTH_PREFIXED', '2': 1}, + {'1': 'DELIMITED', '2': 2}, + ], +}; + +@$core.Deprecated('Use featureSetDescriptor instead') +const FeatureSet_JsonFormat$json = { + '1': 'JsonFormat', + '2': [ + {'1': 'JSON_FORMAT_UNKNOWN', '2': 0}, + {'1': 'ALLOW', '2': 1}, + {'1': 'LEGACY_BEST_EFFORT', '2': 2}, + ], +}; + +/// Descriptor for `FeatureSet`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List featureSetDescriptor = $convert.base64Decode( + 'CgpGZWF0dXJlU2V0EosBCg5maWVsZF9wcmVzZW5jZRgBIAEoDjIpLmdvb2dsZS5wcm90b2J1Zi' + '5GZWF0dXJlU2V0LkZpZWxkUHJlc2VuY2VCOYgBAZgBBJgBAaIBDRIIRVhQTElDSVQY5geiAQ0S' + 'CElNUExJQ0lUGOcHogENEghFWFBMSUNJVBjoB1INZmllbGRQcmVzZW5jZRJmCgllbnVtX3R5cG' + 'UYAiABKA4yJC5nb29nbGUucHJvdG9idWYuRmVhdHVyZVNldC5FbnVtVHlwZUIjiAEBmAEGmAEB' + 'ogELEgZDTE9TRUQY5geiAQkSBE9QRU4Y5wdSCGVudW1UeXBlEpIBChdyZXBlYXRlZF9maWVsZF' + '9lbmNvZGluZxgDIAEoDjIxLmdvb2dsZS5wcm90b2J1Zi5GZWF0dXJlU2V0LlJlcGVhdGVkRmll' + 'bGRFbmNvZGluZ0IniAEBmAEEmAEBogENEghFWFBBTkRFRBjmB6IBCxIGUEFDS0VEGOcHUhVyZX' + 'BlYXRlZEZpZWxkRW5jb2RpbmcSeAoPdXRmOF92YWxpZGF0aW9uGAQgASgOMiouZ29vZ2xlLnBy' + 'b3RvYnVmLkZlYXR1cmVTZXQuVXRmOFZhbGlkYXRpb25CI4gBAZgBBJgBAaIBCRIETk9ORRjmB6' + 'IBCxIGVkVSSUZZGOcHUg51dGY4VmFsaWRhdGlvbhJ4ChBtZXNzYWdlX2VuY29kaW5nGAUgASgO' + 'MisuZ29vZ2xlLnByb3RvYnVmLkZlYXR1cmVTZXQuTWVzc2FnZUVuY29kaW5nQiCIAQGYAQSYAQ' + 'GiARQSD0xFTkdUSF9QUkVGSVhFRBjmB1IPbWVzc2FnZUVuY29kaW5nEnwKC2pzb25fZm9ybWF0' + 'GAYgASgOMiYuZ29vZ2xlLnByb3RvYnVmLkZlYXR1cmVTZXQuSnNvbkZvcm1hdEIziAEBmAEDmA' + 'EGmAEBogEXEhJMRUdBQ1lfQkVTVF9FRkZPUlQY5geiAQoSBUFMTE9XGOcHUgpqc29uRm9ybWF0' + 'IlwKDUZpZWxkUHJlc2VuY2USGgoWRklFTERfUFJFU0VOQ0VfVU5LTk9XThAAEgwKCEVYUExJQ0' + 'lUEAESDAoISU1QTElDSVQQAhITCg9MRUdBQ1lfUkVRVUlSRUQQAyI3CghFbnVtVHlwZRIVChFF' + 'TlVNX1RZUEVfVU5LTk9XThAAEggKBE9QRU4QARIKCgZDTE9TRUQQAiJWChVSZXBlYXRlZEZpZW' + 'xkRW5jb2RpbmcSIwofUkVQRUFURURfRklFTERfRU5DT0RJTkdfVU5LTk9XThAAEgoKBlBBQ0tF' + 'RBABEgwKCEVYUEFOREVEEAIiQwoOVXRmOFZhbGlkYXRpb24SGwoXVVRGOF9WQUxJREFUSU9OX1' + 'VOS05PV04QABIICgROT05FEAESCgoGVkVSSUZZEAIiUwoPTWVzc2FnZUVuY29kaW5nEhwKGE1F' + 'U1NBR0VfRU5DT0RJTkdfVU5LTk9XThAAEhMKD0xFTkdUSF9QUkVGSVhFRBABEg0KCURFTElNSV' + 'RFRBACIkgKCkpzb25Gb3JtYXQSFwoTSlNPTl9GT1JNQVRfVU5LTk9XThAAEgkKBUFMTE9XEAES' + 'FgoSTEVHQUNZX0JFU1RfRUZGT1JUEAIqBgjoBxDpByoGCOkHEOoHKgYIi04QkE5KBgjnBxDoBw' + '=='); + +@$core.Deprecated('Use featureSetDefaultsDescriptor instead') +const FeatureSetDefaults$json = { + '1': 'FeatureSetDefaults', + '2': [ + {'1': 'defaults', '3': 1, '4': 3, '5': 11, '6': '.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault', '10': 'defaults'}, + {'1': 'minimum_edition', '3': 4, '4': 1, '5': 14, '6': '.google.protobuf.Edition', '10': 'minimumEdition'}, + {'1': 'maximum_edition', '3': 5, '4': 1, '5': 14, '6': '.google.protobuf.Edition', '10': 'maximumEdition'}, + ], + '3': [FeatureSetDefaults_FeatureSetEditionDefault$json], +}; + +@$core.Deprecated('Use featureSetDefaultsDescriptor instead') +const FeatureSetDefaults_FeatureSetEditionDefault$json = { + '1': 'FeatureSetEditionDefault', + '2': [ + {'1': 'edition', '3': 3, '4': 1, '5': 14, '6': '.google.protobuf.Edition', '10': 'edition'}, + {'1': 'features', '3': 2, '4': 1, '5': 11, '6': '.google.protobuf.FeatureSet', '10': 'features'}, + ], +}; + +/// Descriptor for `FeatureSetDefaults`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List featureSetDefaultsDescriptor = $convert.base64Decode( + 'ChJGZWF0dXJlU2V0RGVmYXVsdHMSWAoIZGVmYXVsdHMYASADKAsyPC5nb29nbGUucHJvdG9idW' + 'YuRmVhdHVyZVNldERlZmF1bHRzLkZlYXR1cmVTZXRFZGl0aW9uRGVmYXVsdFIIZGVmYXVsdHMS' + 'QQoPbWluaW11bV9lZGl0aW9uGAQgASgOMhguZ29vZ2xlLnByb3RvYnVmLkVkaXRpb25SDm1pbm' + 'ltdW1FZGl0aW9uEkEKD21heGltdW1fZWRpdGlvbhgFIAEoDjIYLmdvb2dsZS5wcm90b2J1Zi5F' + 'ZGl0aW9uUg5tYXhpbXVtRWRpdGlvbhqHAQoYRmVhdHVyZVNldEVkaXRpb25EZWZhdWx0EjIKB2' + 'VkaXRpb24YAyABKA4yGC5nb29nbGUucHJvdG9idWYuRWRpdGlvblIHZWRpdGlvbhI3CghmZWF0' + 'dXJlcxgCIAEoCzIbLmdvb2dsZS5wcm90b2J1Zi5GZWF0dXJlU2V0UghmZWF0dXJlcw=='); + +@$core.Deprecated('Use sourceCodeInfoDescriptor instead') +const SourceCodeInfo$json = { + '1': 'SourceCodeInfo', + '2': [ + {'1': 'location', '3': 1, '4': 3, '5': 11, '6': '.google.protobuf.SourceCodeInfo.Location', '10': 'location'}, + ], + '3': [SourceCodeInfo_Location$json], +}; + +@$core.Deprecated('Use sourceCodeInfoDescriptor instead') +const SourceCodeInfo_Location$json = { + '1': 'Location', + '2': [ + { + '1': 'path', + '3': 1, + '4': 3, + '5': 5, + '8': {'2': true}, + '10': 'path', + }, + { + '1': 'span', + '3': 2, + '4': 3, + '5': 5, + '8': {'2': true}, + '10': 'span', + }, + {'1': 'leading_comments', '3': 3, '4': 1, '5': 9, '10': 'leadingComments'}, + {'1': 'trailing_comments', '3': 4, '4': 1, '5': 9, '10': 'trailingComments'}, + {'1': 'leading_detached_comments', '3': 6, '4': 3, '5': 9, '10': 'leadingDetachedComments'}, + ], +}; + +/// Descriptor for `SourceCodeInfo`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List sourceCodeInfoDescriptor = $convert.base64Decode( + 'Cg5Tb3VyY2VDb2RlSW5mbxJECghsb2NhdGlvbhgBIAMoCzIoLmdvb2dsZS5wcm90b2J1Zi5Tb3' + 'VyY2VDb2RlSW5mby5Mb2NhdGlvblIIbG9jYXRpb24azgEKCExvY2F0aW9uEhYKBHBhdGgYASAD' + 'KAVCAhABUgRwYXRoEhYKBHNwYW4YAiADKAVCAhABUgRzcGFuEikKEGxlYWRpbmdfY29tbWVudH' + 'MYAyABKAlSD2xlYWRpbmdDb21tZW50cxIrChF0cmFpbGluZ19jb21tZW50cxgEIAEoCVIQdHJh' + 'aWxpbmdDb21tZW50cxI6ChlsZWFkaW5nX2RldGFjaGVkX2NvbW1lbnRzGAYgAygJUhdsZWFkaW' + '5nRGV0YWNoZWRDb21tZW50cw=='); + +@$core.Deprecated('Use generatedCodeInfoDescriptor instead') +const GeneratedCodeInfo$json = { + '1': 'GeneratedCodeInfo', + '2': [ + {'1': 'annotation', '3': 1, '4': 3, '5': 11, '6': '.google.protobuf.GeneratedCodeInfo.Annotation', '10': 'annotation'}, + ], + '3': [GeneratedCodeInfo_Annotation$json], +}; + +@$core.Deprecated('Use generatedCodeInfoDescriptor instead') +const GeneratedCodeInfo_Annotation$json = { + '1': 'Annotation', + '2': [ + { + '1': 'path', + '3': 1, + '4': 3, + '5': 5, + '8': {'2': true}, + '10': 'path', + }, + {'1': 'source_file', '3': 2, '4': 1, '5': 9, '10': 'sourceFile'}, + {'1': 'begin', '3': 3, '4': 1, '5': 5, '10': 'begin'}, + {'1': 'end', '3': 4, '4': 1, '5': 5, '10': 'end'}, + {'1': 'semantic', '3': 5, '4': 1, '5': 14, '6': '.google.protobuf.GeneratedCodeInfo.Annotation.Semantic', '10': 'semantic'}, + ], + '4': [GeneratedCodeInfo_Annotation_Semantic$json], +}; + +@$core.Deprecated('Use generatedCodeInfoDescriptor instead') +const GeneratedCodeInfo_Annotation_Semantic$json = { + '1': 'Semantic', + '2': [ + {'1': 'NONE', '2': 0}, + {'1': 'SET', '2': 1}, + {'1': 'ALIAS', '2': 2}, + ], +}; + +/// Descriptor for `GeneratedCodeInfo`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List generatedCodeInfoDescriptor = $convert.base64Decode( + 'ChFHZW5lcmF0ZWRDb2RlSW5mbxJNCgphbm5vdGF0aW9uGAEgAygLMi0uZ29vZ2xlLnByb3RvYn' + 'VmLkdlbmVyYXRlZENvZGVJbmZvLkFubm90YXRpb25SCmFubm90YXRpb24a6wEKCkFubm90YXRp' + 'b24SFgoEcGF0aBgBIAMoBUICEAFSBHBhdGgSHwoLc291cmNlX2ZpbGUYAiABKAlSCnNvdXJjZU' + 'ZpbGUSFAoFYmVnaW4YAyABKAVSBWJlZ2luEhAKA2VuZBgEIAEoBVIDZW5kElIKCHNlbWFudGlj' + 'GAUgASgOMjYuZ29vZ2xlLnByb3RvYnVmLkdlbmVyYXRlZENvZGVJbmZvLkFubm90YXRpb24uU2' + 'VtYW50aWNSCHNlbWFudGljIigKCFNlbWFudGljEggKBE5PTkUQABIHCgNTRVQQARIJCgVBTElB' + 'UxAC'); + diff --git a/packages/corks/lib/src/proto/google/protobuf/descriptor.pbserver.dart b/packages/corks/lib/src/proto/google/protobuf/descriptor.pbserver.dart new file mode 100644 index 00000000..f0d7f47e --- /dev/null +++ b/packages/corks/lib/src/proto/google/protobuf/descriptor.pbserver.dart @@ -0,0 +1,14 @@ +// +// Generated code. Do not modify. +// source: google/protobuf/descriptor.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +export 'descriptor.pb.dart'; + diff --git a/packages/corks/lib/src/proto/google/protobuf/duration.pb.dart b/packages/corks/lib/src/proto/google/protobuf/duration.pb.dart new file mode 100644 index 00000000..622c92d8 --- /dev/null +++ b/packages/corks/lib/src/proto/google/protobuf/duration.pb.dart @@ -0,0 +1,151 @@ +// +// Generated code. Do not modify. +// source: google/protobuf/duration.proto +// +// @dart = 2.12 + +// 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 { + factory Duration({ + $fixnum.Int64? seconds, + $core.int? nanos, + }) { + final $result = create(); + if (seconds != null) { + $result.seconds = seconds; + } + if (nanos != null) { + $result.nanos = nanos; + } + return $result; + } + Duration._() : super(); + factory Duration.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory Duration.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + 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') + Duration clone() => Duration()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + Duration copyWith(void Function(Duration) updates) => 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(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static Duration getDefault() => _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) + set seconds($fixnum.Int64 v) { $_setInt64(0, v); } + @$pb.TagNumber(1) + $core.bool hasSeconds() => $_has(0); + @$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) + set nanos($core.int v) { $_setSignedInt32(1, v); } + @$pb.TagNumber(2) + $core.bool hasNanos() => $_has(1); + @$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/packages/corks/lib/src/proto/google/protobuf/duration.pbenum.dart b/packages/corks/lib/src/proto/google/protobuf/duration.pbenum.dart new file mode 100644 index 00000000..403b0103 --- /dev/null +++ b/packages/corks/lib/src/proto/google/protobuf/duration.pbenum.dart @@ -0,0 +1,11 @@ +// +// Generated code. Do not modify. +// source: google/protobuf/duration.proto +// +// @dart = 2.12 + +// 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/packages/corks/lib/src/proto/google/protobuf/duration.pbjson.dart b/packages/corks/lib/src/proto/google/protobuf/duration.pbjson.dart new file mode 100644 index 00000000..aacca438 --- /dev/null +++ b/packages/corks/lib/src/proto/google/protobuf/duration.pbjson.dart @@ -0,0 +1,29 @@ +// +// Generated code. Do not modify. +// source: google/protobuf/duration.proto +// +// @dart = 2.12 + +// 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 = { + '1': 'Duration', + '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( + 'CghEdXJhdGlvbhIYCgdzZWNvbmRzGAEgASgDUgdzZWNvbmRzEhQKBW5hbm9zGAIgASgFUgVuYW' + '5vcw=='); + diff --git a/packages/corks/lib/src/proto/google/protobuf/duration.pbserver.dart b/packages/corks/lib/src/proto/google/protobuf/duration.pbserver.dart new file mode 100644 index 00000000..0a983497 --- /dev/null +++ b/packages/corks/lib/src/proto/google/protobuf/duration.pbserver.dart @@ -0,0 +1,14 @@ +// +// Generated code. Do not modify. +// source: google/protobuf/duration.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +export 'duration.pb.dart'; + diff --git a/packages/corks/lib/src/proto/google/protobuf/plugin.pb.dart b/packages/corks/lib/src/proto/google/protobuf/plugin.pb.dart new file mode 100644 index 00000000..7734e747 --- /dev/null +++ b/packages/corks/lib/src/proto/google/protobuf/plugin.pb.dart @@ -0,0 +1,449 @@ +// +// Generated code. Do not modify. +// source: google/protobuf/plugin.proto +// +// @dart = 2.12 + +// 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 'descriptor.pb.dart' as $2; + +export 'plugin.pbenum.dart'; + +/// The version number of protocol compiler. +class Version extends $pb.GeneratedMessage { + factory Version({ + $core.int? major, + $core.int? minor, + $core.int? patch, + $core.String? suffix, + }) { + final $result = create(); + if (major != null) { + $result.major = major; + } + if (minor != null) { + $result.minor = minor; + } + if (patch != null) { + $result.patch = patch; + } + if (suffix != null) { + $result.suffix = suffix; + } + return $result; + } + Version._() : super(); + factory Version.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory Version.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Version', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf.compiler'), createEmptyInstance: create) + ..a<$core.int>(1, _omitFieldNames ? '' : 'major', $pb.PbFieldType.O3) + ..a<$core.int>(2, _omitFieldNames ? '' : 'minor', $pb.PbFieldType.O3) + ..a<$core.int>(3, _omitFieldNames ? '' : 'patch', $pb.PbFieldType.O3) + ..aOS(4, _omitFieldNames ? '' : 'suffix') + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + Version clone() => Version()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + Version copyWith(void Function(Version) updates) => super.copyWith((message) => updates(message as Version)) as Version; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static Version create() => Version._(); + Version createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static Version getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static Version? _defaultInstance; + + @$pb.TagNumber(1) + $core.int get major => $_getIZ(0); + @$pb.TagNumber(1) + set major($core.int v) { $_setSignedInt32(0, v); } + @$pb.TagNumber(1) + $core.bool hasMajor() => $_has(0); + @$pb.TagNumber(1) + void clearMajor() => clearField(1); + + @$pb.TagNumber(2) + $core.int get minor => $_getIZ(1); + @$pb.TagNumber(2) + set minor($core.int v) { $_setSignedInt32(1, v); } + @$pb.TagNumber(2) + $core.bool hasMinor() => $_has(1); + @$pb.TagNumber(2) + void clearMinor() => clearField(2); + + @$pb.TagNumber(3) + $core.int get patch => $_getIZ(2); + @$pb.TagNumber(3) + set patch($core.int v) { $_setSignedInt32(2, v); } + @$pb.TagNumber(3) + $core.bool hasPatch() => $_has(2); + @$pb.TagNumber(3) + void clearPatch() => clearField(3); + + /// A suffix for alpha, beta or rc release, e.g., "alpha-1", "rc2". It should + /// be empty for mainline stable releases. + @$pb.TagNumber(4) + $core.String get suffix => $_getSZ(3); + @$pb.TagNumber(4) + set suffix($core.String v) { $_setString(3, v); } + @$pb.TagNumber(4) + $core.bool hasSuffix() => $_has(3); + @$pb.TagNumber(4) + void clearSuffix() => clearField(4); +} + +/// An encoded CodeGeneratorRequest is written to the plugin's stdin. +class CodeGeneratorRequest extends $pb.GeneratedMessage { + factory CodeGeneratorRequest({ + $core.Iterable<$core.String>? fileToGenerate, + $core.String? parameter, + Version? compilerVersion, + $core.Iterable<$2.FileDescriptorProto>? protoFile, + }) { + final $result = create(); + if (fileToGenerate != null) { + $result.fileToGenerate.addAll(fileToGenerate); + } + if (parameter != null) { + $result.parameter = parameter; + } + if (compilerVersion != null) { + $result.compilerVersion = compilerVersion; + } + if (protoFile != null) { + $result.protoFile.addAll(protoFile); + } + return $result; + } + CodeGeneratorRequest._() : super(); + factory CodeGeneratorRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory CodeGeneratorRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'CodeGeneratorRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf.compiler'), createEmptyInstance: create) + ..pPS(1, _omitFieldNames ? '' : 'fileToGenerate') + ..aOS(2, _omitFieldNames ? '' : 'parameter') + ..aOM(3, _omitFieldNames ? '' : 'compilerVersion', subBuilder: Version.create) + ..pc<$2.FileDescriptorProto>(15, _omitFieldNames ? '' : 'protoFile', $pb.PbFieldType.PM, subBuilder: $2.FileDescriptorProto.create) + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + CodeGeneratorRequest clone() => CodeGeneratorRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + CodeGeneratorRequest copyWith(void Function(CodeGeneratorRequest) updates) => super.copyWith((message) => updates(message as CodeGeneratorRequest)) as CodeGeneratorRequest; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static CodeGeneratorRequest create() => CodeGeneratorRequest._(); + CodeGeneratorRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static CodeGeneratorRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static CodeGeneratorRequest? _defaultInstance; + + /// The .proto files that were explicitly listed on the command-line. The + /// code generator should generate code only for these files. Each file's + /// descriptor will be included in proto_file, below. + @$pb.TagNumber(1) + $core.List<$core.String> get fileToGenerate => $_getList(0); + + /// The generator parameter passed on the command-line. + @$pb.TagNumber(2) + $core.String get parameter => $_getSZ(1); + @$pb.TagNumber(2) + set parameter($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasParameter() => $_has(1); + @$pb.TagNumber(2) + void clearParameter() => clearField(2); + + /// The version number of protocol compiler. + @$pb.TagNumber(3) + Version get compilerVersion => $_getN(2); + @$pb.TagNumber(3) + set compilerVersion(Version v) { setField(3, v); } + @$pb.TagNumber(3) + $core.bool hasCompilerVersion() => $_has(2); + @$pb.TagNumber(3) + void clearCompilerVersion() => clearField(3); + @$pb.TagNumber(3) + Version ensureCompilerVersion() => $_ensure(2); + + /// FileDescriptorProtos for all files in files_to_generate and everything + /// they import. The files will appear in topological order, so each file + /// appears before any file that imports it. + /// + /// protoc guarantees that all proto_files will be written after + /// the fields above, even though this is not technically guaranteed by the + /// protobuf wire format. This theoretically could allow a plugin to stream + /// in the FileDescriptorProtos and handle them one by one rather than read + /// the entire set into memory at once. However, as of this writing, this + /// is not similarly optimized on protoc's end -- it will store all fields in + /// memory at once before sending them to the plugin. + /// + /// Type names of fields and extensions in the FileDescriptorProto are always + /// fully qualified. + @$pb.TagNumber(15) + $core.List<$2.FileDescriptorProto> get protoFile => $_getList(3); +} + +/// Represents a single generated file. +class CodeGeneratorResponse_File extends $pb.GeneratedMessage { + factory CodeGeneratorResponse_File({ + $core.String? name, + $core.String? insertionPoint, + $core.String? content, + $2.GeneratedCodeInfo? generatedCodeInfo, + }) { + final $result = create(); + if (name != null) { + $result.name = name; + } + if (insertionPoint != null) { + $result.insertionPoint = insertionPoint; + } + if (content != null) { + $result.content = content; + } + if (generatedCodeInfo != null) { + $result.generatedCodeInfo = generatedCodeInfo; + } + return $result; + } + CodeGeneratorResponse_File._() : super(); + factory CodeGeneratorResponse_File.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory CodeGeneratorResponse_File.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'CodeGeneratorResponse.File', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf.compiler'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'name') + ..aOS(2, _omitFieldNames ? '' : 'insertionPoint') + ..aOS(15, _omitFieldNames ? '' : 'content') + ..aOM<$2.GeneratedCodeInfo>(16, _omitFieldNames ? '' : 'generatedCodeInfo', subBuilder: $2.GeneratedCodeInfo.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') + CodeGeneratorResponse_File clone() => CodeGeneratorResponse_File()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + CodeGeneratorResponse_File copyWith(void Function(CodeGeneratorResponse_File) updates) => super.copyWith((message) => updates(message as CodeGeneratorResponse_File)) as CodeGeneratorResponse_File; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static CodeGeneratorResponse_File create() => CodeGeneratorResponse_File._(); + CodeGeneratorResponse_File createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static CodeGeneratorResponse_File getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static CodeGeneratorResponse_File? _defaultInstance; + + /// The file name, relative to the output directory. The name must not + /// contain "." or ".." components and must be relative, not be absolute (so, + /// the file cannot lie outside the output directory). "/" must be used as + /// the path separator, not "\". + /// + /// If the name is omitted, the content will be appended to the previous + /// file. This allows the generator to break large files into small chunks, + /// and allows the generated text to be streamed back to protoc so that large + /// files need not reside completely in memory at one time. Note that as of + /// this writing protoc does not optimize for this -- it will read the entire + /// CodeGeneratorResponse before writing files to disk. + @$pb.TagNumber(1) + $core.String get name => $_getSZ(0); + @$pb.TagNumber(1) + set name($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasName() => $_has(0); + @$pb.TagNumber(1) + void clearName() => clearField(1); + + /// If non-empty, indicates that the named file should already exist, and the + /// content here is to be inserted into that file at a defined insertion + /// point. This feature allows a code generator to extend the output + /// produced by another code generator. The original generator may provide + /// insertion points by placing special annotations in the file that look + /// like: + /// @@protoc_insertion_point(NAME) + /// The annotation can have arbitrary text before and after it on the line, + /// which allows it to be placed in a comment. NAME should be replaced with + /// an identifier naming the point -- this is what other generators will use + /// as the insertion_point. Code inserted at this point will be placed + /// immediately above the line containing the insertion point (thus multiple + /// insertions to the same point will come out in the order they were added). + /// The double-@ is intended to make it unlikely that the generated code + /// could contain things that look like insertion points by accident. + /// + /// For example, the C++ code generator places the following line in the + /// .pb.h files that it generates: + /// // @@protoc_insertion_point(namespace_scope) + /// This line appears within the scope of the file's package namespace, but + /// outside of any particular class. Another plugin can then specify the + /// insertion_point "namespace_scope" to generate additional classes or + /// other declarations that should be placed in this scope. + /// + /// Note that if the line containing the insertion point begins with + /// whitespace, the same whitespace will be added to every line of the + /// inserted text. This is useful for languages like Python, where + /// indentation matters. In these languages, the insertion point comment + /// should be indented the same amount as any inserted code will need to be + /// in order to work correctly in that context. + /// + /// The code generator that generates the initial file and the one which + /// inserts into it must both run as part of a single invocation of protoc. + /// Code generators are executed in the order in which they appear on the + /// command line. + /// + /// If |insertion_point| is present, |name| must also be present. + @$pb.TagNumber(2) + $core.String get insertionPoint => $_getSZ(1); + @$pb.TagNumber(2) + set insertionPoint($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasInsertionPoint() => $_has(1); + @$pb.TagNumber(2) + void clearInsertionPoint() => clearField(2); + + /// The file contents. + @$pb.TagNumber(15) + $core.String get content => $_getSZ(2); + @$pb.TagNumber(15) + set content($core.String v) { $_setString(2, v); } + @$pb.TagNumber(15) + $core.bool hasContent() => $_has(2); + @$pb.TagNumber(15) + void clearContent() => clearField(15); + + /// Information describing the file content being inserted. If an insertion + /// point is used, this information will be appropriately offset and inserted + /// into the code generation metadata for the generated files. + @$pb.TagNumber(16) + $2.GeneratedCodeInfo get generatedCodeInfo => $_getN(3); + @$pb.TagNumber(16) + set generatedCodeInfo($2.GeneratedCodeInfo v) { setField(16, v); } + @$pb.TagNumber(16) + $core.bool hasGeneratedCodeInfo() => $_has(3); + @$pb.TagNumber(16) + void clearGeneratedCodeInfo() => clearField(16); + @$pb.TagNumber(16) + $2.GeneratedCodeInfo ensureGeneratedCodeInfo() => $_ensure(3); +} + +/// The plugin writes an encoded CodeGeneratorResponse to stdout. +class CodeGeneratorResponse extends $pb.GeneratedMessage { + factory CodeGeneratorResponse({ + $core.String? error, + $fixnum.Int64? supportedFeatures, + $core.Iterable? file, + }) { + final $result = create(); + if (error != null) { + $result.error = error; + } + if (supportedFeatures != null) { + $result.supportedFeatures = supportedFeatures; + } + if (file != null) { + $result.file.addAll(file); + } + return $result; + } + CodeGeneratorResponse._() : super(); + factory CodeGeneratorResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory CodeGeneratorResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'CodeGeneratorResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf.compiler'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'error') + ..a<$fixnum.Int64>(2, _omitFieldNames ? '' : 'supportedFeatures', $pb.PbFieldType.OU6, defaultOrMaker: $fixnum.Int64.ZERO) + ..pc(15, _omitFieldNames ? '' : 'file', $pb.PbFieldType.PM, subBuilder: CodeGeneratorResponse_File.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') + CodeGeneratorResponse clone() => CodeGeneratorResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + CodeGeneratorResponse copyWith(void Function(CodeGeneratorResponse) updates) => super.copyWith((message) => updates(message as CodeGeneratorResponse)) as CodeGeneratorResponse; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static CodeGeneratorResponse create() => CodeGeneratorResponse._(); + CodeGeneratorResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static CodeGeneratorResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static CodeGeneratorResponse? _defaultInstance; + + /// Error message. If non-empty, code generation failed. The plugin process + /// should exit with status code zero even if it reports an error in this way. + /// + /// This should be used to indicate errors in .proto files which prevent the + /// code generator from generating correct code. Errors which indicate a + /// problem in protoc itself -- such as the input CodeGeneratorRequest being + /// unparseable -- should be reported by writing a message to stderr and + /// exiting with a non-zero status code. + @$pb.TagNumber(1) + $core.String get error => $_getSZ(0); + @$pb.TagNumber(1) + set error($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasError() => $_has(0); + @$pb.TagNumber(1) + void clearError() => clearField(1); + + /// A bitmask of supported features that the code generator supports. + /// This is a bitwise "or" of values from the Feature enum. + @$pb.TagNumber(2) + $fixnum.Int64 get supportedFeatures => $_getI64(1); + @$pb.TagNumber(2) + set supportedFeatures($fixnum.Int64 v) { $_setInt64(1, v); } + @$pb.TagNumber(2) + $core.bool hasSupportedFeatures() => $_has(1); + @$pb.TagNumber(2) + void clearSupportedFeatures() => clearField(2); + + @$pb.TagNumber(15) + $core.List get file => $_getList(2); +} + + +const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); +const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/packages/corks/lib/src/proto/google/protobuf/plugin.pbenum.dart b/packages/corks/lib/src/proto/google/protobuf/plugin.pbenum.dart new file mode 100644 index 00000000..6e768bad --- /dev/null +++ b/packages/corks/lib/src/proto/google/protobuf/plugin.pbenum.dart @@ -0,0 +1,33 @@ +// +// Generated code. Do not modify. +// source: google/protobuf/plugin.proto +// +// @dart = 2.12 + +// 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; + +/// Sync with code_generator.h. +class CodeGeneratorResponse_Feature extends $pb.ProtobufEnum { + static const CodeGeneratorResponse_Feature FEATURE_NONE = CodeGeneratorResponse_Feature._(0, _omitEnumNames ? '' : 'FEATURE_NONE'); + static const CodeGeneratorResponse_Feature FEATURE_PROTO3_OPTIONAL = CodeGeneratorResponse_Feature._(1, _omitEnumNames ? '' : 'FEATURE_PROTO3_OPTIONAL'); + + static const $core.List values = [ + FEATURE_NONE, + FEATURE_PROTO3_OPTIONAL, + ]; + + static final $core.Map<$core.int, CodeGeneratorResponse_Feature> _byValue = $pb.ProtobufEnum.initByValue(values); + static CodeGeneratorResponse_Feature? valueOf($core.int value) => _byValue[value]; + + const CodeGeneratorResponse_Feature._($core.int v, $core.String n) : super(v, n); +} + + +const _omitEnumNames = $core.bool.fromEnvironment('protobuf.omit_enum_names'); diff --git a/packages/corks/lib/src/proto/google/protobuf/plugin.pbjson.dart b/packages/corks/lib/src/proto/google/protobuf/plugin.pbjson.dart new file mode 100644 index 00000000..73ad3016 --- /dev/null +++ b/packages/corks/lib/src/proto/google/protobuf/plugin.pbjson.dart @@ -0,0 +1,93 @@ +// +// Generated code. Do not modify. +// source: google/protobuf/plugin.proto +// +// @dart = 2.12 + +// 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 versionDescriptor instead') +const Version$json = { + '1': 'Version', + '2': [ + {'1': 'major', '3': 1, '4': 1, '5': 5, '10': 'major'}, + {'1': 'minor', '3': 2, '4': 1, '5': 5, '10': 'minor'}, + {'1': 'patch', '3': 3, '4': 1, '5': 5, '10': 'patch'}, + {'1': 'suffix', '3': 4, '4': 1, '5': 9, '10': 'suffix'}, + ], +}; + +/// Descriptor for `Version`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List versionDescriptor = $convert.base64Decode( + 'CgdWZXJzaW9uEhQKBW1ham9yGAEgASgFUgVtYWpvchIUCgVtaW5vchgCIAEoBVIFbWlub3ISFA' + 'oFcGF0Y2gYAyABKAVSBXBhdGNoEhYKBnN1ZmZpeBgEIAEoCVIGc3VmZml4'); + +@$core.Deprecated('Use codeGeneratorRequestDescriptor instead') +const CodeGeneratorRequest$json = { + '1': 'CodeGeneratorRequest', + '2': [ + {'1': 'file_to_generate', '3': 1, '4': 3, '5': 9, '10': 'fileToGenerate'}, + {'1': 'parameter', '3': 2, '4': 1, '5': 9, '10': 'parameter'}, + {'1': 'proto_file', '3': 15, '4': 3, '5': 11, '6': '.google.protobuf.FileDescriptorProto', '10': 'protoFile'}, + {'1': 'compiler_version', '3': 3, '4': 1, '5': 11, '6': '.google.protobuf.compiler.Version', '10': 'compilerVersion'}, + ], +}; + +/// Descriptor for `CodeGeneratorRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List codeGeneratorRequestDescriptor = $convert.base64Decode( + 'ChRDb2RlR2VuZXJhdG9yUmVxdWVzdBIoChBmaWxlX3RvX2dlbmVyYXRlGAEgAygJUg5maWxlVG' + '9HZW5lcmF0ZRIcCglwYXJhbWV0ZXIYAiABKAlSCXBhcmFtZXRlchJDCgpwcm90b19maWxlGA8g' + 'AygLMiQuZ29vZ2xlLnByb3RvYnVmLkZpbGVEZXNjcmlwdG9yUHJvdG9SCXByb3RvRmlsZRJMCh' + 'Bjb21waWxlcl92ZXJzaW9uGAMgASgLMiEuZ29vZ2xlLnByb3RvYnVmLmNvbXBpbGVyLlZlcnNp' + 'b25SD2NvbXBpbGVyVmVyc2lvbg=='); + +@$core.Deprecated('Use codeGeneratorResponseDescriptor instead') +const CodeGeneratorResponse$json = { + '1': 'CodeGeneratorResponse', + '2': [ + {'1': 'error', '3': 1, '4': 1, '5': 9, '10': 'error'}, + {'1': 'supported_features', '3': 2, '4': 1, '5': 4, '10': 'supportedFeatures'}, + {'1': 'file', '3': 15, '4': 3, '5': 11, '6': '.google.protobuf.compiler.CodeGeneratorResponse.File', '10': 'file'}, + ], + '3': [CodeGeneratorResponse_File$json], + '4': [CodeGeneratorResponse_Feature$json], +}; + +@$core.Deprecated('Use codeGeneratorResponseDescriptor instead') +const CodeGeneratorResponse_File$json = { + '1': 'File', + '2': [ + {'1': 'name', '3': 1, '4': 1, '5': 9, '10': 'name'}, + {'1': 'insertion_point', '3': 2, '4': 1, '5': 9, '10': 'insertionPoint'}, + {'1': 'content', '3': 15, '4': 1, '5': 9, '10': 'content'}, + {'1': 'generated_code_info', '3': 16, '4': 1, '5': 11, '6': '.google.protobuf.GeneratedCodeInfo', '10': 'generatedCodeInfo'}, + ], +}; + +@$core.Deprecated('Use codeGeneratorResponseDescriptor instead') +const CodeGeneratorResponse_Feature$json = { + '1': 'Feature', + '2': [ + {'1': 'FEATURE_NONE', '2': 0}, + {'1': 'FEATURE_PROTO3_OPTIONAL', '2': 1}, + ], +}; + +/// Descriptor for `CodeGeneratorResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List codeGeneratorResponseDescriptor = $convert.base64Decode( + 'ChVDb2RlR2VuZXJhdG9yUmVzcG9uc2USFAoFZXJyb3IYASABKAlSBWVycm9yEi0KEnN1cHBvcn' + 'RlZF9mZWF0dXJlcxgCIAEoBFIRc3VwcG9ydGVkRmVhdHVyZXMSSAoEZmlsZRgPIAMoCzI0Lmdv' + 'b2dsZS5wcm90b2J1Zi5jb21waWxlci5Db2RlR2VuZXJhdG9yUmVzcG9uc2UuRmlsZVIEZmlsZR' + 'qxAQoERmlsZRISCgRuYW1lGAEgASgJUgRuYW1lEicKD2luc2VydGlvbl9wb2ludBgCIAEoCVIO' + 'aW5zZXJ0aW9uUG9pbnQSGAoHY29udGVudBgPIAEoCVIHY29udGVudBJSChNnZW5lcmF0ZWRfY2' + '9kZV9pbmZvGBAgASgLMiIuZ29vZ2xlLnByb3RvYnVmLkdlbmVyYXRlZENvZGVJbmZvUhFnZW5l' + 'cmF0ZWRDb2RlSW5mbyI4CgdGZWF0dXJlEhAKDEZFQVRVUkVfTk9ORRAAEhsKF0ZFQVRVUkVfUF' + 'JPVE8zX09QVElPTkFMEAE='); + diff --git a/packages/corks/lib/src/proto/google/protobuf/plugin.pbserver.dart b/packages/corks/lib/src/proto/google/protobuf/plugin.pbserver.dart new file mode 100644 index 00000000..5d816bac --- /dev/null +++ b/packages/corks/lib/src/proto/google/protobuf/plugin.pbserver.dart @@ -0,0 +1,14 @@ +// +// Generated code. Do not modify. +// source: google/protobuf/plugin.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +export 'plugin.pb.dart'; + diff --git a/packages/corks/lib/src/proto/google/protobuf/timestamp.pb.dart b/packages/corks/lib/src/proto/google/protobuf/timestamp.pb.dart new file mode 100644 index 00000000..ea44b44e --- /dev/null +++ b/packages/corks/lib/src/proto/google/protobuf/timestamp.pb.dart @@ -0,0 +1,188 @@ +// +// Generated code. Do not modify. +// source: google/protobuf/timestamp.proto +// +// @dart = 2.12 + +// 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 { + factory Timestamp({ + $fixnum.Int64? seconds, + $core.int? nanos, + }) { + final $result = create(); + if (seconds != null) { + $result.seconds = seconds; + } + if (nanos != null) { + $result.nanos = nanos; + } + return $result; + } + Timestamp._() : super(); + factory Timestamp.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory Timestamp.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + 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') + Timestamp clone() => Timestamp()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + Timestamp copyWith(void Function(Timestamp) updates) => 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(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static Timestamp getDefault() => _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) + set seconds($fixnum.Int64 v) { $_setInt64(0, v); } + @$pb.TagNumber(1) + $core.bool hasSeconds() => $_has(0); + @$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) + set nanos($core.int v) { $_setSignedInt32(1, v); } + @$pb.TagNumber(2) + $core.bool hasNanos() => $_has(1); + @$pb.TagNumber(2) + void clearNanos() => clearField(2); + /// Creates a new instance from [dateTime]. + /// + /// Time zone information will not be preserved. + static Timestamp fromDateTime($core.DateTime dateTime) { + final result = create(); + $mixin.TimestampMixin.setFromDateTime(result, dateTime); + return result; + } +} + + +const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); +const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/packages/corks/lib/src/proto/google/protobuf/timestamp.pbenum.dart b/packages/corks/lib/src/proto/google/protobuf/timestamp.pbenum.dart new file mode 100644 index 00000000..30275f6a --- /dev/null +++ b/packages/corks/lib/src/proto/google/protobuf/timestamp.pbenum.dart @@ -0,0 +1,11 @@ +// +// Generated code. Do not modify. +// source: google/protobuf/timestamp.proto +// +// @dart = 2.12 + +// 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/packages/corks/lib/src/proto/google/protobuf/timestamp.pbjson.dart b/packages/corks/lib/src/proto/google/protobuf/timestamp.pbjson.dart new file mode 100644 index 00000000..3dfd63b5 --- /dev/null +++ b/packages/corks/lib/src/proto/google/protobuf/timestamp.pbjson.dart @@ -0,0 +1,29 @@ +// +// Generated code. Do not modify. +// source: google/protobuf/timestamp.proto +// +// @dart = 2.12 + +// 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 = { + '1': 'Timestamp', + '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( + 'CglUaW1lc3RhbXASGAoHc2Vjb25kcxgBIAEoA1IHc2Vjb25kcxIUCgVuYW5vcxgCIAEoBVIFbm' + 'Fub3M='); + diff --git a/packages/corks/lib/src/proto/google/protobuf/timestamp.pbserver.dart b/packages/corks/lib/src/proto/google/protobuf/timestamp.pbserver.dart new file mode 100644 index 00000000..6580f167 --- /dev/null +++ b/packages/corks/lib/src/proto/google/protobuf/timestamp.pbserver.dart @@ -0,0 +1,14 @@ +// +// Generated code. Do not modify. +// source: google/protobuf/timestamp.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +export 'timestamp.pb.dart'; + diff --git a/packages/corks/lib/src/signer.dart b/packages/corks/lib/src/signer.dart new file mode 100644 index 00000000..94d1c52b --- /dev/null +++ b/packages/corks/lib/src/signer.dart @@ -0,0 +1,93 @@ +import 'dart:async'; +import 'dart:convert'; +import 'dart:typed_data'; + +import 'package:corks/corks_proto.dart' as proto; +import 'package:corks/src/interop/to_proto.dart'; +import 'package:crypto/crypto.dart'; +import 'package:meta/meta.dart'; + +mixin Signable implements ToProto { + Future sign(Signer signer) async { + final proto = toProto(); + final typeUrl = 'dev.celest/${proto.info_.qualifiedMessageName}'; + await signer.sign(utf8.encode(typeUrl)); + final bytes = proto.writeToBuffer(); + final signature = await signer.sign(bytes); + return SignedBlock( + block: bytes, + typeUrl: typeUrl, + signature: signature, + ); + } +} + +@immutable +final class SignedBlock implements ToProto { + const SignedBlock({ + required this.block, + required this.typeUrl, + required this.signature, + }); + + factory SignedBlock.fromProto(proto.SignedBlock proto) => SignedBlock( + block: Uint8List.fromList(proto.block), + typeUrl: utf8.decode(proto.typeUrl), + signature: Uint8List.fromList(proto.signature), + ); + + Future verify(Signer signer) async { + await signer.sign(utf8.encode(typeUrl)); + final signature = await signer.sign(block); + return Digest(signature) == Digest(signature); + } + + final Uint8List block; + final String typeUrl; + final Uint8List signature; + + @override + proto.SignedBlock toProto() => proto.SignedBlock( + block: block, + typeUrl: utf8.encode(typeUrl), + signature: signature, + ); +} + +abstract interface class Signer { + factory Signer(Uint8List keyId, Uint8List key) = _Signer; + const Signer._(); + + Uint8List get keyId; + Future sign(Uint8List bytes); + Future close(); +} + +final class _Signer extends Signer { + _Signer(this.keyId, Uint8List key) + : hmac = Hmac(sha256, key), + super._(); + + @override + final Uint8List keyId; + + Hmac hmac; + late Uint8List signature; + var closed = false; + + @override + Future sign(Uint8List bytes) async { + if (closed) { + throw StateError('Signer is closed'); + } + signature = await Future(() => hmac.convert(bytes).bytes as Uint8List); + hmac = Hmac(sha256, signature); + return signature; + } + + @override + Future close() async { + closed = true; + return signature; + } +} diff --git a/packages/corks/proto/buf.gen.yaml b/packages/corks/proto/buf.gen.yaml new file mode 100644 index 00000000..7f249e1d --- /dev/null +++ b/packages/corks/proto/buf.gen.yaml @@ -0,0 +1,6 @@ +version: v1 +managed: + enabled: true +plugins: + - plugin: buf.build/protocolbuffers/dart:v21.1.2 + out: ../lib/src/proto diff --git a/packages/corks/proto/buf.yaml b/packages/corks/proto/buf.yaml new file mode 100644 index 00000000..1e8b5e09 --- /dev/null +++ b/packages/corks/proto/buf.yaml @@ -0,0 +1,10 @@ +version: v1 +breaking: + use: + - FILE +lint: + use: + - DEFAULT + ignore: + - dart + - google diff --git a/packages/corks/proto/cedar/v3/context.proto b/packages/corks/proto/cedar/v3/context.proto new file mode 100644 index 00000000..b217e0a9 --- /dev/null +++ b/packages/corks/proto/cedar/v3/context.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; + +package cedar.v3; + +import "cedar/v3/value.proto"; + +message Context { + map values = 1; +} diff --git a/packages/corks/proto/cedar/v3/entity.proto b/packages/corks/proto/cedar/v3/entity.proto new file mode 100644 index 00000000..8e3c6146 --- /dev/null +++ b/packages/corks/proto/cedar/v3/entity.proto @@ -0,0 +1,12 @@ +syntax = "proto3"; + +package cedar.v3; + +import "cedar/v3/entity_id.proto"; +import "cedar/v3/value.proto"; + +message Entity { + EntityId uid = 1; + repeated EntityId parents = 2; + map attributes = 3; +} diff --git a/packages/corks/proto/cedar/v3/entity_id.proto b/packages/corks/proto/cedar/v3/entity_id.proto new file mode 100644 index 00000000..d807b16a --- /dev/null +++ b/packages/corks/proto/cedar/v3/entity_id.proto @@ -0,0 +1,8 @@ +syntax = "proto3"; + +package cedar.v3; + +message EntityId { + string type = 1; + string id = 2; +} diff --git a/packages/corks/proto/cedar/v3/expr.proto b/packages/corks/proto/cedar/v3/expr.proto new file mode 100644 index 00000000..02a44f22 --- /dev/null +++ b/packages/corks/proto/cedar/v3/expr.proto @@ -0,0 +1,193 @@ +syntax = "proto3"; + +package cedar.v3; + +import "cedar/v3/value.proto"; +import "dart/dart_options.proto"; + +message Expr { + oneof expr { + ExprValue value = 1; + ExprVar var = 2 [(dart_options.dart_name) = "var_"]; + ExprSlot slot = 3; + ExprUnknown unknown = 4; + ExprNot not = 5; + ExprNeg neg = 6; + ExprEquals equals = 7; + ExprNotEquals not_equals = 8; + ExprIn in = 9 [(dart_options.dart_name) = "in_"]; + ExprLessThan less_than = 10; + ExprLessThanOrEquals less_than_or_equals = 11; + ExprGreaterThan greater_than = 12; + ExprGreaterThanOrEquals greater_than_or_equals = 13; + ExprAnd and = 14; + ExprOr or = 15; + ExprPlus plus = 16; + ExprMinus minus = 17; + ExprTimes times = 18; + ExprContains contains = 19; + ExprContainsAll contains_all = 20; + ExprContainsAny contains_any = 21; + ExprGetAttribute get_attribute = 22; + ExprHasAttribute has_attribute = 23; + ExprLike like = 24; + ExprIs is = 25 [(dart_options.dart_name) = "is_"]; + ExprIfThenElse if_then_else = 26; + ExprSet set = 27; + ExprRecord record = 28; + ExprFuncCall func_call = 29; + } +} + +message ExprValue { + Value value = 1; +} + +enum Variable { + VARIABLE_UNSPECIFIED = 0; + VARIABLE_PRINCIPAL = 1; + VARIABLE_ACTION = 2; + VARIABLE_RESOURCE = 3; + VARIABLE_CONTEXT = 4; +} + +message ExprVar { + Variable variable = 1; +} + +enum SlotId { + SLOT_ID_UNSPECIFIED = 0; + SLOT_ID_PRINCIPAL = 1; + SLOT_ID_RESOURCE = 2; +} + +message ExprSlot { + SlotId slot_id = 1; +} + +message ExprUnknown { + string name = 1; +} + +message ExprNot { + Expr expr = 1; +} + +message ExprNeg { + Expr expr = 1; +} + +message ExprEquals { + Expr left = 1; + Expr right = 2; +} + +message ExprNotEquals { + Expr left = 1; + Expr right = 2; +} + +message ExprIn { + Expr left = 1; + Expr right = 2; +} + +message ExprLessThan { + Expr left = 1; + Expr right = 2; +} + +message ExprLessThanOrEquals { + Expr left = 1; + Expr right = 2; +} + +message ExprGreaterThan { + Expr left = 1; + Expr right = 2; +} + +message ExprGreaterThanOrEquals { + Expr left = 1; + Expr right = 2; +} + +message ExprAnd { + Expr left = 1; + Expr right = 2; +} + +message ExprOr { + Expr left = 1; + Expr right = 2; +} + +message ExprPlus { + Expr left = 1; + Expr right = 2; +} + +message ExprMinus { + Expr left = 1; + Expr right = 2; +} + +message ExprTimes { + Expr left = 1; + Expr right = 2; +} + +message ExprContains { + Expr left = 1; + Expr right = 2; +} + +message ExprContainsAll { + Expr left = 1; + Expr right = 2; +} + +message ExprContainsAny { + Expr left = 1; + Expr right = 2; +} + +message ExprGetAttribute { + Expr left = 1; + string attr = 2; +} + +message ExprHasAttribute { + Expr left = 1; + string attr = 2; +} + +message ExprLike { + Expr left = 1; + string pattern = 2; +} + +message ExprIs { + Expr left = 1; + string entity_type = 2; + optional Expr in = 3 [(dart_options.dart_name) = "in_"]; +} + +message ExprIfThenElse { + Expr if = 1 [(dart_options.dart_name) = "if_"]; + Expr then = 2; + Expr else = 3 [(dart_options.dart_name) = "else_"]; +} + +message ExprSet { + repeated Expr expressions = 1; +} + +message ExprRecord { + map attributes = 1; +} + +message ExprFuncCall { + string fn = 1; + repeated Expr args = 2; +} diff --git a/packages/corks/proto/cedar/v3/policy.proto b/packages/corks/proto/cedar/v3/policy.proto new file mode 100644 index 00000000..a80b43a7 --- /dev/null +++ b/packages/corks/proto/cedar/v3/policy.proto @@ -0,0 +1,59 @@ +syntax = "proto3"; + +package cedar.v3; + +import "cedar/v3/entity_id.proto"; +import "cedar/v3/expr.proto"; + +enum PolicyEffect { + POLICY_EFFECT_UNSPECIFIED = 0; + POLICY_EFFECT_PERMIT = 1; + POLICY_EFFECT_FORBID = 2; +} + +enum PolicyOp { + POLICY_OP_UNSPECIFIED = 0; + POLICY_OP_ALL = 1; + POLICY_OP_EQUALS = 2; + POLICY_OP_IN = 3; + POLICY_OP_IS = 4; +} + +enum PolicyConditionKind { + POLICY_CONDITION_KIND_UNSPECIFIED = 0; + POLICY_CONDITION_KIND_WHEN = 1; + POLICY_CONDITION_KIND_UNLESS = 2; +} + +message Policy { + optional string id = 1; + PolicyEffect effect = 2; + PolicyPrincipal principal = 3; + PolicyAction action = 4; + PolicyResource resource = 5; + repeated PolicyCondition conditions = 6; + map annotations = 7; +} + +message PolicyPrincipal { + PolicyOp op = 1; + optional EntityId entity = 2; + optional string entity_type = 3; +} + +message PolicyAction { + PolicyOp op = 1; + optional EntityId entity = 2; + repeated EntityId entities = 3; +} + +message PolicyResource { + PolicyOp op = 1; + optional EntityId entity = 2; + optional string entity_type = 3; +} + +message PolicyCondition { + PolicyConditionKind kind = 1; + Expr body = 2; +} diff --git a/packages/corks/proto/cedar/v3/value.proto b/packages/corks/proto/cedar/v3/value.proto new file mode 100644 index 00000000..aa6bcf30 --- /dev/null +++ b/packages/corks/proto/cedar/v3/value.proto @@ -0,0 +1,34 @@ +syntax = "proto3"; + +package cedar.v3; + +import "cedar/v3/entity_id.proto"; + +message Value { + oneof value { + string string = 1; + int64 long = 2; + bool bool = 3; + SetValue set = 4; + RecordValue record = 5; + ExtensionValue extension = 6; + EntityValue entity = 7; + } +} + +message SetValue { + repeated Value values = 1; +} + +message RecordValue { + map values = 1; +} + +message ExtensionValue { + string fn = 1; + Value arg = 2; +} + +message EntityValue { + EntityId uid = 1; +} diff --git a/packages/corks/proto/corks/v1/cork.proto b/packages/corks/proto/corks/v1/cork.proto new file mode 100644 index 00000000..8d8d1c48 --- /dev/null +++ b/packages/corks/proto/corks/v1/cork.proto @@ -0,0 +1,17 @@ +syntax = "proto3"; + +package corks.v1; + +message Cork { + bytes id = 1; + bytes key_id = 2; + optional SignedBlock bearer = 3; + repeated SignedBlock caveats = 4; + bytes signature = 5; +} + +message SignedBlock { + bytes block = 1; + bytes type_url = 2; + bytes signature = 3; +} diff --git a/packages/corks/proto/dart/dart_options.proto b/packages/corks/proto/dart/dart_options.proto new file mode 100644 index 00000000..fa7ace22 --- /dev/null +++ b/packages/corks/proto/dart/dart_options.proto @@ -0,0 +1,77 @@ +// Experimental options controlling Dart code generation. +syntax = "proto2"; + +package dart_options; + +// This file must be modified for Google internal use, +// because custom options only work when the package name +// agrees with the version of protoc we are using. +// (The import statement and "google.protobuf." prefix need to be changed.) + +import "google/protobuf/descriptor.proto"; +import "google/protobuf/plugin.proto"; + +// A mixin that can be used in the 'with' clause of the generated Dart class +// for a proto message. +message DartMixin { + // The name of the mixin class. + optional string name = 1; + + // A URI pointing to the Dart library that defines the mixin. + // The generated Dart code will use this in an import statement. + optional string import_from = 2; + + // The name of another mixin to be applied ahead of this one. + // The generated class for the message will inherit from all mixins + // in the parent chain. + optional string parent = 3; +} + +// Defines additional Dart imports to be used with messages in this file. +message Imports { + // Mixins to be used on messages in this file. + // These mixins are in addition to internally defined mixins (e.g PbMapMixin) + // and may override them. + // + // Warning: mixins are experimental. The protoc Dart plugin doesn't check + // for name conflicts between mixin class members and generated class members, + // so the generated code may contain errors. Therefore, running dartanalyzer + // on the generated file is a good idea. + repeated DartMixin mixins = 1; +} + +extend google.protobuf.FileOptions { + optional Imports imports = 28125061; + + // Applies the named mixin to all messages in this file. + // (May be overridden by the "mixin" option on a message.) + // For now, "PbMapMixin" is the only available mixin. + optional string default_mixin = 96128839; +} + +extend google.protobuf.MessageOptions { + // Applies the named mixin. + // For now, "PbMapMixin" is the only available mixin. + // The empty string can be used to turn off mixins for this message. + optional string mixin = 96128839; +} + +extend google.protobuf.FieldOptions { + // Adds @override annotation to the field's getter (for use with mixins). + optional bool override_getter = 28205290; + + // Adds @override annotation to the field's setter (for use with mixins). + optional bool override_setter = 28937366; + + // Adds @override annotation to the field's hasX() method (for use with + // mixins). + optional bool override_has_method = 28937461; + + // Adds @override annotation to the field's clearX() method (for use with + // mixins). + optional bool override_clear_method = 28907907; + + // Uses the given name for getters, setters and as suffixes for has/clear + // methods in the generated Dart file. Should be lowerCamelCase. + optional string dart_name = 28700919; +} diff --git a/packages/corks/proto/google/protobuf/README.md b/packages/corks/proto/google/protobuf/README.md new file mode 100644 index 00000000..5a22e7c8 --- /dev/null +++ b/packages/corks/proto/google/protobuf/README.md @@ -0,0 +1,3 @@ +# Protobufs + +Google protobuf standard library: https://github.com/protocolbuffers/protobuf diff --git a/packages/corks/proto/google/protobuf/any.proto b/packages/corks/proto/google/protobuf/any.proto new file mode 100644 index 00000000..7bebd915 --- /dev/null +++ b/packages/corks/proto/google/protobuf/any.proto @@ -0,0 +1,162 @@ +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto3"; + +package google.protobuf; + +option csharp_namespace = "Google.Protobuf.WellKnownTypes"; +option go_package = "google.golang.org/protobuf/types/known/anypb"; +option java_multiple_files = true; +option java_outer_classname = "AnyProto"; +option java_package = "com.google.protobuf"; +option objc_class_prefix = "GPB"; + +// `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" +// } +// +message Any { + // 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. + // + string type_url = 1; + + // Must be a valid serialized protocol buffer of the above specified type. + bytes value = 2; +} diff --git a/packages/corks/proto/google/protobuf/descriptor.proto b/packages/corks/proto/google/protobuf/descriptor.proto new file mode 100644 index 00000000..a8fb4b24 --- /dev/null +++ b/packages/corks/proto/google/protobuf/descriptor.proto @@ -0,0 +1,1248 @@ +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Author: kenton@google.com (Kenton Varda) +// Based on original Protocol Buffers design by +// Sanjay Ghemawat, Jeff Dean, and others. +// +// The messages in this file describe the definitions found in .proto files. +// A valid .proto file can be translated directly to a FileDescriptorProto +// without any other information (e.g. without reading its imports). + +syntax = "proto2"; + +package google.protobuf; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Protobuf.Reflection"; +option go_package = "google.golang.org/protobuf/types/descriptorpb"; +option java_outer_classname = "DescriptorProtos"; +option java_package = "com.google.protobuf"; +option objc_class_prefix = "GPB"; +// descriptor.proto must be optimized for speed because reflection-based +// algorithms don't work during bootstrapping. +option optimize_for = SPEED; + +// The protocol compiler can output a FileDescriptorSet containing the .proto +// files it parses. +message FileDescriptorSet { + repeated FileDescriptorProto file = 1; +} + +// The full set of known editions. +enum Edition { + // A placeholder for an unknown edition value. + EDITION_UNKNOWN = 0; + + // Legacy syntax "editions". These pre-date editions, but behave much like + // distinct editions. These can't be used to specify the edition of proto + // files, but feature definitions must supply proto2/proto3 defaults for + // backwards compatibility. + EDITION_PROTO2 = 998; + EDITION_PROTO3 = 999; + + // Editions that have been released. The specific values are arbitrary and + // should not be depended on, but they will always be time-ordered for easy + // comparison. + EDITION_2023 = 1000; + + // Placeholder editions for testing feature resolution. These should not be + // used or relyed on outside of tests. + EDITION_1_TEST_ONLY = 1; + EDITION_2_TEST_ONLY = 2; + EDITION_99997_TEST_ONLY = 99997; + EDITION_99998_TEST_ONLY = 99998; + EDITION_99999_TEST_ONLY = 99999; +} + +// Describes a complete .proto file. +message FileDescriptorProto { + optional string name = 1; // file name, relative to root of source tree + optional string package = 2; // e.g. "foo", "foo.bar", etc. + + // Names of files imported by this file. + repeated string dependency = 3; + // Indexes of the public imported files in the dependency list above. + repeated int32 public_dependency = 10; + // Indexes of the weak imported files in the dependency list. + // For Google-internal migration only. Do not use. + repeated int32 weak_dependency = 11; + + // All top-level definitions in this file. + repeated DescriptorProto message_type = 4; + repeated EnumDescriptorProto enum_type = 5; + repeated ServiceDescriptorProto service = 6; + repeated FieldDescriptorProto extension = 7; + + optional FileOptions options = 8; + + // This field contains optional information about the original source code. + // You may safely remove this entire field without harming runtime + // functionality of the descriptors -- the information is needed only by + // development tools. + optional SourceCodeInfo source_code_info = 9; + + // The syntax of the proto file. + // The supported values are "proto2", "proto3", and "editions". + // + // If `edition` is present, this value must be "editions". + optional string syntax = 12; + + // The edition of the proto file. + optional Edition edition = 14; +} + +// Describes a message type. +message DescriptorProto { + optional string name = 1; + + repeated FieldDescriptorProto field = 2; + repeated FieldDescriptorProto extension = 6; + + repeated DescriptorProto nested_type = 3; + repeated EnumDescriptorProto enum_type = 4; + + message ExtensionRange { + optional int32 start = 1; // Inclusive. + optional int32 end = 2; // Exclusive. + + optional ExtensionRangeOptions options = 3; + } + repeated ExtensionRange extension_range = 5; + + repeated OneofDescriptorProto oneof_decl = 8; + + optional MessageOptions options = 7; + + // Range of reserved tag numbers. Reserved tag numbers may not be used by + // fields or extension ranges in the same message. Reserved ranges may + // not overlap. + message ReservedRange { + optional int32 start = 1; // Inclusive. + optional int32 end = 2; // Exclusive. + } + repeated ReservedRange reserved_range = 9; + // Reserved field names, which may not be used by fields in the same message. + // A given name may only be reserved once. + repeated string reserved_name = 10; +} + +message ExtensionRangeOptions { + // The parser stores options it doesn't recognize here. See above. + repeated UninterpretedOption uninterpreted_option = 999; + + message Declaration { + // The extension number declared within the extension range. + optional int32 number = 1; + + // The fully-qualified name of the extension field. There must be a leading + // dot in front of the full name. + optional string full_name = 2; + + // The fully-qualified type name of the extension field. Unlike + // Metadata.type, Declaration.type must have a leading dot for messages + // and enums. + optional string type = 3; + + // If true, indicates that the number is reserved in the extension range, + // and any extension field with the number will fail to compile. Set this + // when a declared extension field is deleted. + optional bool reserved = 5; + + // If true, indicates that the extension must be defined as repeated. + // Otherwise the extension must be defined as optional. + optional bool repeated = 6; + + reserved 4; // removed is_repeated + } + + // For external users: DO NOT USE. We are in the process of open sourcing + // extension declaration and executing internal cleanups before it can be + // used externally. + repeated Declaration declaration = 2 [retention = RETENTION_SOURCE]; + + // Any features defined in the specific edition. + optional FeatureSet features = 50; + + // The verification state of the extension range. + enum VerificationState { + // All the extensions of the range must be declared. + DECLARATION = 0; + UNVERIFIED = 1; + } + + // The verification state of the range. + // TODO: flip the default to DECLARATION once all empty ranges + // are marked as UNVERIFIED. + optional VerificationState verification = 3 [default = UNVERIFIED]; + + // Clients can define custom options in extensions of this message. See above. + extensions 1000 to max; +} + +// Describes a field within a message. +message FieldDescriptorProto { + enum Type { + // 0 is reserved for errors. + // Order is weird for historical reasons. + TYPE_DOUBLE = 1; + TYPE_FLOAT = 2; + // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if + // negative values are likely. + TYPE_INT64 = 3; + TYPE_UINT64 = 4; + // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if + // negative values are likely. + TYPE_INT32 = 5; + TYPE_FIXED64 = 6; + TYPE_FIXED32 = 7; + TYPE_BOOL = 8; + TYPE_STRING = 9; + // Tag-delimited aggregate. + // Group type is deprecated and not supported after google.protobuf. However, Proto3 + // implementations should still be able to parse the group wire format and + // treat group fields as unknown fields. In Editions, the group wire format + // can be enabled via the `message_encoding` feature. + TYPE_GROUP = 10; + TYPE_MESSAGE = 11; // Length-delimited aggregate. + + // New in version 2. + TYPE_BYTES = 12; + TYPE_UINT32 = 13; + TYPE_ENUM = 14; + TYPE_SFIXED32 = 15; + TYPE_SFIXED64 = 16; + TYPE_SINT32 = 17; // Uses ZigZag encoding. + TYPE_SINT64 = 18; // Uses ZigZag encoding. + } + + enum Label { + // 0 is reserved for errors + LABEL_OPTIONAL = 1; + LABEL_REPEATED = 3; + // The required label is only allowed in google.protobuf. In proto3 and Editions + // it's explicitly prohibited. In Editions, the `field_presence` feature + // can be used to get this behavior. + LABEL_REQUIRED = 2; + } + + optional string name = 1; + optional int32 number = 3; + optional Label label = 4; + + // If type_name is set, this need not be set. If both this and type_name + // are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. + optional Type type = 5; + + // For message and enum types, this is the name of the type. If the name + // starts with a '.', it is fully-qualified. Otherwise, C++-like scoping + // rules are used to find the type (i.e. first the nested types within this + // message are searched, then within the parent, on up to the root + // namespace). + optional string type_name = 6; + + // For extensions, this is the name of the type being extended. It is + // resolved in the same manner as type_name. + optional string extendee = 2; + + // For numeric types, contains the original text representation of the value. + // For booleans, "true" or "false". + // For strings, contains the default text contents (not escaped in any way). + // For bytes, contains the C escaped value. All bytes >= 128 are escaped. + optional string default_value = 7; + + // If set, gives the index of a oneof in the containing type's oneof_decl + // list. This field is a member of that oneof. + optional int32 oneof_index = 9; + + // JSON name of this field. The value is set by protocol compiler. If the + // user has set a "json_name" option on this field, that option's value + // will be used. Otherwise, it's deduced from the field's name by converting + // it to camelCase. + optional string json_name = 10; + + optional FieldOptions options = 8; + + // If true, this is a proto3 "optional". When a proto3 field is optional, it + // tracks presence regardless of field type. + // + // When proto3_optional is true, this field must be belong to a oneof to + // signal to old proto3 clients that presence is tracked for this field. This + // oneof is known as a "synthetic" oneof, and this field must be its sole + // member (each proto3 optional field gets its own synthetic oneof). Synthetic + // oneofs exist in the descriptor only, and do not generate any API. Synthetic + // oneofs must be ordered after all "real" oneofs. + // + // For message fields, proto3_optional doesn't create any semantic change, + // since non-repeated message fields always track presence. However it still + // indicates the semantic detail of whether the user wrote "optional" or not. + // This can be useful for round-tripping the .proto file. For consistency we + // give message fields a synthetic oneof also, even though it is not required + // to track presence. This is especially important because the parser can't + // tell if a field is a message or an enum, so it must always create a + // synthetic oneof. + // + // Proto2 optional fields do not set this flag, because they already indicate + // optional with `LABEL_OPTIONAL`. + optional bool proto3_optional = 17; +} + +// Describes a oneof. +message OneofDescriptorProto { + optional string name = 1; + optional OneofOptions options = 2; +} + +// Describes an enum type. +message EnumDescriptorProto { + optional string name = 1; + + repeated EnumValueDescriptorProto value = 2; + + optional EnumOptions options = 3; + + // Range of reserved numeric values. Reserved values may not be used by + // entries in the same enum. Reserved ranges may not overlap. + // + // Note that this is distinct from DescriptorProto.ReservedRange in that it + // is inclusive such that it can appropriately represent the entire int32 + // domain. + message EnumReservedRange { + optional int32 start = 1; // Inclusive. + optional int32 end = 2; // Inclusive. + } + + // Range of reserved numeric values. Reserved numeric values may not be used + // by enum values in the same enum declaration. Reserved ranges may not + // overlap. + repeated EnumReservedRange reserved_range = 4; + + // Reserved enum value names, which may not be reused. A given name may only + // be reserved once. + repeated string reserved_name = 5; +} + +// Describes a value within an enum. +message EnumValueDescriptorProto { + optional string name = 1; + optional int32 number = 2; + + optional EnumValueOptions options = 3; +} + +// Describes a service. +message ServiceDescriptorProto { + optional string name = 1; + repeated MethodDescriptorProto method = 2; + + optional ServiceOptions options = 3; +} + +// Describes a method of a service. +message MethodDescriptorProto { + optional string name = 1; + + // Input and output type names. These are resolved in the same way as + // FieldDescriptorProto.type_name, but must refer to a message type. + optional string input_type = 2; + optional string output_type = 3; + + optional MethodOptions options = 4; + + // Identifies if client streams multiple client messages + optional bool client_streaming = 5 [default = false]; + // Identifies if server streams multiple server messages + optional bool server_streaming = 6 [default = false]; +} + +// =================================================================== +// Options + +// Each of the definitions above may have "options" attached. These are +// just annotations which may cause code to be generated slightly differently +// or may contain hints for code that manipulates protocol messages. +// +// Clients may define custom options as extensions of the *Options messages. +// These extensions may not yet be known at parsing time, so the parser cannot +// store the values in them. Instead it stores them in a field in the *Options +// message called uninterpreted_option. This field must have the same name +// across all *Options messages. We then use this field to populate the +// extensions when we build a descriptor, at which point all protos have been +// parsed and so all extensions are known. +// +// Extension numbers for custom options may be chosen as follows: +// * For options which will only be used within a single application or +// organization, or for experimental options, use field numbers 50000 +// through 99999. It is up to you to ensure that you do not use the +// same number for multiple options. +// * For options which will be published and used publicly by multiple +// independent entities, e-mail protobuf-global-extension-registry@google.com +// to reserve extension numbers. Simply provide your project name (e.g. +// Objective-C plugin) and your project website (if available) -- there's no +// need to explain how you intend to use them. Usually you only need one +// extension number. You can declare multiple options with only one extension +// number by putting them in a sub-message. See the Custom Options section of +// the docs for examples: +// https://developers.google.com/protocol-buffers/docs/proto#options +// If this turns out to be popular, a web service will be set up +// to automatically assign option numbers. + +message FileOptions { + // Sets the Java package where classes generated from this .proto will be + // placed. By default, the proto package is used, but this is often + // inappropriate because proto packages do not normally start with backwards + // domain names. + optional string java_package = 1; + + // Controls the name of the wrapper Java class generated for the .proto file. + // That class will always contain the .proto file's getDescriptor() method as + // well as any top-level extensions defined in the .proto file. + // If java_multiple_files is disabled, then all the other classes from the + // .proto file will be nested inside the single wrapper outer class. + optional string java_outer_classname = 8; + + // If enabled, then the Java code generator will generate a separate .java + // file for each top-level message, enum, and service defined in the .proto + // file. Thus, these types will *not* be nested inside the wrapper class + // named by java_outer_classname. However, the wrapper class will still be + // generated to contain the file's getDescriptor() method as well as any + // top-level extensions defined in the file. + optional bool java_multiple_files = 10 [default = false]; + + // This option does nothing. + optional bool java_generate_equals_and_hash = 20 [deprecated = true]; + + // If set true, then the Java2 code generator will generate code that + // throws an exception whenever an attempt is made to assign a non-UTF-8 + // byte sequence to a string field. + // Message reflection will do the same. + // However, an extension field still accepts non-UTF-8 byte sequences. + // This option has no effect on when used with the lite runtime. + optional bool java_string_check_utf8 = 27 [default = false]; + + // Generated classes can be optimized for speed or code size. + enum OptimizeMode { + SPEED = 1; // Generate complete code for parsing, serialization, + // etc. + CODE_SIZE = 2; // Use ReflectionOps to implement these methods. + LITE_RUNTIME = 3; // Generate code using MessageLite and the lite runtime. + } + optional OptimizeMode optimize_for = 9 [default = SPEED]; + + // Sets the Go package where structs generated from this .proto will be + // placed. If omitted, the Go package will be derived from the following: + // - The basename of the package import path, if provided. + // - Otherwise, the package statement in the .proto file, if present. + // - Otherwise, the basename of the .proto file, without extension. + optional string go_package = 11; + + // Should generic services be generated in each language? "Generic" services + // are not specific to any particular RPC system. They are generated by the + // main code generators in each language (without additional plugins). + // Generic services were the only kind of service generation supported by + // early versions of google.protobuf. + // + // Generic services are now considered deprecated in favor of using plugins + // that generate code specific to your particular RPC system. Therefore, + // these default to false. Old code which depends on generic services should + // explicitly set them to true. + optional bool cc_generic_services = 16 [default = false]; + optional bool java_generic_services = 17 [default = false]; + optional bool py_generic_services = 18 [default = false]; + optional bool php_generic_services = 42 [default = false]; + + // Is this file deprecated? + // Depending on the target platform, this can emit Deprecated annotations + // for everything in the file, or it will be completely ignored; in the very + // least, this is a formalization for deprecating files. + optional bool deprecated = 23 [default = false]; + + // Enables the use of arenas for the proto messages in this file. This applies + // only to generated classes for C++. + optional bool cc_enable_arenas = 31 [default = true]; + + // Sets the objective c class prefix which is prepended to all objective c + // generated classes from this .proto. There is no default. + optional string objc_class_prefix = 36; + + // Namespace for generated classes; defaults to the package. + optional string csharp_namespace = 37; + + // By default Swift generators will take the proto package and CamelCase it + // replacing '.' with underscore and use that to prefix the types/symbols + // defined. When this options is provided, they will use this value instead + // to prefix the types/symbols defined. + optional string swift_prefix = 39; + + // Sets the php class prefix which is prepended to all php generated classes + // from this .proto. Default is empty. + optional string php_class_prefix = 40; + + // Use this option to change the namespace of php generated classes. Default + // is empty. When this option is empty, the package name will be used for + // determining the namespace. + optional string php_namespace = 41; + + // Use this option to change the namespace of php generated metadata classes. + // Default is empty. When this option is empty, the proto file name will be + // used for determining the namespace. + optional string php_metadata_namespace = 44; + + // Use this option to change the package of ruby generated classes. Default + // is empty. When this option is not set, the package name will be used for + // determining the ruby package. + optional string ruby_package = 45; + + // Any features defined in the specific edition. + optional FeatureSet features = 50; + + // The parser stores options it doesn't recognize here. + // See the documentation for the "Options" section above. + repeated UninterpretedOption uninterpreted_option = 999; + + // Clients can define custom options in extensions of this message. + // See the documentation for the "Options" section above. + extensions 1000 to max; + + reserved 38; +} + +message MessageOptions { + // Set true to use the old proto1 MessageSet wire format for extensions. + // This is provided for backwards-compatibility with the MessageSet wire + // format. You should not use this for any other reason: It's less + // efficient, has fewer features, and is more complicated. + // + // The message must be defined exactly as follows: + // message Foo { + // option message_set_wire_format = true; + // extensions 4 to max; + // } + // Note that the message cannot have any defined fields; MessageSets only + // have extensions. + // + // All extensions of your type must be singular messages; e.g. they cannot + // be int32s, enums, or repeated messages. + // + // Because this is an option, the above two restrictions are not enforced by + // the protocol compiler. + optional bool message_set_wire_format = 1 [default = false]; + + // Disables the generation of the standard "descriptor()" accessor, which can + // conflict with a field of the same name. This is meant to make migration + // from proto1 easier; new code should avoid fields named "descriptor". + optional bool no_standard_descriptor_accessor = 2 [default = false]; + + // Is this message deprecated? + // Depending on the target platform, this can emit Deprecated annotations + // for the message, or it will be completely ignored; in the very least, + // this is a formalization for deprecating messages. + optional bool deprecated = 3 [default = false]; + + reserved 4, 5, 6; + + // NOTE: Do not set the option in .proto files. Always use the maps syntax + // instead. The option should only be implicitly set by the proto compiler + // parser. + // + // Whether the message is an automatically generated map entry type for the + // maps field. + // + // For maps fields: + // map map_field = 1; + // The parsed descriptor looks like: + // message MapFieldEntry { + // option map_entry = true; + // optional KeyType key = 1; + // optional ValueType value = 2; + // } + // repeated MapFieldEntry map_field = 1; + // + // Implementations may choose not to generate the map_entry=true message, but + // use a native map in the target language to hold the keys and values. + // The reflection APIs in such implementations still need to work as + // if the field is a repeated message field. + optional bool map_entry = 7; + + reserved 8; // javalite_serializable + reserved 9; // javanano_as_lite + + // Enable the legacy handling of JSON field name conflicts. This lowercases + // and strips underscored from the fields before comparison in proto3 only. + // The new behavior takes `json_name` into account and applies to proto2 as + // well. + // + // This should only be used as a temporary measure against broken builds due + // to the change in behavior for JSON field name conflicts. + // + // TODO This is legacy behavior we plan to remove once downstream + // teams have had time to migrate. + optional bool deprecated_legacy_json_field_conflicts = 11 [deprecated = true]; + + // Any features defined in the specific edition. + optional FeatureSet features = 12; + + // The parser stores options it doesn't recognize here. See above. + repeated UninterpretedOption uninterpreted_option = 999; + + // Clients can define custom options in extensions of this message. See above. + extensions 1000 to max; +} + +message FieldOptions { + // The ctype option instructs the C++ code generator to use a different + // representation of the field than it normally would. See the specific + // options below. This option is only implemented to support use of + // [ctype=CORD] and [ctype=STRING] (the default) on non-repeated fields of + // type "bytes" in the open source release -- sorry, we'll try to include + // other types in a future version! + optional CType ctype = 1 [default = STRING]; + enum CType { + // Default mode. + STRING = 0; + + // The option [ctype=CORD] may be applied to a non-repeated field of type + // "bytes". It indicates that in C++, the data should be stored in a Cord + // instead of a string. For very large strings, this may reduce memory + // fragmentation. It may also allow better performance when parsing from a + // Cord, or when parsing with aliasing enabled, as the parsed Cord may then + // alias the original buffer. + CORD = 1; + + STRING_PIECE = 2; + } + // The packed option can be enabled for repeated primitive fields to enable + // a more efficient representation on the wire. Rather than repeatedly + // writing the tag and type for each element, the entire array is encoded as + // a single length-delimited blob. In proto3, only explicit setting it to + // false will avoid using packed encoding. This option is prohibited in + // Editions, but the `repeated_field_encoding` feature can be used to control + // the behavior. + optional bool packed = 2; + + // The jstype option determines the JavaScript type used for values of the + // field. The option is permitted only for 64 bit integral and fixed types + // (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING + // is represented as JavaScript string, which avoids loss of precision that + // can happen when a large value is converted to a floating point JavaScript. + // Specifying JS_NUMBER for the jstype causes the generated JavaScript code to + // use the JavaScript "number" type. The behavior of the default option + // JS_NORMAL is implementation dependent. + // + // This option is an enum to permit additional types to be added, e.g. + // goog.math.Integer. + optional JSType jstype = 6 [default = JS_NORMAL]; + enum JSType { + // Use the default type. + JS_NORMAL = 0; + + // Use JavaScript strings. + JS_STRING = 1; + + // Use JavaScript numbers. + JS_NUMBER = 2; + } + + // Should this field be parsed lazily? Lazy applies only to message-type + // fields. It means that when the outer message is initially parsed, the + // inner message's contents will not be parsed but instead stored in encoded + // form. The inner message will actually be parsed when it is first accessed. + // + // This is only a hint. Implementations are free to choose whether to use + // eager or lazy parsing regardless of the value of this option. However, + // setting this option true suggests that the protocol author believes that + // using lazy parsing on this field is worth the additional bookkeeping + // overhead typically needed to implement it. + // + // This option does not affect the public interface of any generated code; + // all method signatures remain the same. Furthermore, thread-safety of the + // interface is not affected by this option; const methods remain safe to + // call from multiple threads concurrently, while non-const methods continue + // to require exclusive access. + // + // Note that implementations may choose not to check required fields within + // a lazy sub-message. That is, calling IsInitialized() on the outer message + // may return true even if the inner message has missing required fields. + // This is necessary because otherwise the inner message would have to be + // parsed in order to perform the check, defeating the purpose of lazy + // parsing. An implementation which chooses not to check required fields + // must be consistent about it. That is, for any particular sub-message, the + // implementation must either *always* check its required fields, or *never* + // check its required fields, regardless of whether or not the message has + // been parsed. + // + // As of May 2022, lazy verifies the contents of the byte stream during + // parsing. An invalid byte stream will cause the overall parsing to fail. + optional bool lazy = 5 [default = false]; + + // unverified_lazy does no correctness checks on the byte stream. This should + // only be used where lazy with verification is prohibitive for performance + // reasons. + optional bool unverified_lazy = 15 [default = false]; + + // Is this field deprecated? + // Depending on the target platform, this can emit Deprecated annotations + // for accessors, or it will be completely ignored; in the very least, this + // is a formalization for deprecating fields. + optional bool deprecated = 3 [default = false]; + + // For Google-internal migration only. Do not use. + optional bool weak = 10 [default = false]; + + // Indicate that the field value should not be printed out when using debug + // formats, e.g. when the field contains sensitive credentials. + optional bool debug_redact = 16 [default = false]; + + // If set to RETENTION_SOURCE, the option will be omitted from the binary. + // Note: as of January 2023, support for this is in progress and does not yet + // have an effect (b/264593489). + enum OptionRetention { + RETENTION_UNKNOWN = 0; + RETENTION_RUNTIME = 1; + RETENTION_SOURCE = 2; + } + + optional OptionRetention retention = 17; + + // This indicates the types of entities that the field may apply to when used + // as an option. If it is unset, then the field may be freely used as an + // option on any kind of entity. Note: as of January 2023, support for this is + // in progress and does not yet have an effect (b/264593489). + enum OptionTargetType { + TARGET_TYPE_UNKNOWN = 0; + TARGET_TYPE_FILE = 1; + TARGET_TYPE_EXTENSION_RANGE = 2; + TARGET_TYPE_MESSAGE = 3; + TARGET_TYPE_FIELD = 4; + TARGET_TYPE_ONEOF = 5; + TARGET_TYPE_ENUM = 6; + TARGET_TYPE_ENUM_ENTRY = 7; + TARGET_TYPE_SERVICE = 8; + TARGET_TYPE_METHOD = 9; + } + + repeated OptionTargetType targets = 19; + + message EditionDefault { + optional Edition edition = 3; + optional string value = 2; // Textproto value. + } + repeated EditionDefault edition_defaults = 20; + + // Any features defined in the specific edition. + optional FeatureSet features = 21; + + // The parser stores options it doesn't recognize here. See above. + repeated UninterpretedOption uninterpreted_option = 999; + + // Clients can define custom options in extensions of this message. See above. + extensions 1000 to max; + + reserved 4; // removed jtype + reserved 18; // reserve target, target_obsolete_do_not_use +} + +message OneofOptions { + // Any features defined in the specific edition. + optional FeatureSet features = 1; + + // The parser stores options it doesn't recognize here. See above. + repeated UninterpretedOption uninterpreted_option = 999; + + // Clients can define custom options in extensions of this message. See above. + extensions 1000 to max; +} + +message EnumOptions { + // Set this option to true to allow mapping different tag names to the same + // value. + optional bool allow_alias = 2; + + // Is this enum deprecated? + // Depending on the target platform, this can emit Deprecated annotations + // for the enum, or it will be completely ignored; in the very least, this + // is a formalization for deprecating enums. + optional bool deprecated = 3 [default = false]; + + reserved 5; // javanano_as_lite + + // Enable the legacy handling of JSON field name conflicts. This lowercases + // and strips underscored from the fields before comparison in proto3 only. + // The new behavior takes `json_name` into account and applies to proto2 as + // well. + // TODO Remove this legacy behavior once downstream teams have + // had time to migrate. + optional bool deprecated_legacy_json_field_conflicts = 6 [deprecated = true]; + + // Any features defined in the specific edition. + optional FeatureSet features = 7; + + // The parser stores options it doesn't recognize here. See above. + repeated UninterpretedOption uninterpreted_option = 999; + + // Clients can define custom options in extensions of this message. See above. + extensions 1000 to max; +} + +message EnumValueOptions { + // Is this enum value deprecated? + // Depending on the target platform, this can emit Deprecated annotations + // for the enum value, or it will be completely ignored; in the very least, + // this is a formalization for deprecating enum values. + optional bool deprecated = 1 [default = false]; + + // Any features defined in the specific edition. + optional FeatureSet features = 2; + + // Indicate that fields annotated with this enum value should not be printed + // out when using debug formats, e.g. when the field contains sensitive + // credentials. + optional bool debug_redact = 3 [default = false]; + + // The parser stores options it doesn't recognize here. See above. + repeated UninterpretedOption uninterpreted_option = 999; + + // Clients can define custom options in extensions of this message. See above. + extensions 1000 to max; +} + +message ServiceOptions { + // Any features defined in the specific edition. + optional FeatureSet features = 34; + + // Note: Field numbers 1 through 32 are reserved for Google's internal RPC + // framework. We apologize for hoarding these numbers to ourselves, but + // we were already using them long before we decided to release Protocol + // Buffers. + + // Is this service deprecated? + // Depending on the target platform, this can emit Deprecated annotations + // for the service, or it will be completely ignored; in the very least, + // this is a formalization for deprecating services. + optional bool deprecated = 33 [default = false]; + + // The parser stores options it doesn't recognize here. See above. + repeated UninterpretedOption uninterpreted_option = 999; + + // Clients can define custom options in extensions of this message. See above. + extensions 1000 to max; +} + +message MethodOptions { + // Note: Field numbers 1 through 32 are reserved for Google's internal RPC + // framework. We apologize for hoarding these numbers to ourselves, but + // we were already using them long before we decided to release Protocol + // Buffers. + + // Is this method deprecated? + // Depending on the target platform, this can emit Deprecated annotations + // for the method, or it will be completely ignored; in the very least, + // this is a formalization for deprecating methods. + optional bool deprecated = 33 [default = false]; + + // Is this method side-effect-free (or safe in HTTP parlance), or idempotent, + // or neither? HTTP based RPC implementation may choose GET verb for safe + // methods, and PUT verb for idempotent methods instead of the default POST. + enum IdempotencyLevel { + IDEMPOTENCY_UNKNOWN = 0; + NO_SIDE_EFFECTS = 1; // implies idempotent + IDEMPOTENT = 2; // idempotent, but may have side effects + } + optional IdempotencyLevel idempotency_level = 34 [default = IDEMPOTENCY_UNKNOWN]; + + // Any features defined in the specific edition. + optional FeatureSet features = 35; + + // The parser stores options it doesn't recognize here. See above. + repeated UninterpretedOption uninterpreted_option = 999; + + // Clients can define custom options in extensions of this message. See above. + extensions 1000 to max; +} + +// A message representing a option the parser does not recognize. This only +// appears in options protos created by the compiler::Parser class. +// DescriptorPool resolves these when building Descriptor objects. Therefore, +// options protos in descriptor objects (e.g. returned by Descriptor::options(), +// or produced by Descriptor::CopyTo()) will never have UninterpretedOptions +// in them. +message UninterpretedOption { + // The name of the uninterpreted option. Each string represents a segment in + // a dot-separated name. is_extension is true iff a segment represents an + // extension (denoted with parentheses in options specs in .proto files). + // E.g.,{ ["foo", false], ["bar.baz", true], ["moo", false] } represents + // "foo.(bar.baz).moo". + message NamePart { + required string name_part = 1; + required bool is_extension = 2; + } + repeated NamePart name = 2; + + // The value of the uninterpreted option, in whatever type the tokenizer + // identified it as during parsing. Exactly one of these should be set. + optional string identifier_value = 3; + optional uint64 positive_int_value = 4; + optional int64 negative_int_value = 5; + optional double double_value = 6; + optional bytes string_value = 7; + optional string aggregate_value = 8; +} + +// =================================================================== +// Features + +// TODO Enums in C++ gencode (and potentially other languages) are +// not well scoped. This means that each of the feature enums below can clash +// with each other. The short names we've chosen maximize call-site +// readability, but leave us very open to this scenario. A future feature will +// be designed and implemented to handle this, hopefully before we ever hit a +// conflict here. +message FeatureSet { + enum FieldPresence { + FIELD_PRESENCE_UNKNOWN = 0; + EXPLICIT = 1; + IMPLICIT = 2; + LEGACY_REQUIRED = 3; + } + optional FieldPresence field_presence = 1 [ + retention = RETENTION_RUNTIME, + targets = TARGET_TYPE_FIELD, + targets = TARGET_TYPE_FILE, + edition_defaults = { + edition: EDITION_PROTO2, + value: "EXPLICIT" + }, + edition_defaults = { + edition: EDITION_PROTO3, + value: "IMPLICIT" + }, + edition_defaults = { + edition: EDITION_2023, + value: "EXPLICIT" + } + ]; + + enum EnumType { + ENUM_TYPE_UNKNOWN = 0; + OPEN = 1; + CLOSED = 2; + } + optional EnumType enum_type = 2 [ + retention = RETENTION_RUNTIME, + targets = TARGET_TYPE_ENUM, + targets = TARGET_TYPE_FILE, + edition_defaults = { + edition: EDITION_PROTO2, + value: "CLOSED" + }, + edition_defaults = { + edition: EDITION_PROTO3, + value: "OPEN" + } + ]; + + enum RepeatedFieldEncoding { + REPEATED_FIELD_ENCODING_UNKNOWN = 0; + PACKED = 1; + EXPANDED = 2; + } + optional RepeatedFieldEncoding repeated_field_encoding = 3 [ + retention = RETENTION_RUNTIME, + targets = TARGET_TYPE_FIELD, + targets = TARGET_TYPE_FILE, + edition_defaults = { + edition: EDITION_PROTO2, + value: "EXPANDED" + }, + edition_defaults = { + edition: EDITION_PROTO3, + value: "PACKED" + } + ]; + + enum Utf8Validation { + UTF8_VALIDATION_UNKNOWN = 0; + NONE = 1; + VERIFY = 2; + } + optional Utf8Validation utf8_validation = 4 [ + retention = RETENTION_RUNTIME, + targets = TARGET_TYPE_FIELD, + targets = TARGET_TYPE_FILE, + edition_defaults = { + edition: EDITION_PROTO2, + value: "NONE" + }, + edition_defaults = { + edition: EDITION_PROTO3, + value: "VERIFY" + } + ]; + + enum MessageEncoding { + MESSAGE_ENCODING_UNKNOWN = 0; + LENGTH_PREFIXED = 1; + DELIMITED = 2; + } + optional MessageEncoding message_encoding = 5 [ + retention = RETENTION_RUNTIME, + targets = TARGET_TYPE_FIELD, + targets = TARGET_TYPE_FILE, + edition_defaults = { + edition: EDITION_PROTO2, + value: "LENGTH_PREFIXED" + } + ]; + + enum JsonFormat { + JSON_FORMAT_UNKNOWN = 0; + ALLOW = 1; + LEGACY_BEST_EFFORT = 2; + } + optional JsonFormat json_format = 6 [ + retention = RETENTION_RUNTIME, + targets = TARGET_TYPE_MESSAGE, + targets = TARGET_TYPE_ENUM, + targets = TARGET_TYPE_FILE, + edition_defaults = { + edition: EDITION_PROTO2, + value: "LEGACY_BEST_EFFORT" + }, + edition_defaults = { + edition: EDITION_PROTO3, + value: "ALLOW" + } + ]; + + reserved 999; + + extensions 1000; // for Protobuf C++ + extensions 1001; // for Protobuf Java + + extensions 9995 to 9999; // For internal testing +} + +// A compiled specification for the defaults of a set of features. These +// messages are generated from FeatureSet extensions and can be used to seed +// feature resolution. The resolution with this object becomes a simple search +// for the closest matching edition, followed by proto merges. +message FeatureSetDefaults { + // A map from every known edition with a unique set of defaults to its + // defaults. Not all editions may be contained here. For a given edition, + // the defaults at the closest matching edition ordered at or before it should + // be used. This field must be in strict ascending order by edition. + message FeatureSetEditionDefault { + optional Edition edition = 3; + optional FeatureSet features = 2; + } + repeated FeatureSetEditionDefault defaults = 1; + + // The minimum supported edition (inclusive) when this was constructed. + // Editions before this will not have defaults. + optional Edition minimum_edition = 4; + + // The maximum known edition (inclusive) when this was constructed. Editions + // after this will not have reliable defaults. + optional Edition maximum_edition = 5; +} + +// =================================================================== +// Optional source code info + +// Encapsulates information about the original source file from which a +// FileDescriptorProto was generated. +message SourceCodeInfo { + // A Location identifies a piece of source code in a .proto file which + // corresponds to a particular definition. This information is intended + // to be useful to IDEs, code indexers, documentation generators, and similar + // tools. + // + // For example, say we have a file like: + // message Foo { + // optional string foo = 1; + // } + // Let's look at just the field definition: + // optional string foo = 1; + // ^ ^^ ^^ ^ ^^^ + // a bc de f ghi + // We have the following locations: + // span path represents + // [a,i) [ 4, 0, 2, 0 ] The whole field definition. + // [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). + // [c,d) [ 4, 0, 2, 0, 5 ] The type (string). + // [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). + // [g,h) [ 4, 0, 2, 0, 3 ] The number (1). + // + // Notes: + // - A location may refer to a repeated field itself (i.e. not to any + // particular index within it). This is used whenever a set of elements are + // logically enclosed in a single code segment. For example, an entire + // extend block (possibly containing multiple extension definitions) will + // have an outer location whose path refers to the "extensions" repeated + // field without an index. + // - Multiple locations may have the same path. This happens when a single + // logical declaration is spread out across multiple places. The most + // obvious example is the "extend" block again -- there may be multiple + // extend blocks in the same scope, each of which will have the same path. + // - A location's span is not always a subset of its parent's span. For + // example, the "extendee" of an extension declaration appears at the + // beginning of the "extend" block and is shared by all extensions within + // the block. + // - Just because a location's span is a subset of some other location's span + // does not mean that it is a descendant. For example, a "group" defines + // both a type and a field in a single declaration. Thus, the locations + // corresponding to the type and field and their components will overlap. + // - Code which tries to interpret locations should probably be designed to + // ignore those that it doesn't understand, as more types of locations could + // be recorded in the future. + repeated Location location = 1; + message Location { + // Identifies which part of the FileDescriptorProto was defined at this + // location. + // + // Each element is a field number or an index. They form a path from + // the root FileDescriptorProto to the place where the definition occurs. + // For example, this path: + // [ 4, 3, 2, 7, 1 ] + // refers to: + // file.message_type(3) // 4, 3 + // .field(7) // 2, 7 + // .name() // 1 + // This is because FileDescriptorProto.message_type has field number 4: + // repeated DescriptorProto message_type = 4; + // and DescriptorProto.field has field number 2: + // repeated FieldDescriptorProto field = 2; + // and FieldDescriptorProto.name has field number 1: + // optional string name = 1; + // + // Thus, the above path gives the location of a field name. If we removed + // the last element: + // [ 4, 3, 2, 7 ] + // this path refers to the whole field declaration (from the beginning + // of the label to the terminating semicolon). + repeated int32 path = 1 [packed = true]; + + // Always has exactly three or four elements: start line, start column, + // end line (optional, otherwise assumed same as start line), end column. + // These are packed into a single field for efficiency. Note that line + // and column numbers are zero-based -- typically you will want to add + // 1 to each before displaying to a user. + repeated int32 span = 2 [packed = true]; + + // If this SourceCodeInfo represents a complete declaration, these are any + // comments appearing before and after the declaration which appear to be + // attached to the declaration. + // + // A series of line comments appearing on consecutive lines, with no other + // tokens appearing on those lines, will be treated as a single comment. + // + // leading_detached_comments will keep paragraphs of comments that appear + // before (but not connected to) the current element. Each paragraph, + // separated by empty lines, will be one comment element in the repeated + // field. + // + // Only the comment content is provided; comment markers (e.g. //) are + // stripped out. For block comments, leading whitespace and an asterisk + // will be stripped from the beginning of each line other than the first. + // Newlines are included in the output. + // + // Examples: + // + // optional int32 foo = 1; // Comment attached to foo. + // // Comment attached to bar. + // optional int32 bar = 2; + // + // optional string baz = 3; + // // Comment attached to baz. + // // Another line attached to baz. + // + // // Comment attached to moo. + // // + // // Another line attached to moo. + // optional double moo = 4; + // + // // Detached comment for corge. This is not leading or trailing comments + // // to moo or corge because there are blank lines separating it from + // // both. + // + // // Detached comment for corge paragraph 2. + // + // optional string corge = 5; + // /* Block comment attached + // * to corge. Leading asterisks + // * will be removed. */ + // /* Block comment attached to + // * grault. */ + // optional int32 grault = 6; + // + // // ignored detached comments. + optional string leading_comments = 3; + optional string trailing_comments = 4; + repeated string leading_detached_comments = 6; + } +} + +// Describes the relationship between generated code and its original source +// file. A GeneratedCodeInfo message is associated with only one generated +// source file, but may contain references to different source .proto files. +message GeneratedCodeInfo { + // An Annotation connects some span of text in generated code to an element + // of its generating .proto file. + repeated Annotation annotation = 1; + message Annotation { + // Identifies the element in the original source .proto file. This field + // is formatted the same as SourceCodeInfo.Location.path. + repeated int32 path = 1 [packed = true]; + + // Identifies the filesystem path to the original source .proto. + optional string source_file = 2; + + // Identifies the starting offset in bytes in the generated code + // that relates to the identified object. + optional int32 begin = 3; + + // Identifies the ending offset in bytes in the generated code that + // relates to the identified object. The end offset should be one past + // the last relevant byte (so the length of the text = end - begin). + optional int32 end = 4; + + // Represents the identified object's effect on the element in the original + // .proto file. + enum Semantic { + // There is no effect or the effect is indescribable. + NONE = 0; + // The element is set or otherwise mutated. + SET = 1; + // An alias to the element is returned. + ALIAS = 2; + } + optional Semantic semantic = 5; + } +} diff --git a/packages/corks/proto/google/protobuf/duration.proto b/packages/corks/proto/google/protobuf/duration.proto new file mode 100644 index 00000000..a4f3a1cd --- /dev/null +++ b/packages/corks/proto/google/protobuf/duration.proto @@ -0,0 +1,115 @@ +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto3"; + +package google.protobuf; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Protobuf.WellKnownTypes"; +option go_package = "google.golang.org/protobuf/types/known/durationpb"; +option java_multiple_files = true; +option java_outer_classname = "DurationProto"; +option java_package = "com.google.protobuf"; +option objc_class_prefix = "GPB"; + +// 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". +// +message Duration { + // 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 + int64 seconds = 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. + int32 nanos = 2; +} diff --git a/packages/corks/proto/google/protobuf/plugin.proto b/packages/corks/proto/google/protobuf/plugin.proto new file mode 100644 index 00000000..735e4bfa --- /dev/null +++ b/packages/corks/proto/google/protobuf/plugin.proto @@ -0,0 +1,182 @@ +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Author: kenton@google.com (Kenton Varda) +// +// WARNING: The plugin interface is currently EXPERIMENTAL and is subject to +// change. +// +// protoc (aka the Protocol Compiler) can be extended via plugins. A plugin is +// just a program that reads a CodeGeneratorRequest from stdin and writes a +// CodeGeneratorResponse to stdout. +// +// Plugins written using C++ can use google/protobuf/compiler/plugin.h instead +// of dealing with the raw protocol defined here. +// +// A plugin executable needs only to be placed somewhere in the path. The +// plugin should be named "protoc-gen-$NAME", and will then be used when the +// flag "--${NAME}_out" is passed to protoc. + +syntax = "proto2"; + +package google.protobuf.compiler; + +import "google/protobuf/descriptor.proto"; + +option go_package = "google.golang.org/protobuf/types/pluginpb"; +option java_outer_classname = "PluginProtos"; +option java_package = "com.google.protobuf.compiler"; + +// The version number of protocol compiler. +message Version { + optional int32 major = 1; + optional int32 minor = 2; + optional int32 patch = 3; + // A suffix for alpha, beta or rc release, e.g., "alpha-1", "rc2". It should + // be empty for mainline stable releases. + optional string suffix = 4; +} + +// An encoded CodeGeneratorRequest is written to the plugin's stdin. +message CodeGeneratorRequest { + // The .proto files that were explicitly listed on the command-line. The + // code generator should generate code only for these files. Each file's + // descriptor will be included in proto_file, below. + repeated string file_to_generate = 1; + + // The generator parameter passed on the command-line. + optional string parameter = 2; + + // FileDescriptorProtos for all files in files_to_generate and everything + // they import. The files will appear in topological order, so each file + // appears before any file that imports it. + // + // protoc guarantees that all proto_files will be written after + // the fields above, even though this is not technically guaranteed by the + // protobuf wire format. This theoretically could allow a plugin to stream + // in the FileDescriptorProtos and handle them one by one rather than read + // the entire set into memory at once. However, as of this writing, this + // is not similarly optimized on protoc's end -- it will store all fields in + // memory at once before sending them to the plugin. + // + // Type names of fields and extensions in the FileDescriptorProto are always + // fully qualified. + repeated FileDescriptorProto proto_file = 15; + + // The version number of protocol compiler. + optional Version compiler_version = 3; +} + +// The plugin writes an encoded CodeGeneratorResponse to stdout. +message CodeGeneratorResponse { + // Error message. If non-empty, code generation failed. The plugin process + // should exit with status code zero even if it reports an error in this way. + // + // This should be used to indicate errors in .proto files which prevent the + // code generator from generating correct code. Errors which indicate a + // problem in protoc itself -- such as the input CodeGeneratorRequest being + // unparseable -- should be reported by writing a message to stderr and + // exiting with a non-zero status code. + optional string error = 1; + + // A bitmask of supported features that the code generator supports. + // This is a bitwise "or" of values from the Feature enum. + optional uint64 supported_features = 2; + + // Sync with code_generator.h. + enum Feature { + FEATURE_NONE = 0; + FEATURE_PROTO3_OPTIONAL = 1; + } + + // Represents a single generated file. + message File { + // The file name, relative to the output directory. The name must not + // contain "." or ".." components and must be relative, not be absolute (so, + // the file cannot lie outside the output directory). "/" must be used as + // the path separator, not "\". + // + // If the name is omitted, the content will be appended to the previous + // file. This allows the generator to break large files into small chunks, + // and allows the generated text to be streamed back to protoc so that large + // files need not reside completely in memory at one time. Note that as of + // this writing protoc does not optimize for this -- it will read the entire + // CodeGeneratorResponse before writing files to disk. + optional string name = 1; + + // If non-empty, indicates that the named file should already exist, and the + // content here is to be inserted into that file at a defined insertion + // point. This feature allows a code generator to extend the output + // produced by another code generator. The original generator may provide + // insertion points by placing special annotations in the file that look + // like: + // @@protoc_insertion_point(NAME) + // The annotation can have arbitrary text before and after it on the line, + // which allows it to be placed in a comment. NAME should be replaced with + // an identifier naming the point -- this is what other generators will use + // as the insertion_point. Code inserted at this point will be placed + // immediately above the line containing the insertion point (thus multiple + // insertions to the same point will come out in the order they were added). + // The double-@ is intended to make it unlikely that the generated code + // could contain things that look like insertion points by accident. + // + // For example, the C++ code generator places the following line in the + // .pb.h files that it generates: + // // @@protoc_insertion_point(namespace_scope) + // This line appears within the scope of the file's package namespace, but + // outside of any particular class. Another plugin can then specify the + // insertion_point "namespace_scope" to generate additional classes or + // other declarations that should be placed in this scope. + // + // Note that if the line containing the insertion point begins with + // whitespace, the same whitespace will be added to every line of the + // inserted text. This is useful for languages like Python, where + // indentation matters. In these languages, the insertion point comment + // should be indented the same amount as any inserted code will need to be + // in order to work correctly in that context. + // + // The code generator that generates the initial file and the one which + // inserts into it must both run as part of a single invocation of protoc. + // Code generators are executed in the order in which they appear on the + // command line. + // + // If |insertion_point| is present, |name| must also be present. + optional string insertion_point = 2; + + // The file contents. + optional string content = 15; + + // Information describing the file content being inserted. If an insertion + // point is used, this information will be appropriately offset and inserted + // into the code generation metadata for the generated files. + optional GeneratedCodeInfo generated_code_info = 16; + } + repeated File file = 15; +} diff --git a/packages/corks/proto/google/protobuf/timestamp.proto b/packages/corks/proto/google/protobuf/timestamp.proto new file mode 100644 index 00000000..354c5be3 --- /dev/null +++ b/packages/corks/proto/google/protobuf/timestamp.proto @@ -0,0 +1,144 @@ +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto3"; + +package google.protobuf; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Protobuf.WellKnownTypes"; +option go_package = "google.golang.org/protobuf/types/known/timestamppb"; +option java_multiple_files = true; +option java_outer_classname = "TimestampProto"; +option java_package = "com.google.protobuf"; +option objc_class_prefix = "GPB"; + +// 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. +// +message Timestamp { + // 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. + int64 seconds = 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. + int32 nanos = 2; +} diff --git a/packages/corks/pubspec.yaml b/packages/corks/pubspec.yaml new file mode 100644 index 00000000..2c3c6f06 --- /dev/null +++ b/packages/corks/pubspec.yaml @@ -0,0 +1,17 @@ +name: corks +description: An embedded authorization token format, based off Google's macaroons. +version: 0.1.0 + +environment: + sdk: ^3.3.0 + +dependencies: + cedar: ^0.1.0 + crypto: ^3.0.3 + fixnum: ^1.1.0 + meta: ^1.10.0 + protobuf: ^3.1.0 + +dev_dependencies: + lints: ^3.0.0 + test: ^1.24.0 diff --git a/packages/corks/test/cork_test.dart b/packages/corks/test/cork_test.dart new file mode 100644 index 00000000..0d289274 --- /dev/null +++ b/packages/corks/test/cork_test.dart @@ -0,0 +1,67 @@ +import 'dart:convert'; +import 'dart:math'; +import 'dart:typed_data'; + +import 'package:cedar/cedar.dart'; +import 'package:corks/corks.dart'; +import 'package:test/test.dart'; + +final random = Random.secure(); +Uint8List get secretKey { + const size = 32; + final key = Uint8List(size); + for (var i = 0; i < size; i++) { + key[i] = random.nextInt(256); + } + return key; +} + +extension on String { + Uint8List get bytes => Uint8List.fromList(codeUnits); +} + +void main() { + group('Cork', () { + group('build and verify', () { + final aId = 'a'.bytes; + final aKey = secretKey; + final bId = 'b'.bytes; + final bKey = secretKey; + + test('no bearer/id', () async { + final cork = await Cork.builder().build(Signer(aId, aKey)); + expect(await cork.verify(Signer(aId, aKey)), isTrue); + expect(await cork.verify(Signer(bId, bKey)), isFalse); + }); + + test('with id', () async { + final cork = await Cork.builder( + id: utf8.encode(jsonEncode(CedarEntityId('User', 'alice'))), + ).build(Signer(aId, aKey)); + expect(await cork.verify(Signer(aId, aKey)), isTrue); + expect(await cork.verify(Signer(bId, bKey)), isFalse); + }); + + test('with bearer', () async { + final cork = await Cork.builder( + bearer: Bearer.entityId( + entityId: CedarEntityId('User', 'alice'), + ), + ).build(Signer(aId, aKey)); + expect(await cork.verify(Signer(aId, aKey)), isTrue); + expect(await cork.verify(Signer(bId, bKey)), isFalse); + }); + + test('with id and bearer', () async { + final cork = await Cork.builder( + id: utf8.encode(jsonEncode(CedarEntityId('User', 'alice'))), + bearer: Bearer.entityId( + entityId: CedarEntityId('User', 'alice'), + ), + ).build(Signer(aId, aKey)); + expect(await cork.verify(Signer(aId, aKey)), isTrue); + expect(await cork.verify(Signer(bId, bKey)), isFalse); + }); + }); + }); +}