diff --git a/.github/workflows/googleapis_firestore_v1.yaml b/.github/workflows/googleapis_firestore_v1.yaml index 36576496..8d98744f 100644 --- a/.github/workflows/googleapis_firestore_v1.yaml +++ b/.github/workflows/googleapis_firestore_v1.yaml @@ -38,7 +38,10 @@ jobs: - run: dart analyze --fatal-infos - - run: dart format --output=none --set-exit-if-changed . - if: ${{ matrix.sdk == 'stable' }} + # TODO(devoncarew): We should update protoc_plugin to generate formatted + # files. + # - run: dart format --output=none --set-exit-if-changed . + # if: ${{ matrix.sdk == 'stable' }} + # Enable once we have tests. # - run: dart test diff --git a/pkgs/googleapis_firestore_v1/.gitattributes b/pkgs/googleapis_firestore_v1/.gitattributes new file mode 100644 index 00000000..f9e5254d --- /dev/null +++ b/pkgs/googleapis_firestore_v1/.gitattributes @@ -0,0 +1,3 @@ +# Ignore generated protobuf files. +*.pb.dart linguist-generated=true +*.pbenum.dart linguist-generated=true diff --git a/pkgs/googleapis_firestore_v1/analysis_options.yaml b/pkgs/googleapis_firestore_v1/analysis_options.yaml index 572dd239..8df38276 100644 --- a/pkgs/googleapis_firestore_v1/analysis_options.yaml +++ b/pkgs/googleapis_firestore_v1/analysis_options.yaml @@ -1 +1,6 @@ include: package:lints/recommended.yaml + +analyzer: + errors: + # TODO: Remove once google/protobuf.dart/pull/1000 is published. + implementation_imports: ignore diff --git a/pkgs/googleapis_firestore_v1/lib/google/api/annotations.pb.dart b/pkgs/googleapis_firestore_v1/lib/google/api/annotations.pb.dart new file mode 100644 index 00000000..a0dfa9b4 --- /dev/null +++ b/pkgs/googleapis_firestore_v1/lib/google/api/annotations.pb.dart @@ -0,0 +1,29 @@ +// +// Generated code. Do not modify. +// source: google/api/annotations.proto +// +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:core' as $core; + +import 'package:protobuf/protobuf.dart' as $pb; + +import 'http.pb.dart' as $3; + +export 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions; + +class Annotations { + static final http = $pb.Extension<$3.HttpRule>(_omitMessageNames ? '' : 'google.protobuf.MethodOptions', _omitFieldNames ? '' : 'http', 72295728, $pb.PbFieldType.OM, defaultOrMaker: $3.HttpRule.getDefault, subBuilder: $3.HttpRule.create); + static void registerAllExtensions($pb.ExtensionRegistry registry) { + registry.add(http); + } +} + + +const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); +const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/pkgs/googleapis_firestore_v1/lib/google/api/annotations.pbenum.dart b/pkgs/googleapis_firestore_v1/lib/google/api/annotations.pbenum.dart new file mode 100644 index 00000000..ccf434ca --- /dev/null +++ b/pkgs/googleapis_firestore_v1/lib/google/api/annotations.pbenum.dart @@ -0,0 +1,11 @@ +// +// Generated code. Do not modify. +// source: google/api/annotations.proto +// +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + diff --git a/pkgs/googleapis_firestore_v1/lib/google/api/client.pb.dart b/pkgs/googleapis_firestore_v1/lib/google/api/client.pb.dart new file mode 100644 index 00000000..b042ed73 --- /dev/null +++ b/pkgs/googleapis_firestore_v1/lib/google/api/client.pb.dart @@ -0,0 +1,1406 @@ +// +// Generated code. Do not modify. +// source: google/api/client.proto +// +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:core' as $core; + +import 'package:protobuf/protobuf.dart' as $pb; + +import '../protobuf/duration.pb.dart' as $4; +import 'client.pbenum.dart'; +import 'launch_stage.pbenum.dart' as $5; + +export 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions; + +export 'client.pbenum.dart'; + +/// Required information for every language. +class CommonLanguageSettings extends $pb.GeneratedMessage { + factory CommonLanguageSettings({ + @$core.Deprecated('This field is deprecated.') + $core.String? referenceDocsUri, + $core.Iterable? destinations, + SelectiveGapicGeneration? selectiveGapicGeneration, + }) { + final $result = create(); + if (referenceDocsUri != null) { + // ignore: deprecated_member_use_from_same_package + $result.referenceDocsUri = referenceDocsUri; + } + if (destinations != null) { + $result.destinations.addAll(destinations); + } + if (selectiveGapicGeneration != null) { + $result.selectiveGapicGeneration = selectiveGapicGeneration; + } + return $result; + } + CommonLanguageSettings._() : super(); + factory CommonLanguageSettings.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory CommonLanguageSettings.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'CommonLanguageSettings', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.api'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'referenceDocsUri') + ..pc(2, _omitFieldNames ? '' : 'destinations', $pb.PbFieldType.KE, valueOf: ClientLibraryDestination.valueOf, enumValues: ClientLibraryDestination.values, defaultEnumValue: ClientLibraryDestination.CLIENT_LIBRARY_DESTINATION_UNSPECIFIED) + ..aOM(3, _omitFieldNames ? '' : 'selectiveGapicGeneration', subBuilder: SelectiveGapicGeneration.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + CommonLanguageSettings clone() => CommonLanguageSettings()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + CommonLanguageSettings copyWith(void Function(CommonLanguageSettings) updates) => super.copyWith((message) => updates(message as CommonLanguageSettings)) as CommonLanguageSettings; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static CommonLanguageSettings create() => CommonLanguageSettings._(); + CommonLanguageSettings createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static CommonLanguageSettings getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static CommonLanguageSettings? _defaultInstance; + + /// Link to automatically generated reference documentation. Example: + /// https://cloud.google.com/nodejs/docs/reference/asset/latest + @$core.Deprecated('This field is deprecated.') + @$pb.TagNumber(1) + $core.String get referenceDocsUri => $_getSZ(0); + @$core.Deprecated('This field is deprecated.') + @$pb.TagNumber(1) + set referenceDocsUri($core.String v) { $_setString(0, v); } + @$core.Deprecated('This field is deprecated.') + @$pb.TagNumber(1) + $core.bool hasReferenceDocsUri() => $_has(0); + @$core.Deprecated('This field is deprecated.') + @$pb.TagNumber(1) + void clearReferenceDocsUri() => $_clearField(1); + + /// The destination where API teams want this client library to be published. + @$pb.TagNumber(2) + $pb.PbList get destinations => $_getList(1); + + /// Configuration for which RPCs should be generated in the GAPIC client. + @$pb.TagNumber(3) + SelectiveGapicGeneration get selectiveGapicGeneration => $_getN(2); + @$pb.TagNumber(3) + set selectiveGapicGeneration(SelectiveGapicGeneration v) { $_setField(3, v); } + @$pb.TagNumber(3) + $core.bool hasSelectiveGapicGeneration() => $_has(2); + @$pb.TagNumber(3) + void clearSelectiveGapicGeneration() => $_clearField(3); + @$pb.TagNumber(3) + SelectiveGapicGeneration ensureSelectiveGapicGeneration() => $_ensure(2); +} + +/// Details about how and where to publish client libraries. +class ClientLibrarySettings extends $pb.GeneratedMessage { + factory ClientLibrarySettings({ + $core.String? version, + $5.LaunchStage? launchStage, + $core.bool? restNumericEnums, + JavaSettings? javaSettings, + CppSettings? cppSettings, + PhpSettings? phpSettings, + PythonSettings? pythonSettings, + NodeSettings? nodeSettings, + DotnetSettings? dotnetSettings, + RubySettings? rubySettings, + GoSettings? goSettings, + }) { + final $result = create(); + if (version != null) { + $result.version = version; + } + if (launchStage != null) { + $result.launchStage = launchStage; + } + if (restNumericEnums != null) { + $result.restNumericEnums = restNumericEnums; + } + if (javaSettings != null) { + $result.javaSettings = javaSettings; + } + if (cppSettings != null) { + $result.cppSettings = cppSettings; + } + if (phpSettings != null) { + $result.phpSettings = phpSettings; + } + if (pythonSettings != null) { + $result.pythonSettings = pythonSettings; + } + if (nodeSettings != null) { + $result.nodeSettings = nodeSettings; + } + if (dotnetSettings != null) { + $result.dotnetSettings = dotnetSettings; + } + if (rubySettings != null) { + $result.rubySettings = rubySettings; + } + if (goSettings != null) { + $result.goSettings = goSettings; + } + return $result; + } + ClientLibrarySettings._() : super(); + factory ClientLibrarySettings.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ClientLibrarySettings.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ClientLibrarySettings', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.api'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'version') + ..e<$5.LaunchStage>(2, _omitFieldNames ? '' : 'launchStage', $pb.PbFieldType.OE, defaultOrMaker: $5.LaunchStage.LAUNCH_STAGE_UNSPECIFIED, valueOf: $5.LaunchStage.valueOf, enumValues: $5.LaunchStage.values) + ..aOB(3, _omitFieldNames ? '' : 'restNumericEnums') + ..aOM(21, _omitFieldNames ? '' : 'javaSettings', subBuilder: JavaSettings.create) + ..aOM(22, _omitFieldNames ? '' : 'cppSettings', subBuilder: CppSettings.create) + ..aOM(23, _omitFieldNames ? '' : 'phpSettings', subBuilder: PhpSettings.create) + ..aOM(24, _omitFieldNames ? '' : 'pythonSettings', subBuilder: PythonSettings.create) + ..aOM(25, _omitFieldNames ? '' : 'nodeSettings', subBuilder: NodeSettings.create) + ..aOM(26, _omitFieldNames ? '' : 'dotnetSettings', subBuilder: DotnetSettings.create) + ..aOM(27, _omitFieldNames ? '' : 'rubySettings', subBuilder: RubySettings.create) + ..aOM(28, _omitFieldNames ? '' : 'goSettings', subBuilder: GoSettings.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ClientLibrarySettings clone() => ClientLibrarySettings()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ClientLibrarySettings copyWith(void Function(ClientLibrarySettings) updates) => super.copyWith((message) => updates(message as ClientLibrarySettings)) as ClientLibrarySettings; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static ClientLibrarySettings create() => ClientLibrarySettings._(); + ClientLibrarySettings createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static ClientLibrarySettings getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static ClientLibrarySettings? _defaultInstance; + + /// Version of the API to apply these settings to. This is the full protobuf + /// package for the API, ending in the version element. + /// Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + @$pb.TagNumber(1) + $core.String get version => $_getSZ(0); + @$pb.TagNumber(1) + set version($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasVersion() => $_has(0); + @$pb.TagNumber(1) + void clearVersion() => $_clearField(1); + + /// Launch stage of this version of the API. + @$pb.TagNumber(2) + $5.LaunchStage get launchStage => $_getN(1); + @$pb.TagNumber(2) + set launchStage($5.LaunchStage v) { $_setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasLaunchStage() => $_has(1); + @$pb.TagNumber(2) + void clearLaunchStage() => $_clearField(2); + + /// When using transport=rest, the client request will encode enums as + /// numbers rather than strings. + @$pb.TagNumber(3) + $core.bool get restNumericEnums => $_getBF(2); + @$pb.TagNumber(3) + set restNumericEnums($core.bool v) { $_setBool(2, v); } + @$pb.TagNumber(3) + $core.bool hasRestNumericEnums() => $_has(2); + @$pb.TagNumber(3) + void clearRestNumericEnums() => $_clearField(3); + + /// Settings for legacy Java features, supported in the Service YAML. + @$pb.TagNumber(21) + JavaSettings get javaSettings => $_getN(3); + @$pb.TagNumber(21) + set javaSettings(JavaSettings v) { $_setField(21, v); } + @$pb.TagNumber(21) + $core.bool hasJavaSettings() => $_has(3); + @$pb.TagNumber(21) + void clearJavaSettings() => $_clearField(21); + @$pb.TagNumber(21) + JavaSettings ensureJavaSettings() => $_ensure(3); + + /// Settings for C++ client libraries. + @$pb.TagNumber(22) + CppSettings get cppSettings => $_getN(4); + @$pb.TagNumber(22) + set cppSettings(CppSettings v) { $_setField(22, v); } + @$pb.TagNumber(22) + $core.bool hasCppSettings() => $_has(4); + @$pb.TagNumber(22) + void clearCppSettings() => $_clearField(22); + @$pb.TagNumber(22) + CppSettings ensureCppSettings() => $_ensure(4); + + /// Settings for PHP client libraries. + @$pb.TagNumber(23) + PhpSettings get phpSettings => $_getN(5); + @$pb.TagNumber(23) + set phpSettings(PhpSettings v) { $_setField(23, v); } + @$pb.TagNumber(23) + $core.bool hasPhpSettings() => $_has(5); + @$pb.TagNumber(23) + void clearPhpSettings() => $_clearField(23); + @$pb.TagNumber(23) + PhpSettings ensurePhpSettings() => $_ensure(5); + + /// Settings for Python client libraries. + @$pb.TagNumber(24) + PythonSettings get pythonSettings => $_getN(6); + @$pb.TagNumber(24) + set pythonSettings(PythonSettings v) { $_setField(24, v); } + @$pb.TagNumber(24) + $core.bool hasPythonSettings() => $_has(6); + @$pb.TagNumber(24) + void clearPythonSettings() => $_clearField(24); + @$pb.TagNumber(24) + PythonSettings ensurePythonSettings() => $_ensure(6); + + /// Settings for Node client libraries. + @$pb.TagNumber(25) + NodeSettings get nodeSettings => $_getN(7); + @$pb.TagNumber(25) + set nodeSettings(NodeSettings v) { $_setField(25, v); } + @$pb.TagNumber(25) + $core.bool hasNodeSettings() => $_has(7); + @$pb.TagNumber(25) + void clearNodeSettings() => $_clearField(25); + @$pb.TagNumber(25) + NodeSettings ensureNodeSettings() => $_ensure(7); + + /// Settings for .NET client libraries. + @$pb.TagNumber(26) + DotnetSettings get dotnetSettings => $_getN(8); + @$pb.TagNumber(26) + set dotnetSettings(DotnetSettings v) { $_setField(26, v); } + @$pb.TagNumber(26) + $core.bool hasDotnetSettings() => $_has(8); + @$pb.TagNumber(26) + void clearDotnetSettings() => $_clearField(26); + @$pb.TagNumber(26) + DotnetSettings ensureDotnetSettings() => $_ensure(8); + + /// Settings for Ruby client libraries. + @$pb.TagNumber(27) + RubySettings get rubySettings => $_getN(9); + @$pb.TagNumber(27) + set rubySettings(RubySettings v) { $_setField(27, v); } + @$pb.TagNumber(27) + $core.bool hasRubySettings() => $_has(9); + @$pb.TagNumber(27) + void clearRubySettings() => $_clearField(27); + @$pb.TagNumber(27) + RubySettings ensureRubySettings() => $_ensure(9); + + /// Settings for Go client libraries. + @$pb.TagNumber(28) + GoSettings get goSettings => $_getN(10); + @$pb.TagNumber(28) + set goSettings(GoSettings v) { $_setField(28, v); } + @$pb.TagNumber(28) + $core.bool hasGoSettings() => $_has(10); + @$pb.TagNumber(28) + void clearGoSettings() => $_clearField(28); + @$pb.TagNumber(28) + GoSettings ensureGoSettings() => $_ensure(10); +} + +/// This message configures the settings for publishing [Google Cloud Client +/// libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) +/// generated from the service config. +class Publishing extends $pb.GeneratedMessage { + factory Publishing({ + $core.Iterable? methodSettings, + $core.String? newIssueUri, + $core.String? documentationUri, + $core.String? apiShortName, + $core.String? githubLabel, + $core.Iterable<$core.String>? codeownerGithubTeams, + $core.String? docTagPrefix, + ClientLibraryOrganization? organization, + $core.Iterable? librarySettings, + $core.String? protoReferenceDocumentationUri, + $core.String? restReferenceDocumentationUri, + }) { + final $result = create(); + if (methodSettings != null) { + $result.methodSettings.addAll(methodSettings); + } + if (newIssueUri != null) { + $result.newIssueUri = newIssueUri; + } + if (documentationUri != null) { + $result.documentationUri = documentationUri; + } + if (apiShortName != null) { + $result.apiShortName = apiShortName; + } + if (githubLabel != null) { + $result.githubLabel = githubLabel; + } + if (codeownerGithubTeams != null) { + $result.codeownerGithubTeams.addAll(codeownerGithubTeams); + } + if (docTagPrefix != null) { + $result.docTagPrefix = docTagPrefix; + } + if (organization != null) { + $result.organization = organization; + } + if (librarySettings != null) { + $result.librarySettings.addAll(librarySettings); + } + if (protoReferenceDocumentationUri != null) { + $result.protoReferenceDocumentationUri = protoReferenceDocumentationUri; + } + if (restReferenceDocumentationUri != null) { + $result.restReferenceDocumentationUri = restReferenceDocumentationUri; + } + return $result; + } + Publishing._() : super(); + factory Publishing.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory Publishing.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Publishing', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.api'), createEmptyInstance: create) + ..pc(2, _omitFieldNames ? '' : 'methodSettings', $pb.PbFieldType.PM, subBuilder: MethodSettings.create) + ..aOS(101, _omitFieldNames ? '' : 'newIssueUri') + ..aOS(102, _omitFieldNames ? '' : 'documentationUri') + ..aOS(103, _omitFieldNames ? '' : 'apiShortName') + ..aOS(104, _omitFieldNames ? '' : 'githubLabel') + ..pPS(105, _omitFieldNames ? '' : 'codeownerGithubTeams') + ..aOS(106, _omitFieldNames ? '' : 'docTagPrefix') + ..e(107, _omitFieldNames ? '' : 'organization', $pb.PbFieldType.OE, defaultOrMaker: ClientLibraryOrganization.CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED, valueOf: ClientLibraryOrganization.valueOf, enumValues: ClientLibraryOrganization.values) + ..pc(109, _omitFieldNames ? '' : 'librarySettings', $pb.PbFieldType.PM, subBuilder: ClientLibrarySettings.create) + ..aOS(110, _omitFieldNames ? '' : 'protoReferenceDocumentationUri') + ..aOS(111, _omitFieldNames ? '' : 'restReferenceDocumentationUri') + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Publishing clone() => Publishing()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Publishing copyWith(void Function(Publishing) updates) => super.copyWith((message) => updates(message as Publishing)) as Publishing; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static Publishing create() => Publishing._(); + Publishing createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static Publishing getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static Publishing? _defaultInstance; + + /// A list of API method settings, e.g. the behavior for methods that use the + /// long-running operation pattern. + @$pb.TagNumber(2) + $pb.PbList get methodSettings => $_getList(0); + + /// Link to a *public* URI where users can report issues. Example: + /// https://issuetracker.google.com/issues/new?component=190865&template=1161103 + @$pb.TagNumber(101) + $core.String get newIssueUri => $_getSZ(1); + @$pb.TagNumber(101) + set newIssueUri($core.String v) { $_setString(1, v); } + @$pb.TagNumber(101) + $core.bool hasNewIssueUri() => $_has(1); + @$pb.TagNumber(101) + void clearNewIssueUri() => $_clearField(101); + + /// Link to product home page. Example: + /// https://cloud.google.com/asset-inventory/docs/overview + @$pb.TagNumber(102) + $core.String get documentationUri => $_getSZ(2); + @$pb.TagNumber(102) + set documentationUri($core.String v) { $_setString(2, v); } + @$pb.TagNumber(102) + $core.bool hasDocumentationUri() => $_has(2); + @$pb.TagNumber(102) + void clearDocumentationUri() => $_clearField(102); + + /// Used as a tracking tag when collecting data about the APIs developer + /// relations artifacts like docs, packages delivered to package managers, + /// etc. Example: "speech". + @$pb.TagNumber(103) + $core.String get apiShortName => $_getSZ(3); + @$pb.TagNumber(103) + set apiShortName($core.String v) { $_setString(3, v); } + @$pb.TagNumber(103) + $core.bool hasApiShortName() => $_has(3); + @$pb.TagNumber(103) + void clearApiShortName() => $_clearField(103); + + /// GitHub label to apply to issues and pull requests opened for this API. + @$pb.TagNumber(104) + $core.String get githubLabel => $_getSZ(4); + @$pb.TagNumber(104) + set githubLabel($core.String v) { $_setString(4, v); } + @$pb.TagNumber(104) + $core.bool hasGithubLabel() => $_has(4); + @$pb.TagNumber(104) + void clearGithubLabel() => $_clearField(104); + + /// GitHub teams to be added to CODEOWNERS in the directory in GitHub + /// containing source code for the client libraries for this API. + @$pb.TagNumber(105) + $pb.PbList<$core.String> get codeownerGithubTeams => $_getList(5); + + /// A prefix used in sample code when demarking regions to be included in + /// documentation. + @$pb.TagNumber(106) + $core.String get docTagPrefix => $_getSZ(6); + @$pb.TagNumber(106) + set docTagPrefix($core.String v) { $_setString(6, v); } + @$pb.TagNumber(106) + $core.bool hasDocTagPrefix() => $_has(6); + @$pb.TagNumber(106) + void clearDocTagPrefix() => $_clearField(106); + + /// For whom the client library is being published. + @$pb.TagNumber(107) + ClientLibraryOrganization get organization => $_getN(7); + @$pb.TagNumber(107) + set organization(ClientLibraryOrganization v) { $_setField(107, v); } + @$pb.TagNumber(107) + $core.bool hasOrganization() => $_has(7); + @$pb.TagNumber(107) + void clearOrganization() => $_clearField(107); + + /// Client library settings. If the same version string appears multiple + /// times in this list, then the last one wins. Settings from earlier + /// settings with the same version string are discarded. + @$pb.TagNumber(109) + $pb.PbList get librarySettings => $_getList(8); + + /// Optional link to proto reference documentation. Example: + /// https://cloud.google.com/pubsub/lite/docs/reference/rpc + @$pb.TagNumber(110) + $core.String get protoReferenceDocumentationUri => $_getSZ(9); + @$pb.TagNumber(110) + set protoReferenceDocumentationUri($core.String v) { $_setString(9, v); } + @$pb.TagNumber(110) + $core.bool hasProtoReferenceDocumentationUri() => $_has(9); + @$pb.TagNumber(110) + void clearProtoReferenceDocumentationUri() => $_clearField(110); + + /// Optional link to REST reference documentation. Example: + /// https://cloud.google.com/pubsub/lite/docs/reference/rest + @$pb.TagNumber(111) + $core.String get restReferenceDocumentationUri => $_getSZ(10); + @$pb.TagNumber(111) + set restReferenceDocumentationUri($core.String v) { $_setString(10, v); } + @$pb.TagNumber(111) + $core.bool hasRestReferenceDocumentationUri() => $_has(10); + @$pb.TagNumber(111) + void clearRestReferenceDocumentationUri() => $_clearField(111); +} + +/// Settings for Java client libraries. +class JavaSettings extends $pb.GeneratedMessage { + factory JavaSettings({ + $core.String? libraryPackage, + $core.Iterable<$core.MapEntry<$core.String, $core.String>>? serviceClassNames, + CommonLanguageSettings? common, + }) { + final $result = create(); + if (libraryPackage != null) { + $result.libraryPackage = libraryPackage; + } + if (serviceClassNames != null) { + $result.serviceClassNames.addEntries(serviceClassNames); + } + if (common != null) { + $result.common = common; + } + return $result; + } + JavaSettings._() : super(); + factory JavaSettings.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory JavaSettings.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'JavaSettings', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.api'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'libraryPackage') + ..m<$core.String, $core.String>(2, _omitFieldNames ? '' : 'serviceClassNames', entryClassName: 'JavaSettings.ServiceClassNamesEntry', keyFieldType: $pb.PbFieldType.OS, valueFieldType: $pb.PbFieldType.OS, packageName: const $pb.PackageName('google.api')) + ..aOM(3, _omitFieldNames ? '' : 'common', subBuilder: CommonLanguageSettings.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + JavaSettings clone() => JavaSettings()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + JavaSettings copyWith(void Function(JavaSettings) updates) => super.copyWith((message) => updates(message as JavaSettings)) as JavaSettings; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static JavaSettings create() => JavaSettings._(); + JavaSettings createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static JavaSettings getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static JavaSettings? _defaultInstance; + + /// The package name to use in Java. Clobbers the java_package option + /// set in the protobuf. This should be used **only** by APIs + /// who have already set the language_settings.java.package_name" field + /// in gapic.yaml. API teams should use the protobuf java_package option + /// where possible. + /// + /// Example of a YAML configuration:: + /// + /// publishing: + /// java_settings: + /// library_package: com.google.cloud.pubsub.v1 + @$pb.TagNumber(1) + $core.String get libraryPackage => $_getSZ(0); + @$pb.TagNumber(1) + set libraryPackage($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasLibraryPackage() => $_has(0); + @$pb.TagNumber(1) + void clearLibraryPackage() => $_clearField(1); + + /// Configure the Java class name to use instead of the service's for its + /// corresponding generated GAPIC client. Keys are fully-qualified + /// service names as they appear in the protobuf (including the full + /// the language_settings.java.interface_names" field in gapic.yaml. API + /// teams should otherwise use the service name as it appears in the + /// protobuf. + /// + /// Example of a YAML configuration:: + /// + /// publishing: + /// java_settings: + /// service_class_names: + /// - google.pubsub.v1.Publisher: TopicAdmin + /// - google.pubsub.v1.Subscriber: SubscriptionAdmin + @$pb.TagNumber(2) + $pb.PbMap<$core.String, $core.String> get serviceClassNames => $_getMap(1); + + /// Some settings. + @$pb.TagNumber(3) + CommonLanguageSettings get common => $_getN(2); + @$pb.TagNumber(3) + set common(CommonLanguageSettings v) { $_setField(3, v); } + @$pb.TagNumber(3) + $core.bool hasCommon() => $_has(2); + @$pb.TagNumber(3) + void clearCommon() => $_clearField(3); + @$pb.TagNumber(3) + CommonLanguageSettings ensureCommon() => $_ensure(2); +} + +/// Settings for C++ client libraries. +class CppSettings extends $pb.GeneratedMessage { + factory CppSettings({ + CommonLanguageSettings? common, + }) { + final $result = create(); + if (common != null) { + $result.common = common; + } + return $result; + } + CppSettings._() : super(); + factory CppSettings.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory CppSettings.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'CppSettings', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.api'), createEmptyInstance: create) + ..aOM(1, _omitFieldNames ? '' : 'common', subBuilder: CommonLanguageSettings.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + CppSettings clone() => CppSettings()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + CppSettings copyWith(void Function(CppSettings) updates) => super.copyWith((message) => updates(message as CppSettings)) as CppSettings; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static CppSettings create() => CppSettings._(); + CppSettings createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static CppSettings getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static CppSettings? _defaultInstance; + + /// Some settings. + @$pb.TagNumber(1) + CommonLanguageSettings get common => $_getN(0); + @$pb.TagNumber(1) + set common(CommonLanguageSettings v) { $_setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasCommon() => $_has(0); + @$pb.TagNumber(1) + void clearCommon() => $_clearField(1); + @$pb.TagNumber(1) + CommonLanguageSettings ensureCommon() => $_ensure(0); +} + +/// Settings for Php client libraries. +class PhpSettings extends $pb.GeneratedMessage { + factory PhpSettings({ + CommonLanguageSettings? common, + }) { + final $result = create(); + if (common != null) { + $result.common = common; + } + return $result; + } + PhpSettings._() : super(); + factory PhpSettings.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory PhpSettings.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'PhpSettings', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.api'), createEmptyInstance: create) + ..aOM(1, _omitFieldNames ? '' : 'common', subBuilder: CommonLanguageSettings.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + PhpSettings clone() => PhpSettings()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + PhpSettings copyWith(void Function(PhpSettings) updates) => super.copyWith((message) => updates(message as PhpSettings)) as PhpSettings; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static PhpSettings create() => PhpSettings._(); + PhpSettings createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static PhpSettings getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static PhpSettings? _defaultInstance; + + /// Some settings. + @$pb.TagNumber(1) + CommonLanguageSettings get common => $_getN(0); + @$pb.TagNumber(1) + set common(CommonLanguageSettings v) { $_setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasCommon() => $_has(0); + @$pb.TagNumber(1) + void clearCommon() => $_clearField(1); + @$pb.TagNumber(1) + CommonLanguageSettings ensureCommon() => $_ensure(0); +} + +/// Experimental features to be included during client library generation. +/// These fields will be deprecated once the feature graduates and is enabled +/// by default. +class PythonSettings_ExperimentalFeatures extends $pb.GeneratedMessage { + factory PythonSettings_ExperimentalFeatures({ + $core.bool? restAsyncIoEnabled, + $core.bool? protobufPythonicTypesEnabled, + $core.bool? unversionedPackageDisabled, + }) { + final $result = create(); + if (restAsyncIoEnabled != null) { + $result.restAsyncIoEnabled = restAsyncIoEnabled; + } + if (protobufPythonicTypesEnabled != null) { + $result.protobufPythonicTypesEnabled = protobufPythonicTypesEnabled; + } + if (unversionedPackageDisabled != null) { + $result.unversionedPackageDisabled = unversionedPackageDisabled; + } + return $result; + } + PythonSettings_ExperimentalFeatures._() : super(); + factory PythonSettings_ExperimentalFeatures.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory PythonSettings_ExperimentalFeatures.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'PythonSettings.ExperimentalFeatures', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.api'), createEmptyInstance: create) + ..aOB(1, _omitFieldNames ? '' : 'restAsyncIoEnabled') + ..aOB(2, _omitFieldNames ? '' : 'protobufPythonicTypesEnabled') + ..aOB(3, _omitFieldNames ? '' : 'unversionedPackageDisabled') + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + PythonSettings_ExperimentalFeatures clone() => PythonSettings_ExperimentalFeatures()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + PythonSettings_ExperimentalFeatures copyWith(void Function(PythonSettings_ExperimentalFeatures) updates) => super.copyWith((message) => updates(message as PythonSettings_ExperimentalFeatures)) as PythonSettings_ExperimentalFeatures; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static PythonSettings_ExperimentalFeatures create() => PythonSettings_ExperimentalFeatures._(); + PythonSettings_ExperimentalFeatures createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static PythonSettings_ExperimentalFeatures getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static PythonSettings_ExperimentalFeatures? _defaultInstance; + + /// Enables generation of asynchronous REST clients if `rest` transport is + /// enabled. By default, asynchronous REST clients will not be generated. + /// This feature will be enabled by default 1 month after launching the + /// feature in preview packages. + @$pb.TagNumber(1) + $core.bool get restAsyncIoEnabled => $_getBF(0); + @$pb.TagNumber(1) + set restAsyncIoEnabled($core.bool v) { $_setBool(0, v); } + @$pb.TagNumber(1) + $core.bool hasRestAsyncIoEnabled() => $_has(0); + @$pb.TagNumber(1) + void clearRestAsyncIoEnabled() => $_clearField(1); + + /// Enables generation of protobuf code using new types that are more + /// Pythonic which are included in `protobuf>=5.29.x`. This feature will be + /// enabled by default 1 month after launching the feature in preview + /// packages. + @$pb.TagNumber(2) + $core.bool get protobufPythonicTypesEnabled => $_getBF(1); + @$pb.TagNumber(2) + set protobufPythonicTypesEnabled($core.bool v) { $_setBool(1, v); } + @$pb.TagNumber(2) + $core.bool hasProtobufPythonicTypesEnabled() => $_has(1); + @$pb.TagNumber(2) + void clearProtobufPythonicTypesEnabled() => $_clearField(2); + + /// Disables generation of an unversioned Python package for this client + /// library. This means that the module names will need to be versioned in + /// import statements. For example `import google.cloud.library_v2` instead + /// of `import google.cloud.library`. + @$pb.TagNumber(3) + $core.bool get unversionedPackageDisabled => $_getBF(2); + @$pb.TagNumber(3) + set unversionedPackageDisabled($core.bool v) { $_setBool(2, v); } + @$pb.TagNumber(3) + $core.bool hasUnversionedPackageDisabled() => $_has(2); + @$pb.TagNumber(3) + void clearUnversionedPackageDisabled() => $_clearField(3); +} + +/// Settings for Python client libraries. +class PythonSettings extends $pb.GeneratedMessage { + factory PythonSettings({ + CommonLanguageSettings? common, + PythonSettings_ExperimentalFeatures? experimentalFeatures, + }) { + final $result = create(); + if (common != null) { + $result.common = common; + } + if (experimentalFeatures != null) { + $result.experimentalFeatures = experimentalFeatures; + } + return $result; + } + PythonSettings._() : super(); + factory PythonSettings.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory PythonSettings.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'PythonSettings', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.api'), createEmptyInstance: create) + ..aOM(1, _omitFieldNames ? '' : 'common', subBuilder: CommonLanguageSettings.create) + ..aOM(2, _omitFieldNames ? '' : 'experimentalFeatures', subBuilder: PythonSettings_ExperimentalFeatures.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + PythonSettings clone() => PythonSettings()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + PythonSettings copyWith(void Function(PythonSettings) updates) => super.copyWith((message) => updates(message as PythonSettings)) as PythonSettings; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static PythonSettings create() => PythonSettings._(); + PythonSettings createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static PythonSettings getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static PythonSettings? _defaultInstance; + + /// Some settings. + @$pb.TagNumber(1) + CommonLanguageSettings get common => $_getN(0); + @$pb.TagNumber(1) + set common(CommonLanguageSettings v) { $_setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasCommon() => $_has(0); + @$pb.TagNumber(1) + void clearCommon() => $_clearField(1); + @$pb.TagNumber(1) + CommonLanguageSettings ensureCommon() => $_ensure(0); + + /// Experimental features to be included during client library generation. + @$pb.TagNumber(2) + PythonSettings_ExperimentalFeatures get experimentalFeatures => $_getN(1); + @$pb.TagNumber(2) + set experimentalFeatures(PythonSettings_ExperimentalFeatures v) { $_setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasExperimentalFeatures() => $_has(1); + @$pb.TagNumber(2) + void clearExperimentalFeatures() => $_clearField(2); + @$pb.TagNumber(2) + PythonSettings_ExperimentalFeatures ensureExperimentalFeatures() => $_ensure(1); +} + +/// Settings for Node client libraries. +class NodeSettings extends $pb.GeneratedMessage { + factory NodeSettings({ + CommonLanguageSettings? common, + }) { + final $result = create(); + if (common != null) { + $result.common = common; + } + return $result; + } + NodeSettings._() : super(); + factory NodeSettings.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory NodeSettings.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'NodeSettings', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.api'), createEmptyInstance: create) + ..aOM(1, _omitFieldNames ? '' : 'common', subBuilder: CommonLanguageSettings.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + NodeSettings clone() => NodeSettings()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + NodeSettings copyWith(void Function(NodeSettings) updates) => super.copyWith((message) => updates(message as NodeSettings)) as NodeSettings; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static NodeSettings create() => NodeSettings._(); + NodeSettings createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static NodeSettings getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static NodeSettings? _defaultInstance; + + /// Some settings. + @$pb.TagNumber(1) + CommonLanguageSettings get common => $_getN(0); + @$pb.TagNumber(1) + set common(CommonLanguageSettings v) { $_setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasCommon() => $_has(0); + @$pb.TagNumber(1) + void clearCommon() => $_clearField(1); + @$pb.TagNumber(1) + CommonLanguageSettings ensureCommon() => $_ensure(0); +} + +/// Settings for Dotnet client libraries. +class DotnetSettings extends $pb.GeneratedMessage { + factory DotnetSettings({ + CommonLanguageSettings? common, + $core.Iterable<$core.MapEntry<$core.String, $core.String>>? renamedServices, + $core.Iterable<$core.MapEntry<$core.String, $core.String>>? renamedResources, + $core.Iterable<$core.String>? ignoredResources, + $core.Iterable<$core.String>? forcedNamespaceAliases, + $core.Iterable<$core.String>? handwrittenSignatures, + }) { + final $result = create(); + if (common != null) { + $result.common = common; + } + if (renamedServices != null) { + $result.renamedServices.addEntries(renamedServices); + } + if (renamedResources != null) { + $result.renamedResources.addEntries(renamedResources); + } + if (ignoredResources != null) { + $result.ignoredResources.addAll(ignoredResources); + } + if (forcedNamespaceAliases != null) { + $result.forcedNamespaceAliases.addAll(forcedNamespaceAliases); + } + if (handwrittenSignatures != null) { + $result.handwrittenSignatures.addAll(handwrittenSignatures); + } + return $result; + } + DotnetSettings._() : super(); + factory DotnetSettings.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory DotnetSettings.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'DotnetSettings', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.api'), createEmptyInstance: create) + ..aOM(1, _omitFieldNames ? '' : 'common', subBuilder: CommonLanguageSettings.create) + ..m<$core.String, $core.String>(2, _omitFieldNames ? '' : 'renamedServices', entryClassName: 'DotnetSettings.RenamedServicesEntry', keyFieldType: $pb.PbFieldType.OS, valueFieldType: $pb.PbFieldType.OS, packageName: const $pb.PackageName('google.api')) + ..m<$core.String, $core.String>(3, _omitFieldNames ? '' : 'renamedResources', entryClassName: 'DotnetSettings.RenamedResourcesEntry', keyFieldType: $pb.PbFieldType.OS, valueFieldType: $pb.PbFieldType.OS, packageName: const $pb.PackageName('google.api')) + ..pPS(4, _omitFieldNames ? '' : 'ignoredResources') + ..pPS(5, _omitFieldNames ? '' : 'forcedNamespaceAliases') + ..pPS(6, _omitFieldNames ? '' : 'handwrittenSignatures') + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + DotnetSettings clone() => DotnetSettings()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + DotnetSettings copyWith(void Function(DotnetSettings) updates) => super.copyWith((message) => updates(message as DotnetSettings)) as DotnetSettings; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static DotnetSettings create() => DotnetSettings._(); + DotnetSettings createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static DotnetSettings getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static DotnetSettings? _defaultInstance; + + /// Some settings. + @$pb.TagNumber(1) + CommonLanguageSettings get common => $_getN(0); + @$pb.TagNumber(1) + set common(CommonLanguageSettings v) { $_setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasCommon() => $_has(0); + @$pb.TagNumber(1) + void clearCommon() => $_clearField(1); + @$pb.TagNumber(1) + CommonLanguageSettings ensureCommon() => $_ensure(0); + + /// Map from original service names to renamed versions. + /// This is used when the default generated types + /// would cause a naming conflict. (Neither name is + /// fully-qualified.) + /// Example: Subscriber to SubscriberServiceApi. + @$pb.TagNumber(2) + $pb.PbMap<$core.String, $core.String> get renamedServices => $_getMap(1); + + /// Map from full resource types to the effective short name + /// for the resource. This is used when otherwise resource + /// named from different services would cause naming collisions. + /// Example entry: + /// "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + @$pb.TagNumber(3) + $pb.PbMap<$core.String, $core.String> get renamedResources => $_getMap(2); + + /// List of full resource types to ignore during generation. + /// This is typically used for API-specific Location resources, + /// which should be handled by the generator as if they were actually + /// the common Location resources. + /// Example entry: "documentai.googleapis.com/Location" + @$pb.TagNumber(4) + $pb.PbList<$core.String> get ignoredResources => $_getList(3); + + /// Namespaces which must be aliased in snippets due to + /// a known (but non-generator-predictable) naming collision + @$pb.TagNumber(5) + $pb.PbList<$core.String> get forcedNamespaceAliases => $_getList(4); + + /// Method signatures (in the form "service.method(signature)") + /// which are provided separately, so shouldn't be generated. + /// Snippets *calling* these methods are still generated, however. + @$pb.TagNumber(6) + $pb.PbList<$core.String> get handwrittenSignatures => $_getList(5); +} + +/// Settings for Ruby client libraries. +class RubySettings extends $pb.GeneratedMessage { + factory RubySettings({ + CommonLanguageSettings? common, + }) { + final $result = create(); + if (common != null) { + $result.common = common; + } + return $result; + } + RubySettings._() : super(); + factory RubySettings.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory RubySettings.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'RubySettings', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.api'), createEmptyInstance: create) + ..aOM(1, _omitFieldNames ? '' : 'common', subBuilder: CommonLanguageSettings.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + RubySettings clone() => RubySettings()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + RubySettings copyWith(void Function(RubySettings) updates) => super.copyWith((message) => updates(message as RubySettings)) as RubySettings; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static RubySettings create() => RubySettings._(); + RubySettings createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static RubySettings getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static RubySettings? _defaultInstance; + + /// Some settings. + @$pb.TagNumber(1) + CommonLanguageSettings get common => $_getN(0); + @$pb.TagNumber(1) + set common(CommonLanguageSettings v) { $_setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasCommon() => $_has(0); + @$pb.TagNumber(1) + void clearCommon() => $_clearField(1); + @$pb.TagNumber(1) + CommonLanguageSettings ensureCommon() => $_ensure(0); +} + +/// Settings for Go client libraries. +class GoSettings extends $pb.GeneratedMessage { + factory GoSettings({ + CommonLanguageSettings? common, + $core.Iterable<$core.MapEntry<$core.String, $core.String>>? renamedServices, + }) { + final $result = create(); + if (common != null) { + $result.common = common; + } + if (renamedServices != null) { + $result.renamedServices.addEntries(renamedServices); + } + return $result; + } + GoSettings._() : super(); + factory GoSettings.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GoSettings.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GoSettings', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.api'), createEmptyInstance: create) + ..aOM(1, _omitFieldNames ? '' : 'common', subBuilder: CommonLanguageSettings.create) + ..m<$core.String, $core.String>(2, _omitFieldNames ? '' : 'renamedServices', entryClassName: 'GoSettings.RenamedServicesEntry', keyFieldType: $pb.PbFieldType.OS, valueFieldType: $pb.PbFieldType.OS, packageName: const $pb.PackageName('google.api')) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + GoSettings clone() => GoSettings()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + GoSettings copyWith(void Function(GoSettings) updates) => super.copyWith((message) => updates(message as GoSettings)) as GoSettings; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static GoSettings create() => GoSettings._(); + GoSettings createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GoSettings getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GoSettings? _defaultInstance; + + /// Some settings. + @$pb.TagNumber(1) + CommonLanguageSettings get common => $_getN(0); + @$pb.TagNumber(1) + set common(CommonLanguageSettings v) { $_setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasCommon() => $_has(0); + @$pb.TagNumber(1) + void clearCommon() => $_clearField(1); + @$pb.TagNumber(1) + CommonLanguageSettings ensureCommon() => $_ensure(0); + + /// Map of service names to renamed services. Keys are the package relative + /// service names and values are the name to be used for the service client + /// and call options. + /// + /// publishing: + /// go_settings: + /// renamed_services: + /// Publisher: TopicAdmin + @$pb.TagNumber(2) + $pb.PbMap<$core.String, $core.String> get renamedServices => $_getMap(1); +} + +/// Describes settings to use when generating API methods that use the +/// long-running operation pattern. +/// All default values below are from those used in the client library +/// generators (e.g. +/// [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). +class MethodSettings_LongRunning extends $pb.GeneratedMessage { + factory MethodSettings_LongRunning({ + $4.Duration? initialPollDelay, + $core.double? pollDelayMultiplier, + $4.Duration? maxPollDelay, + $4.Duration? totalPollTimeout, + }) { + final $result = create(); + if (initialPollDelay != null) { + $result.initialPollDelay = initialPollDelay; + } + if (pollDelayMultiplier != null) { + $result.pollDelayMultiplier = pollDelayMultiplier; + } + if (maxPollDelay != null) { + $result.maxPollDelay = maxPollDelay; + } + if (totalPollTimeout != null) { + $result.totalPollTimeout = totalPollTimeout; + } + return $result; + } + MethodSettings_LongRunning._() : super(); + factory MethodSettings_LongRunning.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory MethodSettings_LongRunning.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'MethodSettings.LongRunning', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.api'), createEmptyInstance: create) + ..aOM<$4.Duration>(1, _omitFieldNames ? '' : 'initialPollDelay', subBuilder: $4.Duration.create) + ..a<$core.double>(2, _omitFieldNames ? '' : 'pollDelayMultiplier', $pb.PbFieldType.OF) + ..aOM<$4.Duration>(3, _omitFieldNames ? '' : 'maxPollDelay', subBuilder: $4.Duration.create) + ..aOM<$4.Duration>(4, _omitFieldNames ? '' : 'totalPollTimeout', subBuilder: $4.Duration.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + MethodSettings_LongRunning clone() => MethodSettings_LongRunning()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + MethodSettings_LongRunning copyWith(void Function(MethodSettings_LongRunning) updates) => super.copyWith((message) => updates(message as MethodSettings_LongRunning)) as MethodSettings_LongRunning; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static MethodSettings_LongRunning create() => MethodSettings_LongRunning._(); + MethodSettings_LongRunning createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static MethodSettings_LongRunning getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static MethodSettings_LongRunning? _defaultInstance; + + /// Initial delay after which the first poll request will be made. + /// Default value: 5 seconds. + @$pb.TagNumber(1) + $4.Duration get initialPollDelay => $_getN(0); + @$pb.TagNumber(1) + set initialPollDelay($4.Duration v) { $_setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasInitialPollDelay() => $_has(0); + @$pb.TagNumber(1) + void clearInitialPollDelay() => $_clearField(1); + @$pb.TagNumber(1) + $4.Duration ensureInitialPollDelay() => $_ensure(0); + + /// Multiplier to gradually increase delay between subsequent polls until it + /// reaches max_poll_delay. + /// Default value: 1.5. + @$pb.TagNumber(2) + $core.double get pollDelayMultiplier => $_getN(1); + @$pb.TagNumber(2) + set pollDelayMultiplier($core.double v) { $_setFloat(1, v); } + @$pb.TagNumber(2) + $core.bool hasPollDelayMultiplier() => $_has(1); + @$pb.TagNumber(2) + void clearPollDelayMultiplier() => $_clearField(2); + + /// Maximum time between two subsequent poll requests. + /// Default value: 45 seconds. + @$pb.TagNumber(3) + $4.Duration get maxPollDelay => $_getN(2); + @$pb.TagNumber(3) + set maxPollDelay($4.Duration v) { $_setField(3, v); } + @$pb.TagNumber(3) + $core.bool hasMaxPollDelay() => $_has(2); + @$pb.TagNumber(3) + void clearMaxPollDelay() => $_clearField(3); + @$pb.TagNumber(3) + $4.Duration ensureMaxPollDelay() => $_ensure(2); + + /// Total polling timeout. + /// Default value: 5 minutes. + @$pb.TagNumber(4) + $4.Duration get totalPollTimeout => $_getN(3); + @$pb.TagNumber(4) + set totalPollTimeout($4.Duration v) { $_setField(4, v); } + @$pb.TagNumber(4) + $core.bool hasTotalPollTimeout() => $_has(3); + @$pb.TagNumber(4) + void clearTotalPollTimeout() => $_clearField(4); + @$pb.TagNumber(4) + $4.Duration ensureTotalPollTimeout() => $_ensure(3); +} + +/// Describes the generator configuration for a method. +class MethodSettings extends $pb.GeneratedMessage { + factory MethodSettings({ + $core.String? selector, + MethodSettings_LongRunning? longRunning, + $core.Iterable<$core.String>? autoPopulatedFields, + }) { + final $result = create(); + if (selector != null) { + $result.selector = selector; + } + if (longRunning != null) { + $result.longRunning = longRunning; + } + if (autoPopulatedFields != null) { + $result.autoPopulatedFields.addAll(autoPopulatedFields); + } + return $result; + } + MethodSettings._() : super(); + factory MethodSettings.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory MethodSettings.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'MethodSettings', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.api'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'selector') + ..aOM(2, _omitFieldNames ? '' : 'longRunning', subBuilder: MethodSettings_LongRunning.create) + ..pPS(3, _omitFieldNames ? '' : 'autoPopulatedFields') + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + MethodSettings clone() => MethodSettings()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + MethodSettings copyWith(void Function(MethodSettings) updates) => super.copyWith((message) => updates(message as MethodSettings)) as MethodSettings; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static MethodSettings create() => MethodSettings._(); + MethodSettings createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static MethodSettings getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static MethodSettings? _defaultInstance; + + /// The fully qualified name of the method, for which the options below apply. + /// This is used to find the method to apply the options. + /// + /// Example: + /// + /// publishing: + /// method_settings: + /// - selector: google.storage.control.v2.StorageControl.CreateFolder + /// # method settings for CreateFolder... + @$pb.TagNumber(1) + $core.String get selector => $_getSZ(0); + @$pb.TagNumber(1) + set selector($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasSelector() => $_has(0); + @$pb.TagNumber(1) + void clearSelector() => $_clearField(1); + + /// Describes settings to use for long-running operations when generating + /// API methods for RPCs. Complements RPCs that use the annotations in + /// google/longrunning/operations.proto. + /// + /// Example of a YAML configuration:: + /// + /// publishing: + /// method_settings: + /// - selector: google.cloud.speech.v2.Speech.BatchRecognize + /// long_running: + /// initial_poll_delay: 60s # 1 minute + /// poll_delay_multiplier: 1.5 + /// max_poll_delay: 360s # 6 minutes + /// total_poll_timeout: 54000s # 90 minutes + @$pb.TagNumber(2) + MethodSettings_LongRunning get longRunning => $_getN(1); + @$pb.TagNumber(2) + set longRunning(MethodSettings_LongRunning v) { $_setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasLongRunning() => $_has(1); + @$pb.TagNumber(2) + void clearLongRunning() => $_clearField(2); + @$pb.TagNumber(2) + MethodSettings_LongRunning ensureLongRunning() => $_ensure(1); + + /// List of top-level fields of the request message, that should be + /// automatically populated by the client libraries based on their + /// (google.api.field_info).format. Currently supported format: UUID4. + /// + /// Example of a YAML configuration: + /// + /// publishing: + /// method_settings: + /// - selector: google.example.v1.ExampleService.CreateExample + /// auto_populated_fields: + /// - request_id + @$pb.TagNumber(3) + $pb.PbList<$core.String> get autoPopulatedFields => $_getList(2); +} + +/// This message is used to configure the generation of a subset of the RPCs in +/// a service for client libraries. +class SelectiveGapicGeneration extends $pb.GeneratedMessage { + factory SelectiveGapicGeneration({ + $core.Iterable<$core.String>? methods, + $core.bool? generateOmittedAsInternal, + }) { + final $result = create(); + if (methods != null) { + $result.methods.addAll(methods); + } + if (generateOmittedAsInternal != null) { + $result.generateOmittedAsInternal = generateOmittedAsInternal; + } + return $result; + } + SelectiveGapicGeneration._() : super(); + factory SelectiveGapicGeneration.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory SelectiveGapicGeneration.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'SelectiveGapicGeneration', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.api'), createEmptyInstance: create) + ..pPS(1, _omitFieldNames ? '' : 'methods') + ..aOB(2, _omitFieldNames ? '' : 'generateOmittedAsInternal') + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + SelectiveGapicGeneration clone() => SelectiveGapicGeneration()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + SelectiveGapicGeneration copyWith(void Function(SelectiveGapicGeneration) updates) => super.copyWith((message) => updates(message as SelectiveGapicGeneration)) as SelectiveGapicGeneration; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static SelectiveGapicGeneration create() => SelectiveGapicGeneration._(); + SelectiveGapicGeneration createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static SelectiveGapicGeneration getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static SelectiveGapicGeneration? _defaultInstance; + + /// An allowlist of the fully qualified names of RPCs that should be included + /// on public client surfaces. + @$pb.TagNumber(1) + $pb.PbList<$core.String> get methods => $_getList(0); + + /// Setting this to true indicates to the client generators that methods + /// that would be excluded from the generation should instead be generated + /// in a way that indicates these methods should not be consumed by + /// end users. How this is expressed is up to individual language + /// implementations to decide. Some examples may be: added annotations, + /// obfuscated identifiers, or other language idiomatic patterns. + @$pb.TagNumber(2) + $core.bool get generateOmittedAsInternal => $_getBF(1); + @$pb.TagNumber(2) + set generateOmittedAsInternal($core.bool v) { $_setBool(1, v); } + @$pb.TagNumber(2) + $core.bool hasGenerateOmittedAsInternal() => $_has(1); + @$pb.TagNumber(2) + void clearGenerateOmittedAsInternal() => $_clearField(2); +} + +class Client { + static final methodSignature = $pb.Extension<$core.String>.repeated(_omitMessageNames ? '' : 'google.protobuf.MethodOptions', _omitFieldNames ? '' : 'methodSignature', 1051, $pb.PbFieldType.PS, check: $pb.getCheckFunction($pb.PbFieldType.PS)); + static final defaultHost = $pb.Extension<$core.String>(_omitMessageNames ? '' : 'google.protobuf.ServiceOptions', _omitFieldNames ? '' : 'defaultHost', 1049, $pb.PbFieldType.OS); + static final oauthScopes = $pb.Extension<$core.String>(_omitMessageNames ? '' : 'google.protobuf.ServiceOptions', _omitFieldNames ? '' : 'oauthScopes', 1050, $pb.PbFieldType.OS); + static final apiVersion = $pb.Extension<$core.String>(_omitMessageNames ? '' : 'google.protobuf.ServiceOptions', _omitFieldNames ? '' : 'apiVersion', 525000001, $pb.PbFieldType.OS); + static void registerAllExtensions($pb.ExtensionRegistry registry) { + registry.add(methodSignature); + registry.add(defaultHost); + registry.add(oauthScopes); + registry.add(apiVersion); + } +} + + +const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); +const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/pkgs/googleapis_firestore_v1/lib/google/api/client.pbenum.dart b/pkgs/googleapis_firestore_v1/lib/google/api/client.pbenum.dart new file mode 100644 index 00000000..bdb0169c --- /dev/null +++ b/pkgs/googleapis_firestore_v1/lib/google/api/client.pbenum.dart @@ -0,0 +1,77 @@ +// +// Generated code. Do not modify. +// source: google/api/client.proto +// +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:core' as $core; + +import 'package:protobuf/protobuf.dart' as $pb; + +/// The organization for which the client libraries are being published. +/// Affects the url where generated docs are published, etc. +class ClientLibraryOrganization extends $pb.ProtobufEnum { + /// Not useful. + static const ClientLibraryOrganization CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = ClientLibraryOrganization._(0, _omitEnumNames ? '' : 'CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED'); + /// Google Cloud Platform Org. + static const ClientLibraryOrganization CLOUD = ClientLibraryOrganization._(1, _omitEnumNames ? '' : 'CLOUD'); + /// Ads (Advertising) Org. + static const ClientLibraryOrganization ADS = ClientLibraryOrganization._(2, _omitEnumNames ? '' : 'ADS'); + /// Photos Org. + static const ClientLibraryOrganization PHOTOS = ClientLibraryOrganization._(3, _omitEnumNames ? '' : 'PHOTOS'); + /// Street View Org. + static const ClientLibraryOrganization STREET_VIEW = ClientLibraryOrganization._(4, _omitEnumNames ? '' : 'STREET_VIEW'); + /// Shopping Org. + static const ClientLibraryOrganization SHOPPING = ClientLibraryOrganization._(5, _omitEnumNames ? '' : 'SHOPPING'); + /// Geo Org. + static const ClientLibraryOrganization GEO = ClientLibraryOrganization._(6, _omitEnumNames ? '' : 'GEO'); + /// Generative AI - https://developers.generativeai.google + static const ClientLibraryOrganization GENERATIVE_AI = ClientLibraryOrganization._(7, _omitEnumNames ? '' : 'GENERATIVE_AI'); + + static const $core.List values = [ + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED, + CLOUD, + ADS, + PHOTOS, + STREET_VIEW, + SHOPPING, + GEO, + GENERATIVE_AI, + ]; + + static final $core.List _byValue = $pb.ProtobufEnum.$_initByValueList(values, 7); + static ClientLibraryOrganization? valueOf($core.int value) => value < 0 || value >= _byValue.length ? null : _byValue[value]; + + const ClientLibraryOrganization._(super.v, super.n); +} + +/// To where should client libraries be published? +class ClientLibraryDestination extends $pb.ProtobufEnum { + /// Client libraries will neither be generated nor published to package + /// managers. + static const ClientLibraryDestination CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = ClientLibraryDestination._(0, _omitEnumNames ? '' : 'CLIENT_LIBRARY_DESTINATION_UNSPECIFIED'); + /// Generate the client library in a repo under github.com/googleapis, + /// but don't publish it to package managers. + static const ClientLibraryDestination GITHUB = ClientLibraryDestination._(10, _omitEnumNames ? '' : 'GITHUB'); + /// Publish the library to package managers like nuget.org and npmjs.com. + static const ClientLibraryDestination PACKAGE_MANAGER = ClientLibraryDestination._(20, _omitEnumNames ? '' : 'PACKAGE_MANAGER'); + + static const $core.List values = [ + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED, + GITHUB, + PACKAGE_MANAGER, + ]; + + static final $core.Map<$core.int, ClientLibraryDestination> _byValue = $pb.ProtobufEnum.initByValue(values); + static ClientLibraryDestination? valueOf($core.int value) => _byValue[value]; + + const ClientLibraryDestination._(super.v, super.n); +} + + +const _omitEnumNames = $core.bool.fromEnvironment('protobuf.omit_enum_names'); diff --git a/pkgs/googleapis_firestore_v1/lib/google/api/field_behavior.pb.dart b/pkgs/googleapis_firestore_v1/lib/google/api/field_behavior.pb.dart new file mode 100644 index 00000000..f84155b9 --- /dev/null +++ b/pkgs/googleapis_firestore_v1/lib/google/api/field_behavior.pb.dart @@ -0,0 +1,31 @@ +// +// Generated code. Do not modify. +// source: google/api/field_behavior.proto +// +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:core' as $core; + +import 'package:protobuf/protobuf.dart' as $pb; + +import 'field_behavior.pbenum.dart'; + +export 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions; + +export 'field_behavior.pbenum.dart'; + +class Field_behavior { + static final fieldBehavior = $pb.Extension.repeated(_omitMessageNames ? '' : 'google.protobuf.FieldOptions', _omitFieldNames ? '' : 'fieldBehavior', 1052, $pb.PbFieldType.PE, check: $pb.getCheckFunction($pb.PbFieldType.PE), valueOf: FieldBehavior.valueOf, enumValues: FieldBehavior.values); + static void registerAllExtensions($pb.ExtensionRegistry registry) { + registry.add(fieldBehavior); + } +} + + +const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); +const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/pkgs/googleapis_firestore_v1/lib/google/api/field_behavior.pbenum.dart b/pkgs/googleapis_firestore_v1/lib/google/api/field_behavior.pbenum.dart new file mode 100644 index 00000000..6e63bc36 --- /dev/null +++ b/pkgs/googleapis_firestore_v1/lib/google/api/field_behavior.pbenum.dart @@ -0,0 +1,89 @@ +// +// Generated code. Do not modify. +// source: google/api/field_behavior.proto +// +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:core' as $core; + +import 'package:protobuf/protobuf.dart' as $pb; + +/// An indicator of the behavior of a given field (for example, that a field +/// is required in requests, or given as output but ignored as input). +/// This **does not** change the behavior in protocol buffers itself; it only +/// denotes the behavior and may affect how API tooling handles the field. +/// +/// Note: This enum **may** receive new values in the future. +class FieldBehavior extends $pb.ProtobufEnum { + /// Conventional default for enums. Do not use this. + static const FieldBehavior FIELD_BEHAVIOR_UNSPECIFIED = FieldBehavior._(0, _omitEnumNames ? '' : 'FIELD_BEHAVIOR_UNSPECIFIED'); + /// Specifically denotes a field as optional. + /// While all fields in protocol buffers are optional, this may be specified + /// for emphasis if appropriate. + static const FieldBehavior OPTIONAL = FieldBehavior._(1, _omitEnumNames ? '' : 'OPTIONAL'); + /// Denotes a field as required. + /// This indicates that the field **must** be provided as part of the request, + /// and failure to do so will cause an error (usually `INVALID_ARGUMENT`). + static const FieldBehavior REQUIRED = FieldBehavior._(2, _omitEnumNames ? '' : 'REQUIRED'); + /// Denotes a field as output only. + /// This indicates that the field is provided in responses, but including the + /// field in a request does nothing (the server *must* ignore it and + /// *must not* throw an error as a result of the field's presence). + static const FieldBehavior OUTPUT_ONLY = FieldBehavior._(3, _omitEnumNames ? '' : 'OUTPUT_ONLY'); + /// Denotes a field as input only. + /// This indicates that the field is provided in requests, and the + /// corresponding field is not included in output. + static const FieldBehavior INPUT_ONLY = FieldBehavior._(4, _omitEnumNames ? '' : 'INPUT_ONLY'); + /// Denotes a field as immutable. + /// This indicates that the field may be set once in a request to create a + /// resource, but may not be changed thereafter. + static const FieldBehavior IMMUTABLE = FieldBehavior._(5, _omitEnumNames ? '' : 'IMMUTABLE'); + /// Denotes that a (repeated) field is an unordered list. + /// This indicates that the service may provide the elements of the list + /// in any arbitrary order, rather than the order the user originally + /// provided. Additionally, the list's order may or may not be stable. + static const FieldBehavior UNORDERED_LIST = FieldBehavior._(6, _omitEnumNames ? '' : 'UNORDERED_LIST'); + /// Denotes that this field returns a non-empty default value if not set. + /// This indicates that if the user provides the empty value in a request, + /// a non-empty value will be returned. The user will not be aware of what + /// non-empty value to expect. + static const FieldBehavior NON_EMPTY_DEFAULT = FieldBehavior._(7, _omitEnumNames ? '' : 'NON_EMPTY_DEFAULT'); + /// Denotes that the field in a resource (a message annotated with + /// google.api.resource) is used in the resource name to uniquely identify the + /// resource. For AIP-compliant APIs, this should only be applied to the + /// `name` field on the resource. + /// + /// This behavior should not be applied to references to other resources within + /// the message. + /// + /// The identifier field of resources often have different field behavior + /// depending on the request it is embedded in (e.g. for Create methods name + /// is optional and unused, while for Update methods it is required). Instead + /// of method-specific annotations, only `IDENTIFIER` is required. + static const FieldBehavior IDENTIFIER = FieldBehavior._(8, _omitEnumNames ? '' : 'IDENTIFIER'); + + static const $core.List values = [ + FIELD_BEHAVIOR_UNSPECIFIED, + OPTIONAL, + REQUIRED, + OUTPUT_ONLY, + INPUT_ONLY, + IMMUTABLE, + UNORDERED_LIST, + NON_EMPTY_DEFAULT, + IDENTIFIER, + ]; + + static final $core.List _byValue = $pb.ProtobufEnum.$_initByValueList(values, 8); + static FieldBehavior? valueOf($core.int value) => value < 0 || value >= _byValue.length ? null : _byValue[value]; + + const FieldBehavior._(super.v, super.n); +} + + +const _omitEnumNames = $core.bool.fromEnvironment('protobuf.omit_enum_names'); diff --git a/pkgs/googleapis_firestore_v1/lib/google/api/http.pb.dart b/pkgs/googleapis_firestore_v1/lib/google/api/http.pb.dart new file mode 100644 index 00000000..bcbcad77 --- /dev/null +++ b/pkgs/googleapis_firestore_v1/lib/google/api/http.pb.dart @@ -0,0 +1,627 @@ +// +// Generated code. Do not modify. +// source: google/api/http.proto +// +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:core' as $core; + +import 'package:protobuf/protobuf.dart' as $pb; + +export 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions; + +/// Defines the HTTP configuration for an API service. It contains a list of +/// [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method +/// to one or more HTTP REST API methods. +class Http extends $pb.GeneratedMessage { + factory Http({ + $core.Iterable? rules, + $core.bool? fullyDecodeReservedExpansion, + }) { + final $result = create(); + if (rules != null) { + $result.rules.addAll(rules); + } + if (fullyDecodeReservedExpansion != null) { + $result.fullyDecodeReservedExpansion = fullyDecodeReservedExpansion; + } + return $result; + } + Http._() : super(); + factory Http.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory Http.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Http', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.api'), createEmptyInstance: create) + ..pc(1, _omitFieldNames ? '' : 'rules', $pb.PbFieldType.PM, subBuilder: HttpRule.create) + ..aOB(2, _omitFieldNames ? '' : 'fullyDecodeReservedExpansion') + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Http clone() => Http()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Http copyWith(void Function(Http) updates) => super.copyWith((message) => updates(message as Http)) as Http; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static Http create() => Http._(); + Http createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static Http getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static Http? _defaultInstance; + + /// A list of HTTP configuration rules that apply to individual API methods. + /// + /// **NOTE:** All service configuration rules follow "last one wins" order. + @$pb.TagNumber(1) + $pb.PbList get rules => $_getList(0); + + /// When set to true, URL path parameters will be fully URI-decoded except in + /// cases of single segment matches in reserved expansion, where "%2F" will be + /// left encoded. + /// + /// The default behavior is to not decode RFC 6570 reserved characters in multi + /// segment matches. + @$pb.TagNumber(2) + $core.bool get fullyDecodeReservedExpansion => $_getBF(1); + @$pb.TagNumber(2) + set fullyDecodeReservedExpansion($core.bool v) { $_setBool(1, v); } + @$pb.TagNumber(2) + $core.bool hasFullyDecodeReservedExpansion() => $_has(1); + @$pb.TagNumber(2) + void clearFullyDecodeReservedExpansion() => $_clearField(2); +} + +enum HttpRule_Pattern { + get, + put, + post, + delete, + patch, + custom, + notSet +} + +/// gRPC Transcoding +/// +/// gRPC Transcoding is a feature for mapping between a gRPC method and one or +/// more HTTP REST endpoints. It allows developers to build a single API service +/// that supports both gRPC APIs and REST APIs. Many systems, including [Google +/// APIs](https://github.com/googleapis/googleapis), +/// [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC +/// Gateway](https://github.com/grpc-ecosystem/grpc-gateway), +/// and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature +/// and use it for large scale production services. +/// +/// `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies +/// how different portions of the gRPC request message are mapped to the URL +/// path, URL query parameters, and HTTP request body. It also controls how the +/// gRPC response message is mapped to the HTTP response body. `HttpRule` is +/// typically specified as an `google.api.http` annotation on the gRPC method. +/// +/// Each mapping specifies a URL path template and an HTTP method. The path +/// template may refer to one or more fields in the gRPC request message, as long +/// as each field is a non-repeated field with a primitive (non-message) type. +/// The path template controls how fields of the request message are mapped to +/// the URL path. +/// +/// Example: +/// +/// service Messaging { +/// rpc GetMessage(GetMessageRequest) returns (Message) { +/// option (google.api.http) = { +/// get: "/v1/{name=messages/*}" +/// }; +/// } +/// } +/// message GetMessageRequest { +/// string name = 1; // Mapped to URL path. +/// } +/// message Message { +/// string text = 1; // The resource content. +/// } +/// +/// This enables an HTTP REST to gRPC mapping as below: +/// +/// - HTTP: `GET /v1/messages/123456` +/// - gRPC: `GetMessage(name: "messages/123456")` +/// +/// Any fields in the request message which are not bound by the path template +/// automatically become HTTP query parameters if there is no HTTP request body. +/// For example: +/// +/// service Messaging { +/// rpc GetMessage(GetMessageRequest) returns (Message) { +/// option (google.api.http) = { +/// get:"/v1/messages/{message_id}" +/// }; +/// } +/// } +/// message GetMessageRequest { +/// message SubMessage { +/// string subfield = 1; +/// } +/// string message_id = 1; // Mapped to URL path. +/// int64 revision = 2; // Mapped to URL query parameter `revision`. +/// SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`. +/// } +/// +/// This enables a HTTP JSON to RPC mapping as below: +/// +/// - HTTP: `GET /v1/messages/123456?revision=2&sub.subfield=foo` +/// - gRPC: `GetMessage(message_id: "123456" revision: 2 sub: +/// SubMessage(subfield: "foo"))` +/// +/// Note that fields which are mapped to URL query parameters must have a +/// primitive type or a repeated primitive type or a non-repeated message type. +/// In the case of a repeated type, the parameter can be repeated in the URL +/// as `...?param=A¶m=B`. In the case of a message type, each field of the +/// message is mapped to a separate parameter, such as +/// `...?foo.a=A&foo.b=B&foo.c=C`. +/// +/// For HTTP methods that allow a request body, the `body` field +/// specifies the mapping. Consider a REST update method on the +/// message resource collection: +/// +/// service Messaging { +/// rpc UpdateMessage(UpdateMessageRequest) returns (Message) { +/// option (google.api.http) = { +/// patch: "/v1/messages/{message_id}" +/// body: "message" +/// }; +/// } +/// } +/// message UpdateMessageRequest { +/// string message_id = 1; // mapped to the URL +/// Message message = 2; // mapped to the body +/// } +/// +/// The following HTTP JSON to RPC mapping is enabled, where the +/// representation of the JSON in the request body is determined by +/// protos JSON encoding: +/// +/// - HTTP: `PATCH /v1/messages/123456 { "text": "Hi!" }` +/// - gRPC: `UpdateMessage(message_id: "123456" message { text: "Hi!" })` +/// +/// The special name `*` can be used in the body mapping to define that +/// every field not bound by the path template should be mapped to the +/// request body. This enables the following alternative definition of +/// the update method: +/// +/// service Messaging { +/// rpc UpdateMessage(Message) returns (Message) { +/// option (google.api.http) = { +/// patch: "/v1/messages/{message_id}" +/// body: "*" +/// }; +/// } +/// } +/// message Message { +/// string message_id = 1; +/// string text = 2; +/// } +/// +/// +/// The following HTTP JSON to RPC mapping is enabled: +/// +/// - HTTP: `PATCH /v1/messages/123456 { "text": "Hi!" }` +/// - gRPC: `UpdateMessage(message_id: "123456" text: "Hi!")` +/// +/// Note that when using `*` in the body mapping, it is not possible to +/// have HTTP parameters, as all fields not bound by the path end in +/// the body. This makes this option more rarely used in practice when +/// defining REST APIs. The common usage of `*` is in custom methods +/// which don't use the URL at all for transferring data. +/// +/// It is possible to define multiple HTTP methods for one RPC by using +/// the `additional_bindings` option. Example: +/// +/// service Messaging { +/// rpc GetMessage(GetMessageRequest) returns (Message) { +/// option (google.api.http) = { +/// get: "/v1/messages/{message_id}" +/// additional_bindings { +/// get: "/v1/users/{user_id}/messages/{message_id}" +/// } +/// }; +/// } +/// } +/// message GetMessageRequest { +/// string message_id = 1; +/// string user_id = 2; +/// } +/// +/// This enables the following two alternative HTTP JSON to RPC mappings: +/// +/// - HTTP: `GET /v1/messages/123456` +/// - gRPC: `GetMessage(message_id: "123456")` +/// +/// - HTTP: `GET /v1/users/me/messages/123456` +/// - gRPC: `GetMessage(user_id: "me" message_id: "123456")` +/// +/// Rules for HTTP mapping +/// +/// 1. Leaf request fields (recursive expansion nested messages in the request +/// message) are classified into three categories: +/// - Fields referred by the path template. They are passed via the URL path. +/// - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They +/// are passed via the HTTP +/// request body. +/// - All other fields are passed via the URL query parameters, and the +/// parameter name is the field path in the request message. A repeated +/// field can be represented as multiple query parameters under the same +/// name. +/// 2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL +/// query parameter, all fields +/// are passed via URL path and HTTP request body. +/// 3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP +/// request body, all +/// fields are passed via URL path and URL query parameters. +/// +/// Path template syntax +/// +/// Template = "/" Segments [ Verb ] ; +/// Segments = Segment { "/" Segment } ; +/// Segment = "*" | "**" | LITERAL | Variable ; +/// Variable = "{" FieldPath [ "=" Segments ] "}" ; +/// FieldPath = IDENT { "." IDENT } ; +/// Verb = ":" LITERAL ; +/// +/// The syntax `*` matches a single URL path segment. The syntax `**` matches +/// zero or more URL path segments, which must be the last part of the URL path +/// except the `Verb`. +/// +/// The syntax `Variable` matches part of the URL path as specified by its +/// template. A variable template must not contain other variables. If a variable +/// matches a single path segment, its template may be omitted, e.g. `{var}` +/// is equivalent to `{var=*}`. +/// +/// The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL` +/// contains any reserved character, such characters should be percent-encoded +/// before the matching. +/// +/// If a variable contains exactly one path segment, such as `"{var}"` or +/// `"{var=*}"`, when such a variable is expanded into a URL path on the client +/// side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The +/// server side does the reverse decoding. Such variables show up in the +/// [Discovery +/// Document](https://developers.google.com/discovery/v1/reference/apis) as +/// `{var}`. +/// +/// If a variable contains multiple path segments, such as `"{var=foo/*}"` +/// or `"{var=**}"`, when such a variable is expanded into a URL path on the +/// client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. +/// The server side does the reverse decoding, except "%2F" and "%2f" are left +/// unchanged. Such variables show up in the +/// [Discovery +/// Document](https://developers.google.com/discovery/v1/reference/apis) as +/// `{+var}`. +/// +/// Using gRPC API Service Configuration +/// +/// gRPC API Service Configuration (service config) is a configuration language +/// for configuring a gRPC service to become a user-facing product. The +/// service config is simply the YAML representation of the `google.api.Service` +/// proto message. +/// +/// As an alternative to annotating your proto file, you can configure gRPC +/// transcoding in your service config YAML files. You do this by specifying a +/// `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same +/// effect as the proto annotation. This can be particularly useful if you +/// have a proto that is reused in multiple services. Note that any transcoding +/// specified in the service config will override any matching transcoding +/// configuration in the proto. +/// +/// The following example selects a gRPC method and applies an `HttpRule` to it: +/// +/// http: +/// rules: +/// - selector: example.v1.Messaging.GetMessage +/// get: /v1/messages/{message_id}/{sub.subfield} +/// +/// Special notes +/// +/// When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the +/// proto to JSON conversion must follow the [proto3 +/// specification](https://developers.google.com/protocol-buffers/docs/proto3#json). +/// +/// While the single segment variable follows the semantics of +/// [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String +/// Expansion, the multi segment variable **does not** follow RFC 6570 Section +/// 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion +/// does not expand special characters like `?` and `#`, which would lead +/// to invalid URLs. As the result, gRPC Transcoding uses a custom encoding +/// for multi segment variables. +/// +/// The path variables **must not** refer to any repeated or mapped field, +/// because client libraries are not capable of handling such variable expansion. +/// +/// The path variables **must not** capture the leading "/" character. The reason +/// is that the most common use case "{var}" does not capture the leading "/" +/// character. For consistency, all path variables must share the same behavior. +/// +/// Repeated message fields must not be mapped to URL query parameters, because +/// no client library can support such complicated mapping. +/// +/// If an API needs to use a JSON array for request or response body, it can map +/// the request or response body to a repeated field. However, some gRPC +/// Transcoding implementations may not support this feature. +class HttpRule extends $pb.GeneratedMessage { + factory HttpRule({ + $core.String? selector, + $core.String? get, + $core.String? put, + $core.String? post, + $core.String? delete, + $core.String? patch, + $core.String? body, + CustomHttpPattern? custom, + $core.Iterable? additionalBindings, + $core.String? responseBody, + }) { + final $result = create(); + if (selector != null) { + $result.selector = selector; + } + if (get != null) { + $result.get = get; + } + if (put != null) { + $result.put = put; + } + if (post != null) { + $result.post = post; + } + if (delete != null) { + $result.delete = delete; + } + if (patch != null) { + $result.patch = patch; + } + if (body != null) { + $result.body = body; + } + if (custom != null) { + $result.custom = custom; + } + if (additionalBindings != null) { + $result.additionalBindings.addAll(additionalBindings); + } + if (responseBody != null) { + $result.responseBody = responseBody; + } + return $result; + } + HttpRule._() : super(); + factory HttpRule.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory HttpRule.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static const $core.Map<$core.int, HttpRule_Pattern> _HttpRule_PatternByTag = { + 2 : HttpRule_Pattern.get, + 3 : HttpRule_Pattern.put, + 4 : HttpRule_Pattern.post, + 5 : HttpRule_Pattern.delete, + 6 : HttpRule_Pattern.patch, + 8 : HttpRule_Pattern.custom, + 0 : HttpRule_Pattern.notSet + }; + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'HttpRule', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.api'), createEmptyInstance: create) + ..oo(0, [2, 3, 4, 5, 6, 8]) + ..aOS(1, _omitFieldNames ? '' : 'selector') + ..aOS(2, _omitFieldNames ? '' : 'get') + ..aOS(3, _omitFieldNames ? '' : 'put') + ..aOS(4, _omitFieldNames ? '' : 'post') + ..aOS(5, _omitFieldNames ? '' : 'delete') + ..aOS(6, _omitFieldNames ? '' : 'patch') + ..aOS(7, _omitFieldNames ? '' : 'body') + ..aOM(8, _omitFieldNames ? '' : 'custom', subBuilder: CustomHttpPattern.create) + ..pc(11, _omitFieldNames ? '' : 'additionalBindings', $pb.PbFieldType.PM, subBuilder: HttpRule.create) + ..aOS(12, _omitFieldNames ? '' : 'responseBody') + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + HttpRule clone() => HttpRule()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + HttpRule copyWith(void Function(HttpRule) updates) => super.copyWith((message) => updates(message as HttpRule)) as HttpRule; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static HttpRule create() => HttpRule._(); + HttpRule createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static HttpRule getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static HttpRule? _defaultInstance; + + HttpRule_Pattern whichPattern() => _HttpRule_PatternByTag[$_whichOneof(0)]!; + void clearPattern() => $_clearField($_whichOneof(0)); + + /// Selects a method to which this rule applies. + /// + /// Refer to [selector][google.api.DocumentationRule.selector] for syntax + /// details. + @$pb.TagNumber(1) + $core.String get selector => $_getSZ(0); + @$pb.TagNumber(1) + set selector($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasSelector() => $_has(0); + @$pb.TagNumber(1) + void clearSelector() => $_clearField(1); + + /// Maps to HTTP GET. Used for listing and getting information about + /// resources. + @$pb.TagNumber(2) + $core.String get get => $_getSZ(1); + @$pb.TagNumber(2) + set get($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasGet() => $_has(1); + @$pb.TagNumber(2) + void clearGet() => $_clearField(2); + + /// Maps to HTTP PUT. Used for replacing a resource. + @$pb.TagNumber(3) + $core.String get put => $_getSZ(2); + @$pb.TagNumber(3) + set put($core.String v) { $_setString(2, v); } + @$pb.TagNumber(3) + $core.bool hasPut() => $_has(2); + @$pb.TagNumber(3) + void clearPut() => $_clearField(3); + + /// Maps to HTTP POST. Used for creating a resource or performing an action. + @$pb.TagNumber(4) + $core.String get post => $_getSZ(3); + @$pb.TagNumber(4) + set post($core.String v) { $_setString(3, v); } + @$pb.TagNumber(4) + $core.bool hasPost() => $_has(3); + @$pb.TagNumber(4) + void clearPost() => $_clearField(4); + + /// Maps to HTTP DELETE. Used for deleting a resource. + @$pb.TagNumber(5) + $core.String get delete => $_getSZ(4); + @$pb.TagNumber(5) + set delete($core.String v) { $_setString(4, v); } + @$pb.TagNumber(5) + $core.bool hasDelete() => $_has(4); + @$pb.TagNumber(5) + void clearDelete() => $_clearField(5); + + /// Maps to HTTP PATCH. Used for updating a resource. + @$pb.TagNumber(6) + $core.String get patch => $_getSZ(5); + @$pb.TagNumber(6) + set patch($core.String v) { $_setString(5, v); } + @$pb.TagNumber(6) + $core.bool hasPatch() => $_has(5); + @$pb.TagNumber(6) + void clearPatch() => $_clearField(6); + + /// The name of the request field whose value is mapped to the HTTP request + /// body, or `*` for mapping all request fields not captured by the path + /// pattern to the HTTP body, or omitted for not having any HTTP request body. + /// + /// NOTE: the referred field must be present at the top-level of the request + /// message type. + @$pb.TagNumber(7) + $core.String get body => $_getSZ(6); + @$pb.TagNumber(7) + set body($core.String v) { $_setString(6, v); } + @$pb.TagNumber(7) + $core.bool hasBody() => $_has(6); + @$pb.TagNumber(7) + void clearBody() => $_clearField(7); + + /// The custom pattern is used for specifying an HTTP method that is not + /// included in the `pattern` field, such as HEAD, or "*" to leave the + /// HTTP method unspecified for this rule. The wild-card rule is useful + /// for services that provide content to Web (HTML) clients. + @$pb.TagNumber(8) + CustomHttpPattern get custom => $_getN(7); + @$pb.TagNumber(8) + set custom(CustomHttpPattern v) { $_setField(8, v); } + @$pb.TagNumber(8) + $core.bool hasCustom() => $_has(7); + @$pb.TagNumber(8) + void clearCustom() => $_clearField(8); + @$pb.TagNumber(8) + CustomHttpPattern ensureCustom() => $_ensure(7); + + /// Additional HTTP bindings for the selector. Nested bindings must + /// not contain an `additional_bindings` field themselves (that is, + /// the nesting may only be one level deep). + @$pb.TagNumber(11) + $pb.PbList get additionalBindings => $_getList(8); + + /// Optional. The name of the response field whose value is mapped to the HTTP + /// response body. When omitted, the entire response message will be used + /// as the HTTP response body. + /// + /// NOTE: The referred field must be present at the top-level of the response + /// message type. + @$pb.TagNumber(12) + $core.String get responseBody => $_getSZ(9); + @$pb.TagNumber(12) + set responseBody($core.String v) { $_setString(9, v); } + @$pb.TagNumber(12) + $core.bool hasResponseBody() => $_has(9); + @$pb.TagNumber(12) + void clearResponseBody() => $_clearField(12); +} + +/// A custom pattern is used for defining custom HTTP verb. +class CustomHttpPattern extends $pb.GeneratedMessage { + factory CustomHttpPattern({ + $core.String? kind, + $core.String? path, + }) { + final $result = create(); + if (kind != null) { + $result.kind = kind; + } + if (path != null) { + $result.path = path; + } + return $result; + } + CustomHttpPattern._() : super(); + factory CustomHttpPattern.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory CustomHttpPattern.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'CustomHttpPattern', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.api'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'kind') + ..aOS(2, _omitFieldNames ? '' : 'path') + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + CustomHttpPattern clone() => CustomHttpPattern()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + CustomHttpPattern copyWith(void Function(CustomHttpPattern) updates) => super.copyWith((message) => updates(message as CustomHttpPattern)) as CustomHttpPattern; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static CustomHttpPattern create() => CustomHttpPattern._(); + CustomHttpPattern createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static CustomHttpPattern getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static CustomHttpPattern? _defaultInstance; + + /// The name of this custom HTTP verb. + @$pb.TagNumber(1) + $core.String get kind => $_getSZ(0); + @$pb.TagNumber(1) + set kind($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasKind() => $_has(0); + @$pb.TagNumber(1) + void clearKind() => $_clearField(1); + + /// The path matched by this custom verb. + @$pb.TagNumber(2) + $core.String get path => $_getSZ(1); + @$pb.TagNumber(2) + set path($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasPath() => $_has(1); + @$pb.TagNumber(2) + void clearPath() => $_clearField(2); +} + + +const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); +const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/pkgs/googleapis_firestore_v1/lib/google/api/http.pbenum.dart b/pkgs/googleapis_firestore_v1/lib/google/api/http.pbenum.dart new file mode 100644 index 00000000..e1e7506b --- /dev/null +++ b/pkgs/googleapis_firestore_v1/lib/google/api/http.pbenum.dart @@ -0,0 +1,11 @@ +// +// Generated code. Do not modify. +// source: google/api/http.proto +// +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + diff --git a/pkgs/googleapis_firestore_v1/lib/google/api/launch_stage.pb.dart b/pkgs/googleapis_firestore_v1/lib/google/api/launch_stage.pb.dart new file mode 100644 index 00000000..4dc07977 --- /dev/null +++ b/pkgs/googleapis_firestore_v1/lib/google/api/launch_stage.pb.dart @@ -0,0 +1,17 @@ +// +// Generated code. Do not modify. +// source: google/api/launch_stage.proto +// +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:core' as $core; + +export 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions; + +export 'launch_stage.pbenum.dart'; + diff --git a/pkgs/googleapis_firestore_v1/lib/google/api/launch_stage.pbenum.dart b/pkgs/googleapis_firestore_v1/lib/google/api/launch_stage.pbenum.dart new file mode 100644 index 00000000..778fffa1 --- /dev/null +++ b/pkgs/googleapis_firestore_v1/lib/google/api/launch_stage.pbenum.dart @@ -0,0 +1,75 @@ +// +// Generated code. Do not modify. +// source: google/api/launch_stage.proto +// +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:core' as $core; + +import 'package:protobuf/protobuf.dart' as $pb; + +/// The launch stage as defined by [Google Cloud Platform +/// Launch Stages](https://cloud.google.com/terms/launch-stages). +class LaunchStage extends $pb.ProtobufEnum { + /// Do not use this default value. + static const LaunchStage LAUNCH_STAGE_UNSPECIFIED = LaunchStage._(0, _omitEnumNames ? '' : 'LAUNCH_STAGE_UNSPECIFIED'); + /// The feature is not yet implemented. Users can not use it. + static const LaunchStage UNIMPLEMENTED = LaunchStage._(6, _omitEnumNames ? '' : 'UNIMPLEMENTED'); + /// Prelaunch features are hidden from users and are only visible internally. + static const LaunchStage PRELAUNCH = LaunchStage._(7, _omitEnumNames ? '' : 'PRELAUNCH'); + /// Early Access features are limited to a closed group of testers. To use + /// these features, you must sign up in advance and sign a Trusted Tester + /// agreement (which includes confidentiality provisions). These features may + /// be unstable, changed in backward-incompatible ways, and are not + /// guaranteed to be released. + static const LaunchStage EARLY_ACCESS = LaunchStage._(1, _omitEnumNames ? '' : 'EARLY_ACCESS'); + /// Alpha is a limited availability test for releases before they are cleared + /// for widespread use. By Alpha, all significant design issues are resolved + /// and we are in the process of verifying functionality. Alpha customers + /// need to apply for access, agree to applicable terms, and have their + /// projects allowlisted. Alpha releases don't have to be feature complete, + /// no SLAs are provided, and there are no technical support obligations, but + /// they will be far enough along that customers can actually use them in + /// test environments or for limited-use tests -- just like they would in + /// normal production cases. + static const LaunchStage ALPHA = LaunchStage._(2, _omitEnumNames ? '' : 'ALPHA'); + /// Beta is the point at which we are ready to open a release for any + /// customer to use. There are no SLA or technical support obligations in a + /// Beta release. Products will be complete from a feature perspective, but + /// may have some open outstanding issues. Beta releases are suitable for + /// limited production use cases. + static const LaunchStage BETA = LaunchStage._(3, _omitEnumNames ? '' : 'BETA'); + /// GA features are open to all developers and are considered stable and + /// fully qualified for production use. + static const LaunchStage GA = LaunchStage._(4, _omitEnumNames ? '' : 'GA'); + /// Deprecated features are scheduled to be shut down and removed. For more + /// information, see the "Deprecation Policy" section of our [Terms of + /// Service](https://cloud.google.com/terms/) + /// and the [Google Cloud Platform Subject to the Deprecation + /// Policy](https://cloud.google.com/terms/deprecation) documentation. + static const LaunchStage DEPRECATED = LaunchStage._(5, _omitEnumNames ? '' : 'DEPRECATED'); + + static const $core.List values = [ + LAUNCH_STAGE_UNSPECIFIED, + UNIMPLEMENTED, + PRELAUNCH, + EARLY_ACCESS, + ALPHA, + BETA, + GA, + DEPRECATED, + ]; + + static final $core.List _byValue = $pb.ProtobufEnum.$_initByValueList(values, 7); + static LaunchStage? valueOf($core.int value) => value < 0 || value >= _byValue.length ? null : _byValue[value]; + + const LaunchStage._(super.v, super.n); +} + + +const _omitEnumNames = $core.bool.fromEnvironment('protobuf.omit_enum_names'); diff --git a/pkgs/googleapis_firestore_v1/lib/google/api/routing.pb.dart b/pkgs/googleapis_firestore_v1/lib/google/api/routing.pb.dart new file mode 100644 index 00000000..f04976c4 --- /dev/null +++ b/pkgs/googleapis_firestore_v1/lib/google/api/routing.pb.dart @@ -0,0 +1,544 @@ +// +// Generated code. Do not modify. +// source: google/api/routing.proto +// +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:core' as $core; + +import 'package:protobuf/protobuf.dart' as $pb; + +export 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions; + +/// Specifies the routing information that should be sent along with the request +/// in the form of routing header. +/// **NOTE:** All service configuration rules follow the "last one wins" order. +/// +/// The examples below will apply to an RPC which has the following request type: +/// +/// Message Definition: +/// +/// message Request { +/// // The name of the Table +/// // Values can be of the following formats: +/// // - `projects//tables/` +/// // - `projects//instances//tables/
` +/// // - `region//zones//tables/
` +/// string table_name = 1; +/// +/// // This value specifies routing for replication. +/// // It can be in the following formats: +/// // - `profiles/` +/// // - a legacy `profile_id` that can be any string +/// string app_profile_id = 2; +/// } +/// +/// Example message: +/// +/// { +/// table_name: projects/proj_foo/instances/instance_bar/table/table_baz, +/// app_profile_id: profiles/prof_qux +/// } +/// +/// The routing header consists of one or multiple key-value pairs. Every key +/// and value must be percent-encoded, and joined together in the format of +/// `key1=value1&key2=value2`. +/// The examples below skip the percent-encoding for readability. +/// +/// Example 1 +/// +/// Extracting a field from the request to put into the routing header +/// unchanged, with the key equal to the field name. +/// +/// annotation: +/// +/// option (google.api.routing) = { +/// // Take the `app_profile_id`. +/// routing_parameters { +/// field: "app_profile_id" +/// } +/// }; +/// +/// result: +/// +/// x-goog-request-params: app_profile_id=profiles/prof_qux +/// +/// Example 2 +/// +/// Extracting a field from the request to put into the routing header +/// unchanged, with the key different from the field name. +/// +/// annotation: +/// +/// option (google.api.routing) = { +/// // Take the `app_profile_id`, but name it `routing_id` in the header. +/// routing_parameters { +/// field: "app_profile_id" +/// path_template: "{routing_id=**}" +/// } +/// }; +/// +/// result: +/// +/// x-goog-request-params: routing_id=profiles/prof_qux +/// +/// Example 3 +/// +/// Extracting a field from the request to put into the routing +/// header, while matching a path template syntax on the field's value. +/// +/// NB: it is more useful to send nothing than to send garbage for the purpose +/// of dynamic routing, since garbage pollutes cache. Thus the matching. +/// +/// Sub-example 3a +/// +/// The field matches the template. +/// +/// annotation: +/// +/// option (google.api.routing) = { +/// // Take the `table_name`, if it's well-formed (with project-based +/// // syntax). +/// routing_parameters { +/// field: "table_name" +/// path_template: "{table_name=projects/*/instances/*/**}" +/// } +/// }; +/// +/// result: +/// +/// x-goog-request-params: +/// table_name=projects/proj_foo/instances/instance_bar/table/table_baz +/// +/// Sub-example 3b +/// +/// The field does not match the template. +/// +/// annotation: +/// +/// option (google.api.routing) = { +/// // Take the `table_name`, if it's well-formed (with region-based +/// // syntax). +/// routing_parameters { +/// field: "table_name" +/// path_template: "{table_name=regions/*/zones/*/**}" +/// } +/// }; +/// +/// result: +/// +/// +/// +/// Sub-example 3c +/// +/// Multiple alternative conflictingly named path templates are +/// specified. The one that matches is used to construct the header. +/// +/// annotation: +/// +/// option (google.api.routing) = { +/// // Take the `table_name`, if it's well-formed, whether +/// // using the region- or projects-based syntax. +/// +/// routing_parameters { +/// field: "table_name" +/// path_template: "{table_name=regions/*/zones/*/**}" +/// } +/// routing_parameters { +/// field: "table_name" +/// path_template: "{table_name=projects/*/instances/*/**}" +/// } +/// }; +/// +/// result: +/// +/// x-goog-request-params: +/// table_name=projects/proj_foo/instances/instance_bar/table/table_baz +/// +/// Example 4 +/// +/// Extracting a single routing header key-value pair by matching a +/// template syntax on (a part of) a single request field. +/// +/// annotation: +/// +/// option (google.api.routing) = { +/// // Take just the project id from the `table_name` field. +/// routing_parameters { +/// field: "table_name" +/// path_template: "{routing_id=projects/*}/**" +/// } +/// }; +/// +/// result: +/// +/// x-goog-request-params: routing_id=projects/proj_foo +/// +/// Example 5 +/// +/// Extracting a single routing header key-value pair by matching +/// several conflictingly named path templates on (parts of) a single request +/// field. The last template to match "wins" the conflict. +/// +/// annotation: +/// +/// option (google.api.routing) = { +/// // If the `table_name` does not have instances information, +/// // take just the project id for routing. +/// // Otherwise take project + instance. +/// +/// routing_parameters { +/// field: "table_name" +/// path_template: "{routing_id=projects/*}/**" +/// } +/// routing_parameters { +/// field: "table_name" +/// path_template: "{routing_id=projects/*/instances/*}/**" +/// } +/// }; +/// +/// result: +/// +/// x-goog-request-params: +/// routing_id=projects/proj_foo/instances/instance_bar +/// +/// Example 6 +/// +/// Extracting multiple routing header key-value pairs by matching +/// several non-conflicting path templates on (parts of) a single request field. +/// +/// Sub-example 6a +/// +/// Make the templates strict, so that if the `table_name` does not +/// have an instance information, nothing is sent. +/// +/// annotation: +/// +/// option (google.api.routing) = { +/// // The routing code needs two keys instead of one composite +/// // but works only for the tables with the "project-instance" name +/// // syntax. +/// +/// routing_parameters { +/// field: "table_name" +/// path_template: "{project_id=projects/*}/instances/*/**" +/// } +/// routing_parameters { +/// field: "table_name" +/// path_template: "projects/*/{instance_id=instances/*}/**" +/// } +/// }; +/// +/// result: +/// +/// x-goog-request-params: +/// project_id=projects/proj_foo&instance_id=instances/instance_bar +/// +/// Sub-example 6b +/// +/// Make the templates loose, so that if the `table_name` does not +/// have an instance information, just the project id part is sent. +/// +/// annotation: +/// +/// option (google.api.routing) = { +/// // The routing code wants two keys instead of one composite +/// // but will work with just the `project_id` for tables without +/// // an instance in the `table_name`. +/// +/// routing_parameters { +/// field: "table_name" +/// path_template: "{project_id=projects/*}/**" +/// } +/// routing_parameters { +/// field: "table_name" +/// path_template: "projects/*/{instance_id=instances/*}/**" +/// } +/// }; +/// +/// result (is the same as 6a for our example message because it has the instance +/// information): +/// +/// x-goog-request-params: +/// project_id=projects/proj_foo&instance_id=instances/instance_bar +/// +/// Example 7 +/// +/// Extracting multiple routing header key-value pairs by matching +/// several path templates on multiple request fields. +/// +/// NB: note that here there is no way to specify sending nothing if one of the +/// fields does not match its template. E.g. if the `table_name` is in the wrong +/// format, the `project_id` will not be sent, but the `routing_id` will be. +/// The backend routing code has to be aware of that and be prepared to not +/// receive a full complement of keys if it expects multiple. +/// +/// annotation: +/// +/// option (google.api.routing) = { +/// // The routing needs both `project_id` and `routing_id` +/// // (from the `app_profile_id` field) for routing. +/// +/// routing_parameters { +/// field: "table_name" +/// path_template: "{project_id=projects/*}/**" +/// } +/// routing_parameters { +/// field: "app_profile_id" +/// path_template: "{routing_id=**}" +/// } +/// }; +/// +/// result: +/// +/// x-goog-request-params: +/// project_id=projects/proj_foo&routing_id=profiles/prof_qux +/// +/// Example 8 +/// +/// Extracting a single routing header key-value pair by matching +/// several conflictingly named path templates on several request fields. The +/// last template to match "wins" the conflict. +/// +/// annotation: +/// +/// option (google.api.routing) = { +/// // The `routing_id` can be a project id or a region id depending on +/// // the table name format, but only if the `app_profile_id` is not set. +/// // If `app_profile_id` is set it should be used instead. +/// +/// routing_parameters { +/// field: "table_name" +/// path_template: "{routing_id=projects/*}/**" +/// } +/// routing_parameters { +/// field: "table_name" +/// path_template: "{routing_id=regions/*}/**" +/// } +/// routing_parameters { +/// field: "app_profile_id" +/// path_template: "{routing_id=**}" +/// } +/// }; +/// +/// result: +/// +/// x-goog-request-params: routing_id=profiles/prof_qux +/// +/// Example 9 +/// +/// Bringing it all together. +/// +/// annotation: +/// +/// option (google.api.routing) = { +/// // For routing both `table_location` and a `routing_id` are needed. +/// // +/// // table_location can be either an instance id or a region+zone id. +/// // +/// // For `routing_id`, take the value of `app_profile_id` +/// // - If it's in the format `profiles/`, send +/// // just the `` part. +/// // - If it's any other literal, send it as is. +/// // If the `app_profile_id` is empty, and the `table_name` starts with +/// // the project_id, send that instead. +/// +/// routing_parameters { +/// field: "table_name" +/// path_template: "projects/*/{table_location=instances/*}/tables/*" +/// } +/// routing_parameters { +/// field: "table_name" +/// path_template: "{table_location=regions/*/zones/*}/tables/*" +/// } +/// routing_parameters { +/// field: "table_name" +/// path_template: "{routing_id=projects/*}/**" +/// } +/// routing_parameters { +/// field: "app_profile_id" +/// path_template: "{routing_id=**}" +/// } +/// routing_parameters { +/// field: "app_profile_id" +/// path_template: "profiles/{routing_id=*}" +/// } +/// }; +/// +/// result: +/// +/// x-goog-request-params: +/// table_location=instances/instance_bar&routing_id=prof_qux +class RoutingRule extends $pb.GeneratedMessage { + factory RoutingRule({ + $core.Iterable? routingParameters, + }) { + final $result = create(); + if (routingParameters != null) { + $result.routingParameters.addAll(routingParameters); + } + return $result; + } + RoutingRule._() : super(); + factory RoutingRule.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory RoutingRule.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'RoutingRule', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.api'), createEmptyInstance: create) + ..pc(2, _omitFieldNames ? '' : 'routingParameters', $pb.PbFieldType.PM, subBuilder: RoutingParameter.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + RoutingRule clone() => RoutingRule()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + RoutingRule copyWith(void Function(RoutingRule) updates) => super.copyWith((message) => updates(message as RoutingRule)) as RoutingRule; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static RoutingRule create() => RoutingRule._(); + RoutingRule createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static RoutingRule getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static RoutingRule? _defaultInstance; + + /// A collection of Routing Parameter specifications. + /// **NOTE:** If multiple Routing Parameters describe the same key + /// (via the `path_template` field or via the `field` field when + /// `path_template` is not provided), "last one wins" rule + /// determines which Parameter gets used. + /// See the examples for more details. + @$pb.TagNumber(2) + $pb.PbList get routingParameters => $_getList(0); +} + +/// A projection from an input message to the GRPC or REST header. +class RoutingParameter extends $pb.GeneratedMessage { + factory RoutingParameter({ + $core.String? field_1, + $core.String? pathTemplate, + }) { + final $result = create(); + if (field_1 != null) { + $result.field_1 = field_1; + } + if (pathTemplate != null) { + $result.pathTemplate = pathTemplate; + } + return $result; + } + RoutingParameter._() : super(); + factory RoutingParameter.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory RoutingParameter.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'RoutingParameter', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.api'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'field') + ..aOS(2, _omitFieldNames ? '' : 'pathTemplate') + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + RoutingParameter clone() => RoutingParameter()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + RoutingParameter copyWith(void Function(RoutingParameter) updates) => super.copyWith((message) => updates(message as RoutingParameter)) as RoutingParameter; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static RoutingParameter create() => RoutingParameter._(); + RoutingParameter createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static RoutingParameter getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static RoutingParameter? _defaultInstance; + + /// A request field to extract the header key-value pair from. + @$pb.TagNumber(1) + $core.String get field_1 => $_getSZ(0); + @$pb.TagNumber(1) + set field_1($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasField_1() => $_has(0); + @$pb.TagNumber(1) + void clearField_1() => $_clearField(1); + + /// A pattern matching the key-value field. Optional. + /// If not specified, the whole field specified in the `field` field will be + /// taken as value, and its name used as key. If specified, it MUST contain + /// exactly one named segment (along with any number of unnamed segments) The + /// pattern will be matched over the field specified in the `field` field, then + /// if the match is successful: + /// - the name of the single named segment will be used as a header name, + /// - the match value of the segment will be used as a header value; + /// if the match is NOT successful, nothing will be sent. + /// + /// Example: + /// + /// -- This is a field in the request message + /// | that the header value will be extracted from. + /// | + /// | -- This is the key name in the + /// | | routing header. + /// V | + /// field: "table_name" v + /// path_template: "projects/*/{table_location=instances/*}/tables/*" + /// ^ ^ + /// | | + /// In the {} brackets is the pattern that -- | + /// specifies what to extract from the | + /// field as a value to be sent. | + /// | + /// The string in the field must match the whole pattern -- + /// before brackets, inside brackets, after brackets. + /// + /// When looking at this specific example, we can see that: + /// - A key-value pair with the key `table_location` + /// and the value matching `instances/*` should be added + /// to the x-goog-request-params routing header. + /// - The value is extracted from the request message's `table_name` field + /// if it matches the full pattern specified: + /// `projects/*/instances/*/tables/*`. + /// + /// **NB:** If the `path_template` field is not provided, the key name is + /// equal to the field name, and the whole field should be sent as a value. + /// This makes the pattern for the field and the value functionally equivalent + /// to `**`, and the configuration + /// + /// { + /// field: "table_name" + /// } + /// + /// is a functionally equivalent shorthand to: + /// + /// { + /// field: "table_name" + /// path_template: "{table_name=**}" + /// } + /// + /// See Example 1 for more details. + @$pb.TagNumber(2) + $core.String get pathTemplate => $_getSZ(1); + @$pb.TagNumber(2) + set pathTemplate($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasPathTemplate() => $_has(1); + @$pb.TagNumber(2) + void clearPathTemplate() => $_clearField(2); +} + +class Routing { + static final routing = $pb.Extension(_omitMessageNames ? '' : 'google.protobuf.MethodOptions', _omitFieldNames ? '' : 'routing', 72295729, $pb.PbFieldType.OM, defaultOrMaker: RoutingRule.getDefault, subBuilder: RoutingRule.create); + static void registerAllExtensions($pb.ExtensionRegistry registry) { + registry.add(routing); + } +} + + +const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); +const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/pkgs/googleapis_firestore_v1/lib/google/api/routing.pbenum.dart b/pkgs/googleapis_firestore_v1/lib/google/api/routing.pbenum.dart new file mode 100644 index 00000000..ebbd9b42 --- /dev/null +++ b/pkgs/googleapis_firestore_v1/lib/google/api/routing.pbenum.dart @@ -0,0 +1,11 @@ +// +// Generated code. Do not modify. +// source: google/api/routing.proto +// +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + diff --git a/pkgs/googleapis_firestore_v1/lib/google/firestore/v1/aggregation_result.pb.dart b/pkgs/googleapis_firestore_v1/lib/google/firestore/v1/aggregation_result.pb.dart new file mode 100644 index 00000000..702d0a47 --- /dev/null +++ b/pkgs/googleapis_firestore_v1/lib/google/firestore/v1/aggregation_result.pb.dart @@ -0,0 +1,71 @@ +// +// Generated code. Do not modify. +// source: google/firestore/v1/aggregation_result.proto +// +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:core' as $core; + +import 'package:protobuf/protobuf.dart' as $pb; + +import 'document.pb.dart' as $1; + +export 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions; + +/// The result of a single bucket from a Firestore aggregation query. +/// +/// The keys of `aggregate_fields` are the same for all results in an aggregation +/// query, unlike document queries which can have different fields present for +/// each result. +class AggregationResult extends $pb.GeneratedMessage { + factory AggregationResult({ + $core.Iterable<$core.MapEntry<$core.String, $1.Value>>? aggregateFields, + }) { + final $result = create(); + if (aggregateFields != null) { + $result.aggregateFields.addEntries(aggregateFields); + } + return $result; + } + AggregationResult._() : super(); + factory AggregationResult.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory AggregationResult.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'AggregationResult', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.firestore.v1'), createEmptyInstance: create) + ..m<$core.String, $1.Value>(2, _omitFieldNames ? '' : 'aggregateFields', entryClassName: 'AggregationResult.AggregateFieldsEntry', keyFieldType: $pb.PbFieldType.OS, valueFieldType: $pb.PbFieldType.OM, valueCreator: $1.Value.create, valueDefaultOrMaker: $1.Value.getDefault, packageName: const $pb.PackageName('google.firestore.v1')) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + AggregationResult clone() => AggregationResult()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + AggregationResult copyWith(void Function(AggregationResult) updates) => super.copyWith((message) => updates(message as AggregationResult)) as AggregationResult; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static AggregationResult create() => AggregationResult._(); + AggregationResult createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static AggregationResult getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static AggregationResult? _defaultInstance; + + /// The result of the aggregation functions, ex: `COUNT(*) AS total_docs`. + /// + /// The key is the + /// [alias][google.firestore.v1.StructuredAggregationQuery.Aggregation.alias] + /// assigned to the aggregation function on input and the size of this map + /// equals the number of aggregation functions in the query. + @$pb.TagNumber(2) + $pb.PbMap<$core.String, $1.Value> get aggregateFields => $_getMap(0); +} + + +const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); +const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/pkgs/googleapis_firestore_v1/lib/google/firestore/v1/aggregation_result.pbenum.dart b/pkgs/googleapis_firestore_v1/lib/google/firestore/v1/aggregation_result.pbenum.dart new file mode 100644 index 00000000..cb352ec2 --- /dev/null +++ b/pkgs/googleapis_firestore_v1/lib/google/firestore/v1/aggregation_result.pbenum.dart @@ -0,0 +1,11 @@ +// +// Generated code. Do not modify. +// source: google/firestore/v1/aggregation_result.proto +// +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + diff --git a/pkgs/googleapis_firestore_v1/lib/google/firestore/v1/bloom_filter.pb.dart b/pkgs/googleapis_firestore_v1/lib/google/firestore/v1/bloom_filter.pb.dart new file mode 100644 index 00000000..963f0a29 --- /dev/null +++ b/pkgs/googleapis_firestore_v1/lib/google/firestore/v1/bloom_filter.pb.dart @@ -0,0 +1,173 @@ +// +// Generated code. Do not modify. +// source: google/firestore/v1/bloom_filter.proto +// +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:core' as $core; + +import 'package:protobuf/protobuf.dart' as $pb; + +export 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions; + +/// A sequence of bits, encoded in a byte array. +/// +/// Each byte in the `bitmap` byte array stores 8 bits of the sequence. The only +/// exception is the last byte, which may store 8 _or fewer_ bits. The `padding` +/// defines the number of bits of the last byte to be ignored as "padding". The +/// values of these "padding" bits are unspecified and must be ignored. +/// +/// To retrieve the first bit, bit 0, calculate: `(bitmap[0] & 0x01) != 0`. +/// To retrieve the second bit, bit 1, calculate: `(bitmap[0] & 0x02) != 0`. +/// To retrieve the third bit, bit 2, calculate: `(bitmap[0] & 0x04) != 0`. +/// To retrieve the fourth bit, bit 3, calculate: `(bitmap[0] & 0x08) != 0`. +/// To retrieve bit n, calculate: `(bitmap[n / 8] & (0x01 << (n % 8))) != 0`. +/// +/// The "size" of a `BitSequence` (the number of bits it contains) is calculated +/// by this formula: `(bitmap.length * 8) - padding`. +class BitSequence extends $pb.GeneratedMessage { + factory BitSequence({ + $core.List<$core.int>? bitmap, + $core.int? padding, + }) { + final $result = create(); + if (bitmap != null) { + $result.bitmap = bitmap; + } + if (padding != null) { + $result.padding = padding; + } + return $result; + } + BitSequence._() : super(); + factory BitSequence.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory BitSequence.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'BitSequence', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.firestore.v1'), createEmptyInstance: create) + ..a<$core.List<$core.int>>(1, _omitFieldNames ? '' : 'bitmap', $pb.PbFieldType.OY) + ..a<$core.int>(2, _omitFieldNames ? '' : 'padding', $pb.PbFieldType.O3) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + BitSequence clone() => BitSequence()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + BitSequence copyWith(void Function(BitSequence) updates) => super.copyWith((message) => updates(message as BitSequence)) as BitSequence; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static BitSequence create() => BitSequence._(); + BitSequence createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static BitSequence getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static BitSequence? _defaultInstance; + + /// The bytes that encode the bit sequence. + /// May have a length of zero. + @$pb.TagNumber(1) + $core.List<$core.int> get bitmap => $_getN(0); + @$pb.TagNumber(1) + set bitmap($core.List<$core.int> v) { $_setBytes(0, v); } + @$pb.TagNumber(1) + $core.bool hasBitmap() => $_has(0); + @$pb.TagNumber(1) + void clearBitmap() => $_clearField(1); + + /// The number of bits of the last byte in `bitmap` to ignore as "padding". + /// If the length of `bitmap` is zero, then this value must be `0`. + /// Otherwise, this value must be between 0 and 7, inclusive. + @$pb.TagNumber(2) + $core.int get padding => $_getIZ(1); + @$pb.TagNumber(2) + set padding($core.int v) { $_setSignedInt32(1, v); } + @$pb.TagNumber(2) + $core.bool hasPadding() => $_has(1); + @$pb.TagNumber(2) + void clearPadding() => $_clearField(2); +} + +/// A bloom filter (https://en.wikipedia.org/wiki/Bloom_filter). +/// +/// The bloom filter hashes the entries with MD5 and treats the resulting 128-bit +/// hash as 2 distinct 64-bit hash values, interpreted as unsigned integers +/// using 2's complement encoding. +/// +/// These two hash values, named `h1` and `h2`, are then used to compute the +/// `hash_count` hash values using the formula, starting at `i=0`: +/// +/// h(i) = h1 + (i * h2) +/// +/// These resulting values are then taken modulo the number of bits in the bloom +/// filter to get the bits of the bloom filter to test for the given entry. +class BloomFilter extends $pb.GeneratedMessage { + factory BloomFilter({ + BitSequence? bits, + $core.int? hashCount, + }) { + final $result = create(); + if (bits != null) { + $result.bits = bits; + } + if (hashCount != null) { + $result.hashCount = hashCount; + } + return $result; + } + BloomFilter._() : super(); + factory BloomFilter.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory BloomFilter.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'BloomFilter', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.firestore.v1'), createEmptyInstance: create) + ..aOM(1, _omitFieldNames ? '' : 'bits', subBuilder: BitSequence.create) + ..a<$core.int>(2, _omitFieldNames ? '' : 'hashCount', $pb.PbFieldType.O3) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + BloomFilter clone() => BloomFilter()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + BloomFilter copyWith(void Function(BloomFilter) updates) => super.copyWith((message) => updates(message as BloomFilter)) as BloomFilter; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static BloomFilter create() => BloomFilter._(); + BloomFilter createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static BloomFilter getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static BloomFilter? _defaultInstance; + + /// The bloom filter data. + @$pb.TagNumber(1) + BitSequence get bits => $_getN(0); + @$pb.TagNumber(1) + set bits(BitSequence v) { $_setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasBits() => $_has(0); + @$pb.TagNumber(1) + void clearBits() => $_clearField(1); + @$pb.TagNumber(1) + BitSequence ensureBits() => $_ensure(0); + + /// The number of hashes used by the algorithm. + @$pb.TagNumber(2) + $core.int get hashCount => $_getIZ(1); + @$pb.TagNumber(2) + set hashCount($core.int v) { $_setSignedInt32(1, v); } + @$pb.TagNumber(2) + $core.bool hasHashCount() => $_has(1); + @$pb.TagNumber(2) + void clearHashCount() => $_clearField(2); +} + + +const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); +const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/pkgs/googleapis_firestore_v1/lib/google/firestore/v1/bloom_filter.pbenum.dart b/pkgs/googleapis_firestore_v1/lib/google/firestore/v1/bloom_filter.pbenum.dart new file mode 100644 index 00000000..01b3df00 --- /dev/null +++ b/pkgs/googleapis_firestore_v1/lib/google/firestore/v1/bloom_filter.pbenum.dart @@ -0,0 +1,11 @@ +// +// Generated code. Do not modify. +// source: google/firestore/v1/bloom_filter.proto +// +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + diff --git a/pkgs/googleapis_firestore_v1/lib/google/firestore/v1/common.pb.dart b/pkgs/googleapis_firestore_v1/lib/google/firestore/v1/common.pb.dart new file mode 100644 index 00000000..0db8da52 --- /dev/null +++ b/pkgs/googleapis_firestore_v1/lib/google/firestore/v1/common.pb.dart @@ -0,0 +1,343 @@ +// +// Generated code. Do not modify. +// source: google/firestore/v1/common.proto +// +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:core' as $core; + +import 'package:protobuf/protobuf.dart' as $pb; + +import '../../protobuf/timestamp.pb.dart' as $6; + +export 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions; + +/// A set of field paths on a document. +/// Used to restrict a get or update operation on a document to a subset of its +/// fields. +/// This is different from standard field masks, as this is always scoped to a +/// [Document][google.firestore.v1.Document], and takes in account the dynamic +/// nature of [Value][google.firestore.v1.Value]. +class DocumentMask extends $pb.GeneratedMessage { + factory DocumentMask({ + $core.Iterable<$core.String>? fieldPaths, + }) { + final $result = create(); + if (fieldPaths != null) { + $result.fieldPaths.addAll(fieldPaths); + } + return $result; + } + DocumentMask._() : super(); + factory DocumentMask.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory DocumentMask.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'DocumentMask', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.firestore.v1'), createEmptyInstance: create) + ..pPS(1, _omitFieldNames ? '' : 'fieldPaths') + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + DocumentMask clone() => DocumentMask()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + DocumentMask copyWith(void Function(DocumentMask) updates) => super.copyWith((message) => updates(message as DocumentMask)) as DocumentMask; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static DocumentMask create() => DocumentMask._(); + DocumentMask createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static DocumentMask getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static DocumentMask? _defaultInstance; + + /// The list of field paths in the mask. See + /// [Document.fields][google.firestore.v1.Document.fields] for a field path + /// syntax reference. + @$pb.TagNumber(1) + $pb.PbList<$core.String> get fieldPaths => $_getList(0); +} + +enum Precondition_ConditionType { + exists, + updateTime, + notSet +} + +/// A precondition on a document, used for conditional operations. +class Precondition extends $pb.GeneratedMessage { + factory Precondition({ + $core.bool? exists, + $6.Timestamp? updateTime, + }) { + final $result = create(); + if (exists != null) { + $result.exists = exists; + } + if (updateTime != null) { + $result.updateTime = updateTime; + } + return $result; + } + Precondition._() : super(); + factory Precondition.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory Precondition.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static const $core.Map<$core.int, Precondition_ConditionType> _Precondition_ConditionTypeByTag = { + 1 : Precondition_ConditionType.exists, + 2 : Precondition_ConditionType.updateTime, + 0 : Precondition_ConditionType.notSet + }; + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Precondition', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.firestore.v1'), createEmptyInstance: create) + ..oo(0, [1, 2]) + ..aOB(1, _omitFieldNames ? '' : 'exists') + ..aOM<$6.Timestamp>(2, _omitFieldNames ? '' : 'updateTime', subBuilder: $6.Timestamp.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Precondition clone() => Precondition()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Precondition copyWith(void Function(Precondition) updates) => super.copyWith((message) => updates(message as Precondition)) as Precondition; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static Precondition create() => Precondition._(); + Precondition createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static Precondition getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static Precondition? _defaultInstance; + + Precondition_ConditionType whichConditionType() => _Precondition_ConditionTypeByTag[$_whichOneof(0)]!; + void clearConditionType() => $_clearField($_whichOneof(0)); + + /// When set to `true`, the target document must exist. + /// When set to `false`, the target document must not exist. + @$pb.TagNumber(1) + $core.bool get exists => $_getBF(0); + @$pb.TagNumber(1) + set exists($core.bool v) { $_setBool(0, v); } + @$pb.TagNumber(1) + $core.bool hasExists() => $_has(0); + @$pb.TagNumber(1) + void clearExists() => $_clearField(1); + + /// When set, the target document must exist and have been last updated at + /// that time. Timestamp must be microsecond aligned. + @$pb.TagNumber(2) + $6.Timestamp get updateTime => $_getN(1); + @$pb.TagNumber(2) + set updateTime($6.Timestamp v) { $_setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasUpdateTime() => $_has(1); + @$pb.TagNumber(2) + void clearUpdateTime() => $_clearField(2); + @$pb.TagNumber(2) + $6.Timestamp ensureUpdateTime() => $_ensure(1); +} + +/// Options for a transaction that can be used to read and write documents. +/// +/// Firestore does not allow 3rd party auth requests to create read-write. +/// transactions. +class TransactionOptions_ReadWrite extends $pb.GeneratedMessage { + factory TransactionOptions_ReadWrite({ + $core.List<$core.int>? retryTransaction, + }) { + final $result = create(); + if (retryTransaction != null) { + $result.retryTransaction = retryTransaction; + } + return $result; + } + TransactionOptions_ReadWrite._() : super(); + factory TransactionOptions_ReadWrite.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory TransactionOptions_ReadWrite.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'TransactionOptions.ReadWrite', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.firestore.v1'), createEmptyInstance: create) + ..a<$core.List<$core.int>>(1, _omitFieldNames ? '' : 'retryTransaction', $pb.PbFieldType.OY) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + TransactionOptions_ReadWrite clone() => TransactionOptions_ReadWrite()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + TransactionOptions_ReadWrite copyWith(void Function(TransactionOptions_ReadWrite) updates) => super.copyWith((message) => updates(message as TransactionOptions_ReadWrite)) as TransactionOptions_ReadWrite; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static TransactionOptions_ReadWrite create() => TransactionOptions_ReadWrite._(); + TransactionOptions_ReadWrite createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static TransactionOptions_ReadWrite getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static TransactionOptions_ReadWrite? _defaultInstance; + + /// An optional transaction to retry. + @$pb.TagNumber(1) + $core.List<$core.int> get retryTransaction => $_getN(0); + @$pb.TagNumber(1) + set retryTransaction($core.List<$core.int> v) { $_setBytes(0, v); } + @$pb.TagNumber(1) + $core.bool hasRetryTransaction() => $_has(0); + @$pb.TagNumber(1) + void clearRetryTransaction() => $_clearField(1); +} + +enum TransactionOptions_ReadOnly_ConsistencySelector { + readTime, + notSet +} + +/// Options for a transaction that can only be used to read documents. +class TransactionOptions_ReadOnly extends $pb.GeneratedMessage { + factory TransactionOptions_ReadOnly({ + $6.Timestamp? readTime, + }) { + final $result = create(); + if (readTime != null) { + $result.readTime = readTime; + } + return $result; + } + TransactionOptions_ReadOnly._() : super(); + factory TransactionOptions_ReadOnly.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory TransactionOptions_ReadOnly.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static const $core.Map<$core.int, TransactionOptions_ReadOnly_ConsistencySelector> _TransactionOptions_ReadOnly_ConsistencySelectorByTag = { + 2 : TransactionOptions_ReadOnly_ConsistencySelector.readTime, + 0 : TransactionOptions_ReadOnly_ConsistencySelector.notSet + }; + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'TransactionOptions.ReadOnly', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.firestore.v1'), createEmptyInstance: create) + ..oo(0, [2]) + ..aOM<$6.Timestamp>(2, _omitFieldNames ? '' : 'readTime', subBuilder: $6.Timestamp.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + TransactionOptions_ReadOnly clone() => TransactionOptions_ReadOnly()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + TransactionOptions_ReadOnly copyWith(void Function(TransactionOptions_ReadOnly) updates) => super.copyWith((message) => updates(message as TransactionOptions_ReadOnly)) as TransactionOptions_ReadOnly; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static TransactionOptions_ReadOnly create() => TransactionOptions_ReadOnly._(); + TransactionOptions_ReadOnly createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static TransactionOptions_ReadOnly getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static TransactionOptions_ReadOnly? _defaultInstance; + + TransactionOptions_ReadOnly_ConsistencySelector whichConsistencySelector() => _TransactionOptions_ReadOnly_ConsistencySelectorByTag[$_whichOneof(0)]!; + void clearConsistencySelector() => $_clearField($_whichOneof(0)); + + /// Reads documents at the given time. + /// + /// This must be a microsecond precision timestamp within the past one + /// hour, or if Point-in-Time Recovery is enabled, can additionally be a + /// whole minute timestamp within the past 7 days. + @$pb.TagNumber(2) + $6.Timestamp get readTime => $_getN(0); + @$pb.TagNumber(2) + set readTime($6.Timestamp v) { $_setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasReadTime() => $_has(0); + @$pb.TagNumber(2) + void clearReadTime() => $_clearField(2); + @$pb.TagNumber(2) + $6.Timestamp ensureReadTime() => $_ensure(0); +} + +enum TransactionOptions_Mode { + readOnly, + readWrite, + notSet +} + +/// Options for creating a new transaction. +class TransactionOptions extends $pb.GeneratedMessage { + factory TransactionOptions({ + TransactionOptions_ReadOnly? readOnly, + TransactionOptions_ReadWrite? readWrite, + }) { + final $result = create(); + if (readOnly != null) { + $result.readOnly = readOnly; + } + if (readWrite != null) { + $result.readWrite = readWrite; + } + return $result; + } + TransactionOptions._() : super(); + factory TransactionOptions.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory TransactionOptions.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static const $core.Map<$core.int, TransactionOptions_Mode> _TransactionOptions_ModeByTag = { + 2 : TransactionOptions_Mode.readOnly, + 3 : TransactionOptions_Mode.readWrite, + 0 : TransactionOptions_Mode.notSet + }; + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'TransactionOptions', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.firestore.v1'), createEmptyInstance: create) + ..oo(0, [2, 3]) + ..aOM(2, _omitFieldNames ? '' : 'readOnly', subBuilder: TransactionOptions_ReadOnly.create) + ..aOM(3, _omitFieldNames ? '' : 'readWrite', subBuilder: TransactionOptions_ReadWrite.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + TransactionOptions clone() => TransactionOptions()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + TransactionOptions copyWith(void Function(TransactionOptions) updates) => super.copyWith((message) => updates(message as TransactionOptions)) as TransactionOptions; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static TransactionOptions create() => TransactionOptions._(); + TransactionOptions createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static TransactionOptions getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static TransactionOptions? _defaultInstance; + + TransactionOptions_Mode whichMode() => _TransactionOptions_ModeByTag[$_whichOneof(0)]!; + void clearMode() => $_clearField($_whichOneof(0)); + + /// The transaction can only be used for read operations. + @$pb.TagNumber(2) + TransactionOptions_ReadOnly get readOnly => $_getN(0); + @$pb.TagNumber(2) + set readOnly(TransactionOptions_ReadOnly v) { $_setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasReadOnly() => $_has(0); + @$pb.TagNumber(2) + void clearReadOnly() => $_clearField(2); + @$pb.TagNumber(2) + TransactionOptions_ReadOnly ensureReadOnly() => $_ensure(0); + + /// The transaction can be used for both read and write operations. + @$pb.TagNumber(3) + TransactionOptions_ReadWrite get readWrite => $_getN(1); + @$pb.TagNumber(3) + set readWrite(TransactionOptions_ReadWrite v) { $_setField(3, v); } + @$pb.TagNumber(3) + $core.bool hasReadWrite() => $_has(1); + @$pb.TagNumber(3) + void clearReadWrite() => $_clearField(3); + @$pb.TagNumber(3) + TransactionOptions_ReadWrite ensureReadWrite() => $_ensure(1); +} + + +const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); +const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/pkgs/googleapis_firestore_v1/lib/google/firestore/v1/common.pbenum.dart b/pkgs/googleapis_firestore_v1/lib/google/firestore/v1/common.pbenum.dart new file mode 100644 index 00000000..ec8ad05b --- /dev/null +++ b/pkgs/googleapis_firestore_v1/lib/google/firestore/v1/common.pbenum.dart @@ -0,0 +1,11 @@ +// +// Generated code. Do not modify. +// source: google/firestore/v1/common.proto +// +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + diff --git a/pkgs/googleapis_firestore_v1/lib/google/firestore/v1/document.pb.dart b/pkgs/googleapis_firestore_v1/lib/google/firestore/v1/document.pb.dart new file mode 100644 index 00000000..92860b30 --- /dev/null +++ b/pkgs/googleapis_firestore_v1/lib/google/firestore/v1/document.pb.dart @@ -0,0 +1,484 @@ +// +// Generated code. Do not modify. +// source: google/firestore/v1/document.proto +// +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:core' as $core; + +import 'package:fixnum/fixnum.dart' as $fixnum; +import 'package:protobuf/protobuf.dart' as $pb; + +import '../../protobuf/struct.pbenum.dart' as $8; +import '../../protobuf/timestamp.pb.dart' as $6; +import '../../type/latlng.pb.dart' as $7; + +export 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions; + +/// A Firestore document. +/// +/// Must not exceed 1 MiB - 4 bytes. +class Document extends $pb.GeneratedMessage { + factory Document({ + $core.String? name, + $core.Iterable<$core.MapEntry<$core.String, Value>>? fields, + $6.Timestamp? createTime, + $6.Timestamp? updateTime, + }) { + final $result = create(); + if (name != null) { + $result.name = name; + } + if (fields != null) { + $result.fields.addEntries(fields); + } + if (createTime != null) { + $result.createTime = createTime; + } + if (updateTime != null) { + $result.updateTime = updateTime; + } + return $result; + } + Document._() : super(); + factory Document.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory Document.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Document', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.firestore.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'name') + ..m<$core.String, Value>(2, _omitFieldNames ? '' : 'fields', entryClassName: 'Document.FieldsEntry', keyFieldType: $pb.PbFieldType.OS, valueFieldType: $pb.PbFieldType.OM, valueCreator: Value.create, valueDefaultOrMaker: Value.getDefault, packageName: const $pb.PackageName('google.firestore.v1')) + ..aOM<$6.Timestamp>(3, _omitFieldNames ? '' : 'createTime', subBuilder: $6.Timestamp.create) + ..aOM<$6.Timestamp>(4, _omitFieldNames ? '' : 'updateTime', subBuilder: $6.Timestamp.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Document clone() => Document()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Document copyWith(void Function(Document) updates) => super.copyWith((message) => updates(message as Document)) as Document; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static Document create() => Document._(); + Document createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static Document getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static Document? _defaultInstance; + + /// The resource name of the document, for example + /// `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + @$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); + + /// The document's fields. + /// + /// The map keys represent field names. + /// + /// Field names matching the regular expression `__.*__` are reserved. Reserved + /// field names are forbidden except in certain documented contexts. The field + /// names, represented as UTF-8, must not exceed 1,500 bytes and cannot be + /// empty. + /// + /// Field paths may be used in other contexts to refer to structured fields + /// defined here. For `map_value`, the field path is represented by a + /// dot-delimited (`.`) string of segments. Each segment is either a simple + /// field name (defined below) or a quoted field name. For example, the + /// structured field `"foo" : { map_value: { "x&y" : { string_value: "hello" + /// }}}` would be represented by the field path `` foo.`x&y` ``. + /// + /// A simple field name contains only characters `a` to `z`, `A` to `Z`, + /// `0` to `9`, or `_`, and must not start with `0` to `9`. For example, + /// `foo_bar_17`. + /// + /// A quoted field name starts and ends with `` ` `` and + /// may contain any character. Some characters, including `` ` ``, must be + /// escaped using a `\`. For example, `` `x&y` `` represents `x&y` and + /// `` `bak\`tik` `` represents `` bak`tik ``. + @$pb.TagNumber(2) + $pb.PbMap<$core.String, Value> get fields => $_getMap(1); + + /// Output only. The time at which the document was created. + /// + /// This value increases monotonically when a document is deleted then + /// recreated. It can also be compared to values from other documents and + /// the `read_time` of a query. + @$pb.TagNumber(3) + $6.Timestamp get createTime => $_getN(2); + @$pb.TagNumber(3) + set createTime($6.Timestamp v) { $_setField(3, v); } + @$pb.TagNumber(3) + $core.bool hasCreateTime() => $_has(2); + @$pb.TagNumber(3) + void clearCreateTime() => $_clearField(3); + @$pb.TagNumber(3) + $6.Timestamp ensureCreateTime() => $_ensure(2); + + /// Output only. The time at which the document was last changed. + /// + /// This value is initially set to the `create_time` then increases + /// monotonically with each change to the document. It can also be + /// compared to values from other documents and the `read_time` of a query. + @$pb.TagNumber(4) + $6.Timestamp get updateTime => $_getN(3); + @$pb.TagNumber(4) + set updateTime($6.Timestamp v) { $_setField(4, v); } + @$pb.TagNumber(4) + $core.bool hasUpdateTime() => $_has(3); + @$pb.TagNumber(4) + void clearUpdateTime() => $_clearField(4); + @$pb.TagNumber(4) + $6.Timestamp ensureUpdateTime() => $_ensure(3); +} + +enum Value_ValueType { + booleanValue, + integerValue, + doubleValue, + referenceValue, + mapValue, + geoPointValue, + arrayValue, + timestampValue, + nullValue, + stringValue, + bytesValue, + notSet +} + +/// A message that can hold any of the supported value types. +class Value extends $pb.GeneratedMessage { + factory Value({ + $core.bool? booleanValue, + $fixnum.Int64? integerValue, + $core.double? doubleValue, + $core.String? referenceValue, + MapValue? mapValue, + $7.LatLng? geoPointValue, + ArrayValue? arrayValue, + $6.Timestamp? timestampValue, + $8.NullValue? nullValue, + $core.String? stringValue, + $core.List<$core.int>? bytesValue, + }) { + final $result = create(); + if (booleanValue != null) { + $result.booleanValue = booleanValue; + } + if (integerValue != null) { + $result.integerValue = integerValue; + } + if (doubleValue != null) { + $result.doubleValue = doubleValue; + } + if (referenceValue != null) { + $result.referenceValue = referenceValue; + } + if (mapValue != null) { + $result.mapValue = mapValue; + } + if (geoPointValue != null) { + $result.geoPointValue = geoPointValue; + } + if (arrayValue != null) { + $result.arrayValue = arrayValue; + } + if (timestampValue != null) { + $result.timestampValue = timestampValue; + } + if (nullValue != null) { + $result.nullValue = nullValue; + } + if (stringValue != null) { + $result.stringValue = stringValue; + } + if (bytesValue != null) { + $result.bytesValue = bytesValue; + } + 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_ValueType> _Value_ValueTypeByTag = { + 1 : Value_ValueType.booleanValue, + 2 : Value_ValueType.integerValue, + 3 : Value_ValueType.doubleValue, + 5 : Value_ValueType.referenceValue, + 6 : Value_ValueType.mapValue, + 8 : Value_ValueType.geoPointValue, + 9 : Value_ValueType.arrayValue, + 10 : Value_ValueType.timestampValue, + 11 : Value_ValueType.nullValue, + 17 : Value_ValueType.stringValue, + 18 : Value_ValueType.bytesValue, + 0 : Value_ValueType.notSet + }; + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Value', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.firestore.v1'), createEmptyInstance: create) + ..oo(0, [1, 2, 3, 5, 6, 8, 9, 10, 11, 17, 18]) + ..aOB(1, _omitFieldNames ? '' : 'booleanValue') + ..aInt64(2, _omitFieldNames ? '' : 'integerValue') + ..a<$core.double>(3, _omitFieldNames ? '' : 'doubleValue', $pb.PbFieldType.OD) + ..aOS(5, _omitFieldNames ? '' : 'referenceValue') + ..aOM(6, _omitFieldNames ? '' : 'mapValue', subBuilder: MapValue.create) + ..aOM<$7.LatLng>(8, _omitFieldNames ? '' : 'geoPointValue', subBuilder: $7.LatLng.create) + ..aOM(9, _omitFieldNames ? '' : 'arrayValue', subBuilder: ArrayValue.create) + ..aOM<$6.Timestamp>(10, _omitFieldNames ? '' : 'timestampValue', subBuilder: $6.Timestamp.create) + ..e<$8.NullValue>(11, _omitFieldNames ? '' : 'nullValue', $pb.PbFieldType.OE, defaultOrMaker: $8.NullValue.NULL_VALUE, valueOf: $8.NullValue.valueOf, enumValues: $8.NullValue.values) + ..aOS(17, _omitFieldNames ? '' : 'stringValue') + ..a<$core.List<$core.int>>(18, _omitFieldNames ? '' : 'bytesValue', $pb.PbFieldType.OY) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Value clone() => Value()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Value copyWith(void Function(Value) updates) => super.copyWith((message) => updates(message as Value)) as Value; + + $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_ValueType whichValueType() => _Value_ValueTypeByTag[$_whichOneof(0)]!; + void clearValueType() => $_clearField($_whichOneof(0)); + + /// A boolean value. + @$pb.TagNumber(1) + $core.bool get booleanValue => $_getBF(0); + @$pb.TagNumber(1) + set booleanValue($core.bool v) { $_setBool(0, v); } + @$pb.TagNumber(1) + $core.bool hasBooleanValue() => $_has(0); + @$pb.TagNumber(1) + void clearBooleanValue() => $_clearField(1); + + /// An integer value. + @$pb.TagNumber(2) + $fixnum.Int64 get integerValue => $_getI64(1); + @$pb.TagNumber(2) + set integerValue($fixnum.Int64 v) { $_setInt64(1, v); } + @$pb.TagNumber(2) + $core.bool hasIntegerValue() => $_has(1); + @$pb.TagNumber(2) + void clearIntegerValue() => $_clearField(2); + + /// A double value. + @$pb.TagNumber(3) + $core.double get doubleValue => $_getN(2); + @$pb.TagNumber(3) + set doubleValue($core.double v) { $_setDouble(2, v); } + @$pb.TagNumber(3) + $core.bool hasDoubleValue() => $_has(2); + @$pb.TagNumber(3) + void clearDoubleValue() => $_clearField(3); + + /// A reference to a document. For example: + /// `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + @$pb.TagNumber(5) + $core.String get referenceValue => $_getSZ(3); + @$pb.TagNumber(5) + set referenceValue($core.String v) { $_setString(3, v); } + @$pb.TagNumber(5) + $core.bool hasReferenceValue() => $_has(3); + @$pb.TagNumber(5) + void clearReferenceValue() => $_clearField(5); + + /// A map value. + @$pb.TagNumber(6) + MapValue get mapValue => $_getN(4); + @$pb.TagNumber(6) + set mapValue(MapValue v) { $_setField(6, v); } + @$pb.TagNumber(6) + $core.bool hasMapValue() => $_has(4); + @$pb.TagNumber(6) + void clearMapValue() => $_clearField(6); + @$pb.TagNumber(6) + MapValue ensureMapValue() => $_ensure(4); + + /// A geo point value representing a point on the surface of Earth. + @$pb.TagNumber(8) + $7.LatLng get geoPointValue => $_getN(5); + @$pb.TagNumber(8) + set geoPointValue($7.LatLng v) { $_setField(8, v); } + @$pb.TagNumber(8) + $core.bool hasGeoPointValue() => $_has(5); + @$pb.TagNumber(8) + void clearGeoPointValue() => $_clearField(8); + @$pb.TagNumber(8) + $7.LatLng ensureGeoPointValue() => $_ensure(5); + + /// An array value. + /// + /// Cannot directly contain another array value, though can contain a + /// map which contains another array. + @$pb.TagNumber(9) + ArrayValue get arrayValue => $_getN(6); + @$pb.TagNumber(9) + set arrayValue(ArrayValue v) { $_setField(9, v); } + @$pb.TagNumber(9) + $core.bool hasArrayValue() => $_has(6); + @$pb.TagNumber(9) + void clearArrayValue() => $_clearField(9); + @$pb.TagNumber(9) + ArrayValue ensureArrayValue() => $_ensure(6); + + /// A timestamp value. + /// + /// Precise only to microseconds. When stored, any additional precision is + /// rounded down. + @$pb.TagNumber(10) + $6.Timestamp get timestampValue => $_getN(7); + @$pb.TagNumber(10) + set timestampValue($6.Timestamp v) { $_setField(10, v); } + @$pb.TagNumber(10) + $core.bool hasTimestampValue() => $_has(7); + @$pb.TagNumber(10) + void clearTimestampValue() => $_clearField(10); + @$pb.TagNumber(10) + $6.Timestamp ensureTimestampValue() => $_ensure(7); + + /// A null value. + @$pb.TagNumber(11) + $8.NullValue get nullValue => $_getN(8); + @$pb.TagNumber(11) + set nullValue($8.NullValue v) { $_setField(11, v); } + @$pb.TagNumber(11) + $core.bool hasNullValue() => $_has(8); + @$pb.TagNumber(11) + void clearNullValue() => $_clearField(11); + + /// A string value. + /// + /// The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. + /// Only the first 1,500 bytes of the UTF-8 representation are considered by + /// queries. + @$pb.TagNumber(17) + $core.String get stringValue => $_getSZ(9); + @$pb.TagNumber(17) + set stringValue($core.String v) { $_setString(9, v); } + @$pb.TagNumber(17) + $core.bool hasStringValue() => $_has(9); + @$pb.TagNumber(17) + void clearStringValue() => $_clearField(17); + + /// A bytes value. + /// + /// Must not exceed 1 MiB - 89 bytes. + /// Only the first 1,500 bytes are considered by queries. + @$pb.TagNumber(18) + $core.List<$core.int> get bytesValue => $_getN(10); + @$pb.TagNumber(18) + set bytesValue($core.List<$core.int> v) { $_setBytes(10, v); } + @$pb.TagNumber(18) + $core.bool hasBytesValue() => $_has(10); + @$pb.TagNumber(18) + void clearBytesValue() => $_clearField(18); +} + +/// An array value. +class ArrayValue extends $pb.GeneratedMessage { + factory ArrayValue({ + $core.Iterable? values, + }) { + final $result = create(); + if (values != null) { + $result.values.addAll(values); + } + return $result; + } + ArrayValue._() : super(); + factory ArrayValue.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ArrayValue.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ArrayValue', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.firestore.v1'), createEmptyInstance: create) + ..pc(1, _omitFieldNames ? '' : 'values', $pb.PbFieldType.PM, subBuilder: Value.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ArrayValue clone() => ArrayValue()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ArrayValue copyWith(void Function(ArrayValue) updates) => super.copyWith((message) => updates(message as ArrayValue)) as ArrayValue; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static ArrayValue create() => ArrayValue._(); + ArrayValue createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static ArrayValue getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static ArrayValue? _defaultInstance; + + /// Values in the array. + @$pb.TagNumber(1) + $pb.PbList get values => $_getList(0); +} + +/// A map value. +class MapValue extends $pb.GeneratedMessage { + factory MapValue({ + $core.Iterable<$core.MapEntry<$core.String, Value>>? fields, + }) { + final $result = create(); + if (fields != null) { + $result.fields.addEntries(fields); + } + return $result; + } + MapValue._() : super(); + factory MapValue.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory MapValue.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'MapValue', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.firestore.v1'), createEmptyInstance: create) + ..m<$core.String, Value>(1, _omitFieldNames ? '' : 'fields', entryClassName: 'MapValue.FieldsEntry', keyFieldType: $pb.PbFieldType.OS, valueFieldType: $pb.PbFieldType.OM, valueCreator: Value.create, valueDefaultOrMaker: Value.getDefault, packageName: const $pb.PackageName('google.firestore.v1')) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + MapValue clone() => MapValue()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + MapValue copyWith(void Function(MapValue) updates) => super.copyWith((message) => updates(message as MapValue)) as MapValue; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static MapValue create() => MapValue._(); + MapValue createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static MapValue getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static MapValue? _defaultInstance; + + /// The map's fields. + /// + /// The map keys represent field names. Field names matching the regular + /// expression `__.*__` are reserved. Reserved field names are forbidden except + /// in certain documented contexts. The map keys, represented as UTF-8, must + /// not exceed 1,500 bytes and cannot be empty. + @$pb.TagNumber(1) + $pb.PbMap<$core.String, Value> get fields => $_getMap(0); +} + + +const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); +const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/pkgs/googleapis_firestore_v1/lib/google/firestore/v1/document.pbenum.dart b/pkgs/googleapis_firestore_v1/lib/google/firestore/v1/document.pbenum.dart new file mode 100644 index 00000000..7df79a39 --- /dev/null +++ b/pkgs/googleapis_firestore_v1/lib/google/firestore/v1/document.pbenum.dart @@ -0,0 +1,11 @@ +// +// Generated code. Do not modify. +// source: google/firestore/v1/document.proto +// +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + diff --git a/pkgs/googleapis_firestore_v1/lib/google/firestore/v1/firestore.pb.dart b/pkgs/googleapis_firestore_v1/lib/google/firestore/v1/firestore.pb.dart new file mode 100644 index 00000000..7b2b3304 --- /dev/null +++ b/pkgs/googleapis_firestore_v1/lib/google/firestore/v1/firestore.pb.dart @@ -0,0 +1,3394 @@ +// +// Generated code. Do not modify. +// source: google/firestore/v1/firestore.proto +// +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:core' as $core; + +import 'package:fixnum/fixnum.dart' as $fixnum; +import 'package:protobuf/protobuf.dart' as $pb; + +import '../../protobuf/timestamp.pb.dart' as $6; +import '../../protobuf/wrappers.pb.dart' as $14; +import '../../rpc/status.pb.dart' as $15; +import 'aggregation_result.pb.dart' as $13; +import 'common.pb.dart' as $9; +import 'document.pb.dart' as $1; +import 'firestore.pbenum.dart'; +import 'query.pb.dart' as $11; +import 'query_profile.pb.dart' as $12; +import 'write.pb.dart' as $10; + +export 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions; + +export 'firestore.pbenum.dart'; + +enum GetDocumentRequest_ConsistencySelector { + transaction, + readTime, + notSet +} + +/// The request for +/// [Firestore.GetDocument][google.firestore.v1.Firestore.GetDocument]. +class GetDocumentRequest extends $pb.GeneratedMessage { + factory GetDocumentRequest({ + $core.String? name, + $9.DocumentMask? mask, + $core.List<$core.int>? transaction, + $6.Timestamp? readTime, + }) { + final $result = create(); + if (name != null) { + $result.name = name; + } + if (mask != null) { + $result.mask = mask; + } + if (transaction != null) { + $result.transaction = transaction; + } + if (readTime != null) { + $result.readTime = readTime; + } + return $result; + } + GetDocumentRequest._() : super(); + factory GetDocumentRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetDocumentRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static const $core.Map<$core.int, GetDocumentRequest_ConsistencySelector> _GetDocumentRequest_ConsistencySelectorByTag = { + 3 : GetDocumentRequest_ConsistencySelector.transaction, + 5 : GetDocumentRequest_ConsistencySelector.readTime, + 0 : GetDocumentRequest_ConsistencySelector.notSet + }; + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GetDocumentRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.firestore.v1'), createEmptyInstance: create) + ..oo(0, [3, 5]) + ..aOS(1, _omitFieldNames ? '' : 'name') + ..aOM<$9.DocumentMask>(2, _omitFieldNames ? '' : 'mask', subBuilder: $9.DocumentMask.create) + ..a<$core.List<$core.int>>(3, _omitFieldNames ? '' : 'transaction', $pb.PbFieldType.OY) + ..aOM<$6.Timestamp>(5, _omitFieldNames ? '' : 'readTime', subBuilder: $6.Timestamp.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + GetDocumentRequest clone() => GetDocumentRequest()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + GetDocumentRequest copyWith(void Function(GetDocumentRequest) updates) => super.copyWith((message) => updates(message as GetDocumentRequest)) as GetDocumentRequest; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static GetDocumentRequest create() => GetDocumentRequest._(); + GetDocumentRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetDocumentRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetDocumentRequest? _defaultInstance; + + GetDocumentRequest_ConsistencySelector whichConsistencySelector() => _GetDocumentRequest_ConsistencySelectorByTag[$_whichOneof(0)]!; + void clearConsistencySelector() => $_clearField($_whichOneof(0)); + + /// Required. The resource name of the Document to get. In the format: + /// `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + @$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); + + /// The fields to return. If not set, returns all fields. + /// + /// If the document has a field that is not present in this mask, that field + /// will not be returned in the response. + @$pb.TagNumber(2) + $9.DocumentMask get mask => $_getN(1); + @$pb.TagNumber(2) + set mask($9.DocumentMask v) { $_setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasMask() => $_has(1); + @$pb.TagNumber(2) + void clearMask() => $_clearField(2); + @$pb.TagNumber(2) + $9.DocumentMask ensureMask() => $_ensure(1); + + /// Reads the document in a transaction. + @$pb.TagNumber(3) + $core.List<$core.int> get transaction => $_getN(2); + @$pb.TagNumber(3) + set transaction($core.List<$core.int> v) { $_setBytes(2, v); } + @$pb.TagNumber(3) + $core.bool hasTransaction() => $_has(2); + @$pb.TagNumber(3) + void clearTransaction() => $_clearField(3); + + /// Reads the version of the document at the given time. + /// + /// This must be a microsecond precision timestamp within the past one hour, + /// or if Point-in-Time Recovery is enabled, can additionally be a whole + /// minute timestamp within the past 7 days. + @$pb.TagNumber(5) + $6.Timestamp get readTime => $_getN(3); + @$pb.TagNumber(5) + set readTime($6.Timestamp v) { $_setField(5, v); } + @$pb.TagNumber(5) + $core.bool hasReadTime() => $_has(3); + @$pb.TagNumber(5) + void clearReadTime() => $_clearField(5); + @$pb.TagNumber(5) + $6.Timestamp ensureReadTime() => $_ensure(3); +} + +enum ListDocumentsRequest_ConsistencySelector { + transaction, + readTime, + notSet +} + +/// The request for +/// [Firestore.ListDocuments][google.firestore.v1.Firestore.ListDocuments]. +class ListDocumentsRequest extends $pb.GeneratedMessage { + factory ListDocumentsRequest({ + $core.String? parent, + $core.String? collectionId, + $core.int? pageSize, + $core.String? pageToken, + $core.String? orderBy, + $9.DocumentMask? mask, + $core.List<$core.int>? transaction, + $6.Timestamp? readTime, + $core.bool? showMissing, + }) { + final $result = create(); + if (parent != null) { + $result.parent = parent; + } + if (collectionId != null) { + $result.collectionId = collectionId; + } + if (pageSize != null) { + $result.pageSize = pageSize; + } + if (pageToken != null) { + $result.pageToken = pageToken; + } + if (orderBy != null) { + $result.orderBy = orderBy; + } + if (mask != null) { + $result.mask = mask; + } + if (transaction != null) { + $result.transaction = transaction; + } + if (readTime != null) { + $result.readTime = readTime; + } + if (showMissing != null) { + $result.showMissing = showMissing; + } + return $result; + } + ListDocumentsRequest._() : super(); + factory ListDocumentsRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ListDocumentsRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static const $core.Map<$core.int, ListDocumentsRequest_ConsistencySelector> _ListDocumentsRequest_ConsistencySelectorByTag = { + 8 : ListDocumentsRequest_ConsistencySelector.transaction, + 10 : ListDocumentsRequest_ConsistencySelector.readTime, + 0 : ListDocumentsRequest_ConsistencySelector.notSet + }; + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ListDocumentsRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.firestore.v1'), createEmptyInstance: create) + ..oo(0, [8, 10]) + ..aOS(1, _omitFieldNames ? '' : 'parent') + ..aOS(2, _omitFieldNames ? '' : 'collectionId') + ..a<$core.int>(3, _omitFieldNames ? '' : 'pageSize', $pb.PbFieldType.O3) + ..aOS(4, _omitFieldNames ? '' : 'pageToken') + ..aOS(6, _omitFieldNames ? '' : 'orderBy') + ..aOM<$9.DocumentMask>(7, _omitFieldNames ? '' : 'mask', subBuilder: $9.DocumentMask.create) + ..a<$core.List<$core.int>>(8, _omitFieldNames ? '' : 'transaction', $pb.PbFieldType.OY) + ..aOM<$6.Timestamp>(10, _omitFieldNames ? '' : 'readTime', subBuilder: $6.Timestamp.create) + ..aOB(12, _omitFieldNames ? '' : 'showMissing') + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ListDocumentsRequest clone() => ListDocumentsRequest()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ListDocumentsRequest copyWith(void Function(ListDocumentsRequest) updates) => super.copyWith((message) => updates(message as ListDocumentsRequest)) as ListDocumentsRequest; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static ListDocumentsRequest create() => ListDocumentsRequest._(); + ListDocumentsRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static ListDocumentsRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static ListDocumentsRequest? _defaultInstance; + + ListDocumentsRequest_ConsistencySelector whichConsistencySelector() => _ListDocumentsRequest_ConsistencySelectorByTag[$_whichOneof(0)]!; + void clearConsistencySelector() => $_clearField($_whichOneof(0)); + + /// Required. The parent resource name. In the format: + /// `projects/{project_id}/databases/{database_id}/documents` or + /// `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + /// + /// For example: + /// `projects/my-project/databases/my-database/documents` or + /// `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + @$pb.TagNumber(1) + $core.String get parent => $_getSZ(0); + @$pb.TagNumber(1) + set parent($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasParent() => $_has(0); + @$pb.TagNumber(1) + void clearParent() => $_clearField(1); + + /// Optional. The collection ID, relative to `parent`, to list. + /// + /// For example: `chatrooms` or `messages`. + /// + /// This is optional, and when not provided, Firestore will list documents + /// from all collections under the provided `parent`. + @$pb.TagNumber(2) + $core.String get collectionId => $_getSZ(1); + @$pb.TagNumber(2) + set collectionId($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasCollectionId() => $_has(1); + @$pb.TagNumber(2) + void clearCollectionId() => $_clearField(2); + + /// Optional. The maximum number of documents to return in a single response. + /// + /// Firestore may return fewer than this value. + @$pb.TagNumber(3) + $core.int get pageSize => $_getIZ(2); + @$pb.TagNumber(3) + set pageSize($core.int v) { $_setSignedInt32(2, v); } + @$pb.TagNumber(3) + $core.bool hasPageSize() => $_has(2); + @$pb.TagNumber(3) + void clearPageSize() => $_clearField(3); + + /// Optional. A page token, received from a previous `ListDocuments` response. + /// + /// Provide this to retrieve the subsequent page. When paginating, all other + /// parameters (with the exception of `page_size`) must match the values set + /// in the request that generated the page token. + @$pb.TagNumber(4) + $core.String get pageToken => $_getSZ(3); + @$pb.TagNumber(4) + set pageToken($core.String v) { $_setString(3, v); } + @$pb.TagNumber(4) + $core.bool hasPageToken() => $_has(3); + @$pb.TagNumber(4) + void clearPageToken() => $_clearField(4); + + /// Optional. The optional ordering of the documents to return. + /// + /// For example: `priority desc, __name__ desc`. + /// + /// This mirrors the [`ORDER BY`][google.firestore.v1.StructuredQuery.order_by] + /// used in Firestore queries but in a string representation. When absent, + /// documents are ordered based on `__name__ ASC`. + @$pb.TagNumber(6) + $core.String get orderBy => $_getSZ(4); + @$pb.TagNumber(6) + set orderBy($core.String v) { $_setString(4, v); } + @$pb.TagNumber(6) + $core.bool hasOrderBy() => $_has(4); + @$pb.TagNumber(6) + void clearOrderBy() => $_clearField(6); + + /// Optional. The fields to return. If not set, returns all fields. + /// + /// If a document has a field that is not present in this mask, that field + /// will not be returned in the response. + @$pb.TagNumber(7) + $9.DocumentMask get mask => $_getN(5); + @$pb.TagNumber(7) + set mask($9.DocumentMask v) { $_setField(7, v); } + @$pb.TagNumber(7) + $core.bool hasMask() => $_has(5); + @$pb.TagNumber(7) + void clearMask() => $_clearField(7); + @$pb.TagNumber(7) + $9.DocumentMask ensureMask() => $_ensure(5); + + /// Perform the read as part of an already active transaction. + @$pb.TagNumber(8) + $core.List<$core.int> get transaction => $_getN(6); + @$pb.TagNumber(8) + set transaction($core.List<$core.int> v) { $_setBytes(6, v); } + @$pb.TagNumber(8) + $core.bool hasTransaction() => $_has(6); + @$pb.TagNumber(8) + void clearTransaction() => $_clearField(8); + + /// Perform the read at the provided time. + /// + /// This must be a microsecond precision timestamp within the past one hour, + /// or if Point-in-Time Recovery is enabled, can additionally be a whole + /// minute timestamp within the past 7 days. + @$pb.TagNumber(10) + $6.Timestamp get readTime => $_getN(7); + @$pb.TagNumber(10) + set readTime($6.Timestamp v) { $_setField(10, v); } + @$pb.TagNumber(10) + $core.bool hasReadTime() => $_has(7); + @$pb.TagNumber(10) + void clearReadTime() => $_clearField(10); + @$pb.TagNumber(10) + $6.Timestamp ensureReadTime() => $_ensure(7); + + /// If the list should show missing documents. + /// + /// A document is missing if it does not exist, but there are sub-documents + /// nested underneath it. When true, such missing documents will be returned + /// with a key but will not have fields, + /// [`create_time`][google.firestore.v1.Document.create_time], or + /// [`update_time`][google.firestore.v1.Document.update_time] set. + /// + /// Requests with `show_missing` may not specify `where` or `order_by`. + @$pb.TagNumber(12) + $core.bool get showMissing => $_getBF(8); + @$pb.TagNumber(12) + set showMissing($core.bool v) { $_setBool(8, v); } + @$pb.TagNumber(12) + $core.bool hasShowMissing() => $_has(8); + @$pb.TagNumber(12) + void clearShowMissing() => $_clearField(12); +} + +/// The response for +/// [Firestore.ListDocuments][google.firestore.v1.Firestore.ListDocuments]. +class ListDocumentsResponse extends $pb.GeneratedMessage { + factory ListDocumentsResponse({ + $core.Iterable<$1.Document>? documents, + $core.String? nextPageToken, + }) { + final $result = create(); + if (documents != null) { + $result.documents.addAll(documents); + } + if (nextPageToken != null) { + $result.nextPageToken = nextPageToken; + } + return $result; + } + ListDocumentsResponse._() : super(); + factory ListDocumentsResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ListDocumentsResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ListDocumentsResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.firestore.v1'), createEmptyInstance: create) + ..pc<$1.Document>(1, _omitFieldNames ? '' : 'documents', $pb.PbFieldType.PM, subBuilder: $1.Document.create) + ..aOS(2, _omitFieldNames ? '' : 'nextPageToken') + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ListDocumentsResponse clone() => ListDocumentsResponse()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ListDocumentsResponse copyWith(void Function(ListDocumentsResponse) updates) => super.copyWith((message) => updates(message as ListDocumentsResponse)) as ListDocumentsResponse; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static ListDocumentsResponse create() => ListDocumentsResponse._(); + ListDocumentsResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static ListDocumentsResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static ListDocumentsResponse? _defaultInstance; + + /// The Documents found. + @$pb.TagNumber(1) + $pb.PbList<$1.Document> get documents => $_getList(0); + + /// A token to retrieve the next page of documents. + /// + /// If this field is omitted, there are no subsequent pages. + @$pb.TagNumber(2) + $core.String get nextPageToken => $_getSZ(1); + @$pb.TagNumber(2) + set nextPageToken($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasNextPageToken() => $_has(1); + @$pb.TagNumber(2) + void clearNextPageToken() => $_clearField(2); +} + +/// The request for +/// [Firestore.CreateDocument][google.firestore.v1.Firestore.CreateDocument]. +class CreateDocumentRequest extends $pb.GeneratedMessage { + factory CreateDocumentRequest({ + $core.String? parent, + $core.String? collectionId, + $core.String? documentId, + $1.Document? document, + $9.DocumentMask? mask, + }) { + final $result = create(); + if (parent != null) { + $result.parent = parent; + } + if (collectionId != null) { + $result.collectionId = collectionId; + } + if (documentId != null) { + $result.documentId = documentId; + } + if (document != null) { + $result.document = document; + } + if (mask != null) { + $result.mask = mask; + } + return $result; + } + CreateDocumentRequest._() : super(); + factory CreateDocumentRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory CreateDocumentRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'CreateDocumentRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.firestore.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'parent') + ..aOS(2, _omitFieldNames ? '' : 'collectionId') + ..aOS(3, _omitFieldNames ? '' : 'documentId') + ..aOM<$1.Document>(4, _omitFieldNames ? '' : 'document', subBuilder: $1.Document.create) + ..aOM<$9.DocumentMask>(5, _omitFieldNames ? '' : 'mask', subBuilder: $9.DocumentMask.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + CreateDocumentRequest clone() => CreateDocumentRequest()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + CreateDocumentRequest copyWith(void Function(CreateDocumentRequest) updates) => super.copyWith((message) => updates(message as CreateDocumentRequest)) as CreateDocumentRequest; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static CreateDocumentRequest create() => CreateDocumentRequest._(); + CreateDocumentRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static CreateDocumentRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static CreateDocumentRequest? _defaultInstance; + + /// Required. The parent resource. For example: + /// `projects/{project_id}/databases/{database_id}/documents` or + /// `projects/{project_id}/databases/{database_id}/documents/chatrooms/{chatroom_id}` + @$pb.TagNumber(1) + $core.String get parent => $_getSZ(0); + @$pb.TagNumber(1) + set parent($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasParent() => $_has(0); + @$pb.TagNumber(1) + void clearParent() => $_clearField(1); + + /// Required. The collection ID, relative to `parent`, to list. For example: + /// `chatrooms`. + @$pb.TagNumber(2) + $core.String get collectionId => $_getSZ(1); + @$pb.TagNumber(2) + set collectionId($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasCollectionId() => $_has(1); + @$pb.TagNumber(2) + void clearCollectionId() => $_clearField(2); + + /// The client-assigned document ID to use for this document. + /// + /// Optional. If not specified, an ID will be assigned by the service. + @$pb.TagNumber(3) + $core.String get documentId => $_getSZ(2); + @$pb.TagNumber(3) + set documentId($core.String v) { $_setString(2, v); } + @$pb.TagNumber(3) + $core.bool hasDocumentId() => $_has(2); + @$pb.TagNumber(3) + void clearDocumentId() => $_clearField(3); + + /// Required. The document to create. `name` must not be set. + @$pb.TagNumber(4) + $1.Document get document => $_getN(3); + @$pb.TagNumber(4) + set document($1.Document v) { $_setField(4, v); } + @$pb.TagNumber(4) + $core.bool hasDocument() => $_has(3); + @$pb.TagNumber(4) + void clearDocument() => $_clearField(4); + @$pb.TagNumber(4) + $1.Document ensureDocument() => $_ensure(3); + + /// The fields to return. If not set, returns all fields. + /// + /// If the document has a field that is not present in this mask, that field + /// will not be returned in the response. + @$pb.TagNumber(5) + $9.DocumentMask get mask => $_getN(4); + @$pb.TagNumber(5) + set mask($9.DocumentMask v) { $_setField(5, v); } + @$pb.TagNumber(5) + $core.bool hasMask() => $_has(4); + @$pb.TagNumber(5) + void clearMask() => $_clearField(5); + @$pb.TagNumber(5) + $9.DocumentMask ensureMask() => $_ensure(4); +} + +/// The request for +/// [Firestore.UpdateDocument][google.firestore.v1.Firestore.UpdateDocument]. +class UpdateDocumentRequest extends $pb.GeneratedMessage { + factory UpdateDocumentRequest({ + $1.Document? document, + $9.DocumentMask? updateMask, + $9.DocumentMask? mask, + $9.Precondition? currentDocument, + }) { + final $result = create(); + if (document != null) { + $result.document = document; + } + if (updateMask != null) { + $result.updateMask = updateMask; + } + if (mask != null) { + $result.mask = mask; + } + if (currentDocument != null) { + $result.currentDocument = currentDocument; + } + return $result; + } + UpdateDocumentRequest._() : super(); + factory UpdateDocumentRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory UpdateDocumentRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'UpdateDocumentRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.firestore.v1'), createEmptyInstance: create) + ..aOM<$1.Document>(1, _omitFieldNames ? '' : 'document', subBuilder: $1.Document.create) + ..aOM<$9.DocumentMask>(2, _omitFieldNames ? '' : 'updateMask', subBuilder: $9.DocumentMask.create) + ..aOM<$9.DocumentMask>(3, _omitFieldNames ? '' : 'mask', subBuilder: $9.DocumentMask.create) + ..aOM<$9.Precondition>(4, _omitFieldNames ? '' : 'currentDocument', subBuilder: $9.Precondition.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + UpdateDocumentRequest clone() => UpdateDocumentRequest()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + UpdateDocumentRequest copyWith(void Function(UpdateDocumentRequest) updates) => super.copyWith((message) => updates(message as UpdateDocumentRequest)) as UpdateDocumentRequest; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static UpdateDocumentRequest create() => UpdateDocumentRequest._(); + UpdateDocumentRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static UpdateDocumentRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static UpdateDocumentRequest? _defaultInstance; + + /// Required. The updated document. + /// Creates the document if it does not already exist. + @$pb.TagNumber(1) + $1.Document get document => $_getN(0); + @$pb.TagNumber(1) + set document($1.Document v) { $_setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasDocument() => $_has(0); + @$pb.TagNumber(1) + void clearDocument() => $_clearField(1); + @$pb.TagNumber(1) + $1.Document ensureDocument() => $_ensure(0); + + /// The fields to update. + /// None of the field paths in the mask may contain a reserved name. + /// + /// If the document exists on the server and has fields not referenced in the + /// mask, they are left unchanged. + /// Fields referenced in the mask, but not present in the input document, are + /// deleted from the document on the server. + @$pb.TagNumber(2) + $9.DocumentMask get updateMask => $_getN(1); + @$pb.TagNumber(2) + set updateMask($9.DocumentMask v) { $_setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasUpdateMask() => $_has(1); + @$pb.TagNumber(2) + void clearUpdateMask() => $_clearField(2); + @$pb.TagNumber(2) + $9.DocumentMask ensureUpdateMask() => $_ensure(1); + + /// The fields to return. If not set, returns all fields. + /// + /// If the document has a field that is not present in this mask, that field + /// will not be returned in the response. + @$pb.TagNumber(3) + $9.DocumentMask get mask => $_getN(2); + @$pb.TagNumber(3) + set mask($9.DocumentMask v) { $_setField(3, v); } + @$pb.TagNumber(3) + $core.bool hasMask() => $_has(2); + @$pb.TagNumber(3) + void clearMask() => $_clearField(3); + @$pb.TagNumber(3) + $9.DocumentMask ensureMask() => $_ensure(2); + + /// An optional precondition on the document. + /// The request will fail if this is set and not met by the target document. + @$pb.TagNumber(4) + $9.Precondition get currentDocument => $_getN(3); + @$pb.TagNumber(4) + set currentDocument($9.Precondition v) { $_setField(4, v); } + @$pb.TagNumber(4) + $core.bool hasCurrentDocument() => $_has(3); + @$pb.TagNumber(4) + void clearCurrentDocument() => $_clearField(4); + @$pb.TagNumber(4) + $9.Precondition ensureCurrentDocument() => $_ensure(3); +} + +/// The request for +/// [Firestore.DeleteDocument][google.firestore.v1.Firestore.DeleteDocument]. +class DeleteDocumentRequest extends $pb.GeneratedMessage { + factory DeleteDocumentRequest({ + $core.String? name, + $9.Precondition? currentDocument, + }) { + final $result = create(); + if (name != null) { + $result.name = name; + } + if (currentDocument != null) { + $result.currentDocument = currentDocument; + } + return $result; + } + DeleteDocumentRequest._() : super(); + factory DeleteDocumentRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory DeleteDocumentRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'DeleteDocumentRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.firestore.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'name') + ..aOM<$9.Precondition>(2, _omitFieldNames ? '' : 'currentDocument', subBuilder: $9.Precondition.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + DeleteDocumentRequest clone() => DeleteDocumentRequest()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + DeleteDocumentRequest copyWith(void Function(DeleteDocumentRequest) updates) => super.copyWith((message) => updates(message as DeleteDocumentRequest)) as DeleteDocumentRequest; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static DeleteDocumentRequest create() => DeleteDocumentRequest._(); + DeleteDocumentRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static DeleteDocumentRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static DeleteDocumentRequest? _defaultInstance; + + /// Required. The resource name of the Document to delete. In the format: + /// `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + @$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); + + /// An optional precondition on the document. + /// The request will fail if this is set and not met by the target document. + @$pb.TagNumber(2) + $9.Precondition get currentDocument => $_getN(1); + @$pb.TagNumber(2) + set currentDocument($9.Precondition v) { $_setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasCurrentDocument() => $_has(1); + @$pb.TagNumber(2) + void clearCurrentDocument() => $_clearField(2); + @$pb.TagNumber(2) + $9.Precondition ensureCurrentDocument() => $_ensure(1); +} + +enum BatchGetDocumentsRequest_ConsistencySelector { + transaction, + newTransaction, + readTime, + notSet +} + +/// The request for +/// [Firestore.BatchGetDocuments][google.firestore.v1.Firestore.BatchGetDocuments]. +class BatchGetDocumentsRequest extends $pb.GeneratedMessage { + factory BatchGetDocumentsRequest({ + $core.String? database, + $core.Iterable<$core.String>? documents, + $9.DocumentMask? mask, + $core.List<$core.int>? transaction, + $9.TransactionOptions? newTransaction, + $6.Timestamp? readTime, + }) { + final $result = create(); + if (database != null) { + $result.database = database; + } + if (documents != null) { + $result.documents.addAll(documents); + } + if (mask != null) { + $result.mask = mask; + } + if (transaction != null) { + $result.transaction = transaction; + } + if (newTransaction != null) { + $result.newTransaction = newTransaction; + } + if (readTime != null) { + $result.readTime = readTime; + } + return $result; + } + BatchGetDocumentsRequest._() : super(); + factory BatchGetDocumentsRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory BatchGetDocumentsRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static const $core.Map<$core.int, BatchGetDocumentsRequest_ConsistencySelector> _BatchGetDocumentsRequest_ConsistencySelectorByTag = { + 4 : BatchGetDocumentsRequest_ConsistencySelector.transaction, + 5 : BatchGetDocumentsRequest_ConsistencySelector.newTransaction, + 7 : BatchGetDocumentsRequest_ConsistencySelector.readTime, + 0 : BatchGetDocumentsRequest_ConsistencySelector.notSet + }; + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'BatchGetDocumentsRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.firestore.v1'), createEmptyInstance: create) + ..oo(0, [4, 5, 7]) + ..aOS(1, _omitFieldNames ? '' : 'database') + ..pPS(2, _omitFieldNames ? '' : 'documents') + ..aOM<$9.DocumentMask>(3, _omitFieldNames ? '' : 'mask', subBuilder: $9.DocumentMask.create) + ..a<$core.List<$core.int>>(4, _omitFieldNames ? '' : 'transaction', $pb.PbFieldType.OY) + ..aOM<$9.TransactionOptions>(5, _omitFieldNames ? '' : 'newTransaction', subBuilder: $9.TransactionOptions.create) + ..aOM<$6.Timestamp>(7, _omitFieldNames ? '' : 'readTime', subBuilder: $6.Timestamp.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + BatchGetDocumentsRequest clone() => BatchGetDocumentsRequest()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + BatchGetDocumentsRequest copyWith(void Function(BatchGetDocumentsRequest) updates) => super.copyWith((message) => updates(message as BatchGetDocumentsRequest)) as BatchGetDocumentsRequest; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static BatchGetDocumentsRequest create() => BatchGetDocumentsRequest._(); + BatchGetDocumentsRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static BatchGetDocumentsRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static BatchGetDocumentsRequest? _defaultInstance; + + BatchGetDocumentsRequest_ConsistencySelector whichConsistencySelector() => _BatchGetDocumentsRequest_ConsistencySelectorByTag[$_whichOneof(0)]!; + void clearConsistencySelector() => $_clearField($_whichOneof(0)); + + /// Required. The database name. In the format: + /// `projects/{project_id}/databases/{database_id}`. + @$pb.TagNumber(1) + $core.String get database => $_getSZ(0); + @$pb.TagNumber(1) + set database($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasDatabase() => $_has(0); + @$pb.TagNumber(1) + void clearDatabase() => $_clearField(1); + + /// The names of the documents to retrieve. In the format: + /// `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + /// The request will fail if any of the document is not a child resource of the + /// given `database`. Duplicate names will be elided. + @$pb.TagNumber(2) + $pb.PbList<$core.String> get documents => $_getList(1); + + /// The fields to return. If not set, returns all fields. + /// + /// If a document has a field that is not present in this mask, that field will + /// not be returned in the response. + @$pb.TagNumber(3) + $9.DocumentMask get mask => $_getN(2); + @$pb.TagNumber(3) + set mask($9.DocumentMask v) { $_setField(3, v); } + @$pb.TagNumber(3) + $core.bool hasMask() => $_has(2); + @$pb.TagNumber(3) + void clearMask() => $_clearField(3); + @$pb.TagNumber(3) + $9.DocumentMask ensureMask() => $_ensure(2); + + /// Reads documents in a transaction. + @$pb.TagNumber(4) + $core.List<$core.int> get transaction => $_getN(3); + @$pb.TagNumber(4) + set transaction($core.List<$core.int> v) { $_setBytes(3, v); } + @$pb.TagNumber(4) + $core.bool hasTransaction() => $_has(3); + @$pb.TagNumber(4) + void clearTransaction() => $_clearField(4); + + /// Starts a new transaction and reads the documents. + /// Defaults to a read-only transaction. + /// The new transaction ID will be returned as the first response in the + /// stream. + @$pb.TagNumber(5) + $9.TransactionOptions get newTransaction => $_getN(4); + @$pb.TagNumber(5) + set newTransaction($9.TransactionOptions v) { $_setField(5, v); } + @$pb.TagNumber(5) + $core.bool hasNewTransaction() => $_has(4); + @$pb.TagNumber(5) + void clearNewTransaction() => $_clearField(5); + @$pb.TagNumber(5) + $9.TransactionOptions ensureNewTransaction() => $_ensure(4); + + /// Reads documents as they were at the given time. + /// + /// This must be a microsecond precision timestamp within the past one hour, + /// or if Point-in-Time Recovery is enabled, can additionally be a whole + /// minute timestamp within the past 7 days. + @$pb.TagNumber(7) + $6.Timestamp get readTime => $_getN(5); + @$pb.TagNumber(7) + set readTime($6.Timestamp v) { $_setField(7, v); } + @$pb.TagNumber(7) + $core.bool hasReadTime() => $_has(5); + @$pb.TagNumber(7) + void clearReadTime() => $_clearField(7); + @$pb.TagNumber(7) + $6.Timestamp ensureReadTime() => $_ensure(5); +} + +enum BatchGetDocumentsResponse_Result { + found, + missing, + notSet +} + +/// The streamed response for +/// [Firestore.BatchGetDocuments][google.firestore.v1.Firestore.BatchGetDocuments]. +class BatchGetDocumentsResponse extends $pb.GeneratedMessage { + factory BatchGetDocumentsResponse({ + $1.Document? found, + $core.String? missing, + $core.List<$core.int>? transaction, + $6.Timestamp? readTime, + }) { + final $result = create(); + if (found != null) { + $result.found = found; + } + if (missing != null) { + $result.missing = missing; + } + if (transaction != null) { + $result.transaction = transaction; + } + if (readTime != null) { + $result.readTime = readTime; + } + return $result; + } + BatchGetDocumentsResponse._() : super(); + factory BatchGetDocumentsResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory BatchGetDocumentsResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static const $core.Map<$core.int, BatchGetDocumentsResponse_Result> _BatchGetDocumentsResponse_ResultByTag = { + 1 : BatchGetDocumentsResponse_Result.found, + 2 : BatchGetDocumentsResponse_Result.missing, + 0 : BatchGetDocumentsResponse_Result.notSet + }; + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'BatchGetDocumentsResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.firestore.v1'), createEmptyInstance: create) + ..oo(0, [1, 2]) + ..aOM<$1.Document>(1, _omitFieldNames ? '' : 'found', subBuilder: $1.Document.create) + ..aOS(2, _omitFieldNames ? '' : 'missing') + ..a<$core.List<$core.int>>(3, _omitFieldNames ? '' : 'transaction', $pb.PbFieldType.OY) + ..aOM<$6.Timestamp>(4, _omitFieldNames ? '' : 'readTime', subBuilder: $6.Timestamp.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + BatchGetDocumentsResponse clone() => BatchGetDocumentsResponse()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + BatchGetDocumentsResponse copyWith(void Function(BatchGetDocumentsResponse) updates) => super.copyWith((message) => updates(message as BatchGetDocumentsResponse)) as BatchGetDocumentsResponse; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static BatchGetDocumentsResponse create() => BatchGetDocumentsResponse._(); + BatchGetDocumentsResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static BatchGetDocumentsResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static BatchGetDocumentsResponse? _defaultInstance; + + BatchGetDocumentsResponse_Result whichResult() => _BatchGetDocumentsResponse_ResultByTag[$_whichOneof(0)]!; + void clearResult() => $_clearField($_whichOneof(0)); + + /// A document that was requested. + @$pb.TagNumber(1) + $1.Document get found => $_getN(0); + @$pb.TagNumber(1) + set found($1.Document v) { $_setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasFound() => $_has(0); + @$pb.TagNumber(1) + void clearFound() => $_clearField(1); + @$pb.TagNumber(1) + $1.Document ensureFound() => $_ensure(0); + + /// A document name that was requested but does not exist. In the format: + /// `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + @$pb.TagNumber(2) + $core.String get missing => $_getSZ(1); + @$pb.TagNumber(2) + set missing($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasMissing() => $_has(1); + @$pb.TagNumber(2) + void clearMissing() => $_clearField(2); + + /// The transaction that was started as part of this request. + /// Will only be set in the first response, and only if + /// [BatchGetDocumentsRequest.new_transaction][google.firestore.v1.BatchGetDocumentsRequest.new_transaction] + /// was set in the request. + @$pb.TagNumber(3) + $core.List<$core.int> get transaction => $_getN(2); + @$pb.TagNumber(3) + set transaction($core.List<$core.int> v) { $_setBytes(2, v); } + @$pb.TagNumber(3) + $core.bool hasTransaction() => $_has(2); + @$pb.TagNumber(3) + void clearTransaction() => $_clearField(3); + + /// The time at which the document was read. + /// This may be monotically increasing, in this case the previous documents in + /// the result stream are guaranteed not to have changed between their + /// read_time and this one. + @$pb.TagNumber(4) + $6.Timestamp get readTime => $_getN(3); + @$pb.TagNumber(4) + set readTime($6.Timestamp v) { $_setField(4, v); } + @$pb.TagNumber(4) + $core.bool hasReadTime() => $_has(3); + @$pb.TagNumber(4) + void clearReadTime() => $_clearField(4); + @$pb.TagNumber(4) + $6.Timestamp ensureReadTime() => $_ensure(3); +} + +/// The request for +/// [Firestore.BeginTransaction][google.firestore.v1.Firestore.BeginTransaction]. +class BeginTransactionRequest extends $pb.GeneratedMessage { + factory BeginTransactionRequest({ + $core.String? database, + $9.TransactionOptions? options, + }) { + final $result = create(); + if (database != null) { + $result.database = database; + } + if (options != null) { + $result.options = options; + } + return $result; + } + BeginTransactionRequest._() : super(); + factory BeginTransactionRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory BeginTransactionRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'BeginTransactionRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.firestore.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'database') + ..aOM<$9.TransactionOptions>(2, _omitFieldNames ? '' : 'options', subBuilder: $9.TransactionOptions.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + BeginTransactionRequest clone() => BeginTransactionRequest()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + BeginTransactionRequest copyWith(void Function(BeginTransactionRequest) updates) => super.copyWith((message) => updates(message as BeginTransactionRequest)) as BeginTransactionRequest; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static BeginTransactionRequest create() => BeginTransactionRequest._(); + BeginTransactionRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static BeginTransactionRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static BeginTransactionRequest? _defaultInstance; + + /// Required. The database name. In the format: + /// `projects/{project_id}/databases/{database_id}`. + @$pb.TagNumber(1) + $core.String get database => $_getSZ(0); + @$pb.TagNumber(1) + set database($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasDatabase() => $_has(0); + @$pb.TagNumber(1) + void clearDatabase() => $_clearField(1); + + /// The options for the transaction. + /// Defaults to a read-write transaction. + @$pb.TagNumber(2) + $9.TransactionOptions get options => $_getN(1); + @$pb.TagNumber(2) + set options($9.TransactionOptions v) { $_setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasOptions() => $_has(1); + @$pb.TagNumber(2) + void clearOptions() => $_clearField(2); + @$pb.TagNumber(2) + $9.TransactionOptions ensureOptions() => $_ensure(1); +} + +/// The response for +/// [Firestore.BeginTransaction][google.firestore.v1.Firestore.BeginTransaction]. +class BeginTransactionResponse extends $pb.GeneratedMessage { + factory BeginTransactionResponse({ + $core.List<$core.int>? transaction, + }) { + final $result = create(); + if (transaction != null) { + $result.transaction = transaction; + } + return $result; + } + BeginTransactionResponse._() : super(); + factory BeginTransactionResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory BeginTransactionResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'BeginTransactionResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.firestore.v1'), createEmptyInstance: create) + ..a<$core.List<$core.int>>(1, _omitFieldNames ? '' : 'transaction', $pb.PbFieldType.OY) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + BeginTransactionResponse clone() => BeginTransactionResponse()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + BeginTransactionResponse copyWith(void Function(BeginTransactionResponse) updates) => super.copyWith((message) => updates(message as BeginTransactionResponse)) as BeginTransactionResponse; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static BeginTransactionResponse create() => BeginTransactionResponse._(); + BeginTransactionResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static BeginTransactionResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static BeginTransactionResponse? _defaultInstance; + + /// The transaction that was started. + @$pb.TagNumber(1) + $core.List<$core.int> get transaction => $_getN(0); + @$pb.TagNumber(1) + set transaction($core.List<$core.int> v) { $_setBytes(0, v); } + @$pb.TagNumber(1) + $core.bool hasTransaction() => $_has(0); + @$pb.TagNumber(1) + void clearTransaction() => $_clearField(1); +} + +/// The request for [Firestore.Commit][google.firestore.v1.Firestore.Commit]. +class CommitRequest extends $pb.GeneratedMessage { + factory CommitRequest({ + $core.String? database, + $core.Iterable<$10.Write>? writes, + $core.List<$core.int>? transaction, + }) { + final $result = create(); + if (database != null) { + $result.database = database; + } + if (writes != null) { + $result.writes.addAll(writes); + } + if (transaction != null) { + $result.transaction = transaction; + } + return $result; + } + CommitRequest._() : super(); + factory CommitRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory CommitRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'CommitRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.firestore.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'database') + ..pc<$10.Write>(2, _omitFieldNames ? '' : 'writes', $pb.PbFieldType.PM, subBuilder: $10.Write.create) + ..a<$core.List<$core.int>>(3, _omitFieldNames ? '' : 'transaction', $pb.PbFieldType.OY) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + CommitRequest clone() => CommitRequest()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + CommitRequest copyWith(void Function(CommitRequest) updates) => super.copyWith((message) => updates(message as CommitRequest)) as CommitRequest; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static CommitRequest create() => CommitRequest._(); + CommitRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static CommitRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static CommitRequest? _defaultInstance; + + /// Required. The database name. In the format: + /// `projects/{project_id}/databases/{database_id}`. + @$pb.TagNumber(1) + $core.String get database => $_getSZ(0); + @$pb.TagNumber(1) + set database($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasDatabase() => $_has(0); + @$pb.TagNumber(1) + void clearDatabase() => $_clearField(1); + + /// The writes to apply. + /// + /// Always executed atomically and in order. + @$pb.TagNumber(2) + $pb.PbList<$10.Write> get writes => $_getList(1); + + /// If set, applies all writes in this transaction, and commits it. + @$pb.TagNumber(3) + $core.List<$core.int> get transaction => $_getN(2); + @$pb.TagNumber(3) + set transaction($core.List<$core.int> v) { $_setBytes(2, v); } + @$pb.TagNumber(3) + $core.bool hasTransaction() => $_has(2); + @$pb.TagNumber(3) + void clearTransaction() => $_clearField(3); +} + +/// The response for [Firestore.Commit][google.firestore.v1.Firestore.Commit]. +class CommitResponse extends $pb.GeneratedMessage { + factory CommitResponse({ + $core.Iterable<$10.WriteResult>? writeResults, + $6.Timestamp? commitTime, + }) { + final $result = create(); + if (writeResults != null) { + $result.writeResults.addAll(writeResults); + } + if (commitTime != null) { + $result.commitTime = commitTime; + } + return $result; + } + CommitResponse._() : super(); + factory CommitResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory CommitResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'CommitResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.firestore.v1'), createEmptyInstance: create) + ..pc<$10.WriteResult>(1, _omitFieldNames ? '' : 'writeResults', $pb.PbFieldType.PM, subBuilder: $10.WriteResult.create) + ..aOM<$6.Timestamp>(2, _omitFieldNames ? '' : 'commitTime', subBuilder: $6.Timestamp.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + CommitResponse clone() => CommitResponse()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + CommitResponse copyWith(void Function(CommitResponse) updates) => super.copyWith((message) => updates(message as CommitResponse)) as CommitResponse; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static CommitResponse create() => CommitResponse._(); + CommitResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static CommitResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static CommitResponse? _defaultInstance; + + /// The result of applying the writes. + /// + /// This i-th write result corresponds to the i-th write in the + /// request. + @$pb.TagNumber(1) + $pb.PbList<$10.WriteResult> get writeResults => $_getList(0); + + /// The time at which the commit occurred. Any read with an equal or greater + /// `read_time` is guaranteed to see the effects of the commit. + @$pb.TagNumber(2) + $6.Timestamp get commitTime => $_getN(1); + @$pb.TagNumber(2) + set commitTime($6.Timestamp v) { $_setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasCommitTime() => $_has(1); + @$pb.TagNumber(2) + void clearCommitTime() => $_clearField(2); + @$pb.TagNumber(2) + $6.Timestamp ensureCommitTime() => $_ensure(1); +} + +/// The request for [Firestore.Rollback][google.firestore.v1.Firestore.Rollback]. +class RollbackRequest extends $pb.GeneratedMessage { + factory RollbackRequest({ + $core.String? database, + $core.List<$core.int>? transaction, + }) { + final $result = create(); + if (database != null) { + $result.database = database; + } + if (transaction != null) { + $result.transaction = transaction; + } + return $result; + } + RollbackRequest._() : super(); + factory RollbackRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory RollbackRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'RollbackRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.firestore.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'database') + ..a<$core.List<$core.int>>(2, _omitFieldNames ? '' : 'transaction', $pb.PbFieldType.OY) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + RollbackRequest clone() => RollbackRequest()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + RollbackRequest copyWith(void Function(RollbackRequest) updates) => super.copyWith((message) => updates(message as RollbackRequest)) as RollbackRequest; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static RollbackRequest create() => RollbackRequest._(); + RollbackRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static RollbackRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static RollbackRequest? _defaultInstance; + + /// Required. The database name. In the format: + /// `projects/{project_id}/databases/{database_id}`. + @$pb.TagNumber(1) + $core.String get database => $_getSZ(0); + @$pb.TagNumber(1) + set database($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasDatabase() => $_has(0); + @$pb.TagNumber(1) + void clearDatabase() => $_clearField(1); + + /// Required. The transaction to roll back. + @$pb.TagNumber(2) + $core.List<$core.int> get transaction => $_getN(1); + @$pb.TagNumber(2) + set transaction($core.List<$core.int> v) { $_setBytes(1, v); } + @$pb.TagNumber(2) + $core.bool hasTransaction() => $_has(1); + @$pb.TagNumber(2) + void clearTransaction() => $_clearField(2); +} + +enum RunQueryRequest_QueryType { + structuredQuery, + notSet +} + +enum RunQueryRequest_ConsistencySelector { + transaction, + newTransaction, + readTime, + notSet +} + +/// The request for [Firestore.RunQuery][google.firestore.v1.Firestore.RunQuery]. +class RunQueryRequest extends $pb.GeneratedMessage { + factory RunQueryRequest({ + $core.String? parent, + $11.StructuredQuery? structuredQuery, + $core.List<$core.int>? transaction, + $9.TransactionOptions? newTransaction, + $6.Timestamp? readTime, + $12.ExplainOptions? explainOptions, + }) { + final $result = create(); + if (parent != null) { + $result.parent = parent; + } + if (structuredQuery != null) { + $result.structuredQuery = structuredQuery; + } + if (transaction != null) { + $result.transaction = transaction; + } + if (newTransaction != null) { + $result.newTransaction = newTransaction; + } + if (readTime != null) { + $result.readTime = readTime; + } + if (explainOptions != null) { + $result.explainOptions = explainOptions; + } + return $result; + } + RunQueryRequest._() : super(); + factory RunQueryRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory RunQueryRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static const $core.Map<$core.int, RunQueryRequest_QueryType> _RunQueryRequest_QueryTypeByTag = { + 2 : RunQueryRequest_QueryType.structuredQuery, + 0 : RunQueryRequest_QueryType.notSet + }; + static const $core.Map<$core.int, RunQueryRequest_ConsistencySelector> _RunQueryRequest_ConsistencySelectorByTag = { + 5 : RunQueryRequest_ConsistencySelector.transaction, + 6 : RunQueryRequest_ConsistencySelector.newTransaction, + 7 : RunQueryRequest_ConsistencySelector.readTime, + 0 : RunQueryRequest_ConsistencySelector.notSet + }; + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'RunQueryRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.firestore.v1'), createEmptyInstance: create) + ..oo(0, [2]) + ..oo(1, [5, 6, 7]) + ..aOS(1, _omitFieldNames ? '' : 'parent') + ..aOM<$11.StructuredQuery>(2, _omitFieldNames ? '' : 'structuredQuery', subBuilder: $11.StructuredQuery.create) + ..a<$core.List<$core.int>>(5, _omitFieldNames ? '' : 'transaction', $pb.PbFieldType.OY) + ..aOM<$9.TransactionOptions>(6, _omitFieldNames ? '' : 'newTransaction', subBuilder: $9.TransactionOptions.create) + ..aOM<$6.Timestamp>(7, _omitFieldNames ? '' : 'readTime', subBuilder: $6.Timestamp.create) + ..aOM<$12.ExplainOptions>(10, _omitFieldNames ? '' : 'explainOptions', subBuilder: $12.ExplainOptions.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + RunQueryRequest clone() => RunQueryRequest()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + RunQueryRequest copyWith(void Function(RunQueryRequest) updates) => super.copyWith((message) => updates(message as RunQueryRequest)) as RunQueryRequest; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static RunQueryRequest create() => RunQueryRequest._(); + RunQueryRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static RunQueryRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static RunQueryRequest? _defaultInstance; + + RunQueryRequest_QueryType whichQueryType() => _RunQueryRequest_QueryTypeByTag[$_whichOneof(0)]!; + void clearQueryType() => $_clearField($_whichOneof(0)); + + RunQueryRequest_ConsistencySelector whichConsistencySelector() => _RunQueryRequest_ConsistencySelectorByTag[$_whichOneof(1)]!; + void clearConsistencySelector() => $_clearField($_whichOneof(1)); + + /// Required. The parent resource name. In the format: + /// `projects/{project_id}/databases/{database_id}/documents` or + /// `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + /// For example: + /// `projects/my-project/databases/my-database/documents` or + /// `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + @$pb.TagNumber(1) + $core.String get parent => $_getSZ(0); + @$pb.TagNumber(1) + set parent($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasParent() => $_has(0); + @$pb.TagNumber(1) + void clearParent() => $_clearField(1); + + /// A structured query. + @$pb.TagNumber(2) + $11.StructuredQuery get structuredQuery => $_getN(1); + @$pb.TagNumber(2) + set structuredQuery($11.StructuredQuery v) { $_setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasStructuredQuery() => $_has(1); + @$pb.TagNumber(2) + void clearStructuredQuery() => $_clearField(2); + @$pb.TagNumber(2) + $11.StructuredQuery ensureStructuredQuery() => $_ensure(1); + + /// Run the query within an already active transaction. + /// + /// The value here is the opaque transaction ID to execute the query in. + @$pb.TagNumber(5) + $core.List<$core.int> get transaction => $_getN(2); + @$pb.TagNumber(5) + set transaction($core.List<$core.int> v) { $_setBytes(2, v); } + @$pb.TagNumber(5) + $core.bool hasTransaction() => $_has(2); + @$pb.TagNumber(5) + void clearTransaction() => $_clearField(5); + + /// Starts a new transaction and reads the documents. + /// Defaults to a read-only transaction. + /// The new transaction ID will be returned as the first response in the + /// stream. + @$pb.TagNumber(6) + $9.TransactionOptions get newTransaction => $_getN(3); + @$pb.TagNumber(6) + set newTransaction($9.TransactionOptions v) { $_setField(6, v); } + @$pb.TagNumber(6) + $core.bool hasNewTransaction() => $_has(3); + @$pb.TagNumber(6) + void clearNewTransaction() => $_clearField(6); + @$pb.TagNumber(6) + $9.TransactionOptions ensureNewTransaction() => $_ensure(3); + + /// Reads documents as they were at the given time. + /// + /// This must be a microsecond precision timestamp within the past one hour, + /// or if Point-in-Time Recovery is enabled, can additionally be a whole + /// minute timestamp within the past 7 days. + @$pb.TagNumber(7) + $6.Timestamp get readTime => $_getN(4); + @$pb.TagNumber(7) + set readTime($6.Timestamp v) { $_setField(7, v); } + @$pb.TagNumber(7) + $core.bool hasReadTime() => $_has(4); + @$pb.TagNumber(7) + void clearReadTime() => $_clearField(7); + @$pb.TagNumber(7) + $6.Timestamp ensureReadTime() => $_ensure(4); + + /// Optional. Explain options for the query. If set, additional query + /// statistics will be returned. If not, only query results will be returned. + @$pb.TagNumber(10) + $12.ExplainOptions get explainOptions => $_getN(5); + @$pb.TagNumber(10) + set explainOptions($12.ExplainOptions v) { $_setField(10, v); } + @$pb.TagNumber(10) + $core.bool hasExplainOptions() => $_has(5); + @$pb.TagNumber(10) + void clearExplainOptions() => $_clearField(10); + @$pb.TagNumber(10) + $12.ExplainOptions ensureExplainOptions() => $_ensure(5); +} + +enum RunQueryResponse_ContinuationSelector { + done, + notSet +} + +/// The response for +/// [Firestore.RunQuery][google.firestore.v1.Firestore.RunQuery]. +class RunQueryResponse extends $pb.GeneratedMessage { + factory RunQueryResponse({ + $1.Document? document, + $core.List<$core.int>? transaction, + $6.Timestamp? readTime, + $core.int? skippedResults, + $core.bool? done, + $12.ExplainMetrics? explainMetrics, + }) { + final $result = create(); + if (document != null) { + $result.document = document; + } + if (transaction != null) { + $result.transaction = transaction; + } + if (readTime != null) { + $result.readTime = readTime; + } + if (skippedResults != null) { + $result.skippedResults = skippedResults; + } + if (done != null) { + $result.done = done; + } + if (explainMetrics != null) { + $result.explainMetrics = explainMetrics; + } + return $result; + } + RunQueryResponse._() : super(); + factory RunQueryResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory RunQueryResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static const $core.Map<$core.int, RunQueryResponse_ContinuationSelector> _RunQueryResponse_ContinuationSelectorByTag = { + 6 : RunQueryResponse_ContinuationSelector.done, + 0 : RunQueryResponse_ContinuationSelector.notSet + }; + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'RunQueryResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.firestore.v1'), createEmptyInstance: create) + ..oo(0, [6]) + ..aOM<$1.Document>(1, _omitFieldNames ? '' : 'document', subBuilder: $1.Document.create) + ..a<$core.List<$core.int>>(2, _omitFieldNames ? '' : 'transaction', $pb.PbFieldType.OY) + ..aOM<$6.Timestamp>(3, _omitFieldNames ? '' : 'readTime', subBuilder: $6.Timestamp.create) + ..a<$core.int>(4, _omitFieldNames ? '' : 'skippedResults', $pb.PbFieldType.O3) + ..aOB(6, _omitFieldNames ? '' : 'done') + ..aOM<$12.ExplainMetrics>(11, _omitFieldNames ? '' : 'explainMetrics', subBuilder: $12.ExplainMetrics.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + RunQueryResponse clone() => RunQueryResponse()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + RunQueryResponse copyWith(void Function(RunQueryResponse) updates) => super.copyWith((message) => updates(message as RunQueryResponse)) as RunQueryResponse; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static RunQueryResponse create() => RunQueryResponse._(); + RunQueryResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static RunQueryResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static RunQueryResponse? _defaultInstance; + + RunQueryResponse_ContinuationSelector whichContinuationSelector() => _RunQueryResponse_ContinuationSelectorByTag[$_whichOneof(0)]!; + void clearContinuationSelector() => $_clearField($_whichOneof(0)); + + /// A query result, not set when reporting partial progress. + @$pb.TagNumber(1) + $1.Document get document => $_getN(0); + @$pb.TagNumber(1) + set document($1.Document v) { $_setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasDocument() => $_has(0); + @$pb.TagNumber(1) + void clearDocument() => $_clearField(1); + @$pb.TagNumber(1) + $1.Document ensureDocument() => $_ensure(0); + + /// The transaction that was started as part of this request. + /// Can only be set in the first response, and only if + /// [RunQueryRequest.new_transaction][google.firestore.v1.RunQueryRequest.new_transaction] + /// was set in the request. If set, no other fields will be set in this + /// response. + @$pb.TagNumber(2) + $core.List<$core.int> get transaction => $_getN(1); + @$pb.TagNumber(2) + set transaction($core.List<$core.int> v) { $_setBytes(1, v); } + @$pb.TagNumber(2) + $core.bool hasTransaction() => $_has(1); + @$pb.TagNumber(2) + void clearTransaction() => $_clearField(2); + + /// The time at which the document was read. This may be monotonically + /// increasing; in this case, the previous documents in the result stream are + /// guaranteed not to have changed between their `read_time` and this one. + /// + /// If the query returns no results, a response with `read_time` and no + /// `document` will be sent, and this represents the time at which the query + /// was run. + @$pb.TagNumber(3) + $6.Timestamp get readTime => $_getN(2); + @$pb.TagNumber(3) + set readTime($6.Timestamp v) { $_setField(3, v); } + @$pb.TagNumber(3) + $core.bool hasReadTime() => $_has(2); + @$pb.TagNumber(3) + void clearReadTime() => $_clearField(3); + @$pb.TagNumber(3) + $6.Timestamp ensureReadTime() => $_ensure(2); + + /// The number of results that have been skipped due to an offset between + /// the last response and the current response. + @$pb.TagNumber(4) + $core.int get skippedResults => $_getIZ(3); + @$pb.TagNumber(4) + set skippedResults($core.int v) { $_setSignedInt32(3, v); } + @$pb.TagNumber(4) + $core.bool hasSkippedResults() => $_has(3); + @$pb.TagNumber(4) + void clearSkippedResults() => $_clearField(4); + + /// If present, Firestore has completely finished the request and no more + /// documents will be returned. + @$pb.TagNumber(6) + $core.bool get done => $_getBF(4); + @$pb.TagNumber(6) + set done($core.bool v) { $_setBool(4, v); } + @$pb.TagNumber(6) + $core.bool hasDone() => $_has(4); + @$pb.TagNumber(6) + void clearDone() => $_clearField(6); + + /// Query explain metrics. This is only present when the + /// [RunQueryRequest.explain_options][google.firestore.v1.RunQueryRequest.explain_options] + /// is provided, and it is sent only once with the last response in the stream. + @$pb.TagNumber(11) + $12.ExplainMetrics get explainMetrics => $_getN(5); + @$pb.TagNumber(11) + set explainMetrics($12.ExplainMetrics v) { $_setField(11, v); } + @$pb.TagNumber(11) + $core.bool hasExplainMetrics() => $_has(5); + @$pb.TagNumber(11) + void clearExplainMetrics() => $_clearField(11); + @$pb.TagNumber(11) + $12.ExplainMetrics ensureExplainMetrics() => $_ensure(5); +} + +enum RunAggregationQueryRequest_QueryType { + structuredAggregationQuery, + notSet +} + +enum RunAggregationQueryRequest_ConsistencySelector { + transaction, + newTransaction, + readTime, + notSet +} + +/// The request for +/// [Firestore.RunAggregationQuery][google.firestore.v1.Firestore.RunAggregationQuery]. +class RunAggregationQueryRequest extends $pb.GeneratedMessage { + factory RunAggregationQueryRequest({ + $core.String? parent, + $11.StructuredAggregationQuery? structuredAggregationQuery, + $core.List<$core.int>? transaction, + $9.TransactionOptions? newTransaction, + $6.Timestamp? readTime, + $12.ExplainOptions? explainOptions, + }) { + final $result = create(); + if (parent != null) { + $result.parent = parent; + } + if (structuredAggregationQuery != null) { + $result.structuredAggregationQuery = structuredAggregationQuery; + } + if (transaction != null) { + $result.transaction = transaction; + } + if (newTransaction != null) { + $result.newTransaction = newTransaction; + } + if (readTime != null) { + $result.readTime = readTime; + } + if (explainOptions != null) { + $result.explainOptions = explainOptions; + } + return $result; + } + RunAggregationQueryRequest._() : super(); + factory RunAggregationQueryRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory RunAggregationQueryRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static const $core.Map<$core.int, RunAggregationQueryRequest_QueryType> _RunAggregationQueryRequest_QueryTypeByTag = { + 2 : RunAggregationQueryRequest_QueryType.structuredAggregationQuery, + 0 : RunAggregationQueryRequest_QueryType.notSet + }; + static const $core.Map<$core.int, RunAggregationQueryRequest_ConsistencySelector> _RunAggregationQueryRequest_ConsistencySelectorByTag = { + 4 : RunAggregationQueryRequest_ConsistencySelector.transaction, + 5 : RunAggregationQueryRequest_ConsistencySelector.newTransaction, + 6 : RunAggregationQueryRequest_ConsistencySelector.readTime, + 0 : RunAggregationQueryRequest_ConsistencySelector.notSet + }; + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'RunAggregationQueryRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.firestore.v1'), createEmptyInstance: create) + ..oo(0, [2]) + ..oo(1, [4, 5, 6]) + ..aOS(1, _omitFieldNames ? '' : 'parent') + ..aOM<$11.StructuredAggregationQuery>(2, _omitFieldNames ? '' : 'structuredAggregationQuery', subBuilder: $11.StructuredAggregationQuery.create) + ..a<$core.List<$core.int>>(4, _omitFieldNames ? '' : 'transaction', $pb.PbFieldType.OY) + ..aOM<$9.TransactionOptions>(5, _omitFieldNames ? '' : 'newTransaction', subBuilder: $9.TransactionOptions.create) + ..aOM<$6.Timestamp>(6, _omitFieldNames ? '' : 'readTime', subBuilder: $6.Timestamp.create) + ..aOM<$12.ExplainOptions>(8, _omitFieldNames ? '' : 'explainOptions', subBuilder: $12.ExplainOptions.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + RunAggregationQueryRequest clone() => RunAggregationQueryRequest()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + RunAggregationQueryRequest copyWith(void Function(RunAggregationQueryRequest) updates) => super.copyWith((message) => updates(message as RunAggregationQueryRequest)) as RunAggregationQueryRequest; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static RunAggregationQueryRequest create() => RunAggregationQueryRequest._(); + RunAggregationQueryRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static RunAggregationQueryRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static RunAggregationQueryRequest? _defaultInstance; + + RunAggregationQueryRequest_QueryType whichQueryType() => _RunAggregationQueryRequest_QueryTypeByTag[$_whichOneof(0)]!; + void clearQueryType() => $_clearField($_whichOneof(0)); + + RunAggregationQueryRequest_ConsistencySelector whichConsistencySelector() => _RunAggregationQueryRequest_ConsistencySelectorByTag[$_whichOneof(1)]!; + void clearConsistencySelector() => $_clearField($_whichOneof(1)); + + /// Required. The parent resource name. In the format: + /// `projects/{project_id}/databases/{database_id}/documents` or + /// `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + /// For example: + /// `projects/my-project/databases/my-database/documents` or + /// `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + @$pb.TagNumber(1) + $core.String get parent => $_getSZ(0); + @$pb.TagNumber(1) + set parent($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasParent() => $_has(0); + @$pb.TagNumber(1) + void clearParent() => $_clearField(1); + + /// An aggregation query. + @$pb.TagNumber(2) + $11.StructuredAggregationQuery get structuredAggregationQuery => $_getN(1); + @$pb.TagNumber(2) + set structuredAggregationQuery($11.StructuredAggregationQuery v) { $_setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasStructuredAggregationQuery() => $_has(1); + @$pb.TagNumber(2) + void clearStructuredAggregationQuery() => $_clearField(2); + @$pb.TagNumber(2) + $11.StructuredAggregationQuery ensureStructuredAggregationQuery() => $_ensure(1); + + /// Run the aggregation within an already active transaction. + /// + /// The value here is the opaque transaction ID to execute the query in. + @$pb.TagNumber(4) + $core.List<$core.int> get transaction => $_getN(2); + @$pb.TagNumber(4) + set transaction($core.List<$core.int> v) { $_setBytes(2, v); } + @$pb.TagNumber(4) + $core.bool hasTransaction() => $_has(2); + @$pb.TagNumber(4) + void clearTransaction() => $_clearField(4); + + /// Starts a new transaction as part of the query, defaulting to read-only. + /// + /// The new transaction ID will be returned as the first response in the + /// stream. + @$pb.TagNumber(5) + $9.TransactionOptions get newTransaction => $_getN(3); + @$pb.TagNumber(5) + set newTransaction($9.TransactionOptions v) { $_setField(5, v); } + @$pb.TagNumber(5) + $core.bool hasNewTransaction() => $_has(3); + @$pb.TagNumber(5) + void clearNewTransaction() => $_clearField(5); + @$pb.TagNumber(5) + $9.TransactionOptions ensureNewTransaction() => $_ensure(3); + + /// Executes the query at the given timestamp. + /// + /// This must be a microsecond precision timestamp within the past one hour, + /// or if Point-in-Time Recovery is enabled, can additionally be a whole + /// minute timestamp within the past 7 days. + @$pb.TagNumber(6) + $6.Timestamp get readTime => $_getN(4); + @$pb.TagNumber(6) + set readTime($6.Timestamp v) { $_setField(6, v); } + @$pb.TagNumber(6) + $core.bool hasReadTime() => $_has(4); + @$pb.TagNumber(6) + void clearReadTime() => $_clearField(6); + @$pb.TagNumber(6) + $6.Timestamp ensureReadTime() => $_ensure(4); + + /// Optional. Explain options for the query. If set, additional query + /// statistics will be returned. If not, only query results will be returned. + @$pb.TagNumber(8) + $12.ExplainOptions get explainOptions => $_getN(5); + @$pb.TagNumber(8) + set explainOptions($12.ExplainOptions v) { $_setField(8, v); } + @$pb.TagNumber(8) + $core.bool hasExplainOptions() => $_has(5); + @$pb.TagNumber(8) + void clearExplainOptions() => $_clearField(8); + @$pb.TagNumber(8) + $12.ExplainOptions ensureExplainOptions() => $_ensure(5); +} + +/// The response for +/// [Firestore.RunAggregationQuery][google.firestore.v1.Firestore.RunAggregationQuery]. +class RunAggregationQueryResponse extends $pb.GeneratedMessage { + factory RunAggregationQueryResponse({ + $13.AggregationResult? result, + $core.List<$core.int>? transaction, + $6.Timestamp? readTime, + $12.ExplainMetrics? explainMetrics, + }) { + final $result = create(); + if (result != null) { + $result.result = result; + } + if (transaction != null) { + $result.transaction = transaction; + } + if (readTime != null) { + $result.readTime = readTime; + } + if (explainMetrics != null) { + $result.explainMetrics = explainMetrics; + } + return $result; + } + RunAggregationQueryResponse._() : super(); + factory RunAggregationQueryResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory RunAggregationQueryResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'RunAggregationQueryResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.firestore.v1'), createEmptyInstance: create) + ..aOM<$13.AggregationResult>(1, _omitFieldNames ? '' : 'result', subBuilder: $13.AggregationResult.create) + ..a<$core.List<$core.int>>(2, _omitFieldNames ? '' : 'transaction', $pb.PbFieldType.OY) + ..aOM<$6.Timestamp>(3, _omitFieldNames ? '' : 'readTime', subBuilder: $6.Timestamp.create) + ..aOM<$12.ExplainMetrics>(10, _omitFieldNames ? '' : 'explainMetrics', subBuilder: $12.ExplainMetrics.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + RunAggregationQueryResponse clone() => RunAggregationQueryResponse()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + RunAggregationQueryResponse copyWith(void Function(RunAggregationQueryResponse) updates) => super.copyWith((message) => updates(message as RunAggregationQueryResponse)) as RunAggregationQueryResponse; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static RunAggregationQueryResponse create() => RunAggregationQueryResponse._(); + RunAggregationQueryResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static RunAggregationQueryResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static RunAggregationQueryResponse? _defaultInstance; + + /// A single aggregation result. + /// + /// Not present when reporting partial progress. + @$pb.TagNumber(1) + $13.AggregationResult get result => $_getN(0); + @$pb.TagNumber(1) + set result($13.AggregationResult v) { $_setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasResult() => $_has(0); + @$pb.TagNumber(1) + void clearResult() => $_clearField(1); + @$pb.TagNumber(1) + $13.AggregationResult ensureResult() => $_ensure(0); + + /// The transaction that was started as part of this request. + /// + /// Only present on the first response when the request requested to start + /// a new transaction. + @$pb.TagNumber(2) + $core.List<$core.int> get transaction => $_getN(1); + @$pb.TagNumber(2) + set transaction($core.List<$core.int> v) { $_setBytes(1, v); } + @$pb.TagNumber(2) + $core.bool hasTransaction() => $_has(1); + @$pb.TagNumber(2) + void clearTransaction() => $_clearField(2); + + /// The time at which the aggregate result was computed. This is always + /// monotonically increasing; in this case, the previous AggregationResult in + /// the result stream are guaranteed not to have changed between their + /// `read_time` and this one. + /// + /// If the query returns no results, a response with `read_time` and no + /// `result` will be sent, and this represents the time at which the query + /// was run. + @$pb.TagNumber(3) + $6.Timestamp get readTime => $_getN(2); + @$pb.TagNumber(3) + set readTime($6.Timestamp v) { $_setField(3, v); } + @$pb.TagNumber(3) + $core.bool hasReadTime() => $_has(2); + @$pb.TagNumber(3) + void clearReadTime() => $_clearField(3); + @$pb.TagNumber(3) + $6.Timestamp ensureReadTime() => $_ensure(2); + + /// Query explain metrics. This is only present when the + /// [RunAggregationQueryRequest.explain_options][google.firestore.v1.RunAggregationQueryRequest.explain_options] + /// is provided, and it is sent only once with the last response in the stream. + @$pb.TagNumber(10) + $12.ExplainMetrics get explainMetrics => $_getN(3); + @$pb.TagNumber(10) + set explainMetrics($12.ExplainMetrics v) { $_setField(10, v); } + @$pb.TagNumber(10) + $core.bool hasExplainMetrics() => $_has(3); + @$pb.TagNumber(10) + void clearExplainMetrics() => $_clearField(10); + @$pb.TagNumber(10) + $12.ExplainMetrics ensureExplainMetrics() => $_ensure(3); +} + +enum PartitionQueryRequest_QueryType { + structuredQuery, + notSet +} + +enum PartitionQueryRequest_ConsistencySelector { + readTime, + notSet +} + +/// The request for +/// [Firestore.PartitionQuery][google.firestore.v1.Firestore.PartitionQuery]. +class PartitionQueryRequest extends $pb.GeneratedMessage { + factory PartitionQueryRequest({ + $core.String? parent, + $11.StructuredQuery? structuredQuery, + $fixnum.Int64? partitionCount, + $core.String? pageToken, + $core.int? pageSize, + $6.Timestamp? readTime, + }) { + final $result = create(); + if (parent != null) { + $result.parent = parent; + } + if (structuredQuery != null) { + $result.structuredQuery = structuredQuery; + } + if (partitionCount != null) { + $result.partitionCount = partitionCount; + } + if (pageToken != null) { + $result.pageToken = pageToken; + } + if (pageSize != null) { + $result.pageSize = pageSize; + } + if (readTime != null) { + $result.readTime = readTime; + } + return $result; + } + PartitionQueryRequest._() : super(); + factory PartitionQueryRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory PartitionQueryRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static const $core.Map<$core.int, PartitionQueryRequest_QueryType> _PartitionQueryRequest_QueryTypeByTag = { + 2 : PartitionQueryRequest_QueryType.structuredQuery, + 0 : PartitionQueryRequest_QueryType.notSet + }; + static const $core.Map<$core.int, PartitionQueryRequest_ConsistencySelector> _PartitionQueryRequest_ConsistencySelectorByTag = { + 6 : PartitionQueryRequest_ConsistencySelector.readTime, + 0 : PartitionQueryRequest_ConsistencySelector.notSet + }; + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'PartitionQueryRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.firestore.v1'), createEmptyInstance: create) + ..oo(0, [2]) + ..oo(1, [6]) + ..aOS(1, _omitFieldNames ? '' : 'parent') + ..aOM<$11.StructuredQuery>(2, _omitFieldNames ? '' : 'structuredQuery', subBuilder: $11.StructuredQuery.create) + ..aInt64(3, _omitFieldNames ? '' : 'partitionCount') + ..aOS(4, _omitFieldNames ? '' : 'pageToken') + ..a<$core.int>(5, _omitFieldNames ? '' : 'pageSize', $pb.PbFieldType.O3) + ..aOM<$6.Timestamp>(6, _omitFieldNames ? '' : 'readTime', subBuilder: $6.Timestamp.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + PartitionQueryRequest clone() => PartitionQueryRequest()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + PartitionQueryRequest copyWith(void Function(PartitionQueryRequest) updates) => super.copyWith((message) => updates(message as PartitionQueryRequest)) as PartitionQueryRequest; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static PartitionQueryRequest create() => PartitionQueryRequest._(); + PartitionQueryRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static PartitionQueryRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static PartitionQueryRequest? _defaultInstance; + + PartitionQueryRequest_QueryType whichQueryType() => _PartitionQueryRequest_QueryTypeByTag[$_whichOneof(0)]!; + void clearQueryType() => $_clearField($_whichOneof(0)); + + PartitionQueryRequest_ConsistencySelector whichConsistencySelector() => _PartitionQueryRequest_ConsistencySelectorByTag[$_whichOneof(1)]!; + void clearConsistencySelector() => $_clearField($_whichOneof(1)); + + /// Required. The parent resource name. In the format: + /// `projects/{project_id}/databases/{database_id}/documents`. + /// Document resource names are not supported; only database resource names + /// can be specified. + @$pb.TagNumber(1) + $core.String get parent => $_getSZ(0); + @$pb.TagNumber(1) + set parent($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasParent() => $_has(0); + @$pb.TagNumber(1) + void clearParent() => $_clearField(1); + + /// A structured query. + /// Query must specify collection with all descendants and be ordered by name + /// ascending. Other filters, order bys, limits, offsets, and start/end + /// cursors are not supported. + @$pb.TagNumber(2) + $11.StructuredQuery get structuredQuery => $_getN(1); + @$pb.TagNumber(2) + set structuredQuery($11.StructuredQuery v) { $_setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasStructuredQuery() => $_has(1); + @$pb.TagNumber(2) + void clearStructuredQuery() => $_clearField(2); + @$pb.TagNumber(2) + $11.StructuredQuery ensureStructuredQuery() => $_ensure(1); + + /// The desired maximum number of partition points. + /// The partitions may be returned across multiple pages of results. + /// The number must be positive. The actual number of partitions + /// returned may be fewer. + /// + /// For example, this may be set to one fewer than the number of parallel + /// queries to be run, or in running a data pipeline job, one fewer than the + /// number of workers or compute instances available. + @$pb.TagNumber(3) + $fixnum.Int64 get partitionCount => $_getI64(2); + @$pb.TagNumber(3) + set partitionCount($fixnum.Int64 v) { $_setInt64(2, v); } + @$pb.TagNumber(3) + $core.bool hasPartitionCount() => $_has(2); + @$pb.TagNumber(3) + void clearPartitionCount() => $_clearField(3); + + /// The `next_page_token` value returned from a previous call to + /// PartitionQuery that may be used to get an additional set of results. + /// There are no ordering guarantees between sets of results. Thus, using + /// multiple sets of results will require merging the different result sets. + /// + /// For example, two subsequent calls using a page_token may return: + /// + /// * cursor B, cursor M, cursor Q + /// * cursor A, cursor U, cursor W + /// + /// To obtain a complete result set ordered with respect to the results of the + /// query supplied to PartitionQuery, the results sets should be merged: + /// cursor A, cursor B, cursor M, cursor Q, cursor U, cursor W + @$pb.TagNumber(4) + $core.String get pageToken => $_getSZ(3); + @$pb.TagNumber(4) + set pageToken($core.String v) { $_setString(3, v); } + @$pb.TagNumber(4) + $core.bool hasPageToken() => $_has(3); + @$pb.TagNumber(4) + void clearPageToken() => $_clearField(4); + + /// The maximum number of partitions to return in this call, subject to + /// `partition_count`. + /// + /// For example, if `partition_count` = 10 and `page_size` = 8, the first call + /// to PartitionQuery will return up to 8 partitions and a `next_page_token` + /// if more results exist. A second call to PartitionQuery will return up to + /// 2 partitions, to complete the total of 10 specified in `partition_count`. + @$pb.TagNumber(5) + $core.int get pageSize => $_getIZ(4); + @$pb.TagNumber(5) + set pageSize($core.int v) { $_setSignedInt32(4, v); } + @$pb.TagNumber(5) + $core.bool hasPageSize() => $_has(4); + @$pb.TagNumber(5) + void clearPageSize() => $_clearField(5); + + /// Reads documents as they were at the given time. + /// + /// This must be a microsecond precision timestamp within the past one hour, + /// or if Point-in-Time Recovery is enabled, can additionally be a whole + /// minute timestamp within the past 7 days. + @$pb.TagNumber(6) + $6.Timestamp get readTime => $_getN(5); + @$pb.TagNumber(6) + set readTime($6.Timestamp v) { $_setField(6, v); } + @$pb.TagNumber(6) + $core.bool hasReadTime() => $_has(5); + @$pb.TagNumber(6) + void clearReadTime() => $_clearField(6); + @$pb.TagNumber(6) + $6.Timestamp ensureReadTime() => $_ensure(5); +} + +/// The response for +/// [Firestore.PartitionQuery][google.firestore.v1.Firestore.PartitionQuery]. +class PartitionQueryResponse extends $pb.GeneratedMessage { + factory PartitionQueryResponse({ + $core.Iterable<$11.Cursor>? partitions, + $core.String? nextPageToken, + }) { + final $result = create(); + if (partitions != null) { + $result.partitions.addAll(partitions); + } + if (nextPageToken != null) { + $result.nextPageToken = nextPageToken; + } + return $result; + } + PartitionQueryResponse._() : super(); + factory PartitionQueryResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory PartitionQueryResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'PartitionQueryResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.firestore.v1'), createEmptyInstance: create) + ..pc<$11.Cursor>(1, _omitFieldNames ? '' : 'partitions', $pb.PbFieldType.PM, subBuilder: $11.Cursor.create) + ..aOS(2, _omitFieldNames ? '' : 'nextPageToken') + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + PartitionQueryResponse clone() => PartitionQueryResponse()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + PartitionQueryResponse copyWith(void Function(PartitionQueryResponse) updates) => super.copyWith((message) => updates(message as PartitionQueryResponse)) as PartitionQueryResponse; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static PartitionQueryResponse create() => PartitionQueryResponse._(); + PartitionQueryResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static PartitionQueryResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static PartitionQueryResponse? _defaultInstance; + + /// Partition results. + /// Each partition is a split point that can be used by RunQuery as a starting + /// or end point for the query results. The RunQuery requests must be made with + /// the same query supplied to this PartitionQuery request. The partition + /// cursors will be ordered according to same ordering as the results of the + /// query supplied to PartitionQuery. + /// + /// For example, if a PartitionQuery request returns partition cursors A and B, + /// running the following three queries will return the entire result set of + /// the original query: + /// + /// * query, end_at A + /// * query, start_at A, end_at B + /// * query, start_at B + /// + /// An empty result may indicate that the query has too few results to be + /// partitioned, or that the query is not yet supported for partitioning. + @$pb.TagNumber(1) + $pb.PbList<$11.Cursor> get partitions => $_getList(0); + + /// A page token that may be used to request an additional set of results, up + /// to the number specified by `partition_count` in the PartitionQuery request. + /// If blank, there are no more results. + @$pb.TagNumber(2) + $core.String get nextPageToken => $_getSZ(1); + @$pb.TagNumber(2) + set nextPageToken($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasNextPageToken() => $_has(1); + @$pb.TagNumber(2) + void clearNextPageToken() => $_clearField(2); +} + +/// The request for [Firestore.Write][google.firestore.v1.Firestore.Write]. +/// +/// The first request creates a stream, or resumes an existing one from a token. +/// +/// When creating a new stream, the server replies with a response containing +/// only an ID and a token, to use in the next request. +/// +/// When resuming a stream, the server first streams any responses later than the +/// given token, then a response containing only an up-to-date token, to use in +/// the next request. +class WriteRequest extends $pb.GeneratedMessage { + factory WriteRequest({ + $core.String? database, + $core.String? streamId, + $core.Iterable<$10.Write>? writes, + $core.List<$core.int>? streamToken, + $core.Iterable<$core.MapEntry<$core.String, $core.String>>? labels, + }) { + final $result = create(); + if (database != null) { + $result.database = database; + } + if (streamId != null) { + $result.streamId = streamId; + } + if (writes != null) { + $result.writes.addAll(writes); + } + if (streamToken != null) { + $result.streamToken = streamToken; + } + if (labels != null) { + $result.labels.addEntries(labels); + } + return $result; + } + WriteRequest._() : super(); + factory WriteRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory WriteRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'WriteRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.firestore.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'database') + ..aOS(2, _omitFieldNames ? '' : 'streamId') + ..pc<$10.Write>(3, _omitFieldNames ? '' : 'writes', $pb.PbFieldType.PM, subBuilder: $10.Write.create) + ..a<$core.List<$core.int>>(4, _omitFieldNames ? '' : 'streamToken', $pb.PbFieldType.OY) + ..m<$core.String, $core.String>(5, _omitFieldNames ? '' : 'labels', entryClassName: 'WriteRequest.LabelsEntry', keyFieldType: $pb.PbFieldType.OS, valueFieldType: $pb.PbFieldType.OS, packageName: const $pb.PackageName('google.firestore.v1')) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + WriteRequest clone() => WriteRequest()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + WriteRequest copyWith(void Function(WriteRequest) updates) => super.copyWith((message) => updates(message as WriteRequest)) as WriteRequest; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static WriteRequest create() => WriteRequest._(); + WriteRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static WriteRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static WriteRequest? _defaultInstance; + + /// Required. The database name. In the format: + /// `projects/{project_id}/databases/{database_id}`. + /// This is only required in the first message. + @$pb.TagNumber(1) + $core.String get database => $_getSZ(0); + @$pb.TagNumber(1) + set database($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasDatabase() => $_has(0); + @$pb.TagNumber(1) + void clearDatabase() => $_clearField(1); + + /// The ID of the write stream to resume. + /// This may only be set in the first message. When left empty, a new write + /// stream will be created. + @$pb.TagNumber(2) + $core.String get streamId => $_getSZ(1); + @$pb.TagNumber(2) + set streamId($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasStreamId() => $_has(1); + @$pb.TagNumber(2) + void clearStreamId() => $_clearField(2); + + /// The writes to apply. + /// + /// Always executed atomically and in order. + /// This must be empty on the first request. + /// This may be empty on the last request. + /// This must not be empty on all other requests. + @$pb.TagNumber(3) + $pb.PbList<$10.Write> get writes => $_getList(2); + + /// A stream token that was previously sent by the server. + /// + /// The client should set this field to the token from the most recent + /// [WriteResponse][google.firestore.v1.WriteResponse] it has received. This + /// acknowledges that the client has received responses up to this token. After + /// sending this token, earlier tokens may not be used anymore. + /// + /// The server may close the stream if there are too many unacknowledged + /// responses. + /// + /// Leave this field unset when creating a new stream. To resume a stream at + /// a specific point, set this field and the `stream_id` field. + /// + /// Leave this field unset when creating a new stream. + @$pb.TagNumber(4) + $core.List<$core.int> get streamToken => $_getN(3); + @$pb.TagNumber(4) + set streamToken($core.List<$core.int> v) { $_setBytes(3, v); } + @$pb.TagNumber(4) + $core.bool hasStreamToken() => $_has(3); + @$pb.TagNumber(4) + void clearStreamToken() => $_clearField(4); + + /// Labels associated with this write request. + @$pb.TagNumber(5) + $pb.PbMap<$core.String, $core.String> get labels => $_getMap(4); +} + +/// The response for [Firestore.Write][google.firestore.v1.Firestore.Write]. +class WriteResponse extends $pb.GeneratedMessage { + factory WriteResponse({ + $core.String? streamId, + $core.List<$core.int>? streamToken, + $core.Iterable<$10.WriteResult>? writeResults, + $6.Timestamp? commitTime, + }) { + final $result = create(); + if (streamId != null) { + $result.streamId = streamId; + } + if (streamToken != null) { + $result.streamToken = streamToken; + } + if (writeResults != null) { + $result.writeResults.addAll(writeResults); + } + if (commitTime != null) { + $result.commitTime = commitTime; + } + return $result; + } + WriteResponse._() : super(); + factory WriteResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory WriteResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'WriteResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.firestore.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'streamId') + ..a<$core.List<$core.int>>(2, _omitFieldNames ? '' : 'streamToken', $pb.PbFieldType.OY) + ..pc<$10.WriteResult>(3, _omitFieldNames ? '' : 'writeResults', $pb.PbFieldType.PM, subBuilder: $10.WriteResult.create) + ..aOM<$6.Timestamp>(4, _omitFieldNames ? '' : 'commitTime', subBuilder: $6.Timestamp.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + WriteResponse clone() => WriteResponse()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + WriteResponse copyWith(void Function(WriteResponse) updates) => super.copyWith((message) => updates(message as WriteResponse)) as WriteResponse; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static WriteResponse create() => WriteResponse._(); + WriteResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static WriteResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static WriteResponse? _defaultInstance; + + /// The ID of the stream. + /// Only set on the first message, when a new stream was created. + @$pb.TagNumber(1) + $core.String get streamId => $_getSZ(0); + @$pb.TagNumber(1) + set streamId($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasStreamId() => $_has(0); + @$pb.TagNumber(1) + void clearStreamId() => $_clearField(1); + + /// A token that represents the position of this response in the stream. + /// This can be used by a client to resume the stream at this point. + /// + /// This field is always set. + @$pb.TagNumber(2) + $core.List<$core.int> get streamToken => $_getN(1); + @$pb.TagNumber(2) + set streamToken($core.List<$core.int> v) { $_setBytes(1, v); } + @$pb.TagNumber(2) + $core.bool hasStreamToken() => $_has(1); + @$pb.TagNumber(2) + void clearStreamToken() => $_clearField(2); + + /// The result of applying the writes. + /// + /// This i-th write result corresponds to the i-th write in the + /// request. + @$pb.TagNumber(3) + $pb.PbList<$10.WriteResult> get writeResults => $_getList(2); + + /// The time at which the commit occurred. Any read with an equal or greater + /// `read_time` is guaranteed to see the effects of the write. + @$pb.TagNumber(4) + $6.Timestamp get commitTime => $_getN(3); + @$pb.TagNumber(4) + set commitTime($6.Timestamp v) { $_setField(4, v); } + @$pb.TagNumber(4) + $core.bool hasCommitTime() => $_has(3); + @$pb.TagNumber(4) + void clearCommitTime() => $_clearField(4); + @$pb.TagNumber(4) + $6.Timestamp ensureCommitTime() => $_ensure(3); +} + +enum ListenRequest_TargetChange { + addTarget, + removeTarget, + notSet +} + +/// A request for [Firestore.Listen][google.firestore.v1.Firestore.Listen] +class ListenRequest extends $pb.GeneratedMessage { + factory ListenRequest({ + $core.String? database, + Target? addTarget, + $core.int? removeTarget, + $core.Iterable<$core.MapEntry<$core.String, $core.String>>? labels, + }) { + final $result = create(); + if (database != null) { + $result.database = database; + } + if (addTarget != null) { + $result.addTarget = addTarget; + } + if (removeTarget != null) { + $result.removeTarget = removeTarget; + } + if (labels != null) { + $result.labels.addEntries(labels); + } + return $result; + } + ListenRequest._() : super(); + factory ListenRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ListenRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static const $core.Map<$core.int, ListenRequest_TargetChange> _ListenRequest_TargetChangeByTag = { + 2 : ListenRequest_TargetChange.addTarget, + 3 : ListenRequest_TargetChange.removeTarget, + 0 : ListenRequest_TargetChange.notSet + }; + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ListenRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.firestore.v1'), createEmptyInstance: create) + ..oo(0, [2, 3]) + ..aOS(1, _omitFieldNames ? '' : 'database') + ..aOM(2, _omitFieldNames ? '' : 'addTarget', subBuilder: Target.create) + ..a<$core.int>(3, _omitFieldNames ? '' : 'removeTarget', $pb.PbFieldType.O3) + ..m<$core.String, $core.String>(4, _omitFieldNames ? '' : 'labels', entryClassName: 'ListenRequest.LabelsEntry', keyFieldType: $pb.PbFieldType.OS, valueFieldType: $pb.PbFieldType.OS, packageName: const $pb.PackageName('google.firestore.v1')) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ListenRequest clone() => ListenRequest()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ListenRequest copyWith(void Function(ListenRequest) updates) => super.copyWith((message) => updates(message as ListenRequest)) as ListenRequest; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static ListenRequest create() => ListenRequest._(); + ListenRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static ListenRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static ListenRequest? _defaultInstance; + + ListenRequest_TargetChange whichTargetChange() => _ListenRequest_TargetChangeByTag[$_whichOneof(0)]!; + void clearTargetChange() => $_clearField($_whichOneof(0)); + + /// Required. The database name. In the format: + /// `projects/{project_id}/databases/{database_id}`. + @$pb.TagNumber(1) + $core.String get database => $_getSZ(0); + @$pb.TagNumber(1) + set database($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasDatabase() => $_has(0); + @$pb.TagNumber(1) + void clearDatabase() => $_clearField(1); + + /// A target to add to this stream. + @$pb.TagNumber(2) + Target get addTarget => $_getN(1); + @$pb.TagNumber(2) + set addTarget(Target v) { $_setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasAddTarget() => $_has(1); + @$pb.TagNumber(2) + void clearAddTarget() => $_clearField(2); + @$pb.TagNumber(2) + Target ensureAddTarget() => $_ensure(1); + + /// The ID of a target to remove from this stream. + @$pb.TagNumber(3) + $core.int get removeTarget => $_getIZ(2); + @$pb.TagNumber(3) + set removeTarget($core.int v) { $_setSignedInt32(2, v); } + @$pb.TagNumber(3) + $core.bool hasRemoveTarget() => $_has(2); + @$pb.TagNumber(3) + void clearRemoveTarget() => $_clearField(3); + + /// Labels associated with this target change. + @$pb.TagNumber(4) + $pb.PbMap<$core.String, $core.String> get labels => $_getMap(3); +} + +enum ListenResponse_ResponseType { + targetChange, + documentChange, + documentDelete, + filter, + documentRemove, + notSet +} + +/// The response for [Firestore.Listen][google.firestore.v1.Firestore.Listen]. +class ListenResponse extends $pb.GeneratedMessage { + factory ListenResponse({ + TargetChange? targetChange, + $10.DocumentChange? documentChange, + $10.DocumentDelete? documentDelete, + $10.ExistenceFilter? filter, + $10.DocumentRemove? documentRemove, + }) { + final $result = create(); + if (targetChange != null) { + $result.targetChange = targetChange; + } + if (documentChange != null) { + $result.documentChange = documentChange; + } + if (documentDelete != null) { + $result.documentDelete = documentDelete; + } + if (filter != null) { + $result.filter = filter; + } + if (documentRemove != null) { + $result.documentRemove = documentRemove; + } + return $result; + } + ListenResponse._() : super(); + factory ListenResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ListenResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static const $core.Map<$core.int, ListenResponse_ResponseType> _ListenResponse_ResponseTypeByTag = { + 2 : ListenResponse_ResponseType.targetChange, + 3 : ListenResponse_ResponseType.documentChange, + 4 : ListenResponse_ResponseType.documentDelete, + 5 : ListenResponse_ResponseType.filter, + 6 : ListenResponse_ResponseType.documentRemove, + 0 : ListenResponse_ResponseType.notSet + }; + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ListenResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.firestore.v1'), createEmptyInstance: create) + ..oo(0, [2, 3, 4, 5, 6]) + ..aOM(2, _omitFieldNames ? '' : 'targetChange', subBuilder: TargetChange.create) + ..aOM<$10.DocumentChange>(3, _omitFieldNames ? '' : 'documentChange', subBuilder: $10.DocumentChange.create) + ..aOM<$10.DocumentDelete>(4, _omitFieldNames ? '' : 'documentDelete', subBuilder: $10.DocumentDelete.create) + ..aOM<$10.ExistenceFilter>(5, _omitFieldNames ? '' : 'filter', subBuilder: $10.ExistenceFilter.create) + ..aOM<$10.DocumentRemove>(6, _omitFieldNames ? '' : 'documentRemove', subBuilder: $10.DocumentRemove.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ListenResponse clone() => ListenResponse()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ListenResponse copyWith(void Function(ListenResponse) updates) => super.copyWith((message) => updates(message as ListenResponse)) as ListenResponse; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static ListenResponse create() => ListenResponse._(); + ListenResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static ListenResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static ListenResponse? _defaultInstance; + + ListenResponse_ResponseType whichResponseType() => _ListenResponse_ResponseTypeByTag[$_whichOneof(0)]!; + void clearResponseType() => $_clearField($_whichOneof(0)); + + /// Targets have changed. + @$pb.TagNumber(2) + TargetChange get targetChange => $_getN(0); + @$pb.TagNumber(2) + set targetChange(TargetChange v) { $_setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasTargetChange() => $_has(0); + @$pb.TagNumber(2) + void clearTargetChange() => $_clearField(2); + @$pb.TagNumber(2) + TargetChange ensureTargetChange() => $_ensure(0); + + /// A [Document][google.firestore.v1.Document] has changed. + @$pb.TagNumber(3) + $10.DocumentChange get documentChange => $_getN(1); + @$pb.TagNumber(3) + set documentChange($10.DocumentChange v) { $_setField(3, v); } + @$pb.TagNumber(3) + $core.bool hasDocumentChange() => $_has(1); + @$pb.TagNumber(3) + void clearDocumentChange() => $_clearField(3); + @$pb.TagNumber(3) + $10.DocumentChange ensureDocumentChange() => $_ensure(1); + + /// A [Document][google.firestore.v1.Document] has been deleted. + @$pb.TagNumber(4) + $10.DocumentDelete get documentDelete => $_getN(2); + @$pb.TagNumber(4) + set documentDelete($10.DocumentDelete v) { $_setField(4, v); } + @$pb.TagNumber(4) + $core.bool hasDocumentDelete() => $_has(2); + @$pb.TagNumber(4) + void clearDocumentDelete() => $_clearField(4); + @$pb.TagNumber(4) + $10.DocumentDelete ensureDocumentDelete() => $_ensure(2); + + /// A filter to apply to the set of documents previously returned for the + /// given target. + /// + /// Returned when documents may have been removed from the given target, but + /// the exact documents are unknown. + @$pb.TagNumber(5) + $10.ExistenceFilter get filter => $_getN(3); + @$pb.TagNumber(5) + set filter($10.ExistenceFilter v) { $_setField(5, v); } + @$pb.TagNumber(5) + $core.bool hasFilter() => $_has(3); + @$pb.TagNumber(5) + void clearFilter() => $_clearField(5); + @$pb.TagNumber(5) + $10.ExistenceFilter ensureFilter() => $_ensure(3); + + /// A [Document][google.firestore.v1.Document] has been removed from a target + /// (because it is no longer relevant to that target). + @$pb.TagNumber(6) + $10.DocumentRemove get documentRemove => $_getN(4); + @$pb.TagNumber(6) + set documentRemove($10.DocumentRemove v) { $_setField(6, v); } + @$pb.TagNumber(6) + $core.bool hasDocumentRemove() => $_has(4); + @$pb.TagNumber(6) + void clearDocumentRemove() => $_clearField(6); + @$pb.TagNumber(6) + $10.DocumentRemove ensureDocumentRemove() => $_ensure(4); +} + +/// A target specified by a set of documents names. +class Target_DocumentsTarget extends $pb.GeneratedMessage { + factory Target_DocumentsTarget({ + $core.Iterable<$core.String>? documents, + }) { + final $result = create(); + if (documents != null) { + $result.documents.addAll(documents); + } + return $result; + } + Target_DocumentsTarget._() : super(); + factory Target_DocumentsTarget.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory Target_DocumentsTarget.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Target.DocumentsTarget', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.firestore.v1'), createEmptyInstance: create) + ..pPS(2, _omitFieldNames ? '' : 'documents') + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Target_DocumentsTarget clone() => Target_DocumentsTarget()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Target_DocumentsTarget copyWith(void Function(Target_DocumentsTarget) updates) => super.copyWith((message) => updates(message as Target_DocumentsTarget)) as Target_DocumentsTarget; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static Target_DocumentsTarget create() => Target_DocumentsTarget._(); + Target_DocumentsTarget createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static Target_DocumentsTarget getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static Target_DocumentsTarget? _defaultInstance; + + /// The names of the documents to retrieve. In the format: + /// `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + /// The request will fail if any of the document is not a child resource of + /// the given `database`. Duplicate names will be elided. + @$pb.TagNumber(2) + $pb.PbList<$core.String> get documents => $_getList(0); +} + +enum Target_QueryTarget_QueryType { + structuredQuery, + notSet +} + +/// A target specified by a query. +class Target_QueryTarget extends $pb.GeneratedMessage { + factory Target_QueryTarget({ + $core.String? parent, + $11.StructuredQuery? structuredQuery, + }) { + final $result = create(); + if (parent != null) { + $result.parent = parent; + } + if (structuredQuery != null) { + $result.structuredQuery = structuredQuery; + } + return $result; + } + Target_QueryTarget._() : super(); + factory Target_QueryTarget.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory Target_QueryTarget.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static const $core.Map<$core.int, Target_QueryTarget_QueryType> _Target_QueryTarget_QueryTypeByTag = { + 2 : Target_QueryTarget_QueryType.structuredQuery, + 0 : Target_QueryTarget_QueryType.notSet + }; + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Target.QueryTarget', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.firestore.v1'), createEmptyInstance: create) + ..oo(0, [2]) + ..aOS(1, _omitFieldNames ? '' : 'parent') + ..aOM<$11.StructuredQuery>(2, _omitFieldNames ? '' : 'structuredQuery', subBuilder: $11.StructuredQuery.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Target_QueryTarget clone() => Target_QueryTarget()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Target_QueryTarget copyWith(void Function(Target_QueryTarget) updates) => super.copyWith((message) => updates(message as Target_QueryTarget)) as Target_QueryTarget; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static Target_QueryTarget create() => Target_QueryTarget._(); + Target_QueryTarget createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static Target_QueryTarget getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static Target_QueryTarget? _defaultInstance; + + Target_QueryTarget_QueryType whichQueryType() => _Target_QueryTarget_QueryTypeByTag[$_whichOneof(0)]!; + void clearQueryType() => $_clearField($_whichOneof(0)); + + /// The parent resource name. In the format: + /// `projects/{project_id}/databases/{database_id}/documents` or + /// `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + /// For example: + /// `projects/my-project/databases/my-database/documents` or + /// `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + @$pb.TagNumber(1) + $core.String get parent => $_getSZ(0); + @$pb.TagNumber(1) + set parent($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasParent() => $_has(0); + @$pb.TagNumber(1) + void clearParent() => $_clearField(1); + + /// A structured query. + @$pb.TagNumber(2) + $11.StructuredQuery get structuredQuery => $_getN(1); + @$pb.TagNumber(2) + set structuredQuery($11.StructuredQuery v) { $_setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasStructuredQuery() => $_has(1); + @$pb.TagNumber(2) + void clearStructuredQuery() => $_clearField(2); + @$pb.TagNumber(2) + $11.StructuredQuery ensureStructuredQuery() => $_ensure(1); +} + +enum Target_TargetType { + query, + documents, + notSet +} + +enum Target_ResumeType { + resumeToken, + readTime, + notSet +} + +/// A specification of a set of documents to listen to. +class Target extends $pb.GeneratedMessage { + factory Target({ + Target_QueryTarget? query, + Target_DocumentsTarget? documents, + $core.List<$core.int>? resumeToken, + $core.int? targetId, + $core.bool? once, + $6.Timestamp? readTime, + $14.Int32Value? expectedCount, + }) { + final $result = create(); + if (query != null) { + $result.query = query; + } + if (documents != null) { + $result.documents = documents; + } + if (resumeToken != null) { + $result.resumeToken = resumeToken; + } + if (targetId != null) { + $result.targetId = targetId; + } + if (once != null) { + $result.once = once; + } + if (readTime != null) { + $result.readTime = readTime; + } + if (expectedCount != null) { + $result.expectedCount = expectedCount; + } + return $result; + } + Target._() : super(); + factory Target.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory Target.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static const $core.Map<$core.int, Target_TargetType> _Target_TargetTypeByTag = { + 2 : Target_TargetType.query, + 3 : Target_TargetType.documents, + 0 : Target_TargetType.notSet + }; + static const $core.Map<$core.int, Target_ResumeType> _Target_ResumeTypeByTag = { + 4 : Target_ResumeType.resumeToken, + 11 : Target_ResumeType.readTime, + 0 : Target_ResumeType.notSet + }; + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Target', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.firestore.v1'), createEmptyInstance: create) + ..oo(0, [2, 3]) + ..oo(1, [4, 11]) + ..aOM(2, _omitFieldNames ? '' : 'query', subBuilder: Target_QueryTarget.create) + ..aOM(3, _omitFieldNames ? '' : 'documents', subBuilder: Target_DocumentsTarget.create) + ..a<$core.List<$core.int>>(4, _omitFieldNames ? '' : 'resumeToken', $pb.PbFieldType.OY) + ..a<$core.int>(5, _omitFieldNames ? '' : 'targetId', $pb.PbFieldType.O3) + ..aOB(6, _omitFieldNames ? '' : 'once') + ..aOM<$6.Timestamp>(11, _omitFieldNames ? '' : 'readTime', subBuilder: $6.Timestamp.create) + ..aOM<$14.Int32Value>(12, _omitFieldNames ? '' : 'expectedCount', subBuilder: $14.Int32Value.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Target clone() => Target()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Target copyWith(void Function(Target) updates) => super.copyWith((message) => updates(message as Target)) as Target; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static Target create() => Target._(); + Target createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static Target getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static Target? _defaultInstance; + + Target_TargetType whichTargetType() => _Target_TargetTypeByTag[$_whichOneof(0)]!; + void clearTargetType() => $_clearField($_whichOneof(0)); + + Target_ResumeType whichResumeType() => _Target_ResumeTypeByTag[$_whichOneof(1)]!; + void clearResumeType() => $_clearField($_whichOneof(1)); + + /// A target specified by a query. + @$pb.TagNumber(2) + Target_QueryTarget get query => $_getN(0); + @$pb.TagNumber(2) + set query(Target_QueryTarget v) { $_setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasQuery() => $_has(0); + @$pb.TagNumber(2) + void clearQuery() => $_clearField(2); + @$pb.TagNumber(2) + Target_QueryTarget ensureQuery() => $_ensure(0); + + /// A target specified by a set of document names. + @$pb.TagNumber(3) + Target_DocumentsTarget get documents => $_getN(1); + @$pb.TagNumber(3) + set documents(Target_DocumentsTarget v) { $_setField(3, v); } + @$pb.TagNumber(3) + $core.bool hasDocuments() => $_has(1); + @$pb.TagNumber(3) + void clearDocuments() => $_clearField(3); + @$pb.TagNumber(3) + Target_DocumentsTarget ensureDocuments() => $_ensure(1); + + /// A resume token from a prior + /// [TargetChange][google.firestore.v1.TargetChange] for an identical target. + /// + /// Using a resume token with a different target is unsupported and may fail. + @$pb.TagNumber(4) + $core.List<$core.int> get resumeToken => $_getN(2); + @$pb.TagNumber(4) + set resumeToken($core.List<$core.int> v) { $_setBytes(2, v); } + @$pb.TagNumber(4) + $core.bool hasResumeToken() => $_has(2); + @$pb.TagNumber(4) + void clearResumeToken() => $_clearField(4); + + /// The target ID that identifies the target on the stream. Must be a positive + /// number and non-zero. + /// + /// If `target_id` is 0 (or unspecified), the server will assign an ID for this + /// target and return that in a `TargetChange::ADD` event. Once a target with + /// `target_id=0` is added, all subsequent targets must also have + /// `target_id=0`. If an `AddTarget` request with `target_id != 0` is + /// sent to the server after a target with `target_id=0` is added, the server + /// will immediately send a response with a `TargetChange::Remove` event. + /// + /// Note that if the client sends multiple `AddTarget` requests + /// without an ID, the order of IDs returned in `TargetChage.target_ids` are + /// undefined. Therefore, clients should provide a target ID instead of relying + /// on the server to assign one. + /// + /// If `target_id` is non-zero, there must not be an existing active target on + /// this stream with the same ID. + @$pb.TagNumber(5) + $core.int get targetId => $_getIZ(3); + @$pb.TagNumber(5) + set targetId($core.int v) { $_setSignedInt32(3, v); } + @$pb.TagNumber(5) + $core.bool hasTargetId() => $_has(3); + @$pb.TagNumber(5) + void clearTargetId() => $_clearField(5); + + /// If the target should be removed once it is current and consistent. + @$pb.TagNumber(6) + $core.bool get once => $_getBF(4); + @$pb.TagNumber(6) + set once($core.bool v) { $_setBool(4, v); } + @$pb.TagNumber(6) + $core.bool hasOnce() => $_has(4); + @$pb.TagNumber(6) + void clearOnce() => $_clearField(6); + + /// Start listening after a specific `read_time`. + /// + /// The client must know the state of matching documents at this time. + @$pb.TagNumber(11) + $6.Timestamp get readTime => $_getN(5); + @$pb.TagNumber(11) + set readTime($6.Timestamp v) { $_setField(11, v); } + @$pb.TagNumber(11) + $core.bool hasReadTime() => $_has(5); + @$pb.TagNumber(11) + void clearReadTime() => $_clearField(11); + @$pb.TagNumber(11) + $6.Timestamp ensureReadTime() => $_ensure(5); + + /// The number of documents that last matched the query at the resume token or + /// read time. + /// + /// This value is only relevant when a `resume_type` is provided. This value + /// being present and greater than zero signals that the client wants + /// `ExistenceFilter.unchanged_names` to be included in the response. + @$pb.TagNumber(12) + $14.Int32Value get expectedCount => $_getN(6); + @$pb.TagNumber(12) + set expectedCount($14.Int32Value v) { $_setField(12, v); } + @$pb.TagNumber(12) + $core.bool hasExpectedCount() => $_has(6); + @$pb.TagNumber(12) + void clearExpectedCount() => $_clearField(12); + @$pb.TagNumber(12) + $14.Int32Value ensureExpectedCount() => $_ensure(6); +} + +/// Targets being watched have changed. +class TargetChange extends $pb.GeneratedMessage { + factory TargetChange({ + TargetChange_TargetChangeType? targetChangeType, + $core.Iterable<$core.int>? targetIds, + $15.Status? cause, + $core.List<$core.int>? resumeToken, + $6.Timestamp? readTime, + }) { + final $result = create(); + if (targetChangeType != null) { + $result.targetChangeType = targetChangeType; + } + if (targetIds != null) { + $result.targetIds.addAll(targetIds); + } + if (cause != null) { + $result.cause = cause; + } + if (resumeToken != null) { + $result.resumeToken = resumeToken; + } + if (readTime != null) { + $result.readTime = readTime; + } + return $result; + } + TargetChange._() : super(); + factory TargetChange.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory TargetChange.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'TargetChange', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.firestore.v1'), createEmptyInstance: create) + ..e(1, _omitFieldNames ? '' : 'targetChangeType', $pb.PbFieldType.OE, defaultOrMaker: TargetChange_TargetChangeType.NO_CHANGE, valueOf: TargetChange_TargetChangeType.valueOf, enumValues: TargetChange_TargetChangeType.values) + ..p<$core.int>(2, _omitFieldNames ? '' : 'targetIds', $pb.PbFieldType.K3) + ..aOM<$15.Status>(3, _omitFieldNames ? '' : 'cause', subBuilder: $15.Status.create) + ..a<$core.List<$core.int>>(4, _omitFieldNames ? '' : 'resumeToken', $pb.PbFieldType.OY) + ..aOM<$6.Timestamp>(6, _omitFieldNames ? '' : 'readTime', subBuilder: $6.Timestamp.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + TargetChange clone() => TargetChange()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + TargetChange copyWith(void Function(TargetChange) updates) => super.copyWith((message) => updates(message as TargetChange)) as TargetChange; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static TargetChange create() => TargetChange._(); + TargetChange createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static TargetChange getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static TargetChange? _defaultInstance; + + /// The type of change that occurred. + @$pb.TagNumber(1) + TargetChange_TargetChangeType get targetChangeType => $_getN(0); + @$pb.TagNumber(1) + set targetChangeType(TargetChange_TargetChangeType v) { $_setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasTargetChangeType() => $_has(0); + @$pb.TagNumber(1) + void clearTargetChangeType() => $_clearField(1); + + /// The target IDs of targets that have changed. + /// + /// If empty, the change applies to all targets. + /// + /// The order of the target IDs is not defined. + @$pb.TagNumber(2) + $pb.PbList<$core.int> get targetIds => $_getList(1); + + /// The error that resulted in this change, if applicable. + @$pb.TagNumber(3) + $15.Status get cause => $_getN(2); + @$pb.TagNumber(3) + set cause($15.Status v) { $_setField(3, v); } + @$pb.TagNumber(3) + $core.bool hasCause() => $_has(2); + @$pb.TagNumber(3) + void clearCause() => $_clearField(3); + @$pb.TagNumber(3) + $15.Status ensureCause() => $_ensure(2); + + /// A token that can be used to resume the stream for the given `target_ids`, + /// or all targets if `target_ids` is empty. + /// + /// Not set on every target change. + @$pb.TagNumber(4) + $core.List<$core.int> get resumeToken => $_getN(3); + @$pb.TagNumber(4) + set resumeToken($core.List<$core.int> v) { $_setBytes(3, v); } + @$pb.TagNumber(4) + $core.bool hasResumeToken() => $_has(3); + @$pb.TagNumber(4) + void clearResumeToken() => $_clearField(4); + + /// The consistent `read_time` for the given `target_ids` (omitted when the + /// target_ids are not at a consistent snapshot). + /// + /// The stream is guaranteed to send a `read_time` with `target_ids` empty + /// whenever the entire stream reaches a new consistent snapshot. ADD, + /// CURRENT, and RESET messages are guaranteed to (eventually) result in a + /// new consistent snapshot (while NO_CHANGE and REMOVE messages are not). + /// + /// For a given stream, `read_time` is guaranteed to be monotonically + /// increasing. + @$pb.TagNumber(6) + $6.Timestamp get readTime => $_getN(4); + @$pb.TagNumber(6) + set readTime($6.Timestamp v) { $_setField(6, v); } + @$pb.TagNumber(6) + $core.bool hasReadTime() => $_has(4); + @$pb.TagNumber(6) + void clearReadTime() => $_clearField(6); + @$pb.TagNumber(6) + $6.Timestamp ensureReadTime() => $_ensure(4); +} + +enum ListCollectionIdsRequest_ConsistencySelector { + readTime, + notSet +} + +/// The request for +/// [Firestore.ListCollectionIds][google.firestore.v1.Firestore.ListCollectionIds]. +class ListCollectionIdsRequest extends $pb.GeneratedMessage { + factory ListCollectionIdsRequest({ + $core.String? parent, + $core.int? pageSize, + $core.String? pageToken, + $6.Timestamp? readTime, + }) { + final $result = create(); + if (parent != null) { + $result.parent = parent; + } + if (pageSize != null) { + $result.pageSize = pageSize; + } + if (pageToken != null) { + $result.pageToken = pageToken; + } + if (readTime != null) { + $result.readTime = readTime; + } + return $result; + } + ListCollectionIdsRequest._() : super(); + factory ListCollectionIdsRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ListCollectionIdsRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static const $core.Map<$core.int, ListCollectionIdsRequest_ConsistencySelector> _ListCollectionIdsRequest_ConsistencySelectorByTag = { + 4 : ListCollectionIdsRequest_ConsistencySelector.readTime, + 0 : ListCollectionIdsRequest_ConsistencySelector.notSet + }; + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ListCollectionIdsRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.firestore.v1'), createEmptyInstance: create) + ..oo(0, [4]) + ..aOS(1, _omitFieldNames ? '' : 'parent') + ..a<$core.int>(2, _omitFieldNames ? '' : 'pageSize', $pb.PbFieldType.O3) + ..aOS(3, _omitFieldNames ? '' : 'pageToken') + ..aOM<$6.Timestamp>(4, _omitFieldNames ? '' : 'readTime', subBuilder: $6.Timestamp.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ListCollectionIdsRequest clone() => ListCollectionIdsRequest()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ListCollectionIdsRequest copyWith(void Function(ListCollectionIdsRequest) updates) => super.copyWith((message) => updates(message as ListCollectionIdsRequest)) as ListCollectionIdsRequest; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static ListCollectionIdsRequest create() => ListCollectionIdsRequest._(); + ListCollectionIdsRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static ListCollectionIdsRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static ListCollectionIdsRequest? _defaultInstance; + + ListCollectionIdsRequest_ConsistencySelector whichConsistencySelector() => _ListCollectionIdsRequest_ConsistencySelectorByTag[$_whichOneof(0)]!; + void clearConsistencySelector() => $_clearField($_whichOneof(0)); + + /// Required. The parent document. In the format: + /// `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + /// For example: + /// `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + @$pb.TagNumber(1) + $core.String get parent => $_getSZ(0); + @$pb.TagNumber(1) + set parent($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasParent() => $_has(0); + @$pb.TagNumber(1) + void clearParent() => $_clearField(1); + + /// The maximum number of results to return. + @$pb.TagNumber(2) + $core.int get pageSize => $_getIZ(1); + @$pb.TagNumber(2) + set pageSize($core.int v) { $_setSignedInt32(1, v); } + @$pb.TagNumber(2) + $core.bool hasPageSize() => $_has(1); + @$pb.TagNumber(2) + void clearPageSize() => $_clearField(2); + + /// A page token. Must be a value from + /// [ListCollectionIdsResponse][google.firestore.v1.ListCollectionIdsResponse]. + @$pb.TagNumber(3) + $core.String get pageToken => $_getSZ(2); + @$pb.TagNumber(3) + set pageToken($core.String v) { $_setString(2, v); } + @$pb.TagNumber(3) + $core.bool hasPageToken() => $_has(2); + @$pb.TagNumber(3) + void clearPageToken() => $_clearField(3); + + /// Reads documents as they were at the given time. + /// + /// This must be a microsecond precision timestamp within the past one hour, + /// or if Point-in-Time Recovery is enabled, can additionally be a whole + /// minute timestamp within the past 7 days. + @$pb.TagNumber(4) + $6.Timestamp get readTime => $_getN(3); + @$pb.TagNumber(4) + set readTime($6.Timestamp v) { $_setField(4, v); } + @$pb.TagNumber(4) + $core.bool hasReadTime() => $_has(3); + @$pb.TagNumber(4) + void clearReadTime() => $_clearField(4); + @$pb.TagNumber(4) + $6.Timestamp ensureReadTime() => $_ensure(3); +} + +/// The response from +/// [Firestore.ListCollectionIds][google.firestore.v1.Firestore.ListCollectionIds]. +class ListCollectionIdsResponse extends $pb.GeneratedMessage { + factory ListCollectionIdsResponse({ + $core.Iterable<$core.String>? collectionIds, + $core.String? nextPageToken, + }) { + final $result = create(); + if (collectionIds != null) { + $result.collectionIds.addAll(collectionIds); + } + if (nextPageToken != null) { + $result.nextPageToken = nextPageToken; + } + return $result; + } + ListCollectionIdsResponse._() : super(); + factory ListCollectionIdsResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ListCollectionIdsResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ListCollectionIdsResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.firestore.v1'), createEmptyInstance: create) + ..pPS(1, _omitFieldNames ? '' : 'collectionIds') + ..aOS(2, _omitFieldNames ? '' : 'nextPageToken') + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ListCollectionIdsResponse clone() => ListCollectionIdsResponse()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ListCollectionIdsResponse copyWith(void Function(ListCollectionIdsResponse) updates) => super.copyWith((message) => updates(message as ListCollectionIdsResponse)) as ListCollectionIdsResponse; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static ListCollectionIdsResponse create() => ListCollectionIdsResponse._(); + ListCollectionIdsResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static ListCollectionIdsResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static ListCollectionIdsResponse? _defaultInstance; + + /// The collection ids. + @$pb.TagNumber(1) + $pb.PbList<$core.String> get collectionIds => $_getList(0); + + /// A page token that may be used to continue the list. + @$pb.TagNumber(2) + $core.String get nextPageToken => $_getSZ(1); + @$pb.TagNumber(2) + set nextPageToken($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasNextPageToken() => $_has(1); + @$pb.TagNumber(2) + void clearNextPageToken() => $_clearField(2); +} + +/// The request for +/// [Firestore.BatchWrite][google.firestore.v1.Firestore.BatchWrite]. +class BatchWriteRequest extends $pb.GeneratedMessage { + factory BatchWriteRequest({ + $core.String? database, + $core.Iterable<$10.Write>? writes, + $core.Iterable<$core.MapEntry<$core.String, $core.String>>? labels, + }) { + final $result = create(); + if (database != null) { + $result.database = database; + } + if (writes != null) { + $result.writes.addAll(writes); + } + if (labels != null) { + $result.labels.addEntries(labels); + } + return $result; + } + BatchWriteRequest._() : super(); + factory BatchWriteRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory BatchWriteRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'BatchWriteRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.firestore.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'database') + ..pc<$10.Write>(2, _omitFieldNames ? '' : 'writes', $pb.PbFieldType.PM, subBuilder: $10.Write.create) + ..m<$core.String, $core.String>(3, _omitFieldNames ? '' : 'labels', entryClassName: 'BatchWriteRequest.LabelsEntry', keyFieldType: $pb.PbFieldType.OS, valueFieldType: $pb.PbFieldType.OS, packageName: const $pb.PackageName('google.firestore.v1')) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + BatchWriteRequest clone() => BatchWriteRequest()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + BatchWriteRequest copyWith(void Function(BatchWriteRequest) updates) => super.copyWith((message) => updates(message as BatchWriteRequest)) as BatchWriteRequest; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static BatchWriteRequest create() => BatchWriteRequest._(); + BatchWriteRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static BatchWriteRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static BatchWriteRequest? _defaultInstance; + + /// Required. The database name. In the format: + /// `projects/{project_id}/databases/{database_id}`. + @$pb.TagNumber(1) + $core.String get database => $_getSZ(0); + @$pb.TagNumber(1) + set database($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasDatabase() => $_has(0); + @$pb.TagNumber(1) + void clearDatabase() => $_clearField(1); + + /// The writes to apply. + /// + /// Method does not apply writes atomically and does not guarantee ordering. + /// Each write succeeds or fails independently. You cannot write to the same + /// document more than once per request. + @$pb.TagNumber(2) + $pb.PbList<$10.Write> get writes => $_getList(1); + + /// Labels associated with this batch write. + @$pb.TagNumber(3) + $pb.PbMap<$core.String, $core.String> get labels => $_getMap(2); +} + +/// The response from +/// [Firestore.BatchWrite][google.firestore.v1.Firestore.BatchWrite]. +class BatchWriteResponse extends $pb.GeneratedMessage { + factory BatchWriteResponse({ + $core.Iterable<$10.WriteResult>? writeResults, + $core.Iterable<$15.Status>? status, + }) { + final $result = create(); + if (writeResults != null) { + $result.writeResults.addAll(writeResults); + } + if (status != null) { + $result.status.addAll(status); + } + return $result; + } + BatchWriteResponse._() : super(); + factory BatchWriteResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory BatchWriteResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'BatchWriteResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.firestore.v1'), createEmptyInstance: create) + ..pc<$10.WriteResult>(1, _omitFieldNames ? '' : 'writeResults', $pb.PbFieldType.PM, subBuilder: $10.WriteResult.create) + ..pc<$15.Status>(2, _omitFieldNames ? '' : 'status', $pb.PbFieldType.PM, subBuilder: $15.Status.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + BatchWriteResponse clone() => BatchWriteResponse()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + BatchWriteResponse copyWith(void Function(BatchWriteResponse) updates) => super.copyWith((message) => updates(message as BatchWriteResponse)) as BatchWriteResponse; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static BatchWriteResponse create() => BatchWriteResponse._(); + BatchWriteResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static BatchWriteResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static BatchWriteResponse? _defaultInstance; + + /// The result of applying the writes. + /// + /// This i-th write result corresponds to the i-th write in the + /// request. + @$pb.TagNumber(1) + $pb.PbList<$10.WriteResult> get writeResults => $_getList(0); + + /// The status of applying the writes. + /// + /// This i-th write status corresponds to the i-th write in the + /// request. + @$pb.TagNumber(2) + $pb.PbList<$15.Status> get status => $_getList(1); +} + + +const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); +const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/pkgs/googleapis_firestore_v1/lib/google/firestore/v1/firestore.pbenum.dart b/pkgs/googleapis_firestore_v1/lib/google/firestore/v1/firestore.pbenum.dart new file mode 100644 index 00000000..e75c53b1 --- /dev/null +++ b/pkgs/googleapis_firestore_v1/lib/google/firestore/v1/firestore.pbenum.dart @@ -0,0 +1,55 @@ +// +// Generated code. Do not modify. +// source: google/firestore/v1/firestore.proto +// +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:core' as $core; + +import 'package:protobuf/protobuf.dart' as $pb; + +/// The type of change. +class TargetChange_TargetChangeType extends $pb.ProtobufEnum { + /// No change has occurred. Used only to send an updated `resume_token`. + static const TargetChange_TargetChangeType NO_CHANGE = TargetChange_TargetChangeType._(0, _omitEnumNames ? '' : 'NO_CHANGE'); + /// The targets have been added. + static const TargetChange_TargetChangeType ADD = TargetChange_TargetChangeType._(1, _omitEnumNames ? '' : 'ADD'); + /// The targets have been removed. + static const TargetChange_TargetChangeType REMOVE = TargetChange_TargetChangeType._(2, _omitEnumNames ? '' : 'REMOVE'); + /// The targets reflect all changes committed before the targets were added + /// to the stream. + /// + /// This will be sent after or with a `read_time` that is greater than or + /// equal to the time at which the targets were added. + /// + /// Listeners can wait for this change if read-after-write semantics + /// are desired. + static const TargetChange_TargetChangeType CURRENT = TargetChange_TargetChangeType._(3, _omitEnumNames ? '' : 'CURRENT'); + /// The targets have been reset, and a new initial state for the targets + /// will be returned in subsequent changes. + /// + /// After the initial state is complete, `CURRENT` will be returned even + /// if the target was previously indicated to be `CURRENT`. + static const TargetChange_TargetChangeType RESET = TargetChange_TargetChangeType._(4, _omitEnumNames ? '' : 'RESET'); + + static const $core.List values = [ + NO_CHANGE, + ADD, + REMOVE, + CURRENT, + RESET, + ]; + + static final $core.List _byValue = $pb.ProtobufEnum.$_initByValueList(values, 4); + static TargetChange_TargetChangeType? valueOf($core.int value) => value < 0 || value >= _byValue.length ? null : _byValue[value]; + + const TargetChange_TargetChangeType._(super.v, super.n); +} + + +const _omitEnumNames = $core.bool.fromEnvironment('protobuf.omit_enum_names'); diff --git a/pkgs/googleapis_firestore_v1/lib/google/firestore/v1/firestore.pbgrpc.dart b/pkgs/googleapis_firestore_v1/lib/google/firestore/v1/firestore.pbgrpc.dart new file mode 100644 index 00000000..3f49367b --- /dev/null +++ b/pkgs/googleapis_firestore_v1/lib/google/firestore/v1/firestore.pbgrpc.dart @@ -0,0 +1,410 @@ +// +// Generated code. Do not modify. +// source: google/firestore/v1/firestore.proto +// +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:async' as $async; +import 'dart:core' as $core; + +import 'package:grpc/service_api.dart' as $grpc; +import 'package:protobuf/protobuf.dart' as $pb; + +import '../../protobuf/empty.pb.dart' as $2; +import 'document.pb.dart' as $1; +import 'firestore.pb.dart' as $0; + +export 'firestore.pb.dart'; + +/// The Cloud Firestore service. +/// +/// Cloud Firestore is a fast, fully managed, serverless, cloud-native NoSQL +/// document database that simplifies storing, syncing, and querying data for +/// your mobile, web, and IoT apps at global scale. Its client libraries provide +/// live synchronization and offline support, while its security features and +/// integrations with Firebase and Google Cloud Platform accelerate building +/// truly serverless apps. +@$pb.GrpcServiceName('google.firestore.v1.Firestore') +class FirestoreClient extends $grpc.Client { + /// The hostname for this service. + static const $core.String defaultHost = 'firestore.googleapis.com'; + + /// OAuth scopes needed for the client. + static const $core.List<$core.String> oauthScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/datastore', + ]; + + static final _$getDocument = $grpc.ClientMethod<$0.GetDocumentRequest, $1.Document>( + '/google.firestore.v1.Firestore/GetDocument', + ($0.GetDocumentRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $1.Document.fromBuffer(value)); + static final _$listDocuments = $grpc.ClientMethod<$0.ListDocumentsRequest, $0.ListDocumentsResponse>( + '/google.firestore.v1.Firestore/ListDocuments', + ($0.ListDocumentsRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $0.ListDocumentsResponse.fromBuffer(value)); + static final _$updateDocument = $grpc.ClientMethod<$0.UpdateDocumentRequest, $1.Document>( + '/google.firestore.v1.Firestore/UpdateDocument', + ($0.UpdateDocumentRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $1.Document.fromBuffer(value)); + static final _$deleteDocument = $grpc.ClientMethod<$0.DeleteDocumentRequest, $2.Empty>( + '/google.firestore.v1.Firestore/DeleteDocument', + ($0.DeleteDocumentRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $2.Empty.fromBuffer(value)); + static final _$batchGetDocuments = $grpc.ClientMethod<$0.BatchGetDocumentsRequest, $0.BatchGetDocumentsResponse>( + '/google.firestore.v1.Firestore/BatchGetDocuments', + ($0.BatchGetDocumentsRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $0.BatchGetDocumentsResponse.fromBuffer(value)); + static final _$beginTransaction = $grpc.ClientMethod<$0.BeginTransactionRequest, $0.BeginTransactionResponse>( + '/google.firestore.v1.Firestore/BeginTransaction', + ($0.BeginTransactionRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $0.BeginTransactionResponse.fromBuffer(value)); + static final _$commit = $grpc.ClientMethod<$0.CommitRequest, $0.CommitResponse>( + '/google.firestore.v1.Firestore/Commit', + ($0.CommitRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $0.CommitResponse.fromBuffer(value)); + static final _$rollback = $grpc.ClientMethod<$0.RollbackRequest, $2.Empty>( + '/google.firestore.v1.Firestore/Rollback', + ($0.RollbackRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $2.Empty.fromBuffer(value)); + static final _$runQuery = $grpc.ClientMethod<$0.RunQueryRequest, $0.RunQueryResponse>( + '/google.firestore.v1.Firestore/RunQuery', + ($0.RunQueryRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $0.RunQueryResponse.fromBuffer(value)); + static final _$runAggregationQuery = $grpc.ClientMethod<$0.RunAggregationQueryRequest, $0.RunAggregationQueryResponse>( + '/google.firestore.v1.Firestore/RunAggregationQuery', + ($0.RunAggregationQueryRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $0.RunAggregationQueryResponse.fromBuffer(value)); + static final _$partitionQuery = $grpc.ClientMethod<$0.PartitionQueryRequest, $0.PartitionQueryResponse>( + '/google.firestore.v1.Firestore/PartitionQuery', + ($0.PartitionQueryRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $0.PartitionQueryResponse.fromBuffer(value)); + static final _$write = $grpc.ClientMethod<$0.WriteRequest, $0.WriteResponse>( + '/google.firestore.v1.Firestore/Write', + ($0.WriteRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $0.WriteResponse.fromBuffer(value)); + static final _$listen = $grpc.ClientMethod<$0.ListenRequest, $0.ListenResponse>( + '/google.firestore.v1.Firestore/Listen', + ($0.ListenRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $0.ListenResponse.fromBuffer(value)); + static final _$listCollectionIds = $grpc.ClientMethod<$0.ListCollectionIdsRequest, $0.ListCollectionIdsResponse>( + '/google.firestore.v1.Firestore/ListCollectionIds', + ($0.ListCollectionIdsRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $0.ListCollectionIdsResponse.fromBuffer(value)); + static final _$batchWrite = $grpc.ClientMethod<$0.BatchWriteRequest, $0.BatchWriteResponse>( + '/google.firestore.v1.Firestore/BatchWrite', + ($0.BatchWriteRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $0.BatchWriteResponse.fromBuffer(value)); + static final _$createDocument = $grpc.ClientMethod<$0.CreateDocumentRequest, $1.Document>( + '/google.firestore.v1.Firestore/CreateDocument', + ($0.CreateDocumentRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $1.Document.fromBuffer(value)); + + FirestoreClient(super.channel, {super.options, super.interceptors}); + + /// Gets a single document. + $grpc.ResponseFuture<$1.Document> getDocument($0.GetDocumentRequest request, {$grpc.CallOptions? options}) { + return $createUnaryCall(_$getDocument, request, options: options); + } + + /// Lists documents. + $grpc.ResponseFuture<$0.ListDocumentsResponse> listDocuments($0.ListDocumentsRequest request, {$grpc.CallOptions? options}) { + return $createUnaryCall(_$listDocuments, request, options: options); + } + + /// Updates or inserts a document. + $grpc.ResponseFuture<$1.Document> updateDocument($0.UpdateDocumentRequest request, {$grpc.CallOptions? options}) { + return $createUnaryCall(_$updateDocument, request, options: options); + } + + /// Deletes a document. + $grpc.ResponseFuture<$2.Empty> deleteDocument($0.DeleteDocumentRequest request, {$grpc.CallOptions? options}) { + return $createUnaryCall(_$deleteDocument, request, options: options); + } + + /// Gets multiple documents. + /// + /// Documents returned by this method are not guaranteed to be returned in the + /// same order that they were requested. + $grpc.ResponseStream<$0.BatchGetDocumentsResponse> batchGetDocuments($0.BatchGetDocumentsRequest request, {$grpc.CallOptions? options}) { + return $createStreamingCall(_$batchGetDocuments, $async.Stream.fromIterable([request]), options: options); + } + + /// Starts a new transaction. + $grpc.ResponseFuture<$0.BeginTransactionResponse> beginTransaction($0.BeginTransactionRequest request, {$grpc.CallOptions? options}) { + return $createUnaryCall(_$beginTransaction, request, options: options); + } + + /// Commits a transaction, while optionally updating documents. + $grpc.ResponseFuture<$0.CommitResponse> commit($0.CommitRequest request, {$grpc.CallOptions? options}) { + return $createUnaryCall(_$commit, request, options: options); + } + + /// Rolls back a transaction. + $grpc.ResponseFuture<$2.Empty> rollback($0.RollbackRequest request, {$grpc.CallOptions? options}) { + return $createUnaryCall(_$rollback, request, options: options); + } + + /// Runs a query. + $grpc.ResponseStream<$0.RunQueryResponse> runQuery($0.RunQueryRequest request, {$grpc.CallOptions? options}) { + return $createStreamingCall(_$runQuery, $async.Stream.fromIterable([request]), options: options); + } + + /// Runs an aggregation query. + /// + /// Rather than producing [Document][google.firestore.v1.Document] results like + /// [Firestore.RunQuery][google.firestore.v1.Firestore.RunQuery], this API + /// allows running an aggregation to produce a series of + /// [AggregationResult][google.firestore.v1.AggregationResult] server-side. + /// + /// High-Level Example: + /// + /// ``` + /// -- Return the number of documents in table given a filter. + /// SELECT COUNT(*) FROM ( SELECT * FROM k where a = true ); + /// ``` + $grpc.ResponseStream<$0.RunAggregationQueryResponse> runAggregationQuery($0.RunAggregationQueryRequest request, {$grpc.CallOptions? options}) { + return $createStreamingCall(_$runAggregationQuery, $async.Stream.fromIterable([request]), options: options); + } + + /// Partitions a query by returning partition cursors that can be used to run + /// the query in parallel. The returned partition cursors are split points that + /// can be used by RunQuery as starting/end points for the query results. + $grpc.ResponseFuture<$0.PartitionQueryResponse> partitionQuery($0.PartitionQueryRequest request, {$grpc.CallOptions? options}) { + return $createUnaryCall(_$partitionQuery, request, options: options); + } + + /// Streams batches of document updates and deletes, in order. This method is + /// only available via gRPC or WebChannel (not REST). + $grpc.ResponseStream<$0.WriteResponse> write($async.Stream<$0.WriteRequest> request, {$grpc.CallOptions? options}) { + return $createStreamingCall(_$write, request, options: options); + } + + /// Listens to changes. This method is only available via gRPC or WebChannel + /// (not REST). + $grpc.ResponseStream<$0.ListenResponse> listen($async.Stream<$0.ListenRequest> request, {$grpc.CallOptions? options}) { + return $createStreamingCall(_$listen, request, options: options); + } + + /// Lists all the collection IDs underneath a document. + $grpc.ResponseFuture<$0.ListCollectionIdsResponse> listCollectionIds($0.ListCollectionIdsRequest request, {$grpc.CallOptions? options}) { + return $createUnaryCall(_$listCollectionIds, request, options: options); + } + + /// Applies a batch of write operations. + /// + /// The BatchWrite method does not apply the write operations atomically + /// and can apply them out of order. Method does not allow more than one write + /// per document. Each write succeeds or fails independently. See the + /// [BatchWriteResponse][google.firestore.v1.BatchWriteResponse] for the + /// success status of each write. + /// + /// If you require an atomically applied set of writes, use + /// [Commit][google.firestore.v1.Firestore.Commit] instead. + $grpc.ResponseFuture<$0.BatchWriteResponse> batchWrite($0.BatchWriteRequest request, {$grpc.CallOptions? options}) { + return $createUnaryCall(_$batchWrite, request, options: options); + } + + /// Creates a new document. + $grpc.ResponseFuture<$1.Document> createDocument($0.CreateDocumentRequest request, {$grpc.CallOptions? options}) { + return $createUnaryCall(_$createDocument, request, options: options); + } +} + +@$pb.GrpcServiceName('google.firestore.v1.Firestore') +abstract class FirestoreServiceBase extends $grpc.Service { + $core.String get $name => 'google.firestore.v1.Firestore'; + + FirestoreServiceBase() { + $addMethod($grpc.ServiceMethod<$0.GetDocumentRequest, $1.Document>( + 'GetDocument', + getDocument_Pre, + false, + false, + ($core.List<$core.int> value) => $0.GetDocumentRequest.fromBuffer(value), + ($1.Document value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$0.ListDocumentsRequest, $0.ListDocumentsResponse>( + 'ListDocuments', + listDocuments_Pre, + false, + false, + ($core.List<$core.int> value) => $0.ListDocumentsRequest.fromBuffer(value), + ($0.ListDocumentsResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$0.UpdateDocumentRequest, $1.Document>( + 'UpdateDocument', + updateDocument_Pre, + false, + false, + ($core.List<$core.int> value) => $0.UpdateDocumentRequest.fromBuffer(value), + ($1.Document value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$0.DeleteDocumentRequest, $2.Empty>( + 'DeleteDocument', + deleteDocument_Pre, + false, + false, + ($core.List<$core.int> value) => $0.DeleteDocumentRequest.fromBuffer(value), + ($2.Empty value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$0.BatchGetDocumentsRequest, $0.BatchGetDocumentsResponse>( + 'BatchGetDocuments', + batchGetDocuments_Pre, + false, + true, + ($core.List<$core.int> value) => $0.BatchGetDocumentsRequest.fromBuffer(value), + ($0.BatchGetDocumentsResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$0.BeginTransactionRequest, $0.BeginTransactionResponse>( + 'BeginTransaction', + beginTransaction_Pre, + false, + false, + ($core.List<$core.int> value) => $0.BeginTransactionRequest.fromBuffer(value), + ($0.BeginTransactionResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$0.CommitRequest, $0.CommitResponse>( + 'Commit', + commit_Pre, + false, + false, + ($core.List<$core.int> value) => $0.CommitRequest.fromBuffer(value), + ($0.CommitResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$0.RollbackRequest, $2.Empty>( + 'Rollback', + rollback_Pre, + false, + false, + ($core.List<$core.int> value) => $0.RollbackRequest.fromBuffer(value), + ($2.Empty value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$0.RunQueryRequest, $0.RunQueryResponse>( + 'RunQuery', + runQuery_Pre, + false, + true, + ($core.List<$core.int> value) => $0.RunQueryRequest.fromBuffer(value), + ($0.RunQueryResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$0.RunAggregationQueryRequest, $0.RunAggregationQueryResponse>( + 'RunAggregationQuery', + runAggregationQuery_Pre, + false, + true, + ($core.List<$core.int> value) => $0.RunAggregationQueryRequest.fromBuffer(value), + ($0.RunAggregationQueryResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$0.PartitionQueryRequest, $0.PartitionQueryResponse>( + 'PartitionQuery', + partitionQuery_Pre, + false, + false, + ($core.List<$core.int> value) => $0.PartitionQueryRequest.fromBuffer(value), + ($0.PartitionQueryResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$0.WriteRequest, $0.WriteResponse>( + 'Write', + write, + true, + true, + ($core.List<$core.int> value) => $0.WriteRequest.fromBuffer(value), + ($0.WriteResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$0.ListenRequest, $0.ListenResponse>( + 'Listen', + listen, + true, + true, + ($core.List<$core.int> value) => $0.ListenRequest.fromBuffer(value), + ($0.ListenResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$0.ListCollectionIdsRequest, $0.ListCollectionIdsResponse>( + 'ListCollectionIds', + listCollectionIds_Pre, + false, + false, + ($core.List<$core.int> value) => $0.ListCollectionIdsRequest.fromBuffer(value), + ($0.ListCollectionIdsResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$0.BatchWriteRequest, $0.BatchWriteResponse>( + 'BatchWrite', + batchWrite_Pre, + false, + false, + ($core.List<$core.int> value) => $0.BatchWriteRequest.fromBuffer(value), + ($0.BatchWriteResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$0.CreateDocumentRequest, $1.Document>( + 'CreateDocument', + createDocument_Pre, + false, + false, + ($core.List<$core.int> value) => $0.CreateDocumentRequest.fromBuffer(value), + ($1.Document value) => value.writeToBuffer())); + } + + $async.Future<$1.Document> getDocument_Pre($grpc.ServiceCall $call, $async.Future<$0.GetDocumentRequest> $request) async { + return getDocument($call, await $request); + } + + $async.Future<$0.ListDocumentsResponse> listDocuments_Pre($grpc.ServiceCall $call, $async.Future<$0.ListDocumentsRequest> $request) async { + return listDocuments($call, await $request); + } + + $async.Future<$1.Document> updateDocument_Pre($grpc.ServiceCall $call, $async.Future<$0.UpdateDocumentRequest> $request) async { + return updateDocument($call, await $request); + } + + $async.Future<$2.Empty> deleteDocument_Pre($grpc.ServiceCall $call, $async.Future<$0.DeleteDocumentRequest> $request) async { + return deleteDocument($call, await $request); + } + + $async.Stream<$0.BatchGetDocumentsResponse> batchGetDocuments_Pre($grpc.ServiceCall $call, $async.Future<$0.BatchGetDocumentsRequest> $request) async* { + yield* batchGetDocuments($call, await $request); + } + + $async.Future<$0.BeginTransactionResponse> beginTransaction_Pre($grpc.ServiceCall $call, $async.Future<$0.BeginTransactionRequest> $request) async { + return beginTransaction($call, await $request); + } + + $async.Future<$0.CommitResponse> commit_Pre($grpc.ServiceCall $call, $async.Future<$0.CommitRequest> $request) async { + return commit($call, await $request); + } + + $async.Future<$2.Empty> rollback_Pre($grpc.ServiceCall $call, $async.Future<$0.RollbackRequest> $request) async { + return rollback($call, await $request); + } + + $async.Stream<$0.RunQueryResponse> runQuery_Pre($grpc.ServiceCall $call, $async.Future<$0.RunQueryRequest> $request) async* { + yield* runQuery($call, await $request); + } + + $async.Stream<$0.RunAggregationQueryResponse> runAggregationQuery_Pre($grpc.ServiceCall $call, $async.Future<$0.RunAggregationQueryRequest> $request) async* { + yield* runAggregationQuery($call, await $request); + } + + $async.Future<$0.PartitionQueryResponse> partitionQuery_Pre($grpc.ServiceCall $call, $async.Future<$0.PartitionQueryRequest> $request) async { + return partitionQuery($call, await $request); + } + + $async.Future<$0.ListCollectionIdsResponse> listCollectionIds_Pre($grpc.ServiceCall $call, $async.Future<$0.ListCollectionIdsRequest> $request) async { + return listCollectionIds($call, await $request); + } + + $async.Future<$0.BatchWriteResponse> batchWrite_Pre($grpc.ServiceCall $call, $async.Future<$0.BatchWriteRequest> $request) async { + return batchWrite($call, await $request); + } + + $async.Future<$1.Document> createDocument_Pre($grpc.ServiceCall $call, $async.Future<$0.CreateDocumentRequest> $request) async { + return createDocument($call, await $request); + } + + $async.Future<$1.Document> getDocument($grpc.ServiceCall call, $0.GetDocumentRequest request); + $async.Future<$0.ListDocumentsResponse> listDocuments($grpc.ServiceCall call, $0.ListDocumentsRequest request); + $async.Future<$1.Document> updateDocument($grpc.ServiceCall call, $0.UpdateDocumentRequest request); + $async.Future<$2.Empty> deleteDocument($grpc.ServiceCall call, $0.DeleteDocumentRequest request); + $async.Stream<$0.BatchGetDocumentsResponse> batchGetDocuments($grpc.ServiceCall call, $0.BatchGetDocumentsRequest request); + $async.Future<$0.BeginTransactionResponse> beginTransaction($grpc.ServiceCall call, $0.BeginTransactionRequest request); + $async.Future<$0.CommitResponse> commit($grpc.ServiceCall call, $0.CommitRequest request); + $async.Future<$2.Empty> rollback($grpc.ServiceCall call, $0.RollbackRequest request); + $async.Stream<$0.RunQueryResponse> runQuery($grpc.ServiceCall call, $0.RunQueryRequest request); + $async.Stream<$0.RunAggregationQueryResponse> runAggregationQuery($grpc.ServiceCall call, $0.RunAggregationQueryRequest request); + $async.Future<$0.PartitionQueryResponse> partitionQuery($grpc.ServiceCall call, $0.PartitionQueryRequest request); + $async.Stream<$0.WriteResponse> write($grpc.ServiceCall call, $async.Stream<$0.WriteRequest> request); + $async.Stream<$0.ListenResponse> listen($grpc.ServiceCall call, $async.Stream<$0.ListenRequest> request); + $async.Future<$0.ListCollectionIdsResponse> listCollectionIds($grpc.ServiceCall call, $0.ListCollectionIdsRequest request); + $async.Future<$0.BatchWriteResponse> batchWrite($grpc.ServiceCall call, $0.BatchWriteRequest request); + $async.Future<$1.Document> createDocument($grpc.ServiceCall call, $0.CreateDocumentRequest request); +} diff --git a/pkgs/googleapis_firestore_v1/lib/google/firestore/v1/query.pb.dart b/pkgs/googleapis_firestore_v1/lib/google/firestore/v1/query.pb.dart new file mode 100644 index 00000000..d5b01c82 --- /dev/null +++ b/pkgs/googleapis_firestore_v1/lib/google/firestore/v1/query.pb.dart @@ -0,0 +1,1436 @@ +// +// Generated code. Do not modify. +// source: google/firestore/v1/query.proto +// +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:core' as $core; + +import 'package:protobuf/protobuf.dart' as $pb; + +import '../../protobuf/wrappers.pb.dart' as $14; +import 'document.pb.dart' as $1; +import 'query.pbenum.dart'; + +export 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions; + +export 'query.pbenum.dart'; + +/// A selection of a collection, such as `messages as m1`. +class StructuredQuery_CollectionSelector extends $pb.GeneratedMessage { + factory StructuredQuery_CollectionSelector({ + $core.String? collectionId, + $core.bool? allDescendants, + }) { + final $result = create(); + if (collectionId != null) { + $result.collectionId = collectionId; + } + if (allDescendants != null) { + $result.allDescendants = allDescendants; + } + return $result; + } + StructuredQuery_CollectionSelector._() : super(); + factory StructuredQuery_CollectionSelector.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory StructuredQuery_CollectionSelector.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'StructuredQuery.CollectionSelector', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.firestore.v1'), createEmptyInstance: create) + ..aOS(2, _omitFieldNames ? '' : 'collectionId') + ..aOB(3, _omitFieldNames ? '' : 'allDescendants') + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + StructuredQuery_CollectionSelector clone() => StructuredQuery_CollectionSelector()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + StructuredQuery_CollectionSelector copyWith(void Function(StructuredQuery_CollectionSelector) updates) => super.copyWith((message) => updates(message as StructuredQuery_CollectionSelector)) as StructuredQuery_CollectionSelector; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static StructuredQuery_CollectionSelector create() => StructuredQuery_CollectionSelector._(); + StructuredQuery_CollectionSelector createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static StructuredQuery_CollectionSelector getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static StructuredQuery_CollectionSelector? _defaultInstance; + + /// The collection ID. + /// When set, selects only collections with this ID. + @$pb.TagNumber(2) + $core.String get collectionId => $_getSZ(0); + @$pb.TagNumber(2) + set collectionId($core.String v) { $_setString(0, v); } + @$pb.TagNumber(2) + $core.bool hasCollectionId() => $_has(0); + @$pb.TagNumber(2) + void clearCollectionId() => $_clearField(2); + + /// When false, selects only collections that are immediate children of + /// the `parent` specified in the containing `RunQueryRequest`. + /// When true, selects all descendant collections. + @$pb.TagNumber(3) + $core.bool get allDescendants => $_getBF(1); + @$pb.TagNumber(3) + set allDescendants($core.bool v) { $_setBool(1, v); } + @$pb.TagNumber(3) + $core.bool hasAllDescendants() => $_has(1); + @$pb.TagNumber(3) + void clearAllDescendants() => $_clearField(3); +} + +enum StructuredQuery_Filter_FilterType { + compositeFilter, + fieldFilter, + unaryFilter, + notSet +} + +/// A filter. +class StructuredQuery_Filter extends $pb.GeneratedMessage { + factory StructuredQuery_Filter({ + StructuredQuery_CompositeFilter? compositeFilter, + StructuredQuery_FieldFilter? fieldFilter, + StructuredQuery_UnaryFilter? unaryFilter, + }) { + final $result = create(); + if (compositeFilter != null) { + $result.compositeFilter = compositeFilter; + } + if (fieldFilter != null) { + $result.fieldFilter = fieldFilter; + } + if (unaryFilter != null) { + $result.unaryFilter = unaryFilter; + } + return $result; + } + StructuredQuery_Filter._() : super(); + factory StructuredQuery_Filter.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory StructuredQuery_Filter.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static const $core.Map<$core.int, StructuredQuery_Filter_FilterType> _StructuredQuery_Filter_FilterTypeByTag = { + 1 : StructuredQuery_Filter_FilterType.compositeFilter, + 2 : StructuredQuery_Filter_FilterType.fieldFilter, + 3 : StructuredQuery_Filter_FilterType.unaryFilter, + 0 : StructuredQuery_Filter_FilterType.notSet + }; + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'StructuredQuery.Filter', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.firestore.v1'), createEmptyInstance: create) + ..oo(0, [1, 2, 3]) + ..aOM(1, _omitFieldNames ? '' : 'compositeFilter', subBuilder: StructuredQuery_CompositeFilter.create) + ..aOM(2, _omitFieldNames ? '' : 'fieldFilter', subBuilder: StructuredQuery_FieldFilter.create) + ..aOM(3, _omitFieldNames ? '' : 'unaryFilter', subBuilder: StructuredQuery_UnaryFilter.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + StructuredQuery_Filter clone() => StructuredQuery_Filter()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + StructuredQuery_Filter copyWith(void Function(StructuredQuery_Filter) updates) => super.copyWith((message) => updates(message as StructuredQuery_Filter)) as StructuredQuery_Filter; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static StructuredQuery_Filter create() => StructuredQuery_Filter._(); + StructuredQuery_Filter createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static StructuredQuery_Filter getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static StructuredQuery_Filter? _defaultInstance; + + StructuredQuery_Filter_FilterType whichFilterType() => _StructuredQuery_Filter_FilterTypeByTag[$_whichOneof(0)]!; + void clearFilterType() => $_clearField($_whichOneof(0)); + + /// A composite filter. + @$pb.TagNumber(1) + StructuredQuery_CompositeFilter get compositeFilter => $_getN(0); + @$pb.TagNumber(1) + set compositeFilter(StructuredQuery_CompositeFilter v) { $_setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasCompositeFilter() => $_has(0); + @$pb.TagNumber(1) + void clearCompositeFilter() => $_clearField(1); + @$pb.TagNumber(1) + StructuredQuery_CompositeFilter ensureCompositeFilter() => $_ensure(0); + + /// A filter on a document field. + @$pb.TagNumber(2) + StructuredQuery_FieldFilter get fieldFilter => $_getN(1); + @$pb.TagNumber(2) + set fieldFilter(StructuredQuery_FieldFilter v) { $_setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasFieldFilter() => $_has(1); + @$pb.TagNumber(2) + void clearFieldFilter() => $_clearField(2); + @$pb.TagNumber(2) + StructuredQuery_FieldFilter ensureFieldFilter() => $_ensure(1); + + /// A filter that takes exactly one argument. + @$pb.TagNumber(3) + StructuredQuery_UnaryFilter get unaryFilter => $_getN(2); + @$pb.TagNumber(3) + set unaryFilter(StructuredQuery_UnaryFilter v) { $_setField(3, v); } + @$pb.TagNumber(3) + $core.bool hasUnaryFilter() => $_has(2); + @$pb.TagNumber(3) + void clearUnaryFilter() => $_clearField(3); + @$pb.TagNumber(3) + StructuredQuery_UnaryFilter ensureUnaryFilter() => $_ensure(2); +} + +/// A filter that merges multiple other filters using the given operator. +class StructuredQuery_CompositeFilter extends $pb.GeneratedMessage { + factory StructuredQuery_CompositeFilter({ + StructuredQuery_CompositeFilter_Operator? op, + $core.Iterable? filters, + }) { + final $result = create(); + if (op != null) { + $result.op = op; + } + if (filters != null) { + $result.filters.addAll(filters); + } + return $result; + } + StructuredQuery_CompositeFilter._() : super(); + factory StructuredQuery_CompositeFilter.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory StructuredQuery_CompositeFilter.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'StructuredQuery.CompositeFilter', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.firestore.v1'), createEmptyInstance: create) + ..e(1, _omitFieldNames ? '' : 'op', $pb.PbFieldType.OE, defaultOrMaker: StructuredQuery_CompositeFilter_Operator.OPERATOR_UNSPECIFIED, valueOf: StructuredQuery_CompositeFilter_Operator.valueOf, enumValues: StructuredQuery_CompositeFilter_Operator.values) + ..pc(2, _omitFieldNames ? '' : 'filters', $pb.PbFieldType.PM, subBuilder: StructuredQuery_Filter.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + StructuredQuery_CompositeFilter clone() => StructuredQuery_CompositeFilter()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + StructuredQuery_CompositeFilter copyWith(void Function(StructuredQuery_CompositeFilter) updates) => super.copyWith((message) => updates(message as StructuredQuery_CompositeFilter)) as StructuredQuery_CompositeFilter; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static StructuredQuery_CompositeFilter create() => StructuredQuery_CompositeFilter._(); + StructuredQuery_CompositeFilter createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static StructuredQuery_CompositeFilter getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static StructuredQuery_CompositeFilter? _defaultInstance; + + /// The operator for combining multiple filters. + @$pb.TagNumber(1) + StructuredQuery_CompositeFilter_Operator get op => $_getN(0); + @$pb.TagNumber(1) + set op(StructuredQuery_CompositeFilter_Operator v) { $_setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasOp() => $_has(0); + @$pb.TagNumber(1) + void clearOp() => $_clearField(1); + + /// The list of filters to combine. + /// + /// Requires: + /// + /// * At least one filter is present. + @$pb.TagNumber(2) + $pb.PbList get filters => $_getList(1); +} + +/// A filter on a specific field. +class StructuredQuery_FieldFilter extends $pb.GeneratedMessage { + factory StructuredQuery_FieldFilter({ + StructuredQuery_FieldReference? field_1, + StructuredQuery_FieldFilter_Operator? op, + $1.Value? value, + }) { + final $result = create(); + if (field_1 != null) { + $result.field_1 = field_1; + } + if (op != null) { + $result.op = op; + } + if (value != null) { + $result.value = value; + } + return $result; + } + StructuredQuery_FieldFilter._() : super(); + factory StructuredQuery_FieldFilter.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory StructuredQuery_FieldFilter.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'StructuredQuery.FieldFilter', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.firestore.v1'), createEmptyInstance: create) + ..aOM(1, _omitFieldNames ? '' : 'field', subBuilder: StructuredQuery_FieldReference.create) + ..e(2, _omitFieldNames ? '' : 'op', $pb.PbFieldType.OE, defaultOrMaker: StructuredQuery_FieldFilter_Operator.OPERATOR_UNSPECIFIED, valueOf: StructuredQuery_FieldFilter_Operator.valueOf, enumValues: StructuredQuery_FieldFilter_Operator.values) + ..aOM<$1.Value>(3, _omitFieldNames ? '' : 'value', subBuilder: $1.Value.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + StructuredQuery_FieldFilter clone() => StructuredQuery_FieldFilter()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + StructuredQuery_FieldFilter copyWith(void Function(StructuredQuery_FieldFilter) updates) => super.copyWith((message) => updates(message as StructuredQuery_FieldFilter)) as StructuredQuery_FieldFilter; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static StructuredQuery_FieldFilter create() => StructuredQuery_FieldFilter._(); + StructuredQuery_FieldFilter createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static StructuredQuery_FieldFilter getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static StructuredQuery_FieldFilter? _defaultInstance; + + /// The field to filter by. + @$pb.TagNumber(1) + StructuredQuery_FieldReference get field_1 => $_getN(0); + @$pb.TagNumber(1) + set field_1(StructuredQuery_FieldReference v) { $_setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasField_1() => $_has(0); + @$pb.TagNumber(1) + void clearField_1() => $_clearField(1); + @$pb.TagNumber(1) + StructuredQuery_FieldReference ensureField_1() => $_ensure(0); + + /// The operator to filter by. + @$pb.TagNumber(2) + StructuredQuery_FieldFilter_Operator get op => $_getN(1); + @$pb.TagNumber(2) + set op(StructuredQuery_FieldFilter_Operator v) { $_setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasOp() => $_has(1); + @$pb.TagNumber(2) + void clearOp() => $_clearField(2); + + /// The value to compare to. + @$pb.TagNumber(3) + $1.Value get value => $_getN(2); + @$pb.TagNumber(3) + set value($1.Value v) { $_setField(3, v); } + @$pb.TagNumber(3) + $core.bool hasValue() => $_has(2); + @$pb.TagNumber(3) + void clearValue() => $_clearField(3); + @$pb.TagNumber(3) + $1.Value ensureValue() => $_ensure(2); +} + +enum StructuredQuery_UnaryFilter_OperandType { + field_2, + notSet +} + +/// A filter with a single operand. +class StructuredQuery_UnaryFilter extends $pb.GeneratedMessage { + factory StructuredQuery_UnaryFilter({ + StructuredQuery_UnaryFilter_Operator? op, + StructuredQuery_FieldReference? field_2, + }) { + final $result = create(); + if (op != null) { + $result.op = op; + } + if (field_2 != null) { + $result.field_2 = field_2; + } + return $result; + } + StructuredQuery_UnaryFilter._() : super(); + factory StructuredQuery_UnaryFilter.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory StructuredQuery_UnaryFilter.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static const $core.Map<$core.int, StructuredQuery_UnaryFilter_OperandType> _StructuredQuery_UnaryFilter_OperandTypeByTag = { + 2 : StructuredQuery_UnaryFilter_OperandType.field_2, + 0 : StructuredQuery_UnaryFilter_OperandType.notSet + }; + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'StructuredQuery.UnaryFilter', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.firestore.v1'), createEmptyInstance: create) + ..oo(0, [2]) + ..e(1, _omitFieldNames ? '' : 'op', $pb.PbFieldType.OE, defaultOrMaker: StructuredQuery_UnaryFilter_Operator.OPERATOR_UNSPECIFIED, valueOf: StructuredQuery_UnaryFilter_Operator.valueOf, enumValues: StructuredQuery_UnaryFilter_Operator.values) + ..aOM(2, _omitFieldNames ? '' : 'field', subBuilder: StructuredQuery_FieldReference.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + StructuredQuery_UnaryFilter clone() => StructuredQuery_UnaryFilter()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + StructuredQuery_UnaryFilter copyWith(void Function(StructuredQuery_UnaryFilter) updates) => super.copyWith((message) => updates(message as StructuredQuery_UnaryFilter)) as StructuredQuery_UnaryFilter; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static StructuredQuery_UnaryFilter create() => StructuredQuery_UnaryFilter._(); + StructuredQuery_UnaryFilter createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static StructuredQuery_UnaryFilter getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static StructuredQuery_UnaryFilter? _defaultInstance; + + StructuredQuery_UnaryFilter_OperandType whichOperandType() => _StructuredQuery_UnaryFilter_OperandTypeByTag[$_whichOneof(0)]!; + void clearOperandType() => $_clearField($_whichOneof(0)); + + /// The unary operator to apply. + @$pb.TagNumber(1) + StructuredQuery_UnaryFilter_Operator get op => $_getN(0); + @$pb.TagNumber(1) + set op(StructuredQuery_UnaryFilter_Operator v) { $_setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasOp() => $_has(0); + @$pb.TagNumber(1) + void clearOp() => $_clearField(1); + + /// The field to which to apply the operator. + @$pb.TagNumber(2) + StructuredQuery_FieldReference get field_2 => $_getN(1); + @$pb.TagNumber(2) + set field_2(StructuredQuery_FieldReference v) { $_setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasField_2() => $_has(1); + @$pb.TagNumber(2) + void clearField_2() => $_clearField(2); + @$pb.TagNumber(2) + StructuredQuery_FieldReference ensureField_2() => $_ensure(1); +} + +/// An order on a field. +class StructuredQuery_Order extends $pb.GeneratedMessage { + factory StructuredQuery_Order({ + StructuredQuery_FieldReference? field_1, + StructuredQuery_Direction? direction, + }) { + final $result = create(); + if (field_1 != null) { + $result.field_1 = field_1; + } + if (direction != null) { + $result.direction = direction; + } + return $result; + } + StructuredQuery_Order._() : super(); + factory StructuredQuery_Order.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory StructuredQuery_Order.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'StructuredQuery.Order', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.firestore.v1'), createEmptyInstance: create) + ..aOM(1, _omitFieldNames ? '' : 'field', subBuilder: StructuredQuery_FieldReference.create) + ..e(2, _omitFieldNames ? '' : 'direction', $pb.PbFieldType.OE, defaultOrMaker: StructuredQuery_Direction.DIRECTION_UNSPECIFIED, valueOf: StructuredQuery_Direction.valueOf, enumValues: StructuredQuery_Direction.values) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + StructuredQuery_Order clone() => StructuredQuery_Order()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + StructuredQuery_Order copyWith(void Function(StructuredQuery_Order) updates) => super.copyWith((message) => updates(message as StructuredQuery_Order)) as StructuredQuery_Order; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static StructuredQuery_Order create() => StructuredQuery_Order._(); + StructuredQuery_Order createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static StructuredQuery_Order getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static StructuredQuery_Order? _defaultInstance; + + /// The field to order by. + @$pb.TagNumber(1) + StructuredQuery_FieldReference get field_1 => $_getN(0); + @$pb.TagNumber(1) + set field_1(StructuredQuery_FieldReference v) { $_setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasField_1() => $_has(0); + @$pb.TagNumber(1) + void clearField_1() => $_clearField(1); + @$pb.TagNumber(1) + StructuredQuery_FieldReference ensureField_1() => $_ensure(0); + + /// The direction to order by. Defaults to `ASCENDING`. + @$pb.TagNumber(2) + StructuredQuery_Direction get direction => $_getN(1); + @$pb.TagNumber(2) + set direction(StructuredQuery_Direction v) { $_setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasDirection() => $_has(1); + @$pb.TagNumber(2) + void clearDirection() => $_clearField(2); +} + +/// A reference to a field in a document, ex: `stats.operations`. +class StructuredQuery_FieldReference extends $pb.GeneratedMessage { + factory StructuredQuery_FieldReference({ + $core.String? fieldPath, + }) { + final $result = create(); + if (fieldPath != null) { + $result.fieldPath = fieldPath; + } + return $result; + } + StructuredQuery_FieldReference._() : super(); + factory StructuredQuery_FieldReference.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory StructuredQuery_FieldReference.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'StructuredQuery.FieldReference', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.firestore.v1'), createEmptyInstance: create) + ..aOS(2, _omitFieldNames ? '' : 'fieldPath') + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + StructuredQuery_FieldReference clone() => StructuredQuery_FieldReference()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + StructuredQuery_FieldReference copyWith(void Function(StructuredQuery_FieldReference) updates) => super.copyWith((message) => updates(message as StructuredQuery_FieldReference)) as StructuredQuery_FieldReference; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static StructuredQuery_FieldReference create() => StructuredQuery_FieldReference._(); + StructuredQuery_FieldReference createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static StructuredQuery_FieldReference getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static StructuredQuery_FieldReference? _defaultInstance; + + /// A reference to a field in a document. + /// + /// Requires: + /// + /// * MUST be a dot-delimited (`.`) string of segments, where each segment + /// conforms to [document field name][google.firestore.v1.Document.fields] + /// limitations. + @$pb.TagNumber(2) + $core.String get fieldPath => $_getSZ(0); + @$pb.TagNumber(2) + set fieldPath($core.String v) { $_setString(0, v); } + @$pb.TagNumber(2) + $core.bool hasFieldPath() => $_has(0); + @$pb.TagNumber(2) + void clearFieldPath() => $_clearField(2); +} + +/// The projection of document's fields to return. +class StructuredQuery_Projection extends $pb.GeneratedMessage { + factory StructuredQuery_Projection({ + $core.Iterable? fields, + }) { + final $result = create(); + if (fields != null) { + $result.fields.addAll(fields); + } + return $result; + } + StructuredQuery_Projection._() : super(); + factory StructuredQuery_Projection.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory StructuredQuery_Projection.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'StructuredQuery.Projection', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.firestore.v1'), createEmptyInstance: create) + ..pc(2, _omitFieldNames ? '' : 'fields', $pb.PbFieldType.PM, subBuilder: StructuredQuery_FieldReference.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + StructuredQuery_Projection clone() => StructuredQuery_Projection()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + StructuredQuery_Projection copyWith(void Function(StructuredQuery_Projection) updates) => super.copyWith((message) => updates(message as StructuredQuery_Projection)) as StructuredQuery_Projection; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static StructuredQuery_Projection create() => StructuredQuery_Projection._(); + StructuredQuery_Projection createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static StructuredQuery_Projection getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static StructuredQuery_Projection? _defaultInstance; + + /// The fields to return. + /// + /// If empty, all fields are returned. To only return the name + /// of the document, use `['__name__']`. + @$pb.TagNumber(2) + $pb.PbList get fields => $_getList(0); +} + +/// Nearest Neighbors search config. The ordering provided by FindNearest +/// supersedes the order_by stage. If multiple documents have the same vector +/// distance, the returned document order is not guaranteed to be stable +/// between queries. +class StructuredQuery_FindNearest extends $pb.GeneratedMessage { + factory StructuredQuery_FindNearest({ + StructuredQuery_FieldReference? vectorField, + $1.Value? queryVector, + StructuredQuery_FindNearest_DistanceMeasure? distanceMeasure, + $14.Int32Value? limit, + $core.String? distanceResultField, + $14.DoubleValue? distanceThreshold, + }) { + final $result = create(); + if (vectorField != null) { + $result.vectorField = vectorField; + } + if (queryVector != null) { + $result.queryVector = queryVector; + } + if (distanceMeasure != null) { + $result.distanceMeasure = distanceMeasure; + } + if (limit != null) { + $result.limit = limit; + } + if (distanceResultField != null) { + $result.distanceResultField = distanceResultField; + } + if (distanceThreshold != null) { + $result.distanceThreshold = distanceThreshold; + } + return $result; + } + StructuredQuery_FindNearest._() : super(); + factory StructuredQuery_FindNearest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory StructuredQuery_FindNearest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'StructuredQuery.FindNearest', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.firestore.v1'), createEmptyInstance: create) + ..aOM(1, _omitFieldNames ? '' : 'vectorField', subBuilder: StructuredQuery_FieldReference.create) + ..aOM<$1.Value>(2, _omitFieldNames ? '' : 'queryVector', subBuilder: $1.Value.create) + ..e(3, _omitFieldNames ? '' : 'distanceMeasure', $pb.PbFieldType.OE, defaultOrMaker: StructuredQuery_FindNearest_DistanceMeasure.DISTANCE_MEASURE_UNSPECIFIED, valueOf: StructuredQuery_FindNearest_DistanceMeasure.valueOf, enumValues: StructuredQuery_FindNearest_DistanceMeasure.values) + ..aOM<$14.Int32Value>(4, _omitFieldNames ? '' : 'limit', subBuilder: $14.Int32Value.create) + ..aOS(5, _omitFieldNames ? '' : 'distanceResultField') + ..aOM<$14.DoubleValue>(6, _omitFieldNames ? '' : 'distanceThreshold', subBuilder: $14.DoubleValue.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + StructuredQuery_FindNearest clone() => StructuredQuery_FindNearest()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + StructuredQuery_FindNearest copyWith(void Function(StructuredQuery_FindNearest) updates) => super.copyWith((message) => updates(message as StructuredQuery_FindNearest)) as StructuredQuery_FindNearest; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static StructuredQuery_FindNearest create() => StructuredQuery_FindNearest._(); + StructuredQuery_FindNearest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static StructuredQuery_FindNearest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static StructuredQuery_FindNearest? _defaultInstance; + + /// Required. An indexed vector field to search upon. Only documents which + /// contain vectors whose dimensionality match the query_vector can be + /// returned. + @$pb.TagNumber(1) + StructuredQuery_FieldReference get vectorField => $_getN(0); + @$pb.TagNumber(1) + set vectorField(StructuredQuery_FieldReference v) { $_setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasVectorField() => $_has(0); + @$pb.TagNumber(1) + void clearVectorField() => $_clearField(1); + @$pb.TagNumber(1) + StructuredQuery_FieldReference ensureVectorField() => $_ensure(0); + + /// Required. The query vector that we are searching on. Must be a vector of + /// no more than 2048 dimensions. + @$pb.TagNumber(2) + $1.Value get queryVector => $_getN(1); + @$pb.TagNumber(2) + set queryVector($1.Value v) { $_setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasQueryVector() => $_has(1); + @$pb.TagNumber(2) + void clearQueryVector() => $_clearField(2); + @$pb.TagNumber(2) + $1.Value ensureQueryVector() => $_ensure(1); + + /// Required. The distance measure to use, required. + @$pb.TagNumber(3) + StructuredQuery_FindNearest_DistanceMeasure get distanceMeasure => $_getN(2); + @$pb.TagNumber(3) + set distanceMeasure(StructuredQuery_FindNearest_DistanceMeasure v) { $_setField(3, v); } + @$pb.TagNumber(3) + $core.bool hasDistanceMeasure() => $_has(2); + @$pb.TagNumber(3) + void clearDistanceMeasure() => $_clearField(3); + + /// Required. The number of nearest neighbors to return. Must be a positive + /// integer of no more than 1000. + @$pb.TagNumber(4) + $14.Int32Value get limit => $_getN(3); + @$pb.TagNumber(4) + set limit($14.Int32Value v) { $_setField(4, v); } + @$pb.TagNumber(4) + $core.bool hasLimit() => $_has(3); + @$pb.TagNumber(4) + void clearLimit() => $_clearField(4); + @$pb.TagNumber(4) + $14.Int32Value ensureLimit() => $_ensure(3); + + /// Optional. Optional name of the field to output the result of the vector + /// distance calculation. Must conform to [document field + /// name][google.firestore.v1.Document.fields] limitations. + @$pb.TagNumber(5) + $core.String get distanceResultField => $_getSZ(4); + @$pb.TagNumber(5) + set distanceResultField($core.String v) { $_setString(4, v); } + @$pb.TagNumber(5) + $core.bool hasDistanceResultField() => $_has(4); + @$pb.TagNumber(5) + void clearDistanceResultField() => $_clearField(5); + + /// Optional. Option to specify a threshold for which no less similar + /// documents will be returned. The behavior of the specified + /// `distance_measure` will affect the meaning of the distance threshold. + /// Since DOT_PRODUCT distances increase when the vectors are more similar, + /// the comparison is inverted. + /// + /// * For EUCLIDEAN, COSINE: WHERE distance <= distance_threshold + /// * For DOT_PRODUCT: WHERE distance >= distance_threshold + @$pb.TagNumber(6) + $14.DoubleValue get distanceThreshold => $_getN(5); + @$pb.TagNumber(6) + set distanceThreshold($14.DoubleValue v) { $_setField(6, v); } + @$pb.TagNumber(6) + $core.bool hasDistanceThreshold() => $_has(5); + @$pb.TagNumber(6) + void clearDistanceThreshold() => $_clearField(6); + @$pb.TagNumber(6) + $14.DoubleValue ensureDistanceThreshold() => $_ensure(5); +} + +/// A Firestore query. +/// +/// The query stages are executed in the following order: +/// 1. from +/// 2. where +/// 3. select +/// 4. order_by + start_at + end_at +/// 5. offset +/// 6. limit +/// 7. find_nearest +class StructuredQuery extends $pb.GeneratedMessage { + factory StructuredQuery({ + StructuredQuery_Projection? select, + $core.Iterable? from, + StructuredQuery_Filter? where, + $core.Iterable? orderBy, + $14.Int32Value? limit, + $core.int? offset, + Cursor? startAt, + Cursor? endAt, + StructuredQuery_FindNearest? findNearest, + }) { + final $result = create(); + if (select != null) { + $result.select = select; + } + if (from != null) { + $result.from.addAll(from); + } + if (where != null) { + $result.where = where; + } + if (orderBy != null) { + $result.orderBy.addAll(orderBy); + } + if (limit != null) { + $result.limit = limit; + } + if (offset != null) { + $result.offset = offset; + } + if (startAt != null) { + $result.startAt = startAt; + } + if (endAt != null) { + $result.endAt = endAt; + } + if (findNearest != null) { + $result.findNearest = findNearest; + } + return $result; + } + StructuredQuery._() : super(); + factory StructuredQuery.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory StructuredQuery.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'StructuredQuery', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.firestore.v1'), createEmptyInstance: create) + ..aOM(1, _omitFieldNames ? '' : 'select', subBuilder: StructuredQuery_Projection.create) + ..pc(2, _omitFieldNames ? '' : 'from', $pb.PbFieldType.PM, subBuilder: StructuredQuery_CollectionSelector.create) + ..aOM(3, _omitFieldNames ? '' : 'where', subBuilder: StructuredQuery_Filter.create) + ..pc(4, _omitFieldNames ? '' : 'orderBy', $pb.PbFieldType.PM, subBuilder: StructuredQuery_Order.create) + ..aOM<$14.Int32Value>(5, _omitFieldNames ? '' : 'limit', subBuilder: $14.Int32Value.create) + ..a<$core.int>(6, _omitFieldNames ? '' : 'offset', $pb.PbFieldType.O3) + ..aOM(7, _omitFieldNames ? '' : 'startAt', subBuilder: Cursor.create) + ..aOM(8, _omitFieldNames ? '' : 'endAt', subBuilder: Cursor.create) + ..aOM(9, _omitFieldNames ? '' : 'findNearest', subBuilder: StructuredQuery_FindNearest.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + StructuredQuery clone() => StructuredQuery()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + StructuredQuery copyWith(void Function(StructuredQuery) updates) => super.copyWith((message) => updates(message as StructuredQuery)) as StructuredQuery; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static StructuredQuery create() => StructuredQuery._(); + StructuredQuery createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static StructuredQuery getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static StructuredQuery? _defaultInstance; + + /// Optional sub-set of the fields to return. + /// + /// This acts as a [DocumentMask][google.firestore.v1.DocumentMask] over the + /// documents returned from a query. When not set, assumes that the caller + /// wants all fields returned. + @$pb.TagNumber(1) + StructuredQuery_Projection get select => $_getN(0); + @$pb.TagNumber(1) + set select(StructuredQuery_Projection v) { $_setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasSelect() => $_has(0); + @$pb.TagNumber(1) + void clearSelect() => $_clearField(1); + @$pb.TagNumber(1) + StructuredQuery_Projection ensureSelect() => $_ensure(0); + + /// The collections to query. + @$pb.TagNumber(2) + $pb.PbList get from => $_getList(1); + + /// The filter to apply. + @$pb.TagNumber(3) + StructuredQuery_Filter get where => $_getN(2); + @$pb.TagNumber(3) + set where(StructuredQuery_Filter v) { $_setField(3, v); } + @$pb.TagNumber(3) + $core.bool hasWhere() => $_has(2); + @$pb.TagNumber(3) + void clearWhere() => $_clearField(3); + @$pb.TagNumber(3) + StructuredQuery_Filter ensureWhere() => $_ensure(2); + + /// The order to apply to the query results. + /// + /// Firestore allows callers to provide a full ordering, a partial ordering, or + /// no ordering at all. In all cases, Firestore guarantees a stable ordering + /// through the following rules: + /// + /// * The `order_by` is required to reference all fields used with an + /// inequality filter. + /// * All fields that are required to be in the `order_by` but are not already + /// present are appended in lexicographical ordering of the field name. + /// * If an order on `__name__` is not specified, it is appended by default. + /// + /// Fields are appended with the same sort direction as the last order + /// specified, or 'ASCENDING' if no order was specified. For example: + /// + /// * `ORDER BY a` becomes `ORDER BY a ASC, __name__ ASC` + /// * `ORDER BY a DESC` becomes `ORDER BY a DESC, __name__ DESC` + /// * `WHERE a > 1` becomes `WHERE a > 1 ORDER BY a ASC, __name__ ASC` + /// * `WHERE __name__ > ... AND a > 1` becomes + /// `WHERE __name__ > ... AND a > 1 ORDER BY a ASC, __name__ ASC` + @$pb.TagNumber(4) + $pb.PbList get orderBy => $_getList(3); + + /// The maximum number of results to return. + /// + /// Applies after all other constraints. + /// + /// Requires: + /// + /// * The value must be greater than or equal to zero if specified. + @$pb.TagNumber(5) + $14.Int32Value get limit => $_getN(4); + @$pb.TagNumber(5) + set limit($14.Int32Value v) { $_setField(5, v); } + @$pb.TagNumber(5) + $core.bool hasLimit() => $_has(4); + @$pb.TagNumber(5) + void clearLimit() => $_clearField(5); + @$pb.TagNumber(5) + $14.Int32Value ensureLimit() => $_ensure(4); + + /// The number of documents to skip before returning the first result. + /// + /// This applies after the constraints specified by the `WHERE`, `START AT`, & + /// `END AT` but before the `LIMIT` clause. + /// + /// Requires: + /// + /// * The value must be greater than or equal to zero if specified. + @$pb.TagNumber(6) + $core.int get offset => $_getIZ(5); + @$pb.TagNumber(6) + set offset($core.int v) { $_setSignedInt32(5, v); } + @$pb.TagNumber(6) + $core.bool hasOffset() => $_has(5); + @$pb.TagNumber(6) + void clearOffset() => $_clearField(6); + + /// A potential prefix of a position in the result set to start the query at. + /// + /// The ordering of the result set is based on the `ORDER BY` clause of the + /// original query. + /// + /// ``` + /// SELECT * FROM k WHERE a = 1 AND b > 2 ORDER BY b ASC, __name__ ASC; + /// ``` + /// + /// This query's results are ordered by `(b ASC, __name__ ASC)`. + /// + /// Cursors can reference either the full ordering or a prefix of the location, + /// though it cannot reference more fields than what are in the provided + /// `ORDER BY`. + /// + /// Continuing off the example above, attaching the following start cursors + /// will have varying impact: + /// + /// - `START BEFORE (2, /k/123)`: start the query right before `a = 1 AND + /// b > 2 AND __name__ > /k/123`. + /// - `START AFTER (10)`: start the query right after `a = 1 AND b > 10`. + /// + /// Unlike `OFFSET` which requires scanning over the first N results to skip, + /// a start cursor allows the query to begin at a logical position. This + /// position is not required to match an actual result, it will scan forward + /// from this position to find the next document. + /// + /// Requires: + /// + /// * The number of values cannot be greater than the number of fields + /// specified in the `ORDER BY` clause. + @$pb.TagNumber(7) + Cursor get startAt => $_getN(6); + @$pb.TagNumber(7) + set startAt(Cursor v) { $_setField(7, v); } + @$pb.TagNumber(7) + $core.bool hasStartAt() => $_has(6); + @$pb.TagNumber(7) + void clearStartAt() => $_clearField(7); + @$pb.TagNumber(7) + Cursor ensureStartAt() => $_ensure(6); + + /// A potential prefix of a position in the result set to end the query at. + /// + /// This is similar to `START_AT` but with it controlling the end position + /// rather than the start position. + /// + /// Requires: + /// + /// * The number of values cannot be greater than the number of fields + /// specified in the `ORDER BY` clause. + @$pb.TagNumber(8) + Cursor get endAt => $_getN(7); + @$pb.TagNumber(8) + set endAt(Cursor v) { $_setField(8, v); } + @$pb.TagNumber(8) + $core.bool hasEndAt() => $_has(7); + @$pb.TagNumber(8) + void clearEndAt() => $_clearField(8); + @$pb.TagNumber(8) + Cursor ensureEndAt() => $_ensure(7); + + /// Optional. A potential nearest neighbors search. + /// + /// Applies after all other filters and ordering. + /// + /// Finds the closest vector embeddings to the given query vector. + @$pb.TagNumber(9) + StructuredQuery_FindNearest get findNearest => $_getN(8); + @$pb.TagNumber(9) + set findNearest(StructuredQuery_FindNearest v) { $_setField(9, v); } + @$pb.TagNumber(9) + $core.bool hasFindNearest() => $_has(8); + @$pb.TagNumber(9) + void clearFindNearest() => $_clearField(9); + @$pb.TagNumber(9) + StructuredQuery_FindNearest ensureFindNearest() => $_ensure(8); +} + +/// Count of documents that match the query. +/// +/// The `COUNT(*)` aggregation function operates on the entire document +/// so it does not require a field reference. +class StructuredAggregationQuery_Aggregation_Count extends $pb.GeneratedMessage { + factory StructuredAggregationQuery_Aggregation_Count({ + $14.Int64Value? upTo, + }) { + final $result = create(); + if (upTo != null) { + $result.upTo = upTo; + } + return $result; + } + StructuredAggregationQuery_Aggregation_Count._() : super(); + factory StructuredAggregationQuery_Aggregation_Count.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory StructuredAggregationQuery_Aggregation_Count.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'StructuredAggregationQuery.Aggregation.Count', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.firestore.v1'), createEmptyInstance: create) + ..aOM<$14.Int64Value>(1, _omitFieldNames ? '' : 'upTo', subBuilder: $14.Int64Value.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + StructuredAggregationQuery_Aggregation_Count clone() => StructuredAggregationQuery_Aggregation_Count()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + StructuredAggregationQuery_Aggregation_Count copyWith(void Function(StructuredAggregationQuery_Aggregation_Count) updates) => super.copyWith((message) => updates(message as StructuredAggregationQuery_Aggregation_Count)) as StructuredAggregationQuery_Aggregation_Count; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static StructuredAggregationQuery_Aggregation_Count create() => StructuredAggregationQuery_Aggregation_Count._(); + StructuredAggregationQuery_Aggregation_Count createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static StructuredAggregationQuery_Aggregation_Count getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static StructuredAggregationQuery_Aggregation_Count? _defaultInstance; + + /// Optional. Optional constraint on the maximum number of documents to + /// count. + /// + /// This provides a way to set an upper bound on the number of documents + /// to scan, limiting latency, and cost. + /// + /// Unspecified is interpreted as no bound. + /// + /// High-Level Example: + /// + /// ``` + /// AGGREGATE COUNT_UP_TO(1000) OVER ( SELECT * FROM k ); + /// ``` + /// + /// Requires: + /// + /// * Must be greater than zero when present. + @$pb.TagNumber(1) + $14.Int64Value get upTo => $_getN(0); + @$pb.TagNumber(1) + set upTo($14.Int64Value v) { $_setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasUpTo() => $_has(0); + @$pb.TagNumber(1) + void clearUpTo() => $_clearField(1); + @$pb.TagNumber(1) + $14.Int64Value ensureUpTo() => $_ensure(0); +} + +/// Sum of the values of the requested field. +/// +/// * Only numeric values will be aggregated. All non-numeric values +/// including `NULL` are skipped. +/// +/// * If the aggregated values contain `NaN`, returns `NaN`. Infinity math +/// follows IEEE-754 standards. +/// +/// * If the aggregated value set is empty, returns 0. +/// +/// * Returns a 64-bit integer if all aggregated numbers are integers and the +/// sum result does not overflow. Otherwise, the result is returned as a +/// double. Note that even if all the aggregated values are integers, the +/// result is returned as a double if it cannot fit within a 64-bit signed +/// integer. When this occurs, the returned value will lose precision. +/// +/// * When underflow occurs, floating-point aggregation is non-deterministic. +/// This means that running the same query repeatedly without any changes to +/// the underlying values could produce slightly different results each +/// time. In those cases, values should be stored as integers over +/// floating-point numbers. +class StructuredAggregationQuery_Aggregation_Sum extends $pb.GeneratedMessage { + factory StructuredAggregationQuery_Aggregation_Sum({ + StructuredQuery_FieldReference? field_1, + }) { + final $result = create(); + if (field_1 != null) { + $result.field_1 = field_1; + } + return $result; + } + StructuredAggregationQuery_Aggregation_Sum._() : super(); + factory StructuredAggregationQuery_Aggregation_Sum.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory StructuredAggregationQuery_Aggregation_Sum.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'StructuredAggregationQuery.Aggregation.Sum', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.firestore.v1'), createEmptyInstance: create) + ..aOM(1, _omitFieldNames ? '' : 'field', subBuilder: StructuredQuery_FieldReference.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + StructuredAggregationQuery_Aggregation_Sum clone() => StructuredAggregationQuery_Aggregation_Sum()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + StructuredAggregationQuery_Aggregation_Sum copyWith(void Function(StructuredAggregationQuery_Aggregation_Sum) updates) => super.copyWith((message) => updates(message as StructuredAggregationQuery_Aggregation_Sum)) as StructuredAggregationQuery_Aggregation_Sum; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static StructuredAggregationQuery_Aggregation_Sum create() => StructuredAggregationQuery_Aggregation_Sum._(); + StructuredAggregationQuery_Aggregation_Sum createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static StructuredAggregationQuery_Aggregation_Sum getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static StructuredAggregationQuery_Aggregation_Sum? _defaultInstance; + + /// The field to aggregate on. + @$pb.TagNumber(1) + StructuredQuery_FieldReference get field_1 => $_getN(0); + @$pb.TagNumber(1) + set field_1(StructuredQuery_FieldReference v) { $_setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasField_1() => $_has(0); + @$pb.TagNumber(1) + void clearField_1() => $_clearField(1); + @$pb.TagNumber(1) + StructuredQuery_FieldReference ensureField_1() => $_ensure(0); +} + +/// Average of the values of the requested field. +/// +/// * Only numeric values will be aggregated. All non-numeric values +/// including `NULL` are skipped. +/// +/// * If the aggregated values contain `NaN`, returns `NaN`. Infinity math +/// follows IEEE-754 standards. +/// +/// * If the aggregated value set is empty, returns `NULL`. +/// +/// * Always returns the result as a double. +class StructuredAggregationQuery_Aggregation_Avg extends $pb.GeneratedMessage { + factory StructuredAggregationQuery_Aggregation_Avg({ + StructuredQuery_FieldReference? field_1, + }) { + final $result = create(); + if (field_1 != null) { + $result.field_1 = field_1; + } + return $result; + } + StructuredAggregationQuery_Aggregation_Avg._() : super(); + factory StructuredAggregationQuery_Aggregation_Avg.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory StructuredAggregationQuery_Aggregation_Avg.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'StructuredAggregationQuery.Aggregation.Avg', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.firestore.v1'), createEmptyInstance: create) + ..aOM(1, _omitFieldNames ? '' : 'field', subBuilder: StructuredQuery_FieldReference.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + StructuredAggregationQuery_Aggregation_Avg clone() => StructuredAggregationQuery_Aggregation_Avg()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + StructuredAggregationQuery_Aggregation_Avg copyWith(void Function(StructuredAggregationQuery_Aggregation_Avg) updates) => super.copyWith((message) => updates(message as StructuredAggregationQuery_Aggregation_Avg)) as StructuredAggregationQuery_Aggregation_Avg; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static StructuredAggregationQuery_Aggregation_Avg create() => StructuredAggregationQuery_Aggregation_Avg._(); + StructuredAggregationQuery_Aggregation_Avg createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static StructuredAggregationQuery_Aggregation_Avg getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static StructuredAggregationQuery_Aggregation_Avg? _defaultInstance; + + /// The field to aggregate on. + @$pb.TagNumber(1) + StructuredQuery_FieldReference get field_1 => $_getN(0); + @$pb.TagNumber(1) + set field_1(StructuredQuery_FieldReference v) { $_setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasField_1() => $_has(0); + @$pb.TagNumber(1) + void clearField_1() => $_clearField(1); + @$pb.TagNumber(1) + StructuredQuery_FieldReference ensureField_1() => $_ensure(0); +} + +enum StructuredAggregationQuery_Aggregation_Operator { + count, + sum, + avg, + notSet +} + +/// Defines an aggregation that produces a single result. +class StructuredAggregationQuery_Aggregation extends $pb.GeneratedMessage { + factory StructuredAggregationQuery_Aggregation({ + StructuredAggregationQuery_Aggregation_Count? count, + StructuredAggregationQuery_Aggregation_Sum? sum, + StructuredAggregationQuery_Aggregation_Avg? avg, + $core.String? alias, + }) { + final $result = create(); + if (count != null) { + $result.count = count; + } + if (sum != null) { + $result.sum = sum; + } + if (avg != null) { + $result.avg = avg; + } + if (alias != null) { + $result.alias = alias; + } + return $result; + } + StructuredAggregationQuery_Aggregation._() : super(); + factory StructuredAggregationQuery_Aggregation.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory StructuredAggregationQuery_Aggregation.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static const $core.Map<$core.int, StructuredAggregationQuery_Aggregation_Operator> _StructuredAggregationQuery_Aggregation_OperatorByTag = { + 1 : StructuredAggregationQuery_Aggregation_Operator.count, + 2 : StructuredAggregationQuery_Aggregation_Operator.sum, + 3 : StructuredAggregationQuery_Aggregation_Operator.avg, + 0 : StructuredAggregationQuery_Aggregation_Operator.notSet + }; + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'StructuredAggregationQuery.Aggregation', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.firestore.v1'), createEmptyInstance: create) + ..oo(0, [1, 2, 3]) + ..aOM(1, _omitFieldNames ? '' : 'count', subBuilder: StructuredAggregationQuery_Aggregation_Count.create) + ..aOM(2, _omitFieldNames ? '' : 'sum', subBuilder: StructuredAggregationQuery_Aggregation_Sum.create) + ..aOM(3, _omitFieldNames ? '' : 'avg', subBuilder: StructuredAggregationQuery_Aggregation_Avg.create) + ..aOS(7, _omitFieldNames ? '' : 'alias') + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + StructuredAggregationQuery_Aggregation clone() => StructuredAggregationQuery_Aggregation()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + StructuredAggregationQuery_Aggregation copyWith(void Function(StructuredAggregationQuery_Aggregation) updates) => super.copyWith((message) => updates(message as StructuredAggregationQuery_Aggregation)) as StructuredAggregationQuery_Aggregation; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static StructuredAggregationQuery_Aggregation create() => StructuredAggregationQuery_Aggregation._(); + StructuredAggregationQuery_Aggregation createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static StructuredAggregationQuery_Aggregation getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static StructuredAggregationQuery_Aggregation? _defaultInstance; + + StructuredAggregationQuery_Aggregation_Operator whichOperator() => _StructuredAggregationQuery_Aggregation_OperatorByTag[$_whichOneof(0)]!; + void clearOperator() => $_clearField($_whichOneof(0)); + + /// Count aggregator. + @$pb.TagNumber(1) + StructuredAggregationQuery_Aggregation_Count get count => $_getN(0); + @$pb.TagNumber(1) + set count(StructuredAggregationQuery_Aggregation_Count v) { $_setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasCount() => $_has(0); + @$pb.TagNumber(1) + void clearCount() => $_clearField(1); + @$pb.TagNumber(1) + StructuredAggregationQuery_Aggregation_Count ensureCount() => $_ensure(0); + + /// Sum aggregator. + @$pb.TagNumber(2) + StructuredAggregationQuery_Aggregation_Sum get sum => $_getN(1); + @$pb.TagNumber(2) + set sum(StructuredAggregationQuery_Aggregation_Sum v) { $_setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasSum() => $_has(1); + @$pb.TagNumber(2) + void clearSum() => $_clearField(2); + @$pb.TagNumber(2) + StructuredAggregationQuery_Aggregation_Sum ensureSum() => $_ensure(1); + + /// Average aggregator. + @$pb.TagNumber(3) + StructuredAggregationQuery_Aggregation_Avg get avg => $_getN(2); + @$pb.TagNumber(3) + set avg(StructuredAggregationQuery_Aggregation_Avg v) { $_setField(3, v); } + @$pb.TagNumber(3) + $core.bool hasAvg() => $_has(2); + @$pb.TagNumber(3) + void clearAvg() => $_clearField(3); + @$pb.TagNumber(3) + StructuredAggregationQuery_Aggregation_Avg ensureAvg() => $_ensure(2); + + /// Optional. Optional name of the field to store the result of the + /// aggregation into. + /// + /// If not provided, Firestore will pick a default name following the format + /// `field_`. For example: + /// + /// ``` + /// AGGREGATE + /// COUNT_UP_TO(1) AS count_up_to_1, + /// COUNT_UP_TO(2), + /// COUNT_UP_TO(3) AS count_up_to_3, + /// COUNT(*) + /// OVER ( + /// ... + /// ); + /// ``` + /// + /// becomes: + /// + /// ``` + /// AGGREGATE + /// COUNT_UP_TO(1) AS count_up_to_1, + /// COUNT_UP_TO(2) AS field_1, + /// COUNT_UP_TO(3) AS count_up_to_3, + /// COUNT(*) AS field_2 + /// OVER ( + /// ... + /// ); + /// ``` + /// + /// Requires: + /// + /// * Must be unique across all aggregation aliases. + /// * Conform to [document field name][google.firestore.v1.Document.fields] + /// limitations. + @$pb.TagNumber(7) + $core.String get alias => $_getSZ(3); + @$pb.TagNumber(7) + set alias($core.String v) { $_setString(3, v); } + @$pb.TagNumber(7) + $core.bool hasAlias() => $_has(3); + @$pb.TagNumber(7) + void clearAlias() => $_clearField(7); +} + +enum StructuredAggregationQuery_QueryType { + structuredQuery, + notSet +} + +/// Firestore query for running an aggregation over a +/// [StructuredQuery][google.firestore.v1.StructuredQuery]. +class StructuredAggregationQuery extends $pb.GeneratedMessage { + factory StructuredAggregationQuery({ + StructuredQuery? structuredQuery, + $core.Iterable? aggregations, + }) { + final $result = create(); + if (structuredQuery != null) { + $result.structuredQuery = structuredQuery; + } + if (aggregations != null) { + $result.aggregations.addAll(aggregations); + } + return $result; + } + StructuredAggregationQuery._() : super(); + factory StructuredAggregationQuery.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory StructuredAggregationQuery.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static const $core.Map<$core.int, StructuredAggregationQuery_QueryType> _StructuredAggregationQuery_QueryTypeByTag = { + 1 : StructuredAggregationQuery_QueryType.structuredQuery, + 0 : StructuredAggregationQuery_QueryType.notSet + }; + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'StructuredAggregationQuery', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.firestore.v1'), createEmptyInstance: create) + ..oo(0, [1]) + ..aOM(1, _omitFieldNames ? '' : 'structuredQuery', subBuilder: StructuredQuery.create) + ..pc(3, _omitFieldNames ? '' : 'aggregations', $pb.PbFieldType.PM, subBuilder: StructuredAggregationQuery_Aggregation.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + StructuredAggregationQuery clone() => StructuredAggregationQuery()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + StructuredAggregationQuery copyWith(void Function(StructuredAggregationQuery) updates) => super.copyWith((message) => updates(message as StructuredAggregationQuery)) as StructuredAggregationQuery; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static StructuredAggregationQuery create() => StructuredAggregationQuery._(); + StructuredAggregationQuery createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static StructuredAggregationQuery getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static StructuredAggregationQuery? _defaultInstance; + + StructuredAggregationQuery_QueryType whichQueryType() => _StructuredAggregationQuery_QueryTypeByTag[$_whichOneof(0)]!; + void clearQueryType() => $_clearField($_whichOneof(0)); + + /// Nested structured query. + @$pb.TagNumber(1) + StructuredQuery get structuredQuery => $_getN(0); + @$pb.TagNumber(1) + set structuredQuery(StructuredQuery v) { $_setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasStructuredQuery() => $_has(0); + @$pb.TagNumber(1) + void clearStructuredQuery() => $_clearField(1); + @$pb.TagNumber(1) + StructuredQuery ensureStructuredQuery() => $_ensure(0); + + /// Optional. Series of aggregations to apply over the results of the + /// `structured_query`. + /// + /// Requires: + /// + /// * A minimum of one and maximum of five aggregations per query. + @$pb.TagNumber(3) + $pb.PbList get aggregations => $_getList(1); +} + +/// A position in a query result set. +class Cursor extends $pb.GeneratedMessage { + factory Cursor({ + $core.Iterable<$1.Value>? values, + $core.bool? before, + }) { + final $result = create(); + if (values != null) { + $result.values.addAll(values); + } + if (before != null) { + $result.before = before; + } + return $result; + } + Cursor._() : super(); + factory Cursor.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory Cursor.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Cursor', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.firestore.v1'), createEmptyInstance: create) + ..pc<$1.Value>(1, _omitFieldNames ? '' : 'values', $pb.PbFieldType.PM, subBuilder: $1.Value.create) + ..aOB(2, _omitFieldNames ? '' : 'before') + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Cursor clone() => Cursor()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Cursor copyWith(void Function(Cursor) updates) => super.copyWith((message) => updates(message as Cursor)) as Cursor; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static Cursor create() => Cursor._(); + Cursor createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static Cursor getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static Cursor? _defaultInstance; + + /// The values that represent a position, in the order they appear in + /// the order by clause of a query. + /// + /// Can contain fewer values than specified in the order by clause. + @$pb.TagNumber(1) + $pb.PbList<$1.Value> get values => $_getList(0); + + /// If the position is just before or just after the given values, relative + /// to the sort order defined by the query. + @$pb.TagNumber(2) + $core.bool get before => $_getBF(1); + @$pb.TagNumber(2) + set before($core.bool v) { $_setBool(1, v); } + @$pb.TagNumber(2) + $core.bool hasBefore() => $_has(1); + @$pb.TagNumber(2) + void clearBefore() => $_clearField(2); +} + + +const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); +const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/pkgs/googleapis_firestore_v1/lib/google/firestore/v1/query.pbenum.dart b/pkgs/googleapis_firestore_v1/lib/google/firestore/v1/query.pbenum.dart new file mode 100644 index 00000000..81c6d835 --- /dev/null +++ b/pkgs/googleapis_firestore_v1/lib/google/firestore/v1/query.pbenum.dart @@ -0,0 +1,219 @@ +// +// Generated code. Do not modify. +// source: google/firestore/v1/query.proto +// +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:core' as $core; + +import 'package:protobuf/protobuf.dart' as $pb; + +/// A sort direction. +class StructuredQuery_Direction extends $pb.ProtobufEnum { + /// Unspecified. + static const StructuredQuery_Direction DIRECTION_UNSPECIFIED = StructuredQuery_Direction._(0, _omitEnumNames ? '' : 'DIRECTION_UNSPECIFIED'); + /// Ascending. + static const StructuredQuery_Direction ASCENDING = StructuredQuery_Direction._(1, _omitEnumNames ? '' : 'ASCENDING'); + /// Descending. + static const StructuredQuery_Direction DESCENDING = StructuredQuery_Direction._(2, _omitEnumNames ? '' : 'DESCENDING'); + + static const $core.List values = [ + DIRECTION_UNSPECIFIED, + ASCENDING, + DESCENDING, + ]; + + static final $core.List _byValue = $pb.ProtobufEnum.$_initByValueList(values, 2); + static StructuredQuery_Direction? valueOf($core.int value) => value < 0 || value >= _byValue.length ? null : _byValue[value]; + + const StructuredQuery_Direction._(super.v, super.n); +} + +/// A composite filter operator. +class StructuredQuery_CompositeFilter_Operator extends $pb.ProtobufEnum { + /// Unspecified. This value must not be used. + static const StructuredQuery_CompositeFilter_Operator OPERATOR_UNSPECIFIED = StructuredQuery_CompositeFilter_Operator._(0, _omitEnumNames ? '' : 'OPERATOR_UNSPECIFIED'); + /// Documents are required to satisfy all of the combined filters. + static const StructuredQuery_CompositeFilter_Operator AND = StructuredQuery_CompositeFilter_Operator._(1, _omitEnumNames ? '' : 'AND'); + /// Documents are required to satisfy at least one of the combined filters. + static const StructuredQuery_CompositeFilter_Operator OR = StructuredQuery_CompositeFilter_Operator._(2, _omitEnumNames ? '' : 'OR'); + + static const $core.List values = [ + OPERATOR_UNSPECIFIED, + AND, + OR, + ]; + + static final $core.List _byValue = $pb.ProtobufEnum.$_initByValueList(values, 2); + static StructuredQuery_CompositeFilter_Operator? valueOf($core.int value) => value < 0 || value >= _byValue.length ? null : _byValue[value]; + + const StructuredQuery_CompositeFilter_Operator._(super.v, super.n); +} + +/// A field filter operator. +class StructuredQuery_FieldFilter_Operator extends $pb.ProtobufEnum { + /// Unspecified. This value must not be used. + static const StructuredQuery_FieldFilter_Operator OPERATOR_UNSPECIFIED = StructuredQuery_FieldFilter_Operator._(0, _omitEnumNames ? '' : 'OPERATOR_UNSPECIFIED'); + /// The given `field` is less than the given `value`. + /// + /// Requires: + /// + /// * That `field` come first in `order_by`. + static const StructuredQuery_FieldFilter_Operator LESS_THAN = StructuredQuery_FieldFilter_Operator._(1, _omitEnumNames ? '' : 'LESS_THAN'); + /// The given `field` is less than or equal to the given `value`. + /// + /// Requires: + /// + /// * That `field` come first in `order_by`. + static const StructuredQuery_FieldFilter_Operator LESS_THAN_OR_EQUAL = StructuredQuery_FieldFilter_Operator._(2, _omitEnumNames ? '' : 'LESS_THAN_OR_EQUAL'); + /// The given `field` is greater than the given `value`. + /// + /// Requires: + /// + /// * That `field` come first in `order_by`. + static const StructuredQuery_FieldFilter_Operator GREATER_THAN = StructuredQuery_FieldFilter_Operator._(3, _omitEnumNames ? '' : 'GREATER_THAN'); + /// The given `field` is greater than or equal to the given `value`. + /// + /// Requires: + /// + /// * That `field` come first in `order_by`. + static const StructuredQuery_FieldFilter_Operator GREATER_THAN_OR_EQUAL = StructuredQuery_FieldFilter_Operator._(4, _omitEnumNames ? '' : 'GREATER_THAN_OR_EQUAL'); + /// The given `field` is equal to the given `value`. + static const StructuredQuery_FieldFilter_Operator EQUAL = StructuredQuery_FieldFilter_Operator._(5, _omitEnumNames ? '' : 'EQUAL'); + /// The given `field` is not equal to the given `value`. + /// + /// Requires: + /// + /// * No other `NOT_EQUAL`, `NOT_IN`, `IS_NOT_NULL`, or `IS_NOT_NAN`. + /// * That `field` comes first in the `order_by`. + static const StructuredQuery_FieldFilter_Operator NOT_EQUAL = StructuredQuery_FieldFilter_Operator._(6, _omitEnumNames ? '' : 'NOT_EQUAL'); + /// The given `field` is an array that contains the given `value`. + static const StructuredQuery_FieldFilter_Operator ARRAY_CONTAINS = StructuredQuery_FieldFilter_Operator._(7, _omitEnumNames ? '' : 'ARRAY_CONTAINS'); + /// The given `field` is equal to at least one value in the given array. + /// + /// Requires: + /// + /// * That `value` is a non-empty `ArrayValue`, subject to disjunction + /// limits. + /// * No `NOT_IN` filters in the same query. + static const StructuredQuery_FieldFilter_Operator IN = StructuredQuery_FieldFilter_Operator._(8, _omitEnumNames ? '' : 'IN'); + /// The given `field` is an array that contains any of the values in the + /// given array. + /// + /// Requires: + /// + /// * That `value` is a non-empty `ArrayValue`, subject to disjunction + /// limits. + /// * No other `ARRAY_CONTAINS_ANY` filters within the same disjunction. + /// * No `NOT_IN` filters in the same query. + static const StructuredQuery_FieldFilter_Operator ARRAY_CONTAINS_ANY = StructuredQuery_FieldFilter_Operator._(9, _omitEnumNames ? '' : 'ARRAY_CONTAINS_ANY'); + /// The value of the `field` is not in the given array. + /// + /// Requires: + /// + /// * That `value` is a non-empty `ArrayValue` with at most 10 values. + /// * No other `OR`, `IN`, `ARRAY_CONTAINS_ANY`, `NOT_IN`, `NOT_EQUAL`, + /// `IS_NOT_NULL`, or `IS_NOT_NAN`. + /// * That `field` comes first in the `order_by`. + static const StructuredQuery_FieldFilter_Operator NOT_IN = StructuredQuery_FieldFilter_Operator._(10, _omitEnumNames ? '' : 'NOT_IN'); + + static const $core.List values = [ + OPERATOR_UNSPECIFIED, + LESS_THAN, + LESS_THAN_OR_EQUAL, + GREATER_THAN, + GREATER_THAN_OR_EQUAL, + EQUAL, + NOT_EQUAL, + ARRAY_CONTAINS, + IN, + ARRAY_CONTAINS_ANY, + NOT_IN, + ]; + + static final $core.List _byValue = $pb.ProtobufEnum.$_initByValueList(values, 10); + static StructuredQuery_FieldFilter_Operator? valueOf($core.int value) => value < 0 || value >= _byValue.length ? null : _byValue[value]; + + const StructuredQuery_FieldFilter_Operator._(super.v, super.n); +} + +/// A unary operator. +class StructuredQuery_UnaryFilter_Operator extends $pb.ProtobufEnum { + /// Unspecified. This value must not be used. + static const StructuredQuery_UnaryFilter_Operator OPERATOR_UNSPECIFIED = StructuredQuery_UnaryFilter_Operator._(0, _omitEnumNames ? '' : 'OPERATOR_UNSPECIFIED'); + /// The given `field` is equal to `NaN`. + static const StructuredQuery_UnaryFilter_Operator IS_NAN = StructuredQuery_UnaryFilter_Operator._(2, _omitEnumNames ? '' : 'IS_NAN'); + /// The given `field` is equal to `NULL`. + static const StructuredQuery_UnaryFilter_Operator IS_NULL = StructuredQuery_UnaryFilter_Operator._(3, _omitEnumNames ? '' : 'IS_NULL'); + /// The given `field` is not equal to `NaN`. + /// + /// Requires: + /// + /// * No other `NOT_EQUAL`, `NOT_IN`, `IS_NOT_NULL`, or `IS_NOT_NAN`. + /// * That `field` comes first in the `order_by`. + static const StructuredQuery_UnaryFilter_Operator IS_NOT_NAN = StructuredQuery_UnaryFilter_Operator._(4, _omitEnumNames ? '' : 'IS_NOT_NAN'); + /// The given `field` is not equal to `NULL`. + /// + /// Requires: + /// + /// * A single `NOT_EQUAL`, `NOT_IN`, `IS_NOT_NULL`, or `IS_NOT_NAN`. + /// * That `field` comes first in the `order_by`. + static const StructuredQuery_UnaryFilter_Operator IS_NOT_NULL = StructuredQuery_UnaryFilter_Operator._(5, _omitEnumNames ? '' : 'IS_NOT_NULL'); + + static const $core.List values = [ + OPERATOR_UNSPECIFIED, + IS_NAN, + IS_NULL, + IS_NOT_NAN, + IS_NOT_NULL, + ]; + + static final $core.List _byValue = $pb.ProtobufEnum.$_initByValueList(values, 5); + static StructuredQuery_UnaryFilter_Operator? valueOf($core.int value) => value < 0 || value >= _byValue.length ? null : _byValue[value]; + + const StructuredQuery_UnaryFilter_Operator._(super.v, super.n); +} + +/// The distance measure to use when comparing vectors. +class StructuredQuery_FindNearest_DistanceMeasure extends $pb.ProtobufEnum { + /// Should not be set. + static const StructuredQuery_FindNearest_DistanceMeasure DISTANCE_MEASURE_UNSPECIFIED = StructuredQuery_FindNearest_DistanceMeasure._(0, _omitEnumNames ? '' : 'DISTANCE_MEASURE_UNSPECIFIED'); + /// Measures the EUCLIDEAN distance between the vectors. See + /// [Euclidean](https://en.wikipedia.org/wiki/Euclidean_distance) to learn + /// more. The resulting distance decreases the more similar two vectors + /// are. + static const StructuredQuery_FindNearest_DistanceMeasure EUCLIDEAN = StructuredQuery_FindNearest_DistanceMeasure._(1, _omitEnumNames ? '' : 'EUCLIDEAN'); + /// COSINE distance compares vectors based on the angle between them, which + /// allows you to measure similarity that isn't based on the vectors + /// magnitude. We recommend using DOT_PRODUCT with unit normalized vectors + /// instead of COSINE distance, which is mathematically equivalent with + /// better performance. See [Cosine + /// Similarity](https://en.wikipedia.org/wiki/Cosine_similarity) to learn + /// more about COSINE similarity and COSINE distance. The resulting + /// COSINE distance decreases the more similar two vectors are. + static const StructuredQuery_FindNearest_DistanceMeasure COSINE = StructuredQuery_FindNearest_DistanceMeasure._(2, _omitEnumNames ? '' : 'COSINE'); + /// Similar to cosine but is affected by the magnitude of the vectors. See + /// [Dot Product](https://en.wikipedia.org/wiki/Dot_product) to learn more. + /// The resulting distance increases the more similar two vectors are. + static const StructuredQuery_FindNearest_DistanceMeasure DOT_PRODUCT = StructuredQuery_FindNearest_DistanceMeasure._(3, _omitEnumNames ? '' : 'DOT_PRODUCT'); + + static const $core.List values = [ + DISTANCE_MEASURE_UNSPECIFIED, + EUCLIDEAN, + COSINE, + DOT_PRODUCT, + ]; + + static final $core.List _byValue = $pb.ProtobufEnum.$_initByValueList(values, 3); + static StructuredQuery_FindNearest_DistanceMeasure? valueOf($core.int value) => value < 0 || value >= _byValue.length ? null : _byValue[value]; + + const StructuredQuery_FindNearest_DistanceMeasure._(super.v, super.n); +} + + +const _omitEnumNames = $core.bool.fromEnvironment('protobuf.omit_enum_names'); diff --git a/pkgs/googleapis_firestore_v1/lib/google/firestore/v1/query_profile.pb.dart b/pkgs/googleapis_firestore_v1/lib/google/firestore/v1/query_profile.pb.dart new file mode 100644 index 00000000..eb51d217 --- /dev/null +++ b/pkgs/googleapis_firestore_v1/lib/google/firestore/v1/query_profile.pb.dart @@ -0,0 +1,294 @@ +// +// Generated code. Do not modify. +// source: google/firestore/v1/query_profile.proto +// +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:core' as $core; + +import 'package:fixnum/fixnum.dart' as $fixnum; +import 'package:protobuf/protobuf.dart' as $pb; + +import '../../protobuf/duration.pb.dart' as $4; +import '../../protobuf/struct.pb.dart' as $8; + +export 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions; + +/// Explain options for the query. +class ExplainOptions extends $pb.GeneratedMessage { + factory ExplainOptions({ + $core.bool? analyze, + }) { + final $result = create(); + if (analyze != null) { + $result.analyze = analyze; + } + return $result; + } + ExplainOptions._() : super(); + factory ExplainOptions.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ExplainOptions.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ExplainOptions', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.firestore.v1'), createEmptyInstance: create) + ..aOB(1, _omitFieldNames ? '' : 'analyze') + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ExplainOptions clone() => ExplainOptions()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ExplainOptions copyWith(void Function(ExplainOptions) updates) => super.copyWith((message) => updates(message as ExplainOptions)) as ExplainOptions; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static ExplainOptions create() => ExplainOptions._(); + ExplainOptions createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static ExplainOptions getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static ExplainOptions? _defaultInstance; + + /// Optional. Whether to execute this query. + /// + /// When false (the default), the query will be planned, returning only + /// metrics from the planning stages. + /// + /// When true, the query will be planned and executed, returning the full + /// query results along with both planning and execution stage metrics. + @$pb.TagNumber(1) + $core.bool get analyze => $_getBF(0); + @$pb.TagNumber(1) + set analyze($core.bool v) { $_setBool(0, v); } + @$pb.TagNumber(1) + $core.bool hasAnalyze() => $_has(0); + @$pb.TagNumber(1) + void clearAnalyze() => $_clearField(1); +} + +/// Explain metrics for the query. +class ExplainMetrics extends $pb.GeneratedMessage { + factory ExplainMetrics({ + PlanSummary? planSummary, + ExecutionStats? executionStats, + }) { + final $result = create(); + if (planSummary != null) { + $result.planSummary = planSummary; + } + if (executionStats != null) { + $result.executionStats = executionStats; + } + return $result; + } + ExplainMetrics._() : super(); + factory ExplainMetrics.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ExplainMetrics.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ExplainMetrics', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.firestore.v1'), createEmptyInstance: create) + ..aOM(1, _omitFieldNames ? '' : 'planSummary', subBuilder: PlanSummary.create) + ..aOM(2, _omitFieldNames ? '' : 'executionStats', subBuilder: ExecutionStats.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ExplainMetrics clone() => ExplainMetrics()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ExplainMetrics copyWith(void Function(ExplainMetrics) updates) => super.copyWith((message) => updates(message as ExplainMetrics)) as ExplainMetrics; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static ExplainMetrics create() => ExplainMetrics._(); + ExplainMetrics createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static ExplainMetrics getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static ExplainMetrics? _defaultInstance; + + /// Planning phase information for the query. + @$pb.TagNumber(1) + PlanSummary get planSummary => $_getN(0); + @$pb.TagNumber(1) + set planSummary(PlanSummary v) { $_setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasPlanSummary() => $_has(0); + @$pb.TagNumber(1) + void clearPlanSummary() => $_clearField(1); + @$pb.TagNumber(1) + PlanSummary ensurePlanSummary() => $_ensure(0); + + /// Aggregated stats from the execution of the query. Only present when + /// [ExplainOptions.analyze][google.firestore.v1.ExplainOptions.analyze] is set + /// to true. + @$pb.TagNumber(2) + ExecutionStats get executionStats => $_getN(1); + @$pb.TagNumber(2) + set executionStats(ExecutionStats v) { $_setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasExecutionStats() => $_has(1); + @$pb.TagNumber(2) + void clearExecutionStats() => $_clearField(2); + @$pb.TagNumber(2) + ExecutionStats ensureExecutionStats() => $_ensure(1); +} + +/// Planning phase information for the query. +class PlanSummary extends $pb.GeneratedMessage { + factory PlanSummary({ + $core.Iterable<$8.Struct>? indexesUsed, + }) { + final $result = create(); + if (indexesUsed != null) { + $result.indexesUsed.addAll(indexesUsed); + } + return $result; + } + PlanSummary._() : super(); + factory PlanSummary.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory PlanSummary.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'PlanSummary', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.firestore.v1'), createEmptyInstance: create) + ..pc<$8.Struct>(1, _omitFieldNames ? '' : 'indexesUsed', $pb.PbFieldType.PM, subBuilder: $8.Struct.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + PlanSummary clone() => PlanSummary()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + PlanSummary copyWith(void Function(PlanSummary) updates) => super.copyWith((message) => updates(message as PlanSummary)) as PlanSummary; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static PlanSummary create() => PlanSummary._(); + PlanSummary createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static PlanSummary getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static PlanSummary? _defaultInstance; + + /// The indexes selected for the query. For example: + /// [ + /// {"query_scope": "Collection", "properties": "(foo ASC, __name__ ASC)"}, + /// {"query_scope": "Collection", "properties": "(bar ASC, __name__ ASC)"} + /// ] + @$pb.TagNumber(1) + $pb.PbList<$8.Struct> get indexesUsed => $_getList(0); +} + +/// Execution statistics for the query. +class ExecutionStats extends $pb.GeneratedMessage { + factory ExecutionStats({ + $fixnum.Int64? resultsReturned, + $4.Duration? executionDuration, + $fixnum.Int64? readOperations, + $8.Struct? debugStats, + }) { + final $result = create(); + if (resultsReturned != null) { + $result.resultsReturned = resultsReturned; + } + if (executionDuration != null) { + $result.executionDuration = executionDuration; + } + if (readOperations != null) { + $result.readOperations = readOperations; + } + if (debugStats != null) { + $result.debugStats = debugStats; + } + return $result; + } + ExecutionStats._() : super(); + factory ExecutionStats.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ExecutionStats.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ExecutionStats', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.firestore.v1'), createEmptyInstance: create) + ..aInt64(1, _omitFieldNames ? '' : 'resultsReturned') + ..aOM<$4.Duration>(3, _omitFieldNames ? '' : 'executionDuration', subBuilder: $4.Duration.create) + ..aInt64(4, _omitFieldNames ? '' : 'readOperations') + ..aOM<$8.Struct>(5, _omitFieldNames ? '' : 'debugStats', subBuilder: $8.Struct.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ExecutionStats clone() => ExecutionStats()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ExecutionStats copyWith(void Function(ExecutionStats) updates) => super.copyWith((message) => updates(message as ExecutionStats)) as ExecutionStats; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static ExecutionStats create() => ExecutionStats._(); + ExecutionStats createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static ExecutionStats getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static ExecutionStats? _defaultInstance; + + /// Total number of results returned, including documents, projections, + /// aggregation results, keys. + @$pb.TagNumber(1) + $fixnum.Int64 get resultsReturned => $_getI64(0); + @$pb.TagNumber(1) + set resultsReturned($fixnum.Int64 v) { $_setInt64(0, v); } + @$pb.TagNumber(1) + $core.bool hasResultsReturned() => $_has(0); + @$pb.TagNumber(1) + void clearResultsReturned() => $_clearField(1); + + /// Total time to execute the query in the backend. + @$pb.TagNumber(3) + $4.Duration get executionDuration => $_getN(1); + @$pb.TagNumber(3) + set executionDuration($4.Duration v) { $_setField(3, v); } + @$pb.TagNumber(3) + $core.bool hasExecutionDuration() => $_has(1); + @$pb.TagNumber(3) + void clearExecutionDuration() => $_clearField(3); + @$pb.TagNumber(3) + $4.Duration ensureExecutionDuration() => $_ensure(1); + + /// Total billable read operations. + @$pb.TagNumber(4) + $fixnum.Int64 get readOperations => $_getI64(2); + @$pb.TagNumber(4) + set readOperations($fixnum.Int64 v) { $_setInt64(2, v); } + @$pb.TagNumber(4) + $core.bool hasReadOperations() => $_has(2); + @$pb.TagNumber(4) + void clearReadOperations() => $_clearField(4); + + /// Debugging statistics from the execution of the query. Note that the + /// debugging stats are subject to change as Firestore evolves. It could + /// include: + /// { + /// "indexes_entries_scanned": "1000", + /// "documents_scanned": "20", + /// "billing_details" : { + /// "documents_billable": "20", + /// "index_entries_billable": "1000", + /// "min_query_cost": "0" + /// } + /// } + @$pb.TagNumber(5) + $8.Struct get debugStats => $_getN(3); + @$pb.TagNumber(5) + set debugStats($8.Struct v) { $_setField(5, v); } + @$pb.TagNumber(5) + $core.bool hasDebugStats() => $_has(3); + @$pb.TagNumber(5) + void clearDebugStats() => $_clearField(5); + @$pb.TagNumber(5) + $8.Struct ensureDebugStats() => $_ensure(3); +} + + +const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); +const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/pkgs/googleapis_firestore_v1/lib/google/firestore/v1/query_profile.pbenum.dart b/pkgs/googleapis_firestore_v1/lib/google/firestore/v1/query_profile.pbenum.dart new file mode 100644 index 00000000..1bc72fe3 --- /dev/null +++ b/pkgs/googleapis_firestore_v1/lib/google/firestore/v1/query_profile.pbenum.dart @@ -0,0 +1,11 @@ +// +// Generated code. Do not modify. +// source: google/firestore/v1/query_profile.proto +// +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + diff --git a/pkgs/googleapis_firestore_v1/lib/google/firestore/v1/write.pb.dart b/pkgs/googleapis_firestore_v1/lib/google/firestore/v1/write.pb.dart new file mode 100644 index 00000000..3a4689e1 --- /dev/null +++ b/pkgs/googleapis_firestore_v1/lib/google/firestore/v1/write.pb.dart @@ -0,0 +1,864 @@ +// +// Generated code. Do not modify. +// source: google/firestore/v1/write.proto +// +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:core' as $core; + +import 'package:protobuf/protobuf.dart' as $pb; + +import '../../protobuf/timestamp.pb.dart' as $6; +import 'bloom_filter.pb.dart' as $16; +import 'common.pb.dart' as $9; +import 'document.pb.dart' as $1; +import 'write.pbenum.dart'; + +export 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions; + +export 'write.pbenum.dart'; + +enum Write_Operation { + update, + delete, + transform, + notSet +} + +/// A write on a document. +class Write extends $pb.GeneratedMessage { + factory Write({ + $1.Document? update, + $core.String? delete, + $9.DocumentMask? updateMask, + $9.Precondition? currentDocument, + DocumentTransform? transform, + $core.Iterable? updateTransforms, + }) { + final $result = create(); + if (update != null) { + $result.update = update; + } + if (delete != null) { + $result.delete = delete; + } + if (updateMask != null) { + $result.updateMask = updateMask; + } + if (currentDocument != null) { + $result.currentDocument = currentDocument; + } + if (transform != null) { + $result.transform = transform; + } + if (updateTransforms != null) { + $result.updateTransforms.addAll(updateTransforms); + } + return $result; + } + Write._() : super(); + factory Write.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory Write.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static const $core.Map<$core.int, Write_Operation> _Write_OperationByTag = { + 1 : Write_Operation.update, + 2 : Write_Operation.delete, + 6 : Write_Operation.transform, + 0 : Write_Operation.notSet + }; + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Write', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.firestore.v1'), createEmptyInstance: create) + ..oo(0, [1, 2, 6]) + ..aOM<$1.Document>(1, _omitFieldNames ? '' : 'update', subBuilder: $1.Document.create) + ..aOS(2, _omitFieldNames ? '' : 'delete') + ..aOM<$9.DocumentMask>(3, _omitFieldNames ? '' : 'updateMask', subBuilder: $9.DocumentMask.create) + ..aOM<$9.Precondition>(4, _omitFieldNames ? '' : 'currentDocument', subBuilder: $9.Precondition.create) + ..aOM(6, _omitFieldNames ? '' : 'transform', subBuilder: DocumentTransform.create) + ..pc(7, _omitFieldNames ? '' : 'updateTransforms', $pb.PbFieldType.PM, subBuilder: DocumentTransform_FieldTransform.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Write clone() => Write()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Write copyWith(void Function(Write) updates) => super.copyWith((message) => updates(message as Write)) as Write; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static Write create() => Write._(); + Write createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static Write getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static Write? _defaultInstance; + + Write_Operation whichOperation() => _Write_OperationByTag[$_whichOneof(0)]!; + void clearOperation() => $_clearField($_whichOneof(0)); + + /// A document to write. + @$pb.TagNumber(1) + $1.Document get update => $_getN(0); + @$pb.TagNumber(1) + set update($1.Document v) { $_setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasUpdate() => $_has(0); + @$pb.TagNumber(1) + void clearUpdate() => $_clearField(1); + @$pb.TagNumber(1) + $1.Document ensureUpdate() => $_ensure(0); + + /// A document name to delete. In the format: + /// `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + @$pb.TagNumber(2) + $core.String get delete => $_getSZ(1); + @$pb.TagNumber(2) + set delete($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasDelete() => $_has(1); + @$pb.TagNumber(2) + void clearDelete() => $_clearField(2); + + /// The fields to update in this write. + /// + /// This field can be set only when the operation is `update`. + /// If the mask is not set for an `update` and the document exists, any + /// existing data will be overwritten. + /// If the mask is set and the document on the server has fields not covered by + /// the mask, they are left unchanged. + /// Fields referenced in the mask, but not present in the input document, are + /// deleted from the document on the server. + /// The field paths in this mask must not contain a reserved field name. + @$pb.TagNumber(3) + $9.DocumentMask get updateMask => $_getN(2); + @$pb.TagNumber(3) + set updateMask($9.DocumentMask v) { $_setField(3, v); } + @$pb.TagNumber(3) + $core.bool hasUpdateMask() => $_has(2); + @$pb.TagNumber(3) + void clearUpdateMask() => $_clearField(3); + @$pb.TagNumber(3) + $9.DocumentMask ensureUpdateMask() => $_ensure(2); + + /// An optional precondition on the document. + /// + /// The write will fail if this is set and not met by the target document. + @$pb.TagNumber(4) + $9.Precondition get currentDocument => $_getN(3); + @$pb.TagNumber(4) + set currentDocument($9.Precondition v) { $_setField(4, v); } + @$pb.TagNumber(4) + $core.bool hasCurrentDocument() => $_has(3); + @$pb.TagNumber(4) + void clearCurrentDocument() => $_clearField(4); + @$pb.TagNumber(4) + $9.Precondition ensureCurrentDocument() => $_ensure(3); + + /// Applies a transformation to a document. + @$pb.TagNumber(6) + DocumentTransform get transform => $_getN(4); + @$pb.TagNumber(6) + set transform(DocumentTransform v) { $_setField(6, v); } + @$pb.TagNumber(6) + $core.bool hasTransform() => $_has(4); + @$pb.TagNumber(6) + void clearTransform() => $_clearField(6); + @$pb.TagNumber(6) + DocumentTransform ensureTransform() => $_ensure(4); + + /// The transforms to perform after update. + /// + /// This field can be set only when the operation is `update`. If present, this + /// write is equivalent to performing `update` and `transform` to the same + /// document atomically and in order. + @$pb.TagNumber(7) + $pb.PbList get updateTransforms => $_getList(5); +} + +enum DocumentTransform_FieldTransform_TransformType { + setToServerValue, + increment, + maximum, + minimum, + appendMissingElements, + removeAllFromArray, + notSet +} + +/// A transformation of a field of the document. +class DocumentTransform_FieldTransform extends $pb.GeneratedMessage { + factory DocumentTransform_FieldTransform({ + $core.String? fieldPath, + DocumentTransform_FieldTransform_ServerValue? setToServerValue, + $1.Value? increment, + $1.Value? maximum, + $1.Value? minimum, + $1.ArrayValue? appendMissingElements, + $1.ArrayValue? removeAllFromArray, + }) { + final $result = create(); + if (fieldPath != null) { + $result.fieldPath = fieldPath; + } + if (setToServerValue != null) { + $result.setToServerValue = setToServerValue; + } + if (increment != null) { + $result.increment = increment; + } + if (maximum != null) { + $result.maximum = maximum; + } + if (minimum != null) { + $result.minimum = minimum; + } + if (appendMissingElements != null) { + $result.appendMissingElements = appendMissingElements; + } + if (removeAllFromArray != null) { + $result.removeAllFromArray = removeAllFromArray; + } + return $result; + } + DocumentTransform_FieldTransform._() : super(); + factory DocumentTransform_FieldTransform.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory DocumentTransform_FieldTransform.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static const $core.Map<$core.int, DocumentTransform_FieldTransform_TransformType> _DocumentTransform_FieldTransform_TransformTypeByTag = { + 2 : DocumentTransform_FieldTransform_TransformType.setToServerValue, + 3 : DocumentTransform_FieldTransform_TransformType.increment, + 4 : DocumentTransform_FieldTransform_TransformType.maximum, + 5 : DocumentTransform_FieldTransform_TransformType.minimum, + 6 : DocumentTransform_FieldTransform_TransformType.appendMissingElements, + 7 : DocumentTransform_FieldTransform_TransformType.removeAllFromArray, + 0 : DocumentTransform_FieldTransform_TransformType.notSet + }; + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'DocumentTransform.FieldTransform', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.firestore.v1'), createEmptyInstance: create) + ..oo(0, [2, 3, 4, 5, 6, 7]) + ..aOS(1, _omitFieldNames ? '' : 'fieldPath') + ..e(2, _omitFieldNames ? '' : 'setToServerValue', $pb.PbFieldType.OE, defaultOrMaker: DocumentTransform_FieldTransform_ServerValue.SERVER_VALUE_UNSPECIFIED, valueOf: DocumentTransform_FieldTransform_ServerValue.valueOf, enumValues: DocumentTransform_FieldTransform_ServerValue.values) + ..aOM<$1.Value>(3, _omitFieldNames ? '' : 'increment', subBuilder: $1.Value.create) + ..aOM<$1.Value>(4, _omitFieldNames ? '' : 'maximum', subBuilder: $1.Value.create) + ..aOM<$1.Value>(5, _omitFieldNames ? '' : 'minimum', subBuilder: $1.Value.create) + ..aOM<$1.ArrayValue>(6, _omitFieldNames ? '' : 'appendMissingElements', subBuilder: $1.ArrayValue.create) + ..aOM<$1.ArrayValue>(7, _omitFieldNames ? '' : 'removeAllFromArray', subBuilder: $1.ArrayValue.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + DocumentTransform_FieldTransform clone() => DocumentTransform_FieldTransform()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + DocumentTransform_FieldTransform copyWith(void Function(DocumentTransform_FieldTransform) updates) => super.copyWith((message) => updates(message as DocumentTransform_FieldTransform)) as DocumentTransform_FieldTransform; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static DocumentTransform_FieldTransform create() => DocumentTransform_FieldTransform._(); + DocumentTransform_FieldTransform createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static DocumentTransform_FieldTransform getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static DocumentTransform_FieldTransform? _defaultInstance; + + DocumentTransform_FieldTransform_TransformType whichTransformType() => _DocumentTransform_FieldTransform_TransformTypeByTag[$_whichOneof(0)]!; + void clearTransformType() => $_clearField($_whichOneof(0)); + + /// The path of the field. See + /// [Document.fields][google.firestore.v1.Document.fields] for the field path + /// syntax reference. + @$pb.TagNumber(1) + $core.String get fieldPath => $_getSZ(0); + @$pb.TagNumber(1) + set fieldPath($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasFieldPath() => $_has(0); + @$pb.TagNumber(1) + void clearFieldPath() => $_clearField(1); + + /// Sets the field to the given server value. + @$pb.TagNumber(2) + DocumentTransform_FieldTransform_ServerValue get setToServerValue => $_getN(1); + @$pb.TagNumber(2) + set setToServerValue(DocumentTransform_FieldTransform_ServerValue v) { $_setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasSetToServerValue() => $_has(1); + @$pb.TagNumber(2) + void clearSetToServerValue() => $_clearField(2); + + /// Adds the given value to the field's current value. + /// + /// This must be an integer or a double value. + /// If the field is not an integer or double, or if the field does not yet + /// exist, the transformation will set the field to the given value. + /// If either of the given value or the current field value are doubles, + /// both values will be interpreted as doubles. Double arithmetic and + /// representation of double values follow IEEE 754 semantics. + /// If there is positive/negative integer overflow, the field is resolved + /// to the largest magnitude positive/negative integer. + @$pb.TagNumber(3) + $1.Value get increment => $_getN(2); + @$pb.TagNumber(3) + set increment($1.Value v) { $_setField(3, v); } + @$pb.TagNumber(3) + $core.bool hasIncrement() => $_has(2); + @$pb.TagNumber(3) + void clearIncrement() => $_clearField(3); + @$pb.TagNumber(3) + $1.Value ensureIncrement() => $_ensure(2); + + /// Sets the field to the maximum of its current value and the given value. + /// + /// This must be an integer or a double value. + /// If the field is not an integer or double, or if the field does not yet + /// exist, the transformation will set the field to the given value. + /// If a maximum operation is applied where the field and the input value + /// are of mixed types (that is - one is an integer and one is a double) + /// the field takes on the type of the larger operand. If the operands are + /// equivalent (e.g. 3 and 3.0), the field does not change. + /// 0, 0.0, and -0.0 are all zero. The maximum of a zero stored value and + /// zero input value is always the stored value. + /// The maximum of any numeric value x and NaN is NaN. + @$pb.TagNumber(4) + $1.Value get maximum => $_getN(3); + @$pb.TagNumber(4) + set maximum($1.Value v) { $_setField(4, v); } + @$pb.TagNumber(4) + $core.bool hasMaximum() => $_has(3); + @$pb.TagNumber(4) + void clearMaximum() => $_clearField(4); + @$pb.TagNumber(4) + $1.Value ensureMaximum() => $_ensure(3); + + /// Sets the field to the minimum of its current value and the given value. + /// + /// This must be an integer or a double value. + /// If the field is not an integer or double, or if the field does not yet + /// exist, the transformation will set the field to the input value. + /// If a minimum operation is applied where the field and the input value + /// are of mixed types (that is - one is an integer and one is a double) + /// the field takes on the type of the smaller operand. If the operands are + /// equivalent (e.g. 3 and 3.0), the field does not change. + /// 0, 0.0, and -0.0 are all zero. The minimum of a zero stored value and + /// zero input value is always the stored value. + /// The minimum of any numeric value x and NaN is NaN. + @$pb.TagNumber(5) + $1.Value get minimum => $_getN(4); + @$pb.TagNumber(5) + set minimum($1.Value v) { $_setField(5, v); } + @$pb.TagNumber(5) + $core.bool hasMinimum() => $_has(4); + @$pb.TagNumber(5) + void clearMinimum() => $_clearField(5); + @$pb.TagNumber(5) + $1.Value ensureMinimum() => $_ensure(4); + + /// Append the given elements in order if they are not already present in + /// the current field value. + /// If the field is not an array, or if the field does not yet exist, it is + /// first set to the empty array. + /// + /// Equivalent numbers of different types (e.g. 3L and 3.0) are + /// considered equal when checking if a value is missing. + /// NaN is equal to NaN, and Null is equal to Null. + /// If the input contains multiple equivalent values, only the first will + /// be considered. + /// + /// The corresponding transform_result will be the null value. + @$pb.TagNumber(6) + $1.ArrayValue get appendMissingElements => $_getN(5); + @$pb.TagNumber(6) + set appendMissingElements($1.ArrayValue v) { $_setField(6, v); } + @$pb.TagNumber(6) + $core.bool hasAppendMissingElements() => $_has(5); + @$pb.TagNumber(6) + void clearAppendMissingElements() => $_clearField(6); + @$pb.TagNumber(6) + $1.ArrayValue ensureAppendMissingElements() => $_ensure(5); + + /// Remove all of the given elements from the array in the field. + /// If the field is not an array, or if the field does not yet exist, it is + /// set to the empty array. + /// + /// Equivalent numbers of the different types (e.g. 3L and 3.0) are + /// considered equal when deciding whether an element should be removed. + /// NaN is equal to NaN, and Null is equal to Null. + /// This will remove all equivalent values if there are duplicates. + /// + /// The corresponding transform_result will be the null value. + @$pb.TagNumber(7) + $1.ArrayValue get removeAllFromArray => $_getN(6); + @$pb.TagNumber(7) + set removeAllFromArray($1.ArrayValue v) { $_setField(7, v); } + @$pb.TagNumber(7) + $core.bool hasRemoveAllFromArray() => $_has(6); + @$pb.TagNumber(7) + void clearRemoveAllFromArray() => $_clearField(7); + @$pb.TagNumber(7) + $1.ArrayValue ensureRemoveAllFromArray() => $_ensure(6); +} + +/// A transformation of a document. +class DocumentTransform extends $pb.GeneratedMessage { + factory DocumentTransform({ + $core.String? document, + $core.Iterable? fieldTransforms, + }) { + final $result = create(); + if (document != null) { + $result.document = document; + } + if (fieldTransforms != null) { + $result.fieldTransforms.addAll(fieldTransforms); + } + return $result; + } + DocumentTransform._() : super(); + factory DocumentTransform.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory DocumentTransform.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'DocumentTransform', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.firestore.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'document') + ..pc(2, _omitFieldNames ? '' : 'fieldTransforms', $pb.PbFieldType.PM, subBuilder: DocumentTransform_FieldTransform.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + DocumentTransform clone() => DocumentTransform()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + DocumentTransform copyWith(void Function(DocumentTransform) updates) => super.copyWith((message) => updates(message as DocumentTransform)) as DocumentTransform; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static DocumentTransform create() => DocumentTransform._(); + DocumentTransform createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static DocumentTransform getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static DocumentTransform? _defaultInstance; + + /// The name of the document to transform. + @$pb.TagNumber(1) + $core.String get document => $_getSZ(0); + @$pb.TagNumber(1) + set document($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasDocument() => $_has(0); + @$pb.TagNumber(1) + void clearDocument() => $_clearField(1); + + /// The list of transformations to apply to the fields of the document, in + /// order. + /// This must not be empty. + @$pb.TagNumber(2) + $pb.PbList get fieldTransforms => $_getList(1); +} + +/// The result of applying a write. +class WriteResult extends $pb.GeneratedMessage { + factory WriteResult({ + $6.Timestamp? updateTime, + $core.Iterable<$1.Value>? transformResults, + }) { + final $result = create(); + if (updateTime != null) { + $result.updateTime = updateTime; + } + if (transformResults != null) { + $result.transformResults.addAll(transformResults); + } + return $result; + } + WriteResult._() : super(); + factory WriteResult.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory WriteResult.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'WriteResult', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.firestore.v1'), createEmptyInstance: create) + ..aOM<$6.Timestamp>(1, _omitFieldNames ? '' : 'updateTime', subBuilder: $6.Timestamp.create) + ..pc<$1.Value>(2, _omitFieldNames ? '' : 'transformResults', $pb.PbFieldType.PM, subBuilder: $1.Value.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + WriteResult clone() => WriteResult()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + WriteResult copyWith(void Function(WriteResult) updates) => super.copyWith((message) => updates(message as WriteResult)) as WriteResult; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static WriteResult create() => WriteResult._(); + WriteResult createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static WriteResult getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static WriteResult? _defaultInstance; + + /// The last update time of the document after applying the write. Not set + /// after a `delete`. + /// + /// If the write did not actually change the document, this will be the + /// previous update_time. + @$pb.TagNumber(1) + $6.Timestamp get updateTime => $_getN(0); + @$pb.TagNumber(1) + set updateTime($6.Timestamp v) { $_setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasUpdateTime() => $_has(0); + @$pb.TagNumber(1) + void clearUpdateTime() => $_clearField(1); + @$pb.TagNumber(1) + $6.Timestamp ensureUpdateTime() => $_ensure(0); + + /// The results of applying each + /// [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform], + /// in the same order. + @$pb.TagNumber(2) + $pb.PbList<$1.Value> get transformResults => $_getList(1); +} + +/// A [Document][google.firestore.v1.Document] has changed. +/// +/// May be the result of multiple [writes][google.firestore.v1.Write], including +/// deletes, that ultimately resulted in a new value for the +/// [Document][google.firestore.v1.Document]. +/// +/// Multiple [DocumentChange][google.firestore.v1.DocumentChange] messages may be +/// returned for the same logical change, if multiple targets are affected. +class DocumentChange extends $pb.GeneratedMessage { + factory DocumentChange({ + $1.Document? document, + $core.Iterable<$core.int>? targetIds, + $core.Iterable<$core.int>? removedTargetIds, + }) { + final $result = create(); + if (document != null) { + $result.document = document; + } + if (targetIds != null) { + $result.targetIds.addAll(targetIds); + } + if (removedTargetIds != null) { + $result.removedTargetIds.addAll(removedTargetIds); + } + return $result; + } + DocumentChange._() : super(); + factory DocumentChange.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory DocumentChange.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'DocumentChange', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.firestore.v1'), createEmptyInstance: create) + ..aOM<$1.Document>(1, _omitFieldNames ? '' : 'document', subBuilder: $1.Document.create) + ..p<$core.int>(5, _omitFieldNames ? '' : 'targetIds', $pb.PbFieldType.K3) + ..p<$core.int>(6, _omitFieldNames ? '' : 'removedTargetIds', $pb.PbFieldType.K3) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + DocumentChange clone() => DocumentChange()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + DocumentChange copyWith(void Function(DocumentChange) updates) => super.copyWith((message) => updates(message as DocumentChange)) as DocumentChange; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static DocumentChange create() => DocumentChange._(); + DocumentChange createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static DocumentChange getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static DocumentChange? _defaultInstance; + + /// The new state of the [Document][google.firestore.v1.Document]. + /// + /// If `mask` is set, contains only fields that were updated or added. + @$pb.TagNumber(1) + $1.Document get document => $_getN(0); + @$pb.TagNumber(1) + set document($1.Document v) { $_setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasDocument() => $_has(0); + @$pb.TagNumber(1) + void clearDocument() => $_clearField(1); + @$pb.TagNumber(1) + $1.Document ensureDocument() => $_ensure(0); + + /// A set of target IDs of targets that match this document. + @$pb.TagNumber(5) + $pb.PbList<$core.int> get targetIds => $_getList(1); + + /// A set of target IDs for targets that no longer match this document. + @$pb.TagNumber(6) + $pb.PbList<$core.int> get removedTargetIds => $_getList(2); +} + +/// A [Document][google.firestore.v1.Document] has been deleted. +/// +/// May be the result of multiple [writes][google.firestore.v1.Write], including +/// updates, the last of which deleted the +/// [Document][google.firestore.v1.Document]. +/// +/// Multiple [DocumentDelete][google.firestore.v1.DocumentDelete] messages may be +/// returned for the same logical delete, if multiple targets are affected. +class DocumentDelete extends $pb.GeneratedMessage { + factory DocumentDelete({ + $core.String? document, + $6.Timestamp? readTime, + $core.Iterable<$core.int>? removedTargetIds, + }) { + final $result = create(); + if (document != null) { + $result.document = document; + } + if (readTime != null) { + $result.readTime = readTime; + } + if (removedTargetIds != null) { + $result.removedTargetIds.addAll(removedTargetIds); + } + return $result; + } + DocumentDelete._() : super(); + factory DocumentDelete.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory DocumentDelete.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'DocumentDelete', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.firestore.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'document') + ..aOM<$6.Timestamp>(4, _omitFieldNames ? '' : 'readTime', subBuilder: $6.Timestamp.create) + ..p<$core.int>(6, _omitFieldNames ? '' : 'removedTargetIds', $pb.PbFieldType.K3) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + DocumentDelete clone() => DocumentDelete()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + DocumentDelete copyWith(void Function(DocumentDelete) updates) => super.copyWith((message) => updates(message as DocumentDelete)) as DocumentDelete; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static DocumentDelete create() => DocumentDelete._(); + DocumentDelete createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static DocumentDelete getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static DocumentDelete? _defaultInstance; + + /// The resource name of the [Document][google.firestore.v1.Document] that was + /// deleted. + @$pb.TagNumber(1) + $core.String get document => $_getSZ(0); + @$pb.TagNumber(1) + set document($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasDocument() => $_has(0); + @$pb.TagNumber(1) + void clearDocument() => $_clearField(1); + + /// The read timestamp at which the delete was observed. + /// + /// Greater or equal to the `commit_time` of the delete. + @$pb.TagNumber(4) + $6.Timestamp get readTime => $_getN(1); + @$pb.TagNumber(4) + set readTime($6.Timestamp v) { $_setField(4, v); } + @$pb.TagNumber(4) + $core.bool hasReadTime() => $_has(1); + @$pb.TagNumber(4) + void clearReadTime() => $_clearField(4); + @$pb.TagNumber(4) + $6.Timestamp ensureReadTime() => $_ensure(1); + + /// A set of target IDs for targets that previously matched this entity. + @$pb.TagNumber(6) + $pb.PbList<$core.int> get removedTargetIds => $_getList(2); +} + +/// A [Document][google.firestore.v1.Document] has been removed from the view of +/// the targets. +/// +/// Sent if the document is no longer relevant to a target and is out of view. +/// Can be sent instead of a DocumentDelete or a DocumentChange if the server +/// can not send the new value of the document. +/// +/// Multiple [DocumentRemove][google.firestore.v1.DocumentRemove] messages may be +/// returned for the same logical write or delete, if multiple targets are +/// affected. +class DocumentRemove extends $pb.GeneratedMessage { + factory DocumentRemove({ + $core.String? document, + $core.Iterable<$core.int>? removedTargetIds, + $6.Timestamp? readTime, + }) { + final $result = create(); + if (document != null) { + $result.document = document; + } + if (removedTargetIds != null) { + $result.removedTargetIds.addAll(removedTargetIds); + } + if (readTime != null) { + $result.readTime = readTime; + } + return $result; + } + DocumentRemove._() : super(); + factory DocumentRemove.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory DocumentRemove.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'DocumentRemove', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.firestore.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'document') + ..p<$core.int>(2, _omitFieldNames ? '' : 'removedTargetIds', $pb.PbFieldType.K3) + ..aOM<$6.Timestamp>(4, _omitFieldNames ? '' : 'readTime', subBuilder: $6.Timestamp.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + DocumentRemove clone() => DocumentRemove()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + DocumentRemove copyWith(void Function(DocumentRemove) updates) => super.copyWith((message) => updates(message as DocumentRemove)) as DocumentRemove; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static DocumentRemove create() => DocumentRemove._(); + DocumentRemove createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static DocumentRemove getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static DocumentRemove? _defaultInstance; + + /// The resource name of the [Document][google.firestore.v1.Document] that has + /// gone out of view. + @$pb.TagNumber(1) + $core.String get document => $_getSZ(0); + @$pb.TagNumber(1) + set document($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasDocument() => $_has(0); + @$pb.TagNumber(1) + void clearDocument() => $_clearField(1); + + /// A set of target IDs for targets that previously matched this document. + @$pb.TagNumber(2) + $pb.PbList<$core.int> get removedTargetIds => $_getList(1); + + /// The read timestamp at which the remove was observed. + /// + /// Greater or equal to the `commit_time` of the change/delete/remove. + @$pb.TagNumber(4) + $6.Timestamp get readTime => $_getN(2); + @$pb.TagNumber(4) + set readTime($6.Timestamp v) { $_setField(4, v); } + @$pb.TagNumber(4) + $core.bool hasReadTime() => $_has(2); + @$pb.TagNumber(4) + void clearReadTime() => $_clearField(4); + @$pb.TagNumber(4) + $6.Timestamp ensureReadTime() => $_ensure(2); +} + +/// A digest of all the documents that match a given target. +class ExistenceFilter extends $pb.GeneratedMessage { + factory ExistenceFilter({ + $core.int? targetId, + $core.int? count, + $16.BloomFilter? unchangedNames, + }) { + final $result = create(); + if (targetId != null) { + $result.targetId = targetId; + } + if (count != null) { + $result.count = count; + } + if (unchangedNames != null) { + $result.unchangedNames = unchangedNames; + } + return $result; + } + ExistenceFilter._() : super(); + factory ExistenceFilter.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ExistenceFilter.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ExistenceFilter', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.firestore.v1'), createEmptyInstance: create) + ..a<$core.int>(1, _omitFieldNames ? '' : 'targetId', $pb.PbFieldType.O3) + ..a<$core.int>(2, _omitFieldNames ? '' : 'count', $pb.PbFieldType.O3) + ..aOM<$16.BloomFilter>(3, _omitFieldNames ? '' : 'unchangedNames', subBuilder: $16.BloomFilter.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ExistenceFilter clone() => ExistenceFilter()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ExistenceFilter copyWith(void Function(ExistenceFilter) updates) => super.copyWith((message) => updates(message as ExistenceFilter)) as ExistenceFilter; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static ExistenceFilter create() => ExistenceFilter._(); + ExistenceFilter createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static ExistenceFilter getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static ExistenceFilter? _defaultInstance; + + /// The target ID to which this filter applies. + @$pb.TagNumber(1) + $core.int get targetId => $_getIZ(0); + @$pb.TagNumber(1) + set targetId($core.int v) { $_setSignedInt32(0, v); } + @$pb.TagNumber(1) + $core.bool hasTargetId() => $_has(0); + @$pb.TagNumber(1) + void clearTargetId() => $_clearField(1); + + /// The total count of documents that match + /// [target_id][google.firestore.v1.ExistenceFilter.target_id]. + /// + /// If different from the count of documents in the client that match, the + /// client must manually determine which documents no longer match the target. + /// + /// The client can use the `unchanged_names` bloom filter to assist with + /// this determination by testing ALL the document names against the filter; + /// if the document name is NOT in the filter, it means the document no + /// longer matches the target. + @$pb.TagNumber(2) + $core.int get count => $_getIZ(1); + @$pb.TagNumber(2) + set count($core.int v) { $_setSignedInt32(1, v); } + @$pb.TagNumber(2) + $core.bool hasCount() => $_has(1); + @$pb.TagNumber(2) + void clearCount() => $_clearField(2); + + /// A bloom filter that, despite its name, contains the UTF-8 byte encodings of + /// the resource names of ALL the documents that match + /// [target_id][google.firestore.v1.ExistenceFilter.target_id], in the form + /// `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + /// + /// This bloom filter may be omitted at the server's discretion, such as if it + /// is deemed that the client will not make use of it or if it is too + /// computationally expensive to calculate or transmit. Clients must gracefully + /// handle this field being absent by falling back to the logic used before + /// this field existed; that is, re-add the target without a resume token to + /// figure out which documents in the client's cache are out of sync. + @$pb.TagNumber(3) + $16.BloomFilter get unchangedNames => $_getN(2); + @$pb.TagNumber(3) + set unchangedNames($16.BloomFilter v) { $_setField(3, v); } + @$pb.TagNumber(3) + $core.bool hasUnchangedNames() => $_has(2); + @$pb.TagNumber(3) + void clearUnchangedNames() => $_clearField(3); + @$pb.TagNumber(3) + $16.BloomFilter ensureUnchangedNames() => $_ensure(2); +} + + +const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); +const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/pkgs/googleapis_firestore_v1/lib/google/firestore/v1/write.pbenum.dart b/pkgs/googleapis_firestore_v1/lib/google/firestore/v1/write.pbenum.dart new file mode 100644 index 00000000..8da21db2 --- /dev/null +++ b/pkgs/googleapis_firestore_v1/lib/google/firestore/v1/write.pbenum.dart @@ -0,0 +1,37 @@ +// +// Generated code. Do not modify. +// source: google/firestore/v1/write.proto +// +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:core' as $core; + +import 'package:protobuf/protobuf.dart' as $pb; + +/// A value that is calculated by the server. +class DocumentTransform_FieldTransform_ServerValue extends $pb.ProtobufEnum { + /// Unspecified. This value must not be used. + static const DocumentTransform_FieldTransform_ServerValue SERVER_VALUE_UNSPECIFIED = DocumentTransform_FieldTransform_ServerValue._(0, _omitEnumNames ? '' : 'SERVER_VALUE_UNSPECIFIED'); + /// The time at which the server processed the request, with millisecond + /// precision. If used on multiple fields (same or different documents) in + /// a transaction, all the fields will get the same server timestamp. + static const DocumentTransform_FieldTransform_ServerValue REQUEST_TIME = DocumentTransform_FieldTransform_ServerValue._(1, _omitEnumNames ? '' : 'REQUEST_TIME'); + + static const $core.List values = [ + SERVER_VALUE_UNSPECIFIED, + REQUEST_TIME, + ]; + + static final $core.List _byValue = $pb.ProtobufEnum.$_initByValueList(values, 1); + static DocumentTransform_FieldTransform_ServerValue? valueOf($core.int value) => value < 0 || value >= _byValue.length ? null : _byValue[value]; + + const DocumentTransform_FieldTransform_ServerValue._(super.v, super.n); +} + + +const _omitEnumNames = $core.bool.fromEnvironment('protobuf.omit_enum_names'); diff --git a/pkgs/googleapis_firestore_v1/lib/google/protobuf/any.pb.dart b/pkgs/googleapis_firestore_v1/lib/google/protobuf/any.pb.dart new file mode 100644 index 00000000..38172fd6 --- /dev/null +++ b/pkgs/googleapis_firestore_v1/lib/google/protobuf/any.pb.dart @@ -0,0 +1,204 @@ +// +// Generated code. Do not modify. +// source: google/protobuf/any.proto +// +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:core' as $core; + +import 'package:protobuf/protobuf.dart' as $pb; +import 'package:protobuf/src/protobuf/mixins/well_known.dart' as $mixin; + +export 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions; + +/// `Any` contains an arbitrary serialized protocol buffer message along with a +/// URL that describes the type of the serialized message. +/// +/// Protobuf library provides support to pack/unpack Any values in the form +/// of utility functions or additional generated methods of the Any type. +/// +/// 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('See https://github.com/google/protobuf.dart/issues/998.') + Any clone() => Any()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Any copyWith(void Function(Any) updates) => super.copyWith((message) => updates(message as Any)) as Any; + + $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/pkgs/googleapis_firestore_v1/lib/google/protobuf/any.pbenum.dart b/pkgs/googleapis_firestore_v1/lib/google/protobuf/any.pbenum.dart new file mode 100644 index 00000000..fd3fb80e --- /dev/null +++ b/pkgs/googleapis_firestore_v1/lib/google/protobuf/any.pbenum.dart @@ -0,0 +1,11 @@ +// +// Generated code. Do not modify. +// source: google/protobuf/any.proto +// +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + diff --git a/pkgs/googleapis_firestore_v1/lib/google/protobuf/duration.pb.dart b/pkgs/googleapis_firestore_v1/lib/google/protobuf/duration.pb.dart new file mode 100644 index 00000000..41ab7c09 --- /dev/null +++ b/pkgs/googleapis_firestore_v1/lib/google/protobuf/duration.pb.dart @@ -0,0 +1,162 @@ +// +// Generated code. Do not modify. +// source: google/protobuf/duration.proto +// +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +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; + +export 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions; + +/// A Duration represents a signed, fixed-length span of time represented +/// as a count of seconds and fractions of seconds at nanosecond +/// resolution. It is independent of any calendar and concepts like "day" +/// or "month". It is related to Timestamp in that the difference between +/// two Timestamp values is a Duration and it can be added or subtracted +/// from a Timestamp. Range is approximately +-10,000 years. +/// +/// # Examples +/// +/// 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('See https://github.com/google/protobuf.dart/issues/998.') + Duration clone() => Duration()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Duration copyWith(void Function(Duration) updates) => super.copyWith((message) => updates(message as Duration)) as Duration; + + $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); + /// Converts the [Duration] to [$core.Duration]. + /// + /// This is a lossy conversion, as [$core.Duration] is limited to [int] + /// microseconds and also does not support nanosecond precision. + $core.Duration toDart() => + $core.Duration( + seconds: seconds.toInt(), + microseconds: nanos ~/ 1000, + ); + + /// Creates a new instance from [$core.Duration]. + static Duration fromDart($core.Duration duration) => Duration() + ..seconds = $fixnum.Int64(duration.inSeconds) + ..nanos = (duration.inMicroseconds % $core.Duration.microsecondsPerSecond) * 1000; + +} + + +const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); +const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/pkgs/googleapis_firestore_v1/lib/google/protobuf/duration.pbenum.dart b/pkgs/googleapis_firestore_v1/lib/google/protobuf/duration.pbenum.dart new file mode 100644 index 00000000..dde5f368 --- /dev/null +++ b/pkgs/googleapis_firestore_v1/lib/google/protobuf/duration.pbenum.dart @@ -0,0 +1,11 @@ +// +// Generated code. Do not modify. +// source: google/protobuf/duration.proto +// +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + diff --git a/pkgs/googleapis_firestore_v1/lib/google/protobuf/empty.pb.dart b/pkgs/googleapis_firestore_v1/lib/google/protobuf/empty.pb.dart new file mode 100644 index 00000000..5f538b86 --- /dev/null +++ b/pkgs/googleapis_firestore_v1/lib/google/protobuf/empty.pb.dart @@ -0,0 +1,52 @@ +// +// Generated code. Do not modify. +// source: google/protobuf/empty.proto +// +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:core' as $core; + +import 'package:protobuf/protobuf.dart' as $pb; + +export 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions; + +/// A generic empty message that you can re-use to avoid defining duplicated +/// empty messages in your APIs. A typical example is to use it as the request +/// or the response type of an API method. For instance: +/// +/// service Foo { +/// rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); +/// } +class Empty extends $pb.GeneratedMessage { + factory Empty() => create(); + Empty._() : super(); + factory Empty.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory Empty.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Empty', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), createEmptyInstance: create) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Empty clone() => Empty()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Empty copyWith(void Function(Empty) updates) => super.copyWith((message) => updates(message as Empty)) as Empty; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static Empty create() => Empty._(); + Empty createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static Empty getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static Empty? _defaultInstance; +} + + +const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/pkgs/googleapis_firestore_v1/lib/google/protobuf/empty.pbenum.dart b/pkgs/googleapis_firestore_v1/lib/google/protobuf/empty.pbenum.dart new file mode 100644 index 00000000..dce3af5b --- /dev/null +++ b/pkgs/googleapis_firestore_v1/lib/google/protobuf/empty.pbenum.dart @@ -0,0 +1,11 @@ +// +// Generated code. Do not modify. +// source: google/protobuf/empty.proto +// +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + diff --git a/pkgs/googleapis_firestore_v1/lib/google/protobuf/struct.pb.dart b/pkgs/googleapis_firestore_v1/lib/google/protobuf/struct.pb.dart new file mode 100644 index 00000000..5e8d5912 --- /dev/null +++ b/pkgs/googleapis_firestore_v1/lib/google/protobuf/struct.pb.dart @@ -0,0 +1,267 @@ +// +// Generated code. Do not modify. +// source: google/protobuf/struct.proto +// +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:core' as $core; + +import 'package:protobuf/protobuf.dart' as $pb; +import 'package:protobuf/src/protobuf/mixins/well_known.dart' as $mixin; + +import 'struct.pbenum.dart'; + +export 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions; + +export 'struct.pbenum.dart'; + +/// `Struct` represents a structured data value, consisting of fields +/// which map to dynamically typed values. In some languages, `Struct` +/// might be supported by a native representation. For example, in +/// scripting languages like JS a struct is represented as an +/// object. The details of that representation are described together +/// with the proto support for the language. +/// +/// The JSON representation for `Struct` is JSON object. +class Struct extends $pb.GeneratedMessage with $mixin.StructMixin { + factory Struct({ + $core.Iterable<$core.MapEntry<$core.String, Value>>? fields, + }) { + final $result = create(); + if (fields != null) { + $result.fields.addEntries(fields); + } + return $result; + } + Struct._() : super(); + factory Struct.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory Struct.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Struct', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), createEmptyInstance: create, toProto3Json: $mixin.StructMixin.toProto3JsonHelper, fromProto3Json: $mixin.StructMixin.fromProto3JsonHelper) + ..m<$core.String, Value>(1, _omitFieldNames ? '' : 'fields', entryClassName: 'Struct.FieldsEntry', keyFieldType: $pb.PbFieldType.OS, valueFieldType: $pb.PbFieldType.OM, valueCreator: Value.create, valueDefaultOrMaker: Value.getDefault, packageName: const $pb.PackageName('google.protobuf')) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Struct clone() => Struct()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Struct copyWith(void Function(Struct) updates) => super.copyWith((message) => updates(message as Struct)) as Struct; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static Struct create() => Struct._(); + Struct createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static Struct getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static Struct? _defaultInstance; + + /// Unordered map of dynamically typed values. + @$pb.TagNumber(1) + $pb.PbMap<$core.String, Value> get fields => $_getMap(0); +} + +enum Value_Kind { + nullValue, + numberValue, + stringValue, + boolValue, + structValue, + listValue, + notSet +} + +/// `Value` represents a dynamically typed value which can be either +/// null, a number, a string, a boolean, a recursive struct value, or a +/// list of values. A producer of value is expected to set one of these +/// variants. Absence of any variant indicates an error. +/// +/// The JSON representation for `Value` is JSON value. +class Value extends $pb.GeneratedMessage with $mixin.ValueMixin { + factory Value({ + NullValue? nullValue, + $core.double? numberValue, + $core.String? stringValue, + $core.bool? boolValue, + Struct? structValue, + ListValue? listValue, + }) { + final $result = create(); + if (nullValue != null) { + $result.nullValue = nullValue; + } + if (numberValue != null) { + $result.numberValue = numberValue; + } + if (stringValue != null) { + $result.stringValue = stringValue; + } + if (boolValue != null) { + $result.boolValue = boolValue; + } + if (structValue != null) { + $result.structValue = structValue; + } + if (listValue != null) { + $result.listValue = listValue; + } + return $result; + } + Value._() : super(); + factory Value.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory Value.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static const $core.Map<$core.int, Value_Kind> _Value_KindByTag = { + 1 : Value_Kind.nullValue, + 2 : Value_Kind.numberValue, + 3 : Value_Kind.stringValue, + 4 : Value_Kind.boolValue, + 5 : Value_Kind.structValue, + 6 : Value_Kind.listValue, + 0 : Value_Kind.notSet + }; + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Value', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), createEmptyInstance: create, toProto3Json: $mixin.ValueMixin.toProto3JsonHelper, fromProto3Json: $mixin.ValueMixin.fromProto3JsonHelper) + ..oo(0, [1, 2, 3, 4, 5, 6]) + ..e(1, _omitFieldNames ? '' : 'nullValue', $pb.PbFieldType.OE, defaultOrMaker: NullValue.NULL_VALUE, valueOf: NullValue.valueOf, enumValues: NullValue.values) + ..a<$core.double>(2, _omitFieldNames ? '' : 'numberValue', $pb.PbFieldType.OD) + ..aOS(3, _omitFieldNames ? '' : 'stringValue') + ..aOB(4, _omitFieldNames ? '' : 'boolValue') + ..aOM(5, _omitFieldNames ? '' : 'structValue', subBuilder: Struct.create) + ..aOM(6, _omitFieldNames ? '' : 'listValue', subBuilder: ListValue.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Value clone() => Value()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Value copyWith(void Function(Value) updates) => super.copyWith((message) => updates(message as Value)) as Value; + + $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_Kind whichKind() => _Value_KindByTag[$_whichOneof(0)]!; + void clearKind() => $_clearField($_whichOneof(0)); + + /// Represents a null value. + @$pb.TagNumber(1) + NullValue get nullValue => $_getN(0); + @$pb.TagNumber(1) + set nullValue(NullValue v) { $_setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasNullValue() => $_has(0); + @$pb.TagNumber(1) + void clearNullValue() => $_clearField(1); + + /// Represents a double value. + @$pb.TagNumber(2) + $core.double get numberValue => $_getN(1); + @$pb.TagNumber(2) + set numberValue($core.double v) { $_setDouble(1, v); } + @$pb.TagNumber(2) + $core.bool hasNumberValue() => $_has(1); + @$pb.TagNumber(2) + void clearNumberValue() => $_clearField(2); + + /// Represents a string value. + @$pb.TagNumber(3) + $core.String get stringValue => $_getSZ(2); + @$pb.TagNumber(3) + set stringValue($core.String v) { $_setString(2, v); } + @$pb.TagNumber(3) + $core.bool hasStringValue() => $_has(2); + @$pb.TagNumber(3) + void clearStringValue() => $_clearField(3); + + /// Represents a boolean value. + @$pb.TagNumber(4) + $core.bool get boolValue => $_getBF(3); + @$pb.TagNumber(4) + set boolValue($core.bool v) { $_setBool(3, v); } + @$pb.TagNumber(4) + $core.bool hasBoolValue() => $_has(3); + @$pb.TagNumber(4) + void clearBoolValue() => $_clearField(4); + + /// Represents a structured value. + @$pb.TagNumber(5) + Struct get structValue => $_getN(4); + @$pb.TagNumber(5) + set structValue(Struct v) { $_setField(5, v); } + @$pb.TagNumber(5) + $core.bool hasStructValue() => $_has(4); + @$pb.TagNumber(5) + void clearStructValue() => $_clearField(5); + @$pb.TagNumber(5) + Struct ensureStructValue() => $_ensure(4); + + /// Represents a repeated `Value`. + @$pb.TagNumber(6) + ListValue get listValue => $_getN(5); + @$pb.TagNumber(6) + set listValue(ListValue v) { $_setField(6, v); } + @$pb.TagNumber(6) + $core.bool hasListValue() => $_has(5); + @$pb.TagNumber(6) + void clearListValue() => $_clearField(6); + @$pb.TagNumber(6) + ListValue ensureListValue() => $_ensure(5); +} + +/// `ListValue` is a wrapper around a repeated field of values. +/// +/// The JSON representation for `ListValue` is JSON array. +class ListValue extends $pb.GeneratedMessage with $mixin.ListValueMixin { + factory ListValue({ + $core.Iterable? values, + }) { + final $result = create(); + if (values != null) { + $result.values.addAll(values); + } + return $result; + } + ListValue._() : super(); + factory ListValue.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ListValue.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ListValue', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), createEmptyInstance: create, toProto3Json: $mixin.ListValueMixin.toProto3JsonHelper, fromProto3Json: $mixin.ListValueMixin.fromProto3JsonHelper) + ..pc(1, _omitFieldNames ? '' : 'values', $pb.PbFieldType.PM, subBuilder: Value.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ListValue clone() => ListValue()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ListValue copyWith(void Function(ListValue) updates) => super.copyWith((message) => updates(message as ListValue)) as ListValue; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static ListValue create() => ListValue._(); + ListValue createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static ListValue getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static ListValue? _defaultInstance; + + /// Repeated field of dynamically typed values. + @$pb.TagNumber(1) + $pb.PbList get values => $_getList(0); +} + + +const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); +const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/pkgs/googleapis_firestore_v1/lib/google/protobuf/struct.pbenum.dart b/pkgs/googleapis_firestore_v1/lib/google/protobuf/struct.pbenum.dart new file mode 100644 index 00000000..d943f809 --- /dev/null +++ b/pkgs/googleapis_firestore_v1/lib/google/protobuf/struct.pbenum.dart @@ -0,0 +1,35 @@ +// +// Generated code. Do not modify. +// source: google/protobuf/struct.proto +// +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:core' as $core; + +import 'package:protobuf/protobuf.dart' as $pb; + +/// `NullValue` is a singleton enumeration to represent the null value for the +/// `Value` type union. +/// +/// The JSON representation for `NullValue` is JSON `null`. +class NullValue extends $pb.ProtobufEnum { + /// Null value. + static const NullValue NULL_VALUE = NullValue._(0, _omitEnumNames ? '' : 'NULL_VALUE'); + + static const $core.List values = [ + NULL_VALUE, + ]; + + static final $core.List _byValue = $pb.ProtobufEnum.$_initByValueList(values, 0); + static NullValue? valueOf($core.int value) => value < 0 || value >= _byValue.length ? null : _byValue[value]; + + const NullValue._(super.v, super.n); +} + + +const _omitEnumNames = $core.bool.fromEnvironment('protobuf.omit_enum_names'); diff --git a/pkgs/googleapis_firestore_v1/lib/google/protobuf/timestamp.pb.dart b/pkgs/googleapis_firestore_v1/lib/google/protobuf/timestamp.pb.dart new file mode 100644 index 00000000..34d15e7e --- /dev/null +++ b/pkgs/googleapis_firestore_v1/lib/google/protobuf/timestamp.pb.dart @@ -0,0 +1,184 @@ +// +// Generated code. Do not modify. +// source: google/protobuf/timestamp.proto +// +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +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; + +export 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions; + +/// A Timestamp represents a point in time independent of any time zone or local +/// calendar, encoded as a count of seconds and fractions of seconds at +/// nanosecond resolution. The count is relative to an epoch at UTC midnight on +/// January 1, 1970, in the proleptic Gregorian calendar which extends the +/// Gregorian calendar backwards to year one. +/// +/// All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap +/// second table is needed for interpretation, using a [24-hour linear +/// smear](https://developers.google.com/time/smear). +/// +/// 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('See https://github.com/google/protobuf.dart/issues/998.') + Timestamp clone() => Timestamp()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Timestamp copyWith(void Function(Timestamp) updates) => super.copyWith((message) => updates(message as Timestamp)) as Timestamp; + + $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/pkgs/googleapis_firestore_v1/lib/google/protobuf/timestamp.pbenum.dart b/pkgs/googleapis_firestore_v1/lib/google/protobuf/timestamp.pbenum.dart new file mode 100644 index 00000000..4a7bffe2 --- /dev/null +++ b/pkgs/googleapis_firestore_v1/lib/google/protobuf/timestamp.pbenum.dart @@ -0,0 +1,11 @@ +// +// Generated code. Do not modify. +// source: google/protobuf/timestamp.proto +// +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + diff --git a/pkgs/googleapis_firestore_v1/lib/google/protobuf/wrappers.pb.dart b/pkgs/googleapis_firestore_v1/lib/google/protobuf/wrappers.pb.dart new file mode 100644 index 00000000..8b4fc38b --- /dev/null +++ b/pkgs/googleapis_firestore_v1/lib/google/protobuf/wrappers.pb.dart @@ -0,0 +1,481 @@ +// +// Generated code. Do not modify. +// source: google/protobuf/wrappers.proto +// +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +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; + +export 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions; + +/// Wrapper message for `double`. +/// +/// The JSON representation for `DoubleValue` is JSON number. +/// +/// Not recommended for use in new APIs, but still useful for legacy APIs and +/// has no plan to be removed. +class DoubleValue extends $pb.GeneratedMessage with $mixin.DoubleValueMixin { + factory DoubleValue({ + $core.double? value, + }) { + final $result = create(); + if (value != null) { + $result.value = value; + } + return $result; + } + DoubleValue._() : super(); + factory DoubleValue.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory DoubleValue.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'DoubleValue', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), createEmptyInstance: create, toProto3Json: $mixin.DoubleValueMixin.toProto3JsonHelper, fromProto3Json: $mixin.DoubleValueMixin.fromProto3JsonHelper) + ..a<$core.double>(1, _omitFieldNames ? '' : 'value', $pb.PbFieldType.OD) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + DoubleValue clone() => DoubleValue()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + DoubleValue copyWith(void Function(DoubleValue) updates) => super.copyWith((message) => updates(message as DoubleValue)) as DoubleValue; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static DoubleValue create() => DoubleValue._(); + DoubleValue createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static DoubleValue getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static DoubleValue? _defaultInstance; + + /// The double value. + @$pb.TagNumber(1) + $core.double get value => $_getN(0); + @$pb.TagNumber(1) + set value($core.double v) { $_setDouble(0, v); } + @$pb.TagNumber(1) + $core.bool hasValue() => $_has(0); + @$pb.TagNumber(1) + void clearValue() => $_clearField(1); +} + +/// Wrapper message for `float`. +/// +/// The JSON representation for `FloatValue` is JSON number. +/// +/// Not recommended for use in new APIs, but still useful for legacy APIs and +/// has no plan to be removed. +class FloatValue extends $pb.GeneratedMessage with $mixin.FloatValueMixin { + factory FloatValue({ + $core.double? value, + }) { + final $result = create(); + if (value != null) { + $result.value = value; + } + return $result; + } + FloatValue._() : super(); + factory FloatValue.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory FloatValue.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'FloatValue', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), createEmptyInstance: create, toProto3Json: $mixin.FloatValueMixin.toProto3JsonHelper, fromProto3Json: $mixin.FloatValueMixin.fromProto3JsonHelper) + ..a<$core.double>(1, _omitFieldNames ? '' : 'value', $pb.PbFieldType.OF) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + FloatValue clone() => FloatValue()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + FloatValue copyWith(void Function(FloatValue) updates) => super.copyWith((message) => updates(message as FloatValue)) as FloatValue; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static FloatValue create() => FloatValue._(); + FloatValue createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static FloatValue getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static FloatValue? _defaultInstance; + + /// The float value. + @$pb.TagNumber(1) + $core.double get value => $_getN(0); + @$pb.TagNumber(1) + set value($core.double v) { $_setFloat(0, v); } + @$pb.TagNumber(1) + $core.bool hasValue() => $_has(0); + @$pb.TagNumber(1) + void clearValue() => $_clearField(1); +} + +/// Wrapper message for `int64`. +/// +/// The JSON representation for `Int64Value` is JSON string. +/// +/// Not recommended for use in new APIs, but still useful for legacy APIs and +/// has no plan to be removed. +class Int64Value extends $pb.GeneratedMessage with $mixin.Int64ValueMixin { + factory Int64Value({ + $fixnum.Int64? value, + }) { + final $result = create(); + if (value != null) { + $result.value = value; + } + return $result; + } + Int64Value._() : super(); + factory Int64Value.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory Int64Value.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Int64Value', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), createEmptyInstance: create, toProto3Json: $mixin.Int64ValueMixin.toProto3JsonHelper, fromProto3Json: $mixin.Int64ValueMixin.fromProto3JsonHelper) + ..aInt64(1, _omitFieldNames ? '' : 'value') + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Int64Value clone() => Int64Value()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Int64Value copyWith(void Function(Int64Value) updates) => super.copyWith((message) => updates(message as Int64Value)) as Int64Value; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static Int64Value create() => Int64Value._(); + Int64Value createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static Int64Value getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static Int64Value? _defaultInstance; + + /// The int64 value. + @$pb.TagNumber(1) + $fixnum.Int64 get value => $_getI64(0); + @$pb.TagNumber(1) + set value($fixnum.Int64 v) { $_setInt64(0, v); } + @$pb.TagNumber(1) + $core.bool hasValue() => $_has(0); + @$pb.TagNumber(1) + void clearValue() => $_clearField(1); +} + +/// Wrapper message for `uint64`. +/// +/// The JSON representation for `UInt64Value` is JSON string. +/// +/// Not recommended for use in new APIs, but still useful for legacy APIs and +/// has no plan to be removed. +class UInt64Value extends $pb.GeneratedMessage with $mixin.UInt64ValueMixin { + factory UInt64Value({ + $fixnum.Int64? value, + }) { + final $result = create(); + if (value != null) { + $result.value = value; + } + return $result; + } + UInt64Value._() : super(); + factory UInt64Value.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory UInt64Value.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'UInt64Value', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), createEmptyInstance: create, toProto3Json: $mixin.UInt64ValueMixin.toProto3JsonHelper, fromProto3Json: $mixin.UInt64ValueMixin.fromProto3JsonHelper) + ..a<$fixnum.Int64>(1, _omitFieldNames ? '' : 'value', $pb.PbFieldType.OU6, defaultOrMaker: $fixnum.Int64.ZERO) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + UInt64Value clone() => UInt64Value()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + UInt64Value copyWith(void Function(UInt64Value) updates) => super.copyWith((message) => updates(message as UInt64Value)) as UInt64Value; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static UInt64Value create() => UInt64Value._(); + UInt64Value createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static UInt64Value getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static UInt64Value? _defaultInstance; + + /// The uint64 value. + @$pb.TagNumber(1) + $fixnum.Int64 get value => $_getI64(0); + @$pb.TagNumber(1) + set value($fixnum.Int64 v) { $_setInt64(0, v); } + @$pb.TagNumber(1) + $core.bool hasValue() => $_has(0); + @$pb.TagNumber(1) + void clearValue() => $_clearField(1); +} + +/// Wrapper message for `int32`. +/// +/// The JSON representation for `Int32Value` is JSON number. +/// +/// Not recommended for use in new APIs, but still useful for legacy APIs and +/// has no plan to be removed. +class Int32Value extends $pb.GeneratedMessage with $mixin.Int32ValueMixin { + factory Int32Value({ + $core.int? value, + }) { + final $result = create(); + if (value != null) { + $result.value = value; + } + return $result; + } + Int32Value._() : super(); + factory Int32Value.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory Int32Value.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Int32Value', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), createEmptyInstance: create, toProto3Json: $mixin.Int32ValueMixin.toProto3JsonHelper, fromProto3Json: $mixin.Int32ValueMixin.fromProto3JsonHelper) + ..a<$core.int>(1, _omitFieldNames ? '' : 'value', $pb.PbFieldType.O3) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Int32Value clone() => Int32Value()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Int32Value copyWith(void Function(Int32Value) updates) => super.copyWith((message) => updates(message as Int32Value)) as Int32Value; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static Int32Value create() => Int32Value._(); + Int32Value createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static Int32Value getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static Int32Value? _defaultInstance; + + /// The int32 value. + @$pb.TagNumber(1) + $core.int get value => $_getIZ(0); + @$pb.TagNumber(1) + set value($core.int v) { $_setSignedInt32(0, v); } + @$pb.TagNumber(1) + $core.bool hasValue() => $_has(0); + @$pb.TagNumber(1) + void clearValue() => $_clearField(1); +} + +/// Wrapper message for `uint32`. +/// +/// The JSON representation for `UInt32Value` is JSON number. +/// +/// Not recommended for use in new APIs, but still useful for legacy APIs and +/// has no plan to be removed. +class UInt32Value extends $pb.GeneratedMessage with $mixin.UInt32ValueMixin { + factory UInt32Value({ + $core.int? value, + }) { + final $result = create(); + if (value != null) { + $result.value = value; + } + return $result; + } + UInt32Value._() : super(); + factory UInt32Value.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory UInt32Value.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'UInt32Value', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), createEmptyInstance: create, toProto3Json: $mixin.UInt32ValueMixin.toProto3JsonHelper, fromProto3Json: $mixin.UInt32ValueMixin.fromProto3JsonHelper) + ..a<$core.int>(1, _omitFieldNames ? '' : 'value', $pb.PbFieldType.OU3) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + UInt32Value clone() => UInt32Value()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + UInt32Value copyWith(void Function(UInt32Value) updates) => super.copyWith((message) => updates(message as UInt32Value)) as UInt32Value; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static UInt32Value create() => UInt32Value._(); + UInt32Value createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static UInt32Value getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static UInt32Value? _defaultInstance; + + /// The uint32 value. + @$pb.TagNumber(1) + $core.int get value => $_getIZ(0); + @$pb.TagNumber(1) + set value($core.int v) { $_setUnsignedInt32(0, v); } + @$pb.TagNumber(1) + $core.bool hasValue() => $_has(0); + @$pb.TagNumber(1) + void clearValue() => $_clearField(1); +} + +/// Wrapper message for `bool`. +/// +/// The JSON representation for `BoolValue` is JSON `true` and `false`. +/// +/// Not recommended for use in new APIs, but still useful for legacy APIs and +/// has no plan to be removed. +class BoolValue extends $pb.GeneratedMessage with $mixin.BoolValueMixin { + factory BoolValue({ + $core.bool? value, + }) { + final $result = create(); + if (value != null) { + $result.value = value; + } + return $result; + } + BoolValue._() : super(); + factory BoolValue.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory BoolValue.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'BoolValue', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), createEmptyInstance: create, toProto3Json: $mixin.BoolValueMixin.toProto3JsonHelper, fromProto3Json: $mixin.BoolValueMixin.fromProto3JsonHelper) + ..aOB(1, _omitFieldNames ? '' : 'value') + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + BoolValue clone() => BoolValue()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + BoolValue copyWith(void Function(BoolValue) updates) => super.copyWith((message) => updates(message as BoolValue)) as BoolValue; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static BoolValue create() => BoolValue._(); + BoolValue createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static BoolValue getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static BoolValue? _defaultInstance; + + /// The bool value. + @$pb.TagNumber(1) + $core.bool get value => $_getBF(0); + @$pb.TagNumber(1) + set value($core.bool v) { $_setBool(0, v); } + @$pb.TagNumber(1) + $core.bool hasValue() => $_has(0); + @$pb.TagNumber(1) + void clearValue() => $_clearField(1); +} + +/// Wrapper message for `string`. +/// +/// The JSON representation for `StringValue` is JSON string. +/// +/// Not recommended for use in new APIs, but still useful for legacy APIs and +/// has no plan to be removed. +class StringValue extends $pb.GeneratedMessage with $mixin.StringValueMixin { + factory StringValue({ + $core.String? value, + }) { + final $result = create(); + if (value != null) { + $result.value = value; + } + return $result; + } + StringValue._() : super(); + factory StringValue.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory StringValue.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'StringValue', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), createEmptyInstance: create, toProto3Json: $mixin.StringValueMixin.toProto3JsonHelper, fromProto3Json: $mixin.StringValueMixin.fromProto3JsonHelper) + ..aOS(1, _omitFieldNames ? '' : 'value') + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + StringValue clone() => StringValue()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + StringValue copyWith(void Function(StringValue) updates) => super.copyWith((message) => updates(message as StringValue)) as StringValue; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static StringValue create() => StringValue._(); + StringValue createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static StringValue getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static StringValue? _defaultInstance; + + /// The string value. + @$pb.TagNumber(1) + $core.String get value => $_getSZ(0); + @$pb.TagNumber(1) + set value($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasValue() => $_has(0); + @$pb.TagNumber(1) + void clearValue() => $_clearField(1); +} + +/// Wrapper message for `bytes`. +/// +/// The JSON representation for `BytesValue` is JSON string. +/// +/// Not recommended for use in new APIs, but still useful for legacy APIs and +/// has no plan to be removed. +class BytesValue extends $pb.GeneratedMessage with $mixin.BytesValueMixin { + factory BytesValue({ + $core.List<$core.int>? value, + }) { + final $result = create(); + if (value != null) { + $result.value = value; + } + return $result; + } + BytesValue._() : super(); + factory BytesValue.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory BytesValue.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'BytesValue', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), createEmptyInstance: create, toProto3Json: $mixin.BytesValueMixin.toProto3JsonHelper, fromProto3Json: $mixin.BytesValueMixin.fromProto3JsonHelper) + ..a<$core.List<$core.int>>(1, _omitFieldNames ? '' : 'value', $pb.PbFieldType.OY) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + BytesValue clone() => BytesValue()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + BytesValue copyWith(void Function(BytesValue) updates) => super.copyWith((message) => updates(message as BytesValue)) as BytesValue; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static BytesValue create() => BytesValue._(); + BytesValue createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static BytesValue getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static BytesValue? _defaultInstance; + + /// The bytes value. + @$pb.TagNumber(1) + $core.List<$core.int> get value => $_getN(0); + @$pb.TagNumber(1) + set value($core.List<$core.int> v) { $_setBytes(0, v); } + @$pb.TagNumber(1) + $core.bool hasValue() => $_has(0); + @$pb.TagNumber(1) + void clearValue() => $_clearField(1); +} + + +const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); +const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/pkgs/googleapis_firestore_v1/lib/google/protobuf/wrappers.pbenum.dart b/pkgs/googleapis_firestore_v1/lib/google/protobuf/wrappers.pbenum.dart new file mode 100644 index 00000000..3a35b206 --- /dev/null +++ b/pkgs/googleapis_firestore_v1/lib/google/protobuf/wrappers.pbenum.dart @@ -0,0 +1,11 @@ +// +// Generated code. Do not modify. +// source: google/protobuf/wrappers.proto +// +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + diff --git a/pkgs/googleapis_firestore_v1/lib/google/rpc/status.pb.dart b/pkgs/googleapis_firestore_v1/lib/google/rpc/status.pb.dart new file mode 100644 index 00000000..912b1335 --- /dev/null +++ b/pkgs/googleapis_firestore_v1/lib/google/rpc/status.pb.dart @@ -0,0 +1,103 @@ +// +// Generated code. Do not modify. +// source: google/rpc/status.proto +// +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:core' as $core; + +import 'package:protobuf/protobuf.dart' as $pb; + +import '../protobuf/any.pb.dart' as $17; + +export 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions; + +/// The `Status` type defines a logical error model that is suitable for +/// different programming environments, including REST APIs and RPC APIs. It is +/// used by [gRPC](https://github.com/grpc). Each `Status` message contains +/// three pieces of data: error code, error message, and error details. +/// +/// You can find out more about this error model and how to work with it in the +/// [API Design Guide](https://cloud.google.com/apis/design/errors). +class Status extends $pb.GeneratedMessage { + factory Status({ + $core.int? code, + $core.String? message, + $core.Iterable<$17.Any>? details, + }) { + final $result = create(); + if (code != null) { + $result.code = code; + } + if (message != null) { + $result.message = message; + } + if (details != null) { + $result.details.addAll(details); + } + return $result; + } + Status._() : super(); + factory Status.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory Status.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Status', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.rpc'), createEmptyInstance: create) + ..a<$core.int>(1, _omitFieldNames ? '' : 'code', $pb.PbFieldType.O3) + ..aOS(2, _omitFieldNames ? '' : 'message') + ..pc<$17.Any>(3, _omitFieldNames ? '' : 'details', $pb.PbFieldType.PM, subBuilder: $17.Any.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Status clone() => Status()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Status copyWith(void Function(Status) updates) => super.copyWith((message) => updates(message as Status)) as Status; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static Status create() => Status._(); + Status createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static Status getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static Status? _defaultInstance; + + /// The status code, which should be an enum value of + /// [google.rpc.Code][google.rpc.Code]. + @$pb.TagNumber(1) + $core.int get code => $_getIZ(0); + @$pb.TagNumber(1) + set code($core.int v) { $_setSignedInt32(0, v); } + @$pb.TagNumber(1) + $core.bool hasCode() => $_has(0); + @$pb.TagNumber(1) + void clearCode() => $_clearField(1); + + /// A developer-facing error message, which should be in English. Any + /// user-facing error message should be localized and sent in the + /// [google.rpc.Status.details][google.rpc.Status.details] field, or localized + /// by the client. + @$pb.TagNumber(2) + $core.String get message => $_getSZ(1); + @$pb.TagNumber(2) + set message($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasMessage() => $_has(1); + @$pb.TagNumber(2) + void clearMessage() => $_clearField(2); + + /// A list of messages that carry the error details. There is a common set of + /// message types for APIs to use. + @$pb.TagNumber(3) + $pb.PbList<$17.Any> get details => $_getList(2); +} + + +const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); +const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/pkgs/googleapis_firestore_v1/lib/google/rpc/status.pbenum.dart b/pkgs/googleapis_firestore_v1/lib/google/rpc/status.pbenum.dart new file mode 100644 index 00000000..194b18bd --- /dev/null +++ b/pkgs/googleapis_firestore_v1/lib/google/rpc/status.pbenum.dart @@ -0,0 +1,11 @@ +// +// Generated code. Do not modify. +// source: google/rpc/status.proto +// +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + diff --git a/pkgs/googleapis_firestore_v1/lib/google/type/latlng.pb.dart b/pkgs/googleapis_firestore_v1/lib/google/type/latlng.pb.dart new file mode 100644 index 00000000..7864da72 --- /dev/null +++ b/pkgs/googleapis_firestore_v1/lib/google/type/latlng.pb.dart @@ -0,0 +1,85 @@ +// +// Generated code. Do not modify. +// source: google/type/latlng.proto +// +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:core' as $core; + +import 'package:protobuf/protobuf.dart' as $pb; + +export 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions; + +/// An object that represents a latitude/longitude pair. This is expressed as a +/// pair of doubles to represent degrees latitude and degrees longitude. Unless +/// specified otherwise, this must conform to the +/// WGS84 +/// standard. Values must be within normalized ranges. +class LatLng extends $pb.GeneratedMessage { + factory LatLng({ + $core.double? latitude, + $core.double? longitude, + }) { + final $result = create(); + if (latitude != null) { + $result.latitude = latitude; + } + if (longitude != null) { + $result.longitude = longitude; + } + return $result; + } + LatLng._() : super(); + factory LatLng.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory LatLng.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'LatLng', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.type'), createEmptyInstance: create) + ..a<$core.double>(1, _omitFieldNames ? '' : 'latitude', $pb.PbFieldType.OD) + ..a<$core.double>(2, _omitFieldNames ? '' : 'longitude', $pb.PbFieldType.OD) + ..hasRequiredFields = false + ; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + LatLng clone() => LatLng()..mergeFromMessage(this); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + LatLng copyWith(void Function(LatLng) updates) => super.copyWith((message) => updates(message as LatLng)) as LatLng; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static LatLng create() => LatLng._(); + LatLng createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static LatLng getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static LatLng? _defaultInstance; + + /// The latitude in degrees. It must be in the range [-90.0, +90.0]. + @$pb.TagNumber(1) + $core.double get latitude => $_getN(0); + @$pb.TagNumber(1) + set latitude($core.double v) { $_setDouble(0, v); } + @$pb.TagNumber(1) + $core.bool hasLatitude() => $_has(0); + @$pb.TagNumber(1) + void clearLatitude() => $_clearField(1); + + /// The longitude in degrees. It must be in the range [-180.0, +180.0]. + @$pb.TagNumber(2) + $core.double get longitude => $_getN(1); + @$pb.TagNumber(2) + set longitude($core.double v) { $_setDouble(1, v); } + @$pb.TagNumber(2) + $core.bool hasLongitude() => $_has(1); + @$pb.TagNumber(2) + void clearLongitude() => $_clearField(2); +} + + +const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); +const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/pkgs/googleapis_firestore_v1/lib/google/type/latlng.pbenum.dart b/pkgs/googleapis_firestore_v1/lib/google/type/latlng.pbenum.dart new file mode 100644 index 00000000..cd491f3e --- /dev/null +++ b/pkgs/googleapis_firestore_v1/lib/google/type/latlng.pbenum.dart @@ -0,0 +1,11 @@ +// +// Generated code. Do not modify. +// source: google/type/latlng.proto +// +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + diff --git a/pkgs/googleapis_firestore_v1/pubspec.yaml b/pkgs/googleapis_firestore_v1/pubspec.yaml index 3d24cf93..996097e2 100644 --- a/pkgs/googleapis_firestore_v1/pubspec.yaml +++ b/pkgs/googleapis_firestore_v1/pubspec.yaml @@ -8,7 +8,13 @@ publish_to: none environment: sdk: ^3.7.0 -#dependencies: +dependencies: + fixnum: ^1.1.0 + grpc: ^4.0.0 + protobuf: ^4.1.0 dev_dependencies: lints: ^6.0.0 + path: ^1.9.0 + # We use a pinned version to make the gRPC library generation hermetic. + protoc_plugin: 22.2.0 diff --git a/pkgs/googleapis_firestore_v1/tool/README.md b/pkgs/googleapis_firestore_v1/tool/README.md new file mode 100644 index 00000000..cf3f092a --- /dev/null +++ b/pkgs/googleapis_firestore_v1/tool/README.md @@ -0,0 +1,21 @@ +## Re-generating the gRPC library + +To re-generate the gRPC library, run: + +```bash +dart tool/generate.dart +``` + +Any updates will appear in `lib/`. + +## Updating the source protos + +To update the Firestore API protos with the most recent versions, run: + +```bash +dart tool/update_protos.dart +``` + +Any updates will appear in `protos/`. + +You will then want to re-generate the gRPC library. diff --git a/pkgs/googleapis_firestore_v1/tool/generate.dart b/pkgs/googleapis_firestore_v1/tool/generate.dart new file mode 100644 index 00000000..6eb5b0ba --- /dev/null +++ b/pkgs/googleapis_firestore_v1/tool/generate.dart @@ -0,0 +1,58 @@ +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +/// Run this script to regenerate the gRPC library from the protobufs. +library; + +import 'dart:io'; + +import 'package:path/path.dart' as path; + +void main(List args) async { + final src = Directory('protos'); + final dst = Directory('lib'); + + await protoc(src, dst); + + // TODO(devoncarew): We need an option to not generate the pbjson files. + final jsonFiles = dst + .listSync(recursive: true) + .whereType() + .where((file) => file.path.endsWith('.pbjson.dart')); + for (final jsonFile in jsonFiles) { + jsonFile.deleteSync(); + } +} + +Future protoc(Directory source, Directory dest) async { + final files = source + .listSync(recursive: true) + .whereType() + .where((file) => file.path.endsWith('.proto')); + final names = files.map( + (file) => path.relative(file.path, from: source.path), + ); + + final protocGenDart = Platform.script.resolve('protoc-gen-dart').toFilePath(); + + final args = [ + // The protos include path. + '--proto_path=${source.path}', + // Where to write the generated Dart code. + '--dart_out=grpc:${dest.path}', + // protoc_plugin.sh trampolines into package:protoc_plugin. + '--plugin=$protocGenDart', + // The proto files to compile. + ...names, + ]; + print('protoc ${args.join(' ')}'); + + final result = await Process.run('protoc', args); + stdout.write(result.stdout); + stderr.write(result.stderr); + if (result.exitCode != 0) { + exitCode = result.exitCode; + throw 'protoc exited with ${result.exitCode}'; + } +} diff --git a/pkgs/googleapis_firestore_v1/tool/protoc-gen-dart b/pkgs/googleapis_firestore_v1/tool/protoc-gen-dart new file mode 100755 index 00000000..e0123950 --- /dev/null +++ b/pkgs/googleapis_firestore_v1/tool/protoc-gen-dart @@ -0,0 +1,2 @@ +#!/bin/bash +dart run protoc_plugin $*